MavEtJu's Distorted View of the World
	Coding Styles
Posted on 2010-12-01 23:00:00
Tags: Coding,  Rant,  FreeBSD
Recently I stumbled over this piece of code:
if(pinfo->cinfo) {
	if (pinfo->cinfo->col_first[COL_INFO]>=0){
		for (i = pinfo->cinfo->col_first[COL_INFO]; i <= pinfo->cinfo->col_last[COL_INFO]; i++) {
and it nearly made me cry. How many different coding styles can you find in here?
- No space between "if" and "(" on the first line.
 - Space between "if" and "(" on the second line.
 - Space between ")" and "{" on the first line.
 - No space between ")" and "{" on the second line.
 - Pointer check without a "!= NULL" on the first line.
 - No space before and after ">=" on the second line.
 - Spaces before and after "<=" on the third line.
 
This inconsistent coding style drives me craaaaaazy! I am so glad
that the FreeBSD Project has 
a
consistent coding style for their own source code.
 | 
Share on Facebook | 
Share on Twitter
	
	Comments:
	No comments yet
	
	
Leave a comment
	
	Back to the main page