The Importance of Sequences

Learn about the importance of sequences with a problem scenario.

Performing sequences

Imagine that one day, you start craving a pie, so you decide to make one. The reason for baking a pie is not that you want to cook, but that you want to satisfy your craving for pie. But to be able to get the pie, you need to perform several steps. First, you need a recipe, and then you need to get all of the ingredients. Once you have all the ingredients, you’ll follow each step in the recipe. Then, finally, after the pie has baked in the oven and cooled down a bit, you can enjoy your well-deserved treat.

You just performed a few tasks in sequence. Some of them need to be completed in the right order, while others can be done in any order (or, at least, in a more relaxed order). You must turn on the oven before you can bake the pie, but it is not essential that you bring out the flour before the butter.

Programming is a lot like baking a pie. We’ll have goals (wanting pie) and to be able to achieve that goal, we will need to do several things; in some instances the order is essential, while others are less dependent on the order. Programming is all about problem-solving and the art of breaking things down into smaller steps. This will be done in iterations where you first have an overall solution and then break this solution down into smaller and smaller steps until you’re on a level where you understand each step that needs to be taken. This is one of the more difficult skills to master when you begin to learn programming.

As with all new skills, it takes lots of practice before you’ll feel comfortable doing this. Some tricks can make it easier for you to acquire this skill. The essential ability you require is an overview of the full problem that you’re trying to solve and, at the same time, it’s a focus on the details of one or more subproblems that need to be resolved. This means that you’ll need to zoom in and out on the details while keeping an overall view of the whole problem. You can practice this without doing any programming. For example, playing logical puzzle games such as Sudoku will train your brain to keep an eye on the overall game and focus on the individual parts of it, such as what numbers can go into a certain cell.

Get hands-on with 1200+ tech skills courses.