My Computational Thinking
Through my experience of programming, I have met many times when I must organise my thinking to simply design and create a project. Below are some tips that I find helpful throughout the time I have made my own projects.
Loops:
Loops are a sequence of instructions constantly repeated until a certain condition is reached or activated.
For example, in the snippet from one of my earlier Scratch projects below:
It holds the following condition where when a variable reaches a certain number (which in this case for ‘Lives’ is 0), it will wait three seconds before stopping all. It will constantly keep checking even though it may not always occur.
Another example, in the snippet also from the same project below:
This also shows a forever loop, but instead of stopping all when a condition is reached, it changes a variable by 1, and then hides. Thus, when it detects itself colliding with the ‘Player’ it will increase ‘Score’ by 1 and hide.
Here’s the link to my project that I used the code from:
https://scratch.mit.edu/projects/554835779
Branching:
Branching is the practice of creating copies of programs or objects in development to work in parallel versions, keeping the original and working on the branch or making different changes to each. Most of these include break, continue, return, and go to.
For example, in the snippet of one of my latest Scratch projects below:
It shows the if/else statement. Obviously, this is the ‘control panel’ of the costumes of this sprite. If it detects itself to touch the mouse pointer, then it will switch its costume to ‘costume2’. If it is not, then it switches back to ‘costume1’.
Here’s the link to my project that I used this code from:
https://scratch.mit.edu/projects/598710873
Decomposition:
Decomposition means to decompose, or break a big, complex problem or task into a series of smaller ones to easily fix or solve them. This can be displayed in flowcharts or simple ‘To Do’ lists.
You could have a list like:
- Add sound effects
- Make graphics more realistic
- Include more levels or difficulties
- Make it look fancier
Just a list or diagram as simple as this can help you to easily evaluate your work.
Sequencing:
Sequencing is to plan the tasks or actions ahead to ease future thinking. Like decomposition, it is best to list down what is needed to complete something. But this time, remember to be as specific as possible. How much detail you put in will affect how you code the final product in the future. If you do not describe it very specifically, your code might mistake itself to do a completely other thing. It is best if you sequence before you even begin to code, since during that time your mind will be busy solving other problems.
For example, if you were to create a world for a car to drive in, you might first decide what places your world will include. While thinking of the various places, you should also think of what it would include and be specific with what it looks like or what role it will have. With this, you will be able to know precisely how your sprites will look like in the end.
Algorithms:
Algorithms are multiple steps taken to reach something. Unlike sequencing, these are legitimate instructions that are strictly designed to follow. Sequencing and decomposition, on the other hand, are more to think about in the plan of you, rather than the first step needed. But like sequencing, it is best to put in as much detail as you can, as it will help you later.
For instance, if you are planning to create a new character or sprite, you could begin to think of its appearance and code while in the designing process. You could think of what actions it will do and how it will react to multiple scenarios. By creating a flow chart too will help you with your understanding of it. It could be the use of something like a timeline to firmly understand what the sprite will do.
Peace ✌️
no way!!!!!!!!!!!!!!!!!!!