• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Three cheers for The Chicken Coop!

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!

 
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic