How to Program Smarter Without Staying Up Until 4:00am

I just read an interesting article at BusinessInsider.com entitled Why Programmers Work at Night.

The article explains why programmers generally tend to prefer working in the wee hours of the morning.

Programming requires keeping a lot stuffed in your brain at once, and thinking about all of it all at once. This task can often be a tad difficult under normal work/life circumstances.

In short:

This is why programmers are so annoyed when you distract them.

Because of this huge mental investment, we simply can’t start working until we can expect a couple of hours without being distracted. It’s just not worth constructing the whole model in your head and then having it torn down half an hour later.

In fact, talking to a lot of founders you’ll find out they feel like they simply can’t get any work done during the day. The constant barrage of interruptions, important stuff to tend to and emails to answer simply don’t allow it. So they get most of their “work work” done during the night when everyone else is sleeping.

If you have ever programmed anything, you understand the above 3 paragraphs perfectly.

Still, there is a better way…

(more…)

Ruby 1.9.3-p362: “Stack level too deep” Error Message is a bug?

Ruby 1.9.3-p362 Broken?Oopsy!

On 25 December 2012, Ruby version 1.9.3-p362 was released. Is that dedication, or what?

Yesterday, I decided to upgrade to this new version of Ruby that contains only bug fixes.

Bad idea.

Sure, the site loads… But if you try to create a new record via the front-end UI, it craps out with an Internal Server Error.

Digging a bit deeper, it seems this new Ruby version causes a “stack level too deep” error in /active_record/transactions.rb – at least when using Rails 2.3.x.

So, how do we fix this little problem?

(more…)