• 0 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle


  • Yeah but javascript has 473 popular frameworks and counting, and the churn is immense. Your codebase becomes out of date before you’ve finished writing it.

    That’s not really the case anymore, it was back at around 2015 for a few years when nodejs blew up and we realized that JS is capable of much more than we initially thought.

    We threw a thousand different things to the wall and a few frameworks stuck. Today the ecosystem is pretty stable, especially of you choose a popular framework like React or Angular.


  • Writing self documenting code reduces the need for comments significantly, but you’ll still need to write docs and even code comments when needed.

    I had a lead architect at one of my previous workplaces who outright forbid writing comments, otherwise the build would fail. That lead to convoluted and slow solutions in order to make the code readable, or just parts that nobody wanted to touch because nobody understood them.

    My point is that you should strive towards self documenting code as much as it makes sense, but don’t take it to mean that you should never write comments.

    People should be able to tell what your code does without going deep into implementation details but that’s not always possible, especially if you’re working with lower level languages with fewer abstractions, or projects with complex algorithms or architecture.


  • I was working on a hobby project where I used a niche framework in a somewhat uncommon way. I was stuck on a concept that I think the documentation didn’t explain well enough, at least for me, and I couldn’t find any resource on it aside from the docs.

    I asked Bing to write a piece of code that does what I wanted and explain each line. It was perfectly working and the explanation was also understandable. All it did was search for its official documentation. It really blew my mind.