Welcome back! Glad you made it to another exciting post from my blog! Or, if this is your first time, I hope you keep coming back. As I always say, consistency is key! Also, variety is the spice of life. So maybe consistent variety is the key to life? Or is it consistent variety is the key to spice? Well anyways, let’s get into this blog.

I know what you are thinking “What can Christian possibly yammer on about today?” Well let me tell you. This is gonna be a post about somthing I learned in college but have recently remembered. It is so essential to the programming process that if you aren’t doing it, you should re-evaluate your life.

Making Plans for Dummies

Programming is an acquired skill that takes a lot of practice to understand simple but unintuitive concepts. It is hard to explain the power of a for loop to someone off the street but after playing with it for ages it is another tool under your belt that you can use forever in your career as a programmer. If you get enough of these ‘tools’ under your belt you will have a pretty great skill set that makes you desirable. However, one of these tools, perhaps, can be even more beneficial then all the coding know-how. It’s knowing how to make plans. Let me start by saying this skill can’t easily be developed first but often is trained after gathering your programming know-how. In other words, without knowing your tools it’s hard to say what you’ll need to build a metaphorical house.

Why is this important?

So, a question I always like to start out with is ‘why?’. Making a plan for your program can make your life easier by:

  • Keeping you on track
  • Showing your partners where you are in the process
  • Motivate you to check off the next thing

I don’t know how else to say it. It seems so simple but it is SO important.

Keeping You On Track

I’ve written a lot of programs, more than some, less than others, but every program I have written without a plan has taken me a lot longer than programs I have written with a plan. The reason is simple, I can’t stay focused on one problem. I jump around a lot and within minutes I am working on something else that I wasn’t supposed to get to until later. Our brains aren’t wired to focus on one thing when we are thinking intensely on a problem, they think of multiple different parts of the problem all at once and that can cause you to skip around a program a lot.

However, when you make a list of the things you need to do to make a program work, you can go down the list as problems hit you and figure out an order of priorites. If you don’t know where to go next, boom, there is a list. If you can’t remember what the last thing you did in this program, boom, there’s a list.

Showing Your Partners Where You Are In The Process

I may or may not have mentioned this a few times, but your code may not always be just your own. That is what is awesome about these planned lists. You make them into check boxes and your partners can see what you have done and work accordingly.

This is something I have recently run into. I worked in a group project making a game of Pac-Man. My partner and I had clear communication through our planned out list on what should be done and by whom. However, there were several times when we would finish our portion of code and not know where to go and we kept reminding each other to check the plan.

Motivate You To Check Off The Next Thing

A lot of dieticians and personal trainers make you set up goals and milestones throughout your health journey. Why do you think that is? It is all about that motivation, right? If you can push yourself to that first milestone then surely you can push yourself to the second, and boy does it feel good when you can check off that first goal of losing x pounds or lifting y weight.

The same could be done when making a plan. Make step 0 ‘Make A Plan’. When you finish the plan, check it off. There is a lot of psychology that can behind this but I’m just gonna make it brief. When you finish a part of that plan and check it off, it is like getting rewarded with a chocolate. It can make you determined to continue so you can check off the next box.

It’s Not Just About Making A List

Making that planned list before your starting your program is very important, but it can’t be just left at that. Your plans have to be adaptable, and you have to break them into smaller problems. In my pacman game my first step in making the game was making Pac-Man, but it wasn’t as easy as making a function to make Pac-Man. I had to break it into a lot of smaller plans and write them down. For instance, making Pac-Man was making my canvas, figuring out canvas arc, figuring out his mouth ‘wacca’ animation, scaling him according to a tilesize, and givind him movement based on keyboard controls. I wrote those down and followed them to a T. When thy were done I checked off making Pac-Man.

Yo dawg, I heard you like plans. So I put a plan in your plan so you can be making plans while you are making plans.

Let’s Go One Level Deeper

When I know I’m about to write a complicated function I write it first with pseudocode. It is never 100% accurate but it is a good guideline on how to attack the problem. When I’m writing a function I spend about twenty percent of my time thinking about it and writing down what the code should be doing and what I might use to get that behavior. Even if I only write half the pseudocode, I still feel like I’ve got a huge chunk of code done. It is also important to realize that your pseudocode also needs to be flexible and you should be okay with chucking it and starting over with a different approach. Think of it as a rough draft to your code.

Finitione

I’m sure you are thinking all of this is understood and I didn’t need to write so much about it, and you may be right, but it doesn’t decrease it’s value of importance. These planning skills don’t just show up one day, they are developed. Just like everything else, you have to fail at planning to get better at it.

Okay, I’m stepping off my soap box again for another week. Maybe next week I’ll come back to the importance of styling your code. Who knows? Anyway, have a good day and you be careful out among them English.

Kisses Mwah