|
[Springframework-developer] Any sort of defined policy w/regards to tab/space usage and indentation?
From: Colin S. <col...@ex...> - 2003-09-30 21:14:10
|
I notice that most of the codebase in Spring uses hard tabs as opposed to spaces for indentation. From looking at some comment text which does have some embedded spaces, as far as I can tell the assumption is that tabs equate to 4 chars, although most of the code itself does not seem to make this assumption? Is there any sort of project policy or guideline on this? i.e. something like 'all code must use hard tabs, and align elements only with tabs', etc.? I can hopefully work with any policy, but I'd just like to know if one exists... (although if I am forced to use hard tabs I would actually have to set up another Eclipse workspace, right now my tab key puts out spaces). fwiw, I have personally found that hard tabs are somewhat of a disaster (or at least a problem) in many team environents. In my teams, it's generally the one rule we apply with no exceptions, "no hard tabs". The problem is that while hard tabs have the ideal benefit of allowing users to indent to whatever size they like, in practice people seem to not have the discipline to stick to using tabs only, or their editor of the moment doesn't allow them to set the tab size to something else easilly, so spaces creep in. Once that happens to any extent, the code looks broken to anybody else using another tab size. Regards, Colin |
|
From: Rod J. <rod...@in...> - 2003-10-01 07:36:52
|
The use of tabs is historical. I'm in the minority of people who use tabs, so the original code base had tabs and I still use them. I know most people in open source projects hate tabs, so we might eventually need to change this. We did consider the use of Jalopy before check in at one point. I'd prefer not to mess with the formatting process before 1.0 unless we really need to. Regards, Rod ----- Original Message ----- From: "Colin Sampaleanu" <col...@ex...> To: <rod...@in...>; <jue...@we...> Cc: "Spring Developers" <spr...@li...> Sent: Tuesday, September 30, 2003 10:14 PM Subject: [Springframework-developer] Any sort of defined policy w/regards to tab/space usage and indentation? > I notice that most of the codebase in Spring uses hard tabs as opposed > to spaces for indentation. From looking at some comment text which does > have some embedded spaces, as far as I can tell the assumption is that > tabs equate to 4 chars, although most of the code itself does not seem > to make this assumption? > > Is there any sort of project policy or guideline on this? i.e. something > like 'all code must use hard tabs, and align elements only with tabs', > etc.? I can hopefully work with any policy, but I'd just like to know if > one exists... (although if I am forced to use hard tabs I would actually > have to set up another Eclipse workspace, right now my tab key puts out > spaces). > > fwiw, I have personally found that hard tabs are somewhat of a disaster > (or at least a problem) in many team environents. In my teams, it's > generally the one rule we apply with no exceptions, "no hard tabs". The > problem is that while hard tabs have the ideal benefit of allowing users > to indent to whatever size they like, in practice people seem to not > have the discipline to stick to using tabs only, or their editor of the > moment doesn't allow them to set the tab size to something else easilly, > so spaces creep in. Once that happens to any extent, the code looks > broken to anybody else using another tab size. > > Regards, > Colin > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Colin S. <col...@ex...> - 2003-10-01 12:27:25
|
I think the only issue with using Jalopy before checkin is that CVS is not really optimized for this; unless Jalopy is smart enough to not touch file dates on files that don't get reformatted, you end up doing a diff on every file to do a checkin. I realize that only the actually modified files get checked in, but the contents still get set across, since CVS doesn't keep local original versions (like say Subversion, which is optimized to reduce bandwidth usage at the expense of local space). Regards, Colin Rod Johnson wrote: >The use of tabs is historical. I'm in the minority of people who use tabs, >so the original code base had tabs and I still use them. I know most people >in open source projects hate tabs, so we might eventually need to change >this. > >We did consider the use of Jalopy before check in at one point. > >I'd prefer not to mess with the formatting process before 1.0 unless we >really need to. > >Regards, >Rod > >----- Original Message ----- >From: "Colin Sampaleanu" <col...@ex...> >To: <rod...@in...>; <jue...@we...> >Cc: "Spring Developers" <spr...@li...> >Sent: Tuesday, September 30, 2003 10:14 PM >Subject: [Springframework-developer] Any sort of defined policy w/regards to >tab/space usage and indentation? > > > > >>I notice that most of the codebase in Spring uses hard tabs as opposed >>to spaces for indentation. From looking at some comment text which does >>have some embedded spaces, as far as I can tell the assumption is that >>tabs equate to 4 chars, although most of the code itself does not seem >>to make this assumption? >> >>Is there any sort of project policy or guideline on this? i.e. something >>like 'all code must use hard tabs, and align elements only with tabs', >>etc.? I can hopefully work with any policy, but I'd just like to know if >>one exists... (although if I am forced to use hard tabs I would actually >>have to set up another Eclipse workspace, right now my tab key puts out >>spaces). >> >>fwiw, I have personally found that hard tabs are somewhat of a disaster >>(or at least a problem) in many team environents. In my teams, it's >>generally the one rule we apply with no exceptions, "no hard tabs". The >>problem is that while hard tabs have the ideal benefit of allowing users >>to indent to whatever size they like, in practice people seem to not >>have the discipline to stick to using tabs only, or their editor of the >>moment doesn't allow them to set the tab size to something else easilly, >>so spaces creep in. Once that happens to any extent, the code looks >>broken to anybody else using another tab size. >> >>Regards, >>Colin >> >> |
|
From: Colin S. <col...@ex...> - 2003-10-01 14:32:05
|
I took a better look at Jalopy. My only previous experience with it had been with the OSWorkflow project, where a build seemed to modify every file, as a result of Jalopy running. Now in fact, the Jalopy ant task is smart enough to use a checksum to not touch files which don't end up getting reformatted, and the OSWorkflow guys were not overriding this. However, they were forcing it to use unix line endings, even on windows systems. So Jalopy would probably be a realistic option. There is a plugin for Eclipse too... Regards, Colin Colin Sampaleanu wrote: > I think the only issue with using Jalopy before checkin is that CVS is > not really optimized for this; unless Jalopy is smart enough to not > touch file dates on files that don't get reformatted, you end up doing > a diff on every file to do a checkin. I realize that only the actually > modified files get checked in, but the contents still get set across, > since CVS doesn't keep local original versions (like say Subversion, > which is optimized to reduce bandwidth usage at the expense of local > space). > > Regards, > Colin > > Rod Johnson wrote: > >> The use of tabs is historical. I'm in the minority of people who use >> tabs, >> so the original code base had tabs and I still use them. I know most >> people >> in open source projects hate tabs, so we might eventually need to change >> this. >> >> We did consider the use of Jalopy before check in at one point. >> >> I'd prefer not to mess with the formatting process before 1.0 unless we >> really need to. >> >> Regards, >> Rod >> >> ----- Original Message ----- From: "Colin Sampaleanu" >> <col...@ex...> >> To: <rod...@in...>; <jue...@we...> >> Cc: "Spring Developers" >> <spr...@li...> >> Sent: Tuesday, September 30, 2003 10:14 PM >> Subject: [Springframework-developer] Any sort of defined policy >> w/regards to >> tab/space usage and indentation? >> >> >> >> >>> I notice that most of the codebase in Spring uses hard tabs as opposed >>> to spaces for indentation. From looking at some comment text which does >>> have some embedded spaces, as far as I can tell the assumption is that >>> tabs equate to 4 chars, although most of the code itself does not seem >>> to make this assumption? >>> >>> Is there any sort of project policy or guideline on this? i.e. >>> something >>> like 'all code must use hard tabs, and align elements only with tabs', >>> etc.? I can hopefully work with any policy, but I'd just like to >>> know if >>> one exists... (although if I am forced to use hard tabs I would >>> actually >>> have to set up another Eclipse workspace, right now my tab key puts out >>> spaces). >>> >>> fwiw, I have personally found that hard tabs are somewhat of a disaster >>> (or at least a problem) in many team environents. In my teams, it's >>> generally the one rule we apply with no exceptions, "no hard tabs". The >>> problem is that while hard tabs have the ideal benefit of allowing >>> users >>> to indent to whatever size they like, in practice people seem to not >>> have the discipline to stick to using tabs only, or their editor of the >>> moment doesn't allow them to set the tab size to something else >>> easilly, >>> so spaces creep in. Once that happens to any extent, the code looks >>> broken to anybody else using another tab size. >>> >>> Regards, >>> Colin >>> >> |
|
From: Trevor C. <pr...@se...> - 2003-10-01 12:46:22
|
I use tabs, but I tend to ignore most formatting, using the "auto-format" function of Eclipse routinely. The only problem with this is that it will mess up CVS if you reformat and submit. Trevor -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Rod Johnson Sent: October 1, 2003 3:37 AM To: Colin Sampaleanu; jue...@we... Cc: Spring Developers Subject: Re: [Springframework-developer] Any sort of defined policy w/regards to tab/space usage and indentation? The use of tabs is historical. I'm in the minority of people who use tabs, so the original code base had tabs and I still use them. I know most people in open source projects hate tabs, so we might eventually need to change this. We did consider the use of Jalopy before check in at one point. I'd prefer not to mess with the formatting process before 1.0 unless we really need to. Regards, Rod ----- Original Message ----- From: "Colin Sampaleanu" <col...@ex...> To: <rod...@in...>; <jue...@we...> Cc: "Spring Developers" <spr...@li...> Sent: Tuesday, September 30, 2003 10:14 PM Subject: [Springframework-developer] Any sort of defined policy w/regards to tab/space usage and indentation? > I notice that most of the codebase in Spring uses hard tabs as opposed > to spaces for indentation. From looking at some comment text which does > have some embedded spaces, as far as I can tell the assumption is that > tabs equate to 4 chars, although most of the code itself does not seem > to make this assumption? > > Is there any sort of project policy or guideline on this? i.e. something > like 'all code must use hard tabs, and align elements only with tabs', > etc.? I can hopefully work with any policy, but I'd just like to know if > one exists... (although if I am forced to use hard tabs I would actually > have to set up another Eclipse workspace, right now my tab key puts out > spaces). > > fwiw, I have personally found that hard tabs are somewhat of a disaster > (or at least a problem) in many team environents. In my teams, it's > generally the one rule we apply with no exceptions, "no hard tabs". The > problem is that while hard tabs have the ideal benefit of allowing users > to indent to whatever size they like, in practice people seem to not > have the discipline to stick to using tabs only, or their editor of the > moment doesn't allow them to set the tab size to something else easilly, > so spaces creep in. Once that happens to any extent, the code looks > broken to anybody else using another tab size. > > Regards, > Colin > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |