Estimate sample size, good software, and lines of code
We learn how to estimate sample size from an intuitive idea of effect size, we learn how to write good software, and we measure software complexity in lines of code.
I hope your week is going well!
New articles
The Sample Size Curve
When writing another article, I discovered that the coefficient of determination (a.k.a. correlation-squared) is a rather neat way to think of effect size. And this gives us a curve with which to estimate what sample size we need to show effects of particular size, should they exist.
Full article (1-3 minute read): The Sample Size Curve
Practices of Reliable Software Design
Eight points for good software construction. A draft of this article leaked and made the rounds and some of you have found this newsletter through that, but it could still be worth refreshing! (To be clear, I don't mind drafts leaking. It often gives me very good feedback on what works and what does not.)
Full article (4-12 minute read): Practices of Reliable Software Design
Flashcard of the week
As much as we love to hate using "lines of code" as a measure of anything, it still is the best measure we have of software complexity. All the other complexity metrics correlate so strongly with lines-of-code that we might as well just talk about lines-of-code.
From this perspective, it's useful to have some points of reference for what level of complexity corresponds to various types of software.
How many lines of code was the original Doom?
If it helps you guess, Wolfenstein 3-D was about 30,000 lines of code. The curl command is about 150,000 lines of code – but remember that curl speaks a lot of protocols.
Doom was 40,000 lines of code.
This means the complexity difference between Wolfenstein 3-D and Doom is 10,000 lines of code.
In my experience, a team of a handful of developers usually end up with about 100,000 lines of code to maintain after a few years. This makes Doom quite impressive – they were 2–3 programmers and did it in just a year.
Premium subscription
The first premium newsletter went out two weeks ago. It had:
- three links to external articles that I thought were really good;
- a two-page review of the first half of Working Backwards: Insights, Stories, and Secrets from Inside Amazon.
- a brief mention of Craft Stories by Chuck Palahniuk and why it matters.
- a preview of what it might look like if one takes The Economist's The World Ahead and tries to squeeze out of it verifiable claims that one can forecast on.
If any of this sounds interesting, you should upgrade to a premium subscription! For a limited time, premium subscriptions are $1/month. As always, you can cancel at any time. To upgrade, click the subscription link at the top of this newsletter and fill in your email again.
Your opinions
As always, I cannot improve without feedback. Reply to this email to share your thoughts on any of the topics above, or anything else!