• Welcome! The TrekBBS is the number one place to chat about Star Trek with like-minded fans.
    If you are not already a member then please register an account and join in the discussion!

Which programming language to start with?

farmkid

Commodore
Commodore
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?
 
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!
 
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.
 
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:
 
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.
 
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.
 
Assembly ("machine code") is too low-level for any but the most hardcore programmer. And even they only go there in inner loops.....
 
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.
 
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.
 
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.

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.)
 
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.

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.
but for legacy software programs we use ancient languages way back to FORTRAN 77.
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)
 
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
 
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.
 
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.
 
If you are not already a member then please register an account and join in the discussion!

Sign up / Register


Back
Top