i mean, yeah? but also the language doesn’t become more complicated with larger programs and you typically don’t spit out thousands of lines of code without compiling at least some of it at least once
Most programmers I know compile a program when they have fully expressed an idea they have in their heads. It might just be the first outline of the idea. But, it’s a solid first sketch that contains all the key details. Unfortunately, often that’s a complex idea so it can be somewhere on the order of an hour before they stop coding and try compiling. One reason for that is that compiling the program is a context switch, and when they context switch they can’t keep all of their thoughts about the program in their head, instead they have to think about compiling. And, if compiling takes more than a few seconds their attention also starts to drift to other things.
Coding for something like an hour without making a single typo or braino is difficult. This is especially true if the programmer is attempting to express a creative idea. Their focus won’t be on getting every single detail correct, it will be in sketching the shape of the idea as completely as possible. 99% of the time, those mistakes are entirely obvious and take no time to fix. But the compiler is (luckily) unforgiving of errors, even if the fix is obvious. But, that’s why it’s suspicious if the code compiles perfectly the first time.
It’s possible that some people have different workflows. Maybe they write out the entire program in comments and pseudocode before using an actual programming language. If you do that, then you can probably afford to take a break from the actual coding more often and compile what you have so far. Maybe you’re compiling every 5 minutes instead of every 30, in which case it’s pretty normal not to have any compiler errors. Maybe some people use a super advanced IDE that effectively compiles the code in the background all the time and flags errors that will become compiler errors. I think a lot of people who became programmers before that kind of thing was popular find that sort of thing to be distracting. If they’re trying to write something on line 50 and the IDE flags something from line 45, they might have already shifted their context a bit, and having to go back and fix that will distract them from the thing they’re currently trying to express.
Personally, I’ve often had no compiler errors when writing tests. Tests are often very small, self-contained bits of code that don’t take long to write, and aren’t very complex, so it’s pretty normal to have a test compile and run perfectly the first time.
The point is, programmers who have been programming for a long time are the ones who are more likely to be surprised if their code compiles perfectly the first time.
Unfortunately, often that’s a complex idea so it can be somewhere on the order of an hour before they stop coding and try compiling.
Maybe I’ve been lucky with the people I got to work with so far (and I definitely am), but I know of no professional software engineer that would voluntarily subject themselves to such a long feedback loop. I guess some of the juniors try to work this way sometimes, but they learn fairly quickly not to. The best ones I know work incrementally. Small change, run, small change run, and so on.
Every big change is ultimately just a series of small changes. It takes skill and engineering chops to be able to break up big ideas into small steps with quick feedback loops, but it can be done. Usually worth the effort too.
i mean, yeah? but also the language doesn’t become more complicated with larger programs and you typically don’t spit out thousands of lines of code without compiling at least some of it at least once
Most programmers I know compile a program when they have fully expressed an idea they have in their heads. It might just be the first outline of the idea. But, it’s a solid first sketch that contains all the key details. Unfortunately, often that’s a complex idea so it can be somewhere on the order of an hour before they stop coding and try compiling. One reason for that is that compiling the program is a context switch, and when they context switch they can’t keep all of their thoughts about the program in their head, instead they have to think about compiling. And, if compiling takes more than a few seconds their attention also starts to drift to other things.
Coding for something like an hour without making a single typo or braino is difficult. This is especially true if the programmer is attempting to express a creative idea. Their focus won’t be on getting every single detail correct, it will be in sketching the shape of the idea as completely as possible. 99% of the time, those mistakes are entirely obvious and take no time to fix. But the compiler is (luckily) unforgiving of errors, even if the fix is obvious. But, that’s why it’s suspicious if the code compiles perfectly the first time.
It’s possible that some people have different workflows. Maybe they write out the entire program in comments and pseudocode before using an actual programming language. If you do that, then you can probably afford to take a break from the actual coding more often and compile what you have so far. Maybe you’re compiling every 5 minutes instead of every 30, in which case it’s pretty normal not to have any compiler errors. Maybe some people use a super advanced IDE that effectively compiles the code in the background all the time and flags errors that will become compiler errors. I think a lot of people who became programmers before that kind of thing was popular find that sort of thing to be distracting. If they’re trying to write something on line 50 and the IDE flags something from line 45, they might have already shifted their context a bit, and having to go back and fix that will distract them from the thing they’re currently trying to express.
Personally, I’ve often had no compiler errors when writing tests. Tests are often very small, self-contained bits of code that don’t take long to write, and aren’t very complex, so it’s pretty normal to have a test compile and run perfectly the first time.
The point is, programmers who have been programming for a long time are the ones who are more likely to be surprised if their code compiles perfectly the first time.
Maybe I’ve been lucky with the people I got to work with so far (and I definitely am), but I know of no professional software engineer that would voluntarily subject themselves to such a long feedback loop. I guess some of the juniors try to work this way sometimes, but they learn fairly quickly not to. The best ones I know work incrementally. Small change, run, small change run, and so on.
Small change and run works for small ideas. Sometimes you have a big idea that’s hard to break down into small chunks.
Every big change is ultimately just a series of small changes. It takes skill and engineering chops to be able to break up big ideas into small steps with quick feedback loops, but it can be done. Usually worth the effort too.