Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jonahx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
34 ms
·
511.
▲
by
jonahx
3y ago
Ha, I started writing my reply before seeing yours, and suggested almost the same thing.
512.
▲
by
jonahx
3y ago
Some important context re: my style... > Any code anywhere in the function can mutate any of the variables Regardless of the language I'm using, I never mutate values. Counters in loops or some other hyper-local variables (for perf
513.
▲
by
jonahx
3y ago
> What about for testing? For "use-case" code like this with many steps, you are typically testing how things wire together, and so will either be injecting mocks to unit test, in which case it is not a problem, or wanting to i
514.
▲
by
jonahx
3y ago
Hard agree. And I used to belong to the other camp. The basic tension here is between locality [0], on the one hand, and the desire to clearly show the high-level "table of contents" view on the other. Locality is more important
515.
▲
by
jonahx
3y ago
> you just cancel their credit card (and of course stop using the service). IANAL, but I have always heard that when you do this you have not broken the legal contract obligating your payment. In practice, especially for modestly priced
516.
▲
by
jonahx
3y ago
> Eventually is a tradeoff between the amount of time you invest in making the system comprehensible and the amount of time saved in debugging. Well said. > But that's only after you've thrown down table stakes (unit tests,
517.
▲
by
jonahx
3y ago
I didn't think it was bad but there were some points of confusion that could be improved: 1. "Your style, our editor" Wait is this an editor or a command line tool? I was able to figure it out but the word "editor&qu
518.
▲
by
jonahx
3y ago
First thing I thought of too. For those who don't know, Raskin proposes an alternative the reigning windows and folders paradigm, in which your entire OS is a single sheet, a kind of landscape in which you can zoom out to a map view or
519.
▲
by
jonahx
3y ago
Well said. > Using a big brush here, but webdev has a LOT of this “just throw tons of libs at it and hope for the best.” My experience matches this. And not only that, many of them will passionately argue in favor of this approach, unde
520.
▲
by
jonahx
3y ago
> I wonder what the algorithm behind it is. Noted in the details section of the link you provided: "Primality testing on numbers larger than (2^31) uses the probabilistic Miller-Rabin algorithm."
521.
▲
by
jonahx
3y ago
> Option 1 can be done by one sensible person with intermediate PHP/Python knowledge, and maintained fairly easily and cheaply forever. This a vast underestimate of the amount of knowledge it takes to do 1. well, for a project of an
522.
▲
by
jonahx
3y ago
The article is talking implementation complexity. Say a client asks for features A, B, C, D which reach the bar of complexity where someone from HN has to get involved. Now two things can happen, and in both cases the same feature set is d
523.
▲
by
jonahx
3y ago
If you construe "violence" broadly enough, then yes, this is true. But a broad interpretation misses most of the nuance that matters in practice. If you conceive of state violence instead as something like "the probability th
524.
▲
by
jonahx
3y ago
I appreciate you taking the time to answer, but honestly the boilerplate is just a killer. I don't care about the additional flexibility when the code is so much harder to make sense of, and this is just a toy example.
525.
▲
by
jonahx
3y ago
Agree with your take. > A hybrid approach is necessary. This is "the islands" approach, as advocated by Astro, for example: https://docs.astro.build/en/concepts/islands/ This approach is consiste
526.
▲
by
jonahx
3y ago
> This is called gatekeeping and it’s not helpful. What a bad faith interpretation. It's advice based on the poster's experience, stated with both qualification and good humor. You are free to ignore it. I appreciated it.
527.
▲
by
jonahx
3y ago
Author is arguing for the opposite. You'll see down below a case for inlining functions that are only used once, and the quote "As for one liners that are called only once, just inline them. The small functions guy can take a hike
528.
▲
by
jonahx
3y ago
I think this is an excellent summary and I agree with all of it. > Go has chosen a dualistic perspective, like with the particle/wave dualism in physics. This summarizes my complaint. It's not consistent. It forces me to swit
529.
▲
by
jonahx
3y ago
> Would you please explain the difference between the two cases? Absolutely! You'll notice my complaint about the BPY article is not about its griping over semantically incorrect uses of buttons -- I'm fine with that! My compl
530.
▲
by
jonahx
3y ago
Here's some example C using one: bytesRead = read(fd, buf, BUF_SIZE - 1) You read the from the file descriptor into the buffer. Just like in Go you read from a file into a byte array. Neither the file descriptor nor the file
531.
▲
by
jonahx
3y ago
> And an ebook reader Your ebook reader it the thing being read, not the thing that reads. Glasses for reading are also called readers, and they are the tool helping you read. Here, to your point, we see "language being complicate
532.
▲
by
jonahx
3y ago
> Consider now you send a physical letter to me? You use a mail carrier. You have my address, but sending is through the carrier. Same for calls, you use a service provider to make the call. We perform some actions with tools, but not al
533.
▲
by
jonahx
3y ago
Typically you are reading from a file, or the network. someFile.read(dest) network.read(dest) I'm reading from a file or network in both cases. You can say you're using "the reader" to read, but as I said
534.
▲
by
jonahx
3y ago
See my reply here for the problems with that: https://news.ycombinator.com/item?id=36926392 EDIT: To elaborate my reply there tailored to your lawn mower example... > What mows a lawn? A person, or machinery? Yes, in thi
535.
▲
by
jonahx
3y ago
I don't buy the politically laden, existentially fraught spin being sold here.... "Users have to accept the spelled out mantra and change their attitude before accessing the next piece of information." "The user shoul
536.
▲
by
jonahx
3y ago
> Works if you consider the reader is what you use to do the reading. You have a source you want to read, so you get a reader that can do that. This strains ordinary language imo: Say you have a "log" which implements the Reade
537.
▲
by
jonahx
3y ago
You could, but this is not Go's convention. Go's convention is that when you have an interface with a single method "x", you name the interface "xer". This has the advantage of being simple and mnemonic. It h
538.
▲
by
jonahx
3y ago
Slightly OT: I like Go, but the "-er" convention, while useful, has always bothered me because of the following inconsistency, well illustrated by two examples from the article: Writers write. Readers read. type Rea
539.
▲
by
jonahx
3y ago
> but the flamboyant way it was done scared the crap out of people who were both clueless and in a position to do stupid things. As a result we got the CFAA and the DMCA which are both some of the most ridiculous pieces of legislation af
540.
▲
by
jonahx
3y ago
Your general point is a good one but I don't think irregular verbs are the best example of error correcting redundancy, or evolved shortcutting. In most cases they are just a relic of genealogy, and don't serve those purposes: &g
More ›