173 points · by aaronbrethorst · 11y ago · 72 comments
This tool stack makes me want to knock my teeth out.
That WebStorm's debugger (with break points!) works at all is a marvel. Props to the JetBrains team.
And every difficult to debug bug hasn't been related to knowing which functions are in the stack, but are instead related to figuring out why frameworks do something or race conditions and so on.
I just find it surprising that people are having problems with anonymous functions in stack traces, when I've never seen that.
As someone just delving into Node from another platform what're "proper best practices"-based JS patterns?
For example: if(objects.find(object => object.id === id)) {}
You can have lambdas that are also named, e.g:
if(objects.find(function idCheck(object){ return object.id === id})
Not sure if it's possible with the new ES6 syntax [Edit: apparently it's not, although arrow functions will automatically be assigned a name in some common scenarios].
It's telling that, while you do often see Javascript (not JScript, which is a Microsoft product and quite obsolete) developers pull some crazy nonsense with deeply nested lambdas, you almost never see Javascript developers do that in an environment that requires peer code review.
I've come across many JavaScript devs casually using and advising interns, etc to use anon functions to avoid cluttering code. It was almost preached as a design pattern. I was taken aback (as a back-end dev), but given the crazy stuff most JS devs did I just shrugged it is one of the platforms' quirks.
Some complaints I see about Python's weak lambda have a similar undercurrent.
https://facebook.github.io/react/docs/reusable-components.ht...
Signed: someone who occasionally has to maintain a massive CoffeeScript clusterfuck. If you want to be trendy that bad, buy a turtleneck. Don't use CoffeeScript.
let func = () => {};Every time I try to go to it I get a "Web page unavailable" despite sites like downforeveryoneorjustme.com telling me it is not down.
Not sure if its just my laptop as I am abroad at the moment in Italy and have no other computer to check the site.
Here is the basic checklist for something like this:
check your hosts file ping the website tracert the website clear dns cache check dns server up/down temporarily disable av/firewall
If all the above indicate normal operation but it still fails, it could be blocked anywhere upstream of you.