Code is art. Art is subjective. Different programmers have different styles. If somebody uses a lot of templated C++ and STL, I will not say his code is bad. I will say I don’t like his style. To tell whether a code is “good” or “bad”, I need a metric. Something I can quantify. Something objective. So, to me, a “better” code is one that uses less memory, or less CPU time. It’s that simple.
More and more I see software engineers who forget a simple rule: we are not working to please ourselves. We are working to please the customers. Customers do not see the source code. They do not care whether it uses STL or not, is ANSI compliant or not, is “beautiful” or “ugly”, is portable or not, uses tabs or spaces, uses Hungarian notation or french comments. They do not see the source code. They don’t care.
They care about concrete things. It must be fun. It must be smooth. It must fly. It must load as quickly as possible.
Everything else is irrelevant. We are not here to please ourselves. We are not here to create over-engineered architectures that never pass the test of time anyway. Professional programmers do not code to please their egos. Do that at home, in your personal projects. Or start a blog.
February 14th, 2008 at 7:35 am
Then you would love my code - it is practically unreadable (just ask my co-workers). Now I know that is a good thing and stop worrying about it!
March 3rd, 2008 at 10:12 pm
I really like your code style since flipcode age.
A real game coder should don’t spend too much time on new programming tech.
I’m now replace STL’s with your hashtable. small, simple, platform independence and most improtant - under my control.I found freedom.
April 20th, 2008 at 11:49 pm
All else being equal, customers do care about ship dates and reliability. It’s important not to forget that either.
April 21st, 2008 at 12:18 am
Clients don’t see source code indeed.
On the other hand coworkers do. Discussing daily on what is nice code is a lost of time. But that mustn’t be an excuse for writing 300s lines of code in a single function. IMHO, that’s a professional error. When a coworker will have to work with that code, there’s 90% chances he’ll insert new bugs in it.