News for hackers. Stuff that matters.
Re:On The Fear Of Reading Code by wheaties on Friday March 26, 2010 @10:18PM (#1222459)
Refactoring is almost always good (almost the key word.) Reformatting, unless the code follows no style what-so-ever, is bad.
Re:On The Fear Of Reading Code by astine on Saturday March 27, 2010 @12:52PM (#1223212)
Just to clarify, I don't commit the reformatted code. It's just a temporary change to make it easier for me to read. :)
Re:On The Fear Of Reading Code by araneae on Saturday March 27, 2010 @12:39AM (#1222579)
Really? Reformatting will solve the "bracket should be on a new line" problem, anyway.
Re:On The Fear Of Reading Code by Daniel_Newby on Saturday March 27, 2010 @01:13AM (#1222607)
Promiscuous reformatting causes large, unreadable deltas for every commit to the version control system.
Re:On The Fear Of Reading Code by Jach on Saturday March 27, 2010 @08:23AM (#1222892)
So keep it isolated in a separate branch? I do agree style wars are pointless.

Personally, while I can and sometimes do have to use the style mentioned in point #3 of the blog post, I curse under my breath every time. (It should be: "\n} else {\n"! Not "\n}\nelse\n{\n"!) Saving myself that frustration can be useful. But for a better example, I'll sometimes come across code indented inconsistently with spaces and tabs, and need to reformat with :retab and == in vim. Separating complex code into chunks makes it easier to parse for me, adding comments, etc. etc. etc. Remember, this is to understand the code, not necessarily to make a bugfix. If I'm going to muck with someone else's code, I'll usually follow their style even if it's not mine. But I might first solve it in mine.

Re:On The Fear Of Reading Code by jeffcoat on Tuesday March 30, 2010 @07:12PM (#1230450)
Exactly why I consider it a Good Idea to make commits that are either style or substance, but not mix both.