PDA

View Full Version : High school son wants to learn programming




CP123
Aug 3, 2009, 01:23 AM
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
Aug 3, 2009, 01:52 AM
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
Aug 3, 2009, 02:11 AM
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
Aug 3, 2009, 02:55 AM
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
Aug 3, 2009, 03:23 AM
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.

Cromulent
Aug 3, 2009, 06:51 AM
Just get him a book on Java. It is just a waste of time starting with HTML / XHTML.

lee1210
Aug 3, 2009, 09:06 AM
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
Aug 3, 2009, 09:39 AM
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: www.basiliskgames.com If you can write games like that in BlitzMax, you can pretty much do anything with it.

EdoDodo
Aug 3, 2009, 09:47 AM
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
Aug 3, 2009, 10:06 AM
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
Aug 3, 2009, 11:19 AM
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
Aug 3, 2009, 01:13 PM
I'm teaching my nieces how to program, and I am seeing good results with this book...

http://http://www.manning.com/sande/

It's basically the "old-school" style BASIC books from "back in the day" revamped for Python. Here's a review on slashdot:

http://books.slashdot.org/story/09/07/13/1349203/Hello-World?art_pos=1

I'd recommend having a look at the author's website and downloading the sample chapter and seeing if it works for your son.

Good Luck!

Dan

CP123
Aug 3, 2009, 01:13 PM
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
Aug 3, 2009, 01:31 PM
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
Aug 3, 2009, 01:35 PM
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
Aug 3, 2009, 01:40 PM
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
Aug 3, 2009, 02:06 PM
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
Aug 3, 2009, 02:15 PM
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
Aug 3, 2009, 02:40 PM
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
Aug 3, 2009, 03:31 PM
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.

Not Available
Aug 3, 2009, 03:41 PM
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
Aug 3, 2009, 04:29 PM
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
Aug 3, 2009, 04:53 PM
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
Aug 3, 2009, 04:56 PM
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

Not Available
Aug 3, 2009, 05:39 PM
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.

Cromulent
Aug 3, 2009, 05:42 PM
This threads seems to have gone slightly more web orientated than I think the OP really intended. His son sounds like he is more interested in desktop and mobile development and for that there is no getting away from the fact that C (and Objective-C if you are happy to limit yourself somewhat) is the way to go.

The Android mobile phone platform uses Java but if you know C then learning Java is pretty straight forward, the same is true for Objective-C, C++, C#, PHP, JavaScript and a host of other languages. In short if your son is looking to be a developer rather than a Java programmer (an important distinction to make) it makes sense to start with C. If he is really adventerous then learning a language like Scheme using the book entitled "Structure and Interpretation of Computer Programs" would stand him in excellent stead for a CS degree (heck, that book is one he may actually study on his course). You can find the book for free on the MIT website (yes, it is legal).

CP123
Aug 3, 2009, 06:04 PM
Can a person learn HTML, CSS, SQL and PHP, and graduate into learning one of the languages mentioned, without getting bad habits? Is the HTML route a completely different course of learning?

He definitely wants to learn programming. But can he do programming using the skills he picked up learning HTML, etc.? Or are the 2 skill sets not a good match. Should it be one or the other, or is both good to know? Trust me, I understand the importance of being on the right track from the start. Just wondering if he can pick up one of the languages after he finishes the book he's reading, O'Reilly's Head First with HTML, XHTML and CSS. He's more than halfway done, and he's proud of his progress. :) I just don't want him to pick up a language book and be confused because his foundation was set with HTML.

Not Available
Aug 3, 2009, 06:08 PM
I think in time he would like to be a programmer, not a Java programmer, a C programmer, and so on. It is good to know many languages, each with a different approach to a problem.

Oh, by the way. I recommend Teach Yourself Programming in Three Days (http://norvig.com/21-days.html) :) :P :D

HTML and CSS ARE NOT programming languages. So this will by no means be the foundation. Nor are JavaScript or PHP. They're scripting (client-side and server-side) languages. But both of them is derived from C/C++, so after getting his foot wet with either of them, he will be able to digest C-based languages (easily). I, for example, have learnt JavaScript, and then moved on to C++ (well... I had some previous, although minor, background in it). The basic language features I learnt from JS proved to be a great help while following Bruce Eckel's Thinking in C++.

Also, before moving on to a true programming language, I suggest getting Bruce Eckel and Chuck Allison's Thinking in C: Foundations for C++ and Java. It's an awesome seminar, and is available for free from MindView's web site (Bruce Eckel's web site).

lee1210
Aug 3, 2009, 06:22 PM
I guess there's two ways to look at it. Picking up HTML is not useless, it is a worthwhile skill to have. If he has an interest in it, certainly don't discourage him from finishing the book. However, it is not teaching logic, problem solving, algorithms, data structures, etc. that are key to programming. As such it's more layout and presentation than actually programming. At a certain point it can be the presentation layer in a complex web application, but it's the product of programming in that case, it doesn't actually implement any of the logic.

As for PHP... i don't think it will do irreparable damage, but I would personally opt for something a little more rigid/concrete to start with. This doesn't necessarily mean something strongly typed, but... i'm just biased strongly against PHP. It has its uses, but I don't think it's as a learning language.

If he's already dealing with HTML and spending a lot of time in a browser, I think JavaScript would be a good next step since it would be building on his skills. I feel like it is a "real" programming language, not just a scripting language. If he doesn't mind "putting aside" what he's learned already, then I'd move on to something he can work on outside the browser. Which isn't that important, I always lean toward C, but I care a lot about knowing how and why things work.

-Lee

Not Available
Aug 3, 2009, 06:48 PM
If you keep on using the Head First series (which, as a side note, has started out as HEAD FIRST JAVA, so if you ever want to start learning Java and enjoy the HF style, this one is worth looking at. in fact, it's the only HF book to have a second edition up to this date, and its original authors have started a parallel web site related only to Java and the HF java book), here's something I found out:

HF JavaScript is the first HF book to be written by... its author (I can't recall it, I'm too bored to check, and the name is not important at all), so it takes a formal, but different, approach to teaching you the language. What I mean is that he starts from a concept (say loops) and builds the chapter around it, the HF way.

Contrary to HF PHP, which is his second book, in which he starts from the idea of "let's show him how to connect to a database and request information" and teaches you conditional statements as a "oh, by the way: this is the IF-ELSE structure. you will need it on the next page".

If you go for off-the-browser programming, I'd suggest starting out with Python. Also, check this MIT page (http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2007/Readings/index.htm). It provides you a great plan to start.

kainjow
Aug 3, 2009, 07:03 PM
IMO, if he's going to be a senior next year, then skip web technologies and plunge directly into C. That will give him a nice head start for college.

CP123
Aug 3, 2009, 07:51 PM
If you go for off-the-browser programming, I'd suggest starting out with Python. Also, check this MIT page (http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2007/Readings/index.htm). It provides you a great plan to start.

That's an excellent site.

Thank you.

lazydog
Aug 4, 2009, 12:21 AM
If your son is learning HTML then I would say JavaScript would be a natural and excellent next step. JavaScript will build upon, strengthen and extend what he has already learnt. HTML, CSS and JavaScript are a powerful combination and form a core skill which many professionals make a living from. JavaScript is a programming language and has the benefits of being very easy and quick to learn. JavaScript and DOM make a very powerful combination (JavaScript can manipulate the data structure of a browser window directly to display pretty much whatever you want). I have to admit that I really like JavaScript!

It's only going to take your son a few hours to go from html to understanding the basics of JavaScript - time well spent in my opinion, even if he decides to move on to C/Objective-C, SQL/PHP etc.

b e n

CP123
Aug 4, 2009, 12:30 AM
If your son is learning HTML then I would say JavaScript would be a natural and excellent next step. JavaScript will build upon, strengthen and extend what he has already learnt. HTML, CSS and JavaScript are a powerful combination and form a core skill which many professionals make a living from. JavaScript is a programming language and has the benefits of being very easy and quick to learn. JavaScript and DOM make a very powerful combination (JavaScript can manipulate the data structure of a browser window directly to display pretty much whatever you want). I have to admit that I really like JavaScript!

It's only going to take your son a few hours to go from html to understanding the basics of JavaScript - time well spent in my opinion, even if he decides to move on to C/Objective-C, SQL/PHP etc.

b e n

Thanks. Will it be hard for him to go from JavaScript to Java, Python, C/Objective-C? Or will he be hampered?

I guess there's two ways to look at it. Picking up HTML is not useless, it is a worthwhile skill to have. If he has an interest in it, certainly don't discourage him from finishing the book. However, it is not teaching logic, problem solving, algorithms, data structures, etc. that are key to programming. As such it's more layout and presentation than actually programming. At a certain point it can be the presentation layer in a complex web application, but it's the product of programming in that case, it doesn't actually implement any of the logic.

As for PHP... i don't think it will do irreparable damage, but I would personally opt for something a little more rigid/concrete to start with. This doesn't necessarily mean something strongly typed, but... i'm just biased strongly against PHP. It has its uses, but I don't think it's as a learning language.

If he's already dealing with HTML and spending a lot of time in a browser, I think JavaScript would be a good next step since it would be building on his skills. I feel like it is a "real" programming language, not just a scripting language. If he doesn't mind "putting aside" what he's learned already, then I'd move on to something he can work on outside the browser. Which isn't that important, I always lean toward C, but I care a lot about knowing how and why things work.

-Lee

Thank you Lee. Right now he's open to just about anything. He'll be finished with that book by this weekend. I just want to keep the momentum going and have something ready for him to do when he's finished.

Kelly Craig
Aug 4, 2009, 12:45 AM
"As for PHP... i don't think it will do irreparable damage, but I would personally opt for something a little more rigid/concrete to start with. This doesn't necessarily mean something strongly typed, but... i'm just biased strongly against PHP. It has its uses, but I don't think it's as a learning language."

I disagree. I learned on PHP and my entire career now involves programming..... I owe it to PHP, CSS, HTML, JavaScript and ASP.net VBScript -shudder-

Les Kern
Aug 4, 2009, 08:48 AM
You said he wants to write iPhone apps? Specifically? Then download or install the dev tools that came on your disk, and go to Apple and have him join the developer's connection. All he needs is right there... including TONS of videos and examples. Plus there is a great community for him to participate in. Forget HTML, C++ and all that other stuff. You said he wants to do iPhone, so let him do the iPhone. No sense wandering around the coding planet when there's a one-stop-shop for what he WANTS.

lazydog
Aug 4, 2009, 09:28 AM
Thanks. Will it be hard for him to go from JavaScript to Java, Python, C/Objective-C? Or will he be hampered?

Absolutely not! JavaScript shares the same basic core language constructs and programming principals as most languages.

In the long run I doubt very much it will make any difference which language he starts with. If he likes programming he will soon find his own way. But for the few hours it will take to make the transition from html to JavaScript I think it's worth it, even if all he comes away from it is knowing how to write for loops, if statements etc.

b e n

m3kilpat
Aug 5, 2009, 12:47 PM
If he wants to be a programmer send him to college. If it's just for fun then more power to him. But a job in the field will almost definitely require a degree in computer science.

My school started everyone off with C++. It really wasn't that hard. There was two classes to just learning the language and from then on it was theory crap.

I didn't see it mentioned before, but Perl is pretty sweet.

CP123
Aug 7, 2009, 07:39 AM
Quick update:

Thank you everyone for your advice. I have given this much thought and research, and have narrowed it down to 2 possibilities:

1. Let him learn javascript and then go to java or objective-C, since he's on that road right now.
2. Let him learn Python (with his siblings, there's a good book for children), and then go on to other languages.

ryan
Aug 7, 2009, 09:09 AM
Shouldn't your son be asking about the best way to get into programming rather than you doing it for him?

CP123
Aug 7, 2009, 09:19 AM
Shouldn't your son be asking about the best way to get into programming rather than you doing it for him?

Yeah, I hear you. However, my son asked me for guidance. As I said earlier he downloaded the iPhone development kit, and realized he couldn't do anything. I don't know anything about programming, that's why I bought him a book on HTML, XHTML, and CSS. I realized that I may have made a mistake by taking him that route. So to answer your question, he is asking. However, he asking me, and I am asking you all :).

lee1210
Aug 7, 2009, 09:50 AM
Yeah, I hear you. However, my son asked me for guidance. As I said earlier he downloaded the iPhone development kit, and realized he couldn't do anything. I don't know anything about programming, that's why I bought him a book on HTML, XHTML, and CSS. I realized that I may have made a mistake by taking him that route. So to answer your question, he is asking. However, he asking me, and I am asking you all :).

I think it's great that you're getting involved, but I would definitely recommend he setup an account here and post in this forum while he's cutting his teeth on things (the web programming forum might be better for javascript stuff, but i don't think it would be unwelcome here if it was about using the language and not specifically DOM manipulation), then move over to the iPhone programming forum once he goes full-bore into that.

As for the JavaScript vs. Python thing... it probably really doesn't matter at this point. He just needs to start writing code and reading about whatever language he chooses as well as a book on algorithms. Honestly, he could probably start with Java or Objective-C at this point unless you feel like he needs to "ramp-up" to those.

-Lee

CP123
Aug 7, 2009, 10:25 AM
I think it's great that you're getting involved, but I would definitely recommend he setup an account here and post in this forum while he's cutting his teeth on things (the web programming forum might be better for javascript stuff, but i don't think it would be unwelcome here if it was about using the language and not specifically DOM manipulation), then move over to the iPhone programming forum once he goes full-bore into that.

As for the JavaScript vs. Python thing... it probably really doesn't matter at this point. He just needs to start writing code and reading about whatever language he chooses as well as a book on algorithms. Honestly, he could probably start with Java or Objective-C at this point unless you feel like he needs to "ramp-up" to those.

-Lee

Good idea. I will have him set up an account here, because there will be questions that I definitely will not be able to answer. My whole thing was, he can see results as he learns HTML. I wanted him to start with a language where he could see some results as he learns. Where he can write programs and see the outcome. I'll see. He mentioned Objective-C to me last night. I might let him start with that, and see where it goes.

I just don't want the first language to sour him on computer programming, the way it did when I was in college . :( (That's why I switched majors in college).

lee1210
Aug 7, 2009, 11:44 AM
I think results should come pretty fast in other languages, too, depending on what his expectations are. Hello, World! is pretty much the first thing anyone will program in any language. In any of the languages suggested, it's pretty quick and easy:
Java:

class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}


JavaScript:
<html>
<body>
<script language="JavaScript" type="text/javascript">
// Hello World in JavaScript
document.write('Hello World');
</script>
</body>
</html>

Python:

# Hello World in Python
print "Hello World"


I grabbed these from here:
http://roesler-ac.de/wolfram/hello.htm

In any event, it may take a bit to have a full GUI app rigged up, but if he does go with Objective-C, and really wants to dive in right away, Interface Builder makes it a snap to wire up an interface to a few methods and see results pretty fast. This page has info on getting hello, world displayed with static text using interface builder, and an example of doing it in Objective-C with a class.
http://guides.macrumors.com/Compiling_and_executing_a_Hello_World_application

It's not too many more steps to programatically fill in a text field.

If he is interested, i'd say just get him going on Objective-C. Kochan's book "Programming in Objective-C 2.0" seems to be well-received by others on this forum that have worked through it:
http://www.amazon.com/Programming-Objective-C-2-0-Developers-Library/dp/0321566157/

If you don't have Leopard, though, I think getting the prior version would be best.

-Lee

GorillaPaws
Aug 7, 2009, 12:44 PM
In any event, it may take a bit to have a full GUI app rigged up, but if he does go with Objective-C, and really wants to dive in right away, Interface Builder makes it a snap to wire up an interface to a few methods and see results pretty fast

If you go the straight-to-Objective-C route (which is a perfectly reasonable way to go), you might want to have him follow one of the tutorials on Cocoa Dev Central (http://www.cocoadevcentral.com/). They do a good job of holding your hand through creating a very simple app and giving you a sense of where all of the command line Objective-C code will eventually take you. It's also pretty fun to build your first GUI app for the Mac. I know the joy I felt of creating something that I could click and drag around (it "felt more real" than the command line apps--if that at all makes sense) was enough to push me through the very frustrating days that are inevitable when learning programming. I just wanted to mention that these tutorials are not enough to allow you to bypass learning the Objective-C language (you really should get Kochan's book for that), but moreso to wet the mental appetite to get a glimpse of things to come so-to-speak. Also, it sounds like you had an interest in programming at one point in your life; you might get a kick out of working through a few of those tutorials just to see what it's like to create a (very simple) app for the Mac.

Not Available
Aug 7, 2009, 01:02 PM
I don't have any experience at all with Java, but the program written by lee1210 is not simple, compared to Python, or JavaScript, or even C++.

Also, regarding JavaScript, the program is simply document.write('Hello, World!');, or document.innerHTML = "Hello, World!";.

I would recommend starting out with JavaScript, PHP, C++ (not C) or Python. Each because of their simplicity and because they are wide-spread, so there are plenty of places you can learn from.

But there are a few catches: if he knows HTML and goes the the web way (PHP/JavaScript), he would also like to get to know CSS pretty well. This way, after moving to PHP or JavaScript, he will have the knowledge necessary in order to create User Interfaces (for the web). So I'd say it will be way more motivating to see his web sites come to life, and build web applications, instead of having to go through an entire book creating/using only the command-line interface, and, after he's done with that, he will also have to learn to use an application for building the user interface. Interface Builder in Xcode might be easy, but you can't say the same thing about Qt, for example.

By the way, how the hell is he supposed to move from HTML to Cocoa/Objective-C?? Based on the link provided by lee1210, here's the Hello, World:

#include <stdio.h>
#include <objpak.h>
int main(int argc,char **argv)
{
id set = [Set new];
argv++;while (--argc) [set add:[String str:*argv++]];
[set do:{ :each | printf("hello, %s!\n",[each str]); }];
return 0;
}

Tell me that this is what you were doing when you were in high school, and were perfectly comfortable with it...

CP123
Aug 7, 2009, 01:10 PM
I had a serious interest in programming 25+ years ago, but was turned off by how boring it was. The cards that had to be filed, the long paper in the printer, the endless hours in the computer lab. It was boring back then. Today, programming seems more interesting. I also plan to try and learn a language. So whatever, language he learns, I will probably follow.

Thanks again everyone for the response. When he starts the language, the first thing he will do is set up an account here. I find this place, and the people here to be very helpful.

lazydog
Aug 7, 2009, 03:15 PM
I had a serious interest in programming 25+ years ago, but was turned off by how boring it was....

Slightly off topic, but you might want to take a look at Context Free (http://www.contextfreeart.org/). It's not your usual type of programming language but for inspiring and capturing the imagination it's wonderful. The language itself is very small and a bit tricky to learn, but it is very powerful. Once you get the basics you can produce some pretty amazing images in just a few lines of code. Well worth having a look at I think!

b e n

(Have a look at the gallery, you'll be surprised how few lines of code are needed for some of the images).