Live data from Hacker News

Code is run more than read

olano.dev

121–130 of 325 posts

Re: Code is run more than read

#121
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 the author agrees with you and picked a confusing title for the article. The article ends with a set of equations:

    user > ops > dev
    biz > ops > dev
    biz ≹ user
The conclusion seems to be that code exists in service to the end-user and the business. The last equation (≹) is a neat way of describing that both end-user and the business are equally important to the existence of the code, even though their needs aren’t the same.

Re: Code is run more than read

#122
post #103
post #33

TIL of ≹, which "articulates a relationship where neither of the two compared entities is greater or lesser than the other, yet they aren't necessarily equal either. This nuanced distinction is essential in areas where there are different ways to compare entities that aren't strictly numerical." ( https://www.mathematics-monster.com/symbols/Neither-Greater-... )

Reminds me of the concept of games in combinatorial game theory, they are a superset of surreal numbers (which are themselves a superset of the real numbers) in which the definition of the surreal numbers is loosened in a way which looses the property of they being totally ordered. This creates games (read weird numbers) which can be "confused with" or "fuzzy" with other numbers, the simplest example is * (star) whic…

> By creating numbers from switches you can create even more interesting hot games.

Well, don't leave us hanging! What are some of your favorite hot games on top of switches?

Re: Code is run more than read

#123
post #33

TIL of ≹, which "articulates a relationship where neither of the two compared entities is greater or lesser than the other, yet they aren't necessarily equal either. This nuanced distinction is essential in areas where there are different ways to compare entities that aren't strictly numerical." ( https://www.mathematics-monster.com/symbols/Neither-Greater-... )

The example z_1 ≹ z_2 for complex numbers z_1, z_2 is weird. Imo it would be clearer to state |z_1| = |z_2|, that is both complex numbers have the same absolute value.

> To conclude, the ≹ symbol plays a crucial role in providing a middle ground between the traditional relational operators.

As a PhD student in math, I have never seen it before. I do not believe that it plays any crucial role.

Re: Code is run more than read

#124
post #103
post #33

TIL of ≹, which "articulates a relationship where neither of the two compared entities is greater or lesser than the other, yet they aren't necessarily equal either. This nuanced distinction is essential in areas where there are different ways to compare entities that aren't strictly numerical." ( https://www.mathematics-monster.com/symbols/Neither-Greater-... )

Reminds me of the concept of games in combinatorial game theory, they are a superset of surreal numbers (which are themselves a superset of the real numbers) in which the definition of the surreal numbers is loosened in a way which looses the property of they being totally ordered. This creates games (read weird numbers) which can be "confused with" or "fuzzy" with other numbers, the simplest example is * (star) whic…

Heres a relevant video on the topic: https://www.youtube.com/watch?v=ZYj4NkeGPdM

I really love that video.

Re: Code is run more than read

#125
post #87

I think the corollary to the title (to turn it around on the author) is not 'Code is read more than written' but 'code that can't be read won't run for long'. Disclaimer: Experienced sysadmin trying to make a lateral move to development and as such a complete noob.

Proprietary software you don't have sources for (say e.g. a third-party library), or just about any black-box system, are counterexamples to your corollary.

Yeah, some code runs for so long that the system's owners have issues with repairing/replacing the hardware it can only run on if it fails (and then sometimes resort to emulation of the old hardware to be able to keep running it).

Re: Code is run more than read

#126
post #87

I think the corollary to the title (to turn it around on the author) is not 'Code is read more than written' but 'code that can't be read won't run for long'. Disclaimer: Experienced sysadmin trying to make a lateral move to development and as such a complete noob.

Proprietary software you don't have sources for (say e.g. a third-party library), or just about any black-box system, are counterexamples to your corollary.

Well sort of, I can't read the binaries but I expect the vendor to have source and maintain it properly right?

Re: Code is run more than read

#129
post #115

Earlier quoted context omitted.

Likewise, TIL. In your link however it states "Example 1: Numerical Context Let's consider two real numbers, a and b. If a is neither greater than nor less than b, but they aren't explicitly equal, the relationship is ≹" How can that be possible?

Hmm, what about +0 and -0?

+0 = -0

Re: Code is run more than read

#130

Earlier quoted context omitted.

Proprietary software you don't have sources for (say e.g. a third-party library), or just about any black-box system, are counterexamples to your corollary.

Well sort of, I can't read the binaries but I expect the vendor to have source and maintain it properly right?

There's a lot of software that only exists in binary and whose vendors/maintainers are long gone, and that is used for decades because it just does its job.
Post reply on HN