Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
timoxley
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
1.
▲
by
timoxley
1mo ago
nobody saw this coming
2.
▲
by
timoxley
2mo ago
The obvious answer is rather than wipe, have a pin code that logs into a convincing and clean phone?
3.
▲
by
timoxley
3mo ago
I've recently switched off those to Cursor. More flexible tool, better interface.
4.
▲
by
timoxley
4mo ago
end user doesn't care, if it don't work it don't work
5.
▲
by
timoxley
1y ago
Great stuff. Feature requests: non-wp login, accents, Bar lines, support for non-4/4, swung meter, search by pattern (e.g. write a kick snare pattern, find beats with same kick snare pattern to e.g. find inspiration for hat patterns)
6.
▲
by
timoxley
2y ago
I feel like this indicates there's a market for traffic-spike insurance
7.
▲
by
timoxley
2y ago
Clbuttic is even the (Collins) dictionary-defined nomenclature for this effect: https://www.collinsdictionary.com/us/dictionary/english/clbu...
8.
▲
by
timoxley
3y ago
I have a similar story! Locked out of my car. Bikers park next to me. "You locked out? Hang on a moment" Goes into a Subway, comes back with a coat hanger. Less than a minute later the car is unlocked. "Wow you're pr
9.
▲
by
timoxley
8y ago
> the behavior has always been The ECMA spec only defines Javascript 1.3 and above. See this description for logical operators for Javascript 1.1: https://web.archive.org/web/20060318153542/wp.netscape.com/
10.
▲
by
timoxley
8y ago
> which might promote misunderstanding of the behavior This isn't a misunderstanding, binary logical operators in JS short-circuit like this by design. I believe && and || returned a boolean value in the past, but were expli
11.
▲
by
timoxley
8y ago
what are the downsides
12.
▲
by
timoxley
8y ago
The `err, result` function signature implies the function is an asynchronously executed node-style callback, which can never return anything anyway. Well, it can return something, but nothing internal reads it and there's no way for us
13.
▲
by
timoxley
8y ago
Post is referring to async programming in node's callback style (non-promise-based functions executed asynchronously) where return values cannot be captured even if you want to.
14.
▲
by
timoxley
8y ago
The `err, result` signature of the function indicates that it will be executed asynchronously, and thus the return value can't be captured by anything anyway.
15.
▲
by
timoxley
8y ago
The `err, results` params form the signature of a continuation-passing style "errback": function(err, results) { if (err) // … } It is assumed that this function will be executed asynchronously, and th
16.
▲
by
timoxley
8y ago
why
17.
▲
by
timoxley
8y ago
It depends. Short, dense code can make the code more difficult to understand/change later, while overly bloated code can have the same effect. I often find inelegant, yet straightforward solutions are generally better options than dens
18.
▲
by
timoxley
8y ago
> calls at the end can still fail and need handling… You can’t conveniently omit the mess that would be created for checking each of those. For the purposes of this post, it is assumed that any errors produced in those calls will automat
19.
▲
by
timoxley
8y ago
I'm trying to imagine worst case scenarios here, and at least in an environment like JavaScript, I'm struggling to see how a beginner being overeager with early returns can possibly create anywhere near the same degree of mess as
20.
▲
by
timoxley
8y ago
> ... makes case analysis easier ... > ...making the code look less complicated than it actually is... > I'd rather emphasize the underlying declarative intent, the state machines, and pre/post-conditions. These statement
21.
▲
by
timoxley
8y ago
If the return value is important: if (err) return void handleError(err) And in non-promise-based async JS, the return value is almost always lost/useless anyway so `return x` has no effect, might as well repurpose `return` fo
22.
▲
by
timoxley
8y ago
A big gotcha with `&&` as a guard in JS is that it can return any falsey typed value if you don't coerce the guard to a boolean. e.g. const check(cond) => cond && otherValue If `cond` is falsey, it returns
23.
▲
by
timoxley
8y ago
Yeah no hard rules, agreed on this point, especially when the if/else body is short.