Live data from Hacker News

-2000 Lines of Code (2007)

folklore.org

101–110 of 222 posts

Re: -2000 Lines of Code (2007)

#101
post #91

Counting lines of code as a production metric is very stupid. I remember solving an unsolvable 20 years old bug with a line of code, another 3 years old with a order by. How to measure the impact of a line of code? And in my experience, bad programmers write a lot more code... I will never forget the story[1] of a Microsoft developer rewriting a piece of IBM code that had 33 thousand characters, after rewrite ... 220…

Using production metrics as a whole is very stupid and a good way to get devs to optimize for the metrics rather than quality work. A contemporary example would be a company that promotes for "impact" (i.e. launching new products) which is a great way to have a bunch of failed products that nobody maintains!

Re: -2000 Lines of Code (2007)

#102

There is a deeper lesson here: Someone was thinking of lines of code as an asset, not a cost. It's a an error you also see in junior programmers writing reams and reams of code. The lesson is a harsh one for us code lovers, at least it was for me: Code is a means to an end, and an expensive one at that. The best code is the code never written. Our job is to solve problems, not to write code. You can use LOC as a crud…

As a developer few things make me glow like deleting hundreds of lines of code that have been replaced by simplicity.

Re: -2000 Lines of Code (2007)

#104

There is a deeper lesson here: Someone was thinking of lines of code as an asset, not a cost. It's a an error you also see in junior programmers writing reams and reams of code. The lesson is a harsh one for us code lovers, at least it was for me: Code is a means to an end, and an expensive one at that. The best code is the code never written. Our job is to solve problems, not to write code. You can use LOC as a crud…

Not even that, I'm not a civil engineer, but it looks pretty hard to add a ton of concrete without really helping a skyscraper, but I could add a few thousand lines of code without improving a system one bit, and even more lines to make the system slower, more complex, and still not add any functionality.

LoC is about as good a measure of a system quality as weight is for an aircraft project.

Re: -2000 Lines of Code (2007)

#105
post #91

Counting lines of code as a production metric is very stupid. I remember solving an unsolvable 20 years old bug with a line of code, another 3 years old with a order by. How to measure the impact of a line of code? And in my experience, bad programmers write a lot more code... I will never forget the story[1] of a Microsoft developer rewriting a piece of IBM code that had 33 thousand characters, after rewrite ... 220…

Using production metrics as a whole is very stupid and a good way to get devs to optimize for the metrics rather than quality work. A contemporary example would be a company that promotes for "impact" (i.e. launching new products) which is a great way to have a bunch of failed products that nobody maintains!

I know at least a few many-hundred-billion dollar companies that fit that description...

Re: -2000 Lines of Code (2007)

#106

Microsoft and IBM Lines of code clash >In the PBS TV series based on Bob Cringely's Accidental Empires, there is a sequence where Steve Ballmer describes the experience of co-developing OS/2 with IBM, how the whole thing became a fantastic clash of corporate culture, with Microsoft having the small-company attitude of getting things done, and IBM being focused on internal measures primarily KLoCs, that is thousands o…

Not just IBM. A few years back I worked on a large project with one of the big international consulting companies as the prime contractor. They threw a party for the whole team when the codebase hit one million lines of code.

Those of us who knew better treated the "celebration" as a wake.

Re: -2000 Lines of Code (2007)

#107

Earlier quoted context omitted.

How can it be a KPI if it doesn’t measure performance?

If you type faster you get more LOC. If you slack off all day you get zero. It does measure something, not necessary something useful but zero LOC indicates trouble.

I'm on day two of an analysis, zero code written. I don't know what, if anything, needs written. If I had to pound out something to keep from being zero it would be fraud.

Re: -2000 Lines of Code (2007)

#108

Earlier quoted context omitted.

There was a bug in an embedded system I worked on that several engineers, software as well as hardware, spent months troubleshooting. I eventually got called in and fixed it with a while loop and one function call inside of that loop. 4 lines in total, counting the brackets. A very trivial change if you didn’t know why it was there, what impact it had on the system or how much it would have continued to cost in engin…

Agree fully. Yours isn't the case I'm talking about. I'm talking about the people that aren't hunting big bugs, aren't serving as advisors or architects, aren't deleting unused code, and aren't implementing a significant volume of features or functionality, but who instead trickle out a small amount of simple code month after month. I claim that when inspecting commit histories, a very low LOC or very low commit-freq…

All you have to do is read commit messages.

Re: -2000 Lines of Code (2007)

#109

Earlier quoted context omitted.

Do you really expect most managers, if any, would do this?

No, probably not. And most don't try. My point is that --with proper context and thoughtful analysis-- it is data that can be useful.

At the end of the day nothing about the number of commits was used in your thoughtful analysis, it was only the contents of the commits which you attribute any value.

Re: -2000 Lines of Code (2007)

#110
post #5

> they stopped asking Bill to fill out the form which is only possible because he's so important. imagine doing this as a stack-ranked IC in an org like AWS. The old days of a software as an artisanal craft is long over imho.

> The old days of a software as an artisanal craft is long over imho.

In corporate or government software work, sure. But there are no guilds anywhere in those organizations... unless you count the upper executives.

You might not get paid for it, but the artisanal craft of software is alive and well in free and open source software around the world. Tons of those projects get posted to HN. An app can be a home cooked meal and all that jazz. Lots of open source has been corportized too, but many are closer to an artisanal craft guild than modern corporate software work.

And if it is your startup, you can write code however you want.

Post reply on HN