Live data from Hacker News

Code Archeology – Lines of code by age

smrrd.de

11–20 of 20 posts

Re: Code Archeology – Lines of code by age

#11
post #8

> Remember - the lighter the color, the older the code. I really think it should be the opposite. Recent code should be clearly visible and older code should progressively interpolate into black. The current setup is extremely unintuitive for me.

That it's so interesting. A lot of people said that to me. But to me it felt more natural to highlight old code. Probably because I had this bias in the back of my mind that old code could be bad code.

Physical things often become darker with age due to dirt or corrosion. Examples are wood and metal, or an old vs. a new wall painted in the same color. They all become darker over time. Therefore I think it't more intuitive to think of darker things as older.

Re: Code Archeology – Lines of code by age

#15
Very cool idea. Somebody pointed me at https://github.com/FriedSock/smeargle which implements this for my text editor (see also https://github.com/syohex/emacs-smeargle), so I couldn't resist trying it out. But I can't think of a concrete situation when I'd want my text editor to look like these screenshots: http://imgur.com/a/ufqRV

Re: Code Archeology – Lines of code by age

#16
post #6
post #4

Which do we prefer, though? As an industry, we seem to chose the "new shiney" way more than the alternatives. To the point that "hasn't been touched by the author in a few years" is a warning sign more than a sign of completeness.

I didn't want to make it look that way. The color indication is without any judgment. It's just interesting how code evolved over time. In fact you should reverse the color gradient or use different colours, so you can read code how you prefer it.

Yeah, I didn't really see this post as reading into it one way or the other. I was more just broadcasting how I don't know what to make of the age of code.

More, I think context plays a big role and it is difficult to see what new is brought to the table at times. Worse, what old was accidentally discarded?

Re: Code Archeology – Lines of code by age

#17
post #8

> Remember - the lighter the color, the older the code. I really think it should be the opposite. Recent code should be clearly visible and older code should progressively interpolate into black. The current setup is extremely unintuitive for me.

That it's so interesting. A lot of people said that to me. But to me it felt more natural to highlight old code. Probably because I had this bias in the back of my mind that old code could be bad code.

You are ignoring survivor bias.

Old code is mostly good code. It's new code that has varying quality.

Re: Code Archeology – Lines of code by age

#18

> Remember - the lighter the color, the older the code. I really think it should be the opposite. Recent code should be clearly visible and older code should progressively interpolate into black. The current setup is extremely unintuitive for me.

Luckily you're a programmer, and can easily change a python script!
Post reply on HN