Better HN
topnewbestaskshowjobs
Log inSign up

simon_renoult

6 karma · joined Oct 11, 2013 (13y ago) · 7 submissions

Submissions

1.

Clean Code and Node.js(blog.octo.com ↗)

2 points · by simon_renoult · 8y ago · discuss

comment 10y ago · link · parent

I'm a nodejs developer. I use its package manager `npm` on a daily basis. `nodejs` packaging philosophy enforces you to break every lib into smaller modules in order to have small, consistent, easy to reason about, modules. While being a great philosophy, it requires developers to maintain many projects, thus owning many github repositories (often private when working for clients).

This is a great news for me.

comment 12y ago · link · parent

"require('./user/auth')(User);" is a simple call to the "./user/auth" module with User as a parameter. Check https://github.com/NodeBB/NodeBB/blob/master/src/user/auth.j...

comment 12y ago · link · parent

I didn't know HN was about success.

comment 12y ago · link · parent

Why using :

    function doFoo(bar) {
      bar = (bar !== undefined) ? bar : "default_value";
    }
Over :

    function doFoo(bar) {
      bar = bar || "default_value";
    }
Coercion avoidance ?

comment 13y ago · link · parent

Plus - sadly - expensive.