Isn't C a programming language for electronical engineers?

Thread Starter

enesene

Joined Mar 3, 2020
29
I am Electronical Engineering and i am learning C language to get ability for my job but all i learned is not related yet. It was like, reverse numbers, swap numbers, number-alphabet-star triangle..

All Electronical Engineering job offers want employers to know at least a language like C, c#, python.. But why? I don't think they just want to program "number triangle"..
 

MrChips

Joined Oct 2, 2009
30,802
Every engineer should and must learn a programming language. It doesn't matter electrical, electronic or any other. It doesn't matter which programming language.

Why are you given exercises such as reverse numbers, sort numbers, perform binary search (successive approximation)?

Because engineering is about problem solving.
Programming teaches you how to create algorithms and procedures to solving a problem.
 

WBahn

Joined Mar 31, 2012
30,052
I am Electronical Engineering and i am learning C language to get ability for my job but all i learned is not related yet. It was like, reverse numbers, swap numbers, number-alphabet-star triangle..

All Electronical Engineering job offers want employers to know at least a language like C, c#, python.. But why? I don't think they just want to program "number triangle"..
This is like someone learning to play a violin and complaining about all they've learned so far is about how to hold the bow and how professional conductors don't just want people that can hold a bow.

Regarding the claim in the title, C is NOT a language for "electronical" (whatever that is) engineers. It was a programming language written for the purpose of writing operating systems (Unix, specifically).
 

Thread Starter

enesene

Joined Mar 3, 2020
29
You're right but i already finished C lessons, but all i learned are like using for software programming. And I guess that basic of c is enough for me. Could you give me any advice what to do next for embedded systems programming.
 

MrChips

Joined Oct 2, 2009
30,802
You're right but i already finished C lessons, but all i learned are like using for software programming. And I guess that basic of c is enough for me. Could you give me any advice what to do next for embedded systems programming.
Learn to write more code in C.

Here is an engineering programming example.
Given the resistance of thermistor, display the current temperature in degrees C, F, and K to 0.1° resolution and accuracy.
 

BobaMosfet

Joined Jul 1, 2009
2,113
I am Electronical Engineering and i am learning C language to get ability for my job but all i learned is not related yet. It was like, reverse numbers, swap numbers, number-alphabet-star triangle..

All Electronical Engineering job offers want employers to know at least a language like C, c#, python.. But why? I don't think they just want to program "number triangle"..
'C' is a programming language for EVERYTHING. In fact, virtually all the other high-level languages were originally written in it. Most real operating systems and compilers are written in C. The entire internet is best served by servers running 'nix O/S'es which were written in C.

Electrical Engineering jobs want you to know C because it is the most commonly used language in embedded systems. Why? It is the most powerful language- in terms of having no restrictions, and the ability to do anything on a processor as efficiently with the most performance as possible without dropping to using assembly language . But it also means _you_ as the developer must take the most responsibility to learn how to properly control and manage that power.
 

djsfantasi

Joined Apr 11, 2010
9,163
Learn to write more code in C.

Here is an engineering programming example.
Given the resistance of thermistor, display the current temperature in degrees C, F, and K to 0.1° resolution and accuracy.
Here is another electronics assignment using C. Write a control language to control a variable collections of motors. Without the exercises which you have completed, you won’t be able to complete this task.
 

DickCappels

Joined Aug 21, 2008
10,170
C is for software engineers, but the rest of us can use it too. It is a good idea to become familiar with some high level languages (C, Pascal, Fortran (ugh!) Basic) and something low level like assembly for a popular chip or controller, as they may come in handy during your career if your career might involve programming something for some reason.

C is probably the most commonly understood programming language. A good place to start.
 

dl324

Joined Mar 30, 2015
16,916
All Electronical Engineering job offers want employers to know at least a language like C, c#, python..
One language isn't enough. I used about a dozen in my career as a design engineer. My education was in electrical engineering, but I spent most of my career doing software development. I took a total of three programming classes in school; 2 in high school (one taught at a junior college), and one in college. Plus dozens of one week training courses for specific languages.
 

djsfantasi

Joined Apr 11, 2010
9,163
I agree with @dl324. You eventually need to know several languages. The day will come where you are faced with a new language, and knowing the others will let you be successful.
 

xox

Joined Sep 8, 2017
838
I've been working on a project lately where C is absolutely required. It's really forced me to look at things in a different way. Since all of the code has to be in C, I need to approach the project carefully in order to make sure the design is clean and modular. I've been doing a good job at that, apparently, as everything's been coming together quite nicely - thankfully. If all goes well, I'm looking forward to spending my summer on a sailboat. So wish me luck!

C was the first programming language I ever learned, by the way. Before that I literally had no idea how a computer worked. But in short time I had a much better grasp. And I credit the language for that. It exposes you to enough low-level details that eventually it all begins to just "click". I also feel like it made learning other languages almost trivial. I know for a fact it doesn't usually work so easily going in the other direction. Imagine someone starting with Javascript then moving on to something like C for example. Much bigger learning curve...
 

BobTPH

Joined Jun 5, 2013
8,952
Learning programming and learning a programming language are two different things. You can master the concepts of programming in any language, and that knowledge will transfer to any other language.

You could also learn a programming language without learning how to program, which would be useless.

The exercises you were given in your C class were more oriented to learning how to program than learning the C language.

Bob
 

SamR

Joined Mar 19, 2019
5,040
The only applied programming course I took was a math course in numerical analysis. We had to code our homework on punch cards in PL1 (programming language one) because the IBM 360 we were using didn't have enough oomph to run Fortran. We'd turn in the printouts for grading. Other than that it was a course in Fortran Programming to learn the code structure and use. Everything else I had to learn on my own...
 

MrChips

Joined Oct 2, 2009
30,802
As I have said many times before, writing code is the last thing you want to do (or next to last).

Before you start writing code you should have had the design and algorithms completed. With reference to the previous comments, this is the "learning how to program" part.

In other words, the solution is not dependent on the programming language.
 

xox

Joined Sep 8, 2017
838
The only applied programming course I took was a math course in numerical analysis. We had to code our homework on punch cards in PL1 (programming language one) because the IBM 360 we were using didn't have enough oomph to run Fortran. We'd turn in the printouts for grading. Other than that it was a course in Fortran Programming to learn the code structure and use. Everything else I had to learn on my own...
So they would run the submissions and then grade them based on the output?

Your generation was exposed to SO MUCH low-level detail back those days. What a time to be alive though! Granted, it was a pretty expensive hobby back then and probably very frustrating at times for the simple fact that computers just didn't have the capabilities they have today. But still a pretty cool era for computing.
 

SamR

Joined Mar 19, 2019
5,040
The teacher never left his office. We wrote the code, typed it in on a cardpunch. Booted up the computer with an old disk stack containing the operating system and PL1 compiler and ran the cards through the reader that would input the file and run it. Maybe it ran, maybe nothing happened, maybe after several minutes of printer running nonstop you finally figured out that it was stuck in an endless loop and have to kill the computer and reboot it from the diskstack that had the operating system on it. Then if we had a printout showing the code and that it ran with the data outputted we turned the printout in to the teacher. No monitors, just a keypunch, card reader, computer and printer. But we were using it to solve matrix equations. Something a sliderule didn't do.
 

Delta Prime

Joined Nov 15, 2019
1,311
But we were using it to solve matrix equations. Something a sliderule didn't do
A sliderule what's that? Is it kind of like the Motorola 6800 Assembly language used for my senior project for 286 processor bring 5 and 1/2 floppy's back crunch crunch eek eek. Oh wait a minute I found it slide ruler.
a4347eb18ad0215a3fd9f0609f545500.jpg
 
Top