Never knew about this one! Quite funny actually and I'm curious why that happens. I suppose because `0.0000001` is represented as an exponent rather than a decimal? Although I haven't seen `parseInt` used since 2015, you should use `Number`.
> "" + 5 == "5"
> "" - 5 = -5
iirc
`+` operator:
- If LHS is a string, concatenate
- Otherwise, cast to Number and perform arithmetic.
`-` operator:
- Perform arithmetic.
All of these are explainable, and never catch anybody competent out in practice. And, since TypeScript is the norm in a lot of places now, it's never an issue.
parseInt wants a string. If the input isn't a string, it calls toString. 0.0000001.toString() gives "1e-7". parseInt takes the first number it seems in a string, so 1 in this case, or like parseInt("123asdfasdf") gives 123.
All of these are cause JS builtins like to auto-cast things. + only accepts strings or numbers, - only accepts numbers. Really these should be errors instead, but it's also not very surprising or annoying once you know this. Basically, don't perform arithmetic on things that aren't numbers.
The name parseInt suggests it takes a string. Especially "" - 5, why?
What about the fact that there isn't a single 'parseInt' function in JS that can reliably only convert number strings to numbers?
They each have different quirks (some will parse 'a123' as 123, others will handle scientific notation etc). The only reliable way of doing this is doing a regex followed by parseInt... which is definitely a footgun IMO.
Unary "+" returns NaN for strings that don't contain exactly a number (except for empty string which standard type conversion turns into 0). It even works for scientific notation like +'1e3' === 1000.
A lot of them are also about nulls and == vs ===, which are weird, but they're weird in many langs. Like Python has the whole == vs `is`. You just learn the convention and use it. Same with typecasts.
For most people, I'd reckon they are never at work.
There is a reason we know that remote learning is horrible for most people compared to in-classroom. We proved this decisively during COVID.
There is zero reason to believe that most folks magically change overnight from being incapable of remote learning to being highly capable remote workers. It's just not believable.
I hired remote workers in the 90's. It was a small fraction of the total candidate base that could successfully self-motivate and have the discipline to become high performers in such an environment over the long haul. Most of my interviewing and candidate vetting had to do with the remote aspect vs. technical skillset. Luckily around that time is when open source became a huge thing, so those projects presented a pool of pre-vetted candidates to hire out of. The rest of the candidate pool was a total crapshoot.
Remote working has become easier and the tooling and technology much better. But from where I'm standing - many folks do not take it seriously. Simple stuff like having backup Internet is a filtering question for me even today.
“Simple stuff like having backup Internet” that sounds expensive. Who has room to back up the entire Internet?
Personally on the 0.2 days a year I have to worry about it, I just head to the coffee shop. Or you know … take a couple hours off (shock!).
Also I’ve spent literally decades working with very highly productive people exclusively remotely. None of us find this odd. Not sure why you have that level of suspicion/distrust. Granted, things have changed a lot since the 90s.
Funny, I'd actually noticed that this font was knocking around in various places, particularly in American media, without giving it too much conscious thought. Although I had decided that I liked it. It's very 60s, mechanical, tactile, and almost cute in its ignorance of typography rules that would come to be unquestionable. It's nice to put a name to the font.
I think my ad blocker was the problem. Disabling it didn't turn it into the fastest website in the world—the images loaded in about 15 seconds—but that was a lot better than the never loading I was getting before disabling it.
> a Pareto front represents the set of solutions where no solution outperforms any other solution in the set at every objective
I do not believe you are correct when you say
> something that better, cheaper, and faster, or even pretty close to the best on two of those and clearly better on the other. It's a Pareto point.
Since that would outperform on every objective
GP's point that it's prioritisation does not seem incorrect to me. Prioritisation involves considering trade-offs of various approaches and deciding which aspects & attributes to optimise for, at the expense of others.
When I read a title it helps me to determine whether I want to read it or not. This one is tricky and confusing because the company name is stupid and was probably picked for the clickbait potential. This is absolutely one where I read the comments before the link.
reply