Stories
Slash Boxes
Comments

SoylentNews is people

posted by LaminatorX on Saturday January 24 2015, @01:02AM   Printer-friendly
from the bicycle-chains dept.

Blogger Carl Cheo, who maintains a website providing numbered lists of tips for maximizing online productivity, has pulled together an easy-to-follow graphic answering the newbie question "What programming language should I learn first?" (pdf here). Cheo chose nine commercially viable languages as possible destinations as the viewer navigates the flow chart. Further down the page, there are tabs with annotated links to educational resources for each language. So what's in it for Soylentils, most of whom I'm guessing were programming newbies in the previous millenium? Well, maybe you have nephews or nieces who chose the wrong major in college. Besides, the graphic is amusing and clever, though probably not the last word on the subject.

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by Jesus_666 on Saturday January 24 2015, @12:38PM

    by Jesus_666 (3044) on Saturday January 24 2015, @12:38PM (#137605)
    If power consumption is your main concern (and your platform doesn't impose any restrictions regarding the choics of language) you should go with C or C++. They should give you good performance, albeit at the expense of being harder to pick up than, say, Ruby. You could write even more efficient programs if you were skilled with an appropriate assembler language but writing assembler code is difficult and laborious when compared to C/C++. Plus, unless you're really good your hand-written assembler code will probably be less efficient than what the compiler generates.

    Pretty much everything else falls under either "you have to write that yourself" or "there might be a library for that". Sending data through a wireless modem should fall into the latter category while talking to your sensors or recovering from power failure probably fall into the former.

    Hardware choice is also highly relevant. Is your hardware an embedded general purpose computer with the sensors being USB devices? Or are your sensors just hardware components that you have to wire up to something? In the latter case you might want to (for example) stick a couple sensors and a GSM modem onto an Arduino, which forces your programming language to be Arduino's dialect of C/C++. Or you work with some other platform which informs your language choice.


    In general, C/C++ are somewhat difficult to pick up but teach you a lot about the underlying technology. You need to worry about things like the size of a variable in memory, safely handling pointers and freeing memory after you use it. That makes them cumbersome but at the same time they teach you valuable lessons about how a computer works. Plus, they're fast because you don't have as big a layer between you and the machine.

    Java is kinda similar but takes away a lot of the low-level stuff. You don't need to worry about memory management or making sure that your strings end with a null byte. The emphasis is more on objects and their interaction. Java is verbose and somewhat bureaucratic but also has the advantage of running everywhere you can find a Java runtime. It's not terribly slow either but on embedded systems a JRE might not be available or might pose too big an overhead.


    In general I'd probably recommend C or C++ if you expect to work with embedded systems. They're difficult to learn but should work pretty much everywhere, whether you're working with a small device like an Arduino or a full-featured powerhouse like a Raspberry Pi.
  • (Score: 1) by That_Dude on Saturday January 24 2015, @05:36PM

    by That_Dude (2503) on Saturday January 24 2015, @05:36PM (#137643)

    Thank you, it looks like I will delve into C++ since it is being offered and I don't mind the extra learning effort.