• 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

style guide

 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's another discussion in MO, but since it's come up here publicly, I'll just add that our SCJD Links page links to the Sun style guide, not Coop, and the Sun guide is definitely promoted by the regulars in the Developer Cert forum for anyone doing SCJD.
[Jason]: To truly get students to learn, perhaps we should introduce different style guides for different assignments, but that would probably put more work on the nitpickers.
[Matthew]: This is a fantastic idea, although it does make it difficult for the nitpickers. Would it be easier if it alternated by "schools" and have each nitpicker work only with that "school."

I like the idea too, of course. In an ideal world the additional work would be minimal, if indeed the cattle drivers have learned to take in a new style guide and follow it, regardless of their own codeing preferences. If there is substantial new work generated by this, getting people to adjust to a differnt style, then that also seems to indicate (to me) that there's that much more need to break people out of the one syle they've learned to code in thus far. There are other ways in which additional work comes up - a few nitpickers would have to become really familiar with Sun style if they're not already, and the sample code for certain assignments/schools would have to be converted to the new style. But those are one-time costs, and hopefully not too big. Of course I don't know that much about the inner workings of Cattle Drive, maybe there are other problems here. But I hope the Cattle Drive staff will give these ideas further consideration.
[ October 03, 2003: Message edited by: Jim Yingst ]
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was looking at the Coop Style guide, and noted that section 4.2 has a good example of the problems with excessive whitespace as noted by Steve. We start with the example:

The Coop guide finds this hard to read (I agree), and encourages us to modify it to something like

Or a longer form which I'll omit here; its chief advantage is that it allows more comments if you find them necessary. But personally, I think the biggest readability problems of the original form can be solved by making more judicious use of whitespace. When there's whitespace around everything, as well as superfluous parens, I can't see how the parentheses group. But I can see the groupings much better this way:

To me, this is slightly more readable as the four-liner cited above, and fits easily on my screen without crowding out other neighboring code I may wish to look at. Though as a final touch I feel compelled to reorder it for efficiency:

[ October 03, 2003: Message edited by: Jim Yingst ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, I like being long winded (Jim already knows this).

Mark
[ October 03, 2003: Message edited by: Mark Spritzler ]
 
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Matthew Phillips:

This is a fantastic idea, although it does make it difficult for the nitpickers. Would it be easier if it alternated by "schools" and have each nitpicker work only with that "school."


That was my thinking, to have the basic Java assignments use the JR style guide, maybe the OO use Sun's, etc. Or to make it easier, have the first two schools do one, the second two do the other *shrugs*
 
reply
    Bookmark Topic Watch Topic
  • New Topic