Key Coding Terminology For Beginners
In my series called Talk Like A Developer, I aim to make my (technical AND non-technical) readers confident in approaching technical topics by introducing them in a non-technical way! In support of that series, this post introduces the common coding terminology you’ll come across right away as you get into coding as well as throughout my Talk Like A Developer Series.
Intro:
Hi everyone!! For those who haven’t been to my blog Apart From Blonde, my name is Jess, I’m a recent computer science grad, and I’m passionate about increasing confidence beyond the surface around typically intimidating topics! On the technology side of my blog, I’m in the middle of a series called Talk Like A Developer where I aim to make my (technical AND non-technical) readers confident in approaching technical topics by introducing them in a non-technical way. The idea is that this series can be understood by anyone at any coding level (including my 11-year-old sister who’s into programming and my 21-year-old sister who’s into fashion). With this in mind, this post introduces the common terminology used in that series. Additionally, knowing these terms can help you know what questions to ask if you need help or wanted to Google more resources!
So, here is some basic coding terminology that you’ll come across right away as you get into coding as well as throughout my Talk Like A Developer Series:
Programming Language:
Just like there are different ways to say words depending on the speaking language, there are different ways to write a line of code depending on the programming language. A programming language is basically a way for you to communicate with a computer and tell it what to do. This is an important thing to keep in mind about coding: computers are not infinitely-smart machines that don’t need our help. They are only as smart as we teach them to be and only know to do what we tell them to do. They don’t create knowledge — we help them out using programming languages!
Examples: Python, Java, C, JavaScript, HTML, CSS, C#, and many more.
Pseudo-Code:
A trick many developers use at any level is to start a project by drafting something up in pseudo-code (sue-doe-code). Pseudo-code is NOT a programming language or a software — it’s simply a helpful technique used to draft code and how it’s written is totally up to you! If I know what I want my code to do, but I don’t know what language I want to use or exactly how to code something in a given language, pseudo-code is a great option for me to get my ideas written down without the pressure of correct syntax. Here’s a simple example:
- English: “I have 3 books.”
- Pseudo-code: books = 3, books: 3, books -> 3, etc. (literally however you want!)
- Code in Java: int myBooks = 3;
No need to fully understand that line of Java, I just wanted to show that pseudo-code can be used as a stepping stone for translating English into code. Additionally, when I have a super complicated function to write, drafting it out in pseudo-code is really helpful for visualization and breaking down the problem into smaller pieces.
IDE (Integrated Development Environment):
When you write an essay for school, you might use word processing software such as Microsoft Word or Google Docs. When writing code for a coding project, software intended for writing out your code is called an IDE. Just like the title suggests, it’s an environment intended for development. It’s a place where you can write, execute, test, and debug your code, similar to the way you can use Word or Google Docs to write, edit, spell-check, and grammar-check an essay. Different IDEs support different languages and come with different sets of tools. I personally prefer VSCode because it’s free, works cross-platform (Mac, Windows, Linux), and I’ve yet to have a project that needs languages not supported by VSCode. IntelliJ is also great and has more functionality, but has a steeper learning curve.
Examples: VSCode, Visual Studio, IntelliJ Idea, Xcode, IDLE, etc.
Functions:
A function is basically a chunk of code that completes a task. Just like in math, some problems/tasks take one step to solve and others take multiple steps to solve. The same thing is true in coding! And to prevent having to write out all steps needed to complete a given task EVERY TIME we want it completed, we can just write them once, put them in a function, and simply use 1 line of code to call that function. “Call” just means the code is saying to the computer “hey when you get to this line of code, go to this specified function and complete the task inside that function.” The word “call” is used because the code is basically reaching out to that function to get a task completed. You can call a function as many times as you want!
Sometimes you may even give a function some information so that it completes its task based on that information. For example, if a function’s job was to add two given numbers together, you’d simply provide any 2 numbers you want whenever you call that function and it will add them for you!
To give a non-technical example of why developers use time-savers like functions, let’s say you just came up with your favorite dessert recipe and you wrote it down in your notes app. From that point on, you won’t need to write down the recipe every time you want to make it — it will just be ready for you in your notes app whenever you want to reference it.
A function is also sometimes referred to as a method or algorithm.
Variables:
Just like you can use functions to complete a task more than once, a variable is used to keep track of information for you so you can easily reference that information more that once (without having to type it out each time).
For example, assigning a value to a variable might look something like this:
appleCount = 20
Here we could be keeping track of the number of apples I have after going to the store, which right now is 20. Anytime I use appleCount in my code, I will be referring to that value 20, assuming I haven’t changed the value.
You might be wondering why I’d type out appleCount each time when I could just type out 20. Let’s say I go to the store again and buy 5 more apples. I could just write 25, but that would require me to do some math, and in more complex situations, I might not want to do any math. Instead, all I need to know is that I have 5 more apples than before, and I can do something like this:
appleCount = appleCount + 5
Now all of my apples are accounted for and no matter how many times I make changes to appleCount, it will always have the most recent value without me needing to remember it. Additionally, some values aren’t determined until after running the code, so we need a variable ready to store whatever value is calculated.
Loops:
These are one of the most common things you’ll see in programming, and they show up in almost every language. It’s basically a chunk of code containing a set of instructions that get executed over and over until a certain condition is met. For example, if you wanted to know the length of a word, you would say in English: “take this word, move one letter at a time through the word, and count by 1 for every letter until there aren’t any more letters.” In this case, each time a letter is counted, you have completed the loop once. And once the condition of the loop is met (which would be running out of letters in this case), it will stop looping, and the number you have counted to will be the number of letters in the given word.
Examples: for loop, while loop
Statements:
This is simply a line of code that performs a task. They make up the majority of coding files and can be inside functions, inside loops, or stand on their own. In the apple example earlier in this post, appleCount is a variable and appleCount = 20 is a statement.
Syntax:
This is exactly what it sounds like: syntax is the set of rules for a given language. As you learn more programming languages, you’ll notice that different languages require different syntax, and you have to follow the given syntax rules in order to avoid errors in your code. As a simple example, some languages require you to end code statements with a semicolon, while others don’t. If you try to execute appleCount = 20 in a language that requires a semicolon, you will get an error until you change the statement to appleCount = 20;
Running:
This one is super simple: it just means to execute your code. Super common phrases are “run this code”, “try running that”, “what happened when you ran your code”, etc. Some IDEs have buttons that say “Run” in which case you would just click that button to run your code. For IDEs that don’t have the “Run” button, there are super simple lines of code you just paste in the terminal (see definition below) at the bottom of your IDE and hit enter to run your code. The line of code needed depends on the language you’re coding in and they’re super easy to find if you just search “Terminal command to run code in X language” on Google.
Debug:
Simply put, if you try to run your code but you get an error, debugging is the technique of removing bugs (issues in your code that cause errors) from your code until there are no bugs left. There are super complicated forms of debugging and super simple forms of debugging, depending on the complexity of the error you get. Returning back to the syntax example, if you run this code:
appleCount = 20
In a language that requires semicolons at the end of statements, you’ll get an error. In a simple case like this, the IDE will actually tell you what the issue is and give you an error report that says “statement missing ; on line 1”, in which case you would debug this issue by adding the semicolon at the end of the line and run your code again. For more complex errors, an IDE may not be able to tell you exactly what is wrong with your code, in which case there are tons of resources online and classes dedicated to different debugging techniques and tricks to try.
Terminal:
This is the place where you can execute various commands. One example is if someone said: “Run your code” and there wasn’t a “Run” button in your IDE, you would open a terminal (which is usually done by something like File -> open Terminal) and type the run command associated with the language of the file you are trying to run. Most IDEs have terminals built into them, and all computers have their own terminal built-in. There are so many things you can do with your terminal other than executing code, but that’s a common task you’ll use it for. The terminal is also the place where you will see the results of any functions you are testing as well as any error messages that might come up when running your code.
GitHub:
In group school projects, we typically create a shared folder in Google Drive to store all project materials and allow collaborative work from multiple devices. GitHub does the same thing but is optimized for programming. In group programming projects, one group member would log into GitHub and create something called a GitHub repo (repository — which is just like making a Google folder) and share it with the rest of the group members so they can access each others’ contributions.
On the surface, a GitHub repo will look the same as a shared Google folder. You’ll see the main project folder containing more folders and files, and you’ll see update messages like “Jess edited ABC file 10 minutes ago.” So just like Google Drive, GitHub is used for storage and group access to changes other people make. The main difference is that, unlike Google Drive, you won’t be editing your files directly from the GitHub website. You could if you wanted to, but it’s bad practice because there isn’t an IDE built into GitHub, meaning that you won’t be able to run your code to see if any of your changes would cause errors. What you’ll do instead, in simple terms, is download a copy of this repo to your computer, make changes, and then upload your changes to GitHub. Since it seems like this adds unnecessary steps, GitHub has functionality where, after typing a simple line of code in the terminal, it will do some of those steps for you. For example, if you downloaded the repo and made changes to a file, you won’t have to go to GitHub’s website, delete the old file, and upload the newest version of the file. Instead, there’s a simple line of code you can paste into the terminal and it will do all of those steps for you.
Are there any other programming terms I missed that you have questions about? Email our technology blot at techblog@apartfromblonde.com!
Want to check out more content from Apart From Blonde? Click HERE!