Today at CodeMash I had the opportunity to sit on Joe O'Brien's What makes Rails possible, an introduction to the Ruby language session. Let me just say... despite all of the hype, I'm really starting to get excited about the power (and other cool stuff) that dynamic languages like Ruby have to offer.
Joe did a really great job of giving us noobs a quick intro to not only the Ruby language, but also to why dynamic languages are so powerful, and how useful they can be. Naturally some of the attendees started to raise questions about Ruby's lack of static type checking at compile time.
The concerns seemed to center around the idea that "compile time Type checking helps to ensure that your developers aren't doing anything to hurt themselves". Meaning that compile time Type checking helps protect a developer by letting them know immediately if they had done something wrong... because the code doesn't compile.
Predictably, the counter argument for dynamic languages is that having the code compile still doesn't mean that the code does the right thing. This is what unit tests, integration tests, etc... are for. That should sound very familiar to those of use who subscribe to the TDD methodology... Joe then made a rather surprising statement that went something like
I'm not going to lie to you... Ruby is like a loaded weapon. In the hands of the wrong person, it could be very dangerous, but in the hands of someone who knows what they're doing, it is a powerful and precise tool.
I was immediately reminded of a point that Jeremy Miller raised in his Programming Manifesto. (It's a pretty long read, but well worth it!) He makes the argument that you should use sharp tools, rather than coding with the kid gloves on. I think that an even better analogy (which Jeremy alludes to a little bit) is that of a sharp knife.
A sharp knife can no doubt be dangerous in the hands of the wrong person. But in the hands of a trained and skillful chef, it becomes an efficient and indispensable tool. And don't forget, a novice cook can still cut themselves with a dull knife. Yikes!
The point is, we need to start worrying more about hiring smart people (who hopefully won't do dumb thing... too often) and less about how to protect Mort from hurting himself. We've spent far too much time indulging Mort.
Which is a nice segway into another, related, topic... walking that fine line between powerful tools and protecting developers from themselves. I'm going to have to agree with Jeremy again on this one... it all starts with the hiring process.
However, I realize that we don't live in utopia and as I mentioned on Jeremy's blog, sometimes we don't have the luxury of hiring the Rock Star developers that we all want.
So I believe that we also need to start helping Mort by teaching and mentoring him. Rather than just throw some tool at him, throw him a copy of Code Complete, The Pragmatic Programmer, Head First Design Patterns... or one of your favorites. Do it, give Mort hand. I bet you'll feel better about yourself and it might even remind you of another programmer you used to know... some guy you no longer work with.
Ha! You thought I was you going to "you".... didn't ya? OK, you're right - but I didn't want to be that cheesy.
Technorati Tags: CodeMash | Ruby