Posted on June 3, 2015 by: Muriel Gonzalez, Front-End Developer
Illustration by David Plunkert
I personally think everyone should learn how to program. Not just because that’s what I do, and I absolutely love it, but because software has taken over the world. Everyone is coding, and we are surrounded by code. You have wearable technology, you can turn on your car using your phone, you can have a drone deliver a package to your front door, you are watching your car self-park or, better yet, you are commuting in a self-driving car. It’s fascinating.
Having said this, even if you don’t end up using programming for any practical reasons, it will at least teach you how to think.
Programming, Science and Philosophy
There are obvious areas where computer science, programming and philosophy overlap: robotics, machine learning, artificial intelligence and virtual reality, to name a few. It’s also becoming more and more common to use computational modeling along with the philosophical method. Algorithms, models, proof and verification are now part of what scientists use in the construction and evaluation of hypotheses.
But what can philosophy teach us? Not only will philosophy help us open our minds and expose us to a wide range of different thoughts, subjects, the nature of reality and what our place in it might be, it will also give us the ability to think through radical and innovative ideas, from beginning to end.
Philosophy can teach us to develop logical and analytical rigor. By applying these concepts, we will be able to analyze complicated discursive and technical problems and, at the same time, to write programs, which just so happen to be very complex logic puzzles.
The Way We Think
Programmers are creative problem solvers. We are analytical thinkers. We are able to take on a complex task and transform it into a bunch of different smaller, simpler tasks. We love puzzles and problems. This is the bread and butter of programmers.
Our way of thinking is sort of like a hybrid between the way engineers, philosophers and scientists think. We are constantly changing our point of view. We look at the same problem from all angles. We analyze the problem from top to bottom, left to right, until we get an idea, and then a program just happens. More often than not, thinking about the problem is more productive than thinking about the solution.
When applying analytical thinking, we are mostly using a higher level of reasoning. We are applying logic and math. This process is very powerful, but it takes a lot of effort.
This is not to say that we are not intuitive. And while we mostly use our brains, we rely on our gut, too. Our gut is intuitively helping us solve problems, and most of the time we don’t even realize we are using it. Through our gut, we are able to identify a problem and solve it in the easiest way possible, especially if we have seen a similar problem in the past. This type of thinking is more heuristic, and somehow is always present. Regardless of whether we like it, our gut drives our brain.
Learn Programming, Not Code
Programmers write a LOT of code. And as important as writing good, quality code is, it really is one of the last steps in the development process. And unless you are just learning a new programming language, coding might actually be the easiest step of all.
Understanding code is not the same as understanding programming. Programmers don’t just understand HOW to code something, but more importantly they understand WHY they are writing code in a particular way. A program is a lot more than just instructing the computer to perform a task. A program serves as a way to organize our ideas about processes to accomplish a goal.
- Take a few minutes to think about what needs to get done. Think about the bigger picture. Forget about libraries or frameworks. Forget about what functions to use. Just conceptualize the way the program will work to accomplish the desired goal while meeting the established constraints.
- Always have a plan. If you haven’t solved the problem yet, then you won’t have a plan for implementing the solution. However, you should create a plan on how to find the solution. Understand that this plan may change as you go along or may be dropped altogether.
- Restate the problem. By doing so, a problem that looks very difficult may seem easier when stated in a different way. Before you climb that steep hill, why not circle around and check out the hill from every possible angle? Even if you end up back where you started, it will at least help you break down the problem or give you a better understanding of what you are trying to accomplish.
- Start with what you know. Design your software before you even try to implement it. When designing your code, always break down a big problem into small, bite-sized pieces. Don’t be afraid to pick up a piece of paper and draw a diagram if it will help you visualize the problem better.
- Experiment. You shouldn’t be expected to think about a problem and implement it perfectly on the first try. Always experiment after conceptualizing. A great way of doing this is writing a little console program to test a small piece of the problem. This way, you will gain some understanding of the code you have and how it works before you implement it. Experiments will allow you to hypothesize, try things out and verify whether your assumptions were correct.
Now pick a project, any project. Set a target goal for what you wish to accomplish, and stick with it. Lay out everything that you have to do, even if you don’t know how to do it. Don’t be afraid to break stuff. Figure out why things are broken. Fix them. Test them. Rinse and repeat.