Vitaly is the Digital Marketing Manager at CodeMonkey. His master's degree in Computer Science, combined with his experience as a father of two sons, helps him create content focused on coding education.
Are you reading these words on a computer? Or maybe on a tablet, or smartphone? All of these devices are powered by code: millions of lines of words and numbers whirring away behind the scenes. Code is everywhere. Our lives depend on it.
But not many people know how it works. For many of us, code has a mystical quality — we know it exists, but it floats beyond the edge of understanding. It’s like gravity, or DNA, or the way that an airplane stays in the sky. We accept these things, but we can’t make sense of them. It hurts our brains to try.
This guide won’t help with those other things. We don’t understand them either.
But it will definitely help with coding. The fundamental principles are surprisingly simple, and easy enough to learn. Hopefully, by the time you finish reading this, the idea of code won’t feel quite so mystical. We’ll also let you know what steps to take if you want to explore it more.
What is code?
It’s good to start with a definition. You can’t be expected to learn about something if you don’t know what that something is.
In simple terms, code is the language of computers. If a person knows how to write code, they can give instructions to a computer. That’s what computer programmers do. They write strings of code that tell a computer how it’s meant to behave, like opening a website when you’ve clicked a link, or deleting a file when you’ve pressed delete.
It’s the same as talking to a human. If you give them instructions in their native language, they’ll know what you’re talking about. If you try to give instructions in another language? They might not understand. Computers work in the exact same way. If you don’t use code to write their instructions, they won’t know what they’re meant to do.
Just to be clear, when we say ‘computer’, we’re not just talking about laptops. A mobile phone is a type of computer. So is a tablet. A smartwatch. A washing machine. Behind the scenes, every one of these digital devices is controlled by code, and all of this code was written by programmers to tell the devices exactly how to behave.
Basic principles
Anyone can learn to code. It’s just like learning any language — with enough time and practice, even a complete beginner will start to get the hang of it. As with anything, it’s good to start with some basic principles. Let’s look at a few of those now.
Human languages are often vague and organic and leave plenty of things unsaid. If you ask a friend to “buy some milk,” they know exactly what to do. You won’t need to give them any extra instructions, like “bring the milk home” and “put it in the fridge.”
But computers need those extra instructions. If you really wanted to code a computer to collect some milk, you would need to say something like this:
> open the door > leave the house > walk to the shop > buy some milk > bring the milk home > put the milk in the fridge
Unfortunately, these instructions wouldn’t actually work. They’re written in English, so a computer wouldn’t understand them.
But they’re still a useful way to demonstrate the principle of clear, step-by-step instructions. In the context of coding, we call a set of instructions an algorithm. If your algorithm misses an important step, the computer will crash, or do something it wasn’t supposed to. It might try to leave the house without opening the door, or forget to come home after buying the milk.
The order of the steps is important too. Computers will always follow instructions in the order they were given, exactly the same as following a recipe in a cookbook. This principle is known as sequencing. If the steps of the algorithm are in the wrong order, that could also cause the computer to crash.
If the computer does crash, you’ll probably need to look back at the code and identify the cause of the problem. Maybe one of the steps is unclear, or arranged in the wrong order. This process is called debugging: searching for errors in a failed algorithm, then trying to fix them.
Now, let’s make this a bit more complicated. What if we only wanted the computer to buy some milk when the previous bottle was empty? We’d have to use something called a conditional statement:
> IF the previous bottle is empty > THEN open the door > leave the house > walk to the shop > buy some milk > bring the milk home > put the milk in the fridge
Using IF and THEN takes an algorithm to the next level. Suddenly, your instructions feel a lot more dynamic. This is how a lot of devices are programmed. IF this button is pressed THEN start a 10-minute wash cycle.
What if we wanted the computer to buy a new bottle of milk, not just once, but every single time that the previous bottle was empty? We’d have to use a loop, which is when we tell the computer to return to the start of the algorithm:
> IF the previous bottle is empty > THEN open the door > leave the house > walk to the shop > buy some milk > bring the milk home > put the milk in the fridge > REPEAT
Visual blocks
Now that you know some basic principles, it’s time to put them into practice. Visual coding blocks are an essential tool for any absolute beginner. You can find them on websites like Scratch and Blockly. Both of these sites are free.
Visual blocks let you play with code without having to worry about typing. You can drag and drop them into different positions, working out how different functions interact. This is a great way to explore those basic concepts, like sequencing, loops and conditional statements.
In theory, visual coding blocks are designed for children, but don’t let that put you off. All of us need to start somewhere. And don’t forget that the basic principles of visual blocks are also applicable to higher levels of coding. Even the most advanced programmers will be constantly thinking about algorithms, sequencing and debugging.
It’s like reading a book. You’re still using the same basic alphabet that you learned when you were small. Coding works in the exact same way. No matter the project, the basic principles will never change.
Programming languages
When you feel comfortable with the principles of visual coding blocks, you’ll be ready to graduate to something more advanced.
Earlier on, we compared code to a language, but it’s actually a bit more complicated than that. There isn’t a single coding language, and different people write their code in very different ways. Some people use a language called Python. Others use JavaScript or C++. There are plenty of options, which are known collectively as programming languages.
There’s no such thing as a ‘best programming language’. They all have different strengths and weaknesses. Some of them are simple, and great for beginners. Others are complex, and perfect for someone more advanced. Some of them are better for game development, or web development, or app development. It really depends on personal taste, and what you’re looking to achieve.
We won’t get into the nuances here, but if you’d like to learn about the different languages, you can read our post from earlier this year. In summary: JavaScript is always a good place to start. Another option is CoffeeScript — the language we use at CodeMonkey.
Coding resources
Once you’ve chosen a language, it’s time to learn how it works. One of the great things about coding is the sheer amount of resources. Whatever your favorite style of learning, you’re sure to find something that matches your tastes.
One of our personal favorites is Khan Academy. Its coding courses are clear, concise, and completely free. Each lesson is delivered using a ‘talk-through’, a kind of interactive video which lets you pause at any time and play with some code on-screen. In terms of programming language, Khan Academy teaches JavaScript, HTML/CSS and SQL.
Codecademy is another option. It’s very similar to Khan Academy, but with a wider range of courses, which include computer science, software development, game development and more. Codecademy offers courses in 15 different programming languages, including JavaScript, Python and Ruby.
YouTube is also a great place to look for coding tutorials. FreeCodeCamp.org has a great channel, with a wide range of series dedicated to different programming languages. You can check out The Net Ninja and WebDevSimplified too.
If you’re looking for something a little less formal, there are plenty of educational coding games, which will help you to learn the basics of coding without feeling like you’re back at school.
There are mobile games out there too. LightBot is pay-to-play, but maybe you’ll decide it’s worth it. Throughout the game, you’ll be asked to complete a series of puzzles, learning programming logic along the way.
If you’d prefer to learn your coding offline, you might be able to find a face-to-face class in your local area. Failing that, you can always try a good old-fashioned book. The Head First series of programming books offers excellent advice, as well as giving you plenty of activities and exercises to help you hone your coding skills.
Or maybe you can combine any number of these things. Buy a book on JavaScript, watch some YouTube videos, play some Code Monster on the side. Sign up to Codecademy, join a class, play some LightBot in between. There’s no right or wrong approach here. You just need to try some different options until you find what’s best for you.
Final words
Whichever route you decide to take, there’s one more thing to remember: you won’t get far without some grit and perseverance.
Like any new skill, coding can be frustrating. Your algorithms will fail, and sometimes you’ll find it impossible to spot the bug. You’ll feel the urge to give up, to forget about coding, to delete your projects and never think about them again.
Don’t give up. When your algorithms finally run as planned, the rush of triumph will make all those struggles feel worth it. That’s why so many people get into coding in the first place. It’s an amazing feeling to write a set of instructions, then to watch your computer transform those instructions into action.
Coding can be daunting. We understand that. But by reading this article, you’ve already taken the first step. Now, it’s time to take the second step. Close your eyes, take a deep breath, and dive into the world of code.
Our world today is undergoing a rapid technological change. Which raises a very important question for educators and school leaders – how can we prepare our next generation for all the technological surprises the future holds?
Stay Up To Date on The Latest NEWS AND LEARN MORE ABOUT CODING FOR KIDS.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies. However you may visit Cookie Settings to provide a controlled consent.
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Cookie
Type
Duration
Description
_codemonkey_session_rails_4
1
1 year
_ga
persistent
2 years
This cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assign a randomly generated number to identify unique visitors.
cookielawinfo-checkbox-advertisement
persistent
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Advertisement".
cookielawinfo-checkbox-analytics
persistent
11 months
This cookies is set by GDPR Cookie Consent WordPress Plugin. The cookie is used to remember the user consent for the cookies under the category "Analytics".
cookielawinfo-checkbox-functional
persistent
11 months
cookielawinfo-checkbox-necessary
persistent
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-non-necessary
0
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Non Necessary".
cookielawinfo-checkbox-other
persistent
11 months
cookielawinfo-checkbox-performance
persistent
11 months
This cookie is used to keep track of which cookies the user have approved for this site.
JSESSIONID
1
1 year
Used by sites written in JSP. General purpose platform session cookies that are used to maintain users' state across page requests.
viewed_cookie_policy
persistent
1 hour
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
XSRF-TOKEN
persistent
1 year
The cookie is set by Wix website building platform on Wix website. The cookie is used for security purposes.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Cookie
Type
Duration
Description
rlas3
persistent
11 months
The cookie is set by rlcdn.com. The cookie is used to serve relevant ads to the visitor as well as limit the time the visitor sees an and also measure the effectiveness of the campaign.
UserMatchHistory
persistent
1 month
Linkedin - Used to track visitors on multiple websites, in order to present relevant advertisement based on the visitor's preferences.
This cookie is set by Google Analytics and is used to distinguish users and sessions. The cookie is created when the JavaScript library executes and there are no existing __utma cookies. The cookie is updated every time data is sent to Google Analytics.
__utmb
persistent
30 minutes
The cookie is set by Google Analytics. The cookie is used to determine new sessions/visits. The cookie is created when the JavaScript library executes and there are no existing __utma cookies. The cookie is updated every time data is sent to Google Analytics.
__utmc
persistent
1 year
The cookie is set by Google Analytics and is deleted when the user closes the browser. The cookie is not used by ga.js. The cookie is used to enable interoperability with urchin.js which is an older version of Google analytics and used in conjunction with the __utmb cookie to determine new sessions/visits.
__utmt
persistent
10 minutes
The cookie is set by Google Analytics and is used to throttle request rate.
__utmz
persistent
6 months
This cookie is set by Google analytics and is used to store the traffic source or campaign through which the visitor reached your site.
_gat
persistent
1 minute
This cookies is installed by Google Universal Analytics to throttle the request rate to limit the colllection of data on high traffic sites.
YSC
1
1 year
This cookies is set by Youtube and is used to track the views of embedded videos.
This cookie is used by Google Analytics to understand user interaction with the website.
_gid
persistent
1 day
This cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the wbsite is doing. The data collected including the number visitors, the source where they have come from, and the pages viisted in an anonymous form.
GPS
persistent
30 minutes
This cookie is set by Youtube and registers a unique ID for tracking users based on their geographical location
MR
persistent
5 months
This cookie is used to measure the use of the website for analytics purposes.
MUIDB
1
1 year
This cookie is used by MicroSoft and collects data about users of visits on multiple website. This data is used to analyze the efficiency of advertisements on websites.
This cookie is set by Facebook to deliver advertisement when they are on Facebook or a digital platform powered by Facebook advertising after visiting this website.
bscookie
1
2 years
This cookie is a browser ID cookie set by Linked share Buttons and ad tags.
fr
1
3 months
The cookie is set by Facebook to show relevant advertisments to the users and measure and improve the advertisements. The cookie also tracks the behavior of the user across the web on sites that have Facebook pixel or Facebook social plugin.
IDE
1
2 years
Used by Google DoubleClick and stores information about how the user uses the website and any other advertisement before visiting the website. This is used to present users with ads that are relevant to them according to the user profile.
MUID
persistent
1 year
Used by Microsoft as a unique identifier. The cookie is set by embedded Microsoft scripts. The purpose of this cookie is to synchronize the ID across many different Microsoft domains to enable user tracking.
pxrc
persistent
2 months
The purpose of the cookie is to identify a visitor to serve relevant advertisement.
rlas3
persistent
11 months
The cookie is set by rlcdn.com. The cookie is used to serve relevant ads to the visitor as well as limit the time the visitor sees an and also measure the effectiveness of the campaign.
skimCSP
persistent
11 months
This cookie is set by SkimResources. The cookie is used to record data on the visitor to optimize the relevance of the advretisements served to the users.
TapAd_DID
persistent
2 months
The cookie is set by tapad.com. The purpose of the cookie is to track users across devices to enable targeted advertising
TapAd_TS
persistent
2 months
The cookie is set by Tapad.com. The purpose of the cookie is to track users across devices to enable targeted advertising.
TDCPM
persistent
1 year
The cookie is set by CloudFare service to store a unique ID to identify a returning users device which then is used for targeted advertising.
TDID
persistent
1 year
The cookie is set by CloudFare service to store a unique ID to identify a returning users device which then is used for targeted advertising.
test_cookie
persistent
15 minutes
This cookie is set by doubleclick.net. The purpose of the cookie is to determine if the users' browser supports cookies.
VISITOR_INFO1_LIVE
1
5 months
This cookie is set by Youtube. Used to track the information of the embedded YouTube videos on a website.