Articles

Organized Logs with LogCabin

While optimizing our Rails apps, I used the standard Rails Logger to output performance information about specific trouble-spots of code. Having to constantly grep through the production log, however, was driving me nuts. What I really wanted to do was to write information about a specific problem area to a specific file, without adding a lot of extra code.

Rails Studio in January

Mike just reminded me that the Early Bird discount is soon to expire for our January Rails Studio in Denver. If you’ve been thinking about attending a Rails Studio and work for a big company, here’s a tip I learned the hard way: corporations usually budget for training and then when it’s time to “save some dollars” in later quarters, they cut the training budget first.

Automatically handle unexpected Ajax errors in Rails

I’m busy working on a project that uses a lot of Ajax to deal with updates and lookups etc. Occasionally I write rubbish code and one of these methods break.

When using normal HTML this is not a problem because Rails presents the user with a nice message saying “We’re sorry but something went wrong…”.
But, with Ajax, Rails returns the exact same page which is useless in an Ajax call. Because of this, users are generally left without knowing if their request is taking a long time or has failed.

Virtual Manufacturing Control - VmWare To the Factory Floor

In the industry, VmWare has taken over the Data Center. Server Consolidation has been going on for a while. Multiple servers
that used to run on dedicated hardware, are now Virtual Machines, multiple setting on one rack or blade server. Its not uncommon to see 10's to 100's of virtual server running on one physical server. This has resulted in great cost saving, easy upgrades, easier provisioning, and a reduction of power consumption. This technology is proven, and works.

Lol

I took this test for fun. Despite being pretty easy, the silly part is that many of the answers are wrong, so I found myself guessing at what the person who wrote the test must have been thinking. Even basic things like how find_all won’t work anymore aren’t considered, etc.

Additionally, most of the questions could be responded to with ‘it depends.’ Like, well, if you have a named scope then that would work, or well the code you’re showing me would give an error, but that’s not an option, so I guess I just guess at what you mean.

Hear us talk about Rails, .NET, and more on the Alt.net Podcast

Photo credit

A little while back, Brian and I were glad to be asked to appear along with James Avery on the ALT.NET Podcast.

We mostly focus on issues that are of interest to those who are straddling that line between day-job .NET and night-time Rails, but we also touch on other topics as well.

Fun With Machine Learning

Inspired by this post on recommendation systems and this one on classification I’ve been playing around with some of the large datasets on my different projects.

gsl with ruby on leopard

Download gsl

cd gsl*.gz; ./configure; make; sudo make install

Download rb-gsl

cd rb-gsl*; cd ext; mvim Makefile

Change these lines to look like this (source):

Contest: Free iPhone Oxford Dictionary

I’m not big on publicizing commercial works due to the obvious bias involved, but we’ve recently finished up the Oxford American College Dictionary and Thesaurus for the iPhone and our client was nice enough to give us a few free download codes. Never one to waste free stuff I thought I’d offer them up to my readers.

What's New in Edge Rails: Dynamic Scope Methods


This feature is scheduled for: Rails v2.3/3.0

For quite some time now you’ve been able to perform simple queries using dynamic find_all_by_xx_and_yy methods:

Ruby 1.9.2 Released | Rails Fire

Ruby 1.9.2 Released

Send to friend

Yuki (Yugui) Sonoda has just announced the release of the stable version of Ruby 1.9.2!
Ruby 1.9.2 has been released. This is the newest release of Ruby 1.9 series. Ruby 1.9.2 is mostly compatible with 1.9.1, except the following changes:

  • Many new methods
  • New socket API (IPv6 support)
  • New encodings
  • Random class that supports various random number generators
  • Time is reimplemented. There is no longer the year 2038 problem.
  • some regexp enhancements
  • $: no longer includes the current directory.
  • dl is reimplemented on top of libffi.
  • new psych library that wraps libyaml. You can use the library instead of syck.

Yuki Sonoda
Ruby 1.9.2 passes 99% of RubySpec and, if you haven't already given it a go, offers worthwhile performance increases over Ruby 1.9.1 and significant performance improvements over the 1.8.x series.
Intriguingly, Ruby 1.9.2 is only considered to have full, verified support on Debian Linux on 32 bit Intel architectures, with support for OS X 10.5 and 10.6, FreeBSD, Windows, and Solaris considered "best effort." Linux distributions other than Debian are listed in the lower "perhaps" category for support, so running your own tests is more essential than ever before moving to 1.9.2 in production.
Installing
As always, the source can be picked up from the official sources at ruby-lang.org:
http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2
http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.zip
Or, you can use RVM, which has already been updated to support the release:
rvm update --head && rvm reload && rvm install 1.9.2 && rvm 1.9.2 --default