Ideas about clean if statements

If you’re reading a lot of code you may get to the point where you’d like it to be clean, so it’s easier for you to read. There’re a lot of resources about the beauty of code around and in this post I’d like to share some ideas about writing concise if statements.

Although these ideas may apply to a lot of different programming languages I chose to give examples written in Java, PHP or Python. There should be no problem to translate this into other, similar languages.

Continue reading →