Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jcparkyn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
211.
▲
by
jcparkyn
4y ago
There's a fairly big difference between: a) "most of the time" being 60% (very roughly what I'd expect when doing renaming beyond a single function in JS, and that's being optimistic). b) "most of the time"
212.
▲
by
jcparkyn
4y ago
Having a live preview of the diff before any changes were applied (like vscode and most editors do when using find/replace) would make this a lot more useful.
213.
▲
by
jcparkyn
4y ago
As a slight counterpoint to that scenario, the front-end can often just get away with just checking whether the data exists in the response, rather than checking roles. This isn't quite as simple as the SSR alternative, but it at least
214.
▲
by
jcparkyn
4y ago
I would guess that it's to do with the fact that musicians generally use the key with fewer sharps/flats. E.g., Bb major (2 flats) instead of A# major (5 sharps). This also follows what's on the circle of fifths, where major
215.
▲
by
jcparkyn
4y ago
I agree. If your reduce requires mutation, then you almost certainly shouldn't be using reduce.
216.
▲
by
jcparkyn
4y ago
I'm a big TS fan, but for that type of person I feel like JSDoc + checkjs would suit them better. That way they don't have to deal with the hassle of making TS work with the rest of their tolling and build process.
217.
▲
by
jcparkyn
4y ago
Personally, I find that I don't really need full type checking on every build. For most small changes, the errors shown in vscode are sufficient while editing, and then full type checking can be run occasionally when needed (and in CI
218.
▲
by
jcparkyn
4y ago
I'm no FP expert, but I would call that partial application and not currying.
219.
▲
by
jcparkyn
4y ago
> React I totally agree there are other good/better options (as evidenced by react and many others), but I don't think this is an entirely fair comparison. The main "DI" alternatives in React are hooks, context, and i
220.
▲
by
jcparkyn
4y ago
You still have to construct and pass in that dependency though, along with all of its dependencies, recursively.
221.
▲
by
jcparkyn
4y ago
Because in typical back-end software, the dependency tree can get very big very fast. Having an IoC container means devs only have to declare direct dependencies for each service, rather than constructing the entire tree (and figure out the
222.
▲
by
jcparkyn
4y ago
How do you do that when you have multiple teams working on separate FEs, which all need to talk to the same BE?
223.
▲
by
jcparkyn
4y ago
But this is only a problem if one client _needs_ all that data at once, and another client doesn't. Otherwise you would just never return the referenced data (which isn't the type of overfetching the article is talking about).
224.
▲
by
jcparkyn
4y ago
The problem with that is that eventually you want to have the dependencies automatically injected (like how an IoC container would be used in a typical OOP application). Sure, there's solutions for this in the FP world, but in my exper
225.
▲
by
jcparkyn
4y ago
Complete speculation, but I would guess that in many cases the company/organisation running the conference would want lots of people to come (e.g. for marketing or hiring purposes), even if they could increase total ticket revenue by r
226.
▲
by
jcparkyn
4y ago
Seriously? Why would I do 6 operations (select, copy, open notepad, paste, select, copy) when I could just do one? The only argument I can see for this is if you already have JS disabled.
227.
▲
by
jcparkyn
4y ago
I'm also a bit confused by that. Websites can already do just as many malicious things when you interact anywhere else with JS enabled, so I don't see the security argument. They can also quite trivially insert invisible text if t
228.
▲
by
jcparkyn
4y ago
This isn't really what you're asking for, but since no-one else has mentioned it, the call hierarchy feature built into most IDEs gets about 50% of the way there. The obvious limitations are that this usually only works for one fu
229.
▲
by
jcparkyn
4y ago
No, I'm just saying the libraries in those languages tend to be designed differently, to accommodate the more limited type systems (but I don't use C++, so I'm sure templates can do a lot of things I'm not aware of). I&#
230.
▲
by
jcparkyn
4y ago
It's a reference to a meme, which is intentionally nonsense.
231.
▲
by
jcparkyn
4y ago
> You shouldn't need type manipulation because you shouldn't be leaning heavily on variable mutation What does type manipulation have to do with variable mutation? The main examples in the OP were of redux and related libraries
232.
▲
by
jcparkyn
4y ago
> Why are your types so complex? The article (and ensuing discussion) are about _library_ code, which necessarily has types that are orders of magnitude more complex than application code (source: see some of the links in the article).
233.
▲
by
jcparkyn
4y ago
You've both missed the point of the article. The author isn't saying TS (or typed languages in general) are bad, just that the tooling and documentation for _library authors_ could be better. The things the author talks about aren
234.
▲
by
jcparkyn
4y ago
> Align those two cycles I'd say that the best solution would be to just rename 12 to 0, which is what it already should have been IMO, regardless of am/pm. I've noticed some digital watches use 0:00AM instead of 12:00AM,
235.
▲
by
jcparkyn
4y ago
It sounds like you're saying their total after-tax income would decrease if they worked more hours? I'm not sure how, because that's definitely not how income tax works (Italian or otherwise).
236.
▲
by
jcparkyn
4y ago
Token bucket rate limiting for your fingers
237.
▲
by
jcparkyn
4y ago
I'd recommend avoiding Economics Explained. A lot of his takes aren't very well researched and don't align with "mainstream" econ (not that I'm an expert on the subject). https://www.reddit.com/
238.
▲
by
jcparkyn
4y ago
No, they presumably meant to write "structural" because nominal is the opposite.
239.
▲
by
jcparkyn
4y ago
Have you tried LyX? It doesn't have all the advantages of plaintext and it's still easy to get distracted, but I find it's quite good at getting out of your way when you're not too worried about specific formatting, and
240.
▲
by
jcparkyn
4y ago
> LaTeX > Remove the ability to distract yourself I don't think I've ever been more distracted from writing than when I use LaTeX...
More ›