Computational Thinking: Thinking Ahead

Computational Thinking: Thinking Ahead

  • “Thinking Ahead” is a key component of computational thinking; it involves the ability to predict and anticipate outcomes of actions in a specific computational context.

  • This concept involves utilising heuristics or educated guesses to solve a problem or complete a task, particularly in relation to algorithms and planning the steps a programme will take to solve a problem.

  • It also includes decision making for potential future scenarios. For instance, a programmer anticipating potential bug issues, logical errors, or user input errors when designing a programme.

  • This deductive thought process can also involve elements of ‘what-if’ analysis. That is to say, anticipating what would happen if a certain variable was changed or a certain step in the algorithm was altered.

  • In the context of writing code, this could also involve considering how the end-user will interact with the programme and predicting how different user inputs could affect the running of the programme and then factoring these considerations into the design of software.

  • “Thinking Ahead” can help to make code more efficient by identifying potential issues before they arise. This allows for cleaner, more streamlined code as any foreseeable complications can be planned for in the early stages of design and development, not just in the debugging stage.

  • A prime example of this computational thinking skill would be a simple queue system. The coder will need to predict and assess the scenarios where the queue is empty, almost full, or completely full when designing the algorithm.

  • On a more advanced level, understanding and predicting how efficient an algorithm will be as the size of the input grows (Big O notation) is another way thinking ahead applies in computational thinking.

  • All in all, “Thinking Ahead” aids in the creation of a robust and versatile system by predicting and handling edge cases, errors, and changes in user requirements or data input. This results in better user experience, less time spent patching bugs, and ultimately a more reliable script or application overall.