Programmers Should Give Up More Often
Tháng Hai 21, 2009
You know that feeling? The one where you are in the zone. Every keystroke is intentional and the sound of them in succession sounds almost like music. Your chair feels comfy and your desk is clean, or at least mostly clean. The code you are producing could be framed and put on a wall and even your mom would admire its beauty. You’ve had that feeling right?
Contrast what I just presented, with that other feeling. You know it. I know you know it. You have a slight buzz in the front of your brain. Typos begin to abound and you are starting to think your fingers went drinking without you. You shift to and fro but your chair continues to feel like a block of wood. Your code is so convoluted that you sometimes don’t understand what you just wrote 30 minutes ago. In fact, the thing that should “just work” isn’t working and hasn’t been for the past 45 minutes.
What To Do?
So what are you to do? Push through you say! Mush, mush! I know in an hour I’ll once again feel fresh and write code that sounds like a harp from the Heavens. I’ve already spent 45 minutes, what’s another 15. Besides, I’m so close. FAIL! I have news for you Walter Cronkite, you won’t. Your code will begin to feel more and more like the spaghetti [insert previous language here] you use to write. You’ll get more uncomfortable, and most likely the buzz in your head will last for hours after you stop, quite possibly ruining the rest of your night.
Great Programming Requires Inspiration
I believe the ability to give up and to know when to give up is what sets great programmers apart from good, average and poor ones. Programming is art. Art is created through inspiration. Anyone can push through and churn out crappy code. The question is, are you self-aware to the point that you know when it’s time to stop?
Do Something Else
Next time you feel the buzz creeping into the front of your skull and your undies start riding up, stop! As the wait staff at Logan’s Roadhouse says, “Stop what you’re doin and swallow what you’re chewin.” Pet your cat. Read a few chapters from a book. Complete the next mission on Grand Theft Auto. Don’t push through. Do something other than programming that inspires you and I guarantee the inspiration for what you were working on will return.
What I Do
So what do I do when I hit the wall? I’ve never been much of a reader but lately I’ve turned to books. I’m not a fan of fiction, but I have discovered an ardent interest in business, especially now that I’m a business owner. Books like Good to Great, The Fred Factor, 4 Hour Work Week and Blink are inspiring me to think differently and write better code.