Which programming language? - Page 1
Forum section: electronics / general

author: GrumpyDave
author_rank: Contributor
timestamp: June 13, 2011, 01:08:22 pm
content: Hi allNot exactly a microcontroller question but it is sort of related..For university I have used both Assembly and C18 to program PIC microcontrollers and also some VHDL for cpld.Currently none of the projects I have worked on involved interfacing with a PC so this summer to better prepare myself for further projects I would like to learn a bit more regarding controlling/communicating with a PC.My ultimate aim is to be able to cobble together some PC software with gui that can send commands to or recievedata from the microcontroller via either rs232 or usb.Obviously I need to learn a PC language but there are so many to choose from!So I'm hoping some of you more experienced engineers can give me some advice on which to pick. I imediately thought C as thats what I use for the PIC but it seems its rarely mentioned as a language to learn for programming window gui type applications.I have read that C++ can be difficult and that C# or Java may be easier.Which languages do you use and what language would you say is good to learn to compliment microcontrollers on the PC?

author: Psi
author_rank: Super Contributor
timestamp: June 13, 2011, 01:27:13 pm
content: For PC programming the choice isnt so much what language to use, it's what development environment to pick.I still use Delphi, and despite what some people say, it's still alive and kicking.The same company also make "C++ builder", which is identical to Delphi but you program in C instead of pascal.I just love the speed at which ya can get something done using delphi/c++builder.However, ive not used the competing products, such as Microsoft visual studio for ages, so i cant really say which is best overall or for specific tasks.With regard to building gui apps to talk to microcontollers, most of the time this is just serial port comms, be it true rs232 or a usb-rs232 bridge doesn't really matter. From the apps point of view its just a com port. Any language worth anything will allow com port access. With delphi at least, you just pick/install one of the many available com port components, slap it on your form and start coding something to interpret the stream of data for display or resending. The component takes care of all the windows API calls to open the port and presents you with a nice interface to set baud rates etc.. and receive or send data.

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 13, 2011, 01:43:59 pm
content: I'm a big fan of Python, as it is very fast to implement code in, and has vast libraries for doing different things. GUI is a little harder than Delphi or MS Visual Studio or the like.What you get is cross platform for free, if you use a supported library. That may or may not be useful, depending on application.Best bet is probably free version of Visual Studio and C#.NET. That seems to be the norm for windows any more.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 13, 2011, 01:51:17 pm
content: during my early age, i've tried all delphi/C++builder/msvstudio. in the end i stick to ms visual studio. thats personal preference, i dont say delphi & borland c++ builder are bad, indeed c++ builder combine the power of gui easiness and c language efficiency. but nothing beat visual basic in term of rapid gui environment, and i dont have to type the nonsense ; and : in every line and declaration. but with drawback that basic is among the most nonefficient languange, no worry, cpu power doubled every year. and whenever i need the speed, i'll couple it with ms visual C++, usually for dll making only. gui with ms vc++? mfc? a big SUX! i cannot get in my head. i'm a classic style programmer, so i dont like highly embedded classing/templating into the language. but if you still dont have side, maybe C# and vb.net is the way to go, thats the modern standard i think. tried it before, but it worst than MFC imo, i just cant get that!

author: GrumpyDave
author_rank: Contributor
timestamp: June 13, 2011, 03:22:55 pm
content: Some good responses so far guys thanks, I haven't thought of visual basic but this is maybe worth considering.@Psi, Thanks for pointing this out development enviroment is important, for now as this is learning not a buisiness venture free tools are a requirement. Also somthing self contained would be preferble as a pose to seperate text editors, command line tools etc..@sacherjj, I have also read that Python is the language of choice for many developers nowdays, what development tools could I use for Python? Is there an all in one IDE? or is it more text editor and command line compiling?@Mechatrommer, thanks I hadn't considered visual basic and your thoughts seem to mirror what others have said regarding VisualC++ and a beginner on other forums.I am aware thought that if I choose C# or VB that its a microsoft thing and I am essentially learning somthing windows only.Java would seem to fit the bill as it seems similar to C# but is cross platform?I will buy some books once I have decided which to go for which is why I am trying to pick one.

author: Unknown
author_rank: Unknown
timestamp: June 13, 2011, 03:36:35 pm
content: If you choose Visual Basic, I would suggest VB.NET, since VB is a dead end. I believe the IDE is not supported anymore, and has issues on Windows Vista and later (it was never supported on versions later than XP/2003). The runtime (ie. for finished programs) is supported up to Windows 7, but as far as I know not on future versions. VB.NET is basically C# with a different syntax.Python is also fairly popular and well suited for beginners, as opposed to C++ or C#.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 13, 2011, 03:55:03 pm
content: Quote from: alm on June 13, 2011, 03:36:35 pma sad truth for me. they want to keep abstracting to higher and higher level. i will stay put with XP as long as i can

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 13, 2011, 04:15:18 pm
content: Quote from: alm on June 13, 2011, 03:36:35 pmI would recommend C# over VB.NET. There are just ambiguities at suck in VB.NET. If you ever get to doing real OO design software, VB.NET has some issues that are annoying. But VB.NET is definitely better than VB6. (That coming from someone who's job is to maintain VB6 and update to VB.NET. Unfortunately, our company doesn't want to go to C#.)C# is 95% Java syntax. So learning one helps get to into the other, with just the frameworks being different.Quote from: GrumpyDave on June 13, 2011, 03:22:55 pmYou can use the default Text editor that comes with Python. It works, but not great.I've used Pyscripter for most of my hacking. It is more of an IDE with debugging and such. Python is just so fast to take from idea to working prototype. You will either love or hate the idea of whitespace being the flow control. After having read through some atrocious code in my life, I actually like the restriction placed by it on style.

author: ndictu
author_rank: Regular Contributor
timestamp: June 13, 2011, 04:29:06 pm
content: Quote from: GrumpyDave on June 13, 2011, 03:22:55 pm.NET actually has a great cross-platform support thanks to theMonoproject. I think they currently have support for full C# syntax and .NET up to 4.0. There is also and IDE, MonoDevelop that is really good (compared to Eclipse and other linux IDEs, it's still no match for Visual Studio, unfortunately).However, if you want Java there is nothing wrong with that. Very similar language, different philosophies and standards for libraries but overall not that much. Also, C# is in my opinion much closer to C++ than Java so if you want to do something more low-level the transition should be easier (but not by much, it's mostly a syntax thing).Also, for quick little projects there are scripting languages like Python, Perl etc which are also a good choice.It ultimately depends on what you want to do. For GUI there is Qt (for C++ but has libraries for pretty much every popular language) with it's own IDE (quite good, cross-platform). If you can live with windows only, you really can't beat .NET (C#, VB, ...) with WPF or the older WinForms (BUT you can run the same WinForms code on Linux using Mono!, not WPF though). Then there is some more stuff like wxWidgets (C++, bindings for Perl, Python), Gtk+ (C++, has many libraries, for example Gtk# for .NET).For simple projects that I only run on Windows I almost always use C#, because of the great (and free) IDE and many libraries that make it fast and easy. Cross-platform with only console interface I go with C/C++/C# or Python.For cross-platform GUI it gets hard, you have to know what you need. Most of the time I can get away with Qt. Many popular cross-platform applications actually use different code and GUI toolkit for each platform, and have a common code that just interfaces with that.

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 13, 2011, 04:50:35 pm
content: Agree with everything GrumpyDave mentioned. With the addition of PyQT being an easy way yo get GUI for Python, but only if you are doing Open Source. (Well, same with using QT for C++.) The licensing for QT isn't cheap otherwise.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 13, 2011, 05:39:55 pm
content: I'm still looking for something that's as quick and easy to use as VB, but based on C, as it's a PITA to be continually switching between C on the MCU and Basic on the PC.The things I particularly don't like about VB are :It sucks at unsigned maths (try doing a 32 bit checksum - nightmare!)It needs DLLs so you need to generate an install package, and the one that comes with VB is a bit crap.It is no longer possible to legitimately buy it, which can be a problem if I want to give code to a customer.No Undo on GUI changes.I also dislike .NET due to the massive install needed if it's not already on the PC.Would be interested to see any suggestions....

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 13, 2011, 06:10:19 pm
content: Quote from: mikeselectricstuff on June 13, 2011, 05:39:55 pmYou can do C++ (or mostly just C if you prefer) with Visual Studio. That is still an option. .NET 4.0 is only 54 MB download for the libraries. Not idea, but not "massive" but current software standards. Anyone running Windows update already has it installed, most likely.Frankly, C# is close enough to C syntax that I would go that route. I would never wish maintaining a complex windows up in C on anyone.

author: ndictu
author_rank: Regular Contributor
timestamp: June 13, 2011, 06:46:17 pm
content: Quote from: sacherjj on June 13, 2011, 06:10:19 pmFor most stuff you don't even need 4.0, you can get away with 3.0 (included in Vista/7), maybe 3.5 (included in 7), or you can even go down to 2.0 if you really want, but that is just punishing yourself (but it is included in XP SP2).You lose some fancy stuff like LINQ, extension methods ... but it is still a great platform.

author: Trigger
author_rank: Regular Contributor
timestamp: June 13, 2011, 06:58:43 pm
content: Python is good to learn with and it's generally useful.C/C++ is still the gold standard though.Java... eh it's only redeeming feature is Minecraft

author: Bored@Work
author_rank: Super Contributor
timestamp: June 13, 2011, 08:17:00 pm
content: Quote from: GrumpyDave on June 13, 2011, 01:08:22 pmDon't pick. Learn all the common ones. No, this is not a joke. You want to become a professional, and valuable professionals aren't monolingual. They find their way in all the common languages. And it doesn't matter if you like them or not.After you have done the common ones (and no, Python is not a common one, just a fanboy one), you can still look into the hype stuff and fag of the month.And learn the platform/OS. A programming language is useless if you can't efficiently make use of the platform/operating system. And just like with programming languages, learn more than one platform if you want to become a professional.The recommendation to not care about the language, but pick an IDE is absolutely rubbish. Unless you want to become a "programmer" who can't tell his arse from his head and starts to panic if he needs to use something else than the only IDE running on the only platform and OS he uses since the last 10 years. A disgusting lot of programmers I may add, because they typically claim they know the one true way to do things. Avoid becoming that hero code monkey type of programmer.

author: Psi
author_rank: Super Contributor
timestamp: June 13, 2011, 11:47:29 pm
content: Quote from: BoredAtWork on June 13, 2011, 08:17:00 pmWrongI never said too "not care" about the language. The language is important in that you have to pick one, or two, and learn it. You want to pick a language that's powerful, easy to read and if you plan to work as a programmer you want a language that's popular enough for jobs to be available.All i said was that the IDE ismoreimportant.It's what you have to use day-in day-out to write code and find bugs. It must provide features that help rather than hinder you. Anything that annoys you in the IDE will keep annoying you forever and drive you crazy.Once you know a language well enough to write good code the language will vary rarely annoy you, it's just a way of doing/saying something. It's the IDE and dev/debug tools that can cause you to pull your hair out on an ongoing basis and that's why its more important to pick a good IDE.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 14, 2011, 05:22:43 am
content: learn assembly! (or machine code) then you can become monkey's godnvm Psi, that advice was meant forprofessional. you can learn all the languages (and layers of onion) if you like all years long.

author: Bored@Work
author_rank: Super Contributor
timestamp: June 14, 2011, 05:26:05 am
content: Quote from: Psi on June 13, 2011, 11:47:29 pmIt is completely unimportant. The amount of code you type in in a serious software project is so negligible compared to all the other work that needs to be done that it absolutely doesn't matter. People insisting on a particular IDE remind me of car mechanics who claim they can only do their job with yellow screwdrivers, and the red ones won't do.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 14, 2011, 05:40:54 am
content: its not that simple as comparing it to colors. it has to be something with the bits. maybe the red one got hex bit which unsuitable for car application, or compact replacable bit which "pro mechanic" wont care to consider but be loved by many hobbiest. similar to my case where i use vb to build app, what if i want to port it to linux? with weeks/months of coding, you want to call it "doesnt matter"? if i built it in cross platform IDE, i will have minimum effort (and time! which most pros will care about most!) to do that. but... it doesnt matter, since porting to linux is not within my scope of work. all i care is how much time left for me to do the other things (not the programming things).

author: updatelee
author_rank: Contributor
timestamp: June 14, 2011, 06:07:33 am
content: Quote from: sacherjj on June 13, 2011, 01:43:59 pmI still do alot in C/C++ but for small quick projects I love Python. You can create a simple GUI using QT creator, implement it in python and be up and running with your app in no time flat. Its surprisingly fast too for a scripted language.There are still more libraries for C/C++ though, if the project is going to be more complex or I need specialized drivers its the way togo imo.Ive wrote a few apps now that interface with the serial port, grab some data, analyze it and output it to a graph on the screen and honestly its so much easier in python. So quick. python is quickly becoming very well supported. I can run python even on my dreambox 800 satellite receiver.

author: westfw
author_rank: Super Contributor
timestamp: June 14, 2011, 06:12:55 am
content: QuoteThe importance of the "IDE" is not so much in creating the progam, but creating the GUI features. In a language like C you can spend hours and hours setting up data structures to define windows and buttons and such. An OO language like C++ or Java is a bit better, because it's better at hiding such data structures inside the classes, and giving them reasonable defaults and such. But something like Visual Basic lets you draw what you want your GUI to look like, and attach code to the picture like "when the user clicks here, run this routine." I was a little shocked at how easy it is. I'm not sure it's exactly correct to call that part of the IDE, but it's not really just part of the language. Perhaps it's an example of when an IDE offers real utility beyond syntax highlighting and user-definable indent styles :-) This is the sort of thing you want to look for, unless you're interested in getting into the nitty gritty of GUI primitives (or more likely, some GUI library...)There are tools that do this (or at least try to do this) in a multiple-platform way. RealBasic is one that I've come across (http://www.realsoftware.com/realstudio/) (my son had a programming class that used RealBasic.) I would assume that there are others. (someone mentioned Delphi, and Apple's XCode has things that do this. It depends on how cross-platform you want to get, I guess.) There are "game programming" environments (eghttp://www.yoyogames.com/gamemaker) that I'm not sure I'd rule out entirely, either.You might also look at "Processing", which is sort-of to Java what Arduino is to avr-gcc. But not like what I described above...(and now you have a hint why software is so bloated these days!)

author: Lance
author_rank: Frequent Contributor
timestamp: June 14, 2011, 07:01:21 am
content: Quote from: BoredAtWork on June 13, 2011, 08:17:00 pmAgreed. Diversity is the key to success. A good language for PCs is C++. It's very similar to C, which you already know (C18 is just a compiler). Actually it's basically C with object oriented components on top (simplification). As mentioned above you'll have an easier time when it comes to setting up GUIs.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: June 14, 2011, 05:37:16 pm
content: Quote from: BoredAtWork on June 13, 2011, 08:17:00 pmThis is good advice for a professional, but horrible advice for someone starting out. Pick a language. Experiment with it. Get good at it. Find out all it's advantages and disadvantages. Then you can move on to other languages. When I interview software guys, I'd much rather they be really proficient in one language (object oriented) rather than ok at a bunch of languages. The proficient guy will have no trouble picking up the concepts in whatever language we are using.Quote

author: GrumpyDave
author_rank: Contributor
timestamp: June 14, 2011, 11:18:25 pm
content: Thanks for all the relies guys.Quote from: BoredAtWork on June 13, 2011, 08:17:00 pmWhile I agree that learning more than one language is a good idea, as I am just starting I think I should concentrate on one for now then move to others later.Its quite close between C++ and C# at the moment.From what I have read so far I am leaning toward c# for the first language to get stuck into, it seems to have a few advantages (from my beginners point of view) than C++ like auto memory management and ease of creating GUI.Cross platform support was not really a requirement I was just thinking of the negatives of c# and I see mono project .NET framework solves this.

author: Trigger
author_rank: Regular Contributor
timestamp: June 15, 2011, 02:42:55 am
content: Quote from: BoredAtWork on June 13, 2011, 08:17:00 pmThat sounds just like a fanboy comment. Major companies use it in production, and MIT teaches programming with it. That's a pretty strong case for it being a 'common' language.

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 15, 2011, 03:10:51 am
content: C# will keep you out of trouble for a beginner.Python is obviously a fanboy language. Yahoo Maps runs by the software written by fanboys. Many parts of Google were also written by fanboys. Load balancing and score keeping for Battlefield 2, also written by fanboys. Civilization 4, also written mostly by Python fanboys. Most of Industrial Light and Magic production use Python, but movie folks are always fanboys. I'm a fanboy too, because it is just so damn quick to write things...

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 15, 2011, 07:21:11 am
content: i'm a vb fanboy then! psi is delphi fanboy. the one who write in particular language is a fanboy as well, i guess

author: Psi
author_rank: Super Contributor
timestamp: June 15, 2011, 07:55:42 am
content: Quote from: Mechatrommer on June 15, 2011, 07:21:11 amhehe, yeahWell.. not a fanboy, fanboys tend to be hardcore against the competing products.I have nothing against Visual Studio or the many other programming IDEs or languages.Though, one of my favorite apps is written in Delphi... Altium Designer, bet you didn't know that

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 15, 2011, 12:21:09 pm
content: Quote from: Psi on June 15, 2011, 07:55:42 amI was thinking about buying a license. But used the money to buy a car instead.So I use Eagle.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 15, 2011, 01:04:17 pm
content: Quote from: sacherjj on June 15, 2011, 12:21:09 pmi dont spend a dime. nor car nor alt!um. i use free diptrace instead. if i can live another 100years, sure i can build something similar with vb

author: shadewind
author_rank: Frequent Contributor
timestamp: July 17, 2011, 01:07:44 am
content: Quote from: BoredAtWork on June 13, 2011, 08:17:00 pm+1 for pretty much everything here.Learn lots of languages and you'll pretty soon learn that they all suck in their own unique way. The more languages you learn, the easier it will be to learn new ones. Then use whatever language is most appropriate for the job (i.e. don't use .NET for an MCU).Someone mentioned Qt licensing is expensive for commercial use which is not true anymore since there is the option of LGPL licensing nowadays.

author: Harvs
author_rank: Super Contributor
timestamp: July 19, 2011, 10:44:28 am
content: I guess by now you're at least a year or two through your degree, so by now you are probably looking at your target area's of industry for future jobs, right? If not you should be...So leaveraging off that, your goal doing a engineering degree isn't just the be the most educated well rounded professional you can be, but also to be the most attractive to the industry/company you're looking to target.Therefore my suggestion isn't going to be a language or IDE. I would suggest you find out what the industry/company you want to be working for uses, and at least learn that. If you do your research right you'll probably find half a dozen different languages and test tools around companies you're going to be targeting, so learn them all...

author: gregariz
author_rank: Frequent Contributor
timestamp: July 20, 2011, 03:37:18 am
content: Not much has changed since the time of the great computer flame wars of the 90's.... asking a question like this still invokes religious responses.My advice since I dont care about religion... if its for you.. use what ever is most comfortable to your brain. If its for your employer.. you have no choice.

author: sacherjj
author_rank: Frequent Contributor
timestamp: July 20, 2011, 01:54:46 pm
content: Quote from: gregariz on July 20, 2011, 03:37:18 amOften using the programming language that is most comfortable for your brain is a bad thing. It is a great idea to force yourself to use quite a few different languages. It will make you a better programmer in the end. A book like7 Languages in 7 Weeksis a good way to do this.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 03:32:33 pm
content: Quote from: sacherjj on July 20, 2011, 01:54:46 pmGood at everything, great at nothing.

author: Semantics
author_rank: Contributor
timestamp: July 20, 2011, 04:14:44 pm
content: Quote from: ToBeFrank on July 20, 2011, 03:32:33 pmFull disagreement. There are different flavors of programming paradigms out there. The one I specialize in professionally is OO (object oriented), but in earlier years I've done block (procedural), but OO is essentially an extension of it.Learning a programming language as a non-programmer is a big deal. You not only have to deal with the idiosyncrasies of the language proper but you also have to learn the concepts behind it. If you learn C# properly, you're going to learn OOP, whether you realize it immediately or not. Later on, if you're exposed to Java, now all you have to worry about is the language quirks because your brain already can think with Objects.The principles between families of programming languages are the same, the rest is just icing to set itself apart. And even then, the hardware that executes object code built from any source is considerably more limited than the language itself: it's all comparisons, math, and input/output of some flavor. Really, the language is merely an abstraction to better organize instructions.The best software guys I know all talk about the abstractions, not the direct implementations. They don't use one tool (one language). While they may have a favorite, they recognize when different things are potentially a better fit for their needs at the moment. This has the parallel that great microcontroller guys base the decision to go PIC or AVR based on the strengths and weaknesses of their abstractions in application to solve a current need... and they are abstractions: ICs that just swing pins high and low based on the state of some other ones.Tunnel vision is a terrible thing to be stricken with in anything having to do with technology. Smart people know they have to continually learn to stay that way and to do that they must stray from their comfort zone every now and then.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 04:57:35 pm
content: Quote from: Semantics on July 20, 2011, 04:14:44 pmSo in other words, if you get great with one OO language, all the other languages are fairly easy to pick up. I'll repeat:Good at everything, great at nothing.

author: gregariz
author_rank: Frequent Contributor
timestamp: July 20, 2011, 05:17:41 pm
content: Quote from: sacherjj on July 20, 2011, 01:54:46 pmThats not what I said.. I use what is most comfortable with my brain for the project at hand. I'll use different tools for different tasks.For example if I'm working with an embedded Arm and I need to use a particular hardware set. I will use the compiler that actually has the libraries for that hardware set.If on the other hand I have freedom to pick a hardware set, I will usually pick a compiler that has the most feature packed libraries for the type of hardware I want.The language is secondary.However I will say this, I've run across an incredible number of 'software engineers' whose only approach to a project is to use OO. They wouldn't consider procedural programming. For most embedded projects I've been on this has added a layer of abractions that we could have done without. The custom code for most embedded projects is not so long that it could not be understood by one person, however when the OO abstractions are in play, readability goes out the window quickly.I remember sitting in the OO program in the mid 90's and the professor saying that OO was a mix of failure and success, with many high profile OO converts from the procedural space having failed in the OO space. Given the arguments that are being recirculated today it appears much of that experience has been forgotten.

author: sacherjj
author_rank: Frequent Contributor
timestamp: July 20, 2011, 05:21:32 pm
content: Quote from: ToBeFrank on July 20, 2011, 04:57:35 pmIt is impossible to be great at something without having a pretty good understanding of the alternatives. Every language has great parts and every language has bad parts. Some more of one than the other.If you are an OOP programmer and have never done functional or LISP or other styles, you are a lesser programmer. I can't say it more simply than that. Because other paradigms give you ways to work around the bad parts of the language you are working in.It is almost impossible to be great at a language unless you are good at many. The great computer programmers I've run across are fluent in many. Because not every task is a nail and not every language is a hammer.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 05:41:10 pm
content: Quote from: sacherjj on July 20, 2011, 05:21:32 pmIt's impossible without an understanding of the concepts, not the alternatives.QuoteOf course they are.QuoteHaha, do you realize you just uintentionally wrote "good at everything, great at nothing"? See, you agree with me!QuoteSo were they great before or after they became fluent in many languages?

author: sacherjj
author_rank: Frequent Contributor
timestamp: July 20, 2011, 05:49:18 pm
content: Quote from: ToBeFrank on July 20, 2011, 05:41:10 pmThey generally come one and the same. Some languages do not even posses the ability to show concepts or do it very poorly. And example of this is typical lambda usage.Quote from: ToBeFrank on July 20, 2011, 05:41:10 pmNope. Don't agree with you. I corrected my typo before your post went up.Quote from: ToBeFrank on July 20, 2011, 05:41:10 pmThey had great potential before the experienced many languages, but were not great until getting the varied experience. I have met 1000's of very good programmers. I have met 100's of great programmers. There is one thing the great programmers have in common, that is breadth of knowledge.You cannot be great at a certain language without knowing enough other languages to know what isn't great about that language. There is not yet a perfect language. Not knowing what other languages do better makes your knowledge of a language insufficient.

author: gregariz
author_rank: Frequent Contributor
timestamp: July 20, 2011, 06:08:46 pm
content: Since I'm guessing the OP was an EE student it could be narrowed down a bit to say that if you are going to work commercially in the embedded space, most compiler options will be C or C++. Of course each compiler with have a slightly different implementation of that language.Other embedded languages you will find are Basic and Pascal, although to a much lesser extentMy favourite embedded compilers are currently by Mikroe.com for mostly 8 and 32 bit Pic's.In the real world of software development we can use some factual stats and say.. the most popular language in the world is Microsoft Visual Basic (VB.net). Amongst my religious programming friends who are involved in application development (not web programming) it is Microsoft Visual C++ (.net)To a lesser extent Java is very popular in some workplaces.My wife started out as an EE and moved into professional programming... she currently uses VB.net C#.net and Java very rarely. Mostly she has needed to use one of those languages plus other tools and hooks that can be called from any programming language.. things such as PhP, SQL, and other commercial libraries.For my own embedded experimenting I will usually use a microcontroller Basic compiler for readability. Sometimes I will use C but I prefer not to (Basic compilers are only available for a few of the MCU's). For utility software on the PC I will usually use Java (80%) and sometimes VB (20%) (ignore the .net extensions) and very occasionally gcc.As someone said .. all language suck to some extent. In my brain, for some projects, some compiler options suck less that others. This least suck factor should give you something most comfortable for your brain.In college they forced us to learn Assembly, Pascal and C/C++. I've never really used either assembly or pascal since college except for my own stuff. I use C on the job because that what everyone uses there but I hate the syntax of the language. I don't find it as readable as either Pascal or Basic, but thats a personal brain thing. As a result for my own projects I'll typically use Basic for embedded tasks.Now.. everyone needs to start somewhere... and my generation all grew up programming Basic for years on the commodore 64's and the like. If the OP is an EE student he will have been forced to have studied C (if not.. change Uni) already. I would suspect that he could just keep going into Visual C++ (or C#) and if wanting to try something different Java is really close to C++ in a lot of ways. Learning the Microsoft Visual Studio environment is a good way to go as Oracle Netbeans is a very identical ripoff. Visual Studio is also identical for any of the Microsoft .net langages (VB, C#, C++) so you can't really go wrong learning one of the Microsoft languages.My 2c

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 06:11:16 pm
content: Quote from: sacherjj on July 20, 2011, 05:49:18 pmSo now you have to use lambdas to be a great programmer? Anything else that makes one a "lesser" programmer we should know about?QuoteWell then, we can scratch "sense of humor" off the list.QuoteNo arguing that. But I'll still take the guy who knows three and is great at one over the guy who knows ten and is good at ten.QuoteRubbish. Becoming fluent in a programming language does not happen from using many other languages. It happens from using that language.I'm guessing since you're so black and white that you think I'm saying a great programmer should only ever know one language, which of course, I'm not. But for certain, if a new person (as the OP is) attempts to learn a bunch of languages versus sticking with one and getting great at it, he or she will never be great at any of them.

author: sacherjj
author_rank: Frequent Contributor
timestamp: July 20, 2011, 06:19:48 pm
content: Quote from: ToBeFrank on July 20, 2011, 06:11:16 pmDon't disagree with that. Being fluent in a language comes from using that language. Pretty much common sense. This isn't a discussion of being fluent or not, it is discussing your idea that you can either be great at one or good at many. I think you can't be great at one with only learning one.Quote from: ToBeFrank on July 20, 2011, 06:11:16 pmThere is a difference between mastering languages and learning them. I've seen many very good programmers who have only been exposed to one language and it is a detriment to them. They believe the language as gospel when there are some times things in a language that must be worked around. You do not have to be monogamist when to comes to languages.I believe that you cannot be great at a language without being exposed to the ideas in languages that are different from the language you are mastering. You seem to think this isn't important. I believe that one of the best things a new programmer can do is sample many languages before becoming great at one or two. We will agree to disagree.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 07:27:44 pm
content: Quote from: sacherjj on July 20, 2011, 06:19:48 pmConcepts are important, not the languages. So yes, I think learning many languages isn't important, learning the big concepts is, the main ones being OO and polymorphism.

author: sacherjj
author_rank: Frequent Contributor
timestamp: July 20, 2011, 07:36:35 pm
content: Quote from: ToBeFrank on July 20, 2011, 07:27:44 pmOnly for OO programming paradigms (which I agree is almost 100% of good programming for PC software, or should be). This isn't always the best methodology to tackle a problem.We are saying many similar things, just from different angles I think. For small projects that won't grow, OO is somethings the 20 pound sledge that is used to drive a tack. It works, but not well and is serious overkill. But trying to do a large application in functional programming is like building a house with a tack hammer. Each have their place and vary wildly, depending on what realm of programing task you typically encounter.Some concepts that are tied to languages that are important are like the advantages and disadvantages of both static and dynamic typing. Compile/interpreted. Etc. While they are not tied directly to a language, it is hard to learn some advantages of dynamic typing with C.I guess the biggest difference is what you will be solving. I've written code for PLCs, Micros, VAX systems, Unix systems, Phones, PDAs, and the common Windows, Linux systems and Web stuff, etc. It is impossible to be great with one hammer and get that done. The same languages don't exist on all platforms. (And I'm not great with any one language yet.) Many of those would not be as good of code if written in OO primciples (Unix drivers as one example).

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 07:48:06 pm
content: Quote from: sacherjj on July 20, 2011, 07:36:35 pmNope. OO concepts can and should be used in languages that don't support OO. Encapsulation comes to mind.

author: Unknown
author_rank: Unknown
timestamp: July 20, 2011, 09:34:06 pm
content: Quote from: ToBeFrank on July 20, 2011, 07:48:06 pmI suggest you study some programming languages that don't focus as much on OO. May even make you a great programmer. OO is not the only way to properly design software, it's just currently the most popular, and quite suitable for some tasks. Might be something else entirely in ten years. Functional paradigms should also be used in languages that don's support them if the circumstances call for it, for example.Until recently, MIT's introduction to programming for EECS students was in scheme (similar to LISP). And I believe CMU has moved OO from the freshman year to the sophomore year and switched from Java to Python (which doesn't require you to know OO to write 'Hello world'), since OO was not considered essential to get a good understanding of programming.I'm not claiming that OO is not important, just that the world is larger than Java, C# and C++. How much OO do you apply in Labview, for example? How useful is OO for number crunching and vectorized code (eg. data analysis, stuff MATLAB is typically used for)? OO doesn't make math easier to read.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 09:57:21 pm
content: Quote from: alm on July 20, 2011, 09:34:06 pmYou mean like C, which I've spent many years with? The best C code is structured in an OO-way where you use file scope (static) for encapsulation. This makes it maintainable, reusable, and less error prone. This isn't OO, but it's using OO concepts. A file essentially is an OO "class".QuoteReread my statement. I didn't say OO. I said "OO concepts".QuoteYep, I had a semester of scheme. You get really good at recursion.QuoteIt certainly is not, but I most definitely would not want to work with the code of the person who didn't understand it and use its concepts in non-OO code and/or OO code.QuoteYou've made the assumption that's all I know, which is incorrect. Guess what, I also work with Python almost every day. Golly gee whiz, I'm one of those multi-language guys.QuoteIt's funny you ask that because that is exactly the code I work with everyday. I put the algorithms our math and physics PHDs come up with on big clusters. The answer is... "very".

author: gregariz
author_rank: Frequent Contributor
timestamp: July 20, 2011, 10:28:21 pm
content: an interesting take on the topic...http://software.intel.com/en-us/blogs/2008/08/22/flaws-of-object-oriented-modeling/

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 20, 2011, 10:49:46 pm
content: Quote from: gregariz on July 20, 2011, 10:28:21 pmI hope you mean by the rather good reply in the comments by Christian Posta. Otherwise, the Intel guy's blog post is a rather sad.

author: gregariz
author_rank: Frequent Contributor
timestamp: July 20, 2011, 10:58:42 pm
content: Quote from: ToBeFrank on July 20, 2011, 10:49:46 pmThe article is not well written but there are a few good points in it, particularly regarding flow. I guess I have always been a bit sceptical of OO as everyone seems to have a different take on what it actually is. There's a fuzziness about its very essence, and alot of academic hubris going on. Polymorphism, Inheritance etc are central concepts but I've always been around projects that are not so complicated as they were difficult. For me, when I see good procedural programming, I would argue that in a way these procedures themselves evolve into 'objects'. Is this OO? depends who you talk to. When I hear programmers who have grown up with OO only, and to be honest these days it seems to me most of them, it scares the crap out of me.. because I know I'm in for trouble. In most projects I know I can get a result from good procedural programming. I don't know that for OO.

author: Semantics
author_rank: Contributor
timestamp: July 21, 2011, 03:23:03 pm
content: OO has it's place and it's certainly not everywhere. It's a tool, and like any tool is can be completely misused. Do you need it to write complicated stuff? Well, define complicated. Writing hardware driver software is complicated but my first instinct would be to not consider OO for that problem. And I've personally seen solutions developed in C# that were a complete disaster resulting from what I will euphemistically call "over-zealous application of indirection". And, while OO concepts are well defined, the application of them aren't. For example, I don't buy into the Gang of Four & all their application patterns, but some of them are pretty useful, if not just to remember. The nice part is that nothing exists in a vacuum.You first understand the problem and then select your tools. Letting the language embed itself in your requirements without a compelling reason is a mistake. All the smack-talk about certain paradigms seem to center around specific misapplications. As if my stepping into a puddle is clearly the fault of the manufacturer of my shoe!Or you could just grab an opcode list and get to work hand compiling. But I wouldn't expect my shoe manufacturer to make my shoe atom by atom.

author: sacherjj
author_rank: Frequent Contributor
timestamp: July 21, 2011, 04:33:52 pm
content: Quote from: Semantics on July 21, 2011, 03:23:03 pmOf course not. That is silly. There is no reason to get below the molecule level. Nobody works with just atoms any more.

author: Unknown
author_rank: Unknown
timestamp: July 21, 2011, 07:44:36 pm
content: Quote from: ToBeFrank on July 20, 2011, 09:57:21 pmI was thinking more like scheme, ML, Haskell or something completely different.Quote from: ToBeFrank on July 20, 2011, 09:57:21 pmIf OO is not a useful tool in a certain case, the same applies to OO concepts. They are certainly useful, but not the right tool for every job.Quote from: ToBeFrank on July 20, 2011, 09:57:21 pmI think good knowledge of recursion (something that languages like C and Java don't encourage as much) is also mandatory to be a good programmer, just like OO. The solutions to some problems is much more elegant in a recursive algorithm than iterative. Even if you end up implementing it in an iterative fashion because the recursion implementation in your current programming language doesn't support tail recursion. Trying to solve every program with recursion is just as bad as solving everything with OO, however.Quote from: ToBeFrank on July 20, 2011, 09:57:21 pmNot suggesting that it's not important for people to understand it, just like a carpenter should probably be familiar with a hammer. Doesn't mean I want the carpenter to apply it to every problem.Quote from: ToBeFrank on July 20, 2011, 09:57:21 pmSorry for the bad assumption. An important feature in Python is list comprehensions (and related things like generator expressions). I would not consider these OO, familiarity with functional languages like Haskell is very useful for this.Quote from: ToBeFrank on July 20, 2011, 09:57:21 pmIs encapsulation really worth the performance hit in that case? Scientific data tends to be fairly homogenous, so I don't see a major advantage to polymorphism.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: July 21, 2011, 08:22:08 pm
content: Quote from: alm on July 21, 2011, 07:44:36 pmIf you think there's a performance hit by using encapsulation (there's not), and thus don't use it on code that runs parallel on thousands of cores, you're in for a serious world of hurt should you ever need to debug that code.

author: IanB
author_rank: Super Contributor
timestamp: July 23, 2011, 02:14:58 am
content: Quote from: GrumpyDave on June 13, 2011, 01:08:22 pmOK, ignoring the language wars and philosophical debates that filled this thread, there are two important keywords: PC and GUI. I think your sensible choice is to use Visual Studio (get the express editions for free) and C#. GUI programming on Windows is no picnic, and the .NET/C#/Visual Studio environment is the most accessible path for someone new to the scene. Yes, you could try Java, but then you would have to get and learn an IDE like Eclipse, and no way would I recommend Eclipse to beginners. Forget C or C++ for this, they don't (natively) do GUI.On the philosophical side of things, programming is programming; if you are an engineer you can apply engineering skills to programming in any language to hand. Don't get hung up on languages and IDE's--learn how to program in a general sense and let the world be your oyster.

author: ThePranksta
author_rank: Contributor
timestamp: August 31, 2011, 11:48:51 am
content: Assuming you are EE student you most probably are only going to use C and C++ when working with MCU's. I use C 99% of the time.I would recommend going with C, no ide, just a good programmer editor (I used Kate and Vim on my linux machine and Zues on my windows machine) and a makefile.If you've got all the basics then move on to C++; I would also recommend some literature on design patterns. If you go into embedded programming definitely get a book on the general workings of processors and do some assembler, decompiling and reading the assembler code is a very valuable tool to have.If you want to later master an IDE I would recommend Eclipse since it is used a lot and a number of the chip manufactures base their IDE on Eclipse.And as IanB mentioned getting the general programming and design skills down is the most important; consider some books on the workings of compilers it will make things clear on when A is better than B.

author: ChrisKiwi
author_rank: Contributor
timestamp: September 16, 2011, 12:25:12 pm
content: We used Microsoft C++ at Auckland University of Technology. The differences between C++ and C# are not that great but it seems harder (so I am told) to move from C# to C++ then it is to move from C++ to C#. If you are a student it is possible to download full "professional" ISO's from Microsoft as part of their "Dreamspark" program. The best idea is to use the same software that you would be using at your university if possible, that way you can get a lot more support from staff.

author: bruce273
author_rank: Contributor
timestamp: September 28, 2011, 06:46:51 pm
content: visual c# or basic on a pc are really easy to use for rs232 stuff when you use .NET. Python is also quite nice for programming for serial ports as well.

author: JuKu
author_rank: Frequent Contributor
timestamp: September 29, 2011, 07:17:46 am
content: For language: In embedded world, C. Scroll down, far, to see C++. C++ has its use, but its use is much rarer in embedded applications. Any other language, and you've painted yourself in corner - an obscure language that is usable with only one processor family, one tool and one tool provider. An OS is not a language, strictly speaking, although it adds many concepts, words and expressions. Learn embedded Linux and an RTOS, and learn those good. It doesn't really matter which Linux version or what RTOS as again, it is the concepts that matter.It does make much sense to learn the ideas of object oriented programming, as well other programming techniques. The ideas, concepts and good writing skills matter much more than the implementation tools. As my professor used to say: "You can write object oriented AI software in assembler; you can also write hairy assembler in Ada." (Ada is/was the most structurally sound language at the time.)What is the point of the no IDE recommendations? As I see it, I graduated almost 30 years ago, and even for me, makefiles and assembler are something that I can read and I can also write them if I have to, but those are definitely low level stuff that we have tools for. If I would be hiring and the applicant says he choose not to use an IDE, it would tell me that the person likes to do things the hard way, does not care about efficiency, quality or productivity and is not, and does not want to be, up-to-date technically. I can also cut a tree with a pocket knife if I have to, and you can argue I would learn a lot of the internal structure of a tree while doing that. I still prefer my chainsaw for that job.

author: baljemmett
author_rank: Unknown
timestamp: September 29, 2011, 10:45:04 am
content: Quote from: JuKu on September 29, 2011, 07:17:46 am(I haven't read back through this thread, which had lain dormant for a while, so I'm basing this on what I remember of the discussion originally, but...) I believe that recommendation was more to learna languageinstead of just learningan IDE. So by all means learn an IDE or two, once you've got the language worked out; even whilst you're learning the language. But if you can't work with the language outside the IDE, you don't know the language -- see, for instance, the sort of programmer who thinks the only way to define a class in C++ is to click Insert and then New Class..., type in a name and then maybe select a base class from the drop-down list, then use the wizards to add members and -- argh. Trying to work with code written by someone with that level of 'understanding' of the language is pretty unpleasant, as I'm sure many of us know from bitter experience!

author: JuKu
author_rank: Frequent Contributor
timestamp: September 29, 2011, 11:34:02 am
content: @baljemmett: Ok, very valid point, especially if talking about programming on Windows or Qt and such. You can indeed put together a nice, fancy, relatively big Windows application in Visual C# with just a hint of actual programming know-how.

author: Psi
author_rank: Super Contributor
timestamp: September 29, 2011, 11:38:16 am
content: The point about IDE's that i was trying to make a few pages back was that an IDE is something you "interface with" where as a language is something you "learn".Once you learn a language that's pretty much it, you know the language (excluding maybe a few advanced features you might pickup later).With an IDE your using it all the time.So it's very important that the IDE is designed well.Take the AVRStudio IDE for example, it doesn't let you change the entire color scheme to be light text on dark background.Sure, you can change some of the windows, but others are fixed with a white background.It's really annoying if you're the kind of person who finds it hard to concentrate when staring at an entire screen of white.NOTE: The new version may have fixed that.