TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lug-Nut Driven Development

17 pointsby belisarius222about 9 years ago

2 comments

hcarvalhoalvesabout 9 years ago
&gt; Build the whole thing badly.<p>It doesn&#x27;t have necessarily to be <i>poorly</i> written code though - you can start with lots of constant functions and later replace with actual logic, and still, at each iteration you&#x27;ll have a complete testable flow.<p>Some test frameworks like Clojure&#x27;s midje [1] and Python&#x27;s mock [2] help a lot with this by making mocking functions inside the test painless, so you can start with what you wish you had and then fill the blanks.<p>I believe someone on the internet named this &quot;Wishful Thinking Driven Development&quot;, quite ingenious.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;marick&#x2F;Midje" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;marick&#x2F;Midje</a><p>[2] <a href="https:&#x2F;&#x2F;docs.python.org&#x2F;dev&#x2F;library&#x2F;unittest.mock.html#the-patchers" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;dev&#x2F;library&#x2F;unittest.mock.html#the-p...</a>
superswordfishabout 9 years ago
This is a scattershot of some good practices, most unrelated to the title. But on that topic,<p>&gt; Think of changing a tire: you screw in the lug nuts loosely first, in a star pattern. Once you have all the lug nuts in loosely, you tighten them a little bit at a time, going around in that star pattern, until they’re all tight.<p>It just doesn&#x27;t work this way, the bad code stays there. I&#x27;d be a little concerned to take over software you wrote, because that tightening plan lives in your head and the issues are global, not local to some module.<p>You (author) are on the right track though, it&#x27;s a good idea to have a reflex against perfectionism.
评论 #11309379 未加载