Live data from Hacker News

Code is run more than read

olano.dev

1–10 of 325 posts

Re: Code is run more than read

#2
Very nicely explained, as I kept reading it covered all my experiential "yes, but" thoughts.

I will add that-knowing- all this is helpful, but implementing it when you are early in your career is hard.

For example, it's good that Business is the big priority, but when you gave no experience of what is good, or bad, in business, it can be hard to understand the ramifications of decisions made now.

Equally, business priorities should win, but your goals and the business goals may not be aligned. An individual may need to resume-pad (learn that new framework) while the business may want homogeneity (everything built on one framework.)

Finally, of course, this refers to commercial software. Open Source software is the exact opposite flow, dev > maintainer > user > business. Which ultimately explains why it's so hard to get funding for OSS.

Re: Code is run more than read

#3
post #2

Very nicely explained, as I kept reading it covered all my experiential "yes, but" thoughts. I will add that-knowing- all this is helpful, but implementing it when you are early in your career is hard. For example, it's good that Business is the big priority, but when you gave no experience of what is good, or bad, in business, it can be hard to understand the ramifications of decisions made now. Equally, business pr…

Then again, the original ideal for OSS is that (just like owning a home is having the tenant and the landlord be the same person) devs and users are the same, so:

(dev = ops = user) ≹ (biz).

Re: Code is run more than read

#4
I don’t think I agree with the sentiment that user doesn’t equal business, to some degree maybe, but a business is what its users produce. I buy the point that some users within a business can have a demand for processes that will not be good for the business because they may be too focused on their specific department, but as a whole I think they are largely the same thing. Happy users work better, better work is good for the business. Aside from that, I think a lot of the “bad” decisions are unavoidable as businesses grow, so too with the bureaucratic demands that are often not producing value, but it’ll be very hard for the “IT department” to do anything about it because it lives as a “service” department similar to HR, but less understood by management. Cost-centres never get political power to match money makers.

I do think it’s a very interesting article, perhaps with a bit of a baiting headline. But I think it would be even better if it included the perspective of the modern ci/cd pipeline. What I mean by that is how we’re building more and more automation into it, things like RennovateBot that will automate certain parts of your maintenance processes. Things that won’t work automatically if you don’t write clean testable code. If you focus on delivering business value, spaghetti be damned, you’re going to end up spending so much time maintaining it that you’re eventually not going to be capable doing what you set out to do. We used to live on a world where this was sometimes ok, because you’d clean it up once the value was created, but with how much you can gain from a highly automated pipeline, I just don’t think that paradigm is true anymore. Because not only will you have to clean things up, you’re also going to miss out on so much efficiency by not being capable of using these automated tools. You can make the argument that you don’t need to update things as often as those tools help you so, and 5 years ago you would have been correct. Many places you may even still be correct, but in large organisations in the EU this is just no longer the case because of the added legislative bureaucracy that IT security needs to play into.

Re: Code is run more than read

#6
It is not about the comparative values of humans.

It is about costs.

The reason we write readable code is because we spend more time reading it than writing it. Engineer time. Which is money.

Yes, other things are money considerations, too. Considerations the advice to write readable code is not meant to address.

Re: Code is run more than read

#7
I was sceptical but you know what, I love this mental model.

Don’t follow it blindly of course, there are exceptions where dev > biz (see OpenAI debacle) and where dev > ops (early stage startup, move fast, in particular dev > ops because biz)

Re: Code is run more than read

#8
For many of us, running our code 1 billion times will cost less than a few minutes of a developer's time.

Hell, I could spend $200 for a month of server time on AWS and run a lot of my (web API) code 100 billion times.

Optimizing for human readers is always better until you're working on something that proves itself to be too slow to be economical anymore.

Re: Code is run more than read

#10

That's not the point. The point is that a computer is not involved in the creative and qualitative process, it does not care. Humans are different ad you might all know. So of course code should be readable over being runnable.

You haven’t read the article past the headline, have you? It’s not about computers running code, it’s all about humans.
Post reply on HN