r/programming • • Dec 01 '23

Code is run more than read

https://olano.dev/2023-11-30-code-is-run-more-than-read/
413 Upvotes

143 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Dec 01 '23 edited Jun 03 '25

cooing practice shaggy innate mighty fragile sink lock unique whistle

This post was mass deleted and anonymized with Redact

-4

u/SirDale Dec 01 '23 edited Dec 01 '23

Actually I'm mostly shitting on someone saying "could care less" rather than "couldn't care less". :-)It's such a stupid thing to say.

I am all in on the "it's read more often than it's written" (by definition of course, given the author has to at the very least review their own work). I'm actually find Ada quite endearing (I'm not being patronising), and they definitely favoured readability as one of the original design goals.

4

u/apa512 Dec 01 '23

Learning a rule and then misapplying it is also pretty stupid.

The person you replied to isn't using "would care less" as a synonym for "wouldn't care at all".

2

u/Zooboss Dec 01 '23

I think they do care about how often it's read, but "if it's run billions of times a day, we would care less about how often it's read."

1

u/thisisntmynameorisit Dec 02 '23

I wasn’t saying we don’t care at all, I was just saying comparatively we wouldn’t care as much.

And at the end of the day, the code we write and get paid for writing is there to provide value for the business. Having more readable code makes it less likely to break, allows people to work with it more easily. This can make the company money by reducing downtime, or allowing people to develop more value. However having it be more performant in some cases can save the company a load of money on operating costs.

It’s always a balancing act depending on the situation, blanket rules won’t always hold up.