DEV Community

Cover image for How to not make other developers hate your js code ?
Ali Al Khawaja
Ali Al Khawaja

Posted on

How to not make other developers hate your js code ?

Hello sad developers

This post is for me and for every new programmer learning JS
I want to share things I learn as a new developer learning this new jelly language called JavaScript .

honestly , I'm dragging myself into learning this language , I've read that best way to understand something is to explain what you understood out-loud , this is why I will start a new series of posts about learning JavaScript and maybe you should also give it a try and start posting

subject : How to organize your code ?

How to organize your code so it can be modified and upgraded easily so that the next developer doesn't hunt you down to take revenge

POV : The look of your office cat seeing you code without a design pattern .
guncat

We newbies know that we should use variables and functions and stuff to make an working app , but something is off , why does our code look like and L letter that is hundreds of underlines ,why is the cat angry ?

no , seriously

what's wrong , why does other people code look so much better and organized but ours don't , even though we built the same app !?

Turns out there is a concept called design patterns for JavaSript , it's not just oop like we thought

The most common are :

Objects and Object Constructors
Factory Functions and the Module Pattern
Classes
ES6 Modules

In the next post I will be explaining the Objects and Object Constructors , you can go ahead of me and learn about these topic , don't wait for me .

Top comments (0)