They took a few hours to write and debug. As I got closer to the goal my vision became clearer. I used the programs and then made minor modifications to improve them. That is an appropriate approach to take for small projects. You don't just sit down one afternoon and write the operational flight program for the space shuttle.
Big programs require software engineering.
There isn't a clear cut boundary between big and small that can be expressed in lines of code. Even if there were, it wouldn't do you any good because you don't know how many lines of code there are in the program until it is finished, and then it's too late. Still, there are ways to tell when a project warrants software engineering. If the answer to these questions is yes, then you should use software-engineering principles. If not, applying rigorous software-engineering discipline will simply make a small project cost as much as a large one, with little or no benefit.