Coding, programming, developing. These are all the same thing and most people use these words interchangeably. No matter what you call it, we need to know what it is before we get too far. If you don’t know what programming is, that’s okay. That’s why you’re here, right? Imagine you get to tell a computer what to do. That’s what programming is. Though, it’s not quite as easy as just saying it out loud. Instead, we have to learn how to speak the computer’s language, then it will do what we say. Programming is using code to perform a task. That task could be solving a problem, making a decision, building something cool, or even making awesome art.
I’m so glad you asked. You can do so many things. You can build websites, virtual reality games, calculators, launch spaceships, name generators, street lights, or even an automatic cat snack dispenser. You may not think about it but programming is used in so many things we use and see in our daily lives. Everything from your microwave to traffic lights, your watch to parking meters all have some code running their processes.
Let’s look at how we could code a watch, that portable clock some people wear on their wrists. It has a few main functions: count seconds, update the display. That's not too many steps, right? Let’s break it down into even smaller steps.
- Every 1 second up to 59, add 1 to the seconds on the screen then
- Add 1 to the minutes on the screen up to 59 then
- Add 1 to the hours on the screen up to 12 then
- Repeat steps 1-3 forever and ever until the end of time or the battery dies
Code has a few basic parts that are used to make some complex pieces. I promise, in this case, “complex” definitely doesn’t mean hard, a complex piece just means it’s a bigger piece made out of smaller basic parts. Tons of things in real life are like this, too. You have to learn what some new terms mean and how to make the basic parts. Each basic part has a purpose. Next, you’ll use the basic parts to build bigger complex pieces.
|Knitting and Crocheting||Electrical Work||Music||Language|
|Basic Parts||Types of stitches||Switches, wire, power||notes in a treble or bass clef||Nouns, verbs, punctuation|
|Possible End Product||A sweater, hat, or blanket||A radio, keyboard, or robot||A verse, a song, or album||A paragraph, essay, or book|
|Documentation (instructions)||A pattern||Diagrams||Fingering chart, reference book||Grammar reference book, Dictionary|
|Debugging (figuring out why it’s wrong)||Counting stitches and pulling some out if needed||Testing each part to verify it works||Checking your fingering and trying again||Spell check, autocorrect, re-reading your work|