Question:
learning a new programming language?
Sam C
2012-01-30 05:53:25 UTC
Hello Folks
I would like to ask programmer and software professionals about which program language to learn amonst the plurality of available languages.
Some background about me, i am a control engineer i programmed a while ago embedded C, which uses rather addressing, interrupts, and mainly functional programming.
At this point, i remember little from that, but i'd like to learn a language that is cross GUI and embedded also. In another word a language that enables the programmer to programm a GUI while interracting with the hardware.
what do u think about Visual C++ rather than others like just plain C or Python. I heard that VB is terrible, is this true ?
and which one would enable you to be versatile in relatively intuitive for an engineer to learn in timely fashion.

Thank you very much
Five answers:
2012-01-30 12:04:52 UTC
Visual C++ is not too bad. If you're dedicated, you can probably learn it in a few months since you already have a background in C but it would not be my first recommendation.



My advice would be to learn a language such as C# (C sharp) or Visual basic because these would be easier to pick up and be functional with. It easy relatively easy to make a GUI with these two languages. You would still have the ability to interface with hardware using RS232,USB etc.



When I need to make a GUI quickly to display information from an embedded controller I use a program called LabVIEW by national instruments. It uses a block-diagram-like graphical programming language and allows you to quickly build GUIs for embedded systems.
Jonathan
2012-01-30 12:35:59 UTC
I'll be direct on a few scores.



Engineers must, these days, deal with microcontrollers. They are ubiquitous, as they save cost and provide features difficult or impossible to achieve in analog. Where algorithms can be placed into software, there is no temperature or long term drift to speak of, either, for crystal controlled units. So they are generally very good to use. Every engineer, these days, learns at least some programming, as a result.



First, C and assembly are your only choices for embedded programming on microcontrollers, where the project/application aren't about creating a new cell phone, pda, or iPad type device. In the case of multimedia embedded, you probably will want C++ (and some assembly), and will use some kind of embedded operating system, as well. BASIC is used on a few, such as the "BASIC Stamp" from Parallax. But in all my years of embedded programming, BASIC only comes up rarely. (And I do a lot of closed loop control, and not only PID.)



I can't even begin to understand how you'd imagine that Visual C++ is appropriate. There are no embedded platforms to speak of that can use it. Microsoft has released important parts of .NET in source, so that it can be ported. And if you use the .NET languages, such as c#, f#, and VB.NET, you may be able to take advantage of the common features (not everything is available and it isn't uncommon to see some unmanaged [non-.NET] code, even there.)



If "cross platform" means Linux and Windows to you, then you probably are just fine with GNU tools and c++/c. There are open GUIs that standardize a windows interface. In fact, Linear's LTspice application uses one and runs on both Linux and Windows, about equally well.



VB is not terrible. A lot of applications do just fine with it. But in its current incarnation, it is .NET and depends upon the MSCL (Microsoft common language) and the associated JIT (just in time) compiler to convert CL code into local machine code just prior to execution for the first time. And unless you have a .NET foundation to run on, with all that means, VB.NET probably isn't right. But then neither will be C# or F#, which are also .NET languages. (Microsoft C/C++ is _not_ .NET, though.)



I consider C++ a programmer's programming language. It should only be used be well-seasoned programmers who know how to rule themselves with an iron fist and have lots of experience in designing to use it. I do NOT consider it a "first language" for anyone. And it certainly isn't something you can learn well in a short time. There are many, many _important_ nuances within it that most people I know aren't even aware of. Just as an example:



x();

string s;

x();



You might imagine that the two x() function calls would be coded up the same in c++. But they aren't. In both cases, x() might throw an exception. But in the first case, the c++ compiler "knows" that there is nothing to destroy if an exception takes place and since there is no try-block here, it can just "let" the exception handling code find some other try-block. So nothing special for the first call. But the 2nd call takes place _after_ construction of a string. And the string will require destruction, should an exception take place. So the c++ compiler _must_ create a hidden "try block" here to capture exceptions and destroy string s before allowing the exception to move on. So the two calls generate different code. Most don't have a clue about that.



It's stuff like this, and that is only the tiniest fragment of the tip of the iceberg, that suggests you start elsewhere. Particularly, for embedded work. I'd recommend C, strongly. You learned it before and therefore that qualifies very well for your "reasonably well within reach to learn in short amount of time."



That's my recommendation. And it is widely used in embedded, too. So it's not an outlier choice.
?
2012-01-30 06:12:08 UTC
Well, iv'e never tried Visual C++ but im gonna soon, and I haven't any of the others except VB.

Visual Basic is not terrible at all! Its actually really fun to learn :)

And its super easy, I watched about 3 videos and I was almost good to go on learning it.

So I would try VB first, and see how you like it :)
2016-10-04 14:45:58 UTC
do no longer study person-friendly. that form of programming has been lifeless and buried for over a decade. recently we use sensible and merchandise orientated languages. C is a huge sensible language which has been the muse for pretty much each and every programming language on account that, and C++ is a multi-paradigmic language that could enable you to place in writing procedural, function, or merchandise-orientated courses, and could be lots greater sensible to you as a programmer later. i could no longer enable you be attentive to something approximately foxpro.
?
2012-01-30 06:00:09 UTC
That problem alone favorite. But for fleksibillitas, Delphi better and his run faster than VB. kelemahanya VB is supported by microsoft, so we are sometimes forced to use microsoft stuff. I prefer python, for graphic design and blend in with the GUI,,


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...