Electronics > Beginners
what is the most relevant programming language for ee?
brucehoult:
--- Quote from: tggzzz on November 04, 2018, 11:36:18 am ---Fifth point: if you know alternative tools and strategies, they can improve your designs and implementations even if you use a different language. FSMs in C are the canonical example, e.g. see this current topic: https://www.eevblog.com/forum/microcontrollers/state-machines-is-this-topic-taught-any-more/msg1931161/#msg1931161
--- End quote ---
I know, use privately, and at various times in the last 20+ years have tried to persuade employers there are advantages in using: Scheme, Dylan, Ocaml, Haskell
No one cares. Even if I do a project in Dylan in a tenth the time it can be done in C++, they'll say they can't hire anyone who knows it.
That's realistic, by the way. In 2002 I used Dylan for one work project. It took a day, and was in production for years. At some point after I had left a modification was needed. They had someone (a talented guy) rewrite it in C++. It took him two weeks. He told me he understood my code and how it worked instantly, even though he'd never seen Dylan before, but it simply took far more code to do the same thing in C++. The performance of the C++ version was no better. And it was ten times as many lines of code.
At the same job in 2002 I was assigned by one of the company founders to implement custom telephone call and SMS processing steps using Scheme. Using continuations I was able to make it far simpler to write such code -- basically you write the code for any given call as if there were no other calls existing. Usually, you'd have to break everything down into states and write a big switch statement in C with explicit management of states. This is very annoying if you want to call common subroutines in different kinds of call processing and those themselves have internal states (e.g. playing an audio message and then waiting for a DTMF tone). You can't use OS or normal library-provided threads for this because you can have literally millions of calls in progress at the same time and you'll simply run the machine out of resources (RAM or PIDs or both).
A modern analogue of this is node.js.
At some point the founder who supported the "Scheme Node" (this is literally what it was called) left the company and my work (again: in production without any problems) was ripped out of the product.
Now I don't bother trying to be an evangelist for better programming language technology. I just use C, as they want.
tggzzz:
--- Quote from: brucehoult on November 04, 2018, 09:52:30 pm ---
--- Quote from: tggzzz on November 04, 2018, 11:36:18 am ---Fifth point: if you know alternative tools and strategies, they can improve your designs and implementations even if you use a different language. FSMs in C are the canonical example, e.g. see this current topic: https://www.eevblog.com/forum/microcontrollers/state-machines-is-this-topic-taught-any-more/msg1931161/#msg1931161
--- End quote ---
I know, use privately, and at various times in the last 20+ years have tried to persuade employers there are advantages in using: Scheme, Dylan, Ocaml, Haskell
No one cares. Even if I do a project in Dylan in a tenth the time it can be done in C++, they'll say they can't hire anyone who knows it.
That's realistic, by the way. In 2002 I used Dylan for one work project. It took a day, and was in production for years. At some point after I had left a modification was needed. They had someone (a talented guy) rewrite it in C++. It took him two weeks. He told me he understood my code and how it worked instantly, even though he'd never seen Dylan before, but it simply took far more code to do the same thing in C++. The performance of the C++ version was no better. And it was ten times as many lines of code.
At the same job in 2002 I was assigned by one of the company founders to implement custom telephone call and SMS processing steps using Scheme. Using continuations I was able to make it far simpler to write such code -- basically you write the code for any given call as if there were no other calls existing. Usually, you'd have to break everything down into states and write a big switch statement in C with explicit management of states. This is very annoying if you want to call common subroutines in different kinds of call processing and those themselves have internal states (e.g. playing an audio message and then waiting for a DTMF tone). You can't use OS or normal library-provided threads for this because you can have literally millions of calls in progress at the same time and you'll simply run the machine out of resources (RAM or PIDs or both).
A modern analogue of this is node.js.
At some point the founder who supported the "Scheme Node" (this is literally what it was called) left the company and my work (again: in production without any problems) was ripped out of the product.
Now I don't bother trying to be an evangelist for better programming language technology. I just use C, as they want.
--- End quote ---
I've been making very similar points in the last day, in the thread about state machines, especially
https://www.eevblog.com/forum/microcontrollers/state-machines-is-this-topic-taught-any-more/msg1939237/#msg1939237
w.r.t domain specific languages.
Nonetheless, that doesn't change the point that some languages are some suited to some domains than others. Unless, of course, you really believe that an EE should use C to analyse analogue circuits or RF structures!
bsfeechannel:
In short, solder, C, HDL, Matlab and Chinese.
Nusa:
I'd add that if your plans include programming your own micro-controllers, doing at least one small project in assembly is a valuable learning experience. Especially if you think micro-controllers run directly on C or C++.
On the other hand I don't claim to be a real engineer. My degree is in CS, but I spent many years in the embedded world among hardware people and understand the digital world quite well. Analog not so much, beyond basic stuff like noise filters and decoupling capacitors. Hardware is a hobby for me.
Crazy_Pete:
Hi again all!
I would like to really underline that C is obsolete and if you have no experience in programming you should forget C (it will only teach you bad thoughts) and go right ahead to learning C++. Java was originally designed to be the embedded language of the future. (The idea was every CPU would have a java interpreter built into hardware and thus execute quickly.) For many reasons that never came to pass. However Java is a great learning tool and is certainly the place to start, NOT C!
Honestly the 2 languages that i see all the time that i wish i had learnt long ago really are Python and Simplified Chinese. There is a tonne of stuff out there from low level embedded code (the raspberry pi crowd are all over python) to high level UI stuff on desktops. I think you will find an investment in learning python to be of value simply to be able to read code that you will encounter in your career.
Thanks
Crazy Pete
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version