You can measure if you ask another programmer and then you count how many WTFs per minutes he says when he reads your code 😛 . Of course, I am telling about clean code but that helps a lot to the quality.
“Clean code always looks like it was written by someone who cares.”
This was written by Michael Feathers. Michael Feathers is a senior member of Object Mentor team. He provides training, coaching and mentoring services in Agile/XP programming practices, test-driven development, refactoring, object-oriented design, Java, C#, and C++. Michael has over 12 years of experience in developing world-class software solutions.
“You know you are working on clean code when each routine you read turns out to be pretty much what you expected. You can call it beautiful code when the code also makes it look like the language was made for the problem.”
That quote comes from Ward Cunningham (inventor of the Wiki, inventor of Fit, co-inventor of eXtreme Programming, and much more)
I recommend this post in this forum if you want to know more:
Image source: http://davidwalsh.name/code-review