Archive

Posts Tagged ‘Code’

Code style

Different developers always use different coding styles, and there is no problem with that. However, when working as part of a large team, developers constantly edit or view code written by other developers. In addition, code searches, which become important when a code base grows larger, remain dependent (to some extent) on code formatting. Some form of code etiquette, if done right, can therefore boost productivity.
Read more…

Advertisements
Categories: Uncategorized Tags:

Code elegance

It’s pretty difficult to settle on what code elegance really means, but I would argue that the more symmetric and compact code is, the more elegant it is. As long as it does not get in the way of code readability, of course.

 

Which one of the following looks better? Version 2 does the same as version 1, but only uses only one line of code. Code efficiency is at least better with version 2. Version 2 is also a bit more mathematic, and therefore, I would argue, more elegant.
Read more…

Categories: Uncategorized Tags: