Revisiting is the key.

Thats the difference between good stuff and great ones. The second look. Revisiting your work.

Its the time when I started my career.. and a certain gentleman named Asokan, who was helping us getting started with Programming said:

“Your programs are supposed to function. They need to provide the right output. But, your work as a programmer doesn’t stop with that.”

There’s always a tendency to stop improving things once they’ve started to work. I’ve experienced this on many occasions where we released software as soon as it just started working. Then there is this over-celebrated QA team, that does some quality check and boom.. the customer has it in his hands. And it breaks (well, not always.. practically only 99% of the times) . We find ourselves spending pretty much the same time as we took to write the code, fixing it. Well.. we don’t learn. We follow the same cycle as above. It just has to work. isn’t it?

Well.. the truth is that stuff breaks. In software, it sure breaks like hell. So the wise decision is to be ready for it. Now, its not that we do it on purpose. Sometimes we’re not well informed, not experienced enough, are bounded by self-imposed time constraints. Most of the times.. we just don’t care.

So what can we do?

Give the code a second look.. (once its started working). Its not a crime to write ugly code to get stuff working. Its advised not to get into the habit of clean stuff.. and forget the actual solution. So get it working first. Then pause. Stop for a while. Its working now. Lets improve it a bit.

Clean stuff up.

Proper names. Rethink names of methods and variables.

Write tests if you’ve not written them yet.

Refactor.. Refactor.. Refactor.

Release it.

I know there is an urge to release stuff as soon as they’re ready.  The stuff above doesn’t take that long anyway. And saves lot of time and money later. Try following this cycle.

Next time you estimate a work, dedicate a little time for revisiting your code too..

Hope it helps.

4 thoughts on “Revisiting is the key.

  1. Pingback: myninjaplease
  2. Even after so many programs, I still fail at this. I’m a mathematician, and write code to solve some problem, or test a hypothesis. I may write some code to perform the task, clean it a little and (maybe) comment parts of it. Then I start adding features, or testing new cases of my hypothesis until the program is completely different… I turn to another thing and next time I need the latest version, it makes absolutely no sense.

    But every time I take the time to clean up, document (with comments, in any case it is code for me, usually) and clean function calls I feel like I’m wasting my time… Then some day I have to use that piece of code again and it is absolutely painless. Everything is clear and I only need to start coding, not reading code.

    My 2c in favour of revisiting.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s