(Yeah I know, it’s been awhile since I last posted, hey when you have writer’s block…)
People have always asked “What is the standard for good code. When do I know that I’m a good programmer for what I’ve done?” I’d argue that hey if your employer is still paying you, you must be doing something right
Though more seriously, I’ve started evaluating code produced around me on a four point scale with points awarded for each bullet below:
- Did your code complete when you say it would? Did you follow Greg’s rules of the deadline in the creation of this code? Score one point if yes, else no.
- Is your code functional? By that I mean:
- Does it perform its principal function without breaking?
- Are all common uses tested and performing properly? No major functionality impeding issues?
- Are all obvious security issues handled?These combined score one more point if you’ve earned it.
- Is your code acceptable to its audience? If the complaints are down to a dull roar, score a point.
- Can another programmer of reasonable talent in your programming language and technique step in and modify your code with a minimum of ramp up? If so, score yourself a point.
So if you’ve built a program that scores 4 points in this system, I consider you and your program truly awesome and rock-star material. Three points is good, two points is marginal and zero-one point is generally unacceptable.
Some noteworthy things I do not include here:
- Architecture, I don’t care if you’re a MVC buff, MVVM fanatic or whatever, if you prefer particular patterns, etc. in fact picking a non-normal pattern can cost you main point #4 if I have to hit the books to figure out what you did.
- Code separation, separate your data, business and view tiers, or don’t…again just make sure I can follow well. Similar point to architecture
- Business process behind the code, ok be an Agile/Scrum person, or don’t be…show me the results. Now to its credit I’ve grown fond of Agile/Scrum as it’s a solid business process, but if it won’t produce quality code for you, then come up with a better way.
- How you test exactly. Unit testing is awesome, but again do what makes sense and employ the best tools to accomplish point #2.