Learn Professional Ethics
- As a CS Professional, you are morally obliged to do a good job. What this
means is that you are supposed to do your job not for your manager but for
yourself. This is already told in Bhagwatgeeta : Doing duties of your life.
- The direct implication of this is: never ever write a bad code. You don’t
need to be fastest and run after shipping dates; rather you need to write
quality code. Never write junk code. Rewrite it till it is good. Thoroughly
test every piece of code that you write. Donot write codes which are “sort
of allright”. You might not achieve perfection, but atleast your code
should be of good quality.
- Let me quote my own example in this context. You might have heard
about STL, The Standard Template Library that ships in with C++
compilers. I wrote it 10 years ago, in 1994. While implementing one of the
routines in the STL, namely the “search routine”, I was a bit lazy and
instead of writing a good linear order implementation of KMP which was
difficult to code, I wrote a best quadratic implementation. I knew that I
could make the search faster by writing a linear-order implementation, but
I was lazy and I did not do that. And, after 10 years of my writing STL,
exactly the same implementation is still used inside STL and STL ships
with an inefficient quadratic implementation of search routine even
today!! You might ask me: why can’t you rewrite that? Well...I cannot,
because that code is no more my property!! Further, nobody today will be
interested in a standalone efficient STL ...people would prefer one which
automatically ships out with the compiler itself.
- Moral is, you should have aesthetic beauty built inside you. You should
“feel” uneasy on writing bad code and should be eager to rewrite the code
till it becomes upto the quality. And to the judge the quality, you need to
develop sense regarding which algorithms to use under what
circumstances.
RockLine Search Engine
Custom Search