Chopping down trees inch by inch

Last week I complained in a post about the difficulties of learning how to program in a new language with very little help. I’ll admit it–I was whining. I’m not going to do that today, though. It’s time to share a lesson learned in the process.

I’m still finding working on configuring this system to be challenging, bordering on difficult. But I’ve found that every problem I’ve run up against does have a solution if I can just keep working at it. Every new new command or technique that I learn opens up that many new options for me. I now know a fair bit more than I did this time last week.

But what has made the most difference is not so much what I learn, but how I approach the problems to be solved. It’s all about baby steps.

It’s tempting to try and write the entire script I need in one pass. But every time I do that I’ve inevitably failed. Even at best I still need to fix a few errors I overlooked. But at worst I find that I’m hopelessly lost and need to start all over again.

What works best, I’ve found, is to start small, with some code that I know will work. I write that, test it, and see if it works as expected. If it does I take one more step, building in testing methods to verify if the next step works. If that works I expand just a little bit more. Everything I add I try to verify it’s working exactly as expected before I add any more complexity.

It’s slow, but not as slow as being totally lost for most of the day. I still have difficulties, but my problems seldom slow me down for more than half a day now.

I’m also finding that the more I learn the more I understand. I’m getting better at finding code samples from scripts the software company wrote to learn from. The more I understand the easier it is to isolate a new piece of code that might do what I need. Even then, the simpler the better. Multi-line segments of code seldom seem to work as I expect. Single functions more often work best.

It’s this way with a lot of things in life. If we try to tackle the entire problem in one go we’re usually setting ourselves up to fail. But if we break it down into small steps we are confident we can accomplish and build from there, sooner or later we’ll find we’ve tackled the entire problem. We shouldn’t be in too big a hurry to conquer the entire mountain. Take time to make sure every step is on solid ground before you continue forward.

I suspect in a few weeks I’ll look back and realize that I’ve come a long way and learned quite a bit. That’s another important thing to remember. In any journey, project, or struggle don’t just focus on the goal and how far away it is. Take time to look backward now and then so you can appreciate how far you’ve come. You may surprise yourself.

This entry was posted in Random Musings. Bookmark the permalink.

One Response to Chopping down trees inch by inch

  1. Wayne Chilcott says:

    Mmmm.

Comments are closed.