Slashdot Mirror


Hello World!

stoolpigeon writes "Hitting middle age has been an interesting time. I catch myself thinking about how well kids have it today and sounding a lot like my father. One difference is while my dad was happy to teach me about sports or cars, we never spent any time knocking out code together. I think he did realize that home computers were important and I will always be grateful for the Commodore Vic-20 he brought home one day. It was a substantial purchase for our household. I spent many days copying lines of basic from magazines and saving the results to cassette tapes. In my home today we have a considerably better situation, computing wise. There are usually a couple laptops running as well as the desktop machine upstairs. My kids take for granted what I found to be amazing and new. Still, that's all pretty normal and I'd like to give them an opportunity to go deeper if they are so inclined, just like we give them opportunities to explore other skills and pursuits. With that in mind I brought a copy of Hello World! home a few weeks ago, and the response from my oldest has been surprisingly enthusiastic." Keep reading for the rest of JR's review. Hello World! Computer Programming for Kids and Other Beginners author Warren and Carter Sande pages 430 publisher Manning rating 9/10 reviewer JR Peck ISBN 978-1933988498 summary Computer programming for kids and other beginners. Warren Sande wanted to teach his son Carter about programming but had difficulty finding what he thought was a suitable book to guide the process. At the encouragement of Warren's wife, he and Carter decided to write their own while Carter learned to code. Warren chose Python as the language they would work in and then the two together outlined the book and created the sample applications. As the book moves into more complex territory the sample applications are the kind kids like best. They are games. As soon as my daughter saw that she would get to make her own computer games she immediately asked me if we could start working through the book together. When it has been a while since we've had a chance to crack it open, she reminds me by asking when we will get back to it. I would say that on her end it has been a complete success. It has been a great time for us as father and daughter and educational for us both.

Language choice can be quite a hot topic amongst us geeks. In the preface Warren defends his choice of Python with a bullet list I'll summarize here.
  • Python was created from the start to be easy to learn.
  • Python is free.
  • Python is open source software.
  • Python is not just a 'toy' language.
  • Python is multi-platform.
  • Warren likes Python and thinks others will like it too.

I think the list is pretty solid. The only one I think may not be directly applicable to the case it hand is the FOSS angle. Warren explains that being open means that more can be done with the software and that there is a large set of corresponding code out there freely available. A case could be made that this is also true of more closed languages. The one thing I think that could make this important is if the teacher of the material is interested in not just teaching the technical side of programming but is also interested in communicating the philosophical values of freedom. In light of the amount of closed source software and ignorance in regards to FOSS options I've seen in the public school system where I live, I think this may be more important than some think.

The rest of the reasons though I think make Python an incredibly solid choice, and above all else is the simplicity. My daughter has been able to have fun typing code into IDLE without having to get hung up with a complicated environment. The syntax is clean and simple, there is no compiling, it's very easy to just jump in and start making things happen. I think this is important, the younger the student. I was concerned that nine might be just a touch too young for this undertaking. The book itself does not make any recommendations concerning age. The more I've thought about it, the more I agree with that choice. Children vary so greatly and any number chosen would be rather arbitrary. My nine your old has done well so far, but she is already quite a book worm and leans towards more academic pursuits. An older child may struggle and there may be some that are even younger that would be fine with the material in Hello World! So rather than focus on age I think a parent needs to come at this from a perspective of ability, proclivity and experience.

In the ability area, a child is going to know how to read, work with a mouse, and type things via the keyboard. Of course the mouse is optional strictly speaking but most will probably want to use it. Some math skill would be good as well as the ability to understand the use of variables. The book tackles the necessary material in a kid friendly way but it is not dumbed down. In fact the learning potential here is huge, as one may imagine. The book is formatted with lots of visuals and fly-outs that give information on how computers operate and how programming languages deal with information processing. My daughter and I have already had interesting discussions on subjects like integers and floats. An example that draws a sine wave lead to a great teachable moment about amplitude and wave length. Then there is the constant need for approaching problem solving in a structured manner using logic. I think that taking on programming brings a wide number of benefits.

One of the features, is a little caricature of Carter that is placed throughout the book with observations that the real Carter made as he learned with his dad. These are things that a real kid noticed, and so they are likely to stand out to a child working through this book. For instance in the chapter on "Print Formatting and Strings" Carter says, "I thought the % sign was used for the modulus operator!" The book explains that Python uses context to choose how the % sign is used. There are other little cartoon characters that appear throughout the book drawing attention to important points that need to be remembered. Learning is reinforced through quizzes at the end of the chapters. The chapters are not too long but I've found that my daughter and I have to break them into sections because of her typing speed. I've been tempted at times to move things along by typing for her but I know that she will not get the same benefit from the exercise if we do it that way. I will also let errors slide by at times to allow her the opportunity to look at error messages and find the problems.

As I mentioned the book is billed as being for kids and "other beginners." I'm going to say that the primary focus is rightly on kids, and probably kids who are in grade school or maybe junior high. This is not to say that the examples and information wouldn't be great for anyone brand new to programming. There are even some nuggets for someone who has written some code but is new to Python. I am going to guess though that the average high school student will not be as taken with the cartoons and puns. I'd have loved to have written my own lunar lander game at that age though, so maybe I'm selling this short, or maybe it would be something a teen would be happy to work on away from the eyes of others, so as not to appear childish. (I may take heat for this but even as a teenage geek I was immensely worried about the perceptions of my peer group.) I think an adult that was serious about learning to program, even if they had no prior experience, would do better with heavier material. All that said, I think for children they've really hit the sweet spot and as much as marketers would like it to be so, no book can be everything to everyone.

Things start simple with print statements and loops that took me back to good old days of watching messages scroll endlessly by on display computers at Sears when I was a kid. The move towards games starts even then with text and quickly moves on to leveraging Pygame for games that utilize graphics. I think this is important as it keeps things entertaining while teaching important concepts at the same time. I have to say it is quite a bit fun to sit with my child discussing nested loops and decision trees. By the end of the book examples will have included a simple virtual pet, a downhill skiing game and a lunar lander simulation.

I've discussed a child's ability a bit but I think the last two things I mentioned must be taken into account as well. They are proclivity and experience. I've let my daughter drive the time we spend working on this. Just like the parents who project their sports dreams on their kids, I think there is a possibility to do the same with my love for all things digital. It may even be easier to do so as I view the ability to do some amount of programming to be an important life skill. The thing is I don't want to push her too hard and have her back away from it completely. This fits in with the experience part. We take it as it goes, and if things stop being fun, we will back off. I don't do this with her core disciplines from school like reading and math, but for something that is extra right now I'm not going to push. It would transition from being a joy to being work. That brings up a last and unexpected benefit from Hello World! I'm rediscovering a lot of the fun and excitement that drew me into this industry in the first place.

You can purchase Hello World! from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

199 comments

  1. Thank you! by scubamage · · Score: 5, Interesting

    Thanks for the review, you just gave me an idea for what I'm going to be getting my nephews for their respective birthdays. Awesome! :)

    1. Re:Thank you! by Anonymous Coward · · Score: 0

      He got you too? :(

    2. Re:Thank you! by symes · · Score: 3, Interesting

      At the risk of being modded a troll... I completely agree. I've been looking for something like this for my daughter for some time. She's nine, just got her first laptop (and old one, but decent enough) and is really taking an interest. I know that writing a simple game would give her a real buzz. Next stop Amazon.

    3. Re:Thank you! by mcgrew · · Score: 2, Interesting

      I catch myself thinking about how well kids have it today

      It's like that with every generation. My dad rode a mule to school, I had a school bus. Today's kids (some of them anyway) have air conditioning in the classrooms.

      But in a lot of ways the kids have it harder. For instance, there was no such thing as crack when I was a kid, and meth was only manufactured in drug company factories. If I needed a ride I could find a pay phione, today if you lose your cell you can't make a call.

      My kids take for granted what I found to be amazing and new

      I took running water for granted; well, mostly, because when I was small my grandparents still didn't have running water.

      However, I'm not looking forward to being as old as my parents are now. My dad says "I lived 78 years without a computer and cell phone and I don't need it now", while my maternal grandfather said the same thing about indoor plumbing. Even afetr my uncle put a bathroom in his house, he still used the outhouse! I visited my Mom Saturday, and she was saying the same thing about cell phones. She has one, but she never uses it (it's maddening, these days you expect to actually be able to communicate with people).

      When I was a kid, only rich, giant corporations had computers and about the the only interaction a normal person had with one was that your electric bill came on a Hollerith card.

      BTW and OT, but who gave mod points to a troll? The parent comment should have been left neutral, or at worst, modded "overrated". The book would indeed make a good gift.

    4. Re:Thank you! by dzfoo · · Score: 2, Funny

      >> It's like that with every generation. My dad rode a mule to school, I had a school bus. Today's kids (some of them anyway) have air conditioning in the classrooms.

      You had a school bus?! I had to wait for the district's bus to pick me up. Man, I wish I had my own school bus then. That would have been fun.

              -dZ.

      --
      Carol vs. Ghost
      ...Can you save Christmas?
    5. Re:Thank you! by conspirator57 · · Score: 1

      get her a copy of microserfs.
      http://en.wikipedia.org/wiki/Microserfs

      --
      "If still these truths be held to be
      Self evident."
      -Edna St. Vincent Millay
    6. Re:Thank you! by Anonymous Coward · · Score: 2, Informative

      My kids love Scratch from MIT

      http://scratch.mit.edu/

    7. Re:Thank you! by tuxgeek · · Score: 1

      Agreed! any programming book makes the perfect gift for nieces & nephews as well as your own children. I remember my first C programming book. I was fascinated with learning to code. I may even have to pick up this book as I have not yet learned python. Just another one of the many things I must do before I die.

      --
      "Suppose you were an idiot...and suppose you were a member of Congress...but I repeat myself." Mark Twain
    8. Re:Thank you! by daveime · · Score: 2, Funny

      Right. I had to get up in the morning at ten o'clock at night, half an hour before I went to bed, eat a lump of cold poison, work twenty-nine hours a day down mill, and pay mill owner for permission to come to work, and when we got home, our Dad would kill us, and dance about on our graves singing "Hallelujah."

      But you try and tell the young people today that... and they won't believe ya'.

    9. Re:Thank you! by freeweed · · Score: 1

      At the risk of being modded a troll...

      I'm lost. Why would you think you'd be modded a troll for reading a book review on Slashdot, then saying "hey, I think I'm going to buy this book!".

      Or is this reverse-psychology karma whoring taken to a new, pointless level?

      --
      Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
    10. Re:Thank you! by Green+Light · · Score: 1

      and riding a mule to school sounds like a blast!

      --
      "Send an Instant Karma to me" - Yes
    11. Re:Thank you! by Mozk · · Score: 1

      When people are enthusiastic about something on the Internet, it usually comes across as either sarcasm or astroturfing, so I think it's somewhat reasonable for him to explain that it's neither.

      From the GP:

      Thanks for the review, you just gave me an idea for what I'm going to be getting my nephews for their respective birthdays.

      Really, I can imagine that as some sort of quip to any number of things. It just seems sarcastic (in a funny way).

      --
      No existe.
    12. Re:Thank you! by Phoghat · · Score: 1
      I'm older than most everyone here (I think, I'm 62) and My Dad left school in the 8th grade and went to work as a truck driver. It was hard work but he loved to drive trucks. When I came along in 1947, he let me be free to be anything I wanted and, stressing education as very important, it was just assumed that I would be the first in my family to attend college. I was supplied with all the educational advantages available in the 50's and early 60's. Moms bought me an encyclopedia (that I read cover to cover), Pop bought me trivia books, comic books, and got me an adult library card. He never imposed any type of censorship onn the books I took out of the library and encouraged me to visit the library once weekly. This was cool because I took out books and met some cute girls at the library.

      Fast forward, when I graduated college, I got married and had 4 boys in the 70's. Computers were just being talked about and wishing to give my kids the advantages my Dad gave me, I got involved with programming. I bought a Timex computer (in a drug store!) and taught myself Basic and machine language. I bought computer magazines aimed at kids with programs you could type into the 'puter and save on a cassette player. The kids thought it was very cool. BTW, although they didn't go into IT, they all attended college, they all became professionals, (except one, who's probably making more money than anyone else) and more importantly, they all are intelligent, well rounded, and happy individuals who will carry on the tradition of "maybe my children will be better than me and I'll be happy about it"

      --
      Think of how stupid the average person is, and realize half of them are stupider than that.
    13. Re:Thank you! by mcgrew · · Score: 1

      I don't imagine it would have been much fun in 34 defree F rainy weather.

    14. Re:Thank you! by rilian4 · · Score: 1

      ...in 34 defree F rainy weather.

      Sounds like basically your daily forecast in Portland,OR between December and February...;-)

      --

      ...quicker, easier, more seductive the darkside is...but more powerful, it is not.
    15. Re:Thank you! by Mortgage · · Score: 1

      Thanks for the review, you just gave me an idea for what I'm going to be getting my nephews for their respective birthdays. Awesome! :)

      Its funny I find myself reflecting upon how different things are these days, even looking back to the 70's and 80's. Technology advances so fast, which is good, I just think we sometimes get a little left behind. Guess that is what happens with old age!

  2. sounds like a great book! by jollyreaper · · Score: 4, Funny

    Going to be very disappointed if I get stuck. "This is so simple, even a child can do it! Someone get me a child, I can't make heads nor tails of it!"

    --
    Kwisatz Haderach
    Sell the spice to CHOAM
    This Mahdi took Shaddam's Throne
    1. Re:sounds like a great book! by beav007 · · Score: 1

      Oblig. xkcd.

    2. Re:sounds like a great book! by Frequency+Domain · · Score: 1

      "This is so simple, even a child can do it! Someone get me a child, I can't make heads nor tails of it!"

      Sounds like Tom Lehrer's song "New Math".

      Hooray for new math!
      ne...e...ew math!
      It won't do you a bit of good
      to review math.
      'Cause it's so simple,
      so very simple,
      that only a child can do it!

    3. Re:sounds like a great book! by jollyreaper · · Score: 1

      It was actually a groucho marx ref.

      --
      Kwisatz Haderach
      Sell the spice to CHOAM
      This Mahdi took Shaddam's Throne
    4. Re:sounds like a great book! by Anonymous Coward · · Score: 0

      They are missing the point. Unless you can have people typing in source for something that will make them say ohhhh and ahhhh after they execute what they typed.

      Typing in useful code for something that can balance a check book, or sort a telephone book in nlog n time will not be appreciated by so many people. What you need is, to bring things down to earth, a book for some multimedia engine that has abstracted out the core functions of multimedia and have people code a demo or a playable game after they type in code. Only then would you get younger generations of people interested in code.

      For an example of something eye catching see the productions by Future Crew http://en.wikipedia.org/wiki/Future_Crew. But these are only executed. Still they provide the wonder of typing in lines and lines of code from byte or compute gazette (Which I have done, thank you very much!) because you have to put in some elbow grease and at the end you are rewarded for your efforts.

      Im sure the book will be useful to someone. But unless the productions (book,demos,code, whatever) serve as a spring board to some thing else...It will be wasted effort.

      My two cents, get off my lawn, bla-ze bla-ze. :0)

  3. I wish... by plasmidmap · · Score: 1, Interesting

    That something like this had been around when I was a kid!

    1. Re:I wish... by pjt33 · · Score: 1

      When were you a kid? There were books like this around in the 80s: the main difference was that they used BASIC rather than Python. (To save everyone else from pointing it out: well, duh! Python hadn't been created).

      I found them rather too simple by the time I got round to reading them, though, because I'd learnt from the manual which came with my family's Amstrad CPC.

    2. Re:I wish... by mikehoskins · · Score: 1

      Yes, the TRS-80 Model 1 with Level 1 basic included a manual that was vaguely similar to this.

      In fact, David Lien's manual is considered among the best ever made.

  4. You missed the point of your own story by cephus · · Score: 5, Interesting

    You went out of your way to praise your Dad for having the foresight to move beyond his comfort zone by bringing home a computer. Isn't computing simply your version of "sports and cars"? Shouldn't you be trying to emulate your father by moving beyond your comfort zone and bringing home something that will inspire your kids to pursue their own interests rather than yours?

    1. Re:You missed the point of your own story by SomeoneGotMyNick · · Score: 4, Funny

      Shouldn't you be trying to emulate your father by moving beyond your comfort zone and bringing home something that will inspire your kids to pursue their own interests rather than yours?

      You mean like bringing home hookers, guns, or anything similar that might lead them to a fruitful career?

    2. Re:You missed the point of your own story by ShieldW0lf · · Score: 5, Interesting

      Get em a RepRap. Teach em to do 3D modeling, back off and let em make their own toys. That's what I'm doing... my kid has already developed a bunch of toys and the circuit boards for our RepRap are in the mail.

      As for teaching kids programming, I'd suggest starting with Scratch from MIT. My daughter loves it.

      --
      -1 Uncomfortable Truth
    3. Re:You missed the point of your own story by CastrTroy · · Score: 2, Informative

      Good point. Also, how do you really get somebody interested in programming in this day and age? I think it would be very hard to impress a kid with a "Hello World" console program with the current state of technology. I mean, when QBasic Gorillas was right up there with the most advanced games, and you could learn how to modify it yourself in a week, then you got interested really fast, because you realized that programming wasn't some kind of magic. But compare that to now, where it would take years of learning to get anything close to a current program, and it could be a difficult thing to get someone interested in the first place.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    4. Re:You missed the point of your own story by Darkness404 · · Score: 4, Insightful

      Scratch is great in that it teaches how to "think" like a programmer. However, ends up not really doing you a lot of good in the long run. Python is an easy to use language but it also is very "real" in that knowing Python can get you somewhere. That said, Scratch is very easy to use and you can make decent applications in there, but in the end you have effectively a "toy" language which won't really help you in the long run.

      --
      Taxation is legalized theft, no more, no less.
    5. Re:You missed the point of your own story by lysdexia · · Score: 1

      I dunno. My daughter is four, and has a pretty good grasp of the alphabet and can recognise and type her name.

      She thought

      print "Darby" * 5

      was pretty neat.

      I'm sure it would bore an older kid ... unless it didn't. Kids are bizzarre, which is nice.

    6. Re:You missed the point of your own story by Grimbleton · · Score: 1

      I'm sorry but what do guns and hookers have to do with each other?

    7. Re:You missed the point of your own story by ShieldW0lf · · Score: 2, Interesting

      Scratch is great in that it teaches how to "think" like a programmer. However, ends up not really doing you a lot of good in the long run. Python is an easy to use language but it also is very "real" in that knowing Python can get you somewhere. That said, Scratch is very easy to use and you can make decent applications in there, but in the end you have effectively a "toy" language which won't really help you in the long run.

      You need to get them hungry to create first. Once they hit those limitations, that's when you raise the bar. You can do pretty sophisticated event driven programming in Scratch, and you can reverse engineer other kid's creations from within the IDE. I know there are a lot of kids who moved on to ActionScript from Scratch.

      --
      -1 Uncomfortable Truth
    8. Re:You missed the point of your own story by dkleinsc · · Score: 1

      Having taught kids programming, I've seen kids get really fascinated by the very simple game of "computer picks a random number between 1 and 100, user gets 10 guesses and is told higher, lower, or just right".

      What's particularly nifty about that game, besides being easy to develop, is that it's a remarkably short conceptual hop from playing that game to understanding binary searches and base-2 logarithms. I've explained that stuff to 10-year-olds, and while I don't expect them to nail it on a test I do think that when they start having to deal with exponents and logs in 7th grade or so they'll have a big leg up on their classmates.

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    9. Re:You missed the point of your own story by Jafafa+Hots · · Score: 5, Funny

      one is something that can blow your brains out, the other is a weapon.

      OK, I know that's really stupid, but I'm tired.

      --
      This space available.
    10. Re:You missed the point of your own story by XxtraLarGe · · Score: 3, Funny

      I'm sorry but what do guns and hookers have to do with each other?

      Pimps.

      --
      Taking guns away from the 99% gives the 1% 100% of the power.
    11. Re:You missed the point of your own story by Darkness404 · · Score: 1

      The hardest part about coding really isn't the ideas, especially for children ideas flow naturally. Its the coding part that is difficult. How many of us when we were on our C64s had a great idea for a game but couldn't code it? If the person learned Scratch rather than a more "traditional" programming language, their skills other than their ideas end up going nowhere. On the other hand, if you give them Python they can more logically transition into C, C++, etc. And really, ActionScript isn't that much better than Scratch. Sure, you can more easily port it, to other systems (most systems run Flash) but it still won't port to any other language.

      --
      Taxation is legalized theft, no more, no less.
    12. Re:You missed the point of your own story by Anonymous Coward · · Score: 0

      This was modded insightful? You can't smell the sarcasm?

    13. Re:You missed the point of your own story by ShieldW0lf · · Score: 2, Interesting

      That's why you give them something that makes the coding easy as in not monotonous but not easy as in done for you. Then they have fun creating and learn to enjoy creating. When they have an idea that they can't implement, THAT is when you introduce the syntax.

      Not talking out of my ass here... I tried a bunch of different things, including LOGO and Squeak. Scratch was the best received. Eventually, Scratch will naturally lead to Smalltalk.

      --
      -1 Uncomfortable Truth
    14. Re:You missed the point of your own story by badboy_tw2002 · · Score: 1

      I started when I was 7 or so in BASIC - at that time there was no way I was going to make anything as advanced as asteroids or frogger, but being able to write a "choose your own adventure" game with if loops and PRINT statements was pretty awesome to me. The first time I managed to make the speaker beep was an achievement.

      Think about it this way - there are great works of art out there yet a child will spend hours and hours coloring and making stick figures. They don't seem to be discouraged by it at all. The process of doing and learning is its own reward.

    15. Re:You missed the point of your own story by migla · · Score: 1

      Bah... Of course one who likes computers should introduce them to their kids. If the kids don't want to program, so be it. If they do, they'll have a knowledgeable mentor.

      Sure, one should try to find and encourage all sorts of things, not just what one knows, but I thinks this mentality of not telling kids what you think or like is worrisome. If you don't influence your kids, fucking Toys'R'Us will.

      Let the kids know what you think and what you like. Just don't be a dick about it.

      --
      Some of my favourite people are from th US; Vonnegut, Chomsky, Bill Hicks.
    16. Re:You missed the point of your own story by Sponge+Bath · · Score: 1

      In IT shops the pimps have pointy hair.

    17. Re:You missed the point of your own story by Anonymous Coward · · Score: 0

      what software do you use to design a part for RepRap? I've always been disappointed at FOSS options for solid modeling and part design. BRL-CAD is very well developed, but it wasn't made to be an intuitive part modeler like a SolidWorks or ProEngineer.

      Also, I seem to recall the Fab@Home project having a parts/materials price tag of about $2500 (or that's what someone will sell you a kit for, not surel . That seems on par with what my parents probably spent on our first computer or two. (too young to know what the C-128 went for, but our first PC was about $2k).

      Ok, finally found where RepRap claims a target of ~$400 for parts. not bad.

    18. Re:You missed the point of your own story by Anonymous Coward · · Score: 2, Funny

      If you don't influence your kids, fucking Toys'R'Us will.

      I'm a Toys 'R Us kid you insensitive clod!

    19. Re:You missed the point of your own story by Shawn+Parr · · Score: 1

      bringing home something that will inspire your kids to pursue their own interests rather than yours?

      Maybe he is just very subtle, and this is a stab against python....

    20. Re:You missed the point of your own story by Anonymous Coward · · Score: 0

      His nigglet kids are learning how to play gangstas and hoes. Its the modern day nigger version of cowboys and indians

    21. Re:You missed the point of your own story by Dragonslicer · · Score: 2, Insightful

      Scratch is great in that it teaches how to "think" like a programmer. However, ends up not really doing you a lot of good in the long run. Python is an easy to use language but it also is very "real" in that knowing Python can get you somewhere. That said, Scratch is very easy to use and you can make decent applications in there, but in the end you have effectively a "toy" language which won't really help you in the long run.

      How old is the child that you're giving this to? I'm not a huge fan of Python, but I've seen quite a few languages that are a lot worse (or just plain harder for kids to play with, such as assembly), so I'd say my opinion on it is pretty neutral. Having said that, what are the odds that Python will still be a "hot" language in 15-20 years, when the kid will at all care about "getting somewhere" or "the long run"? 20 years ago, how many people would have said that Java would be popular today (yes, I am aware of when Java was first created; that's kinda the point)? My first programming language was Commodore Basic when I was about 5, followed closely by GWBasic. Neither of those are particularly useful these days, but they still served the purpose of getting me interested in programming and ultimately to a computer science degree.

    22. Re:You missed the point of your own story by sagematt · · Score: 1

      You went out of your way to praise your Dad for having the foresight to move beyond his comfort zone by bringing home a computer. Isn't computing simply your version of "sports and cars"? Shouldn't you be trying to emulate your father by moving beyond your comfort zone and bringing home something that will inspire your kids to pursue their own interests rather than yours?

      And this is bad because...?

      If they don't like it, you can move on and try something else. But if they are already showing interest in computers... why not?

    23. Re:You missed the point of your own story by MobileTatsu-NJG · · Score: 1

      I'm sorry but what do guns and hookers have to do with each other?

      Pimps.

      Gotta start at a young age. Pimpin ain't easy.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    24. Re:You missed the point of your own story by mdwh2 · · Score: 1

      What example of such a thing would there be today? I'm not saying there isn't one - but I can't think of one off hand. The new toys and gadgets like netbooks/phones/etc are just extensions of the computer (and unless you need portability, an ordinary computer is just as useful if not more practical).

    25. Re:You missed the point of your own story by blahplusplus · · Score: 2, Insightful

      " Shouldn't you be trying to emulate your father by moving beyond your comfort zone and bringing home something that will inspire your kids to pursue their own interests rather than yours?"

      This is where I disagree somewhat, there are certain subjects that you would love to have been forced to take at a young age but you were not long lived enough and too new to the world to realize their importance.

      My relative forced her kids all to go to music school and many ended up becoming musicians out of their own free will, even though early going they weren't so enthused but as they grew up they gained a lot of respect and appreciation for music. Even if they do not get paid professionally to play their instruments they still enjoy it and believe it was an enriching experience that they will pass onto their own children.

      Now the same is not true for all children obviously, some children would probably resent it but that's the risk you take as a parent for having lived longer and having more foresight of vision.

      The idea that disciplining your kids into activities they may (at the time) not be interested is somehow immoral or wrong is incorrect, since kids do not have the life experience to make judgements and reflections about the things they *Regret* their parents *didn't teach them* in hindsight. I'm sure many of us have had such occasions wishing our parents were better or were more clued in to their own wisdom, instead of letting the child (who has no lifetime of experiences and therefore foresight and judgement) do whatever it wants.

      There's a balance between freedom, discipline, responsbility and enrichment and I think parents should take that part of themselves back as *the parent*.

    26. Re:You missed the point of your own story by bitt3n · · Score: 1

      You went out of your way to praise your Dad for having the foresight to move beyond his comfort zone by bringing home a computer. Isn't computing simply your version of "sports and cars"? Shouldn't you be trying to emulate your father by moving beyond your comfort zone and bringing home something that will inspire your kids to pursue their own interests rather than yours?

      yeah, why don't you bring home a real python

    27. Re:You missed the point of your own story by mrdarreng · · Score: 1

      You mean like bringing home hookers, guns, or anything similar that might lead them to a fruitful career?

      Defensive, much? Maybe something like tradeable sports cards, a lathe and furnace for smelting, screen printing tools, golf clubs? The list of cool stuff a kid could get geeked on is endless, but I enjoyed how you went straight to possibilities that carry to some serious negative connotations. For the record, I see nothing wrong with bringing a gun home if you show the children to respect it. I would encourage this practice, actually.

  5. Re:C is the only starting language by Saint+Stephen · · Score: 5, Funny

    Oh, I remember my first days of trying to get anything to work in C. (This was in the days of DOS, before Windows). Hopeless! I'd be trying to program Hello World or a very small addition to hello world like type in a character, and have to reboot the PC because I overwrote system memory :-)

  6. Sounds cool but by Anonymous Coward · · Score: 0, Insightful

    I see your reasons and they aren't too bad but I wouldn't have picked Python myself. Maybe grab something from the top 3 most popular languages Java, (C, C++, C#) or PHP. As far as popularity goes though you could definitely do worse than Python.

    1. Re:Sounds cool but by eln · · Score: 2, Insightful

      I'm not sure I agree with Python either, but popularity of the language shouldn't really enter into the equation at this stage. What you want is a language that will be easy enough for them to pick up without being overly frustrated but powerful enough to allow them to create programs that actually do something useful. The purpose is to try and spur interest in programming, not train them for a job.

      The first language I did any programming in was Applesoft Basic, because the household computer happened to be an Apple IIgs, and it was included. After that, I was taught Pascal in high school. After that, I learned Fortran 77. Now, I do a fair amount of development work, but don't use any of those languages. And yet, learning them was not a waste of time, and in fact taught me a lot of concepts that made me a better programmer down the road with other languages.

      Of course, my experience with Fortran also gave me a deep abiding hatred for languages that enforce indentation, which may be one of the reasons I never picked up Python.

    2. Re:Sounds cool but by kaffiene · · Score: 1

      I agree. I think the only thing you want is something that doesn't break for obscure reasons so that you can figure out why it's not working when (inevitably) you get some code that doesn't work any more - that's really off-putting to kids.

      For me, I think it was BASIC (several variants) and Logo as my first programming languages. After that, I got into C, Pascal, LISP and started really understanding coding. BASIC really taught me some bad habits though!

  7. Free alternative by johnjaydk · · Score: 3, Informative

    There is a really nice, free alternative available in "How to think like a computer scientist". Despite the title, it's aimed regular school kids and is being used to teach a class on python programming. It's just come out in a second edition. http://openbookproject.net//thinkCSpy/

    --
    TCAP-Abort
    1. Re:Free alternative by Anonymous Coward · · Score: 0

      lol

    2. Re:Free alternative by Anonymous Coward · · Score: 0

      Another free alternative is Livewires

    3. Re:Free alternative by maxume · · Score: 1

      It sounds to me like the reviewed book is aimed at 4th-5th-6th graders, and looking at the link, it looks like that book is mostly aimed at 9th-10th-11th graders.

      (The younger kids will find the older book incredibly dry, and the older kids will find the younger book childish)

      --
      Nerd rage is the funniest rage.
    4. Re:Free alternative by Anonymous Coward · · Score: 0

      Despite the title, it's aimed regular school kids and is being used to teach a class on python programming. It's just come out in a second edition. http://openbookproject.net//thinkCSpy/

      At least, they'll get familiar with everyone's favorite text editor when "Configuring Ubuntu for Python Development"...

  8. Start them on a tricycle? Or a GSXR? by starglider29a · · Score: 2, Interesting

    Here's a question: If we teach our kids to program, do we start them on:

    10 N=N+1
    20 PRINT N
    GOTO 10

    or OnClick="doHelloWorld"

    After learning to program on a TRS-80 and later GWBASIC but now doing ASP.NET, I find myself looking at code (ExecuteSacalar()) as if every step takes 1/100th of a second, thus slowing performance. When in actuality, it takes a microsecond. Are we better off teaching them how to write an algorithm (How much is 1 + 2 + 3 + ... + N?) or to start with finding what they need in a library? I've seen advantages and disadvantages to both my career.

    Much of what I do now is finding the best canned operation (GridView) and toying with styles, rather than rolling my own Repeater. Seldom, but not never, does knowing how to step through a string get used. Although rolling my own DDL's is faster than letting .NET do it.

    Should we teach our kids how to ride a motorcycle where pedaling isn't needed? Or do they need to learn to pedal before they ride a motorcycle?

    1. Re:Start them on a tricycle? Or a GSXR? by Darkness404 · · Score: 2, Interesting

      It depends, to finish up your analogy, should we give the kids a tricycle when they already have a motorized Segway, or give them a motorcycle. Showing a kid "Hello World" doesn't provoke the same interest it did back in the '80s. Really, back then we had (for the time) state of the art games that you could fully modify with a week or two of learning. Even "advanced" games like Super Mario Bros. for the NES is looked at as something a beginner should be able to do. So unless the kid can make a game equivalent to SMB, they aren't going to be too interested.

      --
      Taxation is legalized theft, no more, no less.
    2. Re:Start them on a tricycle? Or a GSXR? by muridae · · Score: 1

      At that age, do they really need to know how to solve a sigma equation? I remember learning to code on an Apple IIe, writing lines of Apple basic on note pads before typing them in to make sure that I left enough line numbers free to add little patches back in later. No one ever told me that each line of code cost time, nor that each individual step on a line added to that time. In 4th grade, it didn't matter even on those slow computers. We were not dealing with concepts that would be useful in later life, and even a college freshman course in C++ broke all of those old bad habits.

      As for teaching them to use libraries, you'll get a resounding "Yes!" from me. I've met CS graduates who, because the uni does not allow outside libraries for some projects, never learned how to search google for a function or known solution to a problem. They try to reinvent the wheel every single time. It makes sense in school, where the using a library prevents you from learning the underlying concept they are teaching, but it makes not a wit of sense in the real world. Same for writing a dynamic or shared library, depending on the OS. 10 years of college, and I can't remember a single class that covered anything other than static libraries linked in at build time.

      None of that matters if the child doesn't want to learn how computers work, though. Some kids just want to play and build, stuff like Scratch, Processing, Squeek or Croquet. Others want to learn how to use it for more complex stuff, so languages like Haskell might be up their alley. And some kids are so curious that teaching them C and assembly on a small platform would be a good way to pique their interests (personal recommendation of the DS homebrew scene, but any console will do). There won't be 'one way' to teach kids to program, just like there isn't just one type of kid or one type of programmer. But leave the math topics till later, when the kid wants to learn how to do things faster or wants to learn the math.

    3. Re:Start them on a tricycle? Or a GSXR? by Anonymous Coward · · Score: 0

      You have to get the interest level up for kids first. Cooking is the same way. You may think boiling water is a rudimentary skill, but getting the kids to just follow directions completely by making Jello gets them on the road to understanding how to parse a recipe. Plus it holds their interest in the form of desert in an hour.

      I think that is the same issue here.

      On the other hand, being in the embedded world, I have had to work with to many people that were really accomplished CE grads that could code around me in a heartbeat at the level you describe, but would trip over scoping issues in embedded programming over and over and over again. They were great at riding wheelies on the motorcycle but kept falling off the tricycle.

    4. Re:Start them on a tricycle? Or a GSXR? by diggitzz · · Score: 1

      Should we teach our kids how to ride a motorcycle where pedaling isn't needed? Or do they need to learn to pedal before they ride a motorcycle?

      Well, if they can't pedal they're not going to innovate better bicycles and tricycles, that's for sure. But back to your analogy with algorithms...

      The question becomes, do you want your kid to grow up a mathematician, scientist, or engineer? Though it may not be immediately apparent, different programming mindsets are used for each of these disciplines, mainly due to the difference in the types of information needing to be computed and the types of problems to be solved.
      A kid well-schooled in algorithms might build us better encryption (or prove it impossible!) or might solve complex science puzzles that have never before been computable in all of human history!

      Clearly *both* algorithm development and library-navigation are important to innovation, just as it's important to know how to solve complex integrals before you go looking up solutions in a table... what other skill would you use when you discover that the algorithm you want doesn't exist (yet) ?

      --
      -=[You cannot consistently judge this statement to be true.]=-
    5. Re:Start them on a tricycle? Or a GSXR? by JebJoya · · Score: 1

      Well, I for one started programming at the age of about 3 or 4 on my dad's Commodore 64, and it was all about just typing in these bits of code from some books he had, and starting through that to understand how different structures work, and more importantly, how to think about structuring a program. I was a mathematician at Uni (23 now), and am now working as a techie/programmer for an OM firm, and that initial exposure to BASIC programming (pun intended) has stood me in good stead to pick up things like MATLAB and C while at Uni, and Python at work. I would absolutely say to start on algorithmics and simple programs - it's like maths, understand the basics and how the stuff underneath works and the rest will follow.

    6. Re:Start them on a tricycle? Or a GSXR? by commlinx · · Score: 1

      Here's a question: If we teach our kids to program, do we start them on:

      10 N=N+1
      20 PRINT N
      GOTO 10

      Start them on "5 LET N=0" just in case

    7. Re:Start them on a tricycle? Or a GSXR? by Nutria · · Score: 1

      I've met CS graduates who, because the uni does not allow outside libraries for some projects, never learned how to search google for a function or known solution to a problem.

      ?????? Teach someone to use libraries???????

      You don't teach that to intelligent young people; you teach it to high-functioning drones who'll never be able to progress beyond "do only what I've already exactly been taught".

      --
      "I don't know, therefore Aliens" Wafflebox1
  9. Not Python! by Un+pobre+guey · · Score: 3, Insightful

    Why, Lord, Oh why are blocks defined by indentation!

    1. Re:Not Python! by Anonymous Coward · · Score: 1, Insightful

      Agreed. Whitespace defining control flow makes Python a no-go language for me.

      Never heard of anything so stupid in my life... Well, except for COBOL, of course.

    2. Re:Not Python! by lysdexia · · Score: 2, Informative

      There are several reasons usually cited for using whitespace to define code blocks. Here's a decent intro.

      http://www.diveintopython.org/getting_to_know_python/indenting_code.html

      It's one of those things: I find it completely easy and intuitive. I don't have any trouble switching between python, perl and ksh (which are what I use to get most of my work done). A decent editor (I like vim) will usually take care of auto-indenting.

      Or were you just kvetching?

    3. Re:Not Python! by Anonymous Coward · · Score: 0

      God help anybody that ever needs to read your code!

    4. Re:Not Python! by Un+pobre+guey · · Score: 3, Insightful

      Not just kvetching, though that is certainly part of it. I like to format code for 1) readability and 2) printability on 100 character lines. This means I do a lot of indentation that Python does not like, but has no syntactical meaning or importance.

      It is, of course, purely a matter of taste and habit. Python is certainly as good a language as any. The indentation thing is a showstopper for me, but evidently not for many other people. Also, choosing a programming language for kids is no simple matter, Python or not.

    5. Re:Not Python! by rhoderickj · · Score: 3, Insightful

      Using whitespace to define code blocks is awkward at first. I revolted at the idea for a good year or two before finally giving it a go. Ultimately, I barely noticed. Looking back, one could just as easily say, "Why, Lord Oh why are blocks defined by braces!" Honestly, most of us are just used to braces, so anything different is bound to give rise to the knee-jerk reactions of fear and disgust. Ultimately, it is much like how people refuse to use Firefox or Opera over IE: "You mean I don't click the little E to get Internet? That's absurd!" In the end, I found that I disliked Python for other reasons, but the use of whitespace is not one of them. Even so, it's a great language and deserves a look.

    6. Re:Not Python! by Anonymous Coward · · Score: 0

      I believe it is an effort to force the writer to write human readable code.

      I started coding in C and moved to Python. Personally, I have been bitten more times by forgetting to put in an end bracket than I ever have been for setting the tabbing wrong.

      Anyway, in C you are supposed to use tabbing to do this anyway just for the human readability, the only thing is in C you need to add brackets as an additional measure. Wasted characters IMO.

    7. Re:Not Python! by dkleinsc · · Score: 1

      If you're talking about indenting due to a long line, then most of the time Python makes it quite possible to indent as you please. For instance, this is perfectly ok:
            if (a == b and
                    c == d):
                  doSomething(foo=a,
                                      bar=b)
                  doSomething(foo=c, bar=d)
                  doSomethingElse()

      This won't work in Python:
          if (a == b and c == d):
              doSomething(foo=a, bar=b)
                            doSomething(foo=c, bar=d)
                      doSomethingElse()

      Between the two I'll take the first version every time. The only real restriction is that the beginning of a statement must match the correct indent level, but that's a part of every coding standard I've come across.

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    8. Re:Not Python! by sukotto · · Score: 4, Funny

      So you don't have to argue about brace styles :-)

      --
      Come play free flash games on Kongregate!
    9. Re:Not Python! by SlashV · · Score: 1

      Why, Lord, Oh why are blocks defined by indentation!

      Better question: Why not ?
      I suppose you indent your code anyway. In that case, the braces, begin..ends and whatnots are only syntax clutter.

    10. Re:Not Python! by deck · · Score: 1, Insightful

      You made an excellent example of why the second sample is better. The first is nearly impossible to read.

    11. Re:Not Python! by Obfuscant · · Score: 1
      ...so anything different is bound to give rise to the knee-jerk reactions of fear and disgust.

      I don't fear python, nor am I disgusted with it. I simply think that whitespace is whitespace for a reason, and that whitespace should not be part of the syntax for a language.

      Any language that depends on whitespace to delimit blocks of code (e.g., the code belonging to an IF or FOR loop) is poorly defined. Whitespace exists for visual depictions of code, not internal.

      I don't program python, so someone that does will have to answer this question. Does python treat 'tab''sp''sp' at the start of a line as 10 spaces of indent, or two, or 6? Or does it prohibit tabs? The standard 'typewriter' expansion is 8 spaces. When I program, I tell vi to make it four. It's one "character". Which way does python see it? (And the fact that I can ASK this question makes the point that whitespace shouldn't be syntactically important.)

    12. Re:Not Python! by Anonymous Coward · · Score: 0

      You're making the mistake that all Python fanboys make: that not enforcing indentation means that no one will ever indent their code. Utter shite of course, but you all keep saying it.

    13. Re:Not Python! by Un+pobre+guey · · Score: 1

      I heartily agree!

    14. Re:Not Python! by digitig · · Score: 1

      I don't program python, so someone that does will have to answer this question. Does python treat 'tab''sp''sp' at the start of a line as 10 spaces of indent, or two, or 6? Or does it prohibit tabs? The standard 'typewriter' expansion is 8 spaces. When I program, I tell vi to make it four. It's one "character". Which way does python see it? (And the fact that I can ASK this question makes the point that whitespace shouldn't be syntactically important.)

      From the documentation:

      Leading whitespace (spaces and tabs) at the beginning of a logical line is used to compute the indentation level of the line, which in turn is used to determine the grouping of statements.

      First, tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight (this is intended to be the same rule as used by Unix). The total number of spaces preceding the first non-blank character then determines the lineâ(TM)s indentation. Indentation cannot be split over multiple physical lines using backslashes; the whitespace up to the first backslash determines the indentation.

      Cross-platform compatibility note: because of the nature of text editors on non-UNIX platforms, it is unwise to use a mixture of spaces and tabs for the indentation in a single source file. It should also be noted that different platforms may explicitly limit the maximum indentation level.

      --
      Quidnam Latine loqui modo coepi?
    15. Re:Not Python! by Deltaspectre · · Score: 1

      It will work out well as long as you're consistent with your code. A quick test with showed that one space, five tabs and two spaces, and two tabs all worked. As long as you use one and stick to it.

      I also use vim smart tabs (or whatever they are called, where it does 4 spaces instead) and python just sees them as they are in the file. 4 spaces.

      I think the recommendation is to stick to 4 spaces however, and not mix tabs up in there, but that goes along with staying consistent in your code.

      --
      My UID is prime... is yours?
    16. Re:Not Python! by Un+pobre+guey · · Score: 1

      I can't agree. Removing the curly braces opens the door to a lot of ambiguity. See above.

    17. Re:Not Python! by Obfuscant · · Score: 1
      Thanks for the answer.

      First, tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight (this is intended to be the same rule as used by Unix).

      I know of no such "rule as used by Unix". I commonly use a tab setting of 3 or 4 (depends on the day and the complexity of the code) when I edit files on Unix.

      Cross-platform compatibility note: because of the nature of text editors on non-UNIX platforms,

      It's not a "cross-platform compatibility" issue if the issue appears on the same platform depending on the editor settings, and has nothing to do with Unix or non-Unix.

    18. Re:Not Python! by stevied · · Score: 1

      Back in the day - quite a long way back now, if I'm honest - I always found it a good rule of thumb that if you indent level was deep enough that you were pushing your code off the right hand side of your terminal, you should just pull stuff out into functions. Apparently these new-fangled modern compilers even automatically inline function calls where necessary, so there's no performance hit ..

      (I'm sure there are situations where the insane indent is useful and/or necessary, but I can't imagine there are many of them.)

    19. Re:Not Python! by RichardJenkins · · Score: 1

      They're both pretty crappy, in real life you'd write that like this:

        if (a == b and c == d):
            doSomething(foo=a, bar=b)
            doSomething(foo=c, bar=d)
            doSomethingElse()

      I think the point the GP was trying to make was that if you have a really long line of code it is acceptable to break it up into multiple lines indented how you like, ie in the following where the only syntactically significant indentation occurs on rows 2,10 & 12 and the only significant unindention occurs on row 11:

      if  someCondition:
          print(
              "This is",
              "a really",
              "long string",
              "that I've",
              "decided to",
              "break up",
      )
          doSomething()
      else:
          doSomethingElse([
              'passing',
              'a list',
              'to a function',
          ])

    20. Re:Not Python! by Anonymous Coward · · Score: 0

      I don't program python, so someone that does will have to answer this question. Does python treat 'tab''sp''sp' at the start of a line as 10 spaces of indent, or two, or 6? Or does it prohibit tabs? The standard 'typewriter' expansion is 8 spaces. When I program, I tell vi to make it four. It's one "character". Which way does python see it? (And the fact that I can ASK this question makes the point that whitespace shouldn't be syntactically important.)

      tab sp sp is seen as tab sp sp. For the most part, what python cares about whether or not indentation is the same (these lines are in the same block), or greater (the more indented is an inner block). That said, convention is to have tabs converted to four spaces. Yes, there are ways to screw this up by mixing spaces and tab characters so code looks like it is indented in different ways based on how the tab character is displayed. You can also mess this up by switching editors between one that displays tabs as four space and one that expands tabs as four spaces. However, there are many Python aware editors that make this pretty much a non-issue.

      On the flip side, the use of indention in C can lead to incorrect interpretations that aren't possible in Python:

      if (x)
              if (y)
                    dosomething();
      else
              dosomethingelse();

      Pop quiz, under which situations will this dosomethingelse()? (hint: in Python this works the way it looks, but not in C...)

    21. Re:Not Python! by RichardJenkins · · Score: 1

      The justification at http://www.secnetix.de/olli/Python/block_indentation.hawk is pretty telling ("Python does not allow to obfuscate the structure of a program by using bogus indentations"). I think it's consistent with their stated principles for the design of the language: what they call 'the zen of python' (copied below).

      Personally I've come to find it quite useful, with the only downside being a disgusted voice in the back of my head saying "urgh, you're not supposed to do it this way". Certainly I've been flummoxed by plenty of indentation errors in my day.

      Beautiful is better than ugly.
      Explicit is better than implicit.
      Simple is better than complex.
      Complex is better than complicated.
      Flat is better than nested.
      Sparse is better than dense.
      Readability counts.
      Special cases aren't special enough to break the rules.
      Although practicality beats purity.
      Errors should never pass silently.
      Unless explicitly silenced.
      In the face of ambiguity, refuse the temptation to guess.
      There should be one-- and preferably only one --obvious way to do it.
      Although that way may not be obvious at first unless you're Dutch.
      Now is better than never.
      Although never is often better than *right* now.
      If the implementation is hard to explain, it's a bad idea.
      If the implementation is easy to explain, it may be a good idea.
      Namespaces are one honking great idea -- let's do more of those!

    22. Re:Not Python! by maxume · · Score: 1

      If the doS... lines in the second example started in the same column, they would be valid python. Is that unreadable?

      The tortured line breaks in the first sample are tortured because they are tortured, not because they are python (but they illustrate a couple of instances where a change in indentation does not change the block level).

      --
      Nerd rage is the funniest rage.
    23. Re:Not Python! by abigor · · Score: 1

      Any language that depends on whitespace to delimit blocks of code (e.g., the code belonging to an IF or FOR loop) is poorly defined. Whitespace exists for visual depictions of code, not internal.

      Says you. Google, who employ Python's creator, feel differently. Guess who matters more?

    24. Re:Not Python! by david_thornley · · Score: 1

      My blocks would be perfectly recognizable from indentation if you took all the braces out.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    25. Re:Not Python! by rhoderickj · · Score: 2, Insightful

      Any language that depends on whitespace to delimit blocks of code (e.g., the code belonging to an IF or FOR loop) is poorly defined. Whitespace exists for visual depictions of code, not internal.

      And that's a perfectly valid argument, but it is still just a concept imposed solely because of previous standards. Technically speaking, whitespace is just another character, so there is no reason to conceptually differentiate it from a brace. A compiler sees whitespace just as it sees braces, but we have traditionally not parsed that whitespace. Python simply uses that whitespace rather than discarding it. On a site note, I work with Java for a living and I often find myself wishing my co-workers would effectively use whitespace. It's amazing how some people honestly don't see anything wrong with code that is unreadable by humans. At least Python makes this type of code much less likely.

    26. Re:Not Python! by Kingrames · · Score: 1

      Real programmers program in whitespace and don't tell anyone.

      --
      If you can read this, I forgot to post anonymously.
    27. Re:Not Python! by Obfuscant · · Score: 1
      Technically speaking, whitespace is just another character, so there is no reason to conceptually differentiate it from a brace.

      What? There is every reason to differentiate it from a brace. A brace is a clear indicator of something. Whitespace is ... nothing. The main use of whitespace is to separate tokens. Overloading whitespace so that it also has syntactic meaning is just ridiculous.

      A compiler sees whitespace just as it sees braces,

      What utter nonsense. Maybe a "python compiler" does it that way, but I know of no other compiler that puts any such syntax upon whitespace. Not C, not Fortran, not Cobol. No other language I know of does this. Whitespace is simply ignored (except in limited cases like "within a string constant", but that's not a syntactical interpretation of whitespace).

      On a site note, I work with Java for a living and I often find myself wishing my co-workers would effectively use whitespace.

      This should point out to you the fact that whitespace is a VISUAL concept, not a computer concept, and that different people use it in different ways, because "looks right" is a subjective and not objective goal. Compilers should not care if the code "looks" right, and people should not have to care if the compilers "sees" the code.

    28. Re:Not Python! by rhoderickj · · Score: 1

      Technically speaking, whitespace is just another character, so there is no reason to conceptually differentiate it from a brace.

      What? There is every reason to differentiate it from a brace. A brace is a clear indicator of something. Whitespace is ... nothing. The main use of whitespace is to separate tokens. Overloading whitespace so that it also has syntactic meaning is just ridiculous.

      Whitespace isn't "nothing." That depends on the implementation. You mention yourself that it's a delimiter for tokens. I have seen tokens delimited with semi-colons, commas, and other characters. What makes whitespace so special? My point was that whitespace is a valid character and can be used just like a brace despite its semantic meaning in human language.

      A compiler sees whitespace just as it sees braces,

      What utter nonsense. Maybe a "python compiler" does it that way, but I know of no other compiler that puts any such syntax upon whitespace. Not C, not Fortran, not Cobol. No other language I know of does this. Whitespace is simply ignored (except in limited cases like "within a string constant", but that's not a syntactical interpretation of whitespace).

      Yes, you're right about that. I wasn't claiming that other compilers attribute meaning to whitespace. I was pointing out that all compilers see whitespace just as they see a brace -- simply another character in the set -- although what they do with it is different: most discard it, while Python uses it.

      On a site note, I work with Java for a living and I often find myself wishing my co-workers would effectively use whitespace.

      This should point out to you the fact that whitespace is a VISUAL concept, not a computer concept, and that different people use it in different ways, because "looks right" is a subjective and not objective goal. Compilers should not care if the code "looks" right, and people should not have to care if the compilers "sees" the code.

      Good point, but I think programming for humans is just as important as programming for computers. If the code isn't readable by both, then someone has failed. Using your logic, I could just as easily claim that using punctuation in English is unnecessary because it doesn't alter the meaning of a sentence.

    29. Re:Not Python! by tolomea · · Score: 1

      Tabs and spaces are treated as distinct, so a block indented with 'tab''sp''sp' is indented with precisely that and no other combination of tabs or spaces is acceptable.

      Additionally the language doesn't care how much white space you indent with, only that there is some indentation and that it is consistent, so you could have a class and indent all the stuff in that class with 'tab''sp''sp' and then indent the bodies of the functions in the class with a further 'sp''sp''tab''tab' for a total of 'tab''sp''sp''sp''sp''tab''tab'. And of course this restriction only applies to white space at the start of statements, when you break statements across lines you can do whatever the hell you want. Although why you would want to do anything aside from a normal straight forward indenting scheme totally escapes me.

      That said every serious programming project I have ever encountered (regardless of language) has had an indentation policy and anything that would have make it past any of those policies would be just fine with python.

      As others have mentioned, it sounds wrong and for the first week or two you'll be constantly thinking about it worried you'll mess up somehow, but after that you indent you code just like you always do anyway and you don't notice.

    30. Re:Not Python! by Anonymous Coward · · Score: 0

      I never said anything about Python being good: I'm just saying the restriction that all code be indented is not an onerous one. I also never said anything about removing the restriction creating ugly code. You can't enforce good style.

    31. Re:Not Python! by Haeleth · · Score: 1

      Ahh, the good old "argument from authority" fallacy.

      The fact that someone famous uses something is completely irrelevant when discussing the inherent merits of that thing.

      Popularity and good design are unconnected. Look upon the number of companies that are propped up by nightmarish heaps of VBA spaghetti, and despair.

    32. Re:Not Python! by Haeleth · · Score: 1

      Better question: Why not ?

      The use of indentation to define blocks (among other things) has forced a number of other undesirable constraints on program structure. For example, it's the reason why a Python lambda is restricted to a single expression.

    33. Re:Not Python! by Just+Some+Guy · · Score: 1

      Let me summarize about a decade of real-life Python experience: whitespace scoping has theoretical problems that never, ever come up in practice. Seriously, it hasn't caused problems in the field in any project I've ever worked on. BTW, indenting with 4 spaces is nearly universal. On my system, of all the files named *.py, 472 have at least one line starting with a tab character and 16,220 have no such lines.

      --
      Dewey, what part of this looks like authorities should be involved?
    34. Re:Not Python! by JimR · · Score: 1

      I know of no such "rule as used by Unix".

      man expand

      --
      #exclude <ms/windows.h>
    35. Re:Not Python! by Obfuscant · · Score: 1
      I still know of no such "rule as used by Unix".

      'expand' is a program that comes with some versions of Unix that allows you to expand tabs to ANY NUMBER of spaces or an arbitrary list of columns. Were it a 'rule' that 'tabs are eight', there would be no options, and no Unix program would be able to violate that 'rule', must less help you violate it trivially.

      Maybe you mean "common practice", but that's a different thing, and "common practice" often differs in different places. If a programming language relies on "common practice" in order for people AND THE COMPUTER to be able to correctly process the source code, then that language is poorly defined.

    36. Re:Not Python! by Anonymous Coward · · Score: 0

      ...and you cannot fool yourself about the blocking by indenting improperly. wysiwyg.

  10. The beauty of this book by InsertWittyNameHere · · Score: 5, Funny

    is that not only does it teach programming but as a side effect you're kids are guaranteed to be safe from pregnancy, STDs, or any form of social life.

    1. Re:The beauty of this book by Lurchicus · · Score: 1

      Actually... Hello World of Warcraft would have the side effect that you're kids are guaranteed to be safe from pregnancy, STDs, or any form of social life.

      --
      Lurchicus - For Sig, see other side.
    2. Re:The beauty of this book by Doctor+Faustus · · Score: 1

      as a side effect you're kids are guaranteed to be safe from pregnancy, STDs, or any form of social life.
      That's why I've also been teaching my son guitar.

      He complains about having to practice, and I tell him that most parents tell their kids they'll thank them when they're grown-ups, but he'll thank me when he's a teenager.

  11. FOSS isn't a reason... by Obfuscant · · Score: 1
    FOSS isn't a reason to use a language to teach programming.

    FOSS doesn't mean there is a lot of freely available code to look at, FOSS means there is source code for the INTERPRETER that you can modify. I suspect it is written in C or C++, so you don't get any advantages in having the source for the python itself. Now, FOSS is a good argument for using gcc, since you get lots of example code ...

    Even "closed source" languages have freely available code to look at. MATLAB, e.g..

    1. Re:FOSS isn't a reason... by maxume · · Score: 1

      The most used python interpreter is indeed written in C (though there are projects in C#, Java and Python; That's Jython, IronPython and PyPy, respectively). On the other hand, the default install ships with a couple of megabytes of python source files (many of the standard libraries are pure python code).

      --
      Nerd rage is the funniest rage.
  12. Re:C is the only starting language by Anonymous Coward · · Score: 0

    What..? Are you sure you weren't coding assembly? I didn't realize printf/puts had that much power!

  13. Mod Parent Insightful Pls by Anonymous Coward · · Score: 0

    Some jackass moderator's having a laugh and modding everything down. Please fix this mod to insightful to make up for his karma being screwed (funny is neutral karma).

  14. MOD PARENT UP by starglider29a · · Score: 1, Informative

    This isn't a Troll, it's Truth! Teaching a beginner to program in a sloppy language is like teaching them to drive a car with GPS, traction control, anti lock brakes, collision detection and rear-view camera. That's all fine until they have to know what they are doing. (Picture driving an MGB)

    1. Re:MOD PARENT UP by Anonymous Coward · · Score: 0

      There's some asshole with mod points modding folks as a Troll.

    2. Re:MOD PARENT UP by Anonymous Coward · · Score: 0

      mod parent troll!

    3. Re:MOD PARENT UP by Anonymous Coward · · Score: 2, Insightful

      Actually, I would say it is more akin to teaching kids how to drive in an old beater with a sloppy transmission and bad alignment. Sure, once they figure out all of the little tricks that are needed to nurse it along, they will be better drivers, but it forces them to deal with a lot of extraneous issues while they are still trying to figure out how to handle traffic laws and keep the car on the road.

  15. Sounds familiar... by Anonymous Coward · · Score: 1, Funny

    "Hitting middle age has been an interesting time. I catch myself thinking about how well kids have it today and sounding a lot like my father. One difference is while my dad was happy to teach me about horses or goats, we never spent any time hooking up pipes together. I think he did realize that indoor plumbing was important and I will always be grateful for the commode he brought home one day. It was a substantial purchase for our household. I spent many days excreting feces and flushing the results down the toilet. In my home today we have a considerably better situation, plumbing wise. There are usually a couple showers running as well as the jacuzzi upstairs. My kids take for granted what I found to be amazing and new. Still, that's all pretty normal and I'd like to give them an opportunity to go deeper if they are so inclined, just like we give them opportunities to explore other skills and pursuits. With that in mind I brought a copy of Hello Plumbing! home a few weeks ago, and the response from my oldest has been surprisingly enthusiastic."

  16. Expectations of today's 11 year old different by fprintf · · Score: 2, Interesting

    The expectations of today's 9 - 14 year old is very different than for those of us learning BASIC on a Commodore or Atari in the early 80s. I tried Scratch and Kidsprogramminglanguage with my now-13 year old. As soon as he saw the creations we could make he said "at what point do I get to make a game like on Xbox or my computer?" He just wasn't satisfied making lines on the screen or adding numbers or helping to solve his math homework (when it would be easier to solve it in his head). So, yes it would be cool to make lunar lander and I would have also been soooo happy to have such a game in 1983.

    Then again, his favorite games now are often on Kongregate - sometimes the simpler the better, like launching a stick figure out of a cannon and solving various puzzles of angle, thrust, bounce etc. So maybe it is possible, but it needs to be graphic, challenging and most of all fun.

    --
    This post brought to you by your friendly neighborhood MBA.
    1. Re:Expectations of today's 11 year old different by Maximum+Prophet · · Score: 3, Insightful

      I know people who wrote, acted and filmed their own movies on Super 8, back when "Star Wars" was first in theaters. It wasn't possible for an amateur at the time to produce anything close to what a professional could produce, but they did it anyway. I don't know how you would go about instilling the desire to build your own, they just had that desire to begin with.

      --
      All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
    2. Re:Expectations of today's 11 year old different by AdamWeeden · · Score: 2, Interesting

      If that is the case, I would HIGHLY recommend you get him started on Kongregate Labs' Shootorial. It is essentially a tutorial on how to make a side scrolling shooter in Flash from the ground up. It starts out basic but introduces concepts like logic and hit boundaries and other things that actually require code. Hope he enjoys it!

      --
      I was quoted out of context in my autobiography...
    3. Re:Expectations of today's 11 year old different by cool_arrow · · Score: 1

      Nice link. Exactly what I was looking for for my 9 and 10 yr old. Thanks.

    4. Re:Expectations of today's 11 year old different by Anonymous Coward · · Score: 0

      He'd probably work out better without a shittarded MBA for a father.

  17. Re:C is the only starting language by DoofusOfDeath · · Score: 1

    To whoever modded the parent down as "Troll": I really think you're off the mark.

  18. Here's how you can tell by tekproxy2 · · Score: 1

    Hand your kid a copy of The C Programming Language. If they can't handle that, they are not ready.

    1. Re:Here's how you can tell by aquatone282 · · Score: 2, Insightful

      Hand your kid a copy of The C Programming Language. If they can't handle that, they are not ready.

      Why not just chase him around the yard with a baseball bat?

      A lot more humane than your proposal.

      --
      What?
    2. Re:Here's how you can tell by Anonymous Coward · · Score: 0

      Why not just chase him around the yard with a baseball bat?

      Because he'd have to peel his sweaty lard ass off the couch amongst the cheetos crumbs and rat droppings.

    3. Re:Here's how you can tell by DeusExMach · · Score: 1

      A peaceful Saturday at aquatone's house was punctuated by a late-afternoon domestic disturbance.

      Monday Morning: Municipal Courthouse.

      "So, you claim that chasing around a terrified 12-year-old while flailing a baseball bat over your head and insisting that he 'play ball' is responsible parenting and an attempt to get the poor child interested in athletics? You honestly make me sick, and I feel that pending your psych eval you should be kept away from children for the rest of your natural life."

      You just can't win, can you?

    4. Re:Here's how you can tell by Anonymous Coward · · Score: 0

      NOBODY is every really ready for C

    5. Re:Here's how you can tell by ztransform · · Score: 1

      Why not just chase him around the yard with a baseball bat?

      Admittedly I was at the old age of 14 when I first read K&R cover-to-cover but I found it inspirational, clear, and concise.. and that was the 1st edition. Learning C blew my mind and made other languages at the time (Basic, Pascal) seem like toy languages. It also gave me a thirst for understanding assembler.

      The clearest alternative programming language I've encountered must have been Microchip PIC RISC assembler - the datasheets for the 16F84 (and 16C84) very clearly explain the small instruction set.

      I'm not sure I would have understood pointers to the extent that I did at 14 at a younger age. Who knows. I guess when a child is ready they will learn whatever it is they want to learn.

      I probably would steer well clear of Python in terms of a teaching language. That's probably because I keep well clear of Python in the real world.

  19. Question for the OP by immakiku · · Score: 1

    You drew an analogy to parents projecting sports dreams onto their children. Do you see this as a positive phenomenon? Sure, if you value programming as the absolute best thing a child can be familiar with, this makes sense. But what if your child would naturally have favored or have talent in some other area - say physics? The activity you are pursuing with her could lead to relative underdevelopment in physics when naturally she might have become a great physicist.

    An article featured on Slashdot a while back, titled "A Mathematician's Lament", described how, instead of prescribing a course for children to follow in Mathematics, a more effective way to teach math would be for each child to organically discover math on their own. I see that you are attempting to do similarly with your child and programming (instead of math). But that article also brought me to wonder, why favor one subject over another? Why not also let the child organically and naturally discover her talents and interests? Best results might come from doing this with "Hello World", as well as doing similar activities with art, music, physics, language, and sports, in equal proportions.

    1. Re:Question for the OP by Azghoul · · Score: 2, Insightful

      I love the Lament, it's incredible.

      I'd guess (hope?) that you don't bring this book out until / unless your child shows an interest.

      But at some point you have to show them SOMETHING though, right? If you don't show them, how will they know what there is to be interested in?

    2. Re:Question for the OP by immakiku · · Score: 1

      Well yes. This is, after all, a book review. I was rather questioning the OP's active push towards one direction. I'm curious if the OP had thought about the possibility of his child being better at other things as well as well as what the rationalization for pushing programming was.

    3. Re:Question for the OP by Anonymous Coward · · Score: 1, Insightful

      You drew an analogy to parents projecting sports dreams onto their children. Do you see this as a positive phenomenon? Sure, if you value programming as the absolute best thing a child can be familiar with, this makes sense. But what if your child would naturally have favored or have talent in some other area - say physics? The activity you are pursuing with her could lead to relative underdevelopment in physics when naturally she might have become a great physicist.

      Actually, I come from a different perspective. I view programming to be a liberal art (in the classic sense) - a core building block on the path towards being a well educated, well-rounded person. Very few people just program - they write applications and libraries that do things. I don't think you are going to hamper a budding physicist by teaching her how to program at the age of 9. Instead, getting kids excited about programming is probably one of the best ways to give them the tools (mental and physical) to explore whatever it is that interests them.

    4. Re:Question for the OP by diggitzz · · Score: 1

      Best results might come from doing this with "Hello World", as well as doing similar activities with art, music, physics, language, and sports, in equal proportions.

      Computer programming offers the ability for a child to explore at least the theoretical foundations of every discipline known to man. She can program musical ensembles with tones, harmonics, and rhythms, she can create graphic art and learn about color, light, motion, and composition, she can write games and calculate sports plays, and honestly are physics and math really questionable in the domain of programming? When I was 9, the first thing I did once comfortable in BASIC was to grab my dad's star charts and start writing up a solar system simulator, purely out of interest in physics, math, and astronomy! Programming is a tool for exploration... you're basically handing them the keys to the imaginable universe!

      --
      -=[You cannot consistently judge this statement to be true.]=-
    5. Re:Question for the OP by stoolpigeon · · Score: 1

      I am not a big fan of pushing kids too hard. At the same time I don't believe in a laissez-faire type approach to parenting either. I believe it is my responsibility to guide and help them grow. We let them try all kinds of stuff and tell them that if they are willing to work hard enough they can do almost anything.

      I am not a perfect parent, but I do my best.

      What I find to be a very interesting phenomenon is how many people not only have very strong opinions about parenting but feel that those strong opinions should be observed by everyone. It's odd how often anyone with kids runs into these types of people.

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    6. Re:Question for the OP by immakiku · · Score: 1

      Thanks for the response. I'd like to add that I'm not of a strong opinion in any way. I was just interested in hearing more about your observations - since you have taken the time to write up a post already, you're clearly very perceptive and receptive to your child's development.

    7. Re:Question for the OP by stoolpigeon · · Score: 1

      Yeah - I'm not saying you are that way - it's just funny how a lot of people get about child rearing.

      My kids will be screwed up in some ways due to my parenting, it's unavoidable. And they will hopefully pick up some positives too - but in the end they will be people with all the good and bad that entails. And a lot of who they are, I believe, will happen regardless of how I behave.

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
  20. Very different from days of Compute! and Byte... by digitalhermit · · Score: 2, Insightful

    Back then, if you wanted to play a game you often had to copy programs from source code listings. So you had things like line validators (checksum as you entered each line) and whole sections devoted to programming. The projects, I think, were also very different. I remember building a WeFax device to decode satellite weather facsimile images. There was also the Ciarcia articles that talked about everything from building a micro-computer to assembly programming.

    Sure, there are still programming magazines, but we don't have to solve the same things we did then. Now it's just a matter of running CPAN, downloading a Flash or Java snippet, or just a #include.

    That's why I'm super grateful for the availability of Linux, free software, and the suite of compilers. I remember saving up for weeks to purchase Megamax C and later GFA BASIC. I remember borrowing a Z80 card so that I could run Borland Turbo Pascal. Now it's a quick download and every language I want is available within moments.

    The downside is that it's a lot more complex now. If I wanted to make a graphics program back then, for example on TI BASIC, it was a relatively simple matter to redefine a character set with a bunch of POKEs. Now we have to worry about initializing a window, internationalization, acceleration, etc.. Sometimes it's a bit daunting for non-professionals. Sure, there things like SDL and TCL/TK and a raft of IDEs, but still I don't think it is as easy as it was back then. (Of course, today's software does a lot more).

  21. Re:Blocks by indentation by wexsessa · · Score: 1

    because it makes sense. Back in the 1960s & 70s I was working for IBM, when PL/I appeared. It uses Do... End to delineate blocks, and I was OK with that but then found it wasn't enough. So I developed an indentation scheme, jogging right at a Do and jogging back left at an End (white space is ignored in PL/I). This made it much easier to grasp the logical flow at a glance. Unfortunately I didn't keep any examples when I quit programming, but I think it would look remarkably similar to Python (except for the Do & End keywords).

  22. Re:Very different from days of Compute! and Byte.. by FreakyGreenLeaky · · Score: 2, Interesting

    So you had things like line validators (checksum as you entered each line)

    Wow, now that brings back memories. I remember typing many, many lines of numbers (with the checksum at the end) and then finally having a stick-figure or something dodge falling balls...

    Of course, the real fun began when I finally learned what those numbers meant :)

  23. HTML/CSS/JavaScript by XxtraLarGe · · Score: 2, Interesting

    It seems to me if I had a child and wanted to teach them programming, I'd do it using these three techs in this order. You don't need any special software to write any of them, they are easy to learn, and there are millions of free examples available to you. The best thing is, no compiling, no need for a server. You can write a bit of code, open it with your browser and get instant gratification.

    --
    Taking guns away from the 99% gives the 1% 100% of the power.
    1. Re:HTML/CSS/JavaScript by Freetardo+Jones · · Score: 1

      and there are millions of free examples available to you.

      Too bad many of those millions are shitty examples that teach bad coding techniques and style. God help any kid who learns how to program from viewing slashcode!

    2. Re:HTML/CSS/JavaScript by RegularFry · · Score: 2, Insightful

      The problem is, they're all broken. It's far harder than it should be to get anything meaningful done reliably and well in CSS and HTML, even if the specs were implemented properly. Javascript is hamstrung by crappy implementations with crappily pointless differences between them, and a crappy standard library. Don't get me started on the DOM API, that just makes me cry.

      Really, the only advantage that HTML/CSS/Javascript has over Python is that every PC has an interpreter present out of the box, but given that if you're doing JS there's few tools better than Firebug, you've got installation to do anyway and you might as well just suck it up.

      --
      Reality is the ultimate Rorschach.
    3. Re:HTML/CSS/JavaScript by Obfuscant · · Score: 1
      Of the three you list, only the last is a programming language.

      If you want create a web page designer, teach them HTML and CSS.

      If you want to create a programmer, teach them how to tear a complex problem apart into small bits that a computer can understand and then how to express those small bits to the computer -- in any language that doesn't have 500% overhead or arbitrary interpretations based on things like how many spaces are in the line. The former rules out COBOL, the latter python.

      FORTH. Yes, you have to learn to think backwards, but it is SO easy to start with a small piece and add and combine them. Thinking backwards enforces decomposition of the process into small bits. In fact, LOGO, IIRC, was a very FORTH-like language that was intended for kids. "Move the turtle so many pixels up, turn so many degrees right..."

    4. Re:HTML/CSS/JavaScript by Anonymous Coward · · Score: 0

      Yeah, the best thing about it is that it doesn't have any error messages! If you have any typo, misspelling, or bad syntax, things just don't work. Then you get to explore the system to figure out why things won't work. What could be more fun for kids?

      dom

    5. Re:HTML/CSS/JavaScript by Anonymous Coward · · Score: 0

      Not as instant as interactive python in a terminal window:

      >>> x = 3
      >>> y = x + 4
      >>> print x,y
      3 7
      >>>

      http://www.astro.umd.edu/~chapman/python_tutorial.html

  24. Re:Blocks by indentation by Anonymous Coward · · Score: 0

    because it makes sense.

    No, it doesn't.

    Whitespace (by definition) is blank - it has no visual representation. You're trying to tell me that something you can't see should control how a language works?

    Brackets, Braces, DO .. END, etc. all perform the same function in computer languages that punctuation does in human languages. It makes as much sense as punctuating human languages with whitespace. (Which we don't do, for obvious reasons.)

  25. Easy start environment: Processing by j-stroy · · Score: 2, Insightful

    I got into computers because I could hack the BASIC games on an Apple ][+

    Accessibility is king! But finding which thread to grab amidst the jumble of a modern GUI OS is tricky!!

    I have just started playing with "Processing" and it seems to have a nice mix of understandable code and super powerful libraries to take advantage of: cross platform, modern hardware and complex meta-behaviours that we might expect.

    As well, I am "sandboxing" with "Parallels" on top of OSX and I have found it to be very stable. (It allows virtualization of Windows flavours, OS X & varieties of linuxen concurrently) The images can be booted Read Only or not. Creating a bulletproof, clean starting environment is what kids(and productions) need, and virtualization images might be part of this.

    I'm new to virtualization, but it feels like the future to me. Since I have taught in hands-on Lab settings I think this is a better solution for a shared use lab than straight up disk imaging... It would allow week by week, class by class customization of the Boot Image, and changes could always be rolled back.

  26. Re:Blocks by indentation by Beardydog · · Score: 1

    Spoken language is (more or less) punctuated by whitespace. Tone certainly plays a role, but I can (lamentably) understand Ben Stein well, whether he's selling me eye drops, or calling me a latent Nazi.

    I understand the philosophical rejection of whitespace as a control, and the argument appeals to a part of myself I have respect deeply, but at the same time, you -can- see it. Space and Tab have ASCII codes, and they are represented in whatever interface you're using by a region of white pixels, the same way an "A" is represented by a region of white pixels interspersed with a specific pattern of black.

    If the language occasionally required a couple of spaces in a row before a line of code, and other times required a single tab, the result would certainly be horrific, but as it is, the requirement is both functional, and visually informative.

    Sane people use tabs to separate blocks for the purposes of readability, anyway. At that point, curly braces become redundant information.

  27. I didn't read to book, but... by ratboot · · Score: 2, Interesting

    Python was created from the start to be easy to learn But I think BASIC on VIC-20 was even easier to learn then Python : no need to use colons or indenting! And what about the dreaded ==, impossible to understant for a kid! Mod me troll.

    1. Re:I didn't read to book, but... by ^_^x · · Score: 1

      I cut my teeth on QBASIC on DOS 6. I loved how if you used a proper keyword, it would automatically capitalize it, giving some instant feedback. Even in Visual Studio .NET's VB editor it does something similar, but I also love how IntelliSense can call up a list of all the members in a class if you're struggling to remember a name, or even curious what something can do...

  28. Re:Blocks by indentation by Obfuscant · · Score: 1
    ... but as it is, the requirement is both functional, and visually informative.

    Since compilers and interpreters don't have to SEE your code, the "visually informative" requirement exists ONLY for humans. It should not be a requirement for proper execution of the code.

    Nor is whitespace a functional requirement -- unless you've defined your computer language to require it, and then you're arguing in a circle. "It's a requirement because I decided to require it" isn't enough to claim it is a functional requirement. Many languages do NOT require it, because they were not defined to require it. The vast majority of languages need whitespace only to separate tokens.

    Space and Tab have ASCII codes, and they are represented in whatever interface you're using by a region of white pixels, ...

    No, they aren't. They are usually represented by SPACE -- a gap -- which usually appears as a section of terminal screen in whatever color the background happens to be. (Black, white, grey, yellow, pink, blue, orange, whatever...) In SOME editors, and on some systems by default, tabs are represented by a specific character, similar to the way an 'A' is represented. Some systems even have a mode where spaces are represented by a special character on the screen (like an underscore with serifs on the end.)

    They aren't represented on all systems by the same amount of space, either. Some systems expand tabs to every 8 columns. I set vi to 3 or 4, usually, so that my columns don't run off the edge of the screen as I indent them.

    And the same number of characters (space and tab) can result in vastly different "whitespace" representations, even assuming the same interpretation for a tab. "sp/sp/sp/sp/sp/sp/tab" will look VERY different than "tab/sp/sp/sp/sp/sp/sp", even though they are both the same number of characters.

    Sane people use tabs to separate blocks for the purposes of readability, anyway. At that point, curly braces become redundant information.

    Wow. Programmers who don't use tabs are insane?

    No, GOOD programmers use whitespace to make their code readable by humans; they use the syntax of the language to make it readable by the compiler/interpreter. Using the VISUAL representation of the code as input to the compiler leads to nonsense like a language that says "a red flashing italic FOR compiles this way, but a blue flashing bold FOR compiles this other way...". That's just plain stupid, and anyone who defines a language like that would be laughed at.

  29. Re:Blocks by indentation by digitig · · Score: 1

    No, it doesn't.

    Whitespace (by definition) is blank - it has no visual representation.

    Wrong. Oh so wrong. Try removing all redundant whitespace from a well-formatted program in a language of your choice (other than Python!) and see how readable it is compared to the original. Then try to tell us that the whitespace has no visual representation.

    --
    Quidnam Latine loqui modo coepi?
  30. Re:Blocks by indentation by Un+pobre+guey · · Score: 1

    Sane people use tabs to separate blocks for the purposes of readability, anyway.

    Not anyplace I've worked at. People constantly differ as to the number of spaces per tab, and it is common to prohibit tab characters in code altogether. This is not because the compiler/interpreter cares, it doesn't. It is for human readability. Even in languages with curly braces, erratic indentation is difficult to read and gets in the way of code analysis and programming. This promotes bugs and errors.

    The suggestion that the programmer make the visual distinction between tabs and spaces while coding is foolhardy, even if the spaces and tabs are visualized with different characters. For code to be of high quality, the programmer must remove whatever noise or clutter is keeping her from correctly grasping what is going on. To add gratuitous indentation constraints works against this. Python would be just as great a language if it had curly braces. Nothing would be lost, and clarity would be gained. This indentation gimmick makes it a rebel without a cause.

  31. Re:Blocks by indentation by DeusExMach · · Score: 1

    Yourexactlyright.there'snoreasontousewhitespacewhendealingwithhumanlanguage.

  32. Re:Blocks by indentation by Deltaspectre · · Score: 1

    Wait, what language is this that already uses red/blue italic flashing FORs?

    --
    My UID is prime... is yours?
  33. NOT Javascript! by kaffiene · · Score: 1

    I write JS for a living and I wouldn't let that crap loose on anyone. It's an awful language to learn - the runtime environments give little feedback about errors (and often incorrect feedback at that) it runs differently depending on which browser you use and the free tools for programming JS are crap.

    I'd go for Java instead: all the FOSS advantages claimed for Python apply to Java as well, AND it performs very well ( typically 80% the speed of C), it has a ton of game specific libraries written for it but you can use it 'out of the box' for writing games as well just with the standard libraries. BUT - and this is the really big issue for me - it is *very* vocal about errors and the 'fail-fast' design philosophy really helps finding errors quickly. There's nothing worse than doing some coding on something that already works and finding it no longer runs and you have no (correct) feedback about what the problem is - and this happens to me all the time in Javascript (even with good tools like Venkman or MS's script debug tool).

    1. Re:NOT Javascript! by Anonymous Coward · · Score: 0

      Firefox + firebug. Really excellent debugger, although every once in a blue moon there is something that works on firefox but breaks in IE that you have to hunt down with the tools you mentioned.

  34. Re:C is the only starting language by kaffiene · · Score: 1

    I love C with a passion, but I agree - I wouldn't let a kid loose with it :o) Maybe a Uni student, but not a 9-12 yr old you're wanting to not hate programming =)

  35. Get em a RepRap? by nurb432 · · Score: 1

    No, make them design and build their own.

    --
    ---- Booth was a patriot ----
  36. Re:Blocks by indentation by Obfuscant · · Score: 1
    Wrong. Oh so wrong. Try removing all redundant whitespace from a well-formatted program in a language of your choice (other than Python!) and see how readable it is compared to the original.

    I think the point is that it IS still readable by humans and functional to the computer, where the python code will not be functional or readable. In fact, if you do this to C code, you can run it through "indent" and it will come out clearly indented for you. It sounds like such a program is impossible for python because it depends so much on how things are indented to start with.

  37. Re:Google this! by daveime · · Score: 1

    Now now Steve, put down that chair !

  38. Tabs or spaces, but not both by tylersoze · · Score: 1, Troll

    I don't know what it is, but any discussion of Python brings about in me an almost primal reaction of disgust, I just can't help myself. ;) Syntactically important whitespace, what...the...@#%!? You know, if he had decided to make either spaces *or* tabs to delimit blocks, Python would suck so much. I mean, it would still suck, but just not as bad. Who doesn't love a language whose programs can be destroyed by the slightest whim of text editor or paste into a web comment field? Or destroyed by one developer using spaces and another tabs? Lord knows you can't just run indent on a C program to make it formatted exactly the way you want it instead formatted like the insane designer of the language proscribes, except you can use both tabs and spaces to do it, of course. :) BTW, I think this is next version of Python: http://en.wikipedia.org/wiki/Whitespace_(programming_language)

    1. Re:Tabs or spaces, but not both by Anonymous Coward · · Score: 0

      By the way: You are correct you have to decide to make either tabs or spaces. Just can't mix.

      Python isn't half as bad as people who complain about the white space make it out to be.

    2. Re:Tabs or spaces, but not both by Deltaspectre · · Score: 1

      Spoken by someone who's truly never used python for a small project :)

      --
      My UID is prime... is yours?
  39. Re:Blocks by indentation by digitig · · Score: 1

    In fact, if you do this to C code, you can run it through "indent" and it will come out clearly indented for you. It sounds like such a program is impossible for python because it depends so much on how things are indented to start with.

    Yes, it's impossible in Python. And also unneccessary. The "indent" program solves a problem that doesn't exist in Python.

    --
    Quidnam Latine loqui modo coepi?
  40. Teaching a parent BASIC... by VlartBlart · · Score: 2, Funny

    When I had my CBM64 I really wanted my dad to join in the fun of me learning to program - he seemed quite interested but this is how the conversation went...

    ME: So, dad, we're going to print the phrase "Hello Dad" on the screen then print loads of them - it'll be fun
    DAD: OK
    ME: To print something we use the PRINT command so to print this phrase we type 10 PRINT "HELLO DAD" - 10 is the line number - like a number in an instruction book.
    DAD: OK - But why PRINT?
    ME: Errr, because that's the command...
    DAD: Hmmmm, OK
    ME: To print it loads we then type "20 GOTO 10", this means it will GOTO line 10 and print it again..
    DAD: Why GOTO
    ME: Errr, because that's the command...
    DAD: OK
    ME: now we can run it by typing RUN (Hello Dad scrolls up the screen)
    DAD: Why RUN?
    ME: Oh FUCK OFF - you're like a 3 year old!

    That was the end of my dad's programming.

    1. Re:Teaching a parent BASIC... by Opportunist · · Score: 1

      Basic isn't the language to ask why in. C is. :)

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  41. Re:Blocks by indentation by thenextstevejobs · · Score: 2, Insightful

    In fact, if you do this to C code, you can run it through "indent" and it will come out clearly indented for you. It sounds like such a program is impossible for python because it depends so much on how things are indented to start with.

    Yes, it's impossible in Python. And also unneccessary.

    Let's see how smart you are when you get someone's code that isn't so clean in the whitespace department, and won't run anymore once you've opened it and saved it...

    The whitespace requirement of Python sucks. I don't like programs whose behaviors are dictated by characters that I can't see and that aren't standard across editors.

    If you're so into white space, be a man and use Whitespace.

    I'm a fan of perl, Ruby, and bash when it comes to scripting.

    --
    Long live the BSD license
  42. Re:C is the only starting language by gv250 · · Score: 1

    I also remember my first days as a teenager using C, but this was in the days of Unix, before MS-DOS. Wonderful! Yes, my programs would constantly print the wrong answer, core dump, and (mysteriously to me) produce strange errors when run from "make". But I never overwrote system memory, and I never had to reboot the machine. (Good thing -- it would have annoyed the hell out of the other 40 people using it!) Don't blame C that DOS reboots -- blame DOS.

  43. Re:Blocks by indentation by digitig · · Score: 1

    Let's see how smart you are when you get someone's code that isn't so clean in the whitespace department, and won't run anymore once you've opened it and saved it...

    Can you give me a scenario in which this might actually happen? People pass Python code around all the time, and whitespace simply doesn't cause the problems you imagine.

    The whitespace requirement of Python sucks. I don't like programs whose behaviors are dictated by characters that I can't see and that aren't standard across editors.

    Except you can see them because oh, look, those lines are all indented and they wouldn't be without whitespace. So you don't like it? Fine. Don't use it. But don't try to pretend it has all sorts of problems that it doesn't, in order to rationalise your dislike.

    If you're so into white space, be a man and use Whitespace.

    I like honey, but I don't want to live on a diet of nothing else.

    I'm a fan of perl, Ruby, and bash when it comes to scripting.

    Liking Perl and Ruby seem to go together, because Ruby is essentially a tidied-up Perl. If you're not coming from a Perl background I don't see the point of Ruby. If Python whitespace is a problem for Python, punctuation marks with completely non-obvious meanings is a problem for Perl/Ruby. Oh, that and OS-tie-in: Programming Ruby states that "Ruby is written for POSIX environments", and despite attempts to fit it to Windows it remains a poor fit because it really is written around the OS. Although I have to admit that when I came to the line in Programming Ruby that said "Ruby, unlike less flexible languages, lets you alter the value of a constant" I found it hard to carry on with a straight face.

    --
    Quidnam Latine loqui modo coepi?
  44. Re:C is the only starting language by fermion · · Score: 1
    Fortunately I learned C on a real Unix machine. By the time I moved to MS Dos, I knew enough to compensate for the inadequate platform.

    The advantage of Python has nothing to do with OSS. C and C++ is at least as open source as Python, and both have a definitions superior to Python. In fact, many would use the same OSS IDE, Eclipse, for any of these, on any platform. No, the advantage of Python, as with the advantage of other higher level languages, is that, as the poster indicates, protects the user from the complications of the hardware. In addition, it simplifies the GUI design which is the basis of most modern programming. The disadvantage is that if a kid wants to know how to do more than connect widgets to databases, they may be SOL.

    Of course the same could be said about Ruby and Rails, which seems to be even more modern and useful for modern programming. In particular Ruby implements the MVC methods, so at least the kid learns good programming.

    --
    "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
  45. Re:C is the only starting language by Cillian · · Score: 2, Informative

    In DOS, without a memory manager, if you use pointers / arrays you have unrestricted access to every byte of RAM on the computer. Completely raw. Think about every time you get a segfault or a "Program performed an illegal operation" - that could easily be a dead system right there.

    --
    -- All your booze are belong to us.
  46. Re:Blocks by indentation by slashtivus · · Score: 1

    "...common to prohibit tab characters in code altogether."

    This seems rather backward to me. Who cares if it looks different on my computer vs. another persons computer? I'm happy, the other person's happy. I've never worked at any place that would out-right ban tabs.

    It sounds like someone simply has a holy-war going on there. I mean, seriously, why should it matter what another person is comfortable with? As long as each developer has the code in a format they are comfortable with (by setting tab widths), I would think that would result in an increase in productivity.

    Forcing people to learn every weird pet format and have to work their brain around another persons preference seems like it would waste time. Very strange behavior IMHO.

  47. Re:C is the only starting language by complete+loony · · Score: 1

    There were a bunch of programming students at a course I was attending who kept seeing the Borland copyright message.

    char c;
    printf("%s", c);

    --
    09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
  48. Re:Blocks by indentation by Obfuscant · · Score: 1

    <quote>It sounds like someone simply has a holy-war going on there. I mean, seriously, why should it matter what another person is comfortable with? As long as each developer has the code in a format they are comfortable with (by setting tab widths), I would think that would result in an increase in productivity.</quote>

    Well, it apparently does matter because some shops have programming standards that are enforced. Indent like this, put elses here, ifs there. All the code looks the same, and you don't have to deal with one section of code done one way and another done another.

    But to answer your "why", here's an example.

    /tabfor(i=0;i<5;i++) {
    /sp/tab/sp/sp/sp/spdoThat(i);
    /sp/sp/sp/sp/sp/sp/sp/spdoThis(i);
    /sp/sp/sp/sp}

    On my terminal, with tabs set to 4, looks like:
        for(i=0;i<5;i++) {
            doThat(i);
            doThis(i);
        }

    On yours, tabs set to 8:
            for(i=0;i<5;i++) {
                doThat(i);
            doThis(i);
        }

    It's still valid C, but looks awful. Nothing lines up. If this was python code, I'd see the two calls as being part of the for (if python has such a thing, I dunno), you'd see only the doThat call as part of the for. Two different interpretations of one piece of code BASED SOLELY ON TAB STOP SETTINGS IN THE EDITOR! That's absolutely nuts!

    (In many C shops, there would be a "standard" .indentrc, and if you wanted to see it in a different style, you'd have your own .indentrc you could run the code through before you worked on it. Then you'd convert it back and everyone would be happy. Python? No.)

  49. Educational Programming languages by jbolden · · Score: 3, Interesting

    If any parents are reading this, just wanted to mention I've (+other's help) written an article on wikipedia covering the educational programming language domain:

    http://en.wikipedia.org/wiki/Educational_programming_language

    1. Re:Educational Programming languages by Doctor+Faustus · · Score: 1

      The thing is, Python is based on ABC, which *was* designed mainly as an educational language.

      The only other choices that are halfway mainstream for any other purposes are VB.Net and Delphi (mainstream is debatable these days for Delphi), and the educational foundations are a long ways back for those. Besides, while I think Turbo Pascal was good choice for me at 17, Python's more casual approach strikes me as better for my 11 year old.

    2. Re:Educational Programming languages by jbolden · · Score: 1

      The debate on whether to include Python or not keeps going. Do you have a ref for the Python / ABC connection?

    3. Re:Educational Programming languages by Doctor+Faustus · · Score: 1

      I'd heard it before, but I know you can find it in Guido's forward to the book I'm using for my son, Python Programming: An Introduction to Computer Science, and he mentions it there.

      You can see it on page "ix" here:
      http://books.google.com/books?id=aJQILlLxRmAC&dq=Python+Programming:+An+Introduction+to+Computer+Science&printsec=frontcover&source=bn&hl=en&ei=mPJcSoK9E5LONdKQ-L8C&sa=X&oi=book_result&ct=result&resnum=4

  50. I suggest explosives by vaporland · · Score: 1

    do it yourself fireworks - always fun for the whole family!

    --
    Ask Me About... The 80's!
    1. Re:I suggest explosives by SomeoneGotMyNick · · Score: 1

      I prefer high powered lasers, but only to be used by the family member with any working eyes left.

    2. Re:I suggest explosives by vaporland · · Score: 1

      Thanks for that - just posted in my cubicle!

      --
      Ask Me About... The 80's!
  51. Re:C is the only starting language by Another,+completely · · Score: 1

    I once forgot to write an EOF to an open file on the hard drive, and bytes got corrupted in random files all over the place. We were finding single corrupted bytes for weeks, like when you smash a glass in the living room and never quite find all the bits. There were some good points about having so few abstraction layers between your code and the hardware, but a lack of memory protection was not one of them.

  52. Re:C is the only starting language by Opportunist · · Score: 1

    Start with C and a lack of want to understand will result.

    C is one of the worst languages to start with. What it teaches you is frustration because you can't even begin to understand just WHY your programs don't run. What it teaches you is bad coding practice because it WILL accept almost any harebrained spaghetticode you cram down its compiler. And once you got used to 'if (i=a%2)...' to test a for being odd or even and store that fact in i at the same time, so you can later just add/subtract i from something else, you are already lost. Not to mention the countless hours spent figuring out why 'if (i=5)' is always true even if i isn't 5, but oddly i is always 5 after the branch...

    Start in something that enforces some strict rules while at the same time offers enough training wheels to enable you to find your bugs. C is very powerful indeed, but finding bugs can be a daunting task for an inexperienced programmer. And I'm not even talking about obscure run time bugs (like, say, buffer overflows because you count from 1 instead of 0) or bugs that don't show in the line where the actual problem resides.

    Give your newbies a language that, while not powerful or fast, makes debugging easy. I have met a fair lot of programmers, and interesting how many of them lack in the debugging department. And don't say your programs have no bugs. That only means you never found them.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  53. I think a lot of the older geeks here can relate by Opportunist · · Score: 1

    My dad isn't a computer person either. His relationship with computers is best described as 'hostile'. But he realized his son has a knack for mathematics, has an analytical mind, loves logic puzzles and can think that way too, so a computer would be the perfect match. He was no rich man back then and computers were expensive toys, but he didn't question the wisdom of spending a thousand bucks on something he doesn't have the foggiest clue about because he was also sure that this is where the future will go.

    It's odd. On 99% of the things my dad decided would be 'good for me', he was wrong. I'm glad he didn't fail at that one.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  54. Beat me to the punch! by Bill+Kendrick · · Score: 1

    About 5 years ago, I was lamenting the apparent lack of programming books aimed at children. I posed the question "what would be a good modern language for kids to learn?" and almost every response I got was "Python." So this is perfect! Too bad I didn't get the chance to (1) learn Python, (2) write a book, (3) get it published. ;)

    1. Re:Beat me to the punch! by Bill+Kendrick · · Score: 1

      "a little caricature of Carter that is placed throughout the book"

      Man, just like "Atari BASIC: XL Edition" that I learned a ton of BASIC with as a kid. It had "Kilroy" (as in "... was here") throughout it.

      I vividly remember reading some of that book while on a trip to the department store with my mom. In fact, not only do I still HAVE that book (surprised? don't be... I was the "Atari vs Dell" guy on Slashdot the other day), it's on the shelf next to me, and just yesterday I happened to grab it when I responded to one of those dumb chainlettery things on Facebook ("grab the closest book, open page X, type sentence Y as your facebook status").

      This is starting to freak me out. ;)

  55. Why Python's whitespace use really is a problem by walterbyrd · · Score: 1

    If you have the luxury of only working with your own code, and if you stick to your own conventions, then the whitespace issue may not be a big deal.

    But, when I work with somebody else's code, I have to wonder: "what I am I looking at? Spaces? Tabs? Some combination of spaces and tabs?" I can not tell just by looking at the code, I have to do a hex dump, or something.

    Then, if I want to put somebody else's code into my own, I have to muck with the code first to make sure I have the exact combination of spaces and tabs.

    If I want to email Python code, or post Python code to a news-group, that is another potential headache.

    Being able to use curly brackets makes the situation even worse. If somebody else uses curly brackets, and I don't, then I have to muck with the code even more.

    I especially can not understand why Python 3.0 allows the use of spaces and tabs. Python 3.0 was supposed to fix long standing problems with Python. Even Guido has commented that indentations should be four spaces - so why not make that mandatory? Such a standard would go a long way towards mitigating the whitespace issue, and Python 3.0 is throwing away backwards compatibility anyway.

  56. Re:Very different from days of Compute! and Byte.. by Anonymous Coward · · Score: 0

    "it was a relatively simple matter to redefine a character set with a bunch of POKEs"

    A bunch? Hello... Understatement of the Month Club?

  57. XNA by SuiteSisterMary · · Score: 1

    I've been seriously considering using C++ and XNA to teach programming to my kids; sure, printing 'Hello World' is cool, but printing 'Hello world' on the Xbox is cooler.

    --
    Vintage computer games and RPG books available. Email me if you're interested.
  58. Re:C is the only starting language by jc42 · · Score: 1

    And don't say your programs have no bugs. That only means you never found them.

    One of my favorite examples of this is the fact that (as various people over the years have discovered), the original "Hello world!" program in the C bible has a subtle bug.

    It can be fun to challenge people to find it. My favorite clue to get them even more puzzled is to tell them that the bug doesn't affect the behavior of the "Hello world!" program itself; it affects the behavior of other nearby programs.

    --
    Those who do study history are doomed to stand helplessly by while everyone else repeats it.
  59. Re:Blocks by indentation by slashtivus · · Score: 1

    OK, thanks. I only work in C# the last few years, it handles all of this quite elegantly, but I do see your point now.

  60. days of old by Mortgage · · Score: 1

    Its funny I find myself reflecting upon how different things are these days, even looking back to the 70's and 80's. Technology advances so fast, which is good, I just think we sometimes get a little left behind. Guess that is what happens with old age!