Little experience as programmer: where do I go from here?

  • Thread starter Thread starter UR_Correct
  • Start date Start date
  • Tags Tags
    Experience
AI Thread Summary
The discussion centers on a soon-to-be electrical engineering graduate seeking guidance on improving programming skills after limited exposure to languages like C# and MATLAB. The individual enjoyed a microcontroller applications class that primarily used C, highlighting a preference for practical applications over theoretical assembly language. They express uncertainty about their grasp of programming concepts, particularly classes and methods, and seek advice on where to focus their learning next. Suggestions include exploring programming paradigms, accessing large code repositories for practical experience, and understanding the differences between C, C#, and C++. The conversation emphasizes the importance of building a solid foundation in programming to tackle more complex projects effectively.
UR_Correct
Messages
36
Reaction score
0
Hello all! I am about to graduate with a BS in engineering - electrical.

For my major, it was required we take an introductory C# course. All I really got out of that was how to use for and while loops and if statements, and a little logic. There were topics on more involved stuff like classes and methods, but I didn't take much away from that, which I'm kicking myself for now.

Over the years, I got pretty familiar with MATLAB. I would write some programs for that for some classes, like doing discrete Fourier transforms, convolution, or numerical integration and differentiation. What language does MATLAB use? It seems like some derivative of C, but I can't really tell.

We had an intro to microprocessors course also that was a milestone for most kids. A lot would drop from the program because of that class. It was all programming in assembly which is a drag. I didn't do so well in that class. At that point, I wasn't really interested in programming, especially in assembly.

Finally, I just finished a microcontroller applications class, and I thoroughly loved it. Got one of the highest grades, even though most of the students were either computer engineers or kids that have already taken the class before. The class is held to be the hardest class in our major. It was kind of a continuation of the microprocessor class, but no assembly language! It was all in C, so the programming wasn't too bad. Again, a lot of if statements and loops. It was mainly setting up registers for the controller. The hardest part was debugging the hardware that we'd hook up (sensors, relays, switches, LEDs, etc), but that's beside the point. The programming was never too hard.

But, I loved it, and I don't know where to go from here. I don't feel like I have a firm grasp on programming like some of the computer engineers/scientist. I feel I can program fine if it is a simple task, but I tend to get lost when I look at more involved code. I didn't really understand classes or methods when i took the C# course, so maybe that's where I should start first?

Any suggestions?

Thanks!

EDIT: Also, I was wondering what the difference between C, C#, and C++ is? Is that a dumb question?
 
Last edited:
Technology news on Phys.org
UR_Correct said:
Hello all! I am about to graduate with a BS in engineering - electrical.

For my major, it was required we take an introductory C# course. All I really got out of that was how to use for and while loops and if statements, and a little logic. There were topics on more involved stuff like classes and methods, but I didn't take much away from that, which I'm kicking myself for now.

Over the years, I got pretty familiar with MATLAB. I would write some programs for that for some classes, like doing discrete Fourier transforms, convolution, or numerical integration and differentiation. What language does MATLAB use? It seems like some derivative of C, but I can't really tell.

We had an intro to microprocessors course also that was a milestone for most kids. A lot would drop from the program because of that class. It was all programming in assembly which is a drag. I didn't do so well in that class. At that point, I wasn't really interested in programming, especially in assembly.

Finally, I just finished a microcontroller applications class, and I thoroughly loved it. Got one of the highest grades, even though most of the students were either computer engineers or kids that have already taken the class before. The class is held to be the hardest class in our major. It was kind of a continuation of the microprocessor class, but no assembly language! It was all in C, so the programming wasn't too bad. Again, a lot of if statements and loops. It was mainly setting up registers for the controller. The hardest part was debugging the hardware that we'd hook up (sensors, relays, switches, LEDs, etc), but that's beside the point. The programming was never too hard.

But, I loved it, and I don't know where to go from here. I don't feel like I have a firm grasp on programming like some of the computer engineers/scientist. I feel I can program fine if it is a simple task, but I tend to get lost when I look at more involved code. I didn't really understand classes or methods when i took the C# course, so maybe that's where I should start first?

Any suggestions?

Thanks!

EDIT: Also, I was wondering what the difference between C, C#, and C++ is? Is that a dumb question?

Hey there.

There are many different areas that you can become proficient into become a better programmer and it usually depends on the perspective you have and what kind of programming. I'll try and give my perspective about some things that you can investigate or at least think about to develop different perspectives and skills in programming.

Also I'm glad you've had exposure to an assembly language: I think its an important thing that people understand at some level how the logical devices actually work at the lowest level, but above that of physics: (ie know how given the instruction set of your hardware, how your program will run). It doesn't matter if you ever do much or any coding in assembler, but at least you know how things "work" at the lowest level a programmer needs to know.

The first thing I'll talk about is flow control.

You've mentioned that you've had experience with C# doing for and while loops so you probably already know about flow control in single threaded environments.

The extension to this is to work with code that distributes its processing in some fashion whether it be to another computer on a network or perhaps to another core on your CPU.

You said you have experience writing stuff in C for microcontrollers. If you had to do programming by say writing code for an interrupt service routine, then you have a pretty good idea what happens when everything is running all over the place and the potential for things to go wrong if you're not careful can be very high.

So I guess in short, learn about paradigms, tools, and standards that are used in distributed computing. Things are definitely moving in this direction with CPU's becoming multi-core devices, where design is moving from making the number of clock cycles bigger to parrallelizing activity and designing hardware to work kinda "by itself" if you know what I mean.

The next thing is state.

When you have a program that is say a couple of thousand lines, its pretty manageable and you probably know after a short while what the state of your variables will look like in your head.

As you move into working on programs with hundreds of thousands and possibly millions of lines of code, tracking state mentally could literally save you days of headaches trying to debug some obscure routine that has a call stack of dozens and dozens and dozens of functions deep.

So basically you need to learn some paradigms about how to handle the various states that can exist as well as what should be exported to other portions of code and what have to be kept private.

This also gets a little more complex when you are dealing with distributed systems. Everything has to be in sync and when you have dozens of threads accessing memory and you don't use the right devices like semaphores, it will be an absolute nightmare for you when something goes wrong.

The next thing is to get access to large repositories of code.

Get access to code repositories that are in your domain (ie science programs, simulation programs, etc) that are large and complex.

Why do I say this? It will take you a very very long time to become an architect of something that is complex and yet robust at the same time if you do it on your own, so the best thing to do is to get your feet wet and dive into something that is established and has a long history of development.

In a good repository you will see a host of things like design and architecture, optimizations, and also standards for code.

For example most production grade systems will be completely data driven. They will have unified architectures that process custom data in a format like XML purely because you can code an XML parser and executor that will never have to be modified, that allows easy extension through DLL's or some other extension mechanism, and as a result is great design since you can basically upgrade your data specs by introducing a new tag, and your whole thing is backwards compatible.

If you're interested in paradigms that focus on things like this, Microsoft has spent many many years researching and implementing various methodologies. Have a look at the Component Object Model, or if you like cross-platform look at CORBA which was developed by the Object Management Group (OMG).

Coming back to large repositories, apart from paradigms like the ones I just discussed, you will learn the principles behind design decisions for complex programs in your domain.

One example apart from the XML example is executable code that is interpreted (ie script code). Many good repositories have a design that effectively incorporates script code that allows the native code (C++ for example) to easily call script code and for the script code to effectively call native code.

To design such a mechanism is however very very complex, but remember the name of game is to be completely data driven.

The last thing is domain specific.

I'd say you have a bit of experience here as you mentioned that you did stuff in MATLAB like Fourier transforms, numerical integration and so forth.

The domain stuff is basically the other stuff that isn't part of general design, analysis, or other generic things that you cover in a computer science degree: basically things like say databases, computer graphics, networking, and so on.

I hope that gives you a few ideas to think about: there are a lot of different perspectives in programming, but hopefully the examples I gave are somewhat tangible and make sense.
 
C# along with .net is Microsoft's alternative to Java and Java platform. I haven't used it so not sure how close to C it is.

C is a relatively low level language, and C++ adds a lot of extensions to C. C++'s main advantage is the larger library of functions and templates (similar to a library but implemented as an included source file).

For a typical windows program in C, you code a message handling function with a while() loop that waits for and receives messages, then typically use a switch / case statement to handle each message type, with a "default" case where you call the default handler.

For a typical windows program in C++, Microsoft has already written the message handling code, and includes a windows class with virtual functions to handle every message type. Your code inherits that windows class, and overrides the virtual functions you want your code to handle, while the unoverridden virtual functions go to their respective default handlers defined in the windows class.

Getting back to where do you do next, it depends on your near term and long term goals. If you're writing a non-windows program, you can continue writing ever more complex code in C. Most of the jobs I've had writting embedded code (firmware) for devices use C, some assembly, and some multi-tasking operating system. For windows programming you probably want to switch to C++.
 
UR_Correct said:
What language does MATLAB use? It seems like some derivative of C, but I can't really tell.
Matlab is a special purpose programming language.The environment and interpreter are written in other languages (looking around, it seems like C and/or Java).
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top