• 0 Posts
  • 10 Comments
Joined 1 year ago
cake
Cake day: June 2nd, 2023

help-circle

  • Because web development sucks, web developers are always trying to reinvent web development such that it doesn’t suck, and they keep failing.


    They keep failing because it’s impossible, and it’s impossible because the requirements are directly contradictory.

    • Web application code must be simple and understandable (which requires the application to use a minimum of libraries and frameworks), but web applications must look and feel modern and fancy (which requires big, complicated frameworks).
    • Web development must be easy (which requires the project to be written in JavaScript or something similarly simple), but web applications must have sophisticated functionality and not crash (which requires the project to be written in TypeScript, Rust, or something similarly non-simple).
    • Web development must be easy (which requires the entire project to be written in a single language), but web applications must work to at least a basic degree with scripting disabled (which requires the project to contain non-trivial amounts of HTML and CSS in addition to JavaScript/TypeScript/Rust/etc).
    • Web applications must be fast and not crash (which requires a compilation step with type checking), but it must be possible to iterate very quickly (which requires there to not be a compilation step).
    • And so on.

    And they keep failing because, quite frankly, they don’t know how to succeed. Most web developers are not grizzled 50-year-olds with decades of experience and a solid understanding of things like type systems and build automation, and most grizzled 50-year-olds with decades of experience and a solid understanding of things like type systems and build automation want nothing to do with web development. Microsoft somehow managed to scrape together enough exceptional individuals to create TypeScript, but they seem to have exhausted the supply of such individuals.

    Most web developers don’t even seem to fully appreciate what TypeScript does and why it’s important, let alone have the skill to write similarly sophisticated tools themselves. Consider, for example, Vite not running TypeScript type checking with every build. Vite’s developers cite compilation speed as their motivation for cutting this corner. These people clearly do not understand the importance of correctness checking.

    Another example: as far as I can tell, no web application build tools track dependencies between source files for incremental compilation, nor am I aware of any standard format for compilers (TypeScript, Sass, Babel, etc) to communicate that information to the build tools invoking them (Webpack, Vite, Grunt, etc).


    Every once in a while there’s a ray of hope, like TypeScript, but that’s all it is: hope. The web developer experience has never been anywhere close to the caliber of developer experience you’ll get with a language like Rust, and sadly I don’t foresee that changing any time soon.

    And no, htmx is not the answer to our prayers. It seeks to fix HTML, and HTML is not what’s fundamentally broken.




  • Buggy software, not so user friendly, things don’t work, new things to learn…

    Sometimes you just wanna do a simple thing and you cannot do it and that really undermines your self esteem.

    You try to find little working solutions when big techs with armies of engeneers and programmers are working against you.

    Sometimes you find half of your software stops working and you need to go and understand why, fixing or checking for alternatives…

    All of those issues are also present in proprietary software. Not sure why you think free and open source software is unique in that regard.

    In my experience, FOSS generally works better than the proprietary alternative. It tends to have fewer features, but the features it does have are designed to be useful to the user rather than to collect more money from the user, and tend to be much more thoroughly debugged. My favorite example of this right now is Thunderbird versus Microsoft Outlook; the latter has plenty of bells and whistles, but trying to use it is an utterly infuriating experience.

    Also, FOSS alternatives tend to be sparse in topics that most programmers don’t personally care about or don’t have access to. For example, there are a great many FOSS text editors, because every programmer needs one, whereas FOSS business accounting software is not so common, because most programmers don’t own businesses.

    Aurora store stopping to work, apps getting blocked on lineage os or rooted phones, Reddit cleaning out all those amazing third party apps, Linux that wanna make you destroy your pc at times, Firefox remaining the only real alternative to chromium (only god knows for how long yet), google wanting to DRM everything, ig blocking my account because i was using barinsta (i cannot even delete it), Newpipe getting stuck after 1/4 of the video.

    That’s a problem with proprietary software (i.e. proprietary apps and websites), not free and open source software (i.e. your browser, operating system, and Reddit client).

    When a business refuses to do business with me because I use FOSS, I take that as an insult, and take my business elsewhere if I can. I suggest you do the same.

    Can’t we just find a new way of monetize stuff without ads?

    Not as long as we practice capitalism, no. As long as investors demand that businesses grow faster than inflation, those businesses will look for ways to take more and more of your money, forever, until they finally collapse, and then the cycle of enshittification starts anew. What you want is stability and equality, but stability and equality are anathema to someone who wants to be richer than everyone else.



  • Also, I hate mocks. I spent so long learning all the test doubles to pass interviews: what’s the difference between a spy, fake, stub, mock, etc.

    Oh good grief. I haven’t even heard of half of those, and I’ve been writing code longer than most interviewers.

    Also doing it with dependency injection and all that.

    After struggling with several DI frameworks, I’ve come to the conclusion that DI is far too opaque and unpredictable to be useful.

    OOP is also intentionally opaque, mind you, but debuggers can see through it if necessary, so that’s fine. DI, on the other hand, is opaque even to debuggers!

    I much prefer having an in-memory database than mock what a database does.

    I much prefer using the same DBMS for tests as the one used in production. That way, I can use its special features (like arrays as query parameters), and avoid bugs resulting from differences between DBMSes (which would only appear in production).

    You obviously can’t always get replacements for things and you’ll need to mock and I get that. I just prefer to not use them if I can.

    Indeed, and you usually can. Even if your system involves a bunch of services that normally run on different machines, who says you can’t spin up instances of them as part of the test? Tests are arbitrary code and can do anything that any other program can do, including starting subprocesses. Just be sure to terminate them once the test is finished, even if it fails.