[The Java Posse] Re: Code definition

2009-04-17 Thread Martin OConnor
I would say that the comments should be less concerned about the "what" and more concerned about the "why" (unless they are javadoc) , leaving the "how" and most of the "what" to the code itself. On Apr 16, 8:57 am, Matt Scully wrote: > The only thing I would add is that comments describe what t

[The Java Posse] Re: Code definition

2009-04-16 Thread Matt Scully
The only thing I would add is that comments describe what the code did at a single point in time and the code itself describes what it did. I always appreciate a helpful comment, but I give preference to renaming variables and extracting methods before adding comments. One helpful comment is refe

[The Java Posse] Re: Code definition

2009-04-15 Thread Robert Casto
Turns out that the build system has RSS but they never turned it on. With this success I'm emboldened to ask them to do a couple other things and see how far I can go. On Wed, Apr 15, 2009 at 6:52 PM, Peter Becker wrote: > > On a more technical note: if your VCS is Subversion, Mercurial or Git >

[The Java Posse] Re: Code definition

2009-04-15 Thread Peter Becker
On a more technical note: if your VCS is Subversion, Mercurial or Git look into trac as a provider of said RSS feeds (plus more). It also allows wiki syntax in the commit messages (including links into other commits or to issues), which makes writing commit messages more fun :-) It's also pret

[The Java Posse] Re: Code definition

2009-04-15 Thread Robert Casto
I think we agree at some level. Recently I have been bombarded with changes that break what I am working on. I spend most of my time fixing my code because they changed a method signature, deleted a class, etc. No comments on why, just lots of changes. An RSS feed would be ideal for this project

[The Java Posse] Re: Code definition

2009-04-15 Thread Peter Becker
There is a danger that if comments are enforced in any position you get people to write stupid comments by habit after about a week and they stop thinking about what they write completely. But usually I find that once you put your commit messages into an RSS feed, newsgroup or mailing list peo

[The Java Posse] Re: Code definition

2009-04-14 Thread Robert Casto
Further back in this thread it was mentioned that typos are obvious and no comment is needed. I would rather see a long winded comment than none at all. I would rather see a dumb comment than none at all. I would rather see tons of comments about what stuff is doing than have to become a human com

[The Java Posse] Re: Code definition

2009-04-14 Thread Ryan Waterer
I agree with you completely. However, as we all know, there are places that have horrible practices and you soon realize that you need to leave the company because no viable change will ever happen. On Tue, Apr 14, 2009 at 9:02 AM, Viktor Klang wrote: > > > On Tue, Apr 14, 2009 at 4:56 PM, Ryan

[The Java Posse] Re: Code definition

2009-04-14 Thread Viktor Klang
On Tue, Apr 14, 2009 at 4:56 PM, Ryan Waterer wrote: > In my experience, some developers are more concerned about their quantity > of > code output. These developers are usually too busy to explain the what, > the how > or the why anywhere -- not in the javadoc, not in the checkin comments, not

[The Java Posse] Re: Code definition

2009-04-14 Thread Ryan Waterer
In my experience, some developers are more concerned about their quantity of code output. These developers are usually too busy to explain the what, the how or the why anywhere -- not in the javadoc, not in the checkin comments, not in any documentation, and not in comments. As such, these deve

[The Java Posse] Re: Code definition

2009-04-14 Thread Dominic Mitchell
On Tue, Apr 14, 2009 at 06:07:54AM -0700, Reinier Zwitserloot wrote: > > The staunch refusal of most VCSes to not allow you to entire an empty > commit is actually a mistake, I think. For example, git commit will > abort the commit if you leave the message blank. For sufficiently > small commits,

[The Java Posse] Re: Code definition

2009-04-14 Thread Reinier Zwitserloot
The staunch refusal of most VCSes to not allow you to entire an empty commit is actually a mistake, I think. For example, git commit will abort the commit if you leave the message blank. For sufficiently small commits, the VCS should just cook up a message based on the diff. The 'why' is not alway

[The Java Posse] Re: Code definition

2009-04-14 Thread Dominic Mitchell
On Tue, Apr 14, 2009 at 06:24:30PM +1000, Peter Becker wrote: > > Very good point. I notice this difference a lot in commit messages: > quite often they are written in a way that is entirely redundant with > the diff you get. That might make sense for large commits (kind of like > an executive

[The Java Posse] Re: Code definition

2009-04-14 Thread Peter Becker
comments that explain business rules that couldn't >> possibly be inferred from the code. Even if you can see what it's >> doing, sometime you need to know why. >> >> On Apr 14, 8:11 am, Peter Becker wrote: >> >> >>> Alexey Zinger

[The Java Posse] Re: Code definition

2009-04-13 Thread Steven Herod
d from the code.  Even if you can see what it's > doing, sometime you need to know why. > > On Apr 14, 8:11 am, Peter Becker wrote: > > > Alexey Zinger wrote: > > > --- On Sun, 4/12/09, Peter Becker wrote: > > > >> From: Peter Becker > &

[The Java Posse] Re: Code definition

2009-04-13 Thread Christian Catchpole
ed to know why. On Apr 14, 8:11 am, Peter Becker wrote: > Alexey Zinger wrote: > > --- On Sun, 4/12/09, Peter Becker wrote: > > >> From: Peter Becker > >> Subject: [The Java Posse] Re: Code definition > >> To: javaposse@googlegroups.com > >> Date

[The Java Posse] Re: Code definition

2009-04-13 Thread Peter Becker
Alexey Zinger wrote: > --- On Sun, 4/12/09, Peter Becker wrote: > > >> From: Peter Becker >> Subject: [The Java Posse] Re: Code definition >> To: javaposse@googlegroups.com >> Date: Sunday, April 12, 2009, 1:12 AM >> Alexey Zinger wrote: >>

[The Java Posse] Re: Code definition

2009-04-13 Thread Dominic Mitchell
On 13 Apr 2009, at 14:26, Alexey Zinger wrote: > Call it what you wish, but I think of it as a situation, where I am > taking a step in the direction of obscurity for some specific reason > (to me, it's not always a bad reason) and compensate for it with > clear and concise comments. I thin

[The Java Posse] Re: Code definition

2009-04-13 Thread Alexey Zinger
--- On Sun, 4/12/09, Peter Becker wrote: > From: Peter Becker > Subject: [The Java Posse] Re: Code definition > To: javaposse@googlegroups.com > Date: Sunday, April 12, 2009, 1:12 AM > Alexey Zinger wrote: > > --- On Fri, 4/10/09, Dominic Mitchell > wrote: >

[The Java Posse] Re: Code definition

2009-04-11 Thread Peter Becker
Alexey Zinger wrote: > --- On Fri, 4/10/09, Dominic Mitchell wrote: > > >> From: Dominic Mitchell >> Subject: [The Java Posse] Re: Code definition >> To: javaposse@googlegroups.com >> Date: Friday, April 10, 2009, 11:35 AM >> On Fri, Apr 10, 2009 at 1

[The Java Posse] Re: Code definition

2009-04-11 Thread Peter Becker
Dominic Mitchell wrote: > On Fri, Apr 10, 2009 at 10:20:32AM -0400, Robert Hanson wrote: > >> Every Perl program I have ever written falls into that category. Six >> months later I can't even figure out how it works. >> > > Believe me, Perl isn't unique in that category. There's a *lot*

[The Java Posse] Re: Code definition

2009-04-10 Thread Alexey Zinger
--- On Fri, 4/10/09, Dominic Mitchell wrote: > From: Dominic Mitchell > Subject: [The Java Posse] Re: Code definition > To: javaposse@googlegroups.com > Date: Friday, April 10, 2009, 11:35 AM > On Fri, Apr 10, 2009 at 10:20:32AM -0400, Robert Hanson > wrote: > > Every

[The Java Posse] Re: Code definition

2009-04-10 Thread Dominic Mitchell
On Fri, Apr 10, 2009 at 10:20:32AM -0400, Robert Hanson wrote: > Every Perl program I have ever written falls into that category. Six > months later I can't even figure out how it works. Believe me, Perl isn't unique in that category. There's a *lot* of really incomprehensible Java out there.

[The Java Posse] Re: Code definition

2009-04-10 Thread Robert Hanson
Every Perl program I have ever written falls into that category. Six months later I can't even figure out how it works. Rob On Fri, Apr 10, 2009 at 9:46 AM, Viktor Klang wrote: > A dear colleague of mine just coined a new expression, > > Him: "This code totally escapes me" > Me: "What?" > Him