Code Quality Week part 2 of 8

This week we at Little Chicken are celebrating code quality. Resident Developer and Code Quality Guru Joris Van Leeuwen penned eight byte sized posts on this subject. Each day will see a new post on this subject.

PART 2: Quality Code is Readable

Code that has high quality means that it is readable by others.

Let’s take a look at the following example:

PART 2: Quality Code is Readable Code that has high quality means that it is readable by others.  Let’s take a look at the following example:

If you look at this code in the right way, this code is kind of like a small story.. Maybe even a base for a novel! It’s about a parent who gives birth to a child and wants to take care of the child. It makes sure to listens to it for when it’s hungry. At one point the child got hungry! So the parent decided to feed the child by creating a piece of food and letting the child eat it.

Ok.. maybe it won’t be the next blockbuster in cinema, but it’s a small story nevertheless! This code is readable because the class, field and method names make sense. They make sure the reader understand what is going on with a minimum amount of effort needed.

What makes your code readable? Tell us on facebook