| «« Microsoft Tightening the Feedback Loop | Ad Hoc Communities for Specific Problems »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
Tools Can Solve Endless Arguments
The good thing about being relatively new to a specific area is that you ask a lot of "dumb questions" that make people think. It also means you are unemcumbered by tradition, less set in your ways and more willing to accept new ideas. And so it goes with the software development industry. Some day I'll be a crusty stubborn old man no doubt, but until that day I'm ready to soak up new ways of doing things. Writing software can be a tedious exercise and making tedious exercises less tedious is something that computers are really good at. I'm all for letting computers do my job. If you're wondering where this latest spout is coming from, the hamster wheel started turning when I read Brad Abram's post about case convention in the official guidelines. It's the same old endless argument that has probably happened a thousand times with a thousand different APIs, and it's obvious that no one has come up with a perfect solution. Regardless, it amazed me that developers get hung up over seemingly minor issues like naming conventions, bracketing and indenting. In the comments I said it wasn't a big deal if people sometimes deviated from the guidelines when it made sense to do so. I don't think anyone else agreed with me. :) Then I realised that these developers are probably using their favourite text editor to code (like emacs and vi). They like everything just so, otherwise they have to think about formatting. Thinking about formatting is bad -- it distracts them from the real task: coding! So this causes developers to get all "religious" about these issues. Having a simple case guideline means that you can "code blind" for a bit without wondering if you typed a method name incorrectly. Well I think maybe these developers should get out of the stone ages. Sorry boys and girls, but the days of the POTE (plain old text editor) are numbered. It's time to pick up a modern integrated development environment (IDE) ... it can actually help you code faster and free your mind. For example, would people really care about naming case conventions as much as they do if they used Intellisense? I don't think so. You type the first two or three letters in any case and Intellisense brings up a list of member variables and methods starting with those letters. Pick the one you want and presto, the case is done for you automagically. Indenting is really a simple problem that was solved by tabs. As long as the team uses tabs for indenting, any developer on the team can pick any number of spaces for the tab that they want. Simple text editors provide this too, yet people still argue about tab widths. Bracketing is another thorny issue with C/C++/Java/C# developers. Do you like the opening { on the same line or on a new line? The team ends up choosing a convention and sticking with it. Shouldn't IDEs allow user-customization of bracketing, converting between the user's preference and the source control system's (the team's)? Eclipse half solves this problem already because in the CVS view you can choose to see only logical differences in the code (not bracketing or spacing). Eclipse can also quickly format the code to the user's preference of bracketing and other formatting options. So in theory you could download the latest version of a file and format it the way you like (one keystroke) and still be able to tell if there was a logical diff even though the formatting is completely different. The only thing Eclipse needs to do now is have a place to set a preference for the CVS formatting and it could automagically convert back to that format before it checks in logical changes. Then voila, you have individual developer formatting and everyone on the team is happy as clams no matter what the "official convention" is. Reducing these points of friction using tools can really simplify our lives as software developers. What's holding this stuff up from being adopted I wonder? Stagnation? After watching the two managed code episodes of The .NET Show and hearing the all of the guys say "quicker time to market" over and over, you can bet that better tools will be created to increase development speed even more. Developers will have to keep up with the new technologies or be left in the dust by more efficient managed code and tool-using developers. Posted at November 28, 2003 at 07:18 AM ESTLast updated November 28, 2003 at 07:18 AM EST Comments
"Bracketing is another thorny issue with C/C++/Java/C# developers. Do you like the opening { on the same line or on a new line? The team ends up choosing a convention and sticking with it. Shouldn't IDEs allow user-customization of bracketing, converting between the user's preference and the source control system's (the team's)?" Yes the IDE should allow user-customization, but the multiple customizations per project would tricky. Not overly tricky, but tricky. We use Visual Source Safe with Visual Studios. The intregation is okay, but I still prefer to check in and view things using Source Safe (btw, the automatic check out is a godsend)... So, the IDE's would have to offer the users customized *views* of the indenting, but save things to the file system using *the* view. I like it though. Personally, I use the tab-is-two-spaces, that way i can open my stuff in notepad without having to scroll for miles to the right. » Posted by: aforward at November 28, 2003 11:52 AMOops.... I opened my mouth before reading the the rest of the blog. So yeah, I would do everything as you prescribe - expect I wouldn't persist the formating to the file system expect in the project's format (that way I can use any CVS style tool) » Posted by: aforward at November 28, 2003 11:54 AMgreat idea having the cvs checkout pretty-print the code! as far as variable and method naming, though, the best practice is to make it consistent across the project. there is nothing more frustrating than ten different naming conventions in the same code base. so adopt the local convention, even if it's not the way you'd do it on your own code. » Posted by: anthony at November 29, 2003 12:35 PMYeah, I agree that conventions are good. Sometimes though there are exceptions, like proper names and abbreviations. People should be able to use good judgement and deviate from the convention if it makes sense. I guess I just find it funny -- we trust their API enough to use it but we don't trust them to name their methods properly. :) » Posted by: Ryan at November 29, 2003 01:53 PMHey Andrew, you actually brought up a great point there in your second comment. What format do you store the file in the file system? The user's custom format or the team's? It should probably be the team's format, because if they use a different CVS tool like you said it won't know to convert the file back to the team's format before checking it in. So in Eclipse you would be actually looking at a view of a file stored in the teams format in your own custom format. I wonder what kind of performance hit on the UI that would make. An idea: If you generated a temp file in your format and then regenerated the team's format one on each save. This problem got pretty tough pretty quickly. Thanks for the heads up. » Posted by: Ryan at December 6, 2003 09:11 AM |