Nov 082011
 November 8, 2011  Posted by at 9:45 pm Uncategorized  Add comments

I just read Clean Code by Robert C. Martin (Uncle Bob). For one and a half hour my eyes were literarily glued to my computer as I visually inhaled every single word this man had written (yes, I am a pretty fast reader- I inhale,- not read). I scribbled three pages, and used a red pen as everything seemed so important. I totally overused the exclamation mark. If I had written on my computer the never-used caps lock would have had a field day and let me scream out everything Uncle Bob had to say. Why? It has now been about 10 weeks since I started studying programming. The pace has been extremely high with few moments to breathe, and even less time to think. And I’ve loved every single moment of it (The way I see it pressure does make diamonds, when the pressure and the material is right!). From day one our teacher, and I guess his name is not a secret anymore, Mikael Freidlitz (I might as well throw in some well-deserved free advertisement- he totally rocks) has preached the importance of a clean code that follows the highly regarded principles such as OCP and SRP ++. I have to admit, that from the very start I wanted to make poetry when writing code, and keep it as simple and pretty as a Haiku poem. But somewhere, sometime, something changed.

The mistake (by an embarrassed programmer called Iris)

Like a madman blinded by eagerness
The programmer rushes
Basics forgotten

It probably was somewhere between the examination project and the WPF course that the race was on to produce as much code as possible, and sadly elegancy and cleanliness was forgotten- and I am also mortified to admit,- it was knowingly ignored. I hope that being a teenage-programmer such vulgar mistakes and mischievous acts can be forgiven (not talking about my real age here, but my maturity level in programming). The AHA moment came today, I mean the really big AHAAAA moment. I was scrolling through my very lengthy XAML, and scanning different source files trying to locate something. The quantity of code and writing hit me like a fist in the stomach, and I felt seriously ill. ‘Damn,’- I thought. ‘It sure works, but it looks like shit’. I couldn’t face staring at the thing again, so I closed the app. ‘What to do now?’ I thought. So I ran home (kind of), and just did a very fast and furious reading. I am totally blown away. As an added bonus we started learning about MVVM (Model View ViewModel) today, so two big revelations just replaced that fist in the stomach with eager little butterflies. I can’t wait to wake up and clean my code. And keep it clean. As a matter of fact, I have never felt this inspired about housekeeping – it’s a shame it is limited to programming he he 😀 . Programmers, new, or old. Don’t forget the basics, the fundamentals. And if you have a bad feeling about your code, then you are probably right. Don’t ignore it, because it won’t go away. I can’t believe I am this excited about programming. Seriously, I am not going to be able to sleep tonight 😀 Man is this awesome or what?!

  One Response to “Clean code, It’s easy to forget….- Haiku poetry for the poet programmer.”

  1. […] When I read the clean coder a few months in, I understood why he has said so. Here are all the notes I made while reading the Clean Code. I actually read the whole book in two hours or so, loving it so much I couldn’t put it down. Meeting Robert C. Martin and talking geek with him was def. one of the high points for me when I got to go to NDC earlier this year […]

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



What is 10 + 8 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)