In this article, I am going to explain how to build a reusable programming outline for all of your projects. Becoming an amazing programmer is much more than learning the syntax of the language you are working with. If you want to be truly great, you need to push your coding skills to the next level. Invest some real-time into planning your projects before you start coding and you will see better results.
When I was first learning to program, I can’t count the number of hours I had spent over-analyzing my potential coding solutions in my head. Only to get stuck in a state of analysis paralysis and getting nothing accomplished. Even when I did start a project, it quickly became a dirty route to get the job done. It never really became something I was proud of until I started planning my programs!
Good code is built off of a strong foundation. Which needs a schema that is reliable and reusable for all of your software. No matter what the size. Without this, the entire codebase will collapse into a pile of tangled messy logic that becomes even harder to decipher than it was to write. If you can even figure out how to make it compile!
If this sounds all too familiar, read on for a well-built programming outline that will enhance your codebase and make you a better programmer.
Before We Begin
It is important to note that you should have a basic understanding of the programming language you are utilizing. Understanding variables, arrays, loops, and preferably more ‘advanced’ knowledge of concepts such as asynchronous programming, methods, objects, etc. is always beneficial.
If you’re brand new to web development, check out my article on how to Become a Professional Full Stack Web Developer in 2020. However, don’t feel like this article still isn’t aimed towards you. Learning this concept is a great way to put you into the mindset of a programmer.
The General Concept of Building Software
The planning method I am attempting to teach here can be thought of as a pyramid. It begins with a central abstract idea and moves down the levels until they become actionable coding steps.
and no, I am not talking about this kind of pyramid!
At least it’s proper indentation..? Anyways, if you are okay about getting a bit nerdy, we can think of it more as a data structure tree. With one root level and many sub-components (nodes) broken down further into their own sub-components.
This is a top-down approach at programming and a powerful one at that! Take a look at the diagram below for a visual representation.
Step 1. Understanding The Pain Point
You can think of this first step as the root of your tree or programming outline. It is the central focus that everything is built for. So really give it some thought.
Every good piece of software has a way to fix a pain point in people’s lives. Netflix removed the ‘pain’ of traditional movie rentals, Facebook allowed its users to feel connected from anywhere in the world and Google made our jobs as developers infinitely easier, among other things (I guess..?). Pain points are business 101 and a critical step for creating software that will truly benefit someone.
Essentially every great piece of software needs to make someone’s life easier. That being said, you don’t need to be the next big tech company but if you want to build something worthwhile you need to really think about this as a critical part of your outline!
Side Note: If you just want to build something that interests you, that’s amazing, and don’t let something like finding ‘pain points’ stop you. However, every piece of software should have a central focus. so find that before you start building anything!
Step 2. Planning The Features
This is where we begin planning the sub-components (or nodes) of our tree. These first sub-components are the features that our software is going to offer (or at least what we want to offer right now).
Keeping our pain point in mind, we can start to dive into what cool features we want our software to be capable of doing. As we create this primary ‘layer’ of features, we should constantly be asking ourselves, “Is this feature going to help solve our paint point?” If not, it’s probably a waste of our time to code it.
Depending on the size of your software, you will likely need to keep drilling down into sub-features. Remember, the more layers the better! For instance, if you were building a social platform and wanted a direct messaging feature included, you would likely need an entire subset of features for how this should be designed and implemented. Which could then have their own sub-components. Keep drilling down until you feel comfortable you could build the logic for a single sub-component.
Keep in mind that your sub-components should build towards your component completely, so if all subcomponents are finished, the parent component should be finished as well. This way, by coding your entire final layer of sub-components, it should mean your entire program should be finished.
This is an optional step, but once you have a clear understanding of your sub-components it can be very beneficial to visually organize your data. There are plenty of free options out there for tree diagram builders. Here is one I like that’s free.
Your program should also keep UX (user experience) design in mind. Making things easier for your users is never a waste of time! Even if it does not directly address your pain point.
Step 3. Building Your Sub-Components (but not in code!)
Now that you have a blueprint for your software it’s time to get to the fun part, writing your code! If you’re a new programmer, it’s also likely the most difficult too. But that’s okay! I promise it gets easier the more you practice and it’s honestly the best feeling in the world when you figure something out (biased opinion, I know).
The key here is to write a step-by-step sequence of how you are going to build your sub-component. If done right, when you are finished, the entire component should be complete.
Preferably, these steps would also be written with how they would be built with code terminology. Here is an example of a step by step I wrote for an Instagram bot I was making a few months back. When these steps are put together, it creates a way for users to create an input, display that input visually, store it in a web API, and remove it.
You may notice that these steps aren’t complete. For instance, there is no way to check the user’s input for invalid characters. I actually store this information elsewhere as a ‘general’ functionality section (more on this later). It also could be broken down into further steps. For instance, step #5 could be broken into “Create a clear button with HTML” and “Make the clear button empty the array”.
The key takeaway is to be as thorough as need to be. I felt comfortable that this was enough to complete the subcomponent in code. If this seems overwhelming, continue to break things down until it seems more manageable (and use Google!). Do what is right for you and really make this process your own. It is never wrong to be too thorough!
Step 4. Clean Up and Refactor Your Code
You may be thinking, “Grant, what’s wrong with you? I am on one of the last steps and I haven’t written a single line of code!”. That’s right. Good programmers realize that good code isn’t written on the fly. You need a full picture of what is going on in your codebase (or what will be going on), then finding the most optimal solution of how it will be coded.
That’s basically what we just did! There is one more step we need to run through before we can be confident in how we are approaching the problem and that the code is the best we can make it.
When you look over your blueprint, you should start to see some patterns in reused functionality. This is our chance to build out the reusable bits of code your project will be using. By doing this we are using DRY (Don’t Repeat Yourself!) coding practices that will not only speed up our development process but make it more maintainable and improve our code quality as well! It is arguably the most important step. Think of this portion as a tiny code library specifically for your project filled with methods and functions that will make your lives easier.
Beginner Note: If you are a brand new programmer, this might be too big of a step. In which case, you can skip this step for now.
Step 5. Design Your Interface
Now that you have an intimate knowledge of the logic to create your program, you can plan the most user-friendly way to display this information to the user. If you have ever tried designing an application without all of the information included, you know how hard this can be. Luckily we have it all outlined now!
This isn’t an article on design, so I won’t get too involved here. However, make sure you are always keeping the intuitive thinking process of users of your application in mind. I prefer Adobe XD to prototype my web applications. It’s free and if you have knowledge of other Adobe products, it’s very easy to work with.
Step 6. Your Programming Outline Is Finished, So Start Writing Your Code!
At this point, you should have your entire program outline completely finished. Breaking down your code into easy to follow bricks of steps that will be much easier to research and troubleshoot.
This process should not only help you build your program more easily but also keep it DRY and simple.
What we did here is take our higher-order ‘human processed’ idea and converted it into something a computer can re-create. This is what programming is!
Sorry to break it to you but programming is not sitting down at a computer, cracking your fingers, and furiously typing at your keyboard hacking the mainframe.
I know we all want to be this guy.
Programming is about strategizing and breaking problems down into sequential steps. When you finally figure out that problem, its the greatest feeling in the world. Knowing you have just made another small step at becoming a better programmer.
If it doesn’t feel that way?
Then programming probably isn’t for you. Honestly, you would have to be insane to ever put yourself through hours of mind-numbing debugging to not get that sweet satisfaction when your code finally works as intended!
Anyways, those are my steps for building better software and having a re-usable outline for planning a coding project. If this article helped you, please consider sharing it with your friends! It helps me out a lot.