Lunch and Learn with ‘Elements of Java Style’

I gave the second of two lunch and learns today on our company coding standard. About a year ago when I first came on board, I went ahead and ordered twenty copies ofThe Elements of Java Style and handed them out to the developers. Looking back over projects after a year it was obvious that we weren’t all on the same page with our coding conventions. I’ve seen classes named Person_fb and lots of really short variable names like ln, p, and cur. And some of the developers liked curly braces on new lines even though the style guide declared they started on the same line as the declaration of the block.

public void doSomething() 
  // do something

instead of:

public void doSomething() {
  //do something

Constant names often looked like mail_server or pdfDir.

So as an attempt to pull everyone back onto the same page I setup a lunch and learn on the top 10 coding conventions from the book.

You can find the powerpoint slides here: (I’ll probably do the next one in KeyNote.)

powerpoint stack