The Ideal Programmer and Coupled Systems Amavect 2024-11-18 I helped a coworker with his PLC ladder logic programming class, and I invented this idea of the "ideal programmer" on the spot. I said that the ideal programmer could write an entire program from scratch without mistakes. The program ran correctly upon first run because the ideal programmer's mind understood the program. Well, my coworker took that literally and tried writing a program in its entirety. Whoops. So, I backpedaled and clarified that the ideal programmer doesn't exist, but if the ideal programmer represents a skill to strive towards, how could one reach it? Instead, I guided him to implement individual requirements of his assignment, with a tight feedback loop of writing each requirement, compiling, and testing to see if it works. I mostly intervened by asking questions or giving directions for testing code behavior, and let him do the rest. The professor had written a pretty good assignment with numbered requirements in a logical order. My coworker described his professor as very picky, a compiler kind of man. At some point, I noticed that two different requirements had coupled in an interesting way. A counter, upon reaching a count of 5, enables both a timer and an output. Upon ticking for 2 seconds, the timer directly disables the output. As a separate requirement, the timer also resets the counter. Now, I asserted that he could delete the timer-direct-disable-output part, and the program would work exactly the same. I asked him to figure out why. I noticed that the timer didn't need to directly disable the output, since resetting the counter also disables the output. So, in a full chain, the counter enables the output and the timer, then the timer resets the counter after 2 seconds, then the counter disables the output and timer. Chasing the causation around made a good exercise in abstract reasoning. We kept the timer-direct-disable-output part to keep the requirements uncoupled. A different kind of ideal programmer takes a task, breaks the task into manageable parts, verifies that each part works correctly, and recognizes interactions between parts.