I have a question for you programmers out there. When Rick and I build robots we find on the Web, I am often struck with how unnecessarily complicated the programming is. For instance, our most recent project included programming to make an arm move back and forth. This is the code:
Block 1 tells it to move forward indefinitely. Block 2 waits for the motor to rotate a certain amount. Block 3 stops the movement. Block 4 waits .03 seconds. Block 5 gets it moving indefinitely in the opposite direction. Block 6 waits for a certain rotation amount. Block 7 stops the motor.
I replaced that code with these two blocks, each configured to rotate the motor a certain amount in one direction and stop. It worked just fine:
Why do programmers choose such convoluted ways to do something so simple? Am I missing something? Is there a reason such simplification is not desirable?