4 ms·
Let's make a "type the code listings" book for kids.
- bphogan 17y agoI'm hoping to get lots of people interested in helping out. I think this could be a lot of fun and a great way to show how fun programming could be. I enjoy teaching my daughter how to write little games, and I imagine others do too. I miss these old books and I think we should bring them back.
- ErrantX 17y agoGreat idea; I can contribute some Python if that's any use. What's your plan r.e. organizing chapters? By language or by example?
- bphogan 17y agoI was planning to work up a structure once I saw what we ended up with. I'll take whatever we can get for languages. If we end up with a bunch of ruby and a bunch of python, maybe we see if we can get one example of each. Or maybe we just split the book into parts.
- eru 17y agoI might add some Haskell.
- bphogan 17y agoI think that'd be neat. And even neater if you could explain why you chose Haskell for your example over other languages. One advantage of us doing this as a multilanguage book is we get to show how different languages solve different problems. One disadvantage of that is it's a lot to absorb.
- deleted 17y ago[deleted]
- Nealman 17y agoI'm 32, does that count as a kid?
- jaschoolcraft 17y agoI know there are a bunch of books like this (by a bunch like 4), but saw this one yesterday: http://msdn.microsoft.com/en-us/beginner/bb308756.aspx http://msdn.microsoft.com/en-us/beginner/bb308756.aspx Languages aside, it's worth checking out how other people teach kids. I remember typing in hundreds of lines of poorly visible code in the backs of magazines for the c64 probably 25 years ago. Sounds great though.
- confuzatron 17y agoI will always regret having typed in pages and pages of DATA to end up with a really rubbish side-scroller. Let's not inflict this on another generation :)
- jacquesm 17y agoI used to read hex-dumps over the phone with my buddy, complete with checksum in the 'pre-affordable-modem' days. DATA statements aside, typing in reams of code from hard copy certainly ingrained the ability to predict what the code did long before finishing the typing in, and I'm sure that is something that comes in handy even today when scanning other peoples' code. I think it is harder today to get started programming than it ever was in the past, the 'bar for entry' is no longer some crappy little game you can write in three days but some three-d studio produced glitzy epic adventure. No way 'block shoots block' is going to live up to that, even if you did write all of it yourself, and the 'enterprise' being the red block isn't much of a winner either. Computers are no longer 'knowable', and this is another matter that needs addressing if we really want to lower the bar for understanding what goes on under the hood.
- bphogan 17y agoBLock shoots block is just fine for a 4th grader - at least it is for my kid. And I think computers are knowable. Some languages are not, but others are. Ruby has a REPL that's very good as a teaching tool. I've had a lot of luck teaching with that. C++ on the other hand, or even Java, not so much. I know it's harder than it was, but we could change that as long as we don't decide to fail by defeating ourselves.
- j2fly 17y agoSounds like a great idea. A free rubyproblems.com for kids so to speak.
- stcredzero 17y agoWhy not an environment where you're just a click or two away from browsing (editing, changing, and running) the source code of everything? http://www.squeak.org http://www.squeak.org Edit: To encourage kids to tweak and program, make the source easy to get to and a breeze to modify. Forcing them to type The whole program to do this strikes me as a bit indirect. We did it in the early 80's because we had to. Often, there was no other way to get your hands on that particular program. Today's environment is vastly different.
- bphogan 17y agoNothing wrong with that, and it could be a valuable project. With a book, we have more options. We have the code, we can send it out as a web page, we could have it printed as a textbook, we could even build some kind of interactive system to run it. But first we need the code. Then we can figure out what to do with it :)
- stcredzero 17y agoI think you missed the point. Squeak is an environment where the source code of everything is just a few clicks away. Everything is easily tweakable by design. I think that's even more accessible and tweakable than a system where the source code is 100's of keypresses away.
- bphogan 17y agoI think looking at source code is passive. Having to type it in is not. There's something... different about typing it in, learning by doing. We all spend our days copying and pasting. What was neat about the code books was that you couldn't cheat. Typing each keypress to understand how a loop worked was very helpful. The reward for all of that was that you could play the game. That's why they're not supposed to be long, or overly complex in the beginning. Of course, everyone learns differently. I could certainly be way off base. But I bet most people who actually did those code listings would agree that there's a certain value there that's very hard to reproduce with view source and cut+paste.
- synnik 17y agoMy brother-in-law started something along these lines a while back: http://cymonsgames.com/ http://cymonsgames.com/
- stcredzero 17y agoActually, that's precisely what this is for Python: http://inventwithpython.com/chapters/ http://inventwithpython.com/chapters/ The programs in this book are actually modeled after such projects from magazines and books from the early 80's.
- benofsky 17y agoI personally love Ruby but as a beginner language, I have found people find it a lot harder to understand than say Python, C or Basic. Ruby has a lot of what looks like "magic" syntax to an unfamiliar user. I would probably go with a different language. Otherwise, very cool idea.
- bphogan 17y agoWe Rubyists tend to put on the wizards hat and wave the wand around. But Ruby can be procedural too, and a lot of times can look a bit like Basic. I like Chris Pine's book "Learn To Program" because it uses Ruby very simply to teach introductory programming. I have much respect for Python, but don't know it well enough yet to be comfortable. Would kids be frustrated by the whitespace / indenting?
- benofsky 17y agoYeah, that's a good point the whitespace thing would be very frustrating. I guess Ruby could definitely be written in an easy to understand way as long as it's kept to a strict definition of what should/shouldn't be used.
- eru 17y agoWhy should the whitespace be frustrating? It was never an issue for me, or anyone I know who gave it a try. The IDE that comes with Python (IDLE) is good enough to help you with the whitespace. And even in MS Notepad it should be fine. Closing parens without editor support is much more frustrating.
- dagw 17y agoThe only real time whitespace can get frustrating is if you happen to mix tabs and spaces in the same file. Unfortunately this is quite an easy mistake to make (depending on how your editor is set up) if you're new to programming and don't yet understand the difference between a bunch of whitespace character and a single tab character.