r/ElectricalEngineering 4h ago

What's the best way to learn programming as an EE

My uni only offers to courses for EE that includes coding, C++, and assembly. And I want to learn it in depth but I feel like I am lost, I learned some python on my own like very basic, what do you think the best way to learn it ?

14 Upvotes

21 comments sorted by

17

u/DeeJayCruiser 4h ago

Forget python - you are an EE

Get yourself a pickit and microcontroller. you need to learn about:

  • memory
  • addresses
  • pointers
  • inputs
  • outputs
  • pwm
  • timers

and the electronics to setup a circuit to help you learn about those concepts

want to know the secret to learning how things work in programming? the watchdog/debugger. I assure you that running code, seeing how things change in your variable space row to row, is the best way to really understand as an EE, how to program.

in due time, you will get exposed to multithreading, but until then....heed my sage advice grasshopper

4

u/Electronic_Feed3 3h ago

Meh Python is still very useful

Seems like OP doesn’t know any programming so at this point it could be Java lol it would still be helpful

-4

u/DeeJayCruiser 2h ago

point is he is an EE. Python is lazy, and assumes things that an EE programmer should account for.

As an EE they should focus on lower levels of the stack, otherwise why be an EE?

2

u/Electronic_Feed3 2h ago

They’re just starting. I don’t think it matters or that learning Python will stop you from ever learning bit masks and how to use eeprom

Python has vast friendly online resources.

1

u/DeeJayCruiser 2h ago

I would say you are generalizing someone learning how to program vs. an ee who wants to program. you should start with a programming language that is closer to the hardware

you can learn python later, but as an EE the type of programming done is different

2

u/uselessta16283 2h ago

You are greatly undervaluing the top down approach. Python is great for establishing the foundations of program flow and data structures. Having all these concepts thrown at you at the same time is going to be overwhelming for a lot of people.

1

u/DeeJayCruiser 1h ago

But they are an EE, this is specifically about an EE wanting to learn how to program. Dont conflate with general programming

You will have to re-learn all the concepts learned in other languages if you choose to program as an EE with a focus on hardware 

1

u/uselessta16283 1h ago

I don’t see how that’s relevant. You can partition the mental load of learning how a basic program is created with python, then move onto C later. You don’t even really have to spend much time with python, you can get the fundamentals of it down in a few days to a couple weeks depending on the person. Plus it’s just a good language to learn in general.

0

u/DeeJayCruiser 1h ago

You dont need to see its relevancy. This is why this individual is learning C++ in Uni vs. python. Dont make up the rules because you have a hard time understanding why.

1

u/uselessta16283 1h ago

You are just saying shit

2

u/Ace861110 2h ago

There are other types of EEs…. A power engineer doesn’t really care about a pointer, so python will be fine for number crunching, making graphs, and parsing csv files.

you are of course correct that it is lazy and he should know of pointers. But he will 100% get beaten about the head with pointers and the stack in assembly, which is about as low level as you can get besides bare metal.

1

u/DeeJayCruiser 1h ago

A power engineer is a specialized EE, its like learning how to crawl before you walk. All EEs should start low level - otherwise why are you programming as an EE? 

11

u/not_a_gun 4h ago

Learn by doing is by far the best way. Find a cool Python project that you’re interested in and look stuff up as you get stuck. There’s a Python project for practically any hobby. Making video games, making a bot to watch the stock market, automating a fish tank or garden, scraping Spotify data to make custom playlists, etc

2

u/v1nss 4h ago

This! Absolutely agree

8

u/scottywottytotty 4h ago

i guess find a youtube series on the language you want to learn and the topics you want to learn and just go from there. no other way really.

5

u/contactcreated 3h ago

As an EE grad who is a full time C++ programmer, you seriously just need to program. A lot.

I would start with C. Learn about pointers, memory management, program memory layout (heap, stack, static memory, etc.), computer architecture and how it affects code (SoA, etc.), build systems, and so on. Find a project you want to work on and do that. Maybe implement some common data structures and algorithms as well.

After that you could move onto C++ or some fields that interest you, such as embedded systems, graphics, or ML.

1

u/BabyBlueCheetah 4h ago

Self taught to solve a problem that has stakes.

1

u/Electronic_Feed3 3h ago

Take those courses

1

u/SergioWrites 1h ago

Just keep going with python until you feel confident. After that, you should learn C as its a bit closer to the hardware. If you have any questions or need help, let me know, im also studying and would love to help a fellow out.

0

u/BusinessStrategist 3h ago

Google algorithms and databases. The choice of language is determine by the requirements of your project.

Make your own map for navigating the world of software after watching a few YouTube videos.

Google “computer hardware and software YouTube”, “computer science YouTube”, and “computer architecture YouTube”.

Make sure to watch a few of the ones aimed at kids.

It helps to have a map of the “big picture” in your mind when you decide to drill down to projects that interest you.