Read more of this story at Slashdot.
104649 items (96858 unread) in 19 feeds
Friends
(992 unread)
Build
(67517 unread)
Heads
(712 unread)
News
(27430 unread)
fun
(207 unread)
News (100 unread)
Read more of this story at Slashdot.
Read more of this story at Slashdot.
It's the latest Web-based syndication of Ruby Weekly, the weekly Ruby and Rails e-mail newsletter (which just tipped 11K subscribers). Ruby Weekly now has a 'tips' page where you can submit links for potential inclusion so if you're releasing something or have written a cool post, fill out the form and you may be in Ruby Weekly next week :-)
HeadlinesRails 3.2 Released
DHH has unveiled Rails 3.2! Not quite as big a deal as 3.1 but has a faster development mode, faster route recognition, a tagged logger, and more. With Rails master now aiming at 4.0.0, it seems 3.2 may be the last version of Rails to support Ruby 1.8.
Ruby on Rails Tutorial, 2nd Edition (Updated for Rails 3.2)
Michael Hartl's "Rails Tutorial" site has been incredibly popular over the last year and he's now finishing up a 2nd edition that's fully updated to Rails 3.2 standards. The first 5 chapters are already good to go and can be read no-cost, as always, at railstutorial.org.
Backing Up with Backup: A Neat DSL for Backup Operations
Pat Allan loves Michael van Rooijen's 'backup' gem so much that he wants to to convince you to use it, by showing you two examples of why he finds it so useful. It does seem pretty handy..
Why Every Ruby Developer Should Learn Smalltalk
Smalltalk was the first purely object oriented language (though Simula included objects before it) and it heavily inspired Ruby's initial development. Victor Savkin thinks that Rubyists could learn a lot from playing with Smalltalk.
The Right Way to Code DCI in Ruby
DCI (Data, Context and Interaction) is an interesting object oriented pattern that's been discussed in the Ruby community lately, but Mike Pack thinks most articles oversimplify its use. In this post, he digs into the idea.
The 'Rails and Spine.JS' Series
Ken Collins is working on a series of posts about using the Spine.js JavaScript MVC framework alongside a Rails app. This is the first of three posts so far.
systemd Socket Activation and Ruby
systemd is a system and service manager for Linux (and replacement for the System V init daemon). Here, Marcin Kulik looks at how a socket-based Ruby server can take advantage of systemd's socket activation feature.
RVM Stable (and More)
Michal Papis of Engine Yard looks at the 'stable' release of RVM (Ruby Version Manager) and how to install and use it. Some handy RVM tips here.
Modularized Association Methods in Rails 3.2
Testing Rails Engines With RSpec
Factory Girl 2.5 Gets Custom Constructors
MediaRailsCasts: Upgrading to Rails 3.2
In the latest RailsCasts episode, Ryan Bates looks at the newly released Rails 3.2 and shows off some of its new features. Short and sweet in just 9 minutes.
Web Programming and Updating Frameworks with Yehuda Katz
The Ruby Rogues sit down with Yehuda Katz to discuss Web frameworks, JavaScript, Rails, Merb, Sinatra, Rack, and more. And just why is to_json a problem? If you have a spare hour, find out :-)
SitemapGenerator: Generate XML Sitemaps from Ruby
Originally a Google idea, XML sitemaps are now used by several search engines and SitemapGenerator will generate Sitemap 0.9 compliant sitemaps for you from Ruby. Includes Rails integration too but is otherwise framework agnostic.
tconsole: A MiniTest Testing Console for Rails
tconsole is a testing console for Rails based around MiniTest (also supporting Test::Unit). It allows you to issue commands concerning what tests to run, and see their test output.
Lisp in 32 Lines of Ruby
Implementing a small Lisp interpreter is the super geeky equivalent of 'hello world' and Michael Fogus (author of The Joy of Clojure) deftly pulls it off in 32 lines of Ruby here.
Tork: Continuous Testing using Forked Processes
Ruby Jobs of the WeekRubyist (or Pythonista) Required at RackSpace [San Antonio, Texas]
Hosting company Rackspace is looking for a developer with Ruby or Python experience (and maybe even Erlang!) to work in its foundation software development team. If Git, Capistrano, MongoDB, and Rails are all interesting to you, check it out.
Ruby Framework Engineer Job at Zendesk [San Francisco]
Want your job featured in Ruby Weekly? Learn more here.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Welcome to this week's Web-based syndication of Ruby Weekly, my Ruby e-mail newsletter.
HeadlinesVote for your 'Ruby Hero' in the Ruby Hero Awards
The Ruby Heroes awards run each year and present 6 community nominated 'heroes' with an award at RailsConf. Nominations are now open so go and drop your nomination for the Rubyist whose code has brightened up your life the most in the past year.
Heroku Receives InfoWorld's Technology of the Year Award
Sorry it's just a press release but it's great to see a company that came up from the Ruby world continue to do well. Congrats to the Heroku team.
Hashes and Encapsulation
Jon Leighton demonstrates why accessing hash elements in a "obj.hashthings['foo']" style isn't the way to go and how to act in a way that respects encapsulation, a tenet of object orientation.
Explaining Ruby's Include and Extend
Aaron Lasseigne gives a simple introduction to the ideas behind the 'include' and 'extend' methods.
Why Sinatra's Halt is Awesome
Myron Marston draws attention to Sinatra's 'halt' method which you can use to immediate stop a request within a filter or route, and explains why he likes it for handling exceptions in Sinatra apps.
Replace Your Test Helpers with a Reusable API
Eric Hodel makes an interesting argument that instead of leaning on test helper files all of the time, perhaps there are common bits of functionality you can bake into your library or app's own APIs.
assert_nothing_tested..
Ryan Davis demonstrates why his popular minitest testing library doesn't have an assert_nothing_raised assertion by picking on a relatively useless test in Rails.
A Workaround for Ruby Support on Netbeans 7.1
Back in February 2011, Netbeans (a popular IDE) dropped its official support for Ruby but the JRuby team offered to pick up the slack. Thomas Enebo has been working on it and has some code to make Ruby support work on Netbeans 7.1 here.
Faster TDD Feedback With tmux, tslime.vim, and turbux.vim
Rails or Sinatra: The Best of Both Worlds?
Over at RubySource, Darren Jones rounds up the opinions and assessments of several well known Rubyists when it comes to choosing Sinatra or Rails for a project. An interesting high level collection of ideas.
How to do Fuzzy Matching in Ruby with fuzzy_match
MediaThe Ruby Rogues on Versioning and Releases
The world's favorite Ruby podcast, Ruby Rogues, is back with an episode all about the versioning of code, Ruby libraries, gems, and more. This time out, James Edward Gray II takes the helm.
Private Pub (RailsCasts)
Private Pub is a gem for use with Rails to publish and subscribe to real-time messages through Faye. You get real-time updates through an open socket without tying up a Rails process. Ryan Bates shows you how to use it in a mere 7 minutes.
ROFLBALT: A Terminal-based ASCII Side Scroller Game
At RailsCamp X, Paul Annesley and Dennis Hotson built this nifty little side scrolling game which works straight from your terminal (256 color support needed though). Surprisingly good for a quick effort.
TwoStroke: A JavaScript Implementation Written in Ruby
Charlie Somerville presents an interesting working (but incomplete) JavaScript implementation, written entirely in Ruby. One of those projects that may seem useful somewhere down the line but for now is just a neat idea.
Guard::RSpectacle: An RSpec Plugin for Guard
Guard::RSpectacle automatically tests your application with RSpec when files are modified. This sounds like guard-rspec on the surface, but RSpectacle acts as an 'embedded' runner within a running Rails app and reloads changed files on the fly.
Juvia: An Open Source Commenting System from Phusion
For a while now, Hongli Lai of Phusion (the geniuses behind Passenger and REE) has been working on a Rails-based open source commenting system that you can include into your site using JavaScript.
Jekyll-Bootstrap: A Quick Way to Start Off Your Own Jekyll-Powered Site
Jekyll is a blog-focused static site generator, and Jekyll users often recommend cloning an existing Jekyll blog to use as a starting point. Jekyll-Bootstrap takes this idea to the next level by attempting to be the definitive Jekyll framework to clone.
Socialization: Liking and Following for your Rails 3 Apps
OEmbedr: Lightweight, Flexible OEmbed Consumer Library
oEmbed is a format for allowing an embedded representation of a URL on third party sites OEmbedr makes consuming oEmbed from any source simple.
Hobson: A Resque-based Distributed Test Runner
Hobson distributes your test suite across N machines and aggregates the results live on a locally run webapp. I haven't tried it yet but on a trawl through the source code it seems to be for Cucumber and RSpec only.
Cracking WPA networks with MacRuby
Vesper: A New Sinatra-based Webapp Framework
Yes, it's 'yet another' webapp framework but Vesper is based on top of Sinatra, already has several plugins, and features a handy 6 minute screencast on its homepage.
Ruby Framework Engineer Job at Zendesk [San Francisco]
The fantastic folks over at Zendesk, the help desk and support ticket app, are looking for a creative and seasoned Ruby engineer to focus on improving their code base. They want full stack engineers who can improve and refactor their frameworks and lead an open source effort by publishing some of the resulting gems.
Ruby on Rails Developer at Unpakt [New York City]
Want your job featured in Ruby Weekly? Learn more here.
Last but not least..Owning Rails: Marc Andre Cournoyer's Online Rails Masterclass
Marc Andre Cournoyer (of Create Your Own Programming Language fame) is running another of his highly praised 2 day, online Rails masterclasses. Marc's given me a discount code you can use to get 80 dollars off - it's 'rubyweekly'. I disclose that I make a commission on this but I won't promote trash and the testimonials speak for themselves :-)
The Programming Language Masterclass: Another Marc-Andre Class
Along similar lines, Marc Andre Cournoyer also runs a more general class aimed at giving you an understanding of the inner workings of programming languages and programming language implementation. 'SAVEME50' gets you a discount and it's in mid February.
Welcome to this week's Web-based syndication of Ruby Weekly, the Ruby e-mail newsletter. While I have you, be sure to follow @RubyInside on Twitter as I'm going to be posting news more frequently there than on the Web site in future.
Follow @RubyInside
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://www.rubyinside.com//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
Also, if you're interested in getting one interesting programming related quote or link each day on Twitter, check out @codewisdom.
Follow @CodeWisdom
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://www.rubyinside.com//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
RSpec 2.8: The Popular Ruby BDD Tool Goes Supersonic
RSpec 2.8 and rspec-rails 2.8.1 have been released and some users have been reporting significant performance improvements. Other tweaks include improved documentation, better tag and filtering options, random example execution, and 'rspec --init' for adding RSpec to an empty Ruby project.
TorqueBox 2.0 Beta 2 Released
Torquebox is a popular JBoss-powered application server for Ruby webapps that provides a smorgasbord of useful backend features. This beta of the 2.0 release boasts the latest versions of JRuby and JBoss and new support for WebSockets/STOMP.
Redcar 0.12 Released: An Editor Built in Ruby
Redcar is a programmers' text editor written in Ruby and this latest release has streamlined its installation and added Mac OS X Lion support.
The Status of DataMapper
DataMapper is a popular Ruby ORM and an interesting alternative to ActiveRecord. In this post, Piotr Solnica explains what's happening with DataMapper 2.0 and how it aims to implement the Data Mapper pattern in full. The systems outlined in this post could resolve a lot of issues people have been having with ActiveRecord, it seems.
Does My Rails App Need A Service Layer?
Jared Carroll picks up on a common thread being discussed in the Rails world lately: service layers. He explains what 'services' are, what types of service can exist, and tries to briefly explain his opinion on their usage within the context of Rails. I'm not entirely comfortable with his conclusion but it's a good introduction nonetheless.
An Exhaustive Explanation of Minimax: A Staple AI Algorithm
An appealing explanation of an algorithm that can be used to 'intelligently' play Tic Tac Toe, complete with a simple Ruby implementation.
How Airbnb Upgraded from Rails 2.3 to Rails 3.0
Rails Development on Ubuntu 11.10: Setting Up a Dev Environment
Eric Proctor wanted to refresh his setup for 2012 so sat down to install a Rails development stack from scratch on Ubuntu 11.10. He shares the process here in case you want to repeat it for yourself.
How to Create A Local Copy of the Rails API Docs and Guides
If you're like many Rails developers, you might frequently hit the Rails docs and guides via Google searches, but if you want access to these useful resources when offline, Aslam Najeebdeen has the answer.
Hosting Your Own Local RubyGems Server
Want to have your own in-house RubyGems server? It's easy and Michael Erasmus shows you how in this post.
Ruby Float Quirks
Clemens Helm stumbles across a rudimentary floating point representation issue, but one that can trip you up nonetheless if you're not aware of it.
Installing RefineryCMS with Rails 3.1.3
Capybara, Cucumber and How the Cookie Crumbles
Steve Richert of Collective Idea wanted to punch through Capybara and be able to set cookies that would "Just Work" from anywhere in his Cucumber suite. Here, he shows you how he did it.
DDD Aggregates in Rails with ActiveRecord
ScreencastsPretty URLs with FriendlyId (RailsCasts)
If you are tired of model ids in the URL, overriding to_param can only get you so far. The friendly_id plugin can help by making it easy to generate a URL slug and maintain a history. Ryan Bates shows us how in a mere 7 minutes.
Puma: A Ruby Web Server Built For Concurrency
Puma is a simple, fast, and highly concurrent HTTP 1.1 server for Ruby webapps. It can be used with any application that supports Rack and makes the audacious claim that it 'is considered the replacement for WEBrick and Mongrel.'
confstruct: Yet Another Configuration Object for Ruby
Confstruct optimistically bills itself as 'yet another configuration gem.' It's definable and configurable by hash, struct, or block and aims to provide the flexibility to do things your way, while keeping things simple and intuitive.
coffee-script-pure: A Pure Ruby CoffeeScript Compiler
CoffeeScript was originally implemented in Ruby so it's interesting to see Charlie Somerville bring it full circle by reimplementing the current CoffeeScript compiler in pure Ruby.
gon-sinatra: Get Your Sinatra Variables in your JavaScript
rack_session_access: Rack Middleware for 'rack.session' Environment Management
rack_session_access makes it possible to change values within the application session of your Rack-backed app.
Rglpk: Ruby Wrapper for the GNU Linear Programming Kit
liquid.js: A JS, In-Browser Implementation of the Liquid Templating Language
Ruby Jobs of the WeekRuby and Rails Entwickler bei blau Mobilfunk GmbH [Hamburg, Deutschland]
Unfortunately I don't speak German but it's great to see a wider variety of locations in the jobs. So if you're looking for a Rails job in Germany or know someome who is, check this out.
Lead Rails Developer at Unpakt [New York, New York]
Last but not least..Exceptional Ruby: Master The Art of Handling Failure in Ruby
I can't help but continue to recommend Avdi Grimm's awesome 'Exceptional Ruby' e-book if you want to dig deep into the world of exceptions and error handling in Ruby. I enjoyed it a lot (and I'm not even making a bean on this recommendation :-))
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
RSpec 2.8 has been released, along with rspec-rails 2.8.1 for the full Rails 3.x integration experience.
RSpec is a BDD-focused testing tool that's particularly popular in the Rails world where everyone except DHH is using it (if you believe the hoopla). RSpec has faced accusations of being less than speedy in the past, but it seems 2.8 has had a performance firework shoved up its tailpipe:

David Chelimsky, the creator of RSpec, also notes that in RSpec 2.8:
rspec --init will create a spec directory and some starter code on a blank project - ideal for Ruby library development!Overall, 2.8 seems like a good step forward, and if you've been feeling a little constipated in the spec running department lately, RSpec 2.8 might help you get things flowing again (though as with Ruby 1.9 vs 1.8, your mileage may vary depending on your usage.)
Ruby Weekly has just tipped over 10,000 subscribers but I know not everyone is into getting their news via e-mail, so here's the latest frequent roundup of the latest Ruby and Rails news for you, all on the Web :-)
Key News, Releases, and HeadlinesHungry Academy Application Process Closes This Weekend
LivingSocial's 'Hungry Academy' will provide a paid, on-site 5 month Ruby and Rails learning experience and mentorship program to a small group of lucky applicants. Interested? You've only got a few days left to apply.
DOS Attack Vulnerability Found in Ruby 1.8's Hash Algorithm
Ruby 1.8.7-p352 and earlier are affected by a wide reaching (as in Python and Java are also affected!) hash related vulnerability. Ruby 1.9 is entirely unaffected.
JRuby 1.6.5.1 Released: Fixes the Hashing Vulnerability
JRuby 1.6.5.1 is a minor patchlevel release of JRuby that's mostly interesting because of the potential hash-based DOS vulnerability it papers over. Plenty of info in this post.
KidsRuby 1.0 Released
KidsRuby is a kid-focused (but just as useful for adults!) Ruby editor aimed at being an environment for teaching the Ruby language. It includes tutorials and a Logo-esque turtle graphics system for more visual types of learning.
Rack 1.4.0 Released
Rack is the modular Ruby Web server interface that sits between servers like Apache and nginx and systems like Rails or Sinatra. Rack 1.4 drops support for Ruby 1.8.6 and includes a bevy of tweaks, bug fixes and minor new features (including support for the 'teapot' HTTP status code ;-)).
Rails 3.2.0 RC2 Released: Rails 3.2 Gets A Step Closer
rbenv 0.3.0 Released: Minor Updates and Fixes
Articles and TutorialsNever Create Ruby Strings Longer Than 23 Characters
A linkbaity title but an interesting article nonetheless by Pat Shaughnessy about a curiosity of how MRI Ruby 1.9 handles strings. Why are 24 byte strings far slower to process than 23 byte ones? Find out here.
Giving Rails 2 the Rails 3.1 Asset Pipeline
Not quite ready for Rails 3.1 yet but still want an asset pipeline on your Rails 2 app? Davis W Frank was in that situation and in this post explains how he sorted it out.
The & Operator in Ruby
Pan Thomakos looks at the uses for the & operator and its associated methods in Ruby, including bitwise ANDing, set intersection, and the unary &.
DelayedJob 3.0 Release Rundown
How Collections Work in the AWS SDK for Ruby
Ruby Gems API Console: Play with RubyGems.org's API on the Web
An interesting API console that's set up to play with the RubyGems.org JSON API. Click the drop down to the left to see all of the prebuilt requests.
MiniTest Quick Reference
MiniTest is the unit testing library that comes in the Ruby 1.9 standard library and which also acts as a compatibility layer for test/unit on 1.9. Matt Sears has put together a handy round up of the assertions and matchers offered by MiniTest::Unit and MiniTest::Spec.
Structural Design Patterns in Ruby
Gregory Brown looks at seven structural design patterns laid out by the Gang of Four, the Adapter, Bridge, Composite, Proxy, Decorator, Facade and Flyweight.
'bundle exec rails' Executes Bundler.setup 3 Times
Rails core team member Santiago Pastorino notes that running 'bundle exec rails' is an inefficient mistake and explains why. (TLDR: Just use 'rails', it'll work out the particulars.)
1 and 2 Letter Ruby Gems
Mike Gunderloy looks at Ruby gems that only have a single letter as their name. It's a mixture of junk and curiosities.
'Kestrels, Quirky Birds, and Hopeless Egocentricity' by Reg Braithwaite
Ruby's own 'Raganwald' has compiled his essays about combinatory logic, method combinators and Ruby meta-programming into a handy and inexpensive e-book. Cerebral stuff.
Evaluating Alternative Decorator Implementations in Ruby
Deprecating a Legacy Subsystem in Rails
Libraries and codeMomentum: A Rack Handler for SPDY Clients
SPDY is a experimental networking protocol developed by Google (and already used in Chrome) for delivering Web content more quickly. Momentum is a Rack handler that can receive connections from SPDY clients and run Rack apps. Lots of info in the README.
Webmachine: Expose Your App's Resources Via HTTP Declaratively
webmachine-ruby is a port of Erlang's Webmachine. Both projects aim to expose parts of the HTTP protocol to your application in a declarative way, so you're less concerned with handling requests directly and more with describing the behavior of the resources in your app.
EmberJS-Rails: Ember.js for Rails 3.1 Developers
Ember.js is the new name for the Sproutcore 2.0 framework, a powerful system for building rich JavaScript-driven Web applications.
Celluloid 0.7: Actors for Concurrent Programming in Ruby
Celluloid provides a simple and natural way to build fault-tolerant concurrent programs in Ruby. With Celluloid, you can build systems out of concurrent objects just as easily as you build sequential programs out of regular objects. 0.7 has just been released.
hogan_assets: Compiles Mustache Templates with Hogan.js on Sprockets
Gitview: A JS Widget to List GitHub Repositories
Gitview is a JavaScript widget you can include on any page to show off your GitHub repositories. Github-badge has done this for years, but Gitview has an interesting GitHub style presentation format including the weekly commit bars.
Some Thoughts on Ruby Classes After 18 Months of Clojure
An enjoyable 25 minute romp through Brian Marick's thoughts on structuring objects in Ruby based on his experiences with the Clojure Lisp dialect.
Sending HTML Email (RailsCasts)
Ryan Bates is back for his weekly RailsCasts episode, this time looking at how to not only send HTML e-mail, but how to put it together (along with the obligatory inline CSS) too.
Debugging Scary Crashes of Rubinius
Dirkjan Bussink has been debugging memory corruption in Rubinius and has put together a 55 minute video explaining how he debugged it. Surely a must watch for any wannabe Rubinius hackers. A 453MB download though..
'Architecture the Lost Years' by Robert Martin at Ruby Midwest 2011
I really enjoyed this keynote by 'Uncle Bob' at the recent Ruby Midwest 2011 conference. He talks about application architecture and how the typical 'Rails way' of approaching it has key disadvantages compared to a decoupled approach.
ActiveRecord Anti-Patterns for Fun and Profit
At November's Ruby Midwest 2011, Ethan Gunderson gave a talk on common mistakes made when working with ActiveRecord and how to make everything all better.
Smalltalk On Rubinius (or How to Implement Your Own Programming Language)
At September's Golden Gate Ruby Conference, Konstantin Haase gave a talk about implementing a programming language using Ruby and the Rubinius compiler tool chain.
Getting Started with Rails: RailsCasts
Ryan Bates takes it back to basics this week with a quick 7 minute sweep through some of the sites, tools, and books you'll find useful when starting out with Rails as of late 2011.
Vim for Rails Developers Screencast
An inexpensive 34 minute screencast by Ben Orenstein that teaches you how to use the popular Vim text editor when working with Rails projects. Ben has a lot of experience in this area.
The Ruby Rogues on Benchmarking and Profiling
Aaron 'tenderlove' Patterson rejoins the Rogues for an hour long chat about benchmarking and profiling Ruby code. There's a lot of depth here and it makes for a typically good and roguish listen.
MacRuby for Fun and Profit by Joshua Ballanco (55 minutes)
Ruby JobsC/Unix Agent Engineer [Portland, Oregon]
New Relic, the Web app performance monitoring and management folks, are looking for someone who loves Ruby but is an experienced C or C++ developer who understands multithreading, database contention, and object-oriented design.
Senior Java/Ruby Software Engineer at Outbid.com [Oakland, California]
Software Developer at Geoforce, Inc. [Lewisville, Texas]
Network Software Engineer at Carnegie Mellon University [Pittsburgh, Pennsylvania]
Recently Forbes wrote about the rise of 'developernomics', noting that companies are seeing programmers as a 'safe haven' investment in otherwise troubled times. Maybe.. maybe not.. but the Ruby and Rails job market is as hot as ever, so if you're looking for a new position, be sure to negotiate well! ;-)
To promote a job, see our Post A Job page. Your listing not only ends up on the Ruby Inside and RubyFlow sidebars but also in the 10114 subscriber Ruby Weekly for free (as a bonus) and on our 7305 follower @rubyinside Twitter account.
Senior Engineer - Edinburgh, United KingdomFreeAgent, the pioneers in web-based accounting, is looking for a senior engineer to join their engineering team in a brand new office in beautiful Edinburgh. It's a fantastic opportunity to join a young, exciting and fast-growing company, and help develop a much-loved and high-traffic customer-facing web app — click here to learn more.
Ruby Developers (Jr and Sr) for Awesome Social Media Tech Co. - Redwood City, CaliforniaWildfire Interactive is looking for a Ruby Developers (both junior and senior) to work on social media technology (lots of working with the Twitter API, for example). They want truly talented Ruby developers with a passion for clean code and great products. Their current technology stack includes Ruby on Rails & Sinatra, and they're in the process of building a number of pure Ruby components so it's not just a Rails job — click here to learn more.
Ruby on Rails Developer - Austin, TexasFacilities Technology Group is a small company with a software product used by thousands of hospitals around the country to manage and maintain the maintenance of equipment. They're busy migrating an old ASP classic based version of their product to Rails and are looking for a Ruby on Rails Developer to help join the team to make it happen — click here to learn more.
Back and Front End Developers at New Relic - Portland, OregonIf you've been reading Ruby Inside for a while, you'll already know New Relic, the leaders in webapp performance management and monitoring. They've got a couple of different positions open, first they're looking for a back end Rails developer and.. a front-end Rails developer too!
Software Engineer and Generalist - San Francisco, CaliforniaSamasource is an award-winning technology social enterprise that provides dignified, internet-based work to people living in poverty. They're looking for a Software Engineer / generalist to join their team and write code that meaningfully impacts the human condition — click here to learn more.
Software Developer - Lewisville, TexasGeoforce, Inc. is looking for a Ruby and JavaScript Developer to work in a team environment to write and maintain Ruby and Javascript code. Experience with geospatial tools is a big plus — click here to learn more.
Senior Java/Ruby Software Engineer - Oakland, CaliforniaOutbid.com is a unique peer-to-peer auctioning platform designed to allow users to host their very own live online auctions. They're looking for a senior Java/Ruby Software Engineer to join their growing product development team — click here to learn more.
Network Software Engineer - Pittsburgh, PennsylvaniaCarnegie Mellon University is looking for a Network Software Engineer to be responsible for the design and development of network-related systems and services that operate, automate, and protect Carnegie Mellon's campus and global data networks — click here to learn more.
To promote a job, see our Post A Job page. Your listing not only ends up on the Ruby Inside and RubyFlow sidebars but also in the 10114 subscriber Ruby Weekly for free (as a bonus) and on our 7305 follower @rubyinside Twitter account.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Ruby isn't known for its game development chops despite having a handful of interesting libraries suited to it. Java, on the other hand, has a thriving and popular game development scene flooded with powerful libraries, tutorials and forums. Can we drag some of Java's thunder kicking and screaming over to the world of Ruby? Yep! - thanks to JRuby. Let's run through the steps to build a simple 'bat and ball' game now.

If you're part of the "meh, JRuby" brigade, suspend your disbelief for a minute. JRuby is easy to install, easy to use, and isn't going to trample all over your system or suck up all your memory. It will be OK!
One of JRuby's killer features is its ability to use Java libraries and generally dwell as a first class citizen on the JVM. JRuby lets us use performant Java powered game development libraries in a Rubyesque way, lean on Java-based tutorials, and basically have our cake and eat it too.
To install JRuby, I recommend RVM (Ruby Version Manager). I think the JRuby core team prefer you to use their own installer but rvm install jruby has always proven quick and effective for me. Once you get it installed, rvm use jruby and you're done.
The Slick library is a thin layer of structural classes over the top of LWJGL (Lightweight Java Game Library), a mature and popular library that abstracts away most of the boring system level work.
Out of the box LWJGL gives us OpenGL for graphics, OpenAL for audio, controller inputs, and even OpenCL if we wanted to do heavy parallelism or throw work out to the GPU. Slick gives us constructs like game states, geometry, particle effects, and SVG integration, while allowing us to drop down to using LWJGL for anything we like.
Getting Started: Installing Slick and LWJGLRather than waste precious time on theory, let's get down to the nitty gritty of getting a basic window and some graphics on screen:
/mygamelib folder into your /mygame as /mygame/lib - this folder includes both LWGWL and Slick./mygame/lib, we need to unpack the natives-[your os].jar file and move its contents directly into /mygame.
Mac OS X: Right click on the natives-mac.jar file and select to unarchive it (if you have a problem, grab the awesome free The Unarchiver from the App Store) then drag the files in /mygame/lib/native-mac/* directly into /mygame.
Linux and Windows: Running jar -xf natives-linux.jar or jar -xf natives-win32.jar and copying the extracted files back to /mygame should do the trick.

If so, we're ready to code.
Leaping in with a bare bones example, create /mygame/verybasic.rb and include this code:
$:.push File.expand_path('../lib', __FILE__)
require 'java'
require 'lwjgl.jar'
require 'slick.jar'
java_import org.newdawn.slick.BasicGame
java_import org.newdawn.slick.GameContainer
java_import org.newdawn.slick.Graphics
java_import org.newdawn.slick.Input
java_import org.newdawn.slick.SlickException
java_import org.newdawn.slick.AppGameContainer
class Demo < BasicGame
def render(container, graphics)
graphics.draw_string('JRuby Demo (ESC to exit)', 8, container.height - 30)
end
# Due to how Java decides which method to call based on its
# method prototype, it's good practice to fill out all necessary
# methods even with empty definitions.
def init(container)
end
def update(container, delta)
# Grab input and exit if escape is pressed
input = container.get_input
container.exit if input.is_key_down(Input::KEY_ESCAPE)
end
end
app = AppGameContainer.new(Demo.new('SlickDemo'))
app.set_display_mode(640, 480, false)
app.start
Ensure that ruby actually runs JRuby (using ruby -v) and then run it from the command line with ruby verybasic.rb. Assuming all goes well, you'll see this:

If you don't see something like the above, feel free to comment here, but your problems most likely orient around not having the right 'native' libraries in the current directory or from not running the game in its own directory in the first place (if you get probable missing dependency: no lwjgl in java.library.path - bingo).
$:.push File.expand_path('../lib', __FILE__) pushes the 'lib' folder onto the load path. (I've used push because my preferred << approach breaks WordPress ;-))require 'java' enables a lot of JRuby's Java integration functionality.require to load the .jar files from the lib directory.java_import lines bring the named classes into play. It's a little like include, but not quite.BasicGame class by subclassing it and adding our own functionality.render is called frequently by the underlying game engine. All activities relevant to rendering the game window go here.init is called when a game is started.update is called frequently by the underlying game engine. Activities related to updating game data or processing input can go here.AppGameContainer which in turn is given an instance of our game. We set the resolution to 640x480, ensure it's not in full screen mode, and start the game.The demo above is something but there are no graphics or a game mechanic, so it's far from being a 'video game.' Let's flesh it out to include some images and a simple pong-style bat and ball mechanic.
A New Code FileNote: I'm going to ignore most structural and object oriented concerns to flesh out this basic prototype. The aim is to get a game running and to understand how to use some of Slick and LWJGL's features. We can do it again properly later :-)
All of the assets and code files demonstrated here are also available in an archive if you get stuck. Doing it all by hand to start with will definitely help though.
Start a new game file called pong.rb and start off with this new bootstrap code (very much like the demo above but with some key tweaks):
$:.push File.expand_path('../lib', __FILE__)
require 'java'
require 'lwjgl.jar'
require 'slick.jar'
java_import org.newdawn.slick.BasicGame
java_import org.newdawn.slick.GameContainer
java_import org.newdawn.slick.Graphics
java_import org.newdawn.slick.Image
java_import org.newdawn.slick.Input
java_import org.newdawn.slick.SlickException
java_import org.newdawn.slick.AppGameContainer
class PongGame < BasicGame
def render(container, graphics)
graphics.draw_string('RubyPong (ESC to exit)', 8, container.height - 30)
end
def init(container)
end
def update(container, delta)
input = container.get_input
container.exit if input.is_key_down(Input::KEY_ESCAPE)
end
end
app = AppGameContainer.new(PongGame.new('RubyPong'))
app.set_display_mode(640, 480, false)
app.start
Make sure it runs, then move on to fleshing it out.
A Background ImageIt'd be nice for our game to have an elegant background. I've created one called bg.png which you can drag or copy and paste from here (so it becomes /mygame/bg.png):
Now we want to load the background image when the game starts and render it constantly.
To load the game at game start, update the init and render methods like so:
def render(container, graphics)
@bg.draw(0, 0)
graphics.draw_string('RubyPong (ESC to exit)', 8, container.height - 30)
end
def init(container)
@bg = Image.new('bg.png')
end
The @bg instance variable picks up an image and then we issue its draw method to draw it on to the window every time the game engine demands that the game render itself. Run pong.rb and check it out.
Adding a ball and paddle is similar to doing the background. So let's give it a go:
def render(container, graphics)
@bg.draw(0, 0)
@ball.draw(@ball_x, @ball_y)
@paddle.draw(@paddle_x, 400)
graphics.draw_string('RubyPong (ESC to exit)', 8, container.height - 30)
end
def init(container)
@bg = Image.new('bg.png')
@ball = Image.new('ball.png')
@paddle = Image.new('paddle.png')
@paddle_x = 200
@ball_x = 200
@ball_y = 200
@ball_angle = 45
end
The graphics for ball.png and paddle.png are here. Place them directly in /mygame.
We now have this:

Making the Paddle MoveNote: As I said previously, we're ignoring good OO practices and structural concerns here but in the long run having separate classes for paddles and balls would be useful since we could encapsulate the position information and sprites all together. For now, we'll 'rough it' for speed.
Making the paddle move is pretty easy. We already have an input handler in update dealing with the Escape key. Let's extend it to allowing use of the arrow keys to update @paddle_x too:
def update(container, delta)
input = container.get_input
container.exit if input.is_key_down(Input::KEY_ESCAPE)
if input.is_key_down(Input::KEY_LEFT) and @paddle_x > 0
@paddle_x -= 0.3 * delta
end
if input.is_key_down(Input::KEY_RIGHT) and @paddle_x < container.width - @paddle.width
@paddle_x += 0.3 * delta
end
end
It's crude but it works! (P.S. I'd normally use && instead of and but WordPress is being a bastard - I swear I'm switching one day.)
If the left arrow key is detected and the paddle isn't off the left hand side of the screen, @paddle_x is reduced by 0.3 * delta and vice versa for the right arrow.
The reason for using delta is because we don't know how often update is being called. delta contains the number of milliseconds since update was last called so we can use it to 'weight' the changes we make. In this case I want to limit the paddle to moving at 300 pixels per second and 0.3 * 1000 (1000ms = 1s) == 300.
Making the ball move is similar to the paddle but we'll be basing the @ball_x and @ball_y changes on @ball_angle using a little basic trigonometry.
If you stretch your mind back to high school, you might recall that we can use sines and cosines to work out the offset of a point at a certain angle within a unit circle. For example, our ball is currently moving at an angle of 45, so:
Math.sin(45 * Math::PI / 180) # => 0.707106781186547 Math.cos(45 * Math::PI / 180) # => 0.707106781186548
Note: The * Math::PI / 180 is to convert degrees into radians.
We can use these figures as deltas by which to move our ball based upon a chosen ball speed and the delta time variable that Slick gives us.
Add this code to the end of update:
@ball_x += 0.3 * delta * Math.cos(@ball_angle * Math::PI / 180) @ball_y -= 0.3 * delta * Math.sin(@ball_angle * Math::PI / 180)
If you run the game now, the ball will move up and right at an angle of 45 degrees, though it will continue past the game edge and never return. We have more logic to do!
Note: We use -= with @ball_y because sines and cosines use regular cartesian coordinates where the y axis goes from bottom to top, not top to bottom as screen coordinates do.
Add some more code to update to deal with ball reflections:
if (@ball_x > container.width - @ball.width) || (@ball_y < 0) || (@ball_x < 0) @ball_angle = (@ball_angle + 90) % 360 end
This code is butt ugly and pretty naive (get ready for a nice OO design assignment later) but it'll do the trick for now. Run the game again and you'll notice the ball hop through a couple of bounces off of the walls and then off of the bottom of the screen.
Resetting the Game on FailureWhen the ball flies off of the bottom of the screen, we want the game to restart. Let's add this to update:
if @ball_y > container.height @paddle_x = 200 @ball_x = 200 @ball_y = 200 @ball_angle = 45 end
It's pretty naive again, but does the trick. Ideally, we would have a method specifically designed to reset the game environment, but our game is so simple that we'll stick to the basics.
Paddle and Ball ActionWe want our paddle to hit the ball! All we need to do is cram another check into update (poor method - promise to refactor it later!) to get things going:
if @ball_x >= @paddle_x and @ball_x < = (@paddle_x + @paddle.width) and @ball_y.round >= (400 - @ball.height) @ball_angle = (@ball_angle + 90) % 360 end
Note: WordPress has borked the less than operator in the code above. Eugh. Fix that by hand ;-)
And bingo, we have it. Run the game and give it a go. We have a simple, but performant, video game running on JRuby.
If you'd prefer everything packaged up and ready to go, grab this archive file of my /mygame directory.
What Next? Object orientationAs I've taken pains to note throughout this article, the techniques outlined above for maintaining the ball and paddle are naive - an almost C-esque approach.
Building separate classes to maintain the sprite, position, and the logic associated with them (such as bouncing) will clean up the update method significantly. I leave this as a task for you, dear reader!
Games typically have multiple states, including menus, game play, levels, high score screens, and so forth. Slick includes a StateBasedGame class to help with this, although you could rig up your own on top of BasicGame if you really wanted to.
The Slick wiki has some great tutorials that go through various elements of the library, including a Tetris clone that uses game states. The tutorials are written in Java, naturally, but the API calls and method names are all directly transferrable (I'll be writing an article about 'reading' Java code for porting to Ruby soon).
Packaging for DistribtionOne of the main reasons I chose JRuby over the Ruby alternatives was the ability to package up games easily in a .jar file for distribution. The Ludum Dare contest involves having other participants judge your game and since most participants are probably not running Ruby, I wanted it to be relatively easy for them to run my game.
Warbler is a handy tool that can produce .jar files from a Ruby app. I've only done basic experiments so far but will be writing up an article once I have it all nailed.
Ludum DareI was inspired to start looking into JRuby and Java game libraries by the Ludum Dare game development contest. They take place every few months and you get 48 hours to build your own game from scratch. I'm hoping to enter for the first time in just a couple of days and would love to see more Rubyists taking part.
Sinatra Up and Running is a new book published by O'Reilly and written by Alan Harris and Konstantin Hasse that covers the popular Sinatra web application DSL in a brisk 103 pages, acting as a tutorial to newcomers and a handy reference for old hands.
TLDR: It's a short, sweet, relatively cheap and very well written book about Sinatra. Recommended. Buy here.
An interesting quirk of Scandinavian society is the concept of Jante Law. It knocks down standing out and being individual, in favor of communal harmony. It's typically used in a negative context to lament restrictions and lack of risk taking within Nordic society (DHH touched on this briefly in a recent Mixergy interview) but the flip side of the Jante coin is lagom: the idea and ideal of having just the right amount of something.
Sinatra Up and Running is, second to K&R, the most lagom technical book I've read. At a mere 102 pages you may wonder whether it's worth buying - it is. Unlike most technical books - yes, including mine - it skips the waffle and provides a perfect level of detail going through from what Sinatra is, to how it works, and on to an example project that covers just 13 pages. Don't be fooled, though, this isn't one of those tiny format O'Reilly handbooks; it's a regular, full size book - just a thin one!

The book is split into three key sections:
As a core piece of printed documentation for a project, the book does a great job at sharing the basics, inspiring you to dig further and, of course, its short length puts Sinatra into context with the gargantuan Rails framework, where even a 400 page book would struggle to cover the essentials.
So, should you buy it?Sinatra Up and Running is a good book and well written. I enjoyed it and picked up or was reminded of quite a few interesting bits and pieces. I'll probably refer to it from time to time. If your Sinatra experiences are rather on and off or you've not played with it for a while, it's a great, well-paced introduction.
If, however, you're already a Sinatra guru and/or working with Sinatra on a day by day basis and have all of the main patterns memorized, there's not a great deal you're going to get out of it. Buy it to be a completionist or to support the authors, but if you want a book demonstrating in depth how to integrate Sinatra with everything or how to big giant Web applications, this isn't for you.
Inexperienced Rubyists may also find the book's direct no-nonsense style intimidating. If you know what a code block is, you're good to go. This may seem like a bizarre observation to most Rubyists, but I've encountered many beginners who've wanted to "build a Web site" and immediately leapt into an advanced Rails book, only to be confused. If you're still new to Ruby, read The Well Grounded Rubyist or Beginning Ruby first.
And I'm going to stop here, because that would be lagom :-)
Where to buyThere are several options for buying the book. Check out O'Reilly (print, PDF, Mobi, and ePub), Amazon.com (print and Kindle), and Amazon.co.uk (print and Kindle) or your own favorite local bookstore.
Ludum Dare is an online accelerated game development event that focuses on regular 48 hour competitions. Think Rails Rumble but for games! It's been around since 2002 but has had a big publicity boost recently due to the participation of Notch, the creator of the mind-bogglingly popular indie game Minecraft.
The next Ludum Dare contest is taking place this coming weekend between December 16-19, 2011 and I want to encourage Rubyists to take part. The competition tends to be dominated by Java, Flash, Microsoft XNA developers, and HTML5 developers, so it'd be great to see more Ruby entries (of which there have only been a couple so far).
During August's event, I, along with hundreds of others, was glued to Notch's livestream watching him code his game, Prelude of the Chambered (a 6 minute version is on YouTube). I was inspired enough to port his Java code into Ruby using JRuby, producing
potc-jruby (sadly far slower than the original Java version). This time, I plan to enter for real and build my own original game.
Go to the Ludum Dare homepage, read the rules and guide, register on their WordPress blog, wait until the 'theme' has been decided, and start coding once the countdown is finished.
During the 48 hours (or 72 if you do the 'jam' version), you can post blog entries directly to the main Ludum Dare site (if you want) and submit your entry via a special link at the end. Entrants play and judge each other's entries for a period of three weeks before the winners are announced. Having more Rubyists involved would be useful since our games may be less likely to work cross platform or without Ruby installed.. (more on this shortly)
A quick summary of the rules:
The contest has a popular IRC channel (which is already quite active) at #ludumdare on irc.afternet.org. I'm petercooper on there - say hi! I'll be lurking in there a lot over the next week. Also, follow @ludumdare on IRC for more updates and info.
To get a feel for the contest, check out this "keynote" from the last Ludum Dare. There'll be a new one for this year soon:
Building a Game in Ruby?
Building games in Ruby isn't popular but it's not frontier country either. Rubystein, a Wolfenstein 3D pastiche by the Phusion guys, remains a favorite of mine and it even runs on 1.9 with only a few tweaks.
There's a great series by Andrea Wright that dates from 2007 but still has some handy pointers. We also have Ray, RubyGame, and Gosu which all have their fans (Ray is the most recent Ruby game library I'm aware of).
Or.. JRuby!My choice for the contest is none of the above. Instead, it's JRuby. As part of the 'warmup process' for the contest, I've been playing with JRuby and the popular Slick2D Java library. The performance is amazing and the development process pretty straightforward.
Being a popular library in the Java world, I can use a lot of the Java-based tutorials and code samples for Slick2D to get a feel for how it all works. And.. I'll be writing an article for Ruby Inside in the next day or two showing you how to get started with it for yourself :-)
2011 is drawing to a close and I have been reminded of a post I made about a year ago: Ruby in 2010: A Retrospective of a Great Year for Ruby. 2010 was a stunning year with the release of Ruby 1.9.2, MacRuby 0.5, Sinatra 1.0, Rubinius 1.0, and DataMapper 1.0!
This year, MagLev, Capybara, Cucumber, RefineryCMS, OmniAuth and TorqueBox all hit their 1.0 milestones, but I've dug through the archives to see what else 2011 brought for the Ruby scene.
JanuaryRails Installer: Ruby and Rails on Windows in a Single, Easy Install - Wayne E Seguin, of RVM, released a super simple Rails, Git, SQLite, and Ruby installer for Windows. It's now an Engine Yard project and going strong.
Clever Algorithms: Free E-book of Nature-Inspired AI Recipes for Ruby
FebruaryRuby Turns 18 - Matz had previously said Ruby was "born" on February 24, 1993, so "she" turned 18 years old in February. Yes, I'm sad enough to have had that in my calendar ever since I read about it ;-)
Netbeans Drops Ruby Support (And JRuby Picks It Up) - The Netbeans IDE team announced they were dropping support for the Ruby and Rails specific features in their popular IDE. Separately, though, Thomas Enebo of the JRuby core team said that they had spoken to the Netbeans team and they would be adopting the project.
MarchJRuby 1.6 Released - JRuby 1.6 was released with, significantly, Ruby 1.9.2 support. JRuby has continued its role as a formidable and leading Ruby implementation throughout 2011.
MacRuby 0.10 Released - Apple's MacRuby got XCode 4 support (although some have complained it's been a bit shaky since) and the ability to put together apps suitable for Mac App Store submission. There are now at least several MacRuby powered apps on the store.
DHH Offended by RSpec, Says Test::Unit is Just Great - Rails creator David Heinemeier Hansson inadvertently kicked off a relatively interesting discussion about testing tools.
LivingSocial Acquires Ruby/Rails Consultancy InfoEther - This wasn't your typical boring acquisition. LivingSocial, a daily deals site, purchased InfoEther, the US's first significant Ruby consultancy and home to Chad Fowler, Rich Kilmer, Tom Copeland, and others. Ruby recruitment in overdrive!
AprilThe Rails Hotline launched - The Rails Hotline is a free helpline run by volunteer Ruby and Rails developers. It was very popular early on and while I haven't heard much about it lately, there still seem to be people staffing it.
Haml and Sass 3.1 Released (Separately)
MayTorqueBox 1.0.0 Released: A Java Platform for Rack Apps - Almost three years in the making, Torquebox 1.0 arrived. It's a popular JBoss-powered application server for Rack apps (including Rails apps) that provides a smorgasbord of useful backend features.
RubyGems 1.8.0 Released - Significant because 1.8 is still the version that comes with Ruby 1.9.3 in late 2011. After a raft of slightly temperamental releases, 1.8 has been a champ.
The Ruby Rogues Podcast Launches - A new discussion based podcast made it into the Ruby world in May. It's still going and has frequent episodes with great discussions on all sorts of Ruby related topics. Much recommended.
Avdi Grimm's "Exceptional Ruby" Book Released - Avdi Grimm released a PDF e-book about error and exception handling in Ruby, based on his 'Exceptional Ruby' talk at Magic Ruby 2011. It has proven to be quite a talking point since.
JuneThe Story Behind Ruby 1.9.3 Getting 36% Faster Loading Times - Perhaps the story I spent the most time on in 2011. Two different solutions to speeding up Ruby 1.9.2's notoriously slow requires were tabled, only one made the cut. Ruby 1.9.3 has since proven to be somewhat swifter.
Refinery CMS 1.0 Released - Version 1.0 of Refinery CMS arrived 2 years after it first became an open source project. Refinery is one of the most popular Rails-based content management systems and the 1.0 release boasts full Rails 3 support and a solid stable base built up by over 100 contributors.
Capybara 1.0 Released - It was certainly the year for Capybara. The acceptance test framework for webapps is now perhaps the most popular tool in its field.
Cucumber 1.0.0 Released - Continuing with the testing theme, Cucumber also hit a significant milestone in 2011.
JulyRuby's Creator, Matz, Joins Heroku - Surprise in the Ruby community as Yukihiro 'matz' Matsumoto took up a Chief Architect position with Heroku, the Salesforce-owned Ruby application hosting company.
AugustRails 3.1.0 Released - A full year after Rails 3.0, Rails 3.1 was released to much fanfare, adding key features like the asset pipeline, roles, reversible migrations, jQuery as the new default JavaScript library, and a new focus on CoffeeScript. I explained the controversy behind some of the changes when they were announced back in April.
rbenv: A Simple, New Ruby Version Management Tool - Sam Stephenson of 37signals unveiled his new lightweight Ruby version management tool and.. well, there was quite a bit of drama around it. Now, though, it seems people have fallen into sticking with the tool they like best and both RVM and rbenv seem to be going from strength to strength.
SeptemberRailsInstaller 2.0 Shipped - The Windows-based RailsInstaller hit its 2.0 milestone and became a great way to get Ruby 1.9.2 and Rails 3.1 on Windows in a single install.
The Ruby 1.9 Walkthrough Released - I released my epic 3 hour Ruby 1.9 screencast guide in September. It's been a fun ride!
TrollScript Released - A significant new entrant to the world of programming languages arrived in the shape of a Ruby-based interpreter for a new Brainf**k dialect by Tom Bell.
OctoberRuby 1.9.3p0 Released - The official production release of Ruby 1.9.3 finally hit in October and brought faster Rails app loading times to millions. Hurrah! I made a more detailed roundup of the changes.
Ruby 2.0 Release Schedule Announced - It was announced that Ruby 2.0 would be coming along in 2013, but I also put together some info about what Ruby 2.0 is and what it might contain.
Ruby-doc.org Got A Facelift - James Britt gave Ruby-doc.org a significant facelift this year and unveiled his work in October. It's certainly been a major improvement so far.
Ryan Bates Unveils RailsCasts Pro - Ruby's most popular screencasting legend (other than Geoffrey Grosenbach, of course!) 'went pro' and started to charge for extra episodes of his popular weekly screencast series.
Sinatra 1.3 Released - Sinatra, the popular webapp DSL / microframework, reached version 1.3.0. The significant addition this time around was a 'streaming API' for streaming data to clients instead of delivering it all in one big package.
Spree (Open Source Rails E-commerce System) Raises $1.5 Million - Spree is a popular open source Rails e-commerce system and its creator raised $1.5m in venture capital to take it even further (as well as offer Spree-based consulting). Tom Preston Werner (GitHub) and James Lindenbaum (Heroku) also joined as advisors.
DataMapper 1.2.0 Released - DataMapper is a popular ORM (Object Relational Mapper) and a powerful alternative to ActiveRecord for many developers. Version 1.2 brought all-important support for Rails 3.1 amongst other things.
NovemberMagLev 1.0 Released - Two years after its alpha released, one of the most intriguing alternative Ruby implementations made to its big 1.0.
OmniAuth 1.0: Authentication APIs Reach A New Level - OmniAuth is a popular library for performing authentication against numerous external authentication systems (like OAuth, OpenID, Facebook, and Twitter). Version 1.0 brought massive structural changes (for the better) and introduced capabilities to do local/internal authentication too.
DHH Got Married - Dashing the dreams of women everywhere.
Welcome to this week's Web-based syndication of Ruby Weekly - it's bumper sized this week. And a big congratulations to David Heinemeier Hansson, creator of Rails, as he got married recently!
HeadlinesSinatra: Up and Running (New Book from O'Reilly)
A new book from O'Reilly, written by Alan Harris and Konstantin Hasse, that takes a look at the popular Sinatra Ruby webapp library. It's available in e-book and print formats.
awesome_print 1.0 Released
OK, it's already at 1.0.1, but Michael Dvorkin's awesome 'pretty printer' for Ruby objects has reached its 1.0 milestone. This is definitely one of my favorite Ruby projects.
Method Chaining and Lazy Evaluation in Ruby
Ever wondered how that ActiveRecord query style method chaining works? Jeff Kreeftmeijer shows you one way to go about implementing your own method chaining mechanism.
Implementing Autocomplete with Redis in Rails 3.1
Pat Shaughnessy demonstrates how to set up a Rails 3.1 app to do Redis-backed autocompletion using the Soulmate library. Very detailed and a lot to learn here.
Ruby Blocks as Dynamic Callbacks
A callback is a block of code passed as an argument to a method which can be run under certain conditions later on. Matt Sears shows off a clever technique to have multiple types of callback within a single code block which can be triggered independently.
Writing Simple Ruby Client/Servers using Protobufs
Rails 3.2 Gets 'pluck' Method, Returns Array of Table Column Values
ActiveRecord::Relation#pluck is used to get values from a single column of a table. It accepts a column name as its argument and returns an array of values. It'll be in the forthcoming Rails 3.2 or, if you're brave, is in head now.
Acceptance Testing with Responsive Layouts
The State of Ruby ORMs
Piotr Solnica presents a roundup of the popular Ruby ORMs (Object Relational Mappers) ActiveRecord, DataMapper, and Sequel.
Xavier Shay's DataMapper Retrospective
Xavier used DataMapper, rather than ActiveRecord, on his last two major projects and in this post he shares what he sees as the pros and cons of the DataMapper approach.
In-Place Editing - RailsCasts
Ryan Bates's weekly screencast outing shows us how to edit an on-page attribute in-place using the 'Best In Place' gem. He also shows how to add validations and support for different field types.
Pat Shaughnessy on Bundler 1.1
I've recently linked to a couple of great articles by Pat about Bundler 1.1's new features and performance improvements but if you want it in 20 minute video form.. here you go :-)
The Ruby Rogues on Software Craftsmanship
The latest episode of the always awesome Ruby Rogues podcast looks at 'software craftsmanship', code retreats, and developer apprentice programs.
Building a Rails Plugin with Tested Assets (Screencast)
An hour long screencast by Dmytrii Nagirniak working in real time on a Rails plugin, along with using Sass, Jasmine, and CSS assets. Be warned, however, it's not a particularly easy watching experience, even at fullscreen.
Cut and Polish: A Guide to Crafting Gems
At the RubyC conference in Ukraine, Pat Allan gave a talk about building gems, some of the tools you can use, and some best practices. All 47 minutes of it is now available to watch here too.
Jbuilder: DHH's JSON Production Library
Despite getting married this week, DHH has still been busy coding. Jbuilder gives you a simple DSL for declaring JSON structures that beats massaging giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops.
Wash Out: A Simple Rails 3 SOAP Server Library
Wash Out is a gem that greatly simplifies creation of SOAP service providers within Rails 3 applications.
Methadone - Build Better Ruby-based CLIs with Logging and Cucumber Support
Methadone (gotta love these project names..) is a collection of tools 'to make your command-line apps easily awesome'. It includes a DSL that wraps OptionParser, logging utility classes, and Cucumber steps.
Command Line Reporter: Nicer Formatting for Ruby Script Output
Command Line Reporter offers RSpec-like formatting of the output of your Ruby scripts. Rather than using "puts" statements everywhere, you can lean on CLR's extensible methods and formatters.
Moxy: A Programamble Mock HTTP Proxy
Moxy (or moxy) is a programmable mock proxy. It is an HTTP proxy exposing web hooks that you can use in order to tell it what to do, and when to do it.
faye-websocket: A Standards-Compliant WebSocket Library
Ruby Jobs of the WeekRails Developer at New Relic [Portland, Oregon]
Senior Rails Engineer at RevenueMed [Norcross, Georgia]
Want your job featured? Learn more here.
Last but not least..Ruby Command-Line One-Liners (Working, This Time)
Due to a Tumblr bug, this link didn't work properly in last week's Ruby Weekly so it's in again.. a bumper collection of Ruby one-liners you can use from the command line, mostly to perform various functions on files and other streaming data.
It's a couple of days late but here are the main headlines from the last week of Ruby news. We have a couple of Rails releases, some event news, and the usual gaggle of great articles and jobs.
HeadlinesRails 3.1.3 Released (Very Quickly After 3.1.2)
This release mainly contains fixes for regressions that popped up in 3.1.2, including a downgrade to Sprockets. 3.1.2 itself was primarily a bug and security fix release and cleared up a XSS vulnerability in the translate helper.
Rails 3.0.11 Released (clears up aforementioned security vuln too)
Matz says 'Autoload will be dead' (in Ruby 3.0)
Matz says he should have removed 'autoload' from Ruby when he added threads to the language but he has now deprecated them. Due to Ruby 2.0's backwards compatibility demands, though, they won't be fully gone until Ruby 3.0 but Matz now discourages using autoload.
MountainWest RubyConf 2012 Call For Proposals Open
Want to talk at a popular Ruby conference in 2012? MWRC's call for proposals is now open until January 7, 2012. The conference itself takes place in Salt Lake City, Utah on March 15-16, 2012.
Scottish Ruby Conference 2012 Registration Open
You can now buy tickets for June 2012's Scottish Ruby Conference. It's been very popular in the last couple of years so if you fancy going, check it out soon.
Railsclub: A Russian Rails Conference, Moscow, December 17
Heroku Launches Postgres as a SQL Database-as-a-Service
Articles and TutorialsConfiguration for Rails, the Right Way
Mike Perham notes that he still sees people promoting various gems and plugins to handle configuration elements in Rails apps, but that one little known secret is that Rails 3 allows you to define your own configuration elements trivially.
Rails 3.1 Subdomains and Devise Example App and Tutorial
Daniel Kehoe has been working on some interesting Rails demo apps recently and now he presents a detailed Rails subdomains tutorial showing how to create an example Rails 3.1 application with subdomains and authentication using Devise.
Ruby 1.9 Walkthrough: A Bumper Set of Ruby 1.9 Notes
Martin Carel recently bought and watched my Ruby 1.9 video and has put together a bumper set of notes with the main Ruby 1.9 changes outlined.
Unobtrusive Object Deletion in Rails, The Easy Way
Using RESTful routes, the HTTP DELETE verb is necessary to delete resources. But what if your users aren't running JavaScript and want to delete items? Ryan Townsend shows a way to get everything running smoothly.
Using Amazon's CloudFront CDN with Rails
The Rails 3 Asset Pipeline in (about) 5 Minutes
Michael Erasmus was feeling unsure about how the asset pipeline in Rails 3.1 worked but after digging around for a while, he's put together a simple high level overview.
How to Make Gem Patches with Gem Edit
Installing Ruby, Rails, and MySQL on OS X Lion
My Ruby Show co-host Jason Seifer has written a guide to setting up a basic Ruby development environment on Mac OS X Lion over at Think Vitamin.
Admin Interfaces for Rails Apps: RailsAdmin vs ActiveAdmin
ScreencastsContributing to Open Source (RailsCasts)
In the 300th Railscasts episode, Ryan Bates shows how to submit a pull request to an open source Ruby project on GitHub.
Aaron 'Tenderlove' Patterson's Emoji Test Output Gem
Libraries and codeFaye 0.7: New Event APIs and an Open WebSocket Stack
The latest release of Faye adds a few new event hooks and ships with a stand-alone WebSocket client/server implementation that makes adding WebSockets to any Rack app dead simple.
Ruby Command-Line One-Liners
A large collection of Ruby 'one liners', all set up to run from the command line, to perform various functions, mostly involving processing text files.
Snowday: A Snow Themed RSpec Formatter
rack_mailer: Rack End Point for a Contact Form
rack_mailer is a simple piece of Rack middleware that takes passed parameters and sends an e-mail to a preconfigured address.
Junior Rails Developer at Harvest [New York, New York]
Ruby/Rails developer - Remote at 12 Spokes [Salt Lake City, Utah]
Ruby and Front-End Web Developers at BenchPrep.com [Chicago, Illinois]
Last but not least..Ruby Reloaded: Boost Your Ruby-Fu in December with Peter Cooper
My live, online Ruby Reloaded course has its 4th outing on December 5/6 (next week) and only 7 6 seats remain. Learn more about what it's about by following the link and use the code 'INSIDE' to get $50 off.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
After last week's bumper set of releases the Ruby world seems a lot quieter this week :-) (Even here. I've been hidden away teaching my Ruby Reloaded course!)
HeadlinesRSpec 2.8.0 RC1 Released
The next significant release of RSpec is afoot and its first release candidate is now out. Key improvements come to configuration (and being able to override it from the command line) and running examples in random (and pseudo-random) order.
Ruby 1.9.3-p0 RubyInstaller for Windows Available
RubyInstaller is a popular route to installing Ruby for Windows users, and a new version based on the all-new Ruby 1.9.3-p0 is now out.
Ruby Webapp Performance Management Service New Relic Adds Free Server Monitoring
Articles and TutorialsBesides Being Faster, What Else is New in Bundler 1.1?
Recently, Pat Shaughnessy did a great post explaining why the forthcoming Bundler 1.1 will be faster than 1.0. This time around, he looks at some new features, including bundle outdated, bundle clean, specifying install paths, and creating bundles that will work on machines that don't have Bundler installed.
The Current and Future Ruby Platform
Adam Keys shares his thoughts on the long-term future potential of Ruby as a platform and where it's likely and unlikely to go.
A Self Guided Rails 3.1 Tutorial in an App
An interesting app built by Peter Jones that aims to be a self guided Rails 3.1 tutorial. The README is extensive and explains how to get started. There are also some reader exercises designed to stretch your coding muscles.
Be a Minecraft Modman with Purugin
At RubyConf 2011, Thomas Enebo (of JRuby core team) gave a talk about Purugin, a plugin framework for building Minecraft modifications using Ruby.
RailsCasts on the Mercury Editor
Mercury allows you to edit a section of HTML directly in the browser with a WISYIWYG editor. In this week's Railscasts, Ryan Bates shows how to integrate Mercury into a Rails app.
Likeable: Storing 'Liked' Objects with Redis
Likeable is a new open-source Ruby library built by Gowalla to store 'likes' on items. It works with ActiveRecord objects but can be used with any Ruby object that implements an #id method. If you have Redis ready and waiting, it looks pretty easy to get going.
X11Client: Manage X11 Windows/Events from Ruby (including Mouse Control)
Example Rails 3.1.1 App using Mongoid and OmniAuth 1.0
With OmniAuth 1.0 out just last week, it's great to see Daniel Kehoe has updated his popular Rails 3.1 example app to the latest and greatest. If you want to see how to bring Mongoid and OmniAuth together with Rails 3.1, this is a great place to start.
RBzip2: A Pure Ruby Implementation of the bzip2 (De)Compression Algorithm
Sinatra-Static: Turn a Sinatra App into a Static Site
ZK: A High Level Ruby Interface to Apache ZooKeeper
Ruby Jobs of the WeekRuby Developer [Cambridge, Massachusetts]
Every programmer at Litmus remembers the first time they searched for an answer to their programming problem, only to realize they were the first to try to take it on. These days, it's an almost daily occurrence around here. If that sounds exciting to you, then we'd like to talk to you.
Rails Developer at EquipRent.com [Scottsdale, Arizona]
Rails Developer (or Rails Enthusiast) Wanted at Legitscript [Portland, Oregon]
Last but not least..Gemnasium: Keep Up to Date With New Versions of Gems
Gemnasium is a new commercial service (yep, it costs money) that parses your Ruby projects' gem dependencies and notifies you when new versions are released. There's a 2 week trial if you want to get a feel for how it works.
In math, a unary operation is an operation with a single input. In Ruby, a unary operator is an operator which only takes a single 'argument' in the form of a receiver. For example, the - on -5 or ! on !true.
In contrast, a binary operator, such as in 2 + 3, deals with two arguments. Here, 2 and 3 (which become one receiver and one argument in a method call to +).
Ruby only has a handful of unary operators, and while it's common to redefine binary operators like + or [] to give your objects some added syntactic sugar, unary operators are less commonly redefined. In my experience, many Rubyists aren't aware that unary operators can be redefined, so this article demonstrates how.
Let's ease into things with the - unary operator. The - unary operator is not the same thing as the - binary operator (where a binary operator has two operants). By default, the - unary operator is used as notation for a negative number, as in -25, whereas the - binary operator performs subtraction, as in 50 - 25. While they look similar, these are different concepts, different operators, and resolve to different methods in Ruby.
Using the - unary operator on a string in irb:
ruby-1.9.3-p0 :001 > -"this is a test"
NoMethodError: undefined method `-@' for "this is a test":String
The String class doesn't have unary - defined but irb gives us a clue on where to go. Due to the conflict between the unary and binary versions of -, the unary version has a suffix of @. This helps us come up with a solution:
str = "This is my STRING!"
def str.-@
downcase
end
p str # => "This is my STRING!"
p -str # => "this is my string!"
We've defined the unary - operator by defining its associated -@ method to translate its receiving object to lower case.
Let's try a larger example where we subclass String and add our own versions of several other easily overridden unary operators:
class MagicString < String
def +@
upcase
end
def -@
downcase
end
def !
swapcase
end
def ~
# Do a ROT13 transformation - http://en.wikipedia.org/wiki/ROT13
tr 'A-Za-z', 'N-ZA-Mn-za-m'
end
end
str = MagicString.new("This is my string!")
p +str # => "THIS IS MY STRING!"
p !str # => "tHIS IS MY STRING!"
p (not str) # => "tHIS IS MY STRING!"
p ~str # => "Guvf vf zl fgevat!"
p +~str # => "GUVF VF ZL FGEVAT!"
p !(~str) # => "gUVF VF ZL FGEVAT!"
This time we've not only redefined -/-@, but the + unary operator (using the +@ method), ! and not (using the ! method), and ~.
I'm not going to explain the example in full because it's as simple as I could get it while still being more illustrative than reams of text. Note what operation each unary operator is performing and see how that relates to what is called and what results in the output.
Note: You cannot redefine ! in Ruby 1.8. This code performs as-is in Ruby 1.9 only. If you remove the ! method and examples, the code otherwise works in Ruby 1.8. There's a longer 1.8 and 1.9 example later in this post.
& and * are also unary operators in Ruby, but they're special cases, bordering on 'mysterious syntax magic.' What do they do?
Reg Braithwaite's The unary ampersand in Ruby post gives a great explanation of &, but in short & can turn objects into procs/blocks by calling the to_proc method upon the object. For example:
p ['hello', 'world'].map(&:reverse) # => ["olleh", "dlrow"]
Enumerable#map usually takes a block instead of an argument, but & calls Symbol#to_proc and generates a special proc object for the reverse method. This proc becomes the block for the map and thereby reverses the strings in the array.
You could, therefore, 'override' the & unary operator (not to be confused by the equivalent binary operator!) by defining to_proc on an object, with the only restriction being that you must return a Proc object for things to behave. You'll see an example of this later on.
There's a lot of magic to splatting but in short, * can be considered to be a unary operator that will 'explode' an array or an object that implements to_a and returns an array.
To override the unary * (and not the binary * - as in 20 * 32), then, you can define a to_a method and return an array. The array you return, however, will face further consequences thanks to *'s typical behavior!
We've reached the end of our quick tour through Ruby's unary operators, so I wanted to provide an example that shows how to override (or partially override) them that should stand as its own documentation:
class MagicString < String
def +@
upcase
end
def -@
downcase
end
def ~
# Do a ROT13 transformation - http://en.wikipedia.org/wiki/ROT13
tr 'A-Za-z', 'N-ZA-Mn-za-m'
end
def to_proc
Proc.new { self }
end
def to_a
[self.reverse]
end
if RUBY_VERSION > "1.9.0"
eval %{def !
swapcase
end}
end
end
str = MagicString.new("This is my string!")
p +str # => "THIS IS MY STRING!"
p ~str # => "Guvf vf zl fgevat!"
p +~str # => "GUVF VF ZL FGEVAT!"
p %w{a b}.map &str # => ["This is my string!", "This is my string!"]
p *str # => "!gnirts ym si sihT"
if RUBY_VERSION > "1.9.0"
p !str # => "tHIS IS MY STRING!"
p (not str) # => "tHIS IS MY STRING!"
p !(~str) # => "gUVF VF ZL FGEVAT!"
end
It's almost a cheat sheet of unary operators :-)
A Further Example: The TestRocketTestRocket is a tiny testing library I built for fun a few months ago. It leans heavily on unary operators. For example, you can write tests like this:
+-> { Die.new(2) }
--> { raise }
+-> { 2 + 2 == 4 }
# These two tests will deliberately fail
+-> { raise }
--> { true }
# A 'pending' test
~-> { "this is a pending test" }
# A description
!-> { "use this for descriptive output and to separate your test parts" }
The -> { } sections are just Ruby 1.9 style 'stabby lambdas' but I've (with assistance from Christoph Grabo) added unary methods to them so that you can prefix +, -, ~, or ! to get different behaviors.
Hopefully you can come up with some more useful application for unary methods on your own objects, of course!
The Ruby standard library (a.k.a. stdlib) is a collection of Ruby libraries that, at one time or another, have been considered useful enough to include with the MRI Ruby implementation by standard. Due to the popularity of these libraries, other Ruby implementations have then tended to re-implement or include the standard library too.
As part of the march toward Ruby 2.0, the state of Ruby's 'standard library' has come up for discussion. A popular line of thinking (and IMHO, very likely to actually happen) is that the standard library should be 'gemified' for Ruby 2.0.
Why Gemify the Standard Library?The standard library approach has a significant flaw. Due to being a large and critical piece of software, MRI's release cycle is slow, yet some libraries require faster updates, perhaps for security or API updates. It would be better, therefore, to have the standard libraries maintained and distributed separately while still being included 'by default' with Ruby implementations.
We have already seen this sort of approach with RubyGems itself. For example, RubyGems is (at the time of writing) at version 1.8.11, yet the barely 2 week old Ruby 1.9.3p0 comes with RubyGems 1.8.10. While RubyGems is not itself distributed as a gem, it demonstrates the value of having something included with Ruby and still updateable separately.
Aaron Patterson (of the MRI Ruby Core Team) ExplainsIn his talk at RubyKaigi, Aaron tenderlove Patterson spoke about working out which parts of Ruby are 'third party libraries' and how to extract them. After such extraction, Ruby core should be able to commit to or change anything within MRI, but also reference third party gems that are included and installed by default on new installations. Aaron noted that being able to 'iterate faster' was a significant benefit of this approach.
Aaron also explained that with less coupling between Ruby implementations and the libraries they depend upon, it could be possible in future to upgrade your Ruby interpreter while still maintaining existing versions of the libraries you depend upon. This could help you migrate more gradually or merely help you maintain existing compatibility.
Further ReadingThe process of gemifying the Ruby standard library is explained on the Ruby implementation wiki with the proposal, implementation, and a list of to do items already laid out. A more extensive discussion (which you can join) is also taking place on the official MRI Ruby issue tracker.
This process is still in its early stages and there are likely to be opportunities to help maintain or even become the maintainer for certain standard libraries, if you want to get involved.
The rapid descent of the weather towards winter is getting people to stay in and code and long may it continue given the quality of this week's releases: OmniAuth 1.0, MagLev 1.0, and Ruby 1.9.3, for starters!
HeadlinesRuby 1.9.3-p0 Released
The first production-ready release of Ruby 1.9.3 is finally here with patchlevel 0's release this week. I've already covered what's new on Ruby Inside (see the link below) but this is a nice step forward for MRI and worth checking out, especially if you want faster Rails loading times.
MagLev 1.0.0 Released
It's been a couple of years in the making but MagLev 1.0.0 has released. MagLev is an interesting Ruby implementation and virtual machine built by VMware's GemStone Systems division that orients itself around a novel object persistence layer. The best part? It's open source and MIT licensed. Expect to see more about this soon.
Ruby 1.9.1 is Dying (Support Ends Jan 31, 2012)
In a post to the ruby-core mailing list, Ruby 1.9 release manager Yuki Sonoda explains that Ruby 1.9.1 will get no official security fixes or releases after January 31, 2012.
Ruby 1.9.3: What's New and What's Different
A Guide to HTML5 Boilerplate for Rails Developers
The 'HTML5 Boilerplate' serves as a useful reference for Rails developers who want to provide structure and convention for the HTML, CSS, and Javascript of an app's front-end. But not all of HTML5 Boilerplate is useful for Rails developers, so with this guide, by Daniel Kehoe, you can pick and choose the components that are useful for your Rails apps.
Programming With Nothing: Computation with Nothing but Procs
The striking slidedeck from 'Programming With Nothing', a talk given by Tom Stuart at last week's Ruby Manor unconference. It demonstrates how to implement FizzBuzz solely by creating and calling Proc objects, all thanks to the lambda calculus.
Thinking Functionally in Ruby (a slidedeck)
How Do I Create And Publish My First Ruby Gem?
Advanced Server Definitions in Capistrano
ScreencastsPlaying with PJAX (from RailsCasts)
PJAX allows you to quickly update a section of a page using AJAX with automatic pushState support (for URL changes). In the latest episode of RailsCasts, Ryan Bates demonstrates how to use the pjax_rails and rack-pjax gems.
14 Talks from the ArrrrCamp 2011 Conference
ArrrrCamp was held in Ghent, Belgium a month ago and now videos of the talks are available. Enjoy Corey Haines demonstrating fast Rails tests, Andrew Nesbitt on A/B split testing, Elise Huard on 'data driven development' and more.
The Ruby 1.9 Walkthrough: Go Deep on Ruby 1.9
The most comprehensive and up to date walkthrough of Ruby 1.9 for existing Rubyists. It's a commercial screencast by me, Peter Cooper. Ruby 1.9 guru James Edward Gray II even said he picked up plenty of stuff from it. There's a 5 minute sample available if you want to see how it works.
Pik Screencast: A Ruby Version Manager for Windows
Glenn Goodrich presents a 15 minute screencast taking a look at the Pik Ruby version manager for Microsoft Windows.
OmniAuth 1.0: Authentication APIs Reach A New Level
OmniAuth is a popular library for performing authentication against numerous external authentication systems (like OAuth, OpenID, Facebook, and Twitter). Version 1.0 brings massive structural changes (for the better) and even includes capabilities to do your local/internal authentication with OmniAuth too. This is a big deal.
hash_syntax: Converts Ruby Files to and From Ruby 1.9 Hash Syntax
hash_syntax is an interesting little tool that can go through a Ruby project and convert the source either to or from using the new Ruby 1.9 hash literal syntax. It requires Ruby 1.9 to run.
ratelimit: A Redis-backed Rate Limiter for Rubyists
An Introduction to Logging, A New Flexible Logging Library for Ruby
Appraisal: Test Your Libraries Against Dependencies Far and Wide
Appraisal is a testing tool that integrates with Bundler to test your library against different versions of dependencies in repeatable scenarios called 'appraisals.'
capybara-screenshot: Automatic Screenshot when a Cucumber Capybara Scenario Fails
Gaga: A Git-Backed Key/Value Store in Ruby
Ruby Jobs of the WeekSenior Rails Engineers [San Francisco, California]
Sharethrough is looking for senior application engineers to help build out their reporting and trafficking platform. You will play a significant role in designing and architecting the core pieces underlying the entirety of Sharethrough's platform. They're located in SF's Financial District.
Ruby Software Engineer at Square [San Francisco, California]
Senior Rails Engineer at Scribd (World's #2 Rails Site) [San Francisco, California]
Last but not least..Spree Conference 2012 (Feb 15-16, New York City)
Spree is probably the most popular open source e-commerce solution built on Rails and there's a conference covering both it and Rails generally in NYC next year. There's already an impressive speaker line up, a GitHub sponsored after party, and an evening hackathon.
[ad]Gauges is a real time traffic analytics system so you can analyze all your traffic in seconds. Collect and analyze your web traffic for all your sites in real-time using their fast, reliable, hosted system and see overview data for all your sites on a single page. Click here to learn more.
Recently, there have been many screencasts of people coding things in real time. Yesterday, Ryan Bigg released a video of him implementing Conway's Game of Life from scratch by reading through the 'rules' and then using RSpec to take a test driven approach to fleshing out the functionality.
Ryan is a Ruby Hero and technical writer best known for being co-author of the recently released Rails 3 in Action (along with Yehuda Katz) which I'll be reviewing soon for Ruby Inside. But Ryan's also been getting into doing a little screencasting:
If you can't see the video above, view it directly on Vimeo here.
Ryan's technique is just one of many legitimate approaches but many of you will find something to pick up from this, especially if you're not familiar with test driven development or, perhaps, RSpec. If you're already working on koans non-stop and consider yourself well versed in the ways of TDD, you might want to skip it.
The only downside is that Ryan focuses entirely on the logic without doing a live render of the game board to see his work in action, though this was the right rational choice given the time limit. That would make a good separate project to follow on with, though, if you fancy a little challenge, but be careful to not couple the game logic tightly to any interface you choose to try.
This week brings us a new JRuby release, some Ruby 2.0 news (but you knew that already, right? ;-)) and a new BDD library that seems to have struck a chord with the people I'm following on Twitter. Also, my Ruby Reloaded course is now also over half booked out so if you're curious, definitely check it out now.
Without further ado, here's a round up of the top Ruby news and releases from the last week, courtesy of Ruby Weekly:
Headlines and ReleasesJRuby 1.6.5 Released: Rounding out Ruby 1.9 Support
The primary goal of JRuby's 1.6.x series is to round out the Ruby 1.9 support by fixing any reported incompatibilities. This continues with JRuby 1.6.5 and all JRuby users are encouraged to upgrade. 1.6.5 brings updates to RubyGems, fixes to 1.9 encoding and improved fiber performance.
Prag Prog Book 'Build Awesome Command-Line Applications in Ruby' in Beta
I haven't checked it out yet but the Pragmatic Programmers have announced the first beta release of a book by David Copeland about building well-formed command line applications in Ruby.
@CodeWisdom: Inspirational Programming Quotes via Twitter
I've started a new account on Twitter called @CodeWisdom, that's dedicated to sage programming related wisdom and quotes, as well as links to discussions on best practices and techniques. If you're on Twitter, follow along.
Ruby 2.0 Implementation Work Begins: What is Ruby 2.0 and What's New?
Ruby 2.0 is the next major version release of MRI Ruby, the de facto official Ruby implementation. What's it about and what might it include? Ruby Inside takes a look.
Ruby 2.0 Release Schedule Announced: Roll on February 2013!
Articles and TutorialsConnection Management in ActiveRecord (and How To Improve It)
Aaron 'tenderlove' Patterson talks about database connection management in ActiveRecord, how he's not pleased with it, and how he wants to step towards fixing it to be more like File's API.
Fast Specs!
Continuing the popular and recent string of posts about making your test or spec runs faster, Les Hill brings us more fast speccing goodness (RSpec specific, in this case) and shares a Rails app that implements his techniques.
Rails is Not Your Application
Speaking from the Uncle Bob bible, Nicholas Henry argues that Rails applications are better structured with a 'service layer' to better separate key application functionality from the restrictions of a framework. He presents a good case.
A Modern Guide to Threads (in Ruby)
Mike Perham recently spoke at RubyConf 2011 on some advanced threading-related topics. In this article, he explains, from a Ruby perspective, some gotchas with threads and why he thinks you should simply try and avoid them.
The Rails Style Guide: Rails 3 Advice in a Single README
The Rails Style Guide is a Rails 3-focused style guide presented in a single README file on GitHub. It covers a lot and is rather opinionated technology wise but is an easy read and you should pick up a few tips nonetheless.
A Quick Introduction to Rack
Satish Talim of RubyLearning presents a thorough introduction to Rack, the popular library that abstracts HTTP servers and requests in most common Ruby frameworks and webapp libraries.
Generating Spine Scaffolding with Rails
A super quick introduction to integrating Rails and Spine. Want to build a Rich Internet App in less than 8 minutes? Alex MacCaw shows you how to do it with Rails and the Spine JavaScript library.
Rails 3: Beginner to Builder - An 8 Part Rails Course Shared Online
Rails 3: Beginner to Builder was a course given by Richard Schneeman at the University of Texas over eight weeks and he's now shared the videos, slides, and other materials on his blog.
Spinach: A New BDD Framework (Alternative to Cucumber)
Spinach is a new BDD framework that aims to resolve a number of perceived pain points with the popular Cucumber system. This blog post sums up the differences, pros and cons. Maybe it's the ideal way forward for you too?
Simple Real-time WebSocket Powered Chat App in a Gist
GCC Installer for OS X (Without Xcode)
Gotten sick of needing to install Xcode when setting up RVM or just compiling Ruby on a new Mac? The osx-gcc-installer project can help you skip the pain by just giving you gcc in one hit.
High Voltage! Using Rails 3.1 for Static Sites
Nick Quaranto of Thoughtbot wanted to use Rails 3.1 in deploying a static site to take advantage of Rails' features and asset packaging. In this post, he demonstrates using the 'High Voltage' Rails engine to do just that.
PBKDF2-Ruby: Password Based Key Derivation Function 2 (PBKDF2) for Ruby
Watch Tower: Track How Much Time You Spent at the Directory and File Level
WatchTower helps you track how much time you spend on all of your projects, at the project, directory, and file level. It's built in Ruby and supports TextMate and Xcode on Mac OS X.
Junior and Senior Rails Developers at Wimdu GmbH [Berlin, Germany]
Ruby on Rails Developer (or Enthusiast) Wanted! [Portland, Oregon]
UI Developer (Contract) at Opower [Arlington, Virginia]
Last but not least..Turbocharge Your Ruby Skillset With My Online Ruby Reloaded Course
Are you an intermediate Rubyist looking to boost your Ruby skillset with things like test driven development, OO design, building libraries and learning some of the lesser known nooks and crannies of Ruby? My Ruby Reloaded course runs in November and December and is now just over half sold out. If you want to join, check out this page for more info soon and use the code "SHOW" for $80 off the usual rate.
Today, Yusuke Endoh posted to the ruby-core mailing list noting that matz has admitted him as a Ruby 2.0 "release manager" and as part of his work, he has come up with a tentative schedule for Ruby 2.0's release. You can read the full post here.
I've been admitted as a 2.0 release manager by matz. I'll do my
best. As my first work, I'd like to announce a rough plan for 2.0
release. Anyone who is interested in 2.0, especially who is thinking
about feature proposal, should check it out.
Yusuke Endoh
The short version of the timeline?
A release in February 2013 would have historical significance by being the 20th anniversary of Ruby's creation. Note that Yusuke corrected the date to February 24, 2013 in a later posting.
Another note, confirming what Yugui had already said, is that Ruby 2.0 is to be "100% compatible" with Ruby 1.9.3.
If you want to learn more about Ruby 2.0, I recommend Ruby Inside's last post, Ruby 2.0 Implementation Work Begins: What is Ruby 2.0 and What’s New? where I summarized the anticipated new features in Ruby 2.0.
Thanks to Ruby guru Steve Klabnik for the heads up on this news. Follow him on Twitter, it's worth it.
Yesterday, Matz made a commit to the MRI Ruby repository bumping the trunk version from 1.9.4 to 2.0.0, marking the start of the work of implementing the long-discussed ideas for Ruby 2.0.
Ruby 2.0 is the next major version release of MRI Ruby, the de facto official Ruby implementation.
Ruby 1.9.3 is due out any time soon and Ruby 1.9.4 is under active development (it has moved to a separate branch now that trunk is 2.0.0). We recently learned that Ruby 2.0 would then follow Ruby 1.9.4.
Will Ruby 2.0 be a huge leap forward?No. While 2.0 will include a number of syntax changes, new features and general improvements, mentioned below, it is anticipated to remain backward compatible with code written for 1.9.3 and Matz has stated that the changes are less significant than those made in the 1.8 to 1.9 jump.
The version number goes up to 2.0 but the changes are rather small. Smaller than the ones we made in 1.9.
Matz
The discussion surrounding Ruby 2.0's feature set spans back several years (mostly on the ruby-talk and ruby-core mailing lists) and 2.0 was initially expected to introduce significant syntax changes and not be backwards compatible. Things have changed with Ruby 1.9 moving into production (it was originally a development only version) and 2.0 being an evolution rather than a revolution.
What will (probably) be new in Ruby 2.0?Ruby 2.0 is still not well defined. At the moment, ideas and features are being actively suggested and discussed, but a number have been tipped to make it into Ruby 2.0 at this early stage:
Keyword ArgumentsIn Ruby 2.0: What We Want to Accomplish in the Near Future (recorded in 2010), Matz showed off an example where 1.step(20, 2) could become 1.step(by: 2, to: 20) with the method definition of def step(by: step, to: limit).
An implementation of keyword arguments by Yusuke Endoh actually triggered the discussion to move trunk to 2.0.0 so this is actively being discussed and implemented.
Bytecode export/importRuby 1.9 runs on the YARV virtual machine and so will Ruby 2.0, but Ruby 2.0 is expected to make it simple to save pre-compiled Ruby scripts to bytecode representations and to then run these directly. Running pre-compiled bytecode will skip the parsing stage of the standard interpretation process. If you use Rubinius or JRuby you may be familiar with this concept.
Refinements"Refinements" are a construction to make monkey patching safer. Essentially you could "refine" a global class within the context of a specific module so that the monkey patches would only apply in a certain context. Yehuda Katz wrote an excellent writeup about refinements last year.
Refinements are.. controversial. The performance hit they'd introduce has recently made them less likely to arrive in Ruby 2.0 but I don't believe they're entirely off the table yet. Some form of namespacing of class modifications will probably eventually make it in, however. Another implementation has been called 'traits' and is shown off in the Matz video (linked above).
Standard libraries becoming gemsOn Twitter today, Aaron 'tenderlove' Patterson of the Ruby core team said that the Ruby standard library would be 'moved to gems' in Ruby 2.0 although many of these would still be included with the implementation (rather than being an optional extra download).
And more..As I said before, things are a bit up in the air, but the ideas surrounding Ruby 2.0 should begin to settle over the next year.
A couple of weeks ago, Koichi Sasada posted the results of a Ruby 2.0 feature questionnaire to the ruby-core mailing list and encouraged people to extend it. It's not a list of features that will make it into Ruby 2.0, but an attempt to see what people would like.
Koichi's initial list was:
As Ruby 2.0 development continues, I'm going to regularly summarize what's going on and show off new features here on Ruby Inside, so keep your eyes peeled :-)
[ad]Gauges is a real time traffic analytics system so you can analyze all your traffic in seconds. Collect and analyze your web traffic for all your sites in real-time using their fast, reliable, hosted system and see overview data for all your sites on a single page. Click here to learn more.
In Rubyists Already Use Monadic Patterns, Dave Fayram made a passing reference to using ||= to set a variable's value if its value were 'Nothing' (false or nil in Ruby). The resulting Reddit quickly picked up on his definition (which was fixed later) and argued about ||='s true meaning which isn't as obvious as many Rubyists think. This spread to Freenode's awesome #ruby-lang IRC channel where I picked it up.
A common misconception is that a ||= b is equivalent to a = a || b, but it behaves like a || a = b
In a = a || b, a is set to something by the statement on every run, whereas with a || a = b, a is only set if a is logically false (i.e. if it's nil or false) because || is 'short circuiting'. That is, if the left hand side of the || comparison is true, there's no need to check the right hand side.
a ||= b being equivalent to a = a || b is a popular interpretation for two reasons:
a and b are both local variables, a = a || b is a short and natural reflection of the outcome.+= and -= do operate this way (and this standard dates back to C), e.g.: a += b is equivalent to a = a + bDo not confuse [op]= with anything related to ||= or &&=. They're entirely different ideas and are implemented entirely different[ly].
Evan Phoenix (of Rubinius fame)
What's happening then, if not a = a || b?
Here's a simple example of using a ||= b:
a = nil b = 20 a ||= b a # => 20
In this case, a ||= b seems to behave like a = a || b. As mentioned earlier, this is entirely due to a and b both being local variables.
Let's try something more complicated:
h = {}
def h.[]=(k, v)
puts "Setting hash key #{k} with #{v.inspect}"
super
end
# 1. The standard ||= approach
h[:x] ||= 10
h[:x] ||= 20
# 2. The a = a || b approach
h[:y] = h[:y] || 10
h[:y] = h[:y] || 20
# 3. The a || a = b approach
h[:z] || h[:z] = 10
h[:z] || h[:z] = 20
The output:
Setting hash key x with 10 Setting hash key y with 10 Setting hash key y with 10 Setting hash key z with 10
Note that in the first case, using ||=, the hash key's value is only set once. Once it becomes logically truthful (i.e. anything other than nil or false), h[:x] is no longer assigned any new values, not even itself.
The second case, using the a = a || b approach, does result in two assignments (of the same value). The value remains 10 but the syntax forces h[:y] to assign itself as a value again.
In the last case, the behavior is the same as in the first case, demonstrating that a || a = b is a more realistic notation.
Note: Exactly the same result occurs if we switch the hash for an array and the keys for integers.
Full Demonstration for Getter/Setter MethodsA similar outcome occurs if we're referring to objects with getter/setter methods (which you may call accessors):
class MyClass
attr_reader :val
def val=(val)
puts "Setting val to #{val.inspect}"
@val = val
end
end
# 1. The standard ||= approach
obj = MyClass.new
obj.val ||= 'a'
obj.val ||= 'b'
# 2. The a = a || b approach
obj = MyClass.new
obj.val = obj.val || 'c'
obj.val = obj.val || 'd'
# 3. The a || a = b approach
obj = MyClass.new
obj.val || obj.val = 'e'
obj.val || obj.val = 'f'
And the output shows off similar behavior to the hash and array example:
Setting val to "a" Setting val to "c" Setting val to "c" Setting val to "e"Default Hash Values: A Sneaky Edge Case?
Our travels don't end there though. Back in 2008, David Black noticed an edge case with hashes that have default values. If you follow the logic above to the letter, this case will not surprise you, although from a pragmatic point of view, it's curious.
Let's take a look:
hsh = Hash.new('default')
hsh[:x] # => 'default'
# 1. The standard ||= approach
hsh[:x] ||= 10
p hsh # => {}
# 2. The a = a || b approach
hsh[:y] = hsh[:y] || 10
p hsh # {:y=>"default"}
# 3. The a || a = b approach
hsh[:z] || hsh[:z] = 10
p hsh # {:y=>"default"}
Hashes with default values act in an.. interesting way, depending on your point of view. Merely accessing a value doesn't mean that the value is reified (made concrete) in the hash itself. The reason for this is that you can assign Procs to a hash's default_proc in order to perform calculations (or even to set values) when an unset key is accessed. It would be undesirable to avoid this behavior merely because a key was accessed earlier on.
Again, we note that the a || a = b-style approach gives the result closest to the reality of ||=.
describe "Conditional operator assignment 'obj.meth op= expr'" do
it "is equivalent to 'obj.meth op obj.meth = expr'" do
RubySpec's variables_spec file
Undefined Variables: Another Tricky CaseIn the comments for this post, Vikrant Chaudhary brought up another interesting case:
If a is not defined,
a || a = 42raises NameError, whilea ||= 42returns 42. So, they don't seem to be equivalent expressions.
Vikrant Chaudhary
It's lucky I said "behaves like" earlier - phew! But joking aside, Vikrant makes a good point.
This tricky case is a little like the hash case. Something intriguing about how Ruby operates behind the scenes throws a spanner into the works again. That is, a variable assignment, even if not run, immediately summons that variable into being. For example:
x = 10 if 2 == 5 puts x
Even though the first line won't be run, x will exist on the second line and no exception will be raised. Another nasty one:
x = x puts x
Whoa! Well, a ||= 42 is working in a similar way. Ruby sees the assignment at the parsing stage and creates the variable in a way that it wouldn't with a || a = 42, even though it ends up behaving like the latter once actual execution occurs.
This appears to have been a popular discussion point in Rubyland over the years, so I would be remiss not to include links to some of the best references:
Today I've opened up tickets for the 3rd and 4th runs of my Ruby Reloaded online Ruby course. It's aimed at intermediate developers who want to dig deeper, boost their confidence, and bolster their Ruby skill set. We dig into test driven development (TDD), object oriented design, building a library from scratch, code style, and more. It takes place in November and December.
Check out RubyReloaded.com to learn more about the course, what it involves, and when it runs. There are 24 places on each and about half have gone to waiting list folks so far.
P.S. The coupon code INSIDE will give you a $50 discount to thank you for being a Ruby Inside reader!
Back in 2008 and 2009, Ruby Inside had a long line of "Interesting Ruby Tidbits That Don’t Need Separate Posts" posts, aimed at sharing a collection of news and libraries in one hit. In the last year, I've shifted Ruby Inside to focusing on less frequent tutorials or investigative features and have been putting all of the news on Ruby Weekly, my weekly newsletter.
There are still many, though, who would prefer to read the news in their RSS readers or on the Web, so I'm going to be taking the things I find for Ruby Weekly each week, doing a little reformatting, and sharing them here on Ruby Inside too. The longer articles will then slot in nicely in between :-)
So here we go, starting off from Ruby Weekly issue 63. You can check out the full 63 issue archive, if you like, or even sign up for Ruby Weekly here if you weren't familiar with it. Or, of course, stay here on Ruby Inside and get the same (or more) each week - it's your choice!
Without further ado..
HeadlinesRails Recipes: Rails 3 Edition (in Beta)
Chad Fowler has been updating the Pragmatic Programmers' Rails Recipes book to Rails 3.1 standards. It's in beta now (as an e-book) with the full print release expected in December 2011.
Rails 3.1.1 Released: A Touch Up and Fixes Release
Spree (Open Source Rails E-commerce System) Raises $1.5 Million
Spree is a popular open source Rails e-commerce system and its creator has raised $1.5m in venture capital to take it even further (as well as offer Spree-based consulting). Tom Preston Werner (GitHub) and James Lindenbaum (Heroku) have joined as advisors.
Sinatra Recipes - Handy Recipes for Working with Sinatra
Sinatra Recipes is a community contributed set of recipes and techniques for working with the popular Sinatra webapp library. There are examples of using many different libraries with Sinatra that are bound to prove useful, if only to learn from.
Give It A Pry
Pry is a powerful REPL environment for Ruby and an ideal alternative to IRB. Jon Jackson shows off his top 5 reasons for switching to Pry - maybe they'll convince you too.
Rubyists Already Use Monadic Patterns
Monadic programming is a pattern that comes up in a lot of code, just like most patterns. While associated with pure functional language like Haskell, Dave Fayram demonstrates how many patterns used by Ruby developers are monadic too.
The Ruby 1.9 Walkthrough: Go Deep on Ruby 1.9
The Ruby 1.9 Walkthrough is a thorough, up-to-date video walkthrough of Ruby 1.9 - perfect for 1.8 developers who are unsure about the leap. Even Ruby 1.9 guru James Edward Gray II said he picked up plenty of stuff from it.. but beware, it's long :-)
Gregory Moeck: Why You Don't Get Mock Objects
Not a big fan of mock objects in testing? Don't even know what mocks are? Get up to speed with Gregory Moeck who makes a convincing case for mocks in this RubyConf 2011 replay. In essence, if you're doing object orientation properly, you need mocks (ooh, controversial!)
Your Data, Your Search: ElasticSearch
A wonderful Ruby-focused slide-deck by Karel Minarik (that was presented at EURUKO 2011) all about the concept of 'searching', the flaws in naive solutions, and a tour of the ElasticSearch system and using it from a Rails app.
Complex Ruby Concepts Simplified (Presentation)
At RubyConf 2011, Matt Aimonetti gave a presentation that dug into Ruby's garbage collection, C interface, global interpreter lock, and more, and the slides are definitely easy (and worthwhile) to follow.
The Intro to Rails Screencast I Wish I Had
Over at NetTuts+, Jeffrey Way has put together an interesting 40 minute 'introduction to Rails' screencast that takes the high road and covers topics like TDD, auto testing, RSpec, and Capybara. It's an introduction for people who want to get it right first try.
Tire: A Rich Ruby API for the ElasticSearch Search Engine/Database System
Tire is a Ruby client for ElasticSearch, written by Karel Minarik. ElasticSearch is a scalable, distributed, cloud-ready, highly-available, full-text search engine and database with powerfull aggregation features, communicating by JSON over RESTful HTTP, based on Lucene, written in Java.
Queue Classic: A Powerful PostgreSQL-Backed Queueing Library
Queue Classic is a PostgreSQL-backed queueing library built by Ryan Smith of Heroku that focuses on concurrent job locking, minimizing database load and providing a simple, intuitive user experience.
Sr (Agile) Software Engineer at Apple [Cupertino, CA]
Apple is seeking the very best engineers to be part of a continuously tested and integrated development process in its Developer Publications team. The systems they build are used for all Apple developer documentation for Mac OS X and iOS. You need deep knowledge of Ruby including Rails, RSpec, Bundler and Devise.
Ruby on Rails Developer at ENP Network [North Palm Beach, Florida]
Ohloh Sr. Software Engineer at Black Duck Software [Waltham, Massachusetts]
Last but not least..The Ruby Toolbox Gets A Makeover
The Ruby Toolbox is a popular site that categorizes and rates gems by their popularity and functionality. If you're looking for a gem and you can't quite figure out which ones are out there, it's worth a look. A recent redesign has really kicked things up a notch.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.