Hacker News new | ask | show | jobs
by frankfrank13 500 days ago
It is interesting to basically critique a series of blog posts like its a film.

But re: design vs. increment, I do think incremental TDD is pretty useful in domains where you have low confidence that you could come up with a good design. If you asked me to implement an LLM today, 0% I could design a good one. But given enough time I could slowly start to implement one (maybe?).

The two quotes that got me are

Jeffries:

> So I try to make small decisions, simple decisions, decisions that will be easy to change when, not if, a better idea comes along.

Norvig, about Jeffries:

> He didn't know that so he was sort of blundering in the dark even though all his code "worked" because he had all these test cases.

I fear someone could say this about me, about almost everything I've ever built. I guess something like "I just kept crawling and it just kept working!"

2 comments

The way I think of this is that there is no shame in Jeffries not having as good and intuitive grasp of the problem as Norvig. After all, this kind of problem is almost tailor-made for Norvig's skill set. Like many of us who haven't done a lot of work in this space would do, Jeffries spends a lot of time early on just exploring the problem space. He starts with a seemingly intuitive (naive?) data structure and goes from there. So far so good. No shame in any of that. All of us have been in a similar situation. I think that the key moment comes at blog post number 12. As the author of this post describes, this is where Jeffries basically recognizes that his approach needs to radically change and where a lot of people would throw away what they have, it having served the function of helping one understand the problem, and start from scratch with different assumptions, data structures, etc. Jeffries didn't do that, probably because he firmly believes in the TDD dogma and probably because he felt pressured to make this work, since he way publicly working through this. That's where Jeffries goes wrong. He should probably have admitted that in some cases you should just start from scratch instead of tinkering at the edges of something that's clearly suboptimal.
I do something similar where even for something substantial, I'll start out with "what's the simplest thing that might work".

Of course with past experience, my first 'simple' thought is usually quite practical or sensible. In the same way it's hard to invent an inefficient algorithm that does no useless busywork--we've wired our brains toward good.