RKilroy wrote:
Jipstyle wrote:
No BASIC is ever good for anyone who wants to learn to program. It will teach you bad habits that you will have to unlearn when you move to a more advanced language.
Can you give an example? My son, 13, wants to program games and I tried to start him with Python, but I looked at it and didn't get it. I know BASIC, at least enough to be dangerous, and figured he could start with that.
What bad habits does BASIC teach?
Just about all of them!
I started writing this and my damn power flickered or something and cut it off. ARGH!
For the record, BASIC was my first language. I learned it in elementary school and later had BASIC courses in both junior high and high school. Trust me - the newer languages like Python, Java and C++ are much more powerful, don't limit you, and are not harder to learn either.
The new much shorter version:
Goto's result in ugly spaghetti code that is hard to follow. This has since been outlawed outside of assembly languages.
Gosub. Only provides the illusion of a function. Variables are NOT local. This drives me crazy as you have to be extremely careful about unintended side effects. It is also a nightmare to port basic code to another language for this reason.
Almost a complete lack of local variables. All variables are global. Not so important at first, but makes a huge difference as programs grow in size.
No support for recursioun.
No support for OOP - traditional BASIC like qbasic, not VB.
No real library like in Java or Python, which makes programming substantially faster and easier.
The tutorials at the Python website would be a good place for you to start. They explain the language and general programming concepts and different ideas. If you have some old basic code around, you can convert it to Python and pretty soon you'll start to see how deficient BASIC really is (trust me, I've conveted a good 15 to 20 programs from BASIC to Java - I will *never* write another program in basic!).
The Dawson book will interest the younger crowd because of the game examples - I suspect this will keep a teens attention a bit more than say, oh, data structures! The game complexity increases from simple tic-tac-toe and hangman type games right up to Astrocrash (aka asteroids) with all the animation, sound, graphics, etc. The book seems well documented with links to appropriate websites and reference material.
*never* meaning, unless someone give me a lot of money! 