Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jdlshore
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
601.
▲
by
jdlshore
4y ago
For that matter, what is the benefit of TBD for managers? It’s a development technique—specifically, a rebranding of continuous integration, because that name was coopted by tool vendors.
602.
▲
by
jdlshore
4y ago
The HN effect is overrated. I had two articles on the front page at the same time and never exceeded 1000 requests per minute. And very very few of those visits turn into repeat users. Edit: (The load was easily handled by a single Heroku
603.
▲
by
jdlshore
4y ago
Cookie AutoDelete is my go-to for deleting cookies.
604.
▲
by
jdlshore
4y ago
It’s a puff piece in a general interest magazine. It’s not going to go into details. I also got the impression that Carmack was being cagey about the directions where he saw potential.
605.
▲
by
jdlshore
4y ago
The lesson to be learned is that it’s less risky, not more, to understand that some ideas don’t work out and to have ways to identify failures quickly.
606.
▲
by
jdlshore
4y ago
Good question.
607.
▲
by
jdlshore
4y ago
Yeah, this is a classic canard, and I think it’s completely wrong, at least in software. “Build vs. buy” in software isn’t a question of the cost of building and maintaining it yourself vs. the cost of buying it from someone else. It’s the
608.
▲
by
jdlshore
4y ago
It "prompts" you to think about the API is probably a better way of putting it. That prompt is helpful.
609.
▲
by
jdlshore
4y ago
Microsoft. It came from Microsoft. https://www.jamesshore.com/v2/blog/2005/microsoft-gets-tdd-c... (Well, they popularized it.)
610.
▲
by
jdlshore
4y ago
There's no such thing as "two-step TDD." That's a cargo cult. Real TDD is red/green/refactor/repeat in very small steps, writing a handful of lines of code at each step.
611.
▲
by
jdlshore
4y ago
It's fairly straightforward: TDD is red/green/refactor, which means you're working in very small steps (about a minute or two each) and thinking about design during two out of three of those steps. During "red"
612.
▲
by
jdlshore
4y ago
I have a free video series here: https://www.jamesshore.com/v2/projects/lunch-and-learn In contrast to a lot of material out there, this spends comparatively little time on questions like "how do I test a fun
613.
▲
by
jdlshore
4y ago
> why plugging a keyboard into a keyboard port was considered such an inconvenience. USB was a BIG deal, and a big improvement. It wasn’t the keyboards, it was the printers, scanners, external hard drives, and Zip drives. Macs had someth
614.
▲
by
jdlshore
4y ago
Something doesn't smell right here. IANAL, but my understanding as someone who's read the entire text of the GDPR is that it regulates personally identifiable data, not cookies/local storage. The OP seems to be conflating the
615.
▲
by
jdlshore
4y ago
The bill doesn’t bind the state to any action. It’s just your run of the mill grandstanding—the political equivalent of clickbait. And it worked.
616.
▲
by
jdlshore
4y ago
The article concludes with “the state of the art is depressing,” but doesn’t mention any of the work of the XP/TDD community, which addresses the problems the author mentioned. I don’t think the state of the art is depressing at all; w
617.
▲
by
jdlshore
4y ago
I know what the dependency inversion principle is. I think there's some fundamental misunderstanding here, because dependency inversion is a design pattern, not a framework, and there's nothing about it that prevents you from usin
618.
▲
by
jdlshore
4y ago
Okay, I have nothing better to do this Sunday morning. Let's play with your example. We have a function A that uses B to send an email and C to store a notification in a database. We want to test that, when A fails, it calls B a few ti
619.
▲
by
jdlshore
4y ago
I don’t know what else to say, man. Maybe try it for yourself so you can see how it works? Mocks lead to solitary, interaction-based tests. My approach leads to sociable, state-based tests. These are polar opposite testing approaches, with
620.
▲
by
jdlshore
4y ago
Looks like we've reached max depth, but one last response for @ithkuil: > Another case where having real production code have parts of it that can be turned off is trunk based development leveraging feature flags. I've used Nu
621.
▲
by
jdlshore
4y ago
I mean, sure, if you program the output tracker incorrectly, it won't work. Not sure what else you expect. You're expected to have tests, of the output tracking code itself. They catch changes that breaks the output tracker, just
622.
▲
by
jdlshore
4y ago
Not being a spy. :-) It's an array that's populated by an event listener. CommandLine is the actual production code that writes to stdout and stderr (and reads command-line arguments). CommandLine.createNull() creates an instance
623.
▲
by
jdlshore
4y ago
I'm not sure what you're getting at. Look at the examples. They all use dependency injection. Maybe you meant dependency injection frameworks? That's not true either; it works exactly the same way as any other approach: the D
624.
▲
by
jdlshore
4y ago
Output tracking and spies are solving the same problem, but they do it in different ways. Spies record which methods are called. Output tracking records behavior that's otherwise invisible to callers (such as inserting something into a
625.
▲
by
jdlshore
4y ago
There's nothing difficult about the scenario you're describing at all. I don't have example code for that specific scenario, but I do have an example of the following scenario: A calls B, which calls an external service. B re
626.
▲
by
jdlshore
4y ago
Thanks! I'm glad you enjoyed it. The behavioral difference between Caching KeyValue Store and KeyValueStore is that it doesn't fetch from the underlying data source when called a second time. So that's what I would test. Give
627.
▲
by
jdlshore
4y ago
Author here. The way to test "does this code send 0, 1, or 500 emails" is the Output Tracking pattern: https://www.jamesshore.com/v2/projects/testing-without-mocks... Thanks for the wallet!
628.
▲
by
jdlshore
4y ago
Author here. What you’re describing is basically the same thing as sociable tests at the top of your system, which is part of what I'm recommending. You could stop there if you wanted. I like having narrow tests rather than broad tests
629.
▲
by
jdlshore
4y ago
It’s a concept piece. Gimmicks (or, more charitably, exploring out-there ideas) are the whole point.
630.
▲
by
jdlshore
4y ago
A lot of stories about building and wishing you had bought. I'm going to go the other direction. I have a story of buying something that was later scrapped and brought in-house. I started blogging in earnest in 2005. At the time, I tho
More ›