Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IT evaluating quality of coding - how do we know what's good? [closed]

Coming from an IT background, I've been involved with software projects but I'm not a programmer. One of my biggest challenges is that having a lot of experience in IT, people often turn to me to manage projects that include software development. The projects are usually outsourced and there isnt a budget for a full time architect or PM, which leaves me in a position to evaluate the work being performed.

Where I've managed to get through this in the past, I'm (with good reason) uneasy about accepting these responsibilities.

My question is, from a perspective of being technically experienced but not in programming, how can I evaluate whether coding is written well besides just determining if it works or not? Are there methodologies, tips, tricks of the trade, flags, signs, anything that would say - hey this is junk or hey this is pretty damn good?

like image 357
Krevin Avatar asked Jul 07 '09 23:07

Krevin


2 Answers

Great question. Should get some good responses.

  1. Code cleanliness (indented well, file organization, folder structure)
  2. Well commented (not just inline comments, but variables that say what they are, functions that say what they do, etc.)
  3. Small understandable functions/methods (no crazy 300 line methods that do all sorts of things with nested if logic all over the place)
  4. Follows SOLID principles
  5. Is the amount of unit test code similar in size and quality as the code base of the project
  6. Is the interface code separate from the business logic code which in turn should be separate from the infrastructure access code (email, database, web services, file system, etc.)
  7. What does a performance analysis tool think of the code (NDepend, NDoc, NCover, etc.)

There is a lot more to this...but this gets your started.

like image 147
Andrew Siemer Avatar answered Jan 12 '23 06:01

Andrew Siemer


Code has 2 primary audiences:

  • The people who use it
  • The people who develop it

So you neeed 2 simple tests:

  • Run the code. Can you get it to do the job it is supposed to do?
  • Read the code. Can you understand the general intentions of the developer?

If you can answer yes to both of these, it is great code.

When reading the code, don't worry that you are not a programmer. If code is well written / documented, even a non-programmer should be able to see guess much of what it is intended to achieve.

BTW: Great question! I wish more non-programmers cared about code quality.

like image 40
Kramii Avatar answered Jan 12 '23 06:01

Kramii