Learn about the importance of having a plan when programming. In order to solve a problem, you shouldn't attack the whole thing at once. You should try to break it into steps and solve each step individually into order to solve the bigger picture.
- [Instructor] Consider the problem of visiting your family across the country. This may seem intimidating at first, but we can break this down into small, actionable steps. In order to do this, you'll need the funds, you'll need to decide when you are going, you'll need to figure out how you're getting there, and you'll need to pack. These are a lot of things that you'll need to do, and it's easy to get overwhelmed by all of these tasks. However, if you break the big problem down into smaller problems, and then break those down as well, you'll soon have clear actionable steps to complete the task.
Figuring out transportation can also be a huge task. You have to figure out if you want to take a train, a car, or an airplane. In order to decide this, you'll want to list the pros and cons of each choice, so that way you'll be able to make the most informed decision. Once you've gathered all this information, you'll be able to solve the mini task of how you are getting to your family. Seems simple enough, even though this problem looks big at first. All you have to do is start with one step and then move onto another as you try to finish the problem at hand.
In coding, if you can't figure out the answer, a search engine is almost always the first place to go. Usually someone else has had the same problem or question you've had. By typing in the error message and what you are trying to do, a solution is almost always found. For example, in this case, we might want to look up what airline flies the most to the city we want to visit. If you happen to have a lot of mileage with a certain airline, and that airline flies often to the city you want to go to, you might consider taking a plane versus another mode of transportation.
In the software world, say you are making a website, and you want to center an image on the homepage. If you are coding this in HTML and CSS, a good thing to search would be HTML CSS centering an image. When you are searching for a solution, it's important to be as descriptive as possible, providing the language, the software you're using, as well as the problem that you're trying to solve. Usually you'll find stuff from Stack Overflow, GitHub and W3Schools, and I highly recommend these resources.
Breaking down problems and coming up with a solution to each individual step is often the way we approach problems here in engineering. It can be tempting to try to solve a problem all at once, but you often forget important details that are crucial to your website or app. Listing out each actionable step is the best way to go.
- How to approach problems
- Things to consider when preparing to program
- Overview of common coding languages
- How to think like a mobile app developer
- The importance of planning
- Breaking problems into smaller chunks
- How to think like a data scientist
- The importance of code efficiency
- Organizing code with color-coding and comments