Scary Complicated or Richly Awesome?

When you look at a new piece of data, most of our initial reaction is in relation to the complexity of that data. Usually this scares me, but after you get to know the data, the more the merrier! What was scary becomes rich and awesome. How do we move from scary complicated to richly awesome? Comprehension, comprehension, comprehension. And what is the best way to grok something like that? Dive deep into the guts of the code or the task and find out why the data is there and what it does. Why was it modeled that way? In what way could it have been modeled different? Do I have the power to change it? Is it a good thing to change it? Do I understand the system fully enough to see the richness of the data and of the model itself? ...

September 27, 2011 · 1 min · Mark Simoneau

Feedback Loops and Estimation -or- What Rubik's Cubes Taught Me About Making Software

Estimation is hard. It may not be listed as one of the top two problems in computer science, but it’s at least a close third. Over the years I’ve gotten to try all sorts of methodologies for estimating. Waterfall, Agile, Points, Stories, Requirements, Features, Epics, Pomodoros, Billable hours… you can go on forever with the Jargon of Management, trying to get information from a developer about how much longer The Client has to wait until The Feature is finished. ...

April 4, 2011 · 3 min · Mark Simoneau

Migrating Serialized Columns in Rails

I recently switched a serialized column in Rails from one type (Hash) to another (OpenStruct) and ran into a little problem when I tried to migrate, namely, that loading the model threw a SerializationTypeMismatch error. Hmm… how am I going to get at the base YAML and translate all of these without being brittle? The answer is to copy the column, nullify it, and the load the raw YAML manually: ...

March 3, 2011 · 1 min · Mark Simoneau

How to Stay At Inbox Zero

I saw a link recently on how to get to the ever elusive “Inbox Zero” and it seemed kinda lame–label everything “oldinbox” and archive everything in Gmail. Maybe that’s the only way to do it when you have 10K+ e-mails in your inbox, but it seems like the best way is to never get there to begin with. Personally, I haven’t had more than 50 e-mail in my inbox at any given time in over 2 years. I ruthlessly archive and delete items and as soon as I’ve processed something into an action for “Things” I get it out of my inbox. For e-mails I just need to look at, reference or respond to, I use the stars feature, but I have only 8 starred items right now. I think at some point I had nearly 20… that’s about the max. ...

January 4, 2011 · 2 min · Mark Simoneau

The Importance Of Speed in Automation

We are impatient people. This is something that we must work to fix in order to grow as individuals, but it is something that serves the automator well–or can be our downfall. Joel Splosky wrote on the “Joel Test” that having anything less than the best tools money can buy is rediculous for a development team. The reasoning is this: If you’re paying developers what they are worth, then they are expensive, and wasting their time while they’re reading the Onion waiting for a build will kill your productivity–and your bottom line. ...

December 3, 2010 · 2 min · Mark Simoneau

Stop Googling // RailsTips by John Nunemaker

Yesterday, one of my inter-web buddies IM’d me and asked if I had used Typhoeus before. I said yes, so he asked me if it was possible to follow redirects using it. He said he google’d it and nothing turned up. I sharply responded, “LOOK AT THE CODE!”. We had some banter back and forth and a few minutes later he was automatically following redirects. It seems these days that developers often think if something does not turn up in a google search, it does not exist. ...

October 14, 2010 · 1 min · Mark Simoneau

Things and Pomodoro

For the last two years, I’ve been a loose GTD-er, using Cultured Code’s “Things” to dump my brain and keep track of tasks to do. I never got into the “project” side of GTD–planning out every project and asking why… I’m sure it has value, but that was never the problem I was trying to solve with GTD. I just wanted to keep up with all the stuff everyone wanted me to do and I was tired of having things so easily slip through the cracks. ...

August 31, 2010 · 3 min · Mark Simoneau

A Ruby Scoping Gotcha?

Let’s take this basic class: class TestClass attr_accessor :one def my_method(branch=true) if branch puts "Do nothing to modify `one`" else puts "Modify `one` but it's a local variable" one = "test" end one # local variable end def my_non_modifying_method(branch=true) if branch puts "Do nothing to modify `one`" else puts "Do nothing to modify `one` either" end one #method call end end o = TestClass.new o.one = "Value" puts o.my_method => nil #might expect 'Value' if you're not paying attention puts o.my_non_modifying_method #expects "Value" => "Value" puts o.my_method(false) => "test" puts o.my_non_modifying_method(false) #expects "Value" => "Value" So remember, if you create any local variables anywhere in your method, even if they’re not called, they override the accessor methods and will give you results you’re not expecting. To get around it, make sure you always use self.accessor= to assign values when there is ambiguity.

August 27, 2010 · 1 min · Mark Simoneau

Optional Heirarchal Checkbox Selection with Nested Attributes in Rails

I had a process where I wanted users to fill out a survey which had hierarchal categories AND be able to specify some additional data for specific capabilities that the user had. Now, you could easily do this for a small subset and hand-code every item, but I wanted a flexible survey system that allowed true hierarchy and generalized code. Let’s start off with the basic survey and capabilities models and relationships: ...

June 4, 2010 · 4 min · Mark Simoneau

How and Why to Stop Multitasking - Peter Bregman - Harvard Business Review

A study showed that people distracted by incoming email and phone calls saw a 10-point fall in their IQs. What's the impact of a 10-point drop? The same as losing a night of sleep. More than twice the effect of smoking marijuana.Doing several things at once is a trick we play on ourselves, thinking we're getting more done. In reality, our productivity goes down by as much as 40%. We don't actually multitask. We switch-task, rapidly shifting from one thing to another, interrupting ourselves unproductively, and losing time in the process. ...

May 27, 2010 · 1 min · Mark Simoneau