top | item 38483181

Code is run more than read

811 points| signa11 | 2 years ago |olano.dev | reply

310 comments

order
[+] t43562|2 years ago|reply
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 you're really busy implementing new features that middle managment like.

You essentially only need a nice looking login screen and some sort of reporting and the rest.....doesn't matter much.

I am being a bit cynical but it does pay as an engineer to know if that's fundamentally the kind of company you're in.

An online retailer, for example, is hypersensitive to its users and I know of at least one that has different versions of its website for different countries because they know that Germans like X and Americans like Y - small changes make a huge difference to sales.

Other companies have no sensitivity to the usability of their products because the people who buy their products are never the users.

[+] Gabrys1|2 years ago|reply
I used to work at a company that sold SaaS to big corporations.

We needed to win contracts, so we needed to tick their checkboxes, but we also cared for the user experience (good UX was almost never a strict requirement from our customer).

Our competitors' software was very painful to use, so we wanted to differentiate in this regard.

This made our own lives easier as the training was easier, the users we interacted with (that usually had no say in whether our solution was bought to them or our competitors') were happier and recommended to their managers (where they could) buying more stuff from us.

In the end this was 80% driven by pride (our software doesn't suck) and empathy (I couldn't stand using the software if it was as bad as our competitors') but to some extent this was also in our interest (especially in the long term, where your brand is built).

[+] dkarl|2 years ago|reply
I worked at a company in a market with similar purchasing dynamics, but we focused exclusively on the users. We committed to a "product-led growth strategy," which meant no salespeople. Product focused entirely on the user experience. The problem was, we weren't selling to users. We were selling to people in the users' organizations who purchased software. These people did not have the same job as the users, and they had no first-hand experience with the product.

It was a doomed approach. We needed salespeople to get inside the heads of the purchasers, learn how to explain the benefit to them, and coach the users on explaining the benefits to other people in their organization. We needed salespeople to bridge the chasm between the users and the purchasers.

[+] derangedHorse|2 years ago|reply
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 management.
[+] Deprecate9151|2 years ago|reply
I've experienced this. I worked for a company that sold software to municipal governments. All that mattered was the Mayor/Town Manager/City Councils opinion. If the reports looked good and the price was right, they were going to renew.

I remember being in site meetings where people who used it every day would tell us to our face how terrible it was. Without fail, that site renewed with some promises to fix a couple specific bugs and a minimal price increase.

[+] manvillej|2 years ago|reply
> 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

this is why all enterprise software sucks

[+] JohnFen|2 years ago|reply
> Some users are not using a system because they like it but because their company bought it.

This is why I use Windows and Visual Studio at work. I don't like either of them, but it's not my call.

[+] bluGill|2 years ago|reply
This is short term thinking - users who hate software can voice enough complaints to get things changed in at least some situations. (not all: many SAP programs with garbage UIs exist)
[+] 4death4|2 years ago|reply
I wouldn’t say you have to cater to middle management instead of the end user. You just can if you want to. Of course you need to consider what middle management needs, since they’re paying you, but there is usually room for craftsmanship to bring a truly great UX to the end user. Most software engineers are lazy and lack a true sense of craft, so they usually skip building a great UX when it’s not a requirement.
[+] sefrost|2 years ago|reply
> I know of at least one that has different versions of its website for different countries because they know that Germans like X and Americans like Y - small changes make a huge difference to sales

Can you speak any more to this? Do you or anyone else have any examples? I would be very interested to see.

[+] eternauta3k|2 years ago|reply
That's one interesting explanation of why EDA software like Cadence Virtuoso and ICCAP have had crappy UIs for decades.
[+] harunurhan|2 years ago|reply
I guess "online retailer" example could be extended to many of the companies that are creating consumer products.
[+] mrjin|2 years ago|reply
Seems that has always been the case. A good example would be SAP.
[+] StimpsonJHoek|2 years ago|reply
I've never felt more seen as a user of AEC design software.
[+] doctorpangloss|2 years ago|reply
This is a very narrow minded take. Every big software success story - Gmail, Slack, Dropbox, Zoom… - was business-to-consumer explicitly or in disguise.

Then again, I’m not saying much that vendors screw up pricing when they choose a price other than “$0,” which is an essential part of B2B-disguised-as-B2C software. Easy for me to say.

Anyway, the boomers you are talking about are retiring out of the workforce, and it will be more likely than ever that the audience will be extremely sensitive to UX, desiring something the most like TikTok and Instagram than ever.

[+] rob74|2 years ago|reply
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-...)
[+] red_trumpet|2 years ago|reply
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.

[+] nine_k|2 years ago|reply
I suppose that this glyph should result from a combination of emojis for apples and oranges.
[+] shemii|2 years ago|reply
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) which is confused with 0, i.e. not bigger or smaller than it, it's a fuzzy cloud around zero (notated 0║*). More complex games called switches can be confused with bigger intervals of numbers and are considered "hot". By creating numbers from switches you can create even more interesting hot games.
[+] matharmin|2 years ago|reply
I find this concept is important in understanding causal ordering for distributed systems, for example in the context of CRDTs. For events generated on a single device, you always have a complete ordering. But if you generate events on two separate devices while offline, you can't say one came before the other, and end up with a ≹ relationship between the two. Or put differently, the events are considered concurrent.

So you can end up with a sequence "d > b > a" and "d > c > a", but "c ≹ b".

Defining how tie-breaking for those cases are deterministically performed is a big part of the problem that CRDTs solve.

[+] namanyayg|2 years ago|reply
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?

[+] lewisjoe|2 years ago|reply
The jargon from category theory for this phenomenon is - partial ordering.

It really is an interesting thing. In fact, as human beings who by nature think in terms of abstract, non-concrete units (as opposed to mathematically precise units like a computer program), we tend to compare two related things. They might belong to the same category of things, but they might not be eligible for direct comparison at all.

Once you internalize partial ordering, our brain gets a little more comfortable handling similar, yet incomparable analogies.

[+] quietbritishjim|2 years ago|reply
One example would be if you define one set A to be "less than" another B if A is a subset of B. Then ∅ < {0} and {0} < {0, 1} but {0} ≹ {1}.

Such a thing is called a partial ordering and a set of values with a partial ordering is called a partially ordered set or poset (pronounced Poe-set) for short.

https://en.wikipedia.org/wiki/Partially_ordered_set

[+] dfee|2 years ago|reply
I was so hoping I could win the day with 0 ≹ -0. But alas, 0 == -0 and 0 === -0.
[+] brynbryn|2 years ago|reply
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 are NOT equal.

It doesn't have to mean importance though, just the method by which you are comparing things.

Monday ≹ Wednesday

Come to think of it, it should be called the 'No better than' operator.

[+] lamontcg|2 years ago|reply
That suggests to me that you've got a multi objective optimization problem with conflicting objectives and a pareto optimal solution that balances the tradeoffs between the two objectives. If you swing it too far one way you've got a '>' and need to swing it back the other way, but go too far the other way and you've got a '<'. And they're definitely not equal since they pull in different directions.
[+] smt88|2 years ago|reply
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.

[+] nehal3m|2 years ago|reply
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.
[+] rafaelmn|2 years ago|reply
> 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 :)

[+] TeMPOraL|2 years ago|reply
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.
[+] ric2b|2 years ago|reply
The entire financial industry disagrees. Also can I interest you in coming out of retirement to explain your cobol code to other developers?
[+] TheCleric|2 years ago|reply
I think it can be run for as long as you have the right infrastructure.

I'd say it's more 'code that can't be read won't be modifiable for long'.

[+] jiggawatts|2 years ago|reply
I have a corollary to this: there are a series of exponential increases in usage counts between each of:

    1. Language designers & standard lib developers.
    2. Shared module or library developers.
    3. Ordinary developers.
    4. End-users.
For many languages, the ratios are on the order of 1,000x at each stage, so for each 1x language designer there might be 1,000 people designing and publishing modules for it, a million developers, and a billion users. Obviously these numbers change dramatically depending on the specific circumstances, but the orders of magnitude are close enough for a qualitative discussion.

The point is that the tiniest bit of laziness at the first or second tiers has a dramatic multiplicative effect downstream. A dirty hack to save a minute made by someone "for their own convenience" at step #1 can waste literally millions of hours of other people's precious lives. Either because they're waiting for slow software, or frustrated by a crash, or waiting for a feature that took too long to develop at steps #2 or #3.

It takes an incredible level of self-discipline and personal ethics to maintain the required level of quality in the first two steps. Conversely, it deeply saddens me every time I hear someone defending an unjustifiable position to do with core language or standard library design.

"You just have to know the full history of why this thing has sharp edges, and then you'll be fine! Just be eternally vigilant, and then it's not a problem. As long as you don't misuse it, it's not unsafe/insecure/slow/problematic." is the type of thing I hear regularly when discussing something that I just know will be tripping up developers for decades, slowing down software for millions or billions.

[+] gostsamo|2 years ago|reply
So, the author hijacks a perfectly good rule of thumb to build their grand theory of everything. It is all nice, clean, and wise, and besides the tortured turn of phrase is just rechewing of popular truisms.
[+] vinay_ys|2 years ago|reply
The author's framing can be misunderstood in so many ways that it is not a useful shorthand at all. There can be no absolute rank order of these tokens.

Firstly, in this framing, the "dev" is not one person but it is a collective for lots of people with varied expertise and seniority levels in different orgs – product, engineering and design orgs.

Then, "ops" is again not one thing and not just engineering ops. It could be bizops, customer support etc. too.

Then, "biz" isn't one thing either. There's branding/marketing/sales/legal etc. and execteam/board/regulators/lenders/investors etc.

All of these people affect what code is written and how it is written and how and when it is shipped to users. Everyone should be solving the same "problem".

A lot of the times, a lot of people within the org are just there to make sure that everyone understands/sees the same "problem" and is working towards the same goals.

But that understanding is continuously evolving. And there is lag in propagation of it throughout the org. And hence, there is lag in everyone working towards the same goal – while goal itself is being evolved.

Finally, "user" is not one thing either nor any one cohort of users are static. There are many different cohorts of users and these cohorts don't necessarily have long-term stable behaviors.

So, it helps to understand and acknowledge how all the variables are changing around you and make sense of the imperfect broken world around you with that context. Otherwise it is very easy to say everyone else sucks and everything is broken and you want to restart building everything from scratch and fall into that and other well-known pitfalls.

[+] xpe|2 years ago|reply
I'm glad to see something approaching ethics discussed:

> There’s a mismatch between what we thought doing a good job was and what a significant part of the industry considers profitable, and I think that explains the increasing discomfort of many software professionals.

"Discomfort" is quite the understatement. This leaves so much unsaid.

I will add some questions:

- What happens when your users are not your customers (the ones that pay)?

- Does your business have any ethical obligation to your users -- all of them -- even the ones that do not pay?

- What happens when your paying customers seek to use your business in ways that have negative downstream effects for your users?

For example, what if:

- Your platform makes fraud easier than the existing alternatives?

- Your platform makes it easier to misinform people in comparison to the alternatives?

- Your platform makes it easier to shape user opinions in ways that are attractive (habit-forming) but destructive in the long-term?

All of these have proven to be successful business models, over some time scales!

Given the reality of the dynamic, should a business pursue such an exploitative model? If so, can it do so more or less responsibly? Can a more ethical version of the business mitigate the worst tendencies of competitors? Or will it tend to become part of the problem?

A key take-away is clear: some classes of problems are bigger and more important than the business model. There are classes of problems that can be framed as: what are the norms and rules we need _such that_ businesses operate in some realm of sensibility?

Finally, I want to make this point crystal clear: a business inherently conveys a set of values: this is unavoidable. There is no escaping it. Even if a business merely takes the stance of 'popularity wins', that is in itself a choice that has deep implications on values. Political scientists and historians have known for years about the problems called 'tyranny of the majority'. Food for thought, no matter what your political philosophy.

I don't know 'the best' set of ethics, but I know that some are better than others. And I hope/expect that we'll continue to refine our ethics rather than leave them unexamined.

[Updates/edit complete as of 8:03 AM eastern time]

[+] bee_rider|2 years ago|reply
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.

[+] quickthrower2|2 years ago|reply
I was sceptical but you know what, I love this mental model.

Don’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)

[+] azangru|2 years ago|reply
I think what I am seeing in this article is a curious mixture of should and does. For example, the "user > dev" formula is a clear example of "should"; but when he gets to "biz > user", he surreptitiously switches to "does". He explains the biz > user by pointing out stakeholders, and investors, and personal interests, and politics, and all other sorts of crap that, in the real world, puts biz before the user. Very understandable. But should it? And why isn't the same explanatory method applied to the "dev > *" formula? After all, there are clearly very strong personal interests involved in that too.
[+] bruce511|2 years ago|reply
Very 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 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.

[+] YoshiRulz|2 years ago|reply
> 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 respect users.

[+] _nalply|2 years ago|reply
Because we as programmers need to know how to progam: learning trumps all. Thus:

    learning > biz > user > ops > maintainer > author
There was that bit

    dev > *
meaning resume-driven development, but in reality it is

    learning > *
And that's the conflict programmers experience in corporate structures, for example the hassle programmers experience when they interview for a position. Employers know it too but they try to shirk it.
[+] hamdouni|2 years ago|reply
biz > user

This one sounds like there is only the HN reality of dev : startups, VC, growth hacking, free until is not, client=product, burn every $ to reach monopoly,...

But, there is another one with small businesses, craftsmanship, get what you pay, client=client...

[+] solatic|2 years ago|reply
> And while we can’t just go back to ignoring the economic realities of our discipline, perhaps we should take a stronger ethical stand not to harm users. Acknowledging that the user may not always come before the business, but that the business shouldn’t unconditionally come first, either.

This is why software engineering needs licensure. Not to check if people understand design patterns, or whether people know the fad library of the day, but to set clear ethical standards and hold people to those standards by disbarring them if they violate those standards.

Or more to the point:

  society > biz > user > ops > dev
[+] gary_0|2 years ago|reply
"biz > user" is valid on paper because someone has to pay for the party; there are a finite number of software devs and capitalism is great at allocating scarce resources where they're most needed. Or at least the "spherical cows" version of free-market capitalism is great at that.

In that version of capitalism, if your OS spends too much time putting spam in the Start Menu and not enough on fixing bugs, you can just switch to that other OS with full support from hardware vendors, that runs all your closed-source legacy software. If your favorite bird-themed social media site starts doing boneheaded stuff, you can just switch to that other site that has all your friends and data and lots of posts from experts and celebrities. If your search results are full of spam, you can switch to that other search engine with 10,000 highly paid engineers and 20 years of experience in Web search and integration with all your devices.

And all the businesses you moved away from would have to clean up their act or go out of business. If only those cows were perfectly spherical.

[+] drewcoo|2 years ago|reply
It is not about the comparative values of humans.

It 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.

[+] btown|2 years ago|reply
From the OP:

> When I say “run” I don’t just mean executing a program; I mean operating it in production, with all that it entails: deploying, upgrading, observing, auditing, monitoring, fixing, decommissioning, etc. As Dan McKinley puts it: "It is basically always the case that the long-term costs of keeping a system working reliably vastly exceed any inconveniences you encounter while building it."

One of the things separating a great developer from a good one, IMO, is the ability to treat the documented API boundary of an open-source library as something that isn't sacrosanct and impenetrable.

How comfortable are you with command-clicking into, or outright cloning and reading, a library's source to understand the nuance that the documentation may not convey (or situation where the documentation is outright wrong)? Depending on your language's support for it, have you monkey-patched issues, or forked a library (and ideally submitted patches upstream) to add extension points you might need? Are you used to setting breakpoints inside of libraries, not just your own code, so you can understand how data is represented internally when debugging?

And when you're evaluating whether to use a library in the first place, do you just look at the API and examples, or do you read the source to understand whether the underlying code prioritized maintainability, extensibility, and test coverage? Do you read changelogs and think about whether the library maintainers prioritize your ability to upgrade without breaking even your patched/forked code?

The brilliance of open source is that we can do this. We're not just fitting gears together - we're able to fabricate iterations on those gears as we need to.

[+] hasoleju|2 years ago|reply
This article has opened up a new perspective for me. It articulates very well that software is a means to an end.

It's a craft that can be used to solve a problem.

In my past I often emphasized the craft part too much. As if only writing perfect code is all you need to do in order to be successful. The really important stuff is understanding the problem you want to solve and being sure that software is the tool to solve this particular problem.