Past Articles
This is the way the world ends / Not with a bang but a whimper. T. S. Eliot

BIBERACH, GERMANYLate last week, Christian Neukirchens influential tumbleblog Anarchaia breathed its last.
Anarchaia took the well established blog form and turned it into a multimedia stream of consciousness featuring photographs, poetry, lyrics, and links. Topics ranged from the merely curious to the highly technical. It managed to maintain the same visual theme throughout its lifespan which included a half-dozen posts almost daily.
The term tumblelog was coined in mid-2005 by Why the Lucky Stiff on his RedHanded blog.
Anarchaia also inspired the popular projectionist tumblelog, which launched a few months later. Entire startups were subsequently built around the form.
It is survived by the other Christian Neukirchen projects Rack, test/spec/bacon and his own blog. There are rumors that it has already reincarnated as Trivium.
PeepCode Screencasts Learn Ruby on Rails and Javascript! Hour-long screencasts for $9.
Ive had to rely at times on silence and on talking quick / Defending myself with nothing but my walking stick. Buck65
Here are nine easy tips that will help you communicate better at your next conference.

Dan Grigsbys presentation at RubyFringe was an intentional example of this. All the titles were at the top, with humorous stock photos below.
Keep it in the top third, if possible.

Giles Bowkett is such an entertaining speaker that people once skipped the first 20 minutes of lunch to hear the remainder of his presentation at RubyFringe (which involved more than 400 slides).
He also used only the typefaces included with Mac OS X, including Futura Condensed Medium and Condensed ExtraBold, which work really well in bright colors on black. So even if you dont choose to buy a single typeface, you can assemble a great-looking presentation.
- Giles Bowkett Videos Start 5 minutes in to see the slides.

Its easy with either:
Copy as RTF A TextMate plugin. You can paste the syntax-highlighted text and even edit it afterward in Keynote.
pygments A command-line syntax highlighter written in Python. Its used at GitHub to emit HTML but can also emit RTF from any source file. The resulting rich text can be pasted into Keynote.
pygmentize -f rtf -o out.rtf code.rb
Choosing just the right transition can soak up a lot of time and adds absolutely nothing to the content that people remember afterward.
Dan Grigsby also noted that transitions and multi-step builds make it difficult to go back and forth in the presentation since you have to wait for the transition to finish. Unless

Useful Keynote shortcuts (while the presentation is playing).
<table><tr><td>Key</td><td>Description</td></tr><tr><td>/</td><td>Show a list of keyboard shortcuts.</td></tr><tr><td>H</td><td>Pause the presentation and go to the last used application (useful for demos). Command-tab back to Keynote to resume the presentation.</td></tr><tr><td>= or -</td><td>Show a thumbnail menu that can be used to jump forward or backward to a specific slide. Use the arrow keys to select and the enter key to jump.</td></tr><tr><td>B</td><td>Pause and show a black screen.</td></tr></table>
I love live coding but often it goes awry, creating an awkward situation for both the presenter and the audience.
Give yourself some insurance and either record a short screencast that you can narrate during the presentation, or take screenshots that you can refer to.
Extra Credit!

If youre speaking at a conference, youre probably doing it to promote yourself, your projects, or your business. Make it stick in peoples minds by distinguishing yourself with a color scheme and a typeface that communicate the attitude you want to be remembered for.
Choose a color scheme and use it for all your presentations. Ideally, it would be the color scheme of your company or personal blog. If youve paid for a corporate identity, use it!
Resources
- Color Burn Widget A Mac OS X dashboard widget with a new color scheme every day.
- ColourLovers.com Tons of color combinations for every attitude.

Again, buy a typeface and use it on your blog and in your presentations.
Theyre not as expensive as you might think! You can get a single font for $20.
Here are some nice condensed ones as mentioned above:
Or try these shops:

I saved my favorite for the end
A presentation remote gives you the freedom to step away from the lectern and talk directly to the audience. The remote that comes with Mac laptops doesnt count! It only works if you have a direct line of sight to the infrared receiver on the front edge of the laptop.
A radio frequency transmitter works much better. The Kensington Presentation Remote can be bought for about $40. It works out of the box without the need to install any drivers, and its less distracting than phone-based options.
See you in Berlin!
Ill be in Berlin at RailsConf starting this Sunday. Find me and get a free PeepCode t-shirt!
PeepCode Screencasts Learn Ruby on Rails and Javascript! Hour-long screencasts for $9.

For the third year in a row, its the Seattle.RBBQ at Geoffs house in Seattle!
- Tuesday, August 26, 7-9 pm.
- Ill provide pizza. Bring any other beverages or food that you want to eat.
- Directions and Bus Numbers
PeepCode Screencasts Learn Ruby on Rails and Javascript! Hour-long screencasts for $9.
UPDATE Thanks for the 40 replies right away! Weve hired an individual for the position.
Dublin

I had a great time in Dublin at the end of June. I spoke at an open source conference and met several other Rubyists while I was there.
Ive frequently felt that I should bring home some tchotchke from each of the places I visit. While in Dublin I realized that its not extra things that I really want, its people!
If youre traveling for business or pleasure, I highly suggest that you find the local Ruby group or find a local co-working space and meet people there. I had breakfast with Ana Nelson, who introduced me to Paul Campbell of Contrast, who is working on an error reporting webapp for Rails developers.
He introduced me to Eamon Leonard and David Coallier who happen to be a few musically inclined PHP developers. We had a great time exploring the pubs of Dublin, and I learned that Guinness beer has a different taste in Dublin than anywhere else in the world.
Oh, and a few members of Ruby Ireland hosted a nice dinner in the city.
So the next time you find yourself in an unknown city, meet the locals!



Elsewhere
I just published a new PeepCode screencast about Phusion Passenger (technical editing by Phusion staff).
Ill be speaking about podcasting and entrepreneurship at BizJam Seattle on Wednesday, July 9.
Jim Freeze wanted me to mention that the Lone Star Ruby Conference is open for registration. Ill be at RailsConf in Berlin at that time, but Im sure it will be a great conference if you can get yourself to Texas. I frequently post other worldwide conference and workshop events at Ruby on Rails Workshops.
Also, Ive helped to launch a Deck-like ad network for Ruby blogs. We have several top quality publishers and have a few spots for advertisers. If you have a product, website, or service that would be of interest to Rubyists, check out Ruby Row.
PeepCode Screencasts Learn Ruby on Rails and Javascript! Hour-long screencasts for $9.
I truly feel that I have the coolest job in the world.
Two weeks ago, I was asked to speak at the IOTC Conference in Dublin on June 18-20. Not only that, but they will be streaming live video of the event as it happens!

Few conferences record even the audio of their lectures, so Im not sure how they managed to pull this off. They must be using some of this new open source software that everyone is talking about!
They tell me that youll be able to view it via a link that will be posted here, next Thursday at 10:25am Dublin time.
Ill also be hanging out with members of Ruby Ireland in Dublin on Thursday night.
Then Ill be hurrying back home to be with my son, who aspires to be the next mini me.
At PeepCode
The ever diligent Ryan Daigle has updated our Rails 2 PDF for Rails 2.1. If you purchased the first copy, you can login or revisit the link originally sent to you for the free update.
If not, now is a great time to buy a copy!
And then
Also, I just bought by plane ticket for RubyFringe where Ill attempt to resolve my degree in Philosophy with my current career in computer programming. There are definitely some interesting talks scheduled!
PeepCode Screencasts Learn Ruby on Rails and Javascript! Hour-long screencasts for $9.
Yesterday was Thanksgiving holiday for US-based developers but it certainly hasnt looked like a holiday week in edge Rails. Things are moving fast, with some major changes afoot for version 2.3 of Rails.
Rack integration
The underpinnings of script/server have been simplified and rewritten somewhat. The explicit list of supported servers that used to be in script/server is gone. Instead, Rails now depends on the installation of Rack, and script/server goes through this which means that Rails supports any server that Rack does.
Efficient routes
Routing sees a couple of big changes this week. The formatted_ route helpers are gone, in favor just passing in :format as an option. This cuts down the route generation process by 50% for any resource and can save a substantial amount of memory (up to 100MB on large applications, according to the Lighthouse ticket ) If your code uses the formatted_ helpers, it will still work for the time being but that behavior is deprecated and your application will be more efficient if you rewrite those routes using the new standard. Another big change is that Rails now supports multiple routing files, not just routes.rb. You can use RouteSet#add_configuration_file to bring in more routes at any time without clearing the currently-loaded routes. commit commit
Better support for engine plugins
The second routing change enables better support for Rails Engines: routing files in engines are automatically loaded and reloaded now (as are those in other plugins). Engines are getting some love other than routing. If your plugin has an app folder, then app/[models|controllers|helpers] will automatically be added to the Rails load path. Theres active discussion of just how this should work, and how much to pick up from the current engines plugins, so its likely we havent seen the last commits in this area. Engines also support adding view paths now. commit commit commit commit
Sensible backtraces for your tests
If youre a fan of the Thoughtbot Quiet Backtrace plugin, which allows you to selectively remove lines from Test::Unit backtraces, youll be happy to find ActiveSupport::BacktraceCleaner and Rails::BacktraceCleaner in core. This supports both filters (to perform regex-based substitutions on backtrace lines) and silencers (to remove backtrace lines entirely). Rails automatically adds silencers to get rid of the most common noise in a new application, and builds a config/backtrace_silencers.rb file to hold your own additions. commit
Ruby 1.9 integration
A variety of commits continue the drive towards Ruby 1.9 and minitest compatibility. This should ensure that Rails 2.3 is ready to handle the latest Ruby underpinnings when its released. Those on the bleeding edge at the moment need to beware, though: one of the changes in edge Rails depends on a ruby-core patch that hasnt yet been applied there. Youll also (temporarily) need to pick up Jeremy Kempers fork of Mocha for MiniTest compatability as required by this commit .
Faster boot time in development mode with lazy loading/autoload
Jeremy Kemper and Josh Peek have been doing a ton of work on making sure that bits of Rails (and its dependencies) are only brought into memory when theyre actually needed. Check out the commits from November 23 for a bunch of lazy-loading changes. The core frameworks Active Support, Active Record, Action Controller, Action Mailer and Action View are now using autoload to lazy-load their individual classes. This work should help keep the memory footprint down and improve overall Rails performance. commit commit commit commit commit
Misc
You can specify using the new preload_frameworks option whether the core libraries should be autoloaded at startup. This defaults to false so that Rails autoloads itself piece-by-piece, but there are some circumstances where you still need to bring in everything at once Passenger and JRuby both want to see all of Rails loaded together. commit
Asset hosts get more flexible in edge Rails with the ability to declare an asset host as a specific object that responds to a call. DHH has supplied a sample project, asset-hosting-with-minimum-ssl , that demonstrates one good use for this functionality. commit
You can now configure the location of the helpers folder for a Rails application by setting ActionController::Base.helpers_dir. This will be a boon in some unusual circumstances the original use case is for building a Rails application that encourages extension via plugin rather than by altering the application itself. commit
Token generation for CSRF protection has been simplified; now Rails uses a simple random string generated by ActiveSupport::SecureRandom rather than mucking around with session IDs. As a result, the :digest and :secret options to protect_from_forgery are deprecated and have no effect on edge. commit
While were on the subject of secrets, some people will find novel uses for ActiveSupport::MessageEncryptor, which provides a simple way to encrypt information for storage in an untrusted location (like cookies). commit
Active Supports from_xml no longer depends on XmlSimple. Instead, Rails now includes its own XmlMini implementation, with just the functionality that it requires. This lets Rails dispense with the bundled copy of XmlSimple that its been carting around. commit commit
As you probably recall, last weeks improvements included the renaming of application.rb to application_controller.rb. This week theres a new rake task, rake rails:update:application_controller to do this automatically for you and it will be run as part of the normal rake rails:update process. commit
Good news if youre using ActiveSupport::OrderedHash: it now implements each_key and each_value. commit
One more bit of core Rails is open to I18n: the units used by number_to_human_size. If youre maintaining a translation file, you need to add the storage_units: [Bytes, KB, MB, GB, TB] to your translations. commit
Support for Rails components which were famously called a shining example of what happens when eagerness overtakes prudence in Agile Web Development With Rails is finally gone. If a couple of years of warning about this deprecation wasnt enough for you, then its time to find an alternate solution at last. commit
Various files in /public that deal with CGI and FCGI dispatching are no longer generated in every Rails application by default (you can still get them if you need them by adding --with-dispatches when you run the rails command, or add them later with rake rails:generate_dispatchers). commit commit
Just a reminder: Im not providing pointers to every single commit here, just trying to highlight things. This weeks edge changes actually included 136 commits from a wide variety of contributors.
The old 15-minute blog video was getting really long in the tooth, so its with great pleasure that I can present the new video made with Rails 2.2 and done by Ryan Bates. It really takes it all up a notch by showing the creation of a blog with comments, ajax, feed, api, admin interface, and more.
Ryan Bates is also the author of the wonderful Railscasts.com site that features video explanations on Rails features. Its a fantastic resource and now properly recognized on the screencasting page.
Ive also linked up the commercial Rails screencasters. The amount of material available for people interested in learning by video is simply staggering.
Rails 2.2 is finally done after we cleared the last issues from the release candidate program. This release contains an long list of fixes, improvements, and additions thatll make everything Rails smoother and better, but we also have a number of star player features to parade this time.
Internationalization by default
The most important is that Rails now includes a full-on internationalization framework and that its pre-wired from start. The work of the i18n group has been very impressive and its great to see that Rails finally ships with a solution in the box thats both simple and extensible. Great job, guys!
Stronger etag and last-modified support
Weve also added much better support for HTTP validators in the form of etag and last-modified. Making it so much easier to skip expensive procesesing if the client already has the latest stuff. This also makes it even easier to use Rails with gateway proxies.
Thread safety and a connection pool
Josh Peek has added thread safety to Rails and Nick Sieger from JRuby worked on getting Active Record a proper connection pool. So now all elements of Rails are thread safe, which is a big boon for the JRuby guys in particular. For C Ruby, we still need a bunch of dependent libraries to go non-blocking before itll make much of a difference, but work on that is forth coming.
Ruby 1.9 and JRuby compatibility
Jeremy Kemper has been rocking on both Ruby 1.9 and JRuby compatibility. Rails 2.2 is fully compatible with both, but again, there might be supporting libraries and gems that are not. Again, lots of work is going into making everything else fully compatible as well.
Better API docs, great guides
Finally, the last big push has been with the documentation of Rails. Pratiks docrails project has made immense progress. Not only are the API docs much improved, but we also have a whole new guides section generated from documentation that now lives with the source. A true community project with lots of contributors. Im sure both those new and old to Rails will greatly appreciate the strong focus on documentation.
To read about all these features and more in details, checkout the Rails 2.2 release notesanother one of those guides from the docrails project.
How to install
As always, you can install Rails 2.2 through RubyGems. We now require RubyGems 1.3.1, so be sure to update that first: gem update --system
Then you can install Rails: gem install rails
If youre updating an existing application, you can run rake rails:update to get the latest JavaScript files and scripts.
From all of us to all of you, we hope you enjoy this release. Its a true pleasure to see Rails make such big steps forward once again. Dig in, have fun, and well be back with Rails 2.3 with even more before you know it.
First up this week, a warning for those who dont closely follow the state of the Rails repository edge really means edge now. The bits for 2.2 are getting locked down for release, and the repository has been forked; for the moment, edge Rails is being identified as 2.3 , though that projected version number might change later. If youre trying to install almost-released 2.2 bits on your machine, make sure youre using the 2-2-stable branch, and not edge, which is currently seeing some major changes.
The 2-2-stable code is still seeing changes, but theyre either bug fixes or very small things. This week, that includes fixing a bug in assignment to has_one :through associations , some further tuning of CSRF protection , a fix to handling of checkboxes for Boolean attributes , updating the bundled copies of TZInfo, Prototype, and script.aculo.us, and some Ruby 1.9 compatibility work (though currently full Ruby 1.9 compatibility is targeted for Rails 2.3).
The biggest feature change in the 2.2 branch is the addition of explicit I18n support to newly-generated Rails projects, including a sample locale file, auto-loading all locales in config/locales, and sample settings in config/environment.rb. commit
Also worth noting in 2.2 is a chunk of code removal: a whole mess of special case tests for the SQL Server adapter have been chopped out of the Active Record test cases. Thats because Ken Collins has done tremendous work in making the SQL Server adapter work the way that Rails expects data adapters to work, giving us a big step in the area of backend portability. commit
On the actual edge code (the master branch in the repository), theres a lot more action. With that branch just opened, some pent-up code has been checked in, and some big changes are being made. Its an exciting time, and edge is definitely worth checking out. Here are some of the most notable changes in the past week.
One big set of changes has come from Jeremy Kemper, who has been overhauling the internal Rails testing to switch from Test::Unit::TestCase to ActiveSupport::TestCase. This work also includes requiring Mocha to test Rails (in the 2.2 code, some tests are skipped if you dont have Mocha installed) and generally making the Rails testing strategy (both within core and for generated applications) more consistent moving forward.
If youre one of the people who has always been bothered by the special-case naming of application.rb, rejoice! Its been reworked to be application_controller.rb in the edge code. More info here and here . commit
Rails 2.3 will introduce the notion of default scopes : similar to named scopes, but applying to all named scopes or find methods within the class. For example, you can write default_scope :order => 'name ASC' and any time you retrieve records from that class theyll come out sorted by name (unless you override the option, of course). commit
A lot of folks have adopted the notion of using try() to attempt operations on objects Heres Chris Wanstraths blog post introducing it. Its especially helpful in views where you can avoid nil-checking by writing code like <%= @person.try(:name) %>. Well, now its baked right into Rails. commit
Also new on the syntactic sugar front is Enumerable#none? to check that none of the elements match the supplied block. commit
The render method has been getting smarter over the years, and its going to be even smarter in 2.3. If you have an object or a collection and the naming matches up, you can now just do <% render @article %> or <% render @articles %> and things will just work. Ryan Daigle has some more examples on this. commit
On a somewhat similar note, render_component goes from deprecated to nonexistent in 2.3. If you still need it, you can install the plugin . commit
The autolink helper has been refactored to make it a bit less messy and more intuitive. commit commit
Theres a fix to a memory leak connected to thread safety and asset tags, that could bite sites that were referencing a lot of external images. Aaron Batalion contributed the fix, as well as a blog post explaining the issue. commit and commit
Finally, its worth mentioning that some controversy has erupted over a change made to the 2.2 code five months ago the addition of Array#second through Array#tenth as aliases for Array#[1] through Array#[9]. Without taking a stand on the controversy (Ive done that elsewhere), Ill just note that the most recent edge checkin as I write this trims this down to only support Array#second through Array#fifth and uses the savings in overhead to implement Array#forty-two. commit
There is a bug in all 2.1.x versions of Ruby on Rails which affects the effectiveness of the CSRF protection given by protect_from_forgery.
By design rails does not perform token verification on requests with certain content types not typically generated by browsers. Unfortunately this list also included text/plain which can be generated by browsers.
Impact
Requests can be crafted which will circumvent the CSRF protection entirely. Rails does not parse the parameters provided with these requests, but that may not be enough to protect your application.
Affected Versions
- All releases in the 2.1 series
- All 2.2 Pre Releases
Fixes
The upcoming 2.1.3 and 2.2.2 releases will contain a fix for this issue.
Interim Workarounds
Users of 2.1.x releases are advised to insert the following code into a file in config/initializers/
Mime::Type.unverifiable_types.delete(:text)
Users of Edge Rails after 2.2.1, should upgrade to the latest code in 2-2-stable.
The patch for the 2.1.x series is available on github. This will also apply cleanly to 2.2 pre-releases prior to this changeset released on Thursday November 13th at 11:19:53 2008 CET. Users with edge-rails checkouts after that date, are advised to upgrade to the latest code in 2-2-stable.
Thanks to Steve from Coderrr for reporting this issue.
Created as a time capsule for future netizens, this gigantic list of reactions, analysis, and opinion surrounding the 2008 US Presidential election is amazing.
I wanted to create something to look at a couple years from now to remember the election and hopefully present a good representation of what both sides of America were feeling on that day as evidenced by the response in the press and on the blogs. I didn't capture everything, though I've certainly tried
Included are lots of videos, links to articles, reactions from the author's friends, and even Facebook status messages as the election results rolled in, covering a nice cross-section of citizens from top politicians to the big media, to blogs, to normal people celebrating on the streets. However, I have a feeling that due to linkrot, much of this may not even be available online.
Ben Tesch proposes the following personality test:
What I find most interesting is which movie people consider the best movie from a particular director, as it is usually very telling and polarizing in a different way, so to this point I will propose a new personality test where you reblog your favorite movie from each of these directors:
1. Joel Coen: No Country for Old Men, The Big Lebowski, Fargo, The Hudsucker Proxy, Miller's Crossing, Raising Arizona, etc
2. Wes Anderson: The Darjeeling Limited, The Life Aquatic with Steve Zissou, The Royal Tennenbaums, Rushmore, Bottle Rocket, etc
3. Hal Ashby: Being There, Shampoo, Harold and Maude, etc
4. Kevin Smith: Zack and Miri Make a Porno, Dogma, Chasing Amy, Mallrats, Clerks, etc
5. Quentin Tarantino: Grindhouse, Kill Bill, Pulp Fiction, Reservoir Dogs, etc
I would also personally throw in:
6. Stanley Kubrick: 2001, The Shining, A Clockwork Orange, Full Metal Jacket, Dr. Strangelove, Lolita, etc.
7. P.T. Anderson: Boogie Nights, Hard Eight, There Will Be Blood, Punch-Drunk Love, Magnolia.
8. Errol Morris: The Thin Blue Line, The Fog of War, Mr. Death, Fast, Cheap and Out of Control, Gates of Heaven, etc.
I'm a FRHMPDBF (Fargo, Rushmore, Harold and Maude, Mallrats, Pulp Fiction, Dr. Strangelove, Boogie Nights, and The Fog of War). Notes: I've only seen one Hal Ashby movie. I very easily could have gone with The Thin Blue Line, Magnolia, and perhaps even Kill Bill. I would choose anything else on the list over any of Kevin Smith's movies. Most of my picks I'd seen for the first time around the same time period, approx. 1995-1998. And what a sausage fest...I'll add Coppola's Lost in Translation to the mix. (via sandwich, who intriguingly chose Darjeeling over Rushmore, Tenenbaums, Zissou, and Bottle Rocket. I wonder what personality defect that indicates?)
Before his health deteriorated in the months before he died, David Foster Wallace was working on a larger work of fiction presumed by some to be a new novel, his first since the 1996 publication of Infinite Jest. Word comes from Chaffey College that "An Untitled Chunk" of that larger work will be published in the school's literary review magazine.
Before his death, Wallace agreed to donate a portion of a larger work ("An Untitled Chunk") along with first publishing rights, to the students of Chaffey College, allowing us to print it in the first edition of our literary magazine. The magazine is being published this January and is the only available printing of this piece. Our contract with Wallace's family and agent dictates that we cannot publish any portion of the piece online, nor in any other publication, so this is truly a unique opportunity.
The Chaffey Review web site does not contain any ordering information...I hope they'll anticipate the demand for this issue with a larger print run and online sales.
When I profiled the Metropolitan Life Tower (and an unusual postscript) a couple of months ago, I mentioned that Daniel Libeskind was working on an addition to the building that would dwarf the iconic clock tower. New York magazine has a rendering of what the building might look like, taken from the architect's new book.
Initial designs show a glass-curtained tube with cutaways spiraling up and around the facade to reveal segments of terraced verdure, like cultivated patches on the side of a steep alpine slope. "We didn't just fill up the tower," the architect says. "We've taken space away [from the apartments] to create the gardens," which are actually balconies tucked within the envelope. "It's as if nature has come back into the city," he says.
Video of a man carrying 20 bricks on his head. And that's not even the most amazing part...he just kinda throws the bricks up there while staying balanced. I don't know, this looks fake to me...my extensive block stacking experience over the past few months indicates that this sort of thing is impossible. (via cyn-c)
What's Hot on Github is a monthly post highlighting interesting projects that are new or updated this month, within the Ruby community that are hosted on Github. Github has become an extremely popular place for Ruby and Rails developers to congregate lately, so I wanted to list some of the new projects, and some of the updated ones, that I have found interesting and that are too small for their own blog post.
This month's picks:
- http://github.com/karmi/marley/ - Marley is minimal blog engine without
At RubyConf 2008, other than giving his own Scaling Ruby talk, Gregg Pollack of EnvyCasts was hard at work getting summaries of all of the presentations from the speakers. In RubyConf 2008 in 90 Seconds you get a fast-fire summary of the summaries. In RubyConf in 31 Minutes you get a more complete record - good viewing for anyone who didn't attend the conference as it gives you a good idea of what's on the Ruby community's mind.
One of the coolest features of RubyConf
If you've ever investigated how to build your own compiler, you might be familiar with LLVM (Low Level Virtual Machine), a "compiler infrastructure" that makes it easy(ish) to create virtual machines, code generators, and optimizers of your own. It also has its own intermediate representation language that's architecture independent and the instruction sets and typing system available are similarly language independent. In theory, if you want to build your own programming language and a compiler for it, LLVM will get you most
Ruby's most popular Web application framework, Ruby on Rails, takes another giant step today with the release of Rails 2.2! It follows on just five months after Rails 2.1, but offers even more significant improvements, particularly in the areas of compatibility, internationalization, and documentation. Read David Heinemeier Hansson's release post for a quick overview.
Ruby Inside's sister site, Rails Inside, was launched alongside Rails 2.1 in June, and would, you'd think, be the ideal place for a post like this, but no. Rails
HappyMapper is John Nunemaker's attempt at "making XML fun again" for Rubyists by providing an object to XML mapping library with a succinct syntax. Essentially, you can use HappyMapper to rapidly turn XML into Ruby objects - even nesting them inside and referring to each other. This is powerful stuff. To install, just gem install happymapper
John's own examples are powerful demonstrations of how it works, so check them out. The first is parsing the XML returned from Twitter. The statues and associated

Productivity. You know you want it, but how do you get there?
Weve collaborated with accomplished entrepreneur, developer, and life coach Lars Pind to bring you a practical plan customized for programmers.
Programming is hard work that requires creativity, problem solving, and even physical stamina. Over the course of 40 minutes, Lars will teach you how to
- Set achievable, measurable goals
- Prepare for the work of thinking
- Achieve focus
- Find shortcuts
- Maximize your natural rhythm and energy
Weve personally benefited from the ideas presented here and were confident that you will, too.
Now with 25% more pixels than the competition! Uses a full 1000600 of screen real estate for easier viewing. Decorated with top quality video footage and beautiful nature photography. Includes a 17 page typed transcript.
Why $19?
We think the content weve prepared is top quality and will help you become much more productive. However, weve left a loopholeyou can get this for even less by purchasing it with one credit from a 5 or 10 pack, or as a PeepCode Unlimited subscriber.





Technical editing by Joshua Sierles, sysadmin at 37signals.
Content by Geoffrey Grosenbach in collaboration with Casimir Saternos.
Part of our job at PeepCode is to research new and upcoming technologies that alpha geeks are talking about. XMPP/Jabber instant messaging has been getting more buzz recently. What is it? What does it do? How can you use it to enhance your applications?
XMPP is an open, real-time instant messaging platform that is useful for sending and receiving notifications between servers and humans. You can use it to receive administrative notifications from your website or to push notifications to subscribers much more efficiently than current poll-based solutions such as RSS.
After viewing this 48 minute screencast, youll be able to work with XMPP from Ruby, including:
- Connect to a Jabber server
- Send presence notifications and update the user icon
- Receive message notifications and friend requests
- Use DRb (distributed Ruby) together with Jabber to send messages from a Rails application
Available to all PeepCode Unlimited subscribers, or at a discount during the month of Peepvember!
Now with 25% more pixels than the competition! Uses a full 1000600 of screen real estate with smoother, high frame rate animations.




MySQL (or Postgres) does a fine job when querying specific rows, but its not so great when it comes to searching on large text fields. Sphinx is a search service that makes full text searching quite easy and throws in extra features like boolean search (rails OR merb), word proximity, and custom filtering.
Pat Allan is the author of the popular Thinking Sphinx plugin for Rails (and Merb apps that use ActiveRecord!). He also wrote the Riddle gem for lower level interaction with Sphinx. Pat starts out by introducing the basic features of Sphinx, then dives straight into installation on popular platforms.
In this 60-page PDF youll learn to build an address book with Thinking Sphinx starting with simple searches then progressing onto filtered, sorted, and delta-based searches. Youll learn about the geo-searching features of Sphinx, including integration with Google Maps.
He closes out the book with a 20-page reference that youll want to keep close as you use the more advanced features of Sphinx.
If you use MySQL or Postgres databases with text fields, this book will teach all youll need to know to work confidently with Sphinx.
Included for all PeepCode Unlimited subscribers or available as a single purchase for only US$9!
Chapters
- Understanding Sphinx
- Installation
- Building an Address Book with Sphinx
- Reference
- Additional Resources



By Jarkko Laine, workshop teacher and author of the Apress book Beginning Ruby on Rails E-Commerce
Modern web developers have learned to organize their server-side code into model, view, and controller.
Your front-end development can also benefit from organization into content and behavior, which is much easier to accomplish than you might think. Dare I say that it makes front-end web programming as easy as Visual Basics object and event hooks?
Jarkko Laine steps through the features of Dan Webbs Low Pro library to help you attach functionality to HTML elements and events. Youll see how Prototype.js can drive a full-featured application and give you organizational tools to keep your Javascript code maintainable.
Chapters include:
- Towards Accessible Javascript
- Brief History or Javascript on Rails
- Introducing Low Pro
- Refactoring an Existing Rails Application
- Going DRY With Multiple Elements
- Bubbling Performance with Event Delegation
- More on Behavior Classes
Refactoring your front end code will make it easier to work with, easier to extend, and easier to use. Get the scoop with this PeepCode PDF book.
Available to all PeepCode Unlimited subscribers or as a single purchase for only US$9.




Technical editing by CouchDB committers Jan Lehnardt and Chris Anderson
Imagine a world where there is no SQL. Your database doesnt have a schema. You dont have to worry about indexes. Replication is built-in. Scaling is part of the plan from day one.
This is the world promised to you by CouchDB, an Apache Foundation incubator project in the genre of Amazons SimpleDB (but open source!). This 60 minute screencast clearly explains the forward-thinking features of CouchDB and shows you how to use CouchDB with Rails.
This screencast is the product of months of research, a trip across the world to Berlin, hours of coding on the CouchRest gem, and technical editing by a pair of CouchDB committers.
Youll learn how to install CouchDB from source, how to use the CouchRest gem, and youll build a personal notes application that uses CouchDB. Youll learn about different ways to serialize Ruby objects to JSON. Youll write custom views in Javascript and synchronize them to your database. Oh, and youll also learn a bit about the daring personal history behind the CouchDB project!
Whether youre planning to use CouchDB on an upcoming Ruby project or just want to be informed about current developments in database technology, youll find it in this screencast.
The code used in the screencast is included. A typed transcript is also included with the code download. Video is in our new extra-wide 1000600 format!
Available to PeepCode Unlimited Subscribers or alone for only US$9.




Nov 26 2008
Subscribers
Click to see all subscribers
Subscriptions
-
Molto Benni moltobenni -
Just Surfin News steve -
Just Surfin News steve -
Greek News Greek Traveler -
The Lost Generation Donna Hyatt
Click to see all subscriptions
So far the only gotchas were, I was using the MySQL plugin and not the gem. I’ve since configured my Site5 account to use gems so that’s not a problem and I had a few outdated conventions that I fixed. I’m hoping that I got everything, I mean, after all, my tests passed so everything should be fine! If you guys come across anything out of the ordinary, any error, anything I’d love it if you’d please let me know
Also, I’ve got 6 pounce invites if anyone still is looking for those. :)
I caught up with this thread on Joel’s discussion board today. We software developers will take any opportunity to rant about the bass-ackwards code we have to deal with on a regular basis. For passionate developers, it’s understandable that most code wouldn’t live up to our standardsonly a select few projects have the amount of resources necessary to truly pursue perfection. Over time the exposure to imperfect code can condition us with unfair knee-jerk reaction to new code.
How bad is the code really?
The world is full of terrible code. Usually that becomes painfully obvious at maintenance time. When an existing project is opened up for the first time by a new team member, I think the instinct is to see the flaws before the brilliance. What kinds of things make code stinky? Well it depends who you ask, but some possible reasons are:
- Unnecessary duplication of code (under-abstracted)
- Overly complicated code (over-abstracted or unnecessarily clever)
- Too many files/classes
- Giant monolithic classes
- Wrong design patterns applied
- Stupid algorithms
- Failure to use appropriate libraries or framework features (reinventing the wheel)
- Inconsistency (lack of conventions)
- Numerous obvious comments
- No documentation
Anyone whose done their share of code maintenance has probably been annoyed by most of the things on this list one time or another. “If only they had done it this way.” It’s easy to just assume the code sucks based on a first impression. Once you jump to that conclusion, every minor flaw affirms your prejudice.
Pet peeves
Let’s step back a minute and give ourselves an ego check. To an experienced developer there are hundreds of nuances that will stick out like a sore thumb, but they are likely to annoy you far more than they actually impact your productivity were you to consider them objectively.
If you’re not careful, your concern for the code boils over into judgement of the previous programmers. Maybe the last guy wasn’t up to snuff in this language, maybe his pet peeves were different, maybe he was just a blathering idiot. Whatever the case, why dwell on it?
I’ve managed to make it through a lot of bad code without slowing down much. Every once and a while a refactoring or straight-up delete and rewrite was necessary, but most of the time I was able to grit my teeth and get some changes done relatively quickly.
Real reasons code “sucks”
The problem facing you is likely to be different from what the last programmer faced. It would be foolish to assume that the software was designed with the same requirements that you have in front of you today. Who’s to say the business goals haven’t changed drastically since then?
You and the last developer have different information. Even after you’ve spent a lot of time on the code and understand all the intricacies and business goals, you still may not know the history of the project. Maybe the code has grown and shrunk and morphed into something completely different from when it started. If it’s time to refactor, maybe that’s your job.
It’s also quite possible that refactoring is not worth it. Good developers innately want maintainable and aesthetically pleasing code, but there is a cost. We can’t write perfect software before we understand it, and we can’t refactor without spending time. The developer is usually in a better position than the manager to assess the long-term cost of not refactoring, but he also has a vested interested in exaggerating that cost. To make a fair assessment, the developer must have a direct business interest. Even then there’s a great deal of uncertainty. It’s always a gamble.
Cognitive dissonance
Developers are conditioned to be right. Our job requires a fiercely logical thought process and the ability to make absolute assertions. Being wrong means things are broken, sometimes spectacularly so. And because we think so hard about things in this way, our conclusions are usually well-reasoned. But we are still human, and we still have the same defense mechanisms around our belief systems as everybody else. The insidious thing is that our reasoning blinds us to our own subjectivity. Our open-mindedness is a badge of pride, but also a set of subconscious blinders.
The only really objective thing about software is its output.
Software engineering is about making choices. Some choices are pragmatic (C++ for performance), some are philosophical (Ruby vs Python), but most are an intangible mixture of past experience and future expectations. When you see some code for the first time, the chances that it will mesh with your experience and philosophy are pretty slim. Eventually you may come to appreciate it for what it is, but in the meantime every tradeoff that didn’t follow your current line of thought will irk you.
Software is messy
None of this is to say that there aren’t real quality problems in the software industryof course there are. But I think it’s worth carefully considering our own motivations and biases before judging how bad the problem really is.
We may not like dealing with inadequately-funded balls of mud, but that’s probably where most of the paying work is. Even in relatively clean code bases, reasonable people can disagree on style or architecture points. Regardless of initial code quality, there will always be difficult and inelegant maintenance that needs to be done. My goal is to keep emotion out of it, and just fix problems. Refactoring is great if a business case can be made, otherwise just slog through as fast as possible without complaining.
Easier said than done, I know.
While RubyConf fans are waiting on the videos trickle in Confreaks, hold yourself over with the 31 minute summary video from Rails Envy. It's a perfect way to get an overview of what you missed at the conference.
Scotland on Rails is pleased to announce that Conference2009 will be held March 26-28 in Edinburgh, Scotland.
We are now accepting submissions. The closing date for submissions is December 1st 2008, so theres still time! Please mail your plaintext proposals for 45 minute sessions to submissions@scotlandonrails.com.
Alternatively, if you are interested in sponsoring the conference, please mail sponsorship@scotlandonrails.com for a prospectus.
Lastly, if you wish to be notified when we open for registration, you can sign up on the site.
Come and enjoy all that Edinburgh has to offer (whisky! castle! volcano! ruby! whisky!) in March. We hope to see you there.
MountainWest RubyConf 2009 will be held March 13-14, 2009, in Salt Lake City, Utah, USA.
Proposals to speak at this regional conference are now being accepted. Please send your proposal to proposals@mtnwestrubyconf.org.
The submission deadline is midnight (MST) on December 31st, 2008.
There are sponsorship opportunities available as well. Please contact sponsorship@mtnwestruby.org if you are interested.
Please see mtnwestrubyconf.org/ for more details as they become available.
Yugui (Yuki Sonoda) announced the release of Ruby 1.9.1-preview 1:
This is a preview release of Ruby 1.9.1, which will be the first stable version of the Ruby 1.9 series. Try it out now and get an early taste of a modern, faster, multilingualized, and much improved Ruby with clearer syntax.If you encounter any bugs or problems, please let us know via the official issue tracking system:
You can download the release from;
- ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.tar.bz2
SIZE: 6169022 bytes MD5: 0d51dc949bb6b438ad4ebfabbb5f6754 SHA256: dc39000537d7c7528ef26af8e1c3a6215b30b6c579c615eaec7013513410456a
- ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.tar.gz
SIZE: 7409682 bytes MD5: 738f701532452fd5d36f5c155f3ba692 SHA256: 99443bdae9f94ba7b08de187881f8cbee172379edf9c5fa85fc04c869150ff6d
- ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-preview1.zip
SIZE: 8569116 bytes MD5: 5f68246246c4cd29d8a3b6b34b29b6ac SHA256: a6c3a7bf7ea83b595024764926353e08596a78e40c57ac58c568662e5e88df95
RubyConf 2008 is sold out
However, there is a waiting list you can join in case of cancellations.







