Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

CP123

macrumors regular
Original poster
Dec 22, 2008
182
0
I need some help. My son is going to be a senior in high school this year. He wants to learn how to code and one day write programs for the iphone, etc. I bought a book on HTML/XHTML figuring that was a good place to start. I was thinking of JavaScript next and then getting him a book on Java. Is this the right course? Or should I be guiding him differently?

What would be the best way for him to learn and have fun at the same time so he won't get bored?

Thanks for your help.
 

DJTHEFUNNY

macrumors member
Aug 2, 2009
98
0
Here's An Idea

Microsoft Has Lesson Available Freely And Coding Enviornments to learn With.

http://msdn.microsoft.com/en-us/beginner/default.aspx

I Mean Thats A Way To Learn Launguages, I Mean C++ (In My Opinion) Is The hardest to learn, So If He Can Learn From Those Lessons Objective C (What Mac is Written in, i believe)) Should Be EASY.

They Offer Web And native Programs.

C++ C# Visual basic

Sun Developer Network is A Great Place To Look At For Java Type Stuff.


Let Me Know What You Think
 

dukeofism

macrumors member
Jul 22, 2009
55
0
From my limited experience, for some one looking to program, HTML is not a good place to begin. It is a markup language and doesn't really provide a programming foundation with basics such as operators, logic, and dealing with variables.

I took a course in High School on Java and think its a good place to begin.
The key is probably sticking with one of the more popular languages Java, C, C++ because they have a solid community that can help you learn by looking over code and giving you tips/ helping with problems
 

chrono1081

macrumors G3
Jan 26, 2008
8,451
4,149
Isla Nublar
With programming if you get one language down its pretty easy to start on others. All of the concepts are the same across the board (for the most part) but its the syntax that will change.


Usually a great place to start to pick up programming quickly (this is important to keep his interest) is to start with a programming language like Python. Its very capable and you can learn to write games in it pretty quickly. From there he could leap to Java, or Objective-C (what the iPhone uses), C++ etc.

He will probably see online people will give generally bad advice like "Start with C++ everything uses it its what real programmers use blah blah"

I recommend staying away from this route because it takes a very very long time to learn to make anything of use and there are many many pitfalls along the way. IMO its not a good place to start.

I would suggest Python or Java. Once he gleans the concepts from these it will be quite easy for him to move to any language he chooses. If he wants to be a programmer he will end up learning many different ones anyway.
 

Sander

macrumors 6502a
Apr 24, 2008
520
67
It also depends a bit on the "type of person" your son is. If he's perhaps a little impatient and says things like "All I want to write for starters is a simple first person shooter game with online multiplayer connectivity but not necessarily an in-game chat system" then I'd follow the suggestions made above. If he's the type of guy who takes his toys apart to see how they work and says things like "but HOW do the keys I press lead to characters on the screen" then I would suggest a more low-level approach.

Disclaimer: I wrote a book for the latter type.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
I definitely agree that HTML isn't where to start learning programming. JavaScript is a capable language, so learning a tiny bit of HTML so you can display results of JavaScript functions would be OK, but HTML isn't an end unto itself when it comes to programming.

Based on my experience, i'd say if your son is interested in high-level "get it done, see the results quick" programming right now, more modern languages like python or java would be a good place to start. If he's more interested in how things work, and why, I'd start with C. It gets you much closer to the machine, and if you start looking into computer architecture I feel like having dealt directly with pointers, etc. helps the architecture stuff click.

-Lee
 

Winni

macrumors 68040
Oct 15, 2008
3,207
1,196
Germany.
HTML is not a programming language, it's a page description language. It's something you have to have some basic knowledge of on the long run, but it's not a good place to start if you want to learn -real- programming.

If your son wants to code for the iPhone, he has to learn Objective-C. If he wants to learn how to write games for the iPhone, he could also use the (not very cheap) Unity 3D development environment which also supports C# and JavaScript.

If we are not talking about the iPhone, a great language for beginners to learn is Python. It's free and already included in OS X (but NOT on the iPhone!). Python supports various programming paradigms and is a fun language to learn.

Buy him "Learning Python" by Mark Lutz & David Ascher. Once he's worked his way through it, he can move on to either "Programming Python" by Mark Lutz.

Java is an interesting language for the corporate market. Kathy Sierra's & Bert Bates' "Head First Java" is BY FAR the best book to learn that language. However, the learning curve is steep and frustrating and in my opinion, Java is NOT a fun language to learn. Unless there is a serious business case for it, I wouldn't touch it with a flagpole. But that's just me - many people love Java and have very good reasons for it.

Another nice programming language for the Mac is BlitzMax. It's an object-oriented (and now also multi-threaded) BASIC dialect with its main focus on game development, but it can be - and has been successfully - used for regular application development as well. It's not very well documented and costs a couple of dollars, but it has a very supportive community.

These guys write their games in Blitzmax: http://www.basiliskgames.com If you can write games like that in BlitzMax, you can pretty much do anything with it.
 

EdoDodo

macrumors newbie
Aug 1, 2009
28
0
Well if he wants to program the HTML is not a good idea, since it is not programming but web design (HTML is used for websites, not programs).

If he wants to learn to program for the iPhone he wall have to learn Objective-C which is heavily based on C, so knowing some C will help him. The two books "Learn C on the Mac" and "Learn Objective-C on the Mac" are great places to start.

To then program for the iPhone he will have to learn Cocoa Touch, for that I would suggest the book "Beginning iPhone Programming". All the books I mentioned have been published by Apress in the last few years as part of the "Learn Series" and are very up to date.

The three books together should give him enough knowledge to code some simple iPhone apps but he shouldn't expect to program more advanced games straight away, programming for the iPhone is very complex, especially for someone who is just starting off to program and has never programmer for the Mac.

PS: I totally agree with the previous poster, learning at least the basic of Python will help him understand how programming works and will greatly aid him. I would suggest you do not start with more complicated languages like Java and Objective-C but learn some of the good old C or Python first, or you will have trouble.
 

mslide

macrumors 6502a
Sep 17, 2007
707
2
Don't start him off on html. That is not a programming language and it won't really help him. I recommend that he jump right in with a real programming language ... C. It will help him develop a good foundation and can help him when he decides to transition to C++ or Objective C. I recommend C because it is so widely used and is really necessary if one wants to know the other languages based on it.

Have him start off with the basics. C and using unix command line tools. Don't worry about XCode, Visual Studio or any of that stuff. All this will help build a solid foundation that will help him no matter what platform he decides to write code for. He doesn't need to worry about Mac specific stuff for a while. A good generic C book and perhaps a Unix for beginners book will go a long way.

After C, I recommend C++ because it is so widely used. If he really wants to learn IPhone programming, then perhaps Objective C would be a better alternative, however, that language is really only widely used on the Mac/IPhone platform.

Once he has a good solid foundation, with C, then he will have no trouble jumping into any other language.

There's nothing wrong with starting off with something like Python, however, it is not a requirement and I still recommend C.
 

GorillaPaws

macrumors 6502a
Oct 26, 2003
932
8
Richmond, VA
Based on my experience, i'd say if your son is interested in high-level "get it done, see the results quick" programming right now, more modern languages like python or java would be a good place to start. If he's more interested in how things work, and why, I'd start with C.

I just wanted to echo this sentiment. It really depends on the type of person your son is. Also, is he considering pursuing programming as a career, or is this something he's interested in as more of a hobby? Does he have interest in learning to program for platforms other than the iPhone?
 

xbdb

macrumors newbie
Aug 3, 2009
1
0

CP123

macrumors regular
Original poster
Dec 22, 2008
182
0
Thank you everyone for the quick reply. To answer some of your questions, my son is a person, like many teenagers, who is interested in something until he has to do a whole lot of reading. He will read if he can see results. If not, he may lose patience. He downloaded the IDK on his macbook, and realized that he didn't know any programming language. I told him he had to be familar with a language first. I really gave him the HTML book to get him to understand something about coding. I know its not programming, but I wanted him to see what people do to make things on the computer go.

He will be taking a college "Intro to engineering" course during his senior year in high school. He is considering computer engineering or computer science as a major. With all that said, he really wants to learn how to program to do cool things with his computer, be it games, apps for the iphone, etc. I'm not sure he knows yet.

I just want to set him on the right direction.

Thanks again.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
He will be taking a college "Intro to engineering" course during his senior year in high school. He is considering computer engineering or computer science as a major.
If he is serious about computer engineering or computer science, he needs to get over the whole "it's not interesting if it requires a whole lot of reading" attitude. That just seems wholly unreasonable, IMHO, given those fields.
 

CP123

macrumors regular
Original poster
Dec 22, 2008
182
0
If he is serious about computer engineering or computer science, he needs to get over the whole "it's not interesting if it requires a whole lot of reading" attitude. That just seems wholly unreasonable, IMHO, given those fields.

Trust me, we had that talk, and to his credit he has been going thru the HTML book without complaint. He even likes the fact that he can see the results of what he's doing. I just know that sometimes learning computer languages (I understand that HTML is not a language :))can be hard because the info is front loaded, and you won't see results for awhile.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
I just know that sometimes learning computer languages (I understand that HTML is not a language :))can be hard because the info is front loaded, and you won't see results for awhile.
A lot of the more modern programming language books usually start very quickly with the standard "Hello, World!" program, just to give the readers some sense of initial accomplishment.
 

lixuelai

macrumors 6502a
Oct 29, 2008
957
327
If he really likes programming he should be fine going into a CS program with no previous programming knowledge. Most CS programs don't expect you to and start you off with the basics. If you want to get a head start I would do Java first.
 

pikester

macrumors newbie
Feb 27, 2009
27
0
If he is really interested in iPhone development, that means that he'll need to learn Objective-C. You should be able to Google for tutorials on them (even Apple has them on their developer site). I'd also recommend that you and your sone look at the Stanford iPhone programming course out on iTunes University (it is no cost to do so). The first lecture will give a very brief introduction to Objective-C just so you can see what you'll be getting into.
 

Avizzv92

macrumors regular
Mar 23, 2008
172
0
A lot of answers being given here :p

If he likes the Mac OS and would like to learn to program for it, I'd say go for Obj-C. I have been teaching myself it via books and feel that it's not a difficult language, and with the right book previous knowledge of C isn't required (Suggest: Programing In Objective-C 2.0).

Like others said, there is pros and cons with every language. In the end just pick one and stick to it, then when the time or need comes along venture to another language!

On a side note: IMO learning a language via online resources and tutorials always left me frustrated. None of it ever seemed complete and ideas/topics where never presented in a good order. It was just too sporadic and unorganized... A book is definitely the best thing next to an actual teacher.
 

Cabbit

macrumors 68020
Jan 30, 2006
2,128
1
Scotland
I started on PHP from the start of highschool, things like that and darkbasic are good for beginners to get the basics of programming as the coding is rather loosely typed and easy to learn.
 
Jun 30, 2009
318
0
I'd go with web first, then actual languages. This way, he will see the results faster and enjoy programming. If you keep him on console things in C/C++, he will get bored right away.

So start teaching him HTML and CSS. Let him create static web sites. Then, I'd say PHP and SQL, JavaScript seems harder and a little bit useless to learn. After he gets to know a lot about these languages, he could have a look over Bruce Eckel's Thinking in C, and then choose between Java and C++.

My personal recommendation for the web would be O'Reilly, especially the HEAD FIRST series.
 

CP123

macrumors regular
Original poster
Dec 22, 2008
182
0
Wow! Thanks again for the responses. Definitely have plenty of options. Just to make sure I have this right, it really boils dowin to the following:

1. Have him learn Java or Python as an introduction into programming. From there he can move to C or Objective-C, etc.
2. Have him learn C or C++ first, since that is the basis of Objective-C and Cocoa.
3. Have him learn Objective-C first.
4. Or as 'Not Available' said, have him continue to learn HTML as an intro, create some sites and then pick up a language.

Great ideas. I know I have plenty of questions but you guys have been a real help. He has two younger sisters who also want to learn to program (games,etc) as well, 13 and 11. Is that too young? If not, what should they start with? Would it be better to have all 3 on the same path?

Thanks.
 

Avizzv92

macrumors regular
Mar 23, 2008
172
0
Wow! Thanks again for the responses. Definitely have plenty of options. Just to make sure I have this right, it really boils dowin to the following:

1. Have him learn Java or Python as an introduction into programming. From there he can move to C or Objective-C, etc.
2. Have him learn C or C++ first, since that is the basis of Objective-C and Cocoa.
3. Have him learn Objective-C first.
4. Or as 'Not Available' said, have him continue to learn HTML as an intro, create some sites and then pick up a language.

Great ideas. I know I have plenty of questions but you guys have been a real help. He has two younger sisters who also want to learn to program (games,etc) as well, 13 and 11. Is that too young? If not, what should they start with? Would it be better to have all 3 on the same path?

Thanks.

C is a subset of Objective-C, so C can be intermingled with Objective-C programing, it's debatable which to learn first.

C++ is a OOP language but IMO wouldn't be worth learning first if you where just going to move onto Objective-C.

As for a age limit, there really isn't any... there is a few stories of very young kids (less then 10 years old) making iPhone Apps. It varies from person to person, perhaps you could just look into resources about programing not necessarily a particular language. Just the idea behind programing.

Never tried it personally but this is supposedly a good educational place to start for someone of a young age. http://www.alice.org/
Alice is an innovative 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web. Alice is a freely available teaching tool designed to be a student's first exposure to object-oriented programming. It allows students to learn fundamental programming concepts in the context of creating animated movies and simple video games. In Alice, 3-D objects (e.g., people, animals, and vehicles) populate a virtual world and students create a program to animate the objects.

In Alice's interactive interface, students drag and drop graphic tiles to create a program, where the instructions correspond to standard statements in a production oriented programming language, such as Java, C++, and C#. Alice allows students to immediately see how their animation programs run, enabling them to easily understand the relationship between the programming statements and the behavior of objects in their animation. By manipulating the objects in their virtual world, students gain experience with all the programming constructs typically taught in an introductory programming course.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
If they are on the same path they can disclose their discoveries with one another. i would expect that your daughters would be paced closer together than your son unless they are exceptionally bright or he is exceptionally dull =). Eventually, hopefully the girls will go to your son for information and he'll be able to teach some things to them. I find that nothing solidifies an understanding of something than teaching it to someone else. This would be mutually beneficial to all of them.

The only thing i really took issue with that i read in the comments above was:
...I'd say PHP and SQL, JavaScript seems harder and a little bit useless to learn.
SQL is useful, but you don't write much on your own with SQL (I believe that by the standard it isn't turing-complete, though some vendors make their implementation turing-complete via extensions), it needs to be coupled with another language and likely a library to access your RDBMS.

However, I simply have to say that PHP should be avoided this early on. I know it's a tool that's out there in use, but in terms of "academic" use, i think it's poor. Certainly don't start with it. There is no formal specification for PHP, and it just feels sloppy to me. This is just my opinion, but i'd really try to avoid PHP at this early stage.

The other point that i took exception to was the bit about JavaScript. JavaScript has a lot of great features (It's Object-Oriented, functions are objects, etc.). I'd say it's really hamstrung by being thought of as a "web thing", and having the primary interpreter for most people being in a browser. If your son is already rolling with HTML, JavaScript would be a way for him to start actually programming while leveraging the presentation layer he's already learned.

I definitely don't think 11 is too young, and 13 certainly isn't. Their brains are still spongy, and they are probably already very familiar with using a computer (certainly more so than I was at that age).

It's great that your kids are interested and that you're involved in helping them learn. I think just getting them going on anything and encouraging them is going to go far, no matter what option you choose.

-Lee
 
Jun 30, 2009
318
0
SQL is useful, but you don't write much on your own with SQL (I believe that by the standard it isn't turing-complete, though some vendors make their implementation turing-complete via extensions), it needs to be coupled with another language and likely a library to access your RDBMS.

However, I simply have to say that PHP should be avoided this early on. I know it's a tool that's out there in use, but in terms of "academic" use, i think it's poor. Certainly don't start with it. There is no formal specification for PHP, and it just feels sloppy to me. This is just my opinion, but i'd really try to avoid PHP at this early stage.

The other point that i took exception to was the bit about JavaScript. JavaScript has a lot of great features (It's Object-Oriented, functions are objects, etc.). I'd say it's really hamstrung by being thought of as a "web thing", and having the primary interpreter for most people being in a browser. If your son is already rolling with HTML, JavaScript would be a way for him to start actually programming while leveraging the presentation layer he's already learned.
I said SQL and PHP together. This way, he will get to create web applications in no time, and start enjoying programming. If you go for C/C++ or Python, or even Java, the results will come slowly, and at first, you are only going to use the command-line interface in order to create more or less complicated programs. This can get pretty boring, AND counter-productive.
I can't say the same about you having created and used your own CMS/blog system.

About JavaScript, although it teaches you good habits, without using AJAX or libraries (think JSON and jQuery), there aren't many things to catch your attention.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.