Written By Liz Eggleston
Edited By Jess Feldman
Course Report strives to create the most trust-worthy content about coding bootcamps. Read more about Course Report’s Editorial Policy and How We Make Money.
Course Report strives to create the most trust-worthy content about coding bootcamps. Read more about Course Report’s Editorial Policy and How We Make Money.
High-level languages like JavaScript and Python may be the most popular programming languages today, but there’s no argument that these languages are doing a lot of work for the developer, from memory management to runtime interpretation. On the other hand, low-level programming has very little abstraction – you’re writing code much more closely to the computer. So why would you want to learn low-level programming? In this guide, a mentor and Holberton School student answer all your questions about low-level programming!
What You Need To Know:
Low level refers to code written directly for the computer – ie. Machine Code and Assembly.
Is C a Low-Level Language? Opinions are mixed! The only true low-level programming languages are Assembly and Machine Code, but these days, you can consider C to be a low-level or "intermediary" language.
Why Low Level? Understanding low-level programming is key if you want to work in Machine Learning or the Internet of Things. On top of that, understanding what’s going on under the hood makes anyone a better developer.
Olivier is a mentor at Holberton School where he helps students when they have questions related to low-level programming. He’s also the Chief Software Architect at FutureOn working in the oil industry. In the past, he’s led the development of GIS (mapping) libraries for mobile and built video games like Age of Conan.
Arthur Damm spent 7 years working as a private tutor in math, science, and programming (and had a year-long technical intern gig developing Java Android). Arthur chose Holberton School because of the accessibility of the ISA, the cool San Francisco campus, and a rigorous full-stack curriculum (which of course includes low-level programming).
In modern times, low-level programming is any language in which you (the developer) handle memory management. Any language where that memory management or garbage collection is done for you, which is now most languages, is considered “high level.”
Low-level programming is basically everything that is close to the hardware you are running your code on. It can have different meanings depending on your target. If you construct a building, you always start with the foundation and build on top of that. Low-level development is that foundation – if you start with high-level programming, then you don’t understand what’s going on underneath.
Pro Tip: "Garbage Collection" is when the system cleans up for you. In C programming, you have to clean up after yourself.
In the old days, C was considered a high-level language. Today, many engineers might laugh at that because C is now so low level. C and C++ are now considered low-level languages because they have no automatic memory management.
The definition of low-level has changed quite a bit since the inception of computer science. Today, we would not qualify C as a low or high-level language, but rather more like an intermediary language. The only true low-level programming is machine code or assembly (asm). Assembly is as close as possible to what the CPU (the computer's processor) can execute, as it is literally a text translation of the binary code which the CPU understands. For example, compression libraries are typically built in C, and very specific parts would be built using assembly, but the amount of assembly is getting lesser because compilers are getting so much better at optimization.
Arthur: I consider C a low-level language nowadays. Certainly, it is the primary language that Holberton uses in the low-level curriculum. So for me, C is low level because when using it we have to manage our own application memory, it is not managed for us by the language. This requires us as engineers to take total responsibility for our actions. This means our mistakes will tend to be catastrophic but the rewards are substantial in terms of efficiency and power consumption on whatever device runs our code. Also, being a C programmer can be inherently satisfying if you like to understand the technical details of your work.
Low-Level Programming | High-Level Programming |
---|---|
Code is written directly for the computer. | Any language where memory management or garbage collection is done for you. |
The only true low-level programming languages are Assembly and Machine Code. These days, C is considered a low-level or "intermediary" language | Python and JavaScript are two examples of high-level languages |
Low-level programming is still used in IoT and wearables/hardware – where the amount of energy a device uses is crucial. |
High-level programming is the go-to in most web development projects. |
No automatic memory management – because this is up to the engineer, the rewards are substantial in terms of efficiency and power consumption. |
Because memory management is done for you, expect less efficient and more computationally intensive code. |
Olivier: Generally speaking, high level means that you can use a lot of abstraction to accomplish what you want. In low level, you will only have a standard set of functions.
Arthur: In the first nine months of Holberton School, we learned two high-level languages: Python and JavaScript. All higher-level languages like Python, Javascript, etc, are built out of C. By understanding how they work under the hood, I can better write my high-level code to act in accordance with its internal design, providing superior application performance with deeper awareness of errors. Also, because C is so rigorous, when switching to a higher-level language the programmer has the feeling of taking off weights and experiencing a sense of expressive ease.
Pro Tip: When you want to add new features to Python, that's called an extension. And those are actually written in C! For some of Holberton’s advanced assignments, students actually write the C code that goes underneath Python, and then test them together to see it working.
If most high-level languages are doing memory management and garbage collection for you, then what's the point of knowing low-level programming?
In engineering, there are no perfect solutions. There are only trade-offs. When a language handles memory management, it’s way easier for the engineer to work. Your messes are cleaned up for you. However, the trade-off is that this generally creates less efficient code, which is more computationally intensive. Practically, that means it will cost more power on a cell phone, laptop, smart sensors, or components in a smart appliance. The amount of energy a device uses is actually significant in embedded systems and in wearables.
Low level programming becomes especially important in the Internet of Things (IoT) and wearable devices, where efficiency in power consumption is actually the most important consideration.
Secondly, all of the high-level languages are built off of low-level languages. You’ll need low-level programming to sustain and keep developing those high-level languages.
Olivier: While there is a big push to be able to use high-levelless efficient code, which is more computationally intensive language to be able to write low-level things like drivers for graphics cards, low level languages are still needed for performance. For example, everything relating to encoding or decoding and encryption will probably use low level programming, with C and probably some assembly to use extended instruction (like AVX, SSE, etc). Basically, everything that needs high-performance and fine tuning will require a bit of low level programming.
Olivier: Any job related to embedded software development, and building code that needs to run fast. If you understand low level programming, you will probably understand anything that goes above. When I’m recruiting and the applicant gets stuck on a React problem, I want to see that the developer is able to read code and understand what the library is doing.
Also, if you want to work in GPU programming using “high level” languages like CUDA or OpenCL, you’ll need to understand low level programming. In GPU (graphical process unit), everything is massively parallel and the way you format your memory is actually as important as the actual code.
Arthur: I'll be looking for jobs in the Internet of Things or embedded systems. My goal is to work on an interesting project and, of course, to apply my low-level C programming skills.
Should you learn low-level programming before learning a high-level language like Python or JavaScript or Java?
Arthur: The answer to that will depend on the type of engineer you want to become. If you want to optimize the shortest training time, you should ignore low level, go straight to JavaScript or Python and just practice that one thing and get good enough at it to start working.
But I’ve really grown to appreciate the idea of Holberton School – they’re an alternative to a traditional four-year computer science degree, which is inherently a more rigorous and technical level of engineer. In that case, I think starting with C is ideal, because it requires you to understand all the details in a very relevant way. For example, by learning C first, we actually become much more capable when we move on to Python.
Olivier: If you want to improve your skills as a developer, you need to understand how the computer is working, even when the details are hidden from you. If you learn how to program in C first, then you will have a much easier time with high level languages later on.
Do you need to know math for low level programming?
Arthur: Computer science breaks down into numbers, so we can't get away from math in low-level programming. You should become familiar with advanced algebra. You won't need calculus-level mathematics, but you will need at least full high school mathematics when you're dealing with certain problems as a low level engineer.
Low Level Programming at Holberton School
Our first nine months (called Foundations) is a full stack curriculum, meaning we learn low-level and high-level languages. Foundations are an excellent general introduction to all layers of the stack, that is: low-level, high-level, devops, databases, and portfolio projects. We learn almost exactly three months of C programming. And then in Specialization we pick up wherever we left off in that part of the Foundations stack. In my case we continued with technical systems programming in the low-level C language. So we learn how to write our code in the way that is written for Linux, which is considered the standard operating system of the engineering world.
The foundation of C is important, because it gives Holberton students the base to build upon. If you know C, there is a high probability that you will be able to understand any imperative language thrown at you. As a plus, you will understand how memory works. Holberton School’s 9 month specialization is basically a condensed kickstarter to help you become better faster in the branch of computer science you like.
Example of a Low Level Programming Project
Arthur: For the most part so far, we've been replicating components that exist in the Linux operating system. Linux is considered a work of engineering art. Currently, we're working on the shell or the command line. That involves quite a bit of advanced system programming.
For our weekly algorithm practice, we recently studied a very interesting pattern matching algorithm called the KMP, Knuth–Morris–Pratt substring-search. It's really technical, but also surprisingly accessible. I always get a little mental buzz when I first learn a new algorithm and really start to understand it.
How can someone get started in Low Level Programming?
Olivier: We are lucky to live in a time where information is everywhere. I recommend a book called The C Programming Language by Dennis M. Ritchie and Brian W. Kernighan (the creators of C).
My advice to every student is to read code! In the beginning, this is hard, but you’ll become better at it. My foundations in C have helped me so much over the years.
Find out more and read Holberton School on Course Report. This article was produced by the Course Report team in partnership with Holberton School.
Liz Eggleston is co-founder of Course Report, the most complete resource for students choosing a coding bootcamp. Liz has dedicated her career to empowering passionate career changers to break into tech, providing valuable insights and guidance in the rapidly evolving field of tech education. At Course Report, Liz has built a trusted platform that helps thousands of students navigate the complex landscape of coding bootcamps.
Hack Reactor's Zubair Desai shares how bootcampers should (and shouldn't!) use GenAI...
Lighthouse Labs walks us through cybersecurity jobs across 6 different industries!
Why You Should Learn CSS If You’re Not a Software Engineer
A Fullstack Academy instructors shares how AI is used in Data Analytics!
Codesmith CEO Will Sentance walks us through the importance of software engineers in the AI age
Plus, find out how to learn WebXR to become a WebXR developer!
Find out how AI is used in digital marketing!
TripleTen career coach Sharahn shares results from their recent employer survey!
10 bootcamp grads share their insights on what to expect at a hackathon!
Plus, 5 AI tools used by today's product managers!
Sign up for our newsletter and receive our free guide to paying for a bootcamp.
Just tell us who you are and what you’re searching for, we’ll handle the rest.
Match Me