Slashdot Mirror


Learn How to Program Using Any Web Browser

honestpuck writes "Harold Davis has started with a marvelous idea, teaching programming using a language available on all platforms, JavaScript, and an interface familiar to everyone, the web browser. Learn How to Program Using Any Web Browser is written for absolute beginners to learn the basic principles of programming -- or at least that's what the cover would have you believe." Read on for honestpuck's evaluation of that claim. Learn How to Program Using Any Web Browser author Harold Davis pages 396 publisher Apress rating 5 reviewer Tony Williams ISBN 1590591135 summary Not much programming, but well written

The language is suitably light and simple, the book well-structured and broken down into easily digested chunks. The order in which concepts are introduced is fairly traditional for a language tutorial: first we get types, variables and statements, before moving on to conditionals, loops, and functions, followed by arrays and objects before finishing with event-driven programming. Davis' decision to leave string handling till last seems a little perverse and personally I would have introduced functions earlier.

My real complaints about this book centre on the abstract nature of the discussion. There are very few real world examples that could be useful to anyone. The best you get is a version of "Rock, Paper, Scissors" in Chapter 3, and an 'auction' application. The book would have been improved dramatically if the end result of your study was a few things you could actually point to.

I also have a complaint about the target audience for this book. The web page for the book at the publishers states that "The target reader is likely a twelve- or thirteen-year-old, who is just starting to get curious about what makes a computer work -- or an office worker who has been using computer applications for years, and would like to spend some time delving deeper into what makes them tick." Most adults and even teenagers don't want to 'learn how to program' as much as they want to learn how to use a tool to perform a task. If your tool is JavaScript, then it's almost certain your task is related to building web pages, but this gets little real attention from Davis. For even younger students, this book totally lacks anything to hold their attention -- the lack of real-world examples hurts here.

I also take issue with the title: this book doesn't really teach 'programming' much at all. It certainly teaches you to write JavaScript, but where are the sections about the real lessons of programming, such as top-down vs. bottom-up design, or breaking a task up into chunks? Even debugging has little coverage -- a single thirty-page chapter, half of which is specific to JavaScript or the throwing and handling of exceptions. Since the work of Papert and others at MIT twenty-five years ago, we've learned a great deal about how to teach programming concepts in a simple manner, but Davis appears to have ignored all this and given us a language tutorial. The publisher's web page for the book says "very emphatically, this is not a book about programming JavaScript." If that's so then I'd argue that it isn't a book about learning the principles of programming either.

It is obvious from this book that Davis is an excellent writer; if he had tried to write a book to teach JavaScript and had focused on the tasks for which it is often used this, volume may have been superb. As it is, he has shot for a higher goal and fallen far too short.

If you would like to check it out for yourself, you can go to the web page for the book where there is sample chapter, the Table of Contents (though they call it a "Detailed TOC" as distinct from the 'Table of Contents,' which is just a list of 11 chapter titles) and index, all in PDF format.

I went looking for a book that I could give to my 11-year-old daughter now that she has become interested in "what Daddy does." I'm still looking, I'm certain that this one isn't it.

You can purchase Learn How to Program Using Any Web Browser from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

24 of 456 comments (clear)

  1. Why teach programmers, period by Anonymous Coward · · Score: 4, Interesting

    The last thing the world needs right now is more programmers. Teach them some other trade which won't be killed by cheap global labor.

  2. Strongly disagree by Anonymous Coward · · Score: 5, Interesting

    I think the reviewer's premise that 12-13 year old wants to learn programming for a specific task is bull. I think what the book is trying to speak to is how I learned to program: BASIC. I wasn't trying to DO anything specific it was just a good way to start playing around because it came free w/ the computer and you could make it beep or say hi or whatever. I think that posing javascript as a replacement (now that basic does not come packaged with the OS) is a GREAT idea. It's free, there is a developing environment built right in (well with mozilla at least) and it's actually fairly powerful while still beaing easy to learn.

    1. Re:Strongly disagree by Major_Small · · Score: 2, Interesting
      what's so bad about learning C++ as a first language?

      if you start with C++, you can stay casual and do console input/output/math, or you can go a little more into it and get into functions/pointers/casts... and if you wanted to keep going, C++ could take you as in depth as you could possibly want to go...

      I learned a little bit of VB first, and then went to C++... one thing that annoyed me about learning VB was that the instructor didn't tell us what all the code was actually doing... we just wrote what we wanted where the IDE told us to... and we had to deal with casting and pointers... I don't see how you could introduce programming without the two...

      The way I see it, C++ gives you a much better background in comp sci than some of the other languages, and IMO, a good understanding of computer science is more important than the language your writing using it with...

  3. Re:How about by Anonymous Coward · · Score: 1, Interesting

    none of which come standard w/ the computer or are particularly easy to set up if you know nothing. That was what was great about BASIC and is great about javascript. it's there. you don't have to install, configure, change your path, anything. all you have to do is go.

  4. Random issues I have with Javascript by dmuth · · Score: 4, Interesting

    I've done a fair bit of Javascript programming, I think it's an okay language. It certainly could be worse. But here are some random issues that I think may make it difficult for beginners to pick up:

    1) No print() or echo() function. If you want to write something to the equivilent of stdout, you need to use document.write(). And if you use alert() as you're debugging something, you'll quickly get tired of boxes that pop up, I know I have.

    2) Weird OOP syntax. If you want to create class foo, you first create function foo, then to create a method you go and create function foo.prototype.bar(). I think that's needlessly complicated. It also leaves the beginner open for a shock when they start studing OOP syntax of other languages, where a class is defined and its functions are actually defined INSIDE the class.

    3) No file/database support. Good luck trying to interact with a file or database from Javascript. As the user learns more about programming, they're going to want to use these sorts of things. Javascript just wasn't designed for that.

    Those are the biggest things off the top of my head on why I believe Javascript is not an ideal choice for beginners. (I don't claim to be a JS god, so if I'm wrong about any of the above, someone please correct me...)

    1. Re:Random issues I have with Javascript by dmuth · · Score: 3, Interesting

      >Use IE -- this stuff is very simple with included COM controls.

      I'm sure it does, but I'd like to point out that the title of this article is "Learn How to Program Using Any Web Browser" (emphasis mine). If you start using Microsoft-specific stuff that's in IE, any Javascript code you write cannot be ported over to other web browsers.

      The cynic in me says that this is exactly what Microsoft wants, of course. That would ensure that MSIE has the biggest market share.

  5. Best way to learn to program by Anonymous Coward · · Score: 1, Interesting

    Is an interactive interpreted language.
    You type, it answers.
    A shell, if you like.

    This should be possible with JavaScript, and it would be a cute thing.

    And yes, it should be possible to give this to a 12 year-old and see them learn to program.

    Once they understand what 'code' is, they can start to work with more complex tools.

    By the way, this has already been done, it's called BASIC.

  6. Re:Best way to learn by Quay42 · · Score: 5, Interesting

    As a sort of corrolary to this...you need to have something that you're trying to *do*. You really can't open up a reference book and just start to code, you really need a reason to do it. It's sort of like asking someone you know who can speak another language to "say something in German" or whatnot: they're left floundering. If, on the other hand, you ask them to "count to 10 in German" then it's a different story.

    Any new language or software engineering concept I've learned that has been from a book has only been because I had to learn the language for the task at hand or it's been brought to my attention that a particular design pattern (or what have you) may be appropriate. I personally can't just pick up a book on programming with a cup of coffee if I don't have a real reason to.

    Just some thoughts.

    --
    "Has anything you've done made your life better?" - American History X
  7. Rated a 5?!? by I8TheWorm · · Score: 2, Interesting

    My real complaints about this book centre on the abstract nature of the discussion

    I also have a complaint about the target audience for this book

    I also take issue with the title: this book doesn't really teach 'programming' much at all


    Yet the book review rates a 5? What gives? I would think a book with more than one "I have issue with" would rate a bit lower than "the best possible rating it could get."

    --
    Saying Android is a family of phones is akin to saying Linux is a family of PCs.
  8. First language by Mr_Silver · · Score: 4, Interesting
    Why not teach them VB?

    No seriously.

    It's easy, it's pretty, you get a grasp of functions and objects and you can do moderatly complex things pretty quickly which means that they'll get instant gratification.

    If you want to introduce them to programming, given them something that can make them go "wow!" pretty quickly. Thats what made those Spectrum BASIC books so good - within 10 minutes you had lots of pretty squares up on the screen.

    I'm sure a lot of people would shudder at the though and want their kids to start with C++ or Perl - but I think that it might do more damage than good. No one wants to be scared off by pointers or regular expressions.

    --
    Avantslash - View Slashdot cleanly on your mobile phone.
    1. Re:First language by TheTranceFan · · Score: 2, Interesting
      I see your point about pointers and regex's. But VB is not pretty. Further, it isn't typesafe (nor is JS) and the way you do GUI in VB encourages you to sort of put your code into your UI, "Hypercard" style, which is a bad idea on many levels.

      It's definitely a tough problem - C's got char*s everywhere to freak people out, Perl's just $funky =~ /ashell/, and JS and VB encourage all sorts of slapdash programming technique.

      Probably a more mature language like Java or C# might be better, even with fact that you force yourself to teach OOP and basic programming at the same time, and have to deal with the ponderously large class library. At least you don't have to reinvent strings.

      Hmmm...maybe I'll make $funky =~ /ashell/ my new sig...

  9. Teaching 12 or 13 year olds to program by miu · · Score: 4, Interesting

    I keep seeing those "Fighter Maker" and "RPG Maker" PS2 games on the shelves. Seems like that would be the thing to give a 12 or 13 year old to get them interested in programming and maybe learn some of it's basics.

    --

    [Set Cain on fire and steal his lute.]
  10. Re:Alternative reading? by Daemongar · · Score: 2, Interesting

    I'll second this - any better references out there for learning programming for non-programmers? I leared basic, cobol, and rpg inside and out 12 (it was required when I went to school! oy!) years ago but everytime I sit down to learn C++ or something I get flustered very quickly.

    The title sounded promising, but now it gets slammed. There must be something better.

  11. Re:HUH? by DrEldarion · · Score: 2, Interesting

    The problem with VB is that it makes everything too easy! You want to make a web browsing window in your application? Just drag the window, add a couple buttons, do one line of code for each button to make them do forward, back, reload, etc. Want to interface with a database? Just select which one you want to use and VB does the rest.

    Once people get used to VB doing everything for them, they don't want to switch over to a more complicated language.

  12. Try Python by Anonymous Coward · · Score: 4, Interesting

    I highly recommend "How to Think Like a Computer Scientist: Learning with Python." It's a great introduction to programming using a language that doesn't get in the way. Python is also a great language for starting procedurally and "graduating" to OO. Besides being a great book, it's available for free in LaTeX, PDF, PostScript, and HTML. Needless to say, both the language and the book are available "using any web browser." As for JavaScript, I have tried to keep it at arm's length for as long as possible.

  13. First language by DarkSarin · · Score: 2, Interesting

    Although it has many of the limitations that something like JS or JavaScript has, I personally think that PHP is a great first language. It does require an installation of the language (unlike JS), but I think that it has better syntax.

    I am also far from being a pro, and much of my code really stinks in terms of readability (I am working on it), but speaking from the perspective of someone who had a really rough time with my one programming (we used C) class, I think PHP is better than Javascript for a first language.

    --
    "We don't know what we are doing, but we are doing it very carefully,..." Wherry, R.J. Personnel Psychology (1995)
  14. Re:Best way to learn by FictionPimp · · Score: 2, Interesting

    This is exactly the problem I have. I spend a lot of time reading books on programming. I have a good background in a lot of languages, but the problem i'm having is I lack projects to work on. Sure i get little webpage script requests from friends, or a regex for some text file parsing, or maybe even a small app to do something mildly amusing. But I lack real world projects to perfect my skills on. My last job had a lot of projects, i worked on our software, on our reports, and on our support center tracking software (which i had to write by hand), but now that i'm diving into assembly and trying to get better at c and c++ i'm finding myself at a loss of what to do. What I would like to see is a book that tests you with challeges for the learning programer, then a chapter going over how the author would of solved this problem and why, with a CD containing all the source material to approch the problem, and possibly the solution program. Anyone know of something like this out there?

  15. Re:Java? by G.+W.+Bush+Junior · · Score: 3, Interesting

    desire is not the issue. If you know how easy it is to run people over, you would realize that by teaching driving to anyone even vaguely interested in it, we are harming our own community. Driving is a dangerous skill and should only be used by people mature enough to use it responsibly. The best way to make sure they are mature enough is to make learning hard enough that all of those irresponsible drivers will run off to download pr0n instead of learning to drive.

    I could go on... but I think my point is clear :)

    --
    "I don't know that Atheists should be considered as citizens, nor should they be considered patriots." -George H.W. Bush
  16. Re:Java? by Negatyfus · · Score: 3, Interesting

    They already do this with driving, or at least they try to. It doesn't work, apparantly, if you take a look at traffic.

    Grandparent has it wrong, of course. Even if the clueless teenagers don't know how to program, there will always be competent programmers developing tools to create malicious software for them, as there has been from the beginning. And these script kiddies will gobble it up like a badly written VisualBasic virus.

  17. Re:HUH? by pierpa · · Score: 2, Interesting

    vb is not a language, as delphi is not a language, as asm8086 is not a language. even java can hardly be called a language. they are "working environments". their only purpose to live is within their environment. it is difficult to say where the environment begins and where the languange ends. they work on the basis that there is a certain environment around them. a language exists and "works" also on paper, without a computer elaborating it. yes, fortran and c require "files", and sql requires "tables". java can require a "bitmapped i/o" and a "sound i/o". for java u can have many compilers (actually, many virtual machines, more or less optimized) for many platforms, so it can be said that it is a language that can be implemented on many digital machines. but vb is a programming environment that only works within a perfect copy of the machine crafted to make it work. it requires certain events, certain windows, certain operating system structures. if vb is a language, then also a wordprocessor file is a language. maybe it is more portable too! anyway, vb is dead now and we should be talking about .net

  18. The big advantage of Javascript is... by mykepredko · · Score: 3, Interesting

    that it is free and the license built into the browser allows for development work. There aren't an awful lot of other programming languages/development that can boast this.

    Having Javascript already available in the browsers is an advantage because a very great majority of computer tech teachers that I have met have troubles with even understanding the concept of directories and paths, let alone have a snowball's chance in hell of installing something like gcc under Cygwin.

    Going off on a personal rant, I would like to see teachers be a lot more scrupulous with respect to licensing software. How seriously is a kid going to take the classroom instruction on not sharing other people's IP when the teacher tells them to download VB, QBASIC or some other clearly copywritten tool into their PCs?

    As an added bonus, Javascript is not terrible to program in and you can come up with some good simple client side games. How about Pong, Tic-Tac-Toe, Minefield, Battleship, etc.?

    I think that using Javascript for teaching programming is a step in the right direction, but it sounds like this book could have done a better job in making it compelling for kids.

    myke

  19. Re:Java? by wwest4 · · Score: 2, Interesting

    I don't need the NYT to tell me how easy it is to write a virus.

    There are philosophical reasons why I think your logic is flawed, but I'll stick to the practical considerations.

    1) assuming obfuscation of the trade reduces viruses, what other effects could it have?

    2) what does the reduction in high-profile exploits do to the state of security, both disclosure and patching? will it make big software companies more or less proactive? will more furtive exploits become easier and more common?

    3) is MYDOOM really the work of a script kiddie? (i honestly don't know - it seems to me to be a work beyond the grasp of those whom i would label a script kiddie - those with no particular genius and/or no formal software engineering training).

  20. A Great Language to learn on by 5+Second+Rule · · Score: 2, Interesting

    I think the Processing tool/language/environment developed by Casey Reas and Ben Fry at MIT is a great place for young people to learn. Its based on Java syntax, but has a very fast and powerful graphics API that lends itself to quickly creating visual sketches in code. Its completely free, has its own environment and compiler that is simple and easy to get started with. The website has plenty of clearly commented examples teaching concepts step by step, a nice reference page with many illustrations of the core functions and control structures of Processing, and a very helpful message board community. Most people creating in Processing share their source code, so if you see something cool you wanna try out yourself (and there is a lot of really cool work featured on the site), its just a matter of reading through the code.

    So if you are a more visually inclined novice programmer like myself, in my experience, playing around in Processing can be immensely insightful and rewarding. And a lot of fun.

  21. Re:Java? by adamjaskie · · Score: 2, Interesting

    Or at the VERY least, the ability to CHECK THE OIL REGULARLY, check the TIRE PRESSURE now and then, change their own oil, jump-start a car, and change a flat tire. Those are basic skills that should be required to know to get a liscence.

    --
    /usr/games/fortune