Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hbrn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
181.
▲
by
hbrn
4y ago
> If the code works in production it doesn't matter that the code is technically wrong. This is actually very insightful, but I'm afraid you won't be able to convince most people. The only valid metric of code correctness
182.
▲
by
hbrn
4y ago
Both of those became unicorns before rewriting. It is quite likely that they were able to grow so much precisely because they chose Python. Google emails prior to acquisition happen to confirm that.
183.
▲
by
hbrn
4y ago
> Unless you're writing 1990s Java consisting of factories of factories which is more to do with library style and over-conventionalism But I still see this happen more than 20 years later when brilliant ex-Java folks are doing Py
184.
▲
by
hbrn
4y ago
> typecheckers do find a lot of errors that would otherwise be runtime errors. This is a claim I see repeated over and over without much evidence to support it. In my experience type checkers find a lot of errors that would still be foun
185.
▲
by
hbrn
4y ago
I've seen typing go wrong more than once and I think it always follows the same dumb non-nuanced pattern: "typing is great, therefore we should do it everywhere!" Anyone following this approach is an idiot, it's like pre
186.
▲
by
hbrn
4y ago
Would it make more sense to look at it from progressive/conservative lens instead of left/right? One group thinks change is ultimately a good thing and will make changes for the sake of changes. Another one thinks change is ultima
187.
▲
by
hbrn
4y ago
Can you elaborate? What exactly is wrong with dicts?
188.
▲
by
hbrn
4y ago
You're absolutely right, last statement should be inverted. I think meant to say something else, but at this point I don't remember what it was.
189.
▲
by
hbrn
4y ago
You can definitely choose to interpret it that way, but you don't have to.
190.
▲
by
hbrn
4y ago
An interesting way to escape being reducible to your atomic parts is quantum consciousness. Not that I believe in it, I just find the theory too beautiful to ignore.
191.
▲
by
hbrn
4y ago
> ChatGPT has no idea what they're talking about. It lacks it's own thought and heuristic patterns, and only gives you the most-likely response to your prompt Funny thing is, same could be said about lots of people. Try listeni
192.
▲
by
hbrn
4y ago
Kind of. The language gets confusing because we use subset and superset next to each other, but we put different meaning on them. {foo: number, bar: string} as type is a subset of both {foo: number} and {bar: string}. It requires it
193.
▲
by
hbrn
4y ago
I tend to agree. Query builders are a "cool" solution looking for a problem. That said, dynamic query building example looks way better in knex than in slonik. Proposed approach has it's benefits, but the code is much harde
194.
▲
by
hbrn
4y ago
Being wrong alone means you had a flawed thought process. Being wrong in a crowd means you have no thought process at all. All the big companies doing layoffs are in the stagnation phase. "minimise disaster instead of maximising being
195.
▲
by
hbrn
4y ago
This is how you should think about it: Spec > Language > Code. Code is an instance of Language (and in structural typing land it can be compatible with multiple languages). Language is an instance (implementation) of Spec. > sine
196.
▲
by
hbrn
4y ago
I don't think you should blame Pichai for that. With or without him, Google was already going downhill. You can say he did not reverse course, but doing that means taking risks and I imagine investors of multi-billion dollar companies
197.
▲
by
hbrn
4y ago
Most people agree that if you want to build a successful business, first you have to build a few failed ones. Same thing applies to code: bad code is a required step before good code. Accepting this fact is very liberating. Quality of my
198.
▲
by
hbrn
4y ago
It's recursive in the context of "making sense of TS using set theory". If you understand sets, but not types, statements about "sets defined by types" are meaningless.
199.
▲
by
hbrn
4y ago
> object is more constrained because there are fewer properties which all members of the set are guaranteed to have. In my mind it's the opposite: object is less constrained, because there are fewer requirements you need to fulfill
200.
▲
by
hbrn
4y ago
> Sets defined by type vs sets defined by lists of properties, specs, rules etc. Recursive explanations are useless: "types are just sets defined by types". That's why we are trying to define them through other means. Also
201.
▲
by
hbrn
4y ago
Here are 3 statements that were made in this thread: - typescript is a superset of javascript - superset of objects can only have the same or fewer properties - Typescript contains all the rules of Javascript, and then adds some more Do y
202.
▲
by
hbrn
4y ago
Types are not features , they are constraints . "at least all the properties of A" means "all of the constraints of A and some more". Subtype of A is more narrow than A, even if it means that object of subtype A has
203.
▲
by
hbrn
4y ago
Yeah, that's how I think about testing in general. Tests should be a reflection of your specs. But if your specs are bad (most of them are), you should wait for them to improve. Not carve them in stone.
204.
▲
by
hbrn
4y ago
1. 90% of the time what happens during step 4 is realization that your tests are crap. So you have to throw them away and start from scratch. Tests are not helping with refactoring, they are inhibiting it. 2. Step 4 is indeed the most impor
205.
▲
by
hbrn
4y ago
> The dogma most people see or claim to see is that TDD is meant to be used everywhere And yet TDD preachers are never drawing the boundaries for TDD applicability. They are always extremely vague: "sometimes I see that TDD doesn&#x
206.
▲
by
hbrn
4y ago
TDD has several big issues that lead to bad design: 1. It assumes your spec is good and rigid. In reality, most specs are shitty and fluid. And your first understanding of spec is wrong. 2. It assumes your first implementation of the spec i
207.
▲
by
hbrn
4y ago
> How many were stopped by the Farm Bill alone? I'm not that versed in US governing. Which freedoms is Farm Bill taking away and how does that prevent famines? > if you're referring to the Holodomor, it was intentional It&#x
208.
▲
by
hbrn
4y ago
I mean, they were going to "take full responsibility" the next day. It's not easy, you know.
209.
▲
by
hbrn
4y ago
> And in the average case nothing happens On average , casino players lose a little bit of money. But with a gambler mindset , you lose everything. > If it becomes problematic, it's quite straightforward to reverse course. And
210.
▲
by
hbrn
4y ago
> most large corporates seem to suffer from very slow and very bad deciding making processes I think that's an accepted fact of life. I don't expect big companies to be fast and make good decisions. But I do expect people not t
More ›