3 ms·
I actually setup Textmate to do a completion on # with # `whoami` | `date +"%Y-%m-%d"` | I find #1 to be very useful, primarily for the source control granula
by Lewisham 16y ago
I actually setup Textmate to do a completion on # with
# `whoami` | `date +"%Y-%m-%d"` |
I find #1 to be very useful, primarily for the source control granularity issue. The other useful thing about these type of comments is that if you look through the code, and you spot something that looks like a hack job, usually a comment like that indicates it wasn't the original author who did it. If you're lucky, you'll be told why the hack job is in there, if you're not, you can at least begin the process of finding out (or removing if need be).
#2 suffers from a similar invisibility problem in source control. I comment out code when it has the possibility to come back. However, if I'm not the primary author of the file, and a feature has been removed, the HEAD has no indications that the code was ever there. I wouldn't know about restoring it, I'd waste time reimplementing.
I think the author's heart is in the right place, but it seems to me that he either has an encyclopedic knowledge of his team's codebase, or he only works on projects by himself.
Tool support could help here (maybe Xcode 4 with it's timeline feature), where want you want is a button that says "show me all the lines this file used to have" in some sort of ethereal, back from the dead, view. GitHub does this somewhat with Compare View[1], but it would be nice from the editor as well. I'm sure someone will come in and tell me that emacs has had this for 20 years ;)
[1]: Check out this huge one: http://github.com/sinatra/sinatra/compare/0.2.0...1.0.a#diff-61 http://github.com/sinatra/sinatra/compare/0.2.0...1.0.a#diff...