Code is run more than read
olano.dev
Code is run more than read
1–10 of 325 posts
Re: Code is run more than read
#2I 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
#3Very 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…
(dev = ops = user) ≹ (biz).
Re: Code is run more than read
#4I 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
#5Re: Code is run more than read
#6It 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
#7Don’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
#8Hell, 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
#9So of course code should be readable over being runnable.
Re: Code is run more than read
#10That'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.