What programming language for a n00b to learn?



  • So i've been reading the site for the last few months, despite being a non-programmer. As a big fan of Dilbert (my main source of knowledge on the Real Business World) I enjoy most of the articles and even sometimes understand part of the CodeSOD's.  I'm fairly computer-literate and I am actually interested in learning a language, although I don't have any kind of job-related application for it (I'm a design student).


    I figure C or C++ is the way to go, since it would be the most useful for the small purposes I have in mind (I think?), but a few friends suggest I start with Java to get a handle on OOP. For the record I would be interested in developing plugins for random apps, mods for computer games but proably most usefully writing programs for PIC's and other microcontrollers.


    Im turning to you guys for suggestions and advice, and any warnings that could save me from ending up on this site ;) 



  • Personally I started out in various flavors of BASIC, and I'm pretty happy I did since I'm fairly certain that C would've been to frustrating to learn as a beginner (but then again I was 9 at the time..). Be warned that it takes a lot of time and effort before you can move beyond "simple" console applications in C..

    At any rate I agree that for the kind of work you seem to be interested in C/C++ is the obvious choice. Many mods/plugins are written in (often custom) scripting languages though.

    Still, it's very hard to give a good unbiased answer to these kinds of questions. A programming language is more of a religious and/or political choice than a simple tool for most of us (myself included).



  • While lots of people learn C/C++ as their first language, there are challenges involved that maybe make it more difficult to pick up than others... Java or C# are good alternatives that can stress OOP concepts, but if you're really a complete newbie at programming you might want to start with something like Python that even takes the compiler out of the loop.   


    What OS are you using?

    -cw



  • xp - for stuff like CAD I can't use anything else, and its worked fine for me.

    I'll admit I did pick up a "learn QBasic in 21 days" book oh, about 8 years ago, but I never made it past the first 'day' -_-

    Which brings me to my next question - for whatever langauge you guys suggest, what's the best way to learn, or at least get the basics straight (again, don't want to breed any WTF-inducing bad habits)?
     



  • Learn Python.  The tutorial on the python site will get you past the syntactic hurdles, and Python is expressive enough that you can play with the semantics without worrying too hard about every last mechanical detail.  Once you get past that if you want to do something "fun" have a look at PyGame -- it's a set of python libraries for writing, um, games and it gives you graphics, sound, and some level of 3D graphics support.



     



  • @kaiza said:


    xp - for stuff like CAD I can't use anything else, and its worked fine for me.

    XP is fine,  There's even a .NET python implementation called "Iron Python" developed by a couple of guys I work with.  I'm not much of a python guy myself, so I don't have a basis for comparison, but it seems pretty cool...full python + .NET libraries.  

    Not sure if that's good for newbies or not...anyone here have a user's-eye view of IP?

    @kaiza said:


    Which brings me to my next question - for whatever langauge you guys suggest, what's the best way to learn, or at least get the basics straight (again, don't want to breed any WTF-inducing bad habits)?

    Don't worry about gaining bad habits too much at this point.  Just enjoy being able to wield control over the machine :)   Find some books/sites with interesting examples...re-type them and experiment with them (don't just cut and paste).  Once you're fairly comfortable making basic things work, then pick a small project that you'd find interesting...simulate a board/card/dice game that you like for example...get used to the idea of taking an idea and turning it into code. 

    -cw



  • I myself have never tried python but I've heard it's good to start with. I originally started with QBasic but gave up on it (simply wasn't for me). I doubt many of you would consider this a real language but I learned HTML first, then how to use CSS and then moved to my main (and favorite) language of Java. I would recommend Java, although Java or C++ would be my top choices. Java is based of C++ anyway so pick up one and you can move to the other fairly quickly.



  • Also worth reading is Peter Norvig's "Teach Yourself Programming in 10 Years" wherein he quite rightly points out that programming is a broad skill set that takes a long time to really master.  Peter is Google's director of research, so one hopes he has some insight into the topic :)

    -cw



  • Don't learn any languages.

    Simply call yourself an "enterprise architect" and toss around various buzzwords.

    There goes that caustic cynicism again. 



  • @CPound said:

    There goes that caustic cynicism again. 

    Err...yeah.   It's pretty clear you don't like your job, but popping onto a thread just to poke fun at trying to learn?  Come on.

     



  • In the old days (few years ago), most CAD software was written in C/C++ since they ran on Unix and Windows and needed the speed advantage.  Not necessarily the case today.  AutoCAD 2007 requires .Net.  Unigraphics NX4 and TeamCenter is a combination of C/C++, Java, vbscript and .Net.  I really see the core of CAD software being written in C/C++ with many of the plugins, toolkits, etc integrating with higher level languages like Java, C#, VB. 

    Games seem to be going in the same direction as well.  A lot of games today allow modding via scripting languages like Lua.   

    Now I haven't done microcontroller programming in years.  At the time, the microcontrollers I programmed used their own language anyways.

    So I guess the point is, concentrate on the fundamentals such as structure and patterns.  IMO, most languages really only differ in syntax - the principles are the same. 
     



  • People who concentrate on structure and patterns will generate bureaucracy and pattern overload. People who concentrate on languages will generate programs that compile beautifully and do nothing.

    There is no magic bullet. There is nothing you can concentrate on that will solve anything (with the exception of "attention to detail", which isn't specific to programming). Only long years of practice will make a difference.

    It is exactly like learning to play a musical instrument. You don't become a good player by reading a book, or doing special things. You become a good player through a combination of natural talent and practising hard, every day, for years.

    And just like playing a musical instrument, don't expose other people to the terrible noise and mess that you create in the first few years, until you stop sucking. 



  • @asuffield said:

    People who concentrate on structure and patterns will generate bureaucracy and pattern overload. People who concentrate on languages will generate programs that compile beautifully and do nothing.

    There is no magic bullet. There is nothing you can concentrate on that will solve anything (with the exception of "attention to detail", which isn't specific to programming). Only long years of practice will make a difference.

    It is exactly like learning to play a musical instrument. You don't become a good player by reading a book, or doing special things. You become a good player through a combination of natural talent and practising hard, every day, for years.

    And just like playing a musical instrument, don't expose other people to the terrible noise and mess that you create in the first few years, until you stop sucking. 

    As a musician I can tell you one more thing you must do to become a good player:  play with other good musicians.  (Start in a group with players who don't mind the terrible noise and mess.)  Likewise for programming -- work on a multi-person project.  There are open-source projects that need volunteer time.

     



  • @newfweiler said:

    As a musician I can tell you one more thing you must do to become a good player:  play with other good musicians.

    Oh, good point. I love it when an analogy makes more sense than intended. 



  • @kaiza said:

    So i've been reading the site for the last few months, despite being a non-programmer. As a big fan of Dilbert (my main source of knowledge on the Real Business World) I enjoy most of the articles and even sometimes understand part of the CodeSOD's.  I'm fairly computer-literate and I am actually interested in learning a language, although I don't have any kind of job-related application for it (I'm a design student).


    I figure C or C++ is the way to go, since it would be the most useful for the small purposes I have in mind (I think?), but a few friends suggest I start with Java to get a handle on OOP. For the record I would be interested in developing plugins for random apps, mods for computer games but proably most usefully writing programs for PIC's and other microcontrollers.


    Im turning to you guys for suggestions and advice, and any warnings that could save me from ending up on this site ;) 

    I'd suggest Python to get you started. Once you'll have a feel of the language, and of the basic programming constructs (functions, conditions, loops, ...) you can get to lower-level programming language (C).


Log in to reply