⭐ Texas educators: our K-5 Tech Apps curriculum is a state-approved instructional material. Learn More.
Customer Experience Specialist
Just as there are thousands of spoken languages around the world, there are thousands of programming languages in use today. Programming languages have been developed as a “system of communication” for multiple purposes and solve various problems, like spoken languages are tailored to a particular country or community.
Like spoken languages, programming languages are continuously evolving. They are created to be useful to us, and when they are no longer useful, we adapt them. The sky’s the limit on how many new programming languages will be developed as new technological needs are identified.
In this blog, instead of focusing on the infinite number of programming languages and how they are different, we’re going to focus on how they’re all THE SAME! As defined above, programming languages are the principal method of communication for a computer by using words, symbols, and punctuation in a very structured way. Because computer science is much more than learning programming languages, the good news is this… you don’t have to know them all. Fortunately, by understanding (and teaching your students) the following four core programming concepts that all programming languages have in common, you will create that necessary foundation for adapting to current and future languages. These concepts will be used when teaching computer science basics for beginners as well as through high school computer programming curriculum and beyond. So, what are the fundamentals of computer science found in every programming language? Read on to learn about abstraction, sequencing, control structures, and data structures.
Understanding the process of abstraction as it relates to programming is perhaps one of the most important core concepts to understand. It is one of the fundamentals of computer science and software development. According to John V. Guttag, a computer scientist, professor, and former head of the department of Electrical Engineering and Computer Science at MIT, “the essence of abstraction is preserving information that is relevant in a given context, and forgetting information that is irrelevant in that context.”1 In other words, the goal of abstraction is to reduce complexity by removing all of the unnecessary information. This is what creates a comfortable, easy user experience without having to know everything that’s going on behind the scenes.
A relatable, non-technical example is baking a cake from a box versus making it from scratch. The mix in the box is a simplified version of all the dry ingredients needed to bake that cake. This makes the process of baking easier and saves you time when you don’t have to worry about combining the flour, sugar, baking soda, or baking powder. A detailed list of ingredients has been abstracted and simplified for you. If we abstract this to a higher level, what you see represented in the final cake is the embodiment of all the ingredients and steps that went into making that cake.
Abstracted layers provide simpler versions of the same processes by embodying all that lies beneath it. What starts as a very granular, complex implementation of a program becomes a much more common and understandable process thanks to abstraction.
Another foundational concept in all programming languages is sequencing. Sequencing is outlining a proper order for instructions and patterns when writing code. You can better appreciate the value of sequencing when you learn more about algorithms, the use of proper syntax in code, and more specifics about functions, methods, parameters and operators. All of these elements can be found in any programming language.
An algorithm is a list of steps followed in order to complete a task (run a program). Through the lens of sequencing, the steps that make up the algorithm must be followed in exactly the right order for the task to be completed. Both the order of the steps and the level of detail are significant when it comes to writing algorithms. All programming languages create programs by coding these algorithms in a way that a machine can understand. To teach algorithms in the classroom, try out this free Scratch lesson. It is a downloadable fundamentals of computer science pdf that is sure to get your students excited about programming!
Syntax refers to the specific structure, grammar, and punctuation rules that must be followed for that programming language. Programming languages will differ in their syntax rules when writing and formatting lines of code, but proper syntax plays a role in how ALL languages are written and interpreted by the computer. For example, just as a period designates the end of sentence in written language, there is punctuation in programming languages to organize code and tell a computer a command has ended before it can move on to the next line. If there are any errors with the syntax of code, a program will not run successfully. Check out an example of syntax in this free lesson for Python fundamentals of computer science high school.
If we think of algorithms as the list steps in a program, functions and methods are helpful procedures to implement those algorithms. More specifically, functions are self-contained modules of code that accomplish a specific task. Methods are procedures associated with an object, and how that method is implemented then determines how data is manipulated. Finally, parameters and arguments are values passed to the functions as data for the algorithm to digest. So, as it relates to the art of sequencing in programming languages, recognizing the presence of these procedures in code and knowing their role is to influence how data is presented to the computer is important. Introduce functions, methods, parameters, and arguments with this free lesson for grades 3-5. The lesson comes from our fundamentals of computer science course. Check out all of the courses we offer in our K-12 computer science curriculum here.
In programming languages, an operator is a symbol that tells code to perform certain operations to produce a final result. Operators will always be a symbol (or a group of symbols) that is mathematical, logical, or relational in nature. Even in programming, the order of operations still matters because they tell a computer what next steps to take. Learn more about specific types of operators in the charts below:
Next, control structures in programming languages influence the flow of the code and how the computer determines what to do next. A control structure is a block of programming that analyzes variables and then chooses a direction to go based on given parameters. These structures also allow computer scientists to write code more efficiently and accurately. The following examples of control structures exist in all programming languages, though the specifics of how they are written may vary.
Loops are one of the most basic and powerful programming concepts. A loop is an instruction, or set of instructions, that repeats itself until a specific condition is met. In the loop structure, the loop asks a question, and if the answer requires action, it is executed. The same question is asked again and again until no further action is needed. Looping in any programming language saves programmers time by not having to type a set of code instructions numerous times and allows for easier changes and debugging if the set of instructions is only written once (and repeated) versus multiple times in the program. To get your students started with learning loops, download this free lesson for grades K-2 or this free lesson for grades 3-5.
Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. See http://scratch.mit.edu
When a computer comes to a point in an algorithm where it has to choose to do one of two (or more) things, we call it branching. Branching allows programmers to control the flow of execution by ‘jumping’ to a different part of the program. There are many control structures used in programming languages, but the most common programming “statement” used to branch is the “IF” statement, or the “IF-THEN” statement. This is an example of a control structure in all programming languages called a conditional. Triggers and Events are other common branching elements that help control the flow of code in any program.
Last but not least, let’s talk about data structures! In a nutshell, data structures help a programmer organize and process data. Numerous types of data structures exist, but as with the previous three concepts, they will appear and play an essential role in all programs regardless of the programming language. The type of data structure you use will often be determined by how quickly you need to be able to do certain things to the data and how often. Some of the more common examples of data structures you will find among line-coding (and block-coding) languages are:
A variable serves the same purpose in programming languages as in mathematical equations. They are placeholders for data, or information, that may or may not change. Variables can hold only one piece of data at a time, but that data could be many different things, including integers, strings, booleans, and arrays (mentioned below). Variables allow data to be used and manipulated throughout a program.
As mentioned above, variables represent multiple types of information throughout any program. This allows the same program to run, but perhaps produce a different result based on how those variables are populated (or are entered). Usually a combination of the following data types will appear in a program.
Knowing what we know now about variables and data types, let’s clarify how data structure types fit into this picture. Variables hold the spot for data to be entered. Data types are the various forms of data that will be entered in the place of those variables. Data structure types include a collection of data, or variables, organized in such a way that allows for easy access and modification. Some of the more common data structure types a programmer will use in any programming language are objects, arrays, and linked lists. Although data structure types can be called different names amongst programming languages, they are necessary to organize and provide ‘structure’ to groups of variables (data).
To summarize, programming at its basic level is writing instructions (or algorithms) in an organized fashion (through code) so that a computer can understand it and successfully carry out tasks. Programming languages are what allow us to communicate to computers and, as with all languages, certain structure and syntax rules apply. Various structural elements also exist to help with the flow of all languages, so thoughts (or steps) make sense and whatever needs to be communicated is done so effectively and efficiently. So if you’re asking yourself, what is the importance of computer fundamentals? Its that they are essential in EVERY programming language!
When you focus on how all programming languages are THE SAME rather than how they are different, it becomes easier to categorize the commonalities. Additionally, we offer a free professional development over the core programming concepts to help you learn more. When you soar above all the technicalities to a 10,000 foot view of the world of programming, you simplify your experience so it’s more applicable to your purpose. We hope you find this abstraction helpful(see what I did there), so that with current programming languages or those yet to be developed, the core concepts of abstraction, sequencing, control structures, and data structures can be identified and are more familiar.
When you’re ready to take your students’ computer science knowledge to the next level, explore our computer science curriculum offerings for grades K – 12.