Live data from Hacker News

Code is run more than read

olano.dev

161–170 of 325 posts

Re: Code is run more than read

#161
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-... )

That article is misinterpreting the meaning of the symbol. It isn't useful in mathematics because it is a contradiction in terms: if "neither of the two compared entities is greater or lesser than the other" then they are equal. The author of the original article uses it correctly - think about it more in regards to importance for their example. The business is no more or less important than the developer, but they a…

> if "neither of the two compared entities is greater or lesser than the other" then they are equal.

Not in a partial order.

For example in this simple lattice structure, where lines mark that their top end in greater than their bottom end:

      11
     /  \
    01  10
     \  /
      00
11 is > to all other (by transitivity for 00), 00 is You can actually see this kind of structure everyday: unix file permissions for example. Given a user and a file, the permissions of the user are is an element of a lattice where the top element is rwx (or 111 in binary, or 7 in decimal, which means the user has all three permissions to read, write, and execute) and the bottom element is --- (or 000, in binary, or 0 in decimal, which means the user has no permissions). All other combination of r, w, and x are possible, but not always comparable: r-x is not greater nor lesser than rw- in the permissions lattice, it's just different.

Re: Code is run more than read

#162
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.

> code that can't be read won't run for long There's plenty of ossified code people are scared to touch because they don't understand it, but stake their business on it :)

And even executables for which the source code has been lost but which are still important to business operations.

Re: Code is run more than read

#163
post #39
post #31

Earlier quoted context omitted.

What's in it for me?

Usually, a promotion from "one of the coding peons" to "the software architect who tells coding peons what to do"

Even if not an architect, it will make you a very senior and respected developer among the other smart people that can actually evaluate this. And if in your current company there are no such smart people, it will open the doors for you to find another company where those skills will be rewarded.

Re: Code is run more than read

#164

Earlier quoted context omitted.

I think they mean the case where a and b are variables for which you don't know the values.

Yeah, that's how I understood it. E.g one might write (a+b)^2 != a^2 + b^2 To mean that in general the equality doesn't hold. Despite exceptions like a=b=0 Strictly you should write something like ¬[∀ a,b (a+b)^2 != a^2 + b^2] But shorthand and abuse of notation are hardly rare

Noticed a copy and paste error too late - the != in the second expression should of course be =

Re: Code is run more than read

#165
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-... )

That article is misinterpreting the meaning of the symbol. It isn't useful in mathematics because it is a contradiction in terms: if "neither of the two compared entities is greater or lesser than the other" then they are equal. The author of the original article uses it correctly - think about it more in regards to importance for their example. The business is no more or less important than the developer, but they a…

Is that really a contradiction? What about complex numbers?

Re: Code is run more than read

#166
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-... )

I suppose that this glyph should result from a combination of emojis for apples and oranges.

Re: Code is run more than read

#168

Earlier quoted context omitted.

The problem with "costs less than developer's time" math is that, usually, it's not you who's paying . Your users are, often in nonobvious ways, such as through higher electricity bills, reduced lifespan[0], lost opportunities, increased frustration, and more frequent hardware upgrades. (And most of your users don't have developer's salary, or developer's quality of life, so it hurts them that many times more.) -- [0…

I've been calling the thinking of the parent "trickle-down devonomics": that by making the code better for the user, the benefits will trickle down to the users. Obviously, as the name suggests, that never happens. Devs get the quality of life and users end up paying for our disregard.

Loved the analogy. Also tracks with the fact that devs hold all the power in the user x dev relationship.

> that by making the code better for the user,

Did you mean the dev?

Re: Code is run more than read

#169
The article is good on the whole but the title "Code is run more than read" seems false in many situations I've been in. A lot of software doesn't have users. Often the target users don't like the product enough and are just trialing it for you as a favour.

In these cases, it's not very meaningful to say it's being "run more than read", because either you should have made the code readable enough for other developers to delete it, modify it or rewrite it until users want to use it, or the code has to be valueless and able to be completely thrown away (the knowledge of how to build it is either written down elsewhere or tacit).

I also agree with what somebody else said about the times in which the features/fixes you create aren't seen by users but just benefit a business-to-business sales process. In these cases, you behave differently. You do the work because there's a very clear signal to your company meeting their expectations promptly.

I guess one way I would agree with the article is that once something has users/businesses and is somewhat readable you apply your extra effort on polishing the user experience as prioritising the happiness of your core users is generally a good idea.

Re: Code is run more than read

#170
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.

That would be nice if it were true :(
Post reply on HN