FB pixel

What is the best programming language to learn as an EE?

Published


At CircuitBread, we hope that we’re able to provide help in many different ways to aspiring engineers and engineering students. While we don’t focus on programming or computer science very much in our tutorials (other than some basic firmware development for our PIC10F200 using assembly and C for our PIC18F14K50 series), we do think it’s important enough to address. There is a surprisingly large dependency by electrical engineers on different programming languages, and the majority of engineers use one programming language or another at some point in their careers. Of course, the real question is, what is the best programming language to learn as an electrical engineer?

The biggest challenge in answering what the most important language is for electrical engineers is that electrical engineering covers a wide range of different areas of focus. From designing specifications for commercial and residential construction to researching semiconductor devices, a career in electrical engineering can look wildly different from one person to another. Thus, the most important languages depend on your interests and what exactly you’re doing.

Many of us engineers here at CircuitBread focus on embedded systems and microcontrollers. For us and those who share this interest in embedded systems, C is essential. C is so popular that there are even other languages that are basically pseudo-C, such as the Arduino programming language. C++ can also be incredibly helpful, depending on how complex of a system you’re designing. Going the other way, assembly is useful but more specific to each microcontroller architecture. While we use assembly exclusively in the PIC10F200 series, some examples cannot be translated to other microcontrollers, even in the PIC family, let alone to other manufacturers. This was painfully demonstrated when Microchip updated their compiler from MPASM to XC8 and rendered a large chunk of our sample code in the tutorials unusable. In general, the more abstraction in the language, the less likely something like this will happen.

For EE’s that want to move down a level from microcontrollers to designing hardware itself, VHDL or Verilog are extremely common in digital hardware design. When you first learn about digital logic, you start with individual gates and Karnaugh maps and all of these fascinating and interesting tools. However, they do not scale well. If you plan on doing any sort of significant digital hardware design, you will need to learn VHDL or Verilog. Verilog seems to be more prevalent, but there are strong opinions on the topic that I don’t have the time or inclination to tackle, particularly when Digilent has done such an excellent job addressing this. For what it’s worth, we’ve planned on creating an FPGA digital hardware design course and haven’t decided which one we want to use yet. Whichever language is used, digital hardware design is amazing due to the ability to massively parallel your processing, ignoring timing constraints that are created by microcontroller architecture.

For handling data such as image processing, signal processing, control systems, and machine learning, MATLAB (or its freeware clone, Scilab) is a powerful tool that is used both within academics and industry. As it is applicable to such a wide range of engineering fields, it's a good generic tool for many electrical engineering subsets. If you’re in college right now and trying to decide if you should skate through the classes that use MATLAB or really buckle down and learn MATLAB, take the time. You shouldn’t be skating through any of your classes, but MATLAB will almost certainly come back and benefit you at some point, both within the school and out in the industry.

Python has grown popular due to its user-friendliness and flexibility, and from the perspective of an electrical engineer, it's great for automating data analysis tasks. Python is notoriously forgiving and intuitive, decreasing the barrier to entry for an electrical engineer just to whip something up to solve the problem at hand. This almost feels like the cooking equivalent of cooking pancakes - everyone should be able to cook some quick pancakes, and it’s not that difficult to do if you have the pancake mix.

Veering into a language that may yield some debate, I want to mention Java. Java is very popular among computer scientists, and while it seems to have lost a bit of traction in the last few years, it is still a very common language. For computer scientists. For electrical engineers, not so much. I look forward to the many comments disagreeing with me but my personal experience has never had me, or any of the CircuitBread engineers for that matter, use Java outside of academia. Yet, as electrical engineering programs tend to use computer science departments for their programming classes, it is still used for teaching object-oriented programming in many electrical engineering curricula. However, unless there is a specific need from a potential employer you’re pursuing, I would not prioritize learning Java.

While the physics behind the foundations of electrical engineering are immutable and unchanging, the languages utilized in businesses worldwide are a constantly moving target. Fortunately, many of the languages mentioned have been around for a long time and will hopefully be just as beneficial for the next 10-30 years. While there are other languages an electrical engineer could learn, Verilog/VHDL, C, Python, and MATLAB are most likely the tools you'll use in your career as an electrical engineer. It's good to have a basic understanding of these languages, even if your job doesn't require expertise in all of them. We do like to get second opinions, and we recommend you go read the opinion of one of our Friends of CircuitBread over at OnlineComponents.com!

Authored By

Josh Bishop

Interested in embedded systems, hiking, cooking, and reading, Josh got his bachelor's degree in Electrical Engineering from Boise State University. After a few years as a CEC Officer (Seabee) in the US Navy, Josh separated and eventually started working on CircuitBread with a bunch of awesome people. Josh currently lives in southern Idaho with his wife and four kids.

Make Bread with our CircuitBread Toaster!

Get the latest tools and tutorials, fresh from the toaster.

What are you looking for?