You Might Not Need Underscore


Node and npm without sudo

Node.js Foundation

Modernizing Node.js with idiomatic JavaScript – Node.js Collection – Medium

Asynchronous PHP: Why?

200 universities just launched 600 free online courses.

Free Online HTML Classes - Find the Best Free Online HTML Classes for Programmers

Travis Bradberry

Science Says These Five Things Prove You're Smart

Study Reveals That Material Goods Don't Bring Happiness

Web 2.0 on Flipboard

Noman Ur Rehman

Working with JSON in MySQL

Ian Johnson

The Hitchhiker’s Guide to d3.js

Better Form Design: One Thing Per Page!

Sailing With Sails.js: An MVC-style Framework For Node.js – Smashing Magazine

What Everyone Should Know About The Process Behind App Design...

Why Laravel Development Is Popular Php Frameworks

You Might Not Need Underscore

Laurence Bradford

8 Tech Tools To Communicate Your Ideas More Effectively

5 predictions for artificial intelligence for for the coming year

Jose Aguinaga

How it feels to learn JavaScript in 2016

Adding and Leveraging a CDN on Your Website

5 Secret Hacks for More Powerful Web Designs

Philleep Florence

Get the next record in a SQL table!

Getting More with LESS! - Mixins!

Code Snippets - Get DOM Element Content

A New Year, A New Site

PhilleepEdit Webmaster

Philleep Florence Bug Tracker and Project Management has moved!

Code Snippets - HandleBars.js Helpers - ONE

2018-02-18 : 01:28

During past years utility libraries like Underscore and lodash have found their way into the toolchain of many JavaScript programmers. While those utility libraries might make the code easier for you to write, they don’t necessarily make the code simpler or easier to understand. People reading and maintaining the code are obliged to, in addition to knowing the language and its standard library, also know the utility library it’s using. Libraries come and go, and everyone has their own favorite. What’s the order of arguments for this map() function? Which library was it from again? Underscore (the perennial favorite), lodash (its speedy and versatile younger brother), Ramda (the more functional cousin that got the argument order right), or whichever cool abstraction you found today? If you’re a team, whose favorite library should you choose? How about choosing the standard library?

When you write simple code that uses the standard library functions, you are making it easier for the future user and maintainer (who might as well be you) to understand. Yes, it might be more characters to type, but since when is writing speed the bottleneck in writing good, maintainable software?

It’s much easier to recover from no abstraction than the wrong abstraction. —Sebastian Markbåge

It’s a lot easier to refactor verbose code with few abstractions than concise code with the wrong abstractions. When you start seeing patterns in your code repeated over and over, it’s time to abstract, but now you can tell what is the right abstraction and it’s more likely you end up with something that is worth the additional overhead every abstraction adds.

JavaScript is evolving and new ES2015 and ES2016 editions (previously known as ES6 and ES7, respectively) pack a bunch of new features and Babel makes it very easy to use of them today. These features make some previously essential functions from utility libraries obsolete.

Good resources for learning those new features include the Learn ES2015 page on Babel website and Understanding ECMAScript 6 book by Nicholas C. Zakas. Learning to fully utilize the language of the Web gives you a transferable skill. JavaScript is likely to stick around much longer than the utility library of the day.

This is not to say there is no a place for any utility library or function installed from npm anymore. It’s just that many utility functions that were almost essential in order to be productive when we were writing ES3 are not needed anymore and today you might be better off just using plain JavaScript to do those tasks.

You might not need Underscore…
Philleep Florence LLC

This unknown unknown does not support some features required to view Philleep Florence LLC. Please download a newer unknown Browser.

Philleep Florence LLC
Philleep Florence LLC
Image Preview