2> There should only be one logical task per line of code. The right density is that of basic or pascal. Clever use of compound assignments, macros, etc. cost more than their worth in the long run. It makes code harder to read, and easier to misunderstand, even when you're writing it.
3> Moore's law gave us a nice boost in hardware, but the ride is coming to an end. If your software doesn't distribute across cores, you're going to be stuck in the slow lane compared to that which does.
4> Accounts with usernames and passwords are going away. Capability tokens that can be revoked and renewed are going to be the next big thing. Think Flickr's guest pass to look at an otherwise private photo album, for example.
It seems to me the more clever you are, the harder it is to understand and debug code. Breaking things down into logical steps, but not too far, works best for me, and I suspect, but can't prove, the general case as well.
I love my modern frontend tools: frameworks that put state first and let me work with lots of data instead of endlessly fiddling with the dom, linters and code formatters that eliminate the need to think about whitespace and optional parens, build tools that let me target old browsers without writing additional code, intellisense that tells me what types of arguments a function accepts.
I still build a lot of things in vanilla JS, but ease of getting going is a tradeoff, because eventually I miss having prettier and typescript.
- switch to a new language
- add a new framework
- use a build tool / bundler and polyfills since all of those modern features aren't actually supported across your user's browsers / versions
- use web components... sorta, but not directly
- use a modern front-end shadow DOM-y framework with a dependency tree so deep that it could never be audited
- while you're here, take all of your CSS and abstract it to a meta language using template strings and jam it inside your JS / TS component files directly
- i know we are using all of this cool modern stuff, but... jQuery and Bootstrap still exist, so fallback if you feel like having fun and why not just add them to the mix too
- web app? no, no, no, this is a micro-frontend
- oh yeah, btw your SEO is going to suck with all of that client-side rendering in the single-page app, but not to worry, server-side rendering to the rescue
- so amazing how the future just works!™
[On a more serious note, I do actually appreciate some of the sane and simple modern frontend tools (we need more of those!) But going through all of this crap feels like overkill for an average run-of-the-mill CRUD web app. Just my 2¢.]
Not everything benefits from being a SPA (quite the contrary).
Also, lots of developers never know what happens below that stuff. Don't get me started on how many people I've seen despairing over "configuration debugging".
Some really big projects can be exceptions to this line of thought. But most teams don't work on those really big projects.
To clarify, I find that engineers rely too heavily to let their users find bugs in the field and most engineers tend to think "oh, I'm sure it isn't a big deal, and if it is we can just update the firmware/software".
What do you make of solo-preneurs, who handle every single thing in their business including the technical/coding side?