There seems to be a lack of url handling modules in npm, so might possibly be writing and publishing one. This will be used further to handle in iOS and web both.
So, us backend interns went off for lunch, and two amongst us were interested in drinks. The things that occured there caused me to think, what is worse: faking you enjoy the company of others, or going on your own, alone ?
To bind, or not to bind -that is the question
My current task required to pass a function as parameter. Now, if my function is callable, everything’s fine. But what about when it’s using
this ? I will have to bind this to the current function. But when should one not bind ? For callable functions. Rule of thumb, assume function passed as parameter is made callable, and when passing down parameter, check if function needs to use
this. If it does, use bind, else not.
So there’s this module ‘url’ on npm, which fails in a lot of cases, ex:
http://google.com/path, and etc. So we’ve decided to implement from scratch to parse urls. I would vote for calling it
simpleurl, because Keep it simple, stupid!.
Share onTwitter Facebook Google+ LinkedIn
Leave a Comment
My experience with Elementary OS
Resolving cyclic dependency in models: Pass it down as an argument for a specific function. Model... ...
Explaining REST calls, avoiding Google tracking
Check git punchcard later. ...
How to find the current shell that you’re working in ? ...