Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bccdee
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
36 ms
·
601.
▲
by
bccdee
2y ago
I agree that integrated tests tend to be brittle, but if we need database tests either way, the database harness can't be flaky. So any flakiness there is something that has to be fixed regardless. Slowness, I agree, but unless you
602.
▲
by
bccdee
2y ago
The point of mocking the database is to avoid the hassle of spinning up a database to test against. If we ignore that, why not test our use of the database? Are we disinterested in the schema and query errors we might catch? Unit testing
603.
▲
by
bccdee
2y ago
The difference between inheritance and composition as tools for code reuse is that, in composition, the interface across which the reused code is accessed is strictly defined and explicit. In inheritance it is weakly defined and implicit; s
604.
▲
by
bccdee
2y ago
Yeah I think that, though experienced programmers tend to understand what makes code good, they're often bad at expressing it, so they end up making simplified and misleading "rules" like SRP. Some rules are better than other
605.
▲
by
bccdee
2y ago
Yeah: "what if this code becomes tech debt later" applies to everything, not just comments. It's a tradeoff. The best thing you can do to avoid creating debt for later maintainers is to write code that's easy to delete,
606.
▲
by
bccdee
2y ago
But then could you trust it not to hallucinate functionality that doesn't exist? Seems as risky as out-of-date comments, if not more What I'd really like is an AI linter than noticed if you've changed some functionality refer
607.
▲
by
bccdee
2y ago
> The passage drdeca quoted explicitly denies you the space to treat Christianity as a "useful fiction" Yeah, I'm disagreeing with that passage. > [I]f Christ has not been raised, our preaching is useless and so is your
608.
▲
by
bccdee
2y ago
> If Christianity is not true, then it is false. It might be better to think of it as a potentially useful fiction. Our culture is full of those. Morality doesn't exist in any objective sense, which means "murder is wrong"
609.
▲
by
bccdee
2y ago
Yeah there are linters that force you not to implicitly discard errors, but that should really be a compiler error. Still, that's not a problem inherent to the Go's error-handling model.
610.
▲
by
bccdee
2y ago
When there's an exceptional case, it's better to handle that explicitly. I think Rust does that best with its single-character ? operator, but I don't want exceptions invisibly breaking out of control flow unless I give them
611.
▲
by
bccdee
2y ago
> some obligation to moderate it "some"? > The Act would also require me to scan images uploading for Child Sexual Abuse Material and other harmful content, it requires me to register as the responsible person for this and f
612.
▲
by
bccdee
2y ago
What I really like about protobuf is the DDL. Really clear schema evolution rules. Ironclad types. Protobuf moves its complexity into things like default zero values, which are irritating but readily apparent. With json, it's superfici
613.
▲
by
bccdee
2y ago
How confident are you in the correctness of that code? Because, one way or another, you're still going to need to become fluent enough in the problem domain & the API that you can fully review the implementation and make sure chatg
614.
▲
by
bccdee
2y ago
> It's provably true that LLM's can generate working code They produce mostly working code, often with odd design decisions that the bot can't fully justify. The difficult part of coding is cultivating a mental model of
615.
▲
by
bccdee
2y ago
It's usually not possible without a technical analysis, is my point. A throw-away prototype takes much longer to build and is much harder to review and discuss with stakeholders than a document. Like, how are you going to build a proto
616.
▲
by
bccdee
2y ago
Yeah 100%. I'm not going to make my product manager read a thousand lines of code just to get them to confirm all the assumptions I made about what they were asking for when I could just clarify.
617.
▲
by
bccdee
2y ago
Hard agree. I don't know if "design doc" is the right word—I call them technical analyses—but writing up a doc that connects business & product needs to implementation details is highly useful to get everyone on the same
618.
▲
by
bccdee
2y ago
You don't just want to run a process. You probably want to run several, across several different machines, such that they'll scale automatically in response to load, restart if they become unhealthy, load balance, failover acros
619.
▲
by
bccdee
2y ago
I think scale has less to do with how many customers you're serving and more to do with how much data you're processing. Streaming video to 10,000 people is much more data-intensive than exposing a CRUD interface to 1M. Also k8s i
620.
▲
by
bccdee
2y ago
A glass of lemonade is not inferior. It's a different thing entirely. You can compare good lemonade to bad lemonade, or good wine to bad wine, but asking a group of people who prefer lemonade to compare a glass of lemonade with a gla
621.
▲
by
bccdee
2y ago
The blind tasting studies prove that connoisseurs can't discern the price of wine by taste. They can tell whether or not they like it perfectly well. A good bottle, not an expensive one.
622.
▲
by
bccdee
2y ago
> I don't see how the authors are dishonest about it, or that the rebuttal refutes any of the actual claims made. Suppose I prepared a glass of lemonade and purchased a bottle of vintage wine—one held in high regard by connoisseurs.
623.
▲
by
bccdee
2y ago
Yeah, as you mentioned, token-sharing breaks this. I think any solution ultimately has to put the onus on the parents. And if the parents aren't responsible enough to pay attention to what their kid is doing online, then it's prob
624.
▲
by
bccdee
2y ago
I think that's the key thing. Social media bombards us with stimuli based on an algorithm optimizing for what will grab our attention best. It doesn't matter if it has value, or even if it can hold our attention, because there&#
625.
▲
by
bccdee
2y ago
At that point, what if parents just let their kids borrow their driver's licenses to use social media? There's no technical solution to bad parenting. The only reasonable solution that doesn't infringe on privacy is to give p
626.
▲
by
bccdee
2y ago
"Low expectations"? This article is about the specific language of literary allusion used to describe the solutions to competitions based on discerning subtly different incenses. Does that sound easy to you? I don't think you
627.
▲
by
bccdee
2y ago
> they make use of interfaces/protocols/traits Oh I very much agree, I love interface polymorphism. > "No Bottle", "One Bottle", [etc] are distinct things and should be represented accordingly I completel
628.
▲
by
bccdee
2y ago
> Inheritance is not a banned practice. Maybe it should be. Go and Rust do not provide implementation inheritance, and I think that's for the best. Few language features have led to so much spaghetti code. > It should just be you
629.
▲
by
bccdee
2y ago
I should clarify that the elaborate class hierarchy in the book is inheritance-based. When there's one bottle of beer on the wall, she instantiates `new BottleNumber1()`, which inherits from `BottleNumber` and overrides the method `con
630.
▲
by
bccdee
2y ago
> What I don’t get it is how you can be a programmer in the year twenty twenty-four and not be the tiniest bit curious about a technology that’s said to be fundamentally changing how we’ll program in the future. I'll grant you, it&#
More ›