Blogged about the time I doubled our users by doing proper engineering instead of React slop

https://www.mohkohn.co.uk/writing/html-first/

How building an HTML-first site doubled our users overnight

My client was a utility company, and they had a big problem...

Hey if you would like a cantankerous old man to double your users with the power of proper engineering, you could even hire me
@moh_kohn Just a heads up for the site: I don't know what happened, but I cannot read your site using waterfox nor firefox. (Ungoogled) Chrome works fine.

Might be my heavily themed OS, just check on firefox and if fine carry on!
@GoteerTxuria I use firefox day-to-day and it works for me, if there's a real issue I would want to fix it
@moh_kohn Thank you for checking, then there's something seriously wrong on my machine
@GoteerTxuria @moh_kohn the site is also broken on firefox for me. it seems like the atkinson font the page loads doesnt render at all for some reason

@unnick @GoteerTxuria @moh_kohn

fwiw, works fine for me on FF android with shields up

@unnick @GoteerTxuria web development, what fun ๐Ÿ˜ญ

@GoteerTxuria @moh_kohn works fine on Waterfox on my macOS anyways.

Also, great read!

@moh_kohn @GoteerTxuria firefox ESR in my case; it's throwing errors like: "Content-Security-Policy: The pageโ€™s settings blocked an inline style (style-src-attr) from being applied because it violates the following directive: โ€œstyle-src blob: *โ€. Consider using a hash ('sha256-eyEQIkqjJt2vT6Kt1pkSUhwTpB67WcyjJnghw+gdf54=', requires 'unsafe-hashes' for style attributes) or a nonce."

And again, can't see anything without disabling the CSS.

@notecharlie @GoteerTxuria thanks, will investigate when I get time
@notecharlie @GoteerTxuria could you let me know if it works now?
@moh_kohn I gave it a go. CSP errors are gone. more testing suggests the issue is with how the Atkinson font is getting loaded/used in the body. I don't think chromium is using that font, but it is falling back to Helvetica Neue correctly, where firefox isn't.

All the text is invisible for me in Firefox on Linux when the --font-body is set to "Atkinson", sans-serif. Setting it to "Atkinson Hyperlegible", sans-serif fixed it.

Edit: that doesn't fix it; it just uses the default sans-serif, so "Atkinson" is correctly selecting the custom font and then it isn't displaying. I tried another machine also running Firefox on Linux and the site worked without a fuss.

@moh_kohn @GoteerTxuria

@[email protected] @moh_kohn Huh. I wonder if it's a font issue, a linux issue or a firefox on linux issue.

Will keep in mind so I can just override the font to read next time it may happen
@GoteerTxuria could you let me know if it works now?
@moh_kohn Working just fine on my end now!
@moh_kohn I love statically generated sites with as little JavaScript as possible. There's something calming about a website that just loads in a blink of an eye and no clutter, just ... Information. I unfortunately use corporate tools which often send many megabytes of data just to display ... A table with twenty values. And it takes sometimes tens of seconds on an up to date computer and gigabit connection. And no, the backend database and logic is not the bottleneck.
@moh_kohn โ€œbut thatโ€™s a lot more work for us.โ€, I remember back in my ol' day, using stuff like WTForms and the such. Server side libraries that took in the request data (or other such things) (if any) for any pre-existing filled form info, and in return, gave a form structure with HTML and validation and this and that for what it needed (if anything), or for validation error information (if any), handled it all, all server side, in a couple of function calls. Feels weird that that approach has mostly fallen off of everyone's radars.
@moh_kohn > He was appalled and said, โ€œbut thatโ€™s a lot more work for us.โ€

Could it even be? Because with building things that way there's much less dependencies and so much less churn (if there's even any, like vanilla JS pretty much doesn't breaks).

@lanodan backward compatibility with older browsers requires effort, and much additional testing. You can, on the other hand, target very old browsers by default, but this way you'd not be able to use new features to improve user experience

@moh_kohn

@mo @moh_kohn Improving user experience means actually targetting your users, otherwise it's just artistry.
Remember the doubling of the user count with using progressive enhancement.

@moh_kohn "... a housing benefits office ... They are singularly unlovely places."

I walked into our newly refurbished housing benefits office (it did other things as well) as a new councillor. "Hey this is good," I said, "it's decorated well enough to show that the customers are respected but not so well that it looks like we're flaunting our excessive use of public money."

"Yes," my guide said, "that was the design brief."

@moh_kohn โ€œbut thatโ€™s a lot more work for us.โ€ something like that always makes me think: could someone make a tool that reduces the work for the maintainer?

@leberschnitzel @moh_kohn Often I find that the software people saying "but that's a lot more work for us" are actually saying "but that's not work that I can do in my favorite framework that I want to use so I can put it on my resume because it is currently in hot demand in the job market."

I find software engineers not very interested in the customers or the company vision, but more focused on their own career growth.

Management fails to push back, unaware.

@moh_kohn the irony of having to disable CSS to read the article was not lost on me 

edit: damn, i wasn't even the first one to comment on this. my screenshot is from mullvad's browser FWIW

@moh_kohn Every web developer should read this!
I usually use NoScript to browse (safety first) and i loathe websites which don't show anything without javascript.

You don't need an overloaded engine or framework to display some text and some images. That can be done with simple CSS and HTML.

The motto should always be "customer first". If that results in more work, then so be it. That's what the employer pays you for.

@moh_kohn

nice to see the quoted article living its best life

good on you

@moh_kohn thanks for sharing, excellent read
@moh_kohn it's crazy how this reads like you're digging out some ancient forgotten technology. Probably because it is :(
@moh_kohn well done. Now, where's my Netscape.
@moh_kohn we [the world] needs far far far more of this as far less of the JS/CSS shite we are forced to endure.
@moh_kohn brilliant, remind me of everything I loved doing ten years ago.

@moh_kohn lovely.

Re: the coda - it really does seem like heavily optimisations die with the next developer (or it's been my experience of the last 3 things I've done something like this).

Most people seem completely unattuned to this stuff.

@moh_kohn I've always thought 50% of databases could be files in a filesystem (especially if they support links).

Simplicity rules! KISS

@moh_kohn you people are just calling anything slop nowadays huh