The Trek BBS

The Trek BBS (http://www.trekbbs.com/index.php)
-   Science and Technology (http://www.trekbbs.com/forumdisplay.php?f=36)
-   -   Which programming language to start with? (http://www.trekbbs.com/showthread.php?t=236290)

farmkid January 23 2014 08:01 PM

Which programming language to start with?
 
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?

Sophronisba January 23 2014 08:44 PM

Re: Which programming language to start with?
 
You might direct him to Codecademy. It has a lot of tutorials for HTML, CSS, PHP, Python, and Ruby.

Robert Maxwell January 23 2014 09:22 PM

Re: Which programming language to start with?
 
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!

Lindley January 23 2014 09:24 PM

Re: Which programming language to start with?
 
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.

iguana_tonante January 23 2014 09:39 PM

Re: Which programming language to start with?
 
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:

Robert Maxwell January 23 2014 10:03 PM

Re: Which programming language to start with?
 
At least it's not MUMPS!

Yes, I am a MUMPS guy.




:(

JarodRussell January 23 2014 10:06 PM

Re: Which programming language to start with?
 
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.

MacLeod January 23 2014 11:30 PM

Re: Which programming language to start with?
 
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.

Lindley January 23 2014 11:33 PM

Re: Which programming language to start with?
 
Assembly ("machine code") is too low-level for any but the most hardcore programmer. And even they only go there in inner loops.....

farmkid January 24 2014 12:12 AM

Re: Which programming language to start with?
 
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.

iguana_tonante January 24 2014 12:17 AM

Re: Which programming language to start with?
 
Quote:

farmkid wrote: (Post 9160381)
I've wanted to learn Python, and maybe this is a good excuse if I can study it with my son.

I think this is a pretty nice idea. :)

B.J. January 24 2014 05:44 PM

Re: Which programming language to start with?
 
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.

Robert Maxwell January 24 2014 06:04 PM

Re: Which programming language to start with?
 
Quote:

B.J. wrote: (Post 9163327)
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.)

Rhubarbodendron January 25 2014 10:56 AM

Re: Which programming language to start with?
 
Quote:

B.J. wrote: (Post 9163327)
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.
Quote:

iguana_tonante wrote: (Post 9159538)
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)

Collingwood Nick January 29 2014 04:11 AM

Re: Which programming language to start with?
 
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


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
FireFox 2+ or Internet Explorer 7+ highly recommended.