5 ms·
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
by hyperman1 3y ago
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 crude measure of progress, in the same way as tons of concrete used is a crude measure of progress when building a skyscraper.
- datavirtue 3y agoAs a developer few things make me glow like deleting hundreds of lines of code that have been replaced by simplicity.
- gabrielhidasy 3y agoNot 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.
- CrazyStat 3y ago> LoC is about as good a measure of a system quality as weight is for an aircraft project. This is a very good an analogy. A plane has to weigh something, but the absurdity of measuring how much progress you’ve made building a plane by how much weight you’ve added is immediately obvious.
- margalabargala 3y ago> 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. I am also not a civil engineer but I can think of a lot of ways to add concrete to a skyscraper in ways that are somewhere between nonhelpful and burdensome.
- michaelcampbell 3y agoYou might acknowledge this analogy is popularly ascribed originally to Bill Gates. “Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” ― Bill Gates
- renox 3y agoVery clever analogy!
- norir 3y agoThis sentiment goes too far in the opposite direction for me. Code that solves a problem is an asset. To carry your analogy forward, code is the concretization of the solution of the problem. The idea of the skyscraper is useless on its own and requires the concrete that materializes it. The skyscraper would become a lot less valuable if you removed the concrete... Of course, you also don't make the skyscraper better by indefinitely adding concrete. A balance must be found with the right amount to be load bearing but not too much. Just like code.
- seadan83 3y agoIt's not a spectrum, instead a duality. An engine is an asset, yet it needs maintenance. Because software is soft, existing assets become yet more stuff to understand, more stuff to fix and keep in sync. Compare for example a building made of stacked stone, brick, concrete, or modular carbon sheets on rebar Another example, 100 hotel rooms, rearrange the layout and it's 101 things to do. The analogies still fail, software updates are more akin to welding an airplane on to a car attached to a subway train. It's less, oh, we need to rework these weldzhere, it's often trying to make the software do something that is radically different. Like inserting a romance chapter into a mystery novel that starts as a chemistry how-to
- throwyawayyyy 3y agoAgreed. And a point that keeps getting missed whenever this discussion comes up is there's a big difference between junior and senior programmers. What should a junior programmer do? Write as much code as possible! KLOC is a pretty good measure of progress for junior programmers, how else do you get better at programming? To know when not to write a line of code, you have to know how to write the line of code in the first place.
- hyperman1 3y agoCosts are not a pure negative. Just like a skyscraper without concrete would be silly, so is an IT solution without code. I have no problem paying for extra code, just like I have no problem paying for an extra server. IF they are worth it. Software engineering is also the act of making a reasonable tradeoff.
- 3y ago
- kibwen 3y agoThis is what fills me with dread when it comes to LLM coding assistants. LLMs solve the problem of "we don't have enough code, so let's generate low-quality code faster than ever", which, to a first approximation, is not actually the problem that anyone has; the problem we have is that we don't have the right code, and the code that we do have is already shit. But at least managers will be happy that their reports are now checking in +100,000 LoC a day. What could possibly go wrong?
- CapitalistCartr 3y ago"Our job is to solve problems, not to write code." My job is what my employers pays me to do. If my employer agrees with that sentiment then it is. If I'm volunteering on open source, I can do my best, but if my employers rewards lines of code, then I produce LOC. Of course, picking a better employer factors in there somewhere.
- rsynnott 3y agoWait, does anyone _actually_ reward lines of code today, in this future year of 2024? Like, I remember people joking 20 years ago about how it was the sort of thing companies like IBM used to do in the 80s.
- CapitalistCartr 3y agoLots of people joke about it, but lots of bosses still look at it. When your boss treats the most prolific coders as the best, it sends a message.
- michaelcampbell 3y agoMaybe I've been lucky, but I've been in big (10's of 1000's of employees) firms and small (10's of employees) firms, since the mid 1980's, and have never been measured on LsOC. But I play along with the joke, because it's an easy strawman. That said, there are other equally bad metrics that are in current use.
- whiterknight 3y agoSucks doing something you know is a waste. I value my time and personal growth more than my employer does.
- hyperman1 3y agoPartially true. One of my less glorious days in IT was spent mopping water out of servers. We've all sbeen in situations where the best course of action was to shut up, sit down, type tons of dumb code, and deal with the fallout later. But if this happens more than rarely, you either find a new job or stay and live with the fact that you've become a second rate programmer in a second rate company.
- deleted 3y ago[deleted]
- michaelcampbell 3y agoI can't believe no one as yet has trotted out the Dijkstra quote, so I will: https://www.azquotes.com/quote/754979 https://www.azquotes.com/quote/754979