News for hackers. Stuff that matters.
Re:How to Think in Writing by kazinator on Sunday July 07, 2024 @12:25AM (#40895261)
If your brain has a blind spot, stop writing English and write code, with test cases that hit all corner cases.
Re:How to Think in Writing by BeetleB on Sunday July 07, 2024 @12:40AM (#40895312)
By the very definition, if your brain has a blind spot it'll not think of all the corner cases to test. That's why we do code reviews.
Re:How to Think in Writing by kazinator on Sunday July 07, 2024 @02:12AM (#40895621)
The code will reveal the corner cases to you; you will think of things you didn't think of before writing the code.

Before you write the code, your ideas may be so poor that they don't even hit the happy cases when you try to code them. You go "Oh, what was I thinking; it's obvious now that it could never work that way ..."

Of course, it's coding we are talking about; there will be bugs. Fewer than in some wishful prose, though.

Re:How to Think in Writing by BeetleB on Sunday July 07, 2024 @02:43AM (#40895736)
Ah, I see your point now.

Sure, writing code will help you understand the problem better, and may let you see more corner cases. But not all (which was my point).

Re:How to Think in Writing by mistermann on Sunday July 07, 2024 @11:41AM (#40898410)
> The code will reveal the corner cases to you; you will think of things you didn't think of before writing the code.

The step of putting propositions into a proper form such that tests can be written against them is arguably half the benefit.

https://en.m.wikipedia.org/wiki/Well-formed_formula