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 warcques on Saturday January 24 2015, @01:24AM

    by warcques (3550) on Saturday January 24 2015, @01:24AM (#137506)
    top lel
  • (Score: 3, Informative) by doublerot13 on Saturday January 24 2015, @02:08AM

    by doublerot13 (4497) on Saturday January 24 2015, @02:08AM (#137516)

    I'd learn the languages I know in this order...

    -Python
    -Java
    -C++/C
    -Scheme
    -Smalltalk
    -MIPS asm

    I actually started with C++. I don't recommend it. It might make you hate programming, before you know programming.

    • (Score: 2) by hash14 on Saturday January 24 2015, @02:50AM

      by hash14 (1102) on Saturday January 24 2015, @02:50AM (#137523)

      Yeah, C++ is a mess and a first language to learn because it tries to be multiple things - compatible with C and native-binary object-oriented at the same time.

      If you're going to be a lifelong programmer, you have to understand both how the computer works, and how to use those tools to do what you want to achieve. And everybody learns these things a different way, so there's no single shot that will work for everyone.

      But given these requirements, I would probably prefer learning both C and Python together as first languages. C because it helped me understand what the computer is really doing when I program it; and Python because it helps me grasp what I can really do when I know what I'm doing.

      In fact, the first time I ever used Python (zero previous knowledge) was when I had to solve a numerical programming problem and I finished it in about half a day. But still, if all I knew today were Python, I would still have no understanding of what the computer was doing and as a result, I would have no trust that anything I had created was ever actually working as I intended. And let's not forget that this also teaches concepts like interpreted vs. compiled, static vs. dynamic, etc.

      So ultimately, I would say that it's good to know a mix, and then meet in the middle when you find the right balance of productivity and usefulness for what you're trying to do. No one can call his or her self a software engineer/computer scientist knowing only one language. Ultimately, a programming language is a tool and any good engineer has to know how to pick the right one.

      And sorry for omitting functional languages... but in all honesty, those are actually my favorites...

    • (Score: 3, Insightful) by Marand on Saturday January 24 2015, @04:19AM

      by Marand (1081) on Saturday January 24 2015, @04:19AM (#137541) Journal

      If I could change anything about what I've learned, it would be to pick up Ruby a lot sooner than I did. I kept avoiding it because I already knew Perl inside and out, and OO-heavy languages like C++ and Java never really clicked for me, so the idea of "it's sort of like Perl or Python, but fully OO!" just didn't seem compelling.

      As it turns out, Ruby's approach of making everything in the language an object, along with the Smalltalk message-passing concept, is what finally made OOP click for me. Being able to poke at the insides of all the data types, getting info about the objects, and doing things like 10.methods.sort and seeing all the methods, including operators like + and -, helped make OOP make sense to me in a way that all the inane examples in books and tutorials never did. (Like Java's "imagine a class as a bicycle, and a subclass as a specific type of bicycle, blah blah blah" shit.)

      It seems like it'd be a good language for beginners to start on, though I don't see people suggest it. It's always Python for some reason.

      ---

      I don't get why people are so hung up on Python being such a great beginner language. It even shows up in that infographic, with "I prefer to learn things the [easy|best] way" suggesting Python, and a bit about "widely regarded as the best language for beginners". The syntax is alien compared to other languages and encourages you to not think about closing blocks, so if anything, it seems like it would teach bad habits. But hey, at least the code will be indented nicely, I guess.

      I would think that something with a more flexible syntax and clear block beginnings and endings would be more useful when getting started. Perl gets you closer to a C-style syntax while being lenient, for example, or Ruby for more flexible block structure using real words instead of curly braces and a better introduction to OOP. Not the only examples, of course, but the point is that a bit of lenience is good at the start, and they're both very forgiving, with a lot of punctuation (periods and parentheses especially) frequently being optional.

      During learning/testing, I tend to slam out some quick test code first, then indent it after. One focus at a time. Even after knowing other languages, I found Python's insistence annoying. If I'd had my first programming language harassing me for not indenting to its preference, interrupting me from picking up basic language concepts, I probably would have said "fuck this" and found something else to do instead.

      It's not just about Python, though. Like you said, you started with C++ and it could have been detrimental, and I've had the same experience with Java (hate hate hate). When you're first starting, a language being "good" is less important than the language being easy to get something useful out of with as few barriers as possible. As a beginner, you're either doing it because you want to make something or because it seems fun. Not because you want to sacrifice boilerplate code and syntax errors to the compiler gods.

      • (Score: -1, Troll) by Anonymous Coward on Saturday January 24 2015, @04:53AM

        by Anonymous Coward on Saturday January 24 2015, @04:53AM (#137550)

        As it turns out, Ruby's approach of making everything in the language an object, along with the Smalltalk message-passing concept, is what finally made OOP click for me.

        So basically, you're retarded.

      • (Score: 2) by M. Baranczak on Saturday January 24 2015, @02:46PM

        by M. Baranczak (1673) on Saturday January 24 2015, @02:46PM (#137621)

        "Flexibility" is not a good thing for beginners, because it makes things more complicated. When there's 20 different ways to iterate over a list, it means you have to learn all of them, otherwise you won't be able to read other people's code. And having the freedom to indent however you want is a detriment for people who still haven't learned the importance of proper indentation.

        Ruby and Python are both good choices for beginners, I just think Python's better. It's simpler, and it teaches good habits.

        • (Score: 2) by Marand on Sunday January 25 2015, @02:47AM

          by Marand (1081) on Sunday January 25 2015, @02:47AM (#137752) Journal

          And having the freedom to indent however you want is a detriment for people who still haven't learned the importance of proper indentation.

          Ruby and Python are both good choices for beginners, I just think Python's better. It's simpler, and it teaches good habits.

          I get the reasoning, I just don't entirely agree. What good habits does Python teach? You get indentation at the cost of not learning to close blocks properly, that's a wash at best. You also get taught that if you aren't doing it the way the devs like then you're wrong. I don't see how that's a good habit, either. The forced indentation also interferes with code sharing unless everyone indents the same (usually PEP-8) way, going back to "do what the devs like or GTFO"

          Good formatting is important, yes, but shouldn't be the primary reason to teach a specific language, especially in a controlled environment where you can have the instructor kick your ass for poor coding practices.

          I'm not saying it's a terrible choice, and it's definitely far better than diving right into C or Java as a starter language. It's just that I don't think it's all rainbows and unicorn farts and the best teaching langauge ever like the smug pythonistas seem to think.

          "Flexibility" is not a good thing for beginners, because it makes things more complicated. When there's 20 different ways to iterate over a list, it means you have to learn all of them, otherwise you won't be able to read other people's code

          What? No it doesn't. It means you can learn all of them, not that you must. Certain ways are more common and, especially if you're using something like Perl's camel book or Ruby's pickaxe book, the style should be consistent throughout. Realistically you'll only be learning one way, at least at first.

          I wasn't talking about Perl-style "there's 50 ways to do it, all of them unreadable" anyway. That's why said flexible syntax, and mentioned optional parentheses as an example of what I meant, though it also includes things like requiring semicolons at end-of-line. I think reducing unnecessary punctuation is a good thing, especially when it allows English-like constructs. For example, a Ruby if/else without parentheses:

          if a == b then
              print "match"
          else
              print "no match"
          end

          Even without more than the vaguest understanding of programming it should be readable and can cleanly parsed in English. "if a equals b then print 'match', else print 'no match'. End." Python get some of it (no semicolons), but it's more strict about parentheses in other places and makes you litter colons around instead of sticking to words.

          It doesn't seem like a big deal if you're already familiar with other languages, but if you're picking up these fundamentals for the first time, it helps if they can be represented in an English-like way. (I happen to like Perl's "unless" statement for if-not-equals stuff for similar readability reasons, but wouldn't necessarily throw it at a newbie right off)

          • (Score: 2) by Magic Oddball on Sunday January 25 2015, @07:12AM

            by Magic Oddball (3847) on Sunday January 25 2015, @07:12AM (#137795) Journal

            You also get taught that if you aren't doing it the way the devs like then you're wrong. I don't see how that's a good habit, either.

            That's what I was originally taught about C in the class I took back in college — if we didn't write code in the same nebulous style the instructors preferred, we'd only get partial credit for our work even if the program performed perfectly. Our final exam was even multiple choice, with "which of these is written the right way" type questions with a partial focus on style. (Suffice to say I felt lucky that I got a C in the class.)

            • (Score: 2) by Marand on Sunday January 25 2015, @08:51AM

              by Marand (1081) on Sunday January 25 2015, @08:51AM (#137811) Journal

              At least with an instructor, after the class is done you can adjust your style to your liking. In that way it's sort of like martial arts; while learning, you have to do what the teacher wants, but inevitably it gets changed to suit you, sometimes only slightly, sometimes greatly. It's harder to do that when the "my way or the highway" is baked in, which is what I don't like about Python. There's plenty to like about the language, but it just has this authoritarian feel to it in some ways that I don't care for and would find unappealing as a learning language.

            • (Score: 2) by maxwell demon on Sunday January 25 2015, @11:31AM

              by maxwell demon (1608) on Sunday January 25 2015, @11:31AM (#137840) Journal

              Of course you got a C. It was a C class, after all.

              --
              The Tao of math: The numbers you can count are not the real numbers.
    • (Score: 2) by bzipitidoo on Saturday January 24 2015, @05:41AM

      by bzipitidoo (4388) on Saturday January 24 2015, @05:41AM (#137555) Journal

      I figured Python would be the winner. It really does have a cleaner syntax.

      The order I learned was roughly:

      BASIC (TRS-80, Applesoft, GW)
      6502 assembler

      DOS batch
      Pascal
      PL/1
      assembler on an IBM mainframe
      assembler on a DEC VAX
      x86 assembler
      Scheme
      Prolog
      C

      Fortran
      shell script (bash)
      HTML
      C++
      Java
      Perl 5
      SQL
      CSS
      JavaScript
      Python

      This reflects what was available. Some have said, for dramatic effect, that learning BASIC first causes irreparable damage, teaches bad habits that can't be unlearned, but it's not true of course. Got my start in middle and high school on the TRS-80 and Apple II+. Then in the poor quality CS program I attended, in which they took an engineering emphasis and didn't teach such fundamental concepts as Big O, I learned Pascal, and PL/I of all things. I mean, if they're not going to do a proper job of teaching algorithms, just going to hammer on specific programming languages and snuggle up to specific hardware by emphasizing assembler, you'd think they could at least pick good languages, particularly a close to the metal language like C, and not an old dog like PL/I. But their senior professor was an old IBM mainframe hacker, even pushed Job Control Language. At least they taught Scheme, which I found difficult maybe because that's where I really had to unlearn those bad habits I picked up from BASIC? They did not teach in C, I had to learn that on my own. I learned C++ on my own after graduation, but still before the STL existed. By the time I picked up Perl 5, learning a new language was no big deal any more. The underlying principles are much the same, all I need is a reference manual and I can be writing code within the day. Sadly, most employers won't hear a word of that, and remain firmly committed to the idea that experience in a specific language is what counts, whether or not they really believe that themselves.

      Perl was my introduction to the next generation, and I was thrilled that hashes were a built in type, and it was no longer necessary to hack together your own crummy throwaway hash function like you'd have to in C, before the days of the STL. The regular expression engine was very cool too. And not having to declare variables was real convenient, gets rid of boilerplate, saves time. It was a nice return to and improvement on a feature of BASIC I'd always liked and never could see why Pascal, PL/1, C/C++, Java, Modula, and seemingly every "professional" and "real" language didn't allow. Maybe Pascal could be expected to take that attitude since it was strictly typed, but C? And then Java is even more anal, forcing the programmer to put each class in a separate file. One big thing I don't like about Perl is having to use the $ sigil all over the place, but it seemed the price of not having to explicitly declare "scalar" variables. However, Python manages that trick, so why can't Perl?

      • (Score: 0) by Anonymous Coward on Saturday January 24 2015, @06:40AM

        by Anonymous Coward on Saturday January 24 2015, @06:40AM (#137559)

        BASIC (the original, not VB) was my first language and I think it was great, very good training especially for thinking in terms of loops. And it gave me confidence that I could master any other programming language or system, although obviously the others would take more time.

        I appreciate that kids today wouldn't be satisfied learning a command line language that wasn't Internet aware. Sometimes, a step forward is a step back.

        • (Score: 2) by bzipitidoo on Sunday January 25 2015, @03:37PM

          by bzipitidoo (4388) on Sunday January 25 2015, @03:37PM (#137899) Journal

          Thinking in terms of loops? What made Scheme hard was being forced to deal with recursion. Scheme doesn't have explicit loop constructs. You create loops through recursion.

          Recursion scares a lot of people. Some programmers never use it. Recursion is not that hard, but the attitude surrounding it can be off-putting.

    • (Score: 1) by gnuman on Saturday January 24 2015, @05:43PM

      by gnuman (5013) on Saturday January 24 2015, @05:43PM (#137645)

      I actually started with C++

      That's why you start with C. Then you'll be able to grok the extras of C++ using concepts from C.

      Starting with C++ is inadvisable. Even the hello world program,

            std::cout << Hello world" << std::endl;

      is difficult to explain to newcomers. The above involved classes, operator overloading, multiple function calls, inheritance and return references. Really, stick with C for beginners,

            printf("Hello World\n");

      • (Score: 2) by maxwell demon on Sunday January 25 2015, @11:44AM

        by maxwell demon (1608) on Sunday January 25 2015, @11:44AM (#137841) Journal

        You don't explain every detail on the first encounter. Indeed, the worst courses are those who try to explain everything the first time you encounter it. No matter what language, it almost certainly means that you get swamped with details which you don't need to care about yet.

        When taught correctly, the cout interface is the simpler one. You just have to explain that cout means "output", things you want to output are added with << foo, and endl means "end of line, show now".

        Just as at this point you'll not teach that standard output is just a special case of a file, with certain restrictions like that you cannot seek, you'll also not teach at this point that cout is a class, that << is an overloaded operator, or that endl is actually a function. All the details you'll explain when you get there (for example, wne it comes to output your own types), not earlier.

        --
        The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 3, Funny) by buswolley on Saturday January 24 2015, @02:25AM

    by buswolley (848) on Saturday January 24 2015, @02:25AM (#137519)

    Where is turtle logo?

    --
    subicular junctures
    • (Score: 5, Funny) by davester666 on Saturday January 24 2015, @04:19AM

      by davester666 (155) on Saturday January 24 2015, @04:19AM (#137542)

      offscreen somewhere.

    • (Score: 2) by jcross on Saturday January 24 2015, @04:56AM

      by jcross (4009) on Saturday January 24 2015, @04:56AM (#137552)

      Yes, it's perfect for learning recursion:

      To WORLD :N
      SetTurtle :N
      WORLD :N + 1
      End

      Where does it stop? Why, it's turtles all the way down!

      • (Score: 2) by maxwell demon on Saturday January 24 2015, @08:36AM

        by maxwell demon (1608) on Saturday January 24 2015, @08:36AM (#137578) Journal

        Where does it stop?

        When the stack of turtle overflows. That is, you've got so many turtles stacked on each other that they cannot keep balance any more, and the whole thing crashes.

        --
        The Tao of math: The numbers you can count are not the real numbers.
        • (Score: 2) by jcross on Saturday January 24 2015, @11:34PM

          by jcross (4009) on Saturday January 24 2015, @11:34PM (#137720)

          Exactly, proving that just as the scriptures tell us, the world is on top of a stack of 1024 turtles, no more, no less. Well, I guess it might be implementation dependent. Huh, I wonder if these scriptures really were written by God, or was it just some guy...

  • (Score: 1) by Buck Feta on Saturday January 24 2015, @02:53AM

    by Buck Feta (958) on Saturday January 24 2015, @02:53AM (#137524) Journal

    No one bothers with assembly languages anymore?

    --
    - fractious political commentary goes here -
    • (Score: 2) by Arik on Saturday January 24 2015, @03:42AM

      by Arik (4543) on Saturday January 24 2015, @03:42AM (#137531) Journal
      No, the original high-level language is far too low-level for todays hipsters.

      Which makes sense, did you look at how often $$$ shows up in his flow chart? It's all about the money. Which means churning out crap quickly and keeping your customers on an upgrade treadmill, it makes no sense to try and do anything properly in that environment.

      The first 3 languages I learned were TRS-80 Basic, Sinclair Basic, and Z80 machine language. I'm living proof that Basic causes brain damage, but if I were recommending a language for someone that actually wants to get into programming (as opposed to just wanting $$$) it would definitely be machine language. There's something almost magical about learning your computers native language instead of having to put everything through several layers of machine translation back and forth.

      --
      If laughter is the best medicine, who are the best doctors?
      • (Score: 2) by Snotnose on Saturday January 24 2015, @04:02AM

        by Snotnose (1623) on Saturday January 24 2015, @04:02AM (#137536)

        Yep, for me it was TRS-80 BASIC -> Z-80 assembly -> 8080 assembly -> 8086 assembly -> C -> 2900 microcode -> awk -> sed -> sh -> C++ -> perl -> etc

        --
        Why shouldn't we judge a book by it's cover? It's got the author, title, and a summary of what the book's about.
    • (Score: 2) by maxwell demon on Saturday January 24 2015, @11:43AM

      by maxwell demon (1608) on Saturday January 24 2015, @11:43AM (#137602) Journal

      As first language? I guess for 99% of all people it would be a means to eliminate all interest into programming.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    • (Score: 0) by Anonymous Coward on Saturday January 24 2015, @07:52PM

      by Anonymous Coward on Saturday January 24 2015, @07:52PM (#137670)

      Which platform? Choose wisely...

  • (Score: 4, Interesting) by TrumpetPower! on Saturday January 24 2015, @03:33AM

    by TrumpetPower! (590) <ben@trumpetpower.com> on Saturday January 24 2015, @03:33AM (#137529) Homepage

    ...but, unless you have some very specific reason to go with a particular language, you probably should be starting with JavaScript.

    I hate JavaScript. It's a miserable language that should have been taken out and shot before it was born.

    But...it's on every Web browser. You don't need anything special -- no compiler, no development environment, no particular OS or platform, no server, no license...just whatever you happen to have, wherever you happen to have it.

    It'll do all the "Hello, World!" basics. If you spend any time in IT, you'll probably have to get your hands dirty with it. You can create practically-universal smartphone apps with it to impress your friends. And, by the time you outgrow it, you'll know exactly why it's such a miserable language and therefore know what you want in your next real language.

    All that writ, I'd also give a shout-out to SQL. There's no better way to learn set theory, and set theory has so many everyday applications beyond just programming it's not even funny.

    b&

    --
    All but God can prove this sentence true.
    • (Score: 3, Funny) by Snotnose on Saturday January 24 2015, @04:00AM

      by Snotnose (1623) on Saturday January 24 2015, @04:00AM (#137535)

      I hate JavaScript. It's a miserable language that should have been taken out and shot before it was born.

      If JavaScript ever gets legitimate garbage garbage collection then 99% of the programs will delete themselves when executed.

      / I've gotten good in dozens of languages
      // Javascript is the only one I actively hate
      /// it's user hostile

      --
      Why shouldn't we judge a book by it's cover? It's got the author, title, and a summary of what the book's about.
    • (Score: 2) by mendax on Saturday January 24 2015, @08:00AM

      by mendax (2840) on Saturday January 24 2015, @08:00AM (#137572)

      I was actually going to suggest Javascript when I saw your posting. It's simple, reasonably clean, but immensely powerful as a scripting language goes. One does not have to use it in a browser after all. My favorite scripting language is Groovy but that's because I'm a Java shill. I prefer working in the Java runtime environment and Groovy makes that very easy for someone who already knows Java.

      I think the I would suggest any scripting language so the novice doesn't have to worry about data types so much, then migrate to something like Java that does. After that then go to Objective C. C++ is just plain nasty.

      Having said all this, I am a far better programmer because I took the time to learn how to write assembly language programs for a variety of machines: Control Data 6000 and its successors (RISC before the term was coined), TI 9900, PDP-11, and 6502. (I tried learning 8086 assembly but its ugliness turned me off.) Learning to program the machine at such a low level gives the programmer many insights into computers in general that one could perhaps not otherwise obtain.

      --
      It's really quite a simple choice: Life, Death, or Los Angeles.
  • (Score: 1, Insightful) by Anonymous Coward on Saturday January 24 2015, @03:46AM

    by Anonymous Coward on Saturday January 24 2015, @03:46AM (#137532)

    Is the "The Lord of the Rings analogy" helpful or have any productive purpose?
    Shit like that just pisses me off. It is distracting.
    I would trade my ad-blocker for something that could filter out crap like this.1

  • (Score: 1, Redundant) by CirclesInSand on Saturday January 24 2015, @03:50AM

    by CirclesInSand (2899) on Saturday January 24 2015, @03:50AM (#137534)

    If you only care about short term and low quality programs, then learn something like python first.

    But if you want to have a base that will last a lifetime for programming, then you should first learn math. Proofs, derivation, and the standard of absolute correctness are essential to understand to be a competent programmer.

    Math problems are also a good first set of programs to write. Geometry: line drawing, shapes; equations : quadratic solver, numerical differential calculus ; physics : color and sound. Those are good starting problems to learn and enjoy programming with.

    Unfortunately, nowadays programmers' first programs are not much more than learning to work around the bugs, unintuitive definitions, and bloat of standard libraries. It's like the first task of new programmers these days is to overcome the failures of past programmers (who not coincidentally probably didn't learn math well themselves).

    • (Score: 2) by Fnord666 on Saturday January 24 2015, @04:06AM

      by Fnord666 (652) on Saturday January 24 2015, @04:06AM (#137537) Homepage

      Unfortunately, nowadays programmers' first programs are not much more than learning to work around the bugs, unintuitive definitions, and bloat of standard libraries. It's like the first task of new programmers these days is to overcome the failures of past programmers (who not coincidentally probably didn't learn math well themselves).

      And frameworks. Don't forget the bloody frameworks!

  • (Score: 2) by Subsentient on Saturday January 24 2015, @04:13AM

    by Subsentient (1111) on Saturday January 24 2015, @04:13AM (#137539) Homepage Journal

    ...was copy-pasted python. I'd google for something and then paste it. I didn't know much of the actual language. Two years later, I started to learn C.

    --
    "It is no measure of health to be well adjusted to a profoundly sick society." -Jiddu Krishnamurti
  • (Score: 2) by darkfeline on Saturday January 24 2015, @04:42AM

    by darkfeline (1030) on Saturday January 24 2015, @04:42AM (#137549) Homepage

    Scheme - good for developing theoretical understanding of computation and algorithms, pair with SICP. Exposure to Lisp, macros.

    Python (or Ruby) - useful and practical for everyday scripting of tasks and quick software prototypes.

    C - useful and necessary. Gives you performance. Portable assembly, more or less exposes the hardware implementation of modern computers and makes it easier to pick up assembly/machine code in the future.

    Java - very prevalent in business, useful to pick up and get acquainted with a common OOP implementation style (although it's inferior to e.g. Smalltalk I hear).

    Haskell (or Clojure) - Functional programming experience.

    Shell - the pipeline, common shell programming forms, input/output redirection, job management.

    Once you've picked up those languages or set of skills, you can pretty much pick up any other language and learn it in a weekend.

    --
    Join the SDF Public Access UNIX System today!
  • (Score: 3, Interesting) by maxwell demon on Saturday January 24 2015, @08:51AM

    by maxwell demon (1608) on Saturday January 24 2015, @08:51AM (#137581) Journal

    In the diagram, in the "Just want to get started" section, there's the final decision "I prefer to learn things ..." with the options (besides others) "the slightly harder way" and "the really hard way". On "the slightly harder way" you find (after another decision split) "C", on "the really hard way" C++.

    This is wrong. To completely master C++ is certainly much harder than to completerly master C, and to understand C++ programs written by others can be much harder than understanding C programs written by others. But for learning, you'll mane much easier progress with C++ than with C because you can defer the really hard stuff (like memory management) to much later (you can accomplish quite a lot in C++ without ever having to explicitly manage memory or deal with visible pointers). On the other hand, in C you cannot get very far without learning those concepts.

    The huge number of features in C++ doesn't matter that much for learning because you're not going to use features which you didn't learn about yet. However you'll be able to different programming styles without having to relearn the basics exactly because C++ is so feature rich.

    Is C++ the best possible programming language? Certainly not. And as a beginner, you most probably are better off starting with Python than with C++. I just disagree with the assessment that starting with C++ is harder than starting with C.

    --
    The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 1) by That_Dude on Saturday January 24 2015, @09:07AM

    by That_Dude (2503) on Saturday January 24 2015, @09:07AM (#137582)

    First of all - I couldn't program my way out of a wet paper bag!

    I am nearing the point where I need to pick up a programming language at my University.
    I would like to choose something that would enable me to interact with various sensors, in a remote/unattended device, and the data those sensors collect.
    I would like to automate some processes based on positive signals.
    I would like to send collected data, images and device condition data periodically.
    Power consumption is at a premium - batteries only.
    When the power dies, I need for the device to pick up where it left off.

    What would you suggest?

    • (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.

    • (Score: 2) by RamiK on Saturday January 24 2015, @12:54PM

      by RamiK (1813) on Saturday January 24 2015, @12:54PM (#137608)

      For a battery powered device it depends on the Microcontroller but it's hopefully C. If you're not lucky it's either Verilog or VHDL variant or maybe even some assembly language.
      For the workstation it's likely C for collecting the data, doing any live, time-sensitive processing on it, and then storing it - likely in a tabular text file - for later usage (usually importing the file into Excel).

      --
      compiling...
    • (Score: 1) by gnuman on Saturday January 24 2015, @05:58PM

      by gnuman (5013) on Saturday January 24 2015, @05:58PM (#137650)

      Get together with other people in department and hire a real programmer. Ideally, one that has at least a BS in your field (or at least practical hard science field) you work in so they know WTF is happening. They'll be able to provide much better feedback about your ideas and you will not have to spend years learning things you clearly do not really care to learn anyway.

      For example, a good programmer for a science lab is as important as a good machinist. But then maybe I'm a little biased here. In the end, I've seen some terrible code written by researchers where they have literally wasted away years trying to implement.

    • (Score: 0) by Anonymous Coward on Sunday January 25 2015, @08:02AM

      by Anonymous Coward on Sunday January 25 2015, @08:02AM (#137801)

      i would recommend learning at least some assembly for embedded applications, since its a good way to learn about the hardware so you can get the most out of it

  • (Score: 1) by GDX on Saturday January 24 2015, @05:46PM

    by GDX (1950) on Saturday January 24 2015, @05:46PM (#137646)

    The true is that most people mistakes learning a programing language with learning to program, basically they mistake learning to use a tool with learning the skill, this not only applies to programing but also to image/video/audio editing, 3D modeling... most of this first programing language questions also fall with that mistake.

    For me a true programer have to learn at least:

    paper&pencil, there a lot of programers that don't known hot to use flowcharts or other diagrams.
    some assembler
    c
    a class based language: c++, java, objective-C... , if they learn various is better
    a prototype based language like JavaScript

    and is a plus if they learn FORTRAN, Matlab(scilab or octave also works), Perl and/or python

  • (Score: 3, Interesting) by The Mighty Buzzard on Sunday January 25 2015, @12:44AM

    by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Sunday January 25 2015, @12:44AM (#137733) Homepage Journal

    Learn perl. It'd dead easy to just jump into so low initial learning curve and if you can find master perl you can master anything. Also, you're damned well going to need it if you ever decide you want to admin a *nix box.

    --
    My rights don't end where your fear begins.
    • (Score: 3, Funny) by Geotti on Sunday January 25 2015, @05:29AM

      by Geotti (1146) on Sunday January 25 2015, @05:29AM (#137784) Journal

      if you can find master perl you can master anything

      I was looking for him for a long time, but when I finally found him in a nearby basement and knocked on his door, he told me to get off his lawn.

  • (Score: 2) by crutchy on Sunday January 25 2015, @06:37AM

    by crutchy (179) on Sunday January 25 2015, @06:37AM (#137794) Homepage Journal

    fwiw

    - html (hotdog - get off my lawn!)
    - visual basic (ms access)
    - object pascal (delphi)
    - php (lamp)

    i would recommend pascal for beginners. its strong typing means a lot of basic learning mistakes are picked up by the compiler, and delphi (well, up to delphi 7 anyway) was an awesome IDE that made debugging fairly easy. the delphi VCL is also a great example to learn from.

    for all the flak that php cops, its a nice language that's pretty easy to pick up, and is flexible, and if its good enough for facebook and wikipedia it can't be all that bad.

  • (Score: 2) by toygeek on Sunday January 25 2015, @07:59AM

    by toygeek (28) on Sunday January 25 2015, @07:59AM (#137800) Homepage

    This gave me some really good ideas. Of course I know that nothing is really gospel, but, it's a good starting point. I started doing Udacity's Python/CS course a couple of years ago, but was not able to finish it (timing). But, I just signed up for Javascript over at CodeAcademy. It'll be a good starting point. Mind you, I've dabbled in programming since I was a kid typing BASIC commands from the book into the TI-99A or TRS-80. I fooled with TC++ when I was a teenager (and got completely lost at the concept of pointers). As a Linux geek I've written a fair number of Bash scripts (some fairly larger ones even). I attempted Perl once. And like most, I can code in HTML fairly easily.

    At the end of the day, I just want to be make computers do what I want them to do. It seems to me that right now, the best way to do that is with Javascript. It's relevant to just about any platform, and once I get going on it, I'll likely pick up another language. Maybe I'll attempt CSS again and get into web development, and then PHP/MySQL. But, Javascript is going to be the first language that I learn from scratch, through and through. No more dabbling!

    --
    There is no Sig. Okay, maybe a short one. http://miscdotgeek.com