This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes Programming aesthetics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Programming aesthetics" Watch "Programming aesthetics" New topic
Author

Programming aesthetics

Kurt Van Etten
Ranch Hand

Joined: Sep 07, 2010
Posts: 98
Now that I've spent a little time working through the cattle drive, it seems that the lessons to be learned here have more to do with developing a certain programming philosophy or sense of aesthetics than with the mechanics of Java (which, at least for the early assignments, are pretty straightforward). Some elements of this might be:

  • Programmers should be minimalists: don't include any extra stuff that isn't really needed.
  • Code should be self-documenting. It might be occasionally necessary to include a comment to explain the underlying algorithm, but if you need a comment to explain your code it means that the code is not clear enough.
  • Variable names should be nouns that describe what the variables contain.
  • Method names should be verbs that describe what the methods do.

  • Based on the feedback I'm getting from the nitpickers, though, it looks like I still have a ways to go to absorb these lessons. I was wondering if anyone knows of any books or tutorials they could recommend that deal specifically with the aesthetics of coding? Or do we need to wait for the Trailboss to write his memoir?
    Joachim Rohde
    Ranch Hand

    Joined: Nov 27, 2006
    Posts: 423

    Code Complete 2 by Steve McConnell. It's worth it's weight in gold!
    Katrina Owen
    Sheriff

    Joined: Nov 03, 2006
    Posts: 1358
        
      17
    I second "Code Complete".

    My favorite book /eva/ is "Clean Code" by Robert Martin (a.k.a. Uncle Bob). I actually have lots of favorite books ("Working With Legacy Code" and "The Pragmatic Programmer" are also in the list, but for clarity and style in coding, Clean Code blew my mind right out of my nose. Messy, but worth it.

    http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=sr_1_1?ie=UTF8&qid=1297884676&sr=8-1

    Another great one is Kent Beck's "Implementation Patterns" -- very intense.
    Kurt Van Etten
    Ranch Hand

    Joined: Sep 07, 2010
    Posts: 98
    Thanks, Katrina and Joachim. Those both seem like very promising books--looks like I've got some reading ahead of me!
    Phil Freihofner
    Ranch Hand

    Joined: Sep 01, 2010
    Posts: 115
        
        1
    Yo Kurt! Ever come across the phrase "Stockholm Syndrome"?

    Congrats on your progress! I'm a couple assignments behind you, and struggling.

    Best,

    Phil
    Kurt Van Etten
    Ranch Hand

    Joined: Sep 07, 2010
    Posts: 98
    Phil Freihofner wrote:Yo Kurt! Ever come across the phrase "Stockholm Syndrome"?

    Since we're all here voluntarily, I'm imagining a slightly different dynamic. I can't help picturing the nitpickers in dominatrix outfits, with whips cracking...

    "Mistress, have I displeased you with my execrable code? I promise I will do better!"
    Phil Freihofner
    Ranch Hand

    Joined: Sep 01, 2010
    Posts: 115
        
        1
    LOL! Yes.
    Katrina Owen
    Sheriff

    Joined: Nov 03, 2006
    Posts: 1358
        
      17
    LOL! Seriously -- now I feel so badass.
     
    Consider Paul's rocket mass heater.
     
    subject: Programming aesthetics