I’ve done it, and it’s not as impressive as it sounds. It’s mostly just reciting from experience and not some savant-like act of intelligence or skill. Take those same masters into an area where they don’t have experience and they won’t be nearly as fast.
Actually, I think the sequences were largely a recital of experience (a post a day for a year).
I don’t know about you, but I can’t recall 10k LOC from experience even if I had previously written something before; seeing someone produce that much in the space of three hours is phenomenal, especially when I realize that I probably would have required two or three times as much code to do the same thing on my first attempt. If by “reciting from experience” you mean that they have practiced using the kinds of abstractions they employ many times before, then I agree that they’re skilled because of that practice; I still don’t think it’s a level of mastery that I will ever attain.
Yeah, I can pretty much recall 10k LOC from experience. But it’s not just about having written something before, it’s about a truly fundamental understanding of what is best in some area of expertise which comes with having written something before (like a GUI framework for example) and improved upon it for years. After doing that, you just know what the architecture should look like, and you just know how to solve all the hard problems already, and you know what to avoid doing, and so really all you’re doing is filling in the scaffolding with your hard won experience.
Not too long ago, I lost a week of work and was able to recompose it in the space of an afternoon. It wasn’t the same line-for-line, but it was the same design and probably even used the same names for most things, and was roughly 10k LOC. So if I had recent or substantial experience, I can see expecting a 10x speedup in execution. That’s pretty specific though; I don’t think I have ever had the need to write something that was substantially similar to anything else I’d ever written.
Domain experience is vital, of course. If you have to spend all your time wading through header files to find out what the API is or discover the subtle bugs in your use of it, writing just a small thing will take painfully long. But even where I never have to think about these things I still pause a lot.
One thing that is different is that I make mistakes often enough that I wait for them; working with one of these people, I noticed that he practiced “optimistic coding”; he would compile and test his code, but by feeding it into a background queue. In that particular project, a build took ~10 minutes, and our test suite took another ~10 minutes. He would launch a build / test every couple of minutes, and had a dbus notification if one failed; once, it did, and he had to go back several (less than 10, I think) commits to fix the problem. He remembered exactly where he was, rebased, and moved on. I couldn’t even keep up with him finding the bug, much less fixing it.
The people around here who have a million lines of code in production seem to have that skill, of working without the assistance of a compiler or test harness; their code works the first time. Hell, Rob Pike uses ed. He doesn’t even need to refer to his code often enough to make it worthwhile to easily see what he’s already written (or go back and change things)---for him, that counts as an abnormal occurrence.
I’ve done it, and it’s not as impressive as it sounds. It’s mostly just reciting from experience and not some savant-like act of intelligence or skill. Take those same masters into an area where they don’t have experience and they won’t be nearly as fast.
Actually, I think the sequences were largely a recital of experience (a post a day for a year).
I don’t know about you, but I can’t recall 10k LOC from experience even if I had previously written something before; seeing someone produce that much in the space of three hours is phenomenal, especially when I realize that I probably would have required two or three times as much code to do the same thing on my first attempt. If by “reciting from experience” you mean that they have practiced using the kinds of abstractions they employ many times before, then I agree that they’re skilled because of that practice; I still don’t think it’s a level of mastery that I will ever attain.
Yeah, I can pretty much recall 10k LOC from experience. But it’s not just about having written something before, it’s about a truly fundamental understanding of what is best in some area of expertise which comes with having written something before (like a GUI framework for example) and improved upon it for years. After doing that, you just know what the architecture should look like, and you just know how to solve all the hard problems already, and you know what to avoid doing, and so really all you’re doing is filling in the scaffolding with your hard won experience.
Not too long ago, I lost a week of work and was able to recompose it in the space of an afternoon. It wasn’t the same line-for-line, but it was the same design and probably even used the same names for most things, and was roughly 10k LOC. So if I had recent or substantial experience, I can see expecting a 10x speedup in execution. That’s pretty specific though; I don’t think I have ever had the need to write something that was substantially similar to anything else I’d ever written.
Domain experience is vital, of course. If you have to spend all your time wading through header files to find out what the API is or discover the subtle bugs in your use of it, writing just a small thing will take painfully long. But even where I never have to think about these things I still pause a lot.
One thing that is different is that I make mistakes often enough that I wait for them; working with one of these people, I noticed that he practiced “optimistic coding”; he would compile and test his code, but by feeding it into a background queue. In that particular project, a build took ~10 minutes, and our test suite took another ~10 minutes. He would launch a build / test every couple of minutes, and had a dbus notification if one failed; once, it did, and he had to go back several (less than 10, I think) commits to fix the problem. He remembered exactly where he was, rebased, and moved on. I couldn’t even keep up with him finding the bug, much less fixing it.
The people around here who have a million lines of code in production seem to have that skill, of working without the assistance of a compiler or test harness; their code works the first time. Hell, Rob Pike uses ed. He doesn’t even need to refer to his code often enough to make it worthwhile to easily see what he’s already written (or go back and change things)---for him, that counts as an abnormal occurrence.