This is as days pass by, by Stuart Langridge

And this is JavaScript meetup, written , and concerning JavaScript and the DOM, Conferences

Yesterday, as previously mentioned, lots of people met up to talk about JavaScript. I got to meet ppk and Dean Edwards for the first time, which was great. And we talked about things. The original idea was to talk about some fairly heavy technical stuff like what to do about the onload handler, but after Jeremy’s presentation at @media 2005 it became clear that we need less effort going into solving minor technical minutiae and lots more effort going into PR for JavaScript.

You see, developers out there seem to fall into the following categories:

  1. People who already know about the power of the DOM and unobtrusive scripting. A good proportion of whom were in the pub yesterday talking about this.
  2. People who have bought into web standards, are using tableless design with CSS, don’t really know about JavaScript, but want to know more. This is a large proportion, we think, of current CSS hackers.
  3. People who used JavaScript a while ago and have since dismissed it because it was a pointless language that let you do image rollovers and make websites that depended on it.
  4. People who haven’t bought into the web standards deal at all.

Clearly we can’t target everyone at once, and the consensus was that the people to target are category 2, experienced CSS hackers. The advantage here is that they are already using clean markup and modern techniques; since DOM scripting pretty much requires this approach, we don’t have to sell these people on the benefits of web standards, because they’re already doing it.

The major flaw, it seems, is that if you’re not a programmer then JavaScript is a bit difficult to get to grips with, and CSS designers are, in the main, not programmers. For people like me, it’s easy to gloss over the basics: what a variable is, what an array is, what an object is, what a function is. You see, all the power and elegance in JavaScript, the thing that makes it really great for putting together DOM applications, is that objects and functions and arrays are all the same thing. When you realise this then a whole vista of power opens before you; if you get this and how the DOM works then everything else that’s doable, all the cool scripts and techniques, becomes obvious. Pretty much, anyway.

So, what we need is things that explain how the basics work. The issue with that, though, which Dean Edwards pointed out, is that you’re not trying to teach people JavaScript, you’re trying to teach them programming. And that’s not all that easy. If you write a guide to what variables and functions and objects and arrays are then no-one will read it because that stuff is very, very, very boring. The approach we kicked around was to carry on writing demonstrations of cool techniques, but, when doing that, throw in a bit of a “basics” explanation on one point. So, next time you write a reusable library to make tooltips appear or something, in the explanation don’t just say “and we build a list of all the tooltips”: explain what a list is and how it works. Don’t try and explain everything from first principles, just one thing. And over time, people can pick up cool reusable techniques, which everyone likes, and learn about one important building block at the same time. Look for articles along these lines from various people.

The WaSP are also going to hopefully get on board; there were four WaSPs at the meeting, which helps (Chris Kaminski being one I hadn’t met before), and they have a lot of mindshare in the community, which should help.

The brave new future we’ve talked about is coming. It’s time to show everyone else how they can be part of it.

Comments

Gary Fleming

Seems like a sensible approach to take for the purposes of Javascript but, in general, the only way to get someone who is a good programmer (and by that I mean someone who doesn’t fudge together code, who understands the power and nuance of the language and who builds sturdy, reusable code) is to teach them to program. You can’t skip over first principles. If they aren’t willing to take a little time (and it does only take a little time to do the basics), will they ever be good programmers?

More pertinently, will they ever be good enough programmers to use Javascript correctly? I’m a fairly competent programmer and I want to do the right thing whenever I use JS (admittedly rare) but I’m not convinced I have the knowledge to do so. Resources for doing it properly in generic, reusable and sensible ways are thin on the ground; your book not withstanding.

sil

Gary: I see your argument, but I fear it doesn’t work like that; while I agree that it’s not that hard to pick up the basics, people are notoriously bad at doing a bit of work now to save themselves a lot of work later. This is not a problem peculiar to learning JavaScript. :)
I am also a bit wary of oversimplifying the idea of picking up what an object or array or variable is; I found it easy, but I’ve got the right sort of mind for it, and that’s why I’m a coder.
My book doesn’t really treat this sort of thing; it blithely assumes that you understand at least the basics. Jeremy Keith’s book which is coming out soon will do, though, we hope.

Chris Heilmann

var round=new pint()
Yep, it was great fun doing the meeting and the discussions. I left before we did the onload stuff as I couldn’t wait for ppk to finish his pub grub :-)

I started with the idea I had for weeding out old tutorials, let’s see what the initial responses will be:
http://www.wait-till-i.com/index.php?p=98

And, yes, you can always stay at my place should we do another meeting like this one. I hope the missus is OK with it. You are not into ginger anyway, right?

Ian Bicking

Well, I fall into number 3, so of course I think that group is obviously the most important. But, besides self-interest, that’s also the group that has more potential, because if you convert them then they can convert more people, and so on.

If someone doesn’t know what variables or lists are, then they can convert other people and serve as a good example, but they are severely limited in doing so. And they don’t increase the availability of reusable code (or even reusable knowledge).

There’s a lot of programmers out there who are newly interested in Javascript after being discouraged with previous experiences. Things have changed some, but the underlying language still holds a lot of potential to discourage people. There’s a subset of things you Can do in Javascript that makes up the set of things you Should do in Javascript, and figuring out that subset is a hard-won skill when you are on your own. It’s easier now than it used to be, but still not easy.

To see a case of blind- leading- the- blind in Javascript, you might look at this thread—full of programmers who are interested in Javascript, but don’t know what to do with that interest.

As far as making Javascript accessible to non- programmers, I think the key is robust libraries and graceful failure. Up front descriptions don’t work well, because no one wants to read them, but suggestive error messages and attention to misuse (again with correction- suggesting error messages) makes for a much more pleasant experience.

Tony B

I’m a category two kind of guy. Last year I read Zeldman’s book. So I have been hitting css pretty hard. I thought JavaScript was pretty much dead until recently I picked up on some stuff on ALA, and cottoned on to what you guys are doing.

The big problem for me is I am not a programmer. I have never had any training in programming. Well, actually a little but in VB, which I then never used. I do have quite a logical mind and can pick things up though. I reckon I could get a handle on it if I was just left alone for a few weeks with a computer and a good book that tells you how to program. I’m glad you said that about Jeremy Keith’s book, I have pre-ordered it from Amazon.

mrben

I’m a 2/3 mix – I used Javascript a while ago (I even built a really horrible 3-page booking system entirely in Javascript…..) but haven’t for ages, preferring to move to PHP. Now I’m looking again at Javascript, having bought into the whole Ajax thing, and the concept of the interaction layer. Long way to go, and it’s difficult to know where to start….

Tom

I am only a hobby coder but I must admit to being confused by trying to do the Right Thing. I was getting the impression that JavaScript was something to avoid, then it suddenly came back in; I took a similar step with XHTML which I am now going to stick with as it really doesn’t matter but the rigour is useful.

What I find particularly difficult now is reference documentation. I know that Netscape used to have The manuals, but they seem not to work or to go out of date, or to pretend that the DOM doesn’t exist. A decent and stable online manual together with more friendly, practical documentation along the lines of other major programming languages which didn’t pretend that JavaScript has nothing necessarily to do with Web programming, would be very useful for new people and amateurs like me. The problem is having something authoritative to trump the many dodgy how-to sites.

Dean Edwards

It was very good to meet you on Saturday Stuart. :-)


My three pennys: You can lead a horse to water but you can’t make it drink. We might get the CSS guys interested in the effects of DOM Scripting but getting them interested in progamming is another matter. Some will take to it like a duck to water but the rest …

Jim

I think the key is robust libraries and graceful failure.


I’ve never been a fan of Javascript libraries. Perhaps for intranet applications they make sense, but you still need to watch the download speed when building websites, and general-purpose libraries usually contain a lot of code you don’t need. That’s also a problem because it makes the code more complex for beginners to alter.



The one off scripts you can include like the ones for making cite attributes proper links for blockquotes are more suitable for introductions. They are small enough both for download time and simplicity for beginners. They aren’t full-blown libraries, perhaps “generic Javascript” is a better name for them?

Robert’s talk » Rise, Lord JavaScript

[...] JavaScript meetup by Stuart Langridge [...]

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.