Live data from Hacker News

Code is run more than read

olano.dev

221–230 of 325 posts

Re: Code is run more than read

#221
Businesses don’t really exist, they are an imaginary construct that we’ve come up with to help organize resources, ultimately in the interests of working together.

Business isn’t more important than anything. There are multiple users, sometimes with competing interests; you can’t be everywhere and everything, so you have to prioritize. Going after more profitable users or users that align with some long-term strategy could be seen as “good for the business,” but really the goal is to serve the users (it might just take a couple extra steps).

When the internal politics get confused to the point that people are making decisions just to further the interests of the business without figuring out how it leads to user happiness, the organization has become poisonous. It shouldn’t exist anymore. It might lurch on in a zombie state for quite some time. But it is on the decline, and all the good people will leave.

Re: Code is run more than read

#222
post #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.

1million users waiting even a 1 second longer is about a month of single developers time.

This sort of calculations you preach are inherently untrue, as they completely ignore that 1second times million. After all, nobody bothers economically evaluate just a single second. But it does account to much, when multiplied by the ammount of users. And when we multiply again, by the times a single user uses your software, and then again, by the time a users uses different software from other developers who also thought "it's only 1 second, nobody cares", we end up living in world where software usability gets lower and lower despite hardware getting faster and faster.

We end up living in a world where literally weeks are wasted everyday, waiting for slow windows file explorer. If you'd want to evaluate that honestly, you would probably come to conclusion that microsoft should have a dedicated team, working for decade on nothing but explorer startup optimization, and it would still pay for it self.

But they don't. Because at the end of the day, this whole "lets evaluate developers time working on given improvement" is just a cope and justification of being us lazy, that only pretends to be an objective argument so we can make ourself feels better

Re: Code is run more than read

#223
post #147

Some users are not using a system because they like it but because their company bought it. In those situations biz > user by definition and the developers end up having to cater to the needs of the middle managment of their customers rather than the needs of the actual users. The price of not doing this is failing to win the contract. Users then get locked in to whatever crap you have time to provide for them while…

Typically middle management are users as well, but they are a minority of the user base and use a different set of features (like reporting). So now this becomes a question of which users are prioritized and finding a balance between prioritizing the experience of the small number of users who hold power over the rest, and keeping the product usable enough for the rest of the users to provide some value in data to ma…

Or as I've told the devs in the place I work "Don't fuck up the data path to the reports, it is a cardinal sin".

Re: Code is run more than read

#224
post #146

> There’s a lot of software being produced that just doesn’t care about its users [... caused by] a mismatch between what we thought doing a good job was and what a significant part of the industry considers profitable [... so] perhaps we should take a stronger ethical stand not to harm users. Or, we could ditch the "biz" part. It just so happens that software not written to serve business interests tends to also res…

To ditch the biz we have to make dev and ops accessible to ourselves. Nobody does that. Making a proper login form still requires a team and a week. The biz sits there rubbing its hands, watching us making the means of production more and more complex and expensive to use, so that it has a complete monopoly on creating software. Devs are so used to relatively big paychecks from the biz that unconsciously tend to igno…

It's interesting to hear you say that reducing complexity and building to last(?) is the solution. Do you know of any case studies (not even peer-reviewed necessarily, just examples) showing a "recovery" in terms of user freedom after making such changes? My view has always been that complexity should be reduced, but because it makes maintenance easier—reducing cost if you're paying maintainers—and can prevent bugs/vulns. Only tangentially related to privacy, via the latter.

Also, I don't understand your last point. Are they all React builtins or something? If you're suggesting that the "shape" of an app's navigation, or of network or system calls, etc. should be how business logic is made concrete, I'd have to disagree. That sounds like microservices but with worse intrinsic documentation (the purest documentation there is).

Re: Code is run more than read

#225
post #22
post #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.

In my experience, you need to care about latency. That affects user experience. It's quite hard to pay for better latency.

The universe puts a hard speed limit on latency, but will give you all the bandwidth you want. There’s something almost mystical about latency, we should be very prudent when spending it.

Re: Code is run more than read

#226
> Code is a means to an end. Software should have a purpose, it’s supposed to provide a service to some user.

I will accept this as a premise for the sake of argument, but it's certainly not a universal truth.

Re: Code is run more than read

#227
post #144

Earlier quoted context omitted.

Also, for my compiled code (in Go), the code that I write is not the code that the compiler generates. I can write simple code that's easy for {{me in 3 months}} to read and let the compiler do the fancy stuff to make it fast.

For what it’s worth, Go might not be the best example here as its compiler does very little (hence the fast compile times). Some LLVM-based language would fit the bill better, like Rust, C (also true of the intel compiler and gcc), C++, etc.

[deleted]

Re: Code is run more than read

#228
post #22
post #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.

In my experience, you need to care about latency. That affects user experience. It's quite hard to pay for better latency.

I can often get better latency by throwing a few extra bucks at vertical scaling. Still cheaper than a few hours of dev time a month.

Like I said, it works until it doesn't, and then you do have to optimize for performance to some extent.

Re: Code is run more than read

#229
post #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.

It seems like a false trade-off in the first place. The point of writing readable, maintainable code is that your team will be able to edit it later. Including adding performance enhancements.

Another way of stating the relationship could be something like: You have fewer brain-cycles to apply to optimization than the combined sum of everyone who will ever read your code, if your code matters. But that is a mouthful and kind of negative.

Re: Code is run more than read

#230
post #31

Earlier quoted context omitted.

Their working domain. If you're a developer in financial services, learn finance. If you're a developer in oil exploration, learn seismology. Don't constrict yourself to only being a programmer who writes whatever code you're told to. Be a holistic problem solver.

What's in it for me?

People are down voting me, but I am really enjoying the answers.
Post reply on HN