Coding is, without a doubt, one of the most interesting and exciting endeavours one can undertake. You start with learning some basic fundamentals, like if statements, loops and functions and you end up building big applications on the web for thousands of users to enjoy.
Now here's the thing. Typically, to learn coding, you need a big screen. Why? Because syntax in every programming language takes a lot of space. Each line of code can be quite long because of the nature of coding: giving very specific instructions to a computer.
So what if I want to practice coding on a phone? A phone has a tiny screen which will make it virtually impossible to write code sufficiently on. A small virtual keyboard usually does things worse. So what can we do?
Use Apple Shortcuts
The best way to learn to code on a phone is to throw away the syntax you typically find in Javascript or Python, and instead start using apps that lets you drag-and-drop commands.
One such app is Apple Shortcuts on iPhone.
Shortcuts is a great time-saving app for creating tasks. For example, you can create a task which gets your current location and shares it with a contact of your choice. Or start a new workout from your workout app whenever you arrive at the gym.
So how does it help me learn to code?
With Apple Shortcuts you can practice coding fundamentals such as:
If statements
You can add if blocks to your task so that it executes something only if a condition is met. For example, if some text in your task is "Hello".
Loops
To create a loop in Apple Shortcuts, you can use a "Repeat" block. For example, vibrate the device 5 times.
Arrays
You can use arrays in Apple Shortcuts by creating a "List" block. For example, create a list of cities. Then you can create a "Repeat with each" block to speak each city back to the user.
Functions
You can run functions by running shortcuts within other shortcuts. For example, create a shortcut which shows a "Hello world" notification...
...then create a second shortcut which runs the first shortcut.
Conclusion
There are loads of stuff you can do with Apple Shortcuts on iPhone which can let you practice coding fundamentals. Sure it's not Javascript or Python, but the fundamentals are always the same, regardless how you use them. Have fun with Apple Shortcuts!
Top comments (0)