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.

Norris Numbers – Walls you hit in program size (2014)

189 pointsby dhotsonover 7 years ago

14 comments

jacquesmover 7 years ago
If he had that insight in 2011 then he was pretty late to the party. By then the 1K to 2K line limit for &#x27;beginner programmers&#x27; was very well established.<p>To go beyond that you need a few tricks of the trade, mostly structured programming and avoiding global scope will get you to 10K and up.<p>After 50K or so you will need even more tricks: version control will become a must, naming conventions matter and you&#x27;re probably well into modularization territory. Some actual high level documentation would also not be a bad idea.<p>By the time you hit 100&#x27;s of thousands of lines you are probably looking at a life-time&#x27;s worth of achievement by a single programmer, or more likely you are looking at teamwork. And so you&#x27;ll need yet more infrastructure around your project to keep it afloat.<p>You can see quite a bit of this at work when you browse through open source repositories at github, those are roughly the points at which plenty of projects and up being abandoned, as often as not through lack of insight in how to organize a larger project as through the demotivation that comes from lack of adoption.
评论 #16423227 未加载
评论 #16414274 未加载
评论 #16413152 未加载
maximexxover 7 years ago
This can be true for a beginner, for a developer who never hit that wall before or for a developer without enough talent to learn how to do it right after all. But once you start using the right methodologies, making things highly modular and as much as possible independent from each other, you can go quite a distance before new &quot;walls&quot; arise.<p>Sometimes I take more time to think of a proper and scalable name for variables and methods than the time it actually took to write the implementation. While refactoring I might do another round of thinking about naming and make sure there are no or an absolute minimum of possible side effects for the implementation, etc..<p>I&#x27;m coding almost 30 years now. I&#x27;m still learning and make my mistakes of course, but most of the time they occur because I rush for some reason. Writing good code takes time, especially to rethink what you&#x27;re doing, refactoring, making the right adjustments so it completes the codebase. Before I complete the beta release of a codebase I&#x27;ve made thousands and thousands of decisions, where only 1 wrong decision can cause a terrible amount of trouble later on.<p>For me it&#x27;s a creative process. It goes in waves. I cannot always be a top performer, I&#x27;ve accepted that. When I recognise I was in a low during some implementation I might do a total rewrite of it or apply some serious refactoring(and force myself to take the time for that).<p>I still experience coding to be much harder to get right than I ever expected it to be. For me a codebase is a highly complex system of maybe hundreds of files with API&#x27;s working together, not just a bunch of algorithms.
gmoesover 7 years ago
I feel that there is some naiveté in this perspective, although the OP does touch on it somewhat. A novice most likely would write their code in a very monolithic fashion. That same approach fails significantly with larger code bases.<p>As a seasoned developer I have come to realize that one of the most important things to be a good developer is organizational skills. Unfortunately it seems that ways to organize code bases, including things like naming, mutable state, modularization, cohesion&#x2F;coupling, etc., are not as well developed or understood in general in our industry as they should be.<p>While understanding and knowing the right algorithms is important. I sometimes wonder if our emphasis on the knowing algorithms off the top of your head interviewing process contributes to putting the emphasis on the wrong things in software development.
评论 #16413683 未加载
评论 #16413557 未加载
montroseover 7 years ago
&quot;Absolutely refuse to add any feature or line of code unless you need it right now, and need it badly.&quot;<p>As I&#x27;ve gotten older I&#x27;ve seen the value of this rule. Though it sounds merely negative, it can produce effects that seem little short of genius.
评论 #16412692 未加载
评论 #16412004 未加载
评论 #16413396 未加载
aaavl2821over 7 years ago
I&#x27;m a novice just building my first 2k+ program and the thing that seems crazy to me is that based on what you learn in intro courses, thinks like namespaces and organization and modularization not only aren&#x27;t emphasized, but seem like unimportant distractions from the core task of programming<p>Based on all the blogs and HN comments and comments here, that couldn&#x27;t be further from the truth. Are these just things you learn from experience &#x2F; mentors?
评论 #16416108 未加载
评论 #16414290 未加载
评论 #16416028 未加载
评论 #16414339 未加载
评论 #16414835 未加载
fredleyover 7 years ago
Does this depend on language? 20k lines of Perl is a different beast from 20k lines of Python, or 20k lines of verbose Java, I would expect. If not, does it suggest we should be aiming to use more expressive languages, that can get more done in less lines?
评论 #16412135 未加载
评论 #16416030 未加载
评论 #16413471 未加载
评论 #16414145 未加载
评论 #16412355 未加载
watmoughover 7 years ago
I hadn&#x27;t come across this before, and sure enough, looking at the current personal project I&#x27;m working on, it&#x27;s composed of 3 main files of C++, a Windows program, a parser [1] and a custom OpenGL control [2], each is 500 - 600 lines.<p>For me, I use Stepwise Refinement [3] to get to this point, but to get further, I have to start breaking out a more abstract approach. I found this definition of Structured Programming that puts it very nicely [4].<p>There&#x27;s also a perhaps self-imposed wall, where you might trial a solution and implement a prototype, then use that to realize that it no point in pressing on without some serious redesign of a key component. For my example above, the rendering part is old-style OpenGL, which works pretty nicely at 60 fps, but I&#x27;m holding off doing more until I can slot in and benchmark a better approach using vertex buffers and shaders, with the goals of enabling me to shape and scale the renderings in an abstracted coordinate system, and scale to rendering hundreds of files instead of just one.<p>[1] <a href="https:&#x2F;&#x2F;twitter.com&#x2F;watmough&#x2F;status&#x2F;962470455037841409" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;watmough&#x2F;status&#x2F;962470455037841409</a><p>[2] <a href="https:&#x2F;&#x2F;twitter.com&#x2F;watmough&#x2F;status&#x2F;965007110391128064" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;watmough&#x2F;status&#x2F;965007110391128064</a><p>[3] <a href="http:&#x2F;&#x2F;www.informatik.uni-bremen.de&#x2F;gdpa&#x2F;def&#x2F;def_s&#x2F;STEPWISE_REFINEMENT.htm" rel="nofollow">http:&#x2F;&#x2F;www.informatik.uni-bremen.de&#x2F;gdpa&#x2F;def&#x2F;def_s&#x2F;STEPWISE_...</a><p>[4] <a href="https:&#x2F;&#x2F;www.encyclopedia.com&#x2F;computing&#x2F;dictionaries-thesauruses-pictures-and-press-releases&#x2F;structured-programming" rel="nofollow">https:&#x2F;&#x2F;www.encyclopedia.com&#x2F;computing&#x2F;dictionaries-thesauru...</a>
dangover 7 years ago
Discussed at the time: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8072730" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8072730</a><p>and in 2015: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10191540" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10191540</a>
cortesoftover 7 years ago
I avoid these walls entirely by never using newlines in my code.
评论 #16416349 未加载
psycover 7 years ago
Interesting. My main project is getting near the 20k range. I haven&#x27;t hit a wall, but it is getting noticeably harder to stay fluent in every part of the program. When I switch from one major system to another, there is a few days ramp-up. Still happy with readability and complexity.
评论 #16416812 未加载
theSageover 7 years ago
Are there projects we can undertake to intentionally hit those walls and measure ourselves?
评论 #16414177 未加载
评论 #16415951 未加载
评论 #16412640 未加载
评论 #16413629 未加载
评论 #16412740 未加载
Paul_Sover 7 years ago
A bit over dramatic. I remember Unreal 3 was close to 2 mil and that&#x27;s the normal region for games (and has been for a decade) and trust me, gamedev studios are <i>not</i> staffed by seasoned programmers.
评论 #16420836 未加载
评论 #16415994 未加载
agumonkeyover 7 years ago
what about paulg onlisp and leveraging nested macros ?<p>what about kay vpri efforts to reduce a full system to 100K (OMeta)
g5095over 7 years ago
shard your problem space.
评论 #16412857 未加载