Tuesday, February 26, 2008

IE8

OK, so I missed the initial IE8 furore, have now caught-up with a few views and here's my tuppence:

  • A proprietary <meta> tag to say "Use IE6/7/8/… rendering mode" is an olive branch to the web design community (it says "Hey, you don't have to redo the IE7-compatible layout right now but please do-so later, when you have time.")
  • The IE7 default layout says "We're about to push IE7 through Windows Update to everyone and we know you've invested time/money/effort into getting those old IE6 sites working in IE7" now:
    Optimistic head?
    "We'd like to keep updating IE8 and beyond but just so's you don't have to everytime we do, get it working in IE7 and we'll guarantee that IE>7 won't break the site (unlike last time.)"
    Pessimistic head?
    "We'll pre-announce IE8 to make it look like we're committed now and in the future to improving IE's web standards support but by telling everyone that IE7 will be the future default we can happily let IE8+ languish if it looks like there's insufficient ROI to continue developing IE."

I'm happy to be optimistic and believe the IE development team guys will be allowed and willing to continue their efforts towards moving-target-standards-compliance, I just wouldn't be surprised if in the not-too-distant future IEx once again was left to moulder.

Tuesday, February 12, 2008

Head First JavaScript (O'Reilly)

Couldn't say it better than Web Teacher so I won't bother: Head First JavaScript by Michael Morrison (O’Reilly, 2008) may not ring up five stars for everyone, but I like the Head First books so much so that it'll be going on my "strongly recommended" (short) list of core texts for "Web Technologies" next year.

Thursday, January 17, 2008

Hallelujah

I'm totally with this RYS post:

Not all students act horribly...and it's those students I worry most about. When Paula Plagiarist gets a C because she whined to a faculty-hating administrator about her F, what does that do to Marvin Mediocre who actually earned his C by performing with a basic level of competency? When Big-Mouth Barry bombs a class, bitches his way through a grade grievance and is awarded a C just to go away, what does that do to Sally the C-Student, who had some health problems and earned a C because she came to the final exam with a sinus infection?

I love (platonically, you understand!) the student that works and deserves the grade they get, even if they're not the most academically gifted (there's a real thrill in working with the student who suddenly "gets it" after some hard graft). I do my damnedest, & consider it my job, to make sure that they all get the grade they deserve, including
  • Whining William and his endless set of excuses,
  • Cheating Charlene and her group of plagiarists who paid "some bloke off the internet" to do their project,
  • Loophole Larry who thinks that exerting effort getting around the regulations is academically-equivalent to doing the work,
  • Mike the Muppet whose idea of catching-up after a prolonged (genuine, mit. circ. style) absence is to copy a pile of work off the internet etc.
If you're not one of these (or those listed on RYS) then make sure you take advantage of the opportunities we try to provide -- I hope I'll never turn away a deserving student (not permanently, anyway: we are all busy people, after all...)

Bare-faced cheek

Today was final assessment day for this year's Web Technologies module: A Questionmark Perception test and short JavaScript assignment. Sadly the start to the test malfunctioned and I was forced to remove the Blackboard setting that restricted students to one attempt at the test. Happily Perception gives easy access to all attempts by every student (something Blackboard does not, easily anyway); unhappily, in hindsight, I should have restricted them to a few attempts rather than unlimited...

Amusingly, one student assumed I wouldn't check and he used this lapse to attempt the assessment over-and-over until his time ran out, utilising the fact that the assessment showed the marks to gain an unfair advantage. Happily I did check and so we'll be enacting the relevant part of the "Cheating in Assessment" regulations on his behalf. What a waste of time!!

And the bare faced cheek? He had the chutzpah to complain at the end of the test (before I'd discovered his perfidy) that he'd arrived late & unfairly lost time. This fell on my unsympathetic ears -- no good excuse => no extra time. Tough monkeys! But cheeky, nonetheless...

Wednesday, December 05, 2007

JavaScript tips

You know how occasionally you read a tip and have a "wow" or "lighbulb" moment? Well, this collection of seven JS techniques from Dustin Diaz contained six such events for me (seriously: I read them over several days and had a "ding!" moment from all six code tips -- nice!)

Wednesday, November 28, 2007

Possum Death Spree!

Sick but funny! Get ready for Possum Death Spree! ... I particularly liked the they've been frozen in the permafrost ... now global warming has set them free and:
Dying cop:
They killed the dinosaurs?
Handcuffed scientist-guy
No, they killed half the dinosaurs; they made the other half watch!

Wednesday, November 21, 2007

@media AJAX 07 final thoughts

It was a great conference, with a good mix between "techy" and some "designy" stuff from some really world-leading presenters. Well done Patrick :-) If I can get the funding I'll be back for @media 2008.

(& my reason for the over-long, verbose summaries of the talks was to give some flavour of the conference to my students.)

@mediaAjax day 2.6: Wrap-up discussion panel

The final session of @mediAjax was a discussion panel, starring Brendan Eich [BE], Stuart Langridge [SL], Alex Russell [AR] and Douglas Crockford [DC], ably chaired by Jeremy Keith (so Patrick & Jeremy made up, which is nice) and it ran with JK posing questions submitted by the audience and moderating the discussion:

Mobile & JS:
[Nobody mentioned Cameron Moll-style mobile user-centred design.]
Not much impact other than [BE] report from Opera regarding eBay, use of eval for self-modifying code and its impact on battery life.
Libraries:
No consensus other than [SL] use what works with you/your team and use libraries to level the DOM playing field.
WCAG2 & JS?
Dojo and ARIA are interim measures.
Standardise libraries?
Not necessary but combine forces for a common voice.
Can JS ever be secure?
[DC] No, we need a secure dialect, but there are things we can do to help.
[BE] Things like mashups are the killer problem & there is no silver bullet.
[AR] Google Gears, "trust domain", Open Ajax Alliance.
[BE] Gears' "worker pools" excellent & might end up in Firefox.
[AR] Must remember that in life risks are mitigated not solved, only Internet gives the false impression that it’s 100% solvable. (Mentioned "Capability Models"? see "Confused deputy" by Norm Hardy.)
JS2 = Java?
[BE] No, JS2 class is for integrity not Java-like object model. JS2 is not fixed & they’d welcome feedback but class & receive/dispatch methods are needed.
[DC] Standpoint is don’t add syntax.
[AR] All of the toolkits do this stuff so JS2 should follow if it’s needed.
Is proprietary a hindrance? (Silverlight, Air, Flash, Gears?)
[AR] If the text on the wire is lost, lots of collateral benefits will be go (spidering etc.)
[BE] Tension! Proprietary gives better control but Open Source encourages competition, both benefits.

To be honest, the discussion panel was a bit disappointing and JK rounded it up with a bland "we've made progress from the WASP DOM Task Force days", but it was a tough conference to sum-up and there were obvious tensions between the panel-members.

I guess they needed my special question so it was a shame I'd not gotten around to asking it! Here it is: What skills do employers of web developers want in graduates? What should educational institutions teach for workers in the modern web? Comments welcome...

@mediaAjax day 2.5: JavaScript: The Good Parts

Douglas Crockford's title and opening remarks were complimentary to JS, emphasising that there are very good parts to the language, as evidenced by the range of users, from computer science graduates to cut'n'paste coders. JavaScript is succeeding in an environment where Java failed.

Good things include prototype inheritance, 1st class functions (lambda) and loose typing. Closures work because of lambdas and garbage collection and is the best thing in programming languages.

Bad things are:

  • globals (particularly user-defined and overwritable)
  • semicolon insertion
  • typeof object==typeof array==typeof null!
  • with/eval use of eval is a cry for help
  • phony arrays (performance)
  • type coercion (==)
  • too many negatives (null, undefined, false, NaN) why? E.g. object[name]==null is commonly used but gives false +ve with 0, null, '' property values – must use object[name]===undefined.
  • C heritage, optional braces + permitted empty statements.
  • Use of IEEE floats whereby 0.1+0.2 !== 0.3
  • Dense constructions like ++ and –-
  • Switch/case fall-through
  • new – forget it and assignments overwrite the constructor

These are mainly things that can have disastrous consequences from minor typos but oftentimes seem useful.

Advocated JSLint.com and the professional subset of JS that it permits but warned JSLint will hurt your feelings and unlearning is hard.

Style isn’t subjective, e.g.
return { ok: true } vs
return { ok :true }
;-insertion means the second returns null, ok is a label and produces no syntax error and the braces wrap an empty statement that does nothing but is permitted…

Douglas’ perspective is to make JS more like JS should be. Deprecate the worst features, don't break the syntax, keep it simple, keep it safe (a subtle LOTR reference ;-). Add JSON.stringify, JSON.parse, safe/restricted eval, add a "don’t enumerate" flag to objects, no experimental features (hard to remove), no radical changes & no new syntax. More languages: two small languages are better then one large language.

More security but that would break current JS syntax. JSLint "ad safe" mode c.f. Google Caja (Caja allows this; JSLint does not.)

(This is a long post as lots of it was using notation I'm familiar with, hence my notes were legible and concise, but personally I'm with the JS2 pack: I teach students who learn Java first so if I can use Java-like syntax, so much the better, but DC's arguments are worth paying attention to.)