• Post Reply Bookmark Topic Watch Topic
  • New Topic

Three cheers for The Chicken Coop!  RSS feed

 
Guy Reynolds
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wahoo!!! I'm just a newbie Java programmer ( does that make me a Proglet??? ) and I have been taking a lot of flak from my associates ( I am being introduced to Java through a college "Algorithms and Data Structures" course). All of the "experienced" Java people in my class use the intolerable
ThisDrivesMeNuts ( ) {
if ( readingCodeLikeThis == true ) {
me = excedrinSizedHeadache.start();
}
}
curly brace style. Having officially rebelled against this style, and developed "my own" style
ThisIsSoMuchBetter ( )
{
myBrain.uncramp( );
}
of curly brace expression, I pictured my days as a Java programmer lonely and desolate, forever ridiculed and ostracized for my illegitimate curly brace placement. You can only imagine the sense of relief and acception I felt when I first laid eyes upon the teachings scrawled in the walls of the chicken coop. Not only were my feelings about curly braces validated, therein I also found criticism for the insidious one-line if,while,for statements.
if ( superHero == theTick ) System.out.println("Spoon!");
Another "standard" practice whose refusal of adoption earned the disdain and reproach of my peers. Once or twice I attempted to leave the statement on the same line, not surrounded by braces, in an attempt to pacify my assailants, but soon found myself pressing the enter key, summoning the stabilizing curly braces, a quick indent and then recompiling before anyone noticed.
Thanks to VanRenseleer I will no longer brace in shame! I have found reassurance and support within the Coop. I will return to this place of knowledge and glean from it every scrap of style it has to offer!

Thank you!

 
paul wheaton
Trailboss
Posts: 22537
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been thinking about updating the coop a bit. I think I need to clarify the stuff about spaces around identifiers. Methods and arrays being dereferenced should not be followed by a space.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!