“The most damaging phrase in the language is ‘We’ve always done it this way’.” — Rear Admiral Grace Murray Hopper
Are you working on a project that needs more calculations than you can handle? MathJS is the library for you! From rounding numbers to chaining multiple mathematical operations, it can make your loops and conditionals look like useless expressions. With simple functions, your code will look more beautiful than never!
Do you like working with native objects, such as Arrays? Well, then Sugar will help you work with them. You can get the first and last element from an Array, or even get the average of a number Array. By using simple functions, you can delete all of those multiple lines of code you currently have and do everything within one line!
I don’t really need to tell if this is for you or not, right? If you are lazy, go ahead and install Lazy. Just think about the huge functions that are present in your code, do you like them? Of course not! With this library, you can create an infinite Fibonacci sequence with 8 lines of code, or maybe you want to generate 300 random numbers from 1to 1000 with 4 lines of code?
Bracket Pair Colorizer 2
I’m sure you are already using ESLint to improve your code, but are you still typing
. ? If you are, then stop it already and install this extension! It will simply tell you when you are making a mistake, based on the rules you implemented. This is awesome, because it allows you to actually learn about what you are doing wrong while you are doing it, and not only at the end.
Imagine a world where you call a function to sum to numbers and the result magically appears beside the function call. This extension does that exactly, it just shows you what will happen when you run your code! Lose no more time debugging something you implemented ages ago!
Are you worried that your code is too complex but you leave refactoring for later? This extension just won’t let you get away so easily, it will show you the complexity of your functions after you finish typing them! Also, they will leave a very ‘nice’ message for you when giving you feedback.
As I always say in my articles:
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live” — John F. Woods
You won’t become a super code writer after using these packages and extensions, but they will help you enough. Not only that, but these resources will also teach you how to write better code, especially the ESLint one.
If you liked this article, make sure to:
Create your free account to unlock your custom reading experience.