Which programming language to start with?

Discussion in 'Science and Technology' started by farmkid, Jan 23, 2014.

  1. farmkid

    farmkid Commodore Commodore

    Joined:
    Jun 1, 2005
    My 16 year-old son broke his leg a couple of weeks ago. He's a runner, and training, meets, etc. take up a lot of his time. Well, obviously, with his broken leg he's now going to have a bit more time on his hands. A couple of days ago he asked me about whether the home computer could play a couple of specific games with the idea that he would buy those games to occupy that extra time. I suggested to him that he use that time for something more productive and suggested he study a bit of computer programming instead because I recognize how useful that skill would be to him in the future.

    So, my question to those on the board who do it for a living or at least for fun, which language should I direct him to as a good place to start?
     
  2. Sophronisba

    Sophronisba Lieutenant Junior Grade Red Shirt

    Joined:
    Jan 5, 2014
    You might direct him to Codecademy. It has a lot of tutorials for HTML, CSS, PHP, Python, and Ruby.
     
  3. Robert Maxwell

    Robert Maxwell Comfortably Numb Premium Member

    Joined:
    Jun 12, 2001
    Location:
    where it hurts
    Python is a great place to start. The language is simple, doesn't have too much in the way of weird syntax, and it's very powerful right out of the box.

    If he's interested in video games, would he consider learning how to make them? Python has a module called Pygame which is designed for 2D graphics.

    There's also Unity, which is a very powerful and popular game development system. It has a free version that would be great for cutting one's teeth on.

    For general programming principles, though, I'd definitely recommend Python. There's a very good online book that teaches Python in great detail (but that's just one of many.)

    Good luck to your son!
     
  4. Lindley

    Lindley Moderator with a Soul Moderator

    Joined:
    Nov 30, 2001
    Location:
    Bonney Lake, WA
    There's a bit of a debate on whether it's better to start with high-level languages or low-level languages. If you start with low-level (C), you run the risk of scaring people off. If you start with high-level, you run the risk of people never really understanding what's going on under the hood.

    Python is a decent place to start, for the high-level-first crowd.
     
  5. iguana_tonante

    iguana_tonante Admiral Admiral

    Joined:
    Sep 15, 2006
    Location:
    Italy, EU
    Yeah, I was going to suggest Python.

    For my job I mostly write code in C, but for legacy software programs we use ancient languages way back to FORTRAN 77. But I wouldn't recommend it to anyone. :lol:
     
  6. Robert Maxwell

    Robert Maxwell Comfortably Numb Premium Member

    Joined:
    Jun 12, 2001
    Location:
    where it hurts
    At least it's not MUMPS!

    Yes, I am a MUMPS guy.




    :(
     
  7. JarodRussell

    JarodRussell Vice Admiral Admiral

    Joined:
    Jul 2, 2009
    Python, Java and C# are the standard languages I'm always running across. Java and C# are very similar anyways. Java is used in Android, C# can be used extremely effectively in Unity. Python is big in all 3D animation packages. So those 3 are pretty well in use when it comes to games and mobile apps.

    I always advocate against confronting starters with low level languages.
     
  8. MacLeod

    MacLeod Admiral Admiral

    Joined:
    Mar 8, 2001
    Location:
    Great Britain
    This brings back memories, back in my college days we had to do a bit of programming and so had to learn a bit of some languages. From memory we did C and I think we even did a bit of machine code.
     
  9. Lindley

    Lindley Moderator with a Soul Moderator

    Joined:
    Nov 30, 2001
    Location:
    Bonney Lake, WA
    Assembly ("machine code") is too low-level for any but the most hardcore programmer. And even they only go there in inner loops.....
     
  10. farmkid

    farmkid Commodore Commodore

    Joined:
    Jun 1, 2005
    Thanks for the advice. Several have suggested Python, so I think I'll suggest that first. I think I'll try to join him in that it will be beneficial to me as well. I work in molecular biology, and have learned a little Perl over the last few years to do a few tasks as that's a common language used for data analysis in my field and a lot of modules and other tools have been developed in Perl for the field. However, a lot of people seem to be moving over to Python instead now and as I understand there are getting to be a lot of Python tools available now. I've wanted to learn Python, and maybe this is a good excuse if I can study it with my son.
     
  11. iguana_tonante

    iguana_tonante Admiral Admiral

    Joined:
    Sep 15, 2006
    Location:
    Italy, EU
    I think this is a pretty nice idea. :)
     
  12. B.J.

    B.J. Rear Admiral Rear Admiral

    Joined:
    Jul 14, 2004
    Location:
    Huntsville, AL
    I'm way out of date here. My first thought was BASIC! Too bad there's no simple standard like that built into computers anymore.
     
  13. Robert Maxwell

    Robert Maxwell Comfortably Numb Premium Member

    Joined:
    Jun 12, 2001
    Location:
    where it hurts
    Actually, Windows has a built-in scripting host. It's not the greatest thing, but it works.

    This is JScript that I just whipped up for no reason:

    Code:
    var d = new Date()
    var hour = d.getHours();
    var message = "";
    if (hour >= 5)
    {
        if (hour < 12)
        {
            message = "Good morning!";
        }
    }
    if (hour >= 12)
    {
        if (hour < 17)
        {
            message = "Good afternoon!";
        }
    }
    if (hour >= 17)
    {
        if (hour < 20)
        {
            message = "Good evening!";
        }
    }
    if (hour >= 20)
    {
        if (hour < 5)
        {
            message = "Good night!";
        }
    }
    WScript.Echo(message);
    
    There's also VBScript, not to mention batch file scripting and PowerShell.

    That's just Windows. On UNIX/Linux environments, you've usually got a bunch of languages delivered with the OS, from simple shell scripting languages (bash/awk/sed) to interpreted languages (perl, python, ruby) and possibly compiled languages (C/C++, Java, etc.)

    Computers these days actually come with several built-in languages you can use. They just aren't necessarily publicized, and your computer doesn't come with a huge-ass programming book (like the 286 clone I had as a kid came with a gigantic GWBASIC manual.)
     
  14. rhubarbodendron

    rhubarbodendron Rear Admiral Rear Admiral

    Joined:
    May 1, 2011
    Location:
    milky way, outer spiral arm, Sol 3
    10 RUN
    20 INPUT = A$
    30 IF A$ = "BASIC" GOTO 40 ELSE GOTO 60
    40 PRINT "oooh BASIC!"
    50 PRINT "those were the days!"
    60 END

    LOL sorry, I just couldn't resist! Not sure if it's all correct, though. It's been about 35 years since I last programmed in Basic. I loved it! There were totally cool games back then.
    OMG! I had completely forgotten that one! I had no idea it's still in use. Cool =)

    I'm not good enough in modern languages to make any recommendation, but being a runner myself and having been restricted by my medicine man to slow walking and a little bicycling for 7 months now due to having broken my knee I can totally relate to your son, farmkid. Please give him my best wishes for a speedy recovery! (I was going to say "please give him a hug" but with him being 16 it's highly unlikely he'd appreciate being hugged by a parent :D)
     
  15. Collingwood Nick

    Collingwood Nick Vice Admiral Admiral

    Joined:
    Jan 28, 2002
    BASIC for the win. These days it's called Visual Basic, or .NET, or ASP, or something. It's all the same thing. BASIC >>> any language that uses pointers
     
  16. Robert Maxwell

    Robert Maxwell Comfortably Numb Premium Member

    Joined:
    Jun 12, 2001
    Location:
    where it hurts
    Visual Basic is horrible. I have to do quite a bit of VB coding for work. I'd rather hammer nails through my feet.

    Pretty much anything else would be a better choice.
     
  17. StarMan

    StarMan Vice Admiral Admiral

    Joined:
    Jul 5, 2005
    Location:
    New Zealand
    Hi - just offering the humble opinion of a computer science student in second year. After learning python and visual basic last year and presently in the paddling pool with Java, I wholeheartedly recommend starting with python. It provides a user friendly introduction to the fundamental principles of programming. Go for it!

    And I concur with Robert Maxwell's sentiments re: Visual Basic. God awful.