Live data from Hacker News

-2000 Lines of Code (2004)

folklore.org

41–50 of 54 posts

Re: -2000 Lines of Code (2004)

#41
post #38
post #28

Earlier quoted context omitted.

It's not infinite. It's equivalent to while(i count) is always true, and it short circuits to false when i==count).

i don't see anything that increments 'i'

That would be because you don't see the body of the loop.

Re: -2000 Lines of Code (2004)

#43
Everybody here is having a great time beating this mostly-dead horse, but I know for a fact that I have more productive weeks and less productive weeks, and in those less productive weeks I usually write way less LOC.

What's more, if you just slightly adjust this metric to "patch size", as in count lines added as well as lines removed, you'll get a more accurate measure, and also make the linked story moot.

Measuring developer progress is incredibly hard, but we have to do it anyway, and "use your gut" cannot be the only advice on this. At the very least, comparing this metric for the same person over different periods of time can give you a clue as to how they're doing.

Re: -2000 Lines of Code (2004)

#44

Measuring programming progress by lines of code is like measuring aircraft building progress by weight. - Bill Gates

Since this is turning into a quote thread, I'll throw another one in: "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery

Well, if we're really doing this...

"It's not the daily increase but the daily decrease. Hack away at the unessential." - Bruce Lee

Obviously not hack as in hack, but when it came to fighting he was a better hacker than any of us.

Re: -2000 Lines of Code (2004)

#46
post #15

Earlier quoted context omitted.

Only wusses need comments in order to bloat their code. There are so many "effective" alternatives.

Oh yes, if I had it my way we'd all write for loops like so: int i = 0; int count = 20; while( (i count) ) { // some code }

If you want to count lines of C you count semicolons.

Re: -2000 Lines of Code (2004)

#49

I love the feeling after having rewritten some code part with the results of having it much shorter, much clearer, more stable and even faster. :) In almost all cases, it was worth it. The strange thing is, sometimes there are multiple iterations of this on the same code part (sometimes by different people, sometimes even by my own). Then I am thinking, maybe I just have gotten wiser, have learned my lesson or whatev…

If you look at programming as a knowledge acquisition activity instead of a code production activity, then you couldn't possibly have implemented it that way in the first place.

Exactly. Usually I don't have (or give myself) the luxury, but when I'm working on something small and I don't really have time constraints for it, I will write it, then rewrite it, then look at it from a different angle, and rewrite it again. Only after about three rewrites will I get something that looks good.

I'd like to bring this down to writing something good looking earlier, but it's like you say - I only learned it then and there.

Re: -2000 Lines of Code (2004)

#50

Earlier quoted context omitted.

Since this is turning into a quote thread, I'll throw another one in: "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery

Well, if we're really doing this... "It's not the daily increase but the daily decrease. Hack away at the unessential." - Bruce Lee Obviously not hack as in hack , but when it came to fighting he was a better hacker than any of us.

"The scholar seeketh daily increase of knowing; the sage of Tao daily decrease of doing. He decreaseth it, again and again, until he doth no act with the lust of result. Having attained this Inertia all accomplisheth itself. He who attracteth to himself all that is under Heaven doth so without effort. He who maketh effort is not able to attract it." - Tao Teh King, Chapter XLVIII (Crowley's translation)
Post reply on HN