by Carlos Ble | Jan 27, 2014 | Agile, Clean code, Software Development
With good names for packages, classes, methods, variables,… code should be self-explanatory. Long method names are not a problem if they really make code read better and don’t reveal too much implementation details. Names are more powerful than most...
by Carlos Ble | Nov 10, 2013 | Clean code
Methods should be short, from 1 to 7 lines of code, maximum 10 in some cases (with the exception of some algorithms). Because a method does just one thing its name should describe it precisely. But it should not contain implementation details (like data types). The...
by Carlos Ble | Nov 8, 2013 | Clean code
I believe the idea of a single exit point for functions comes from the 70’s. A function used to have only one exit point, a single return statement. I still see some developers doing this but it’s not a good idea. As soon as you have found what you were...
by Carlos Ble | Sep 11, 2013 | Clean code
“Feature envy” is a typical code smell in Object Oriented Programming. It can be appreciated when code talking to an object accesses directly to that object’s fields or properties, from the outside, breaking the encapsulation. // feature envy:...
by Carlos Ble | May 18, 2013 | Agile, Clean code, Retrospectivas, Software Development, Test Driven Development
I’ve got goosebumps on my arms most of the day. And it doesn’t happen very often. This is the most emotional coding dojo I’ve ever facilitated. It’s been in Gran Canaria, at the Universidad de Las Palmas de Gran Canaria (EII ULPGC). The...
by Carlos Ble | Apr 7, 2013 | Agile, Clean code
A new change or feature is about to be implemented. There are several places where it can fit in, and all of them seem to respect the Single Responsibility Principle. My tendency used to be adding the new feature where it was easier to place. However now I consider...