DEV Community

Chirill Ceban
Chirill Ceban

Posted on • Edited on • Originally published at bitkidd.dev

Over-engineering madness or hype-driven development in JS

Let's start with a question, how would you create a website that should just display a logo and some info?

If you have in mind something like Next.js, Nuxt.js, Svelte or any other framework, maybe with a little bit of CSS-in-JS or SASS, or maybe Redux, or even Angular, then you are definitely over-engineering.

I'm not saying that either of these tools are bad or you should not use it, I'd say that they are great, but only when used properly in a proper situation.

So what I am talking about?

Hype-driven development

JavaScript is one of the most popular programming languages in the world, #7 currently and this is awesome, you don't even need to install something special to work with it, just launch you favorite browser and you are good to go.

This tremendous accessibility allows millions of developers to start out their carier with it, we even have probably the biggest package registry in the world - NPM, with stunning 1.8 million packages, isn't it awesome? Sure, it is!

You can now use javascript literally everywhere, you can build backends, mobile apps, program micro-controllers and even launch something into the space. There are thousands of amazing libraries and packages in the eco-system, even more, companies that built some of the most popular tools truly fight for your attention.

And all of this brings us to a question, how to navigate and pick the right tool, how to choose wisely which framework is worth using and when to use it?

If you are a junior developer I bet you use something like React or Vue, Redux or Mobx, and it is not bad, but do you understand why you are using it? Or you followed the hype?

You may even find googling some 'amazing' packages like is-string with 20M downloads, or is-date-object with 21M downloads, or is-boolean-object with 17M downloads and my favorite is-odd with 400K downloads, and use it because so many people cannot be wrong.

Hype, is the problem, hype and github stars rule here, they create unnecessary FOMO feeling that is not a constructive one.

Hype leads to over-engineering when you pick a tool just because it is popular and has 50K, 100K, 200K stars on GitHub, or it was promoted by your favorite dev-blogger or a twitter thread.

Hope you got the idea.

Responsible development

The hype problem is a real one, I know I sound like an old fart, like I'm against new approaches and new ideas, not at all. I think that every tool has its use, but it becomes harder and harder to pick the right one for the job.

And the only real way to deal with it is responsible development, like responsible consumption, but development. A great example of this approach is Redux, that clearly states on the website: "You'll know when you need Flux/Redux. If you aren't sure if you need it, you don't need it.".

As per companies that build tools, they should take the responsability and clearly explain on when you may need their library or tech, like FaaS or edge-computing, on why you may not need it and what are the benefits or disadvantages.

Before using anything try to find a second opinion and try not to use a tool only because it is marketed well. When you use something that is popular right now, you may lead the company you work for to increased costs for development and support in the future. And the best way to check something new is to create a pet project.

I usually tend to run a mind exercise and ask myself several questions before using any library:

  1. Do I really understand it? Like really, if I feel it works like a magicbox, I will try to research and clear my gaps in knowledge.
  2. What are the benefits, disadvantages and consequences? This one stems from the first one.
  3. Will it make something better for me or for the company mid term, long term? Like speed of development, ease of support, ease of hiring other developers, costs and etc. etc.

Answers to these three question help me decide whenever I should use GraphQL for my personal blog or not or should I use a super hyped JAM-stack framework for a clients' project or just stick with something more reliable like AdonisJS, Laravel or Ruby on Rails.

Top comments (0)