• 19 Posts
  • 64 Comments
Joined 2 years ago
cake
Cake day: July 29th, 2023

help-circle














  • Is it not generating HTML on the server to be served to the client?

    No, it generates the code that creates the DOM, sets the application state based on the user’s setting, and updates the webapp to resume working in a consistent state.

    It basically sends a frozen instance of a full blown JavaScript application.

    What you’re describing is, in my opinion, an overly complicated form of dynamically rendering HTML on the backend.

    That’s because you’re oblivious to the problem domain,and thus you’re falling back to the unrelated but similar sounding things you’re familiar with to fill in the void I your understanding of the actual problem.

    Anyway, that’s my opinion on the matter

    My point is that your opinion is a misinformed one,and really doesn’t hold up to scrutiny.





  • There is a lot of doubling. Why the heck is there Dart/Flutter? Just use Javascript/TypeScript.

    This blend of comment was once targeted at TypeScript. Still is.

    The truth of the matter is that the purpose of tools is to help people achieve their goal. JavaScript is awfully broken, and many people have been investing their time to come up with solutions to fix it. TypeScript is one of the approaches, but Dart is another one. JavaScript doesn’t go away because it’s the de facto standard to run arbitrary code in a browser, and it carries decades of legacy code. Thus people try and try. TypeScript is now on its 5th major release, and there’s still plenty of work to improve upon the mess that’s JavaScript. No wonder corporations like Google invest their resources building alternatives.



  • but if it’s not readable it’s garbage.

    Readability is often in the eye of the beholder, but knowing that a component implements a design pattern is all you need to know how it’s used without even having to peek at the code.

    I think the most vocal critics of design patterns are those who are clueless about design patterns, and they are criticising their use just because they are scared of stuff they don’t know.


  • but we can agree on which of two implementations is shorter.

    Shortness for the sake of being short sounds like optimizing for the wrong metric. Code needs to be easy to read, but it’s more important that the code is easy to change and easy to test. Inline code and function calls are renowned to render code untestable, and introducing abstract classes and handles is a renowned technique to stub out dependencies.




  • Here’s another: most code reviews on larger companies are BS, just for show and nitpicking.

    Story time.

    Once I worked with a developer that just joined the company straight out of college, and had far more ambition than competency. That developer decided that code reviews where the venue where their high bar for code quality would shine, so they decided to nitpick everything that went against their poorly formed sense of taste. As luck would have it, the developer was assigned to a legacy project that was in cold storage for years and had no tests and linters, and was in a really poor state, and proceeded to leverage that to challenge each and every insignificant detail such as if a space should be at the left or at the right of a symbol. Each code review automatically received dozens of comments nitpicking whitespace changes. What a waste of time with so much noise.

    I drop by the project, and noticed the churn that developer alone forced upon everyone, as that team had a rule that all code reviews should be passed by all reviewers and that reviewer made it their point to reject reviews that didn’t complied to their opinion on whitespace. So the first thing I did was onboard a code formatter, and made it my point to subject the spec to an unanimous code review. That problematic developer made it their point to nitpick away each and every single setting, but it turned out some of their opinions conflicted with previous feedback.

    So the code formatter tool was onboarded onto the team. Did that stopped the problematic developer from continuing their nitpicking? No. Except this time around other developers started pushing back because the opinions were contradictory and contrasted with the official code formatting style.

    All it took was a couple of days for the problematic developer to go from dozens of comments per day to zero. The code formatter was still optional and not fully adopted, but the problematic developer simply ceased with the bickering.




  • HTML is bad. The language itself feels unintuitive and is clunky compared to modern markdown languages, and let’s be honest, your webpage just consists of nested <div> tags.

    My websites do not consist of nested divs. Your webpages might just consist of nested divs, but only if you are clueless about what you’re doing and are oblivious to basic stuff like accessibility support.

    CSS is bad. Who knew styling can be so unintuitive and unmanageable? Maybe it made sense 25 years ago, but now it’s just terrible. It’s very clunkily integrated with HTML too in my opinion.

    Being unmanageable is the output of the developer team, not the languages they use. Decoupling Presentation from the data and semantics never ceases to make sense. CSS has many issues but the way its integrated with HTML is certainly not one of them.

    Frankly, you sound like you blame your tools a lot.</div>