Elsewhere monthlies
This is the monthly archive for April 2007.
27 April 2007
For once I disagree with Douglas Crockford: fall-throughs in switch
statements are extremely useful. He doesn't actually deny that, but states that they can lead to complicated bugs; a statement that would have been stronger for some proof.
Take this simple function from Form Validation. It uses a fall-through because the types text, textarea and select-one should be treated the same:
function isRequired(formField) {
switch (formField.type) {
case 'text':
case 'textarea':
case 'select-one':
if (formField.value)
return true;
return false;
case 'radio':
var radios = formField.form[formField.name];
for (var i=0;i<radios.length;i++) {
if (radios[i].checked) return true;
}
return false;
case 'checkbox':
return formField.checked;
}
}
My question is: what's wrong with this function? Which errors could occur? The only thing I can think of is the occurrence of an as-yet unknown type
.
I'd love some clarification on why this is bad coding practice. I don't see the problem, but I don't want to doubt Douglas' word, either.
Core
| Permalink
Zeldman rocks!
Question: If web design makes the new information age possible—if it creates new markets and new products, generates significant global cash flow, changes the way companies and non-profits interact with the public, and employs untold legions of specialists—why, until now, hasn’t anybody tried to find out more about it as an industry?
Hypothesis: No one has tried to measure web design because web design has been a hidden profession.
He follows up with a few examples. Zeldman is definitely on to something, and I hope he'll continue his investigations. I might even do the same thing on a smaller scale here in Holland, if certain plans I have work out.
Business, Professionalism
| Permalink
Jeremy on the JS library panel at Web 2.0 Expo. I agree with the idea of the gliding scale from libraries meant to make websites to libraries meant to build applications. Needless to say I'll give the latter a wide berth, and I STRONGLY disagree with the idea of using Java to write JavaScript. If you want to write JavaScript, learn JavaScript.
Libraries
| Permalink
Paul Boag continues to describe the client's jobs during a website creation project.
Business
| Permalink
Jeremy shares his thoughts about the Web 2.0 Expo. Interesting geekiness at the fringes, but corporate bullshit in the keynotes. Besides, it's HUGE, probably too huge for my taste.
Conferences
| Permalink
Roger is forced to work on some table-based layouts, and discovers table-layout: fixed
. His report states it works pretty well in all browsers. When I tested it years ago, support was not nearly as god.
CSS
| Permalink
24 April 2007
Eric is still working on his reset styles, but is stuck on Explorer not supporting inherit
. What he'd really like is
CSS, IE
| Permalink
Dustin Diaz shares a few important tricks. His addListener
elegantly solves the problem of the missing this
keyword in Microsoft's attachEvent
, and his tip to include a method in getElementsBySomething
is worthwhile, too.
Core
| Permalink
Paul Boag on the role of the website owner in the production process. My position used to be "Clients are a necessry evil", but I'm slowly coming around to Paul's point of view of the site owner as an indispensable team member. Now we just have to make sure they understand their role and play it to the hilt.
Business
| Permalink
Anil Dash has gathered some useful links about Google's new Web History thing. Personally I don't like it for beans and I will definitely NOT allow Google to store my surfing data. Too Big Brotherish for my tastes.
Linkdumps, Society
| Permalink
ALA presents the web design survey, meant to increase understanding of the position of web developers, especially those who are not white and male. Please take the survey, I already did so.
Surveys
| Permalink
21 April 2007
Chris has a simple solution for creating connected select boxes in an unobtrusive way: use optgroup
. Interesting thought.
DOM
| Permalink
Tantek introduces POSH, Plain Old Semantic HTML, because he feels that it's being ignored in favour of microformats. Of course microformats are based on semantic HTML, so you have to understand the underpinnings first before venturing off into microformat-land.
Microformats
| Permalink
Happy Cog commissioned a fact-finding research about women in the IT. Preliminary conclusions:
- Men outnumber women in this workforce by over three to one.
- The percentage of women employed in the field is declining instead of growing.
- Women who participate in the field may not be promoted as often or as high as their male colleagues.
Note that this is about the entire IT industry. Unfortunately it was not possible to study the web design/development industry in detail. Based on my own, thoroughly non-scientific and non-representative observations in the past nine years, I venture to suggest that woman participation in the Web is slightly (though not much) higher than in IT in general, but that women are concentrated in interaction design, project management, and administrative support jobs.
Society
| Permalink
Derek Powazek's sage advice on panel moderation. The only moderator I've ever worked with is Cameron Adams @ @media 2006, and we were all agreed he's pretty good. Now Derek explains why he's pretty good.
Public speaking
| Permalink
Dustin lands at Google, and I wish him good luck.
In his entry he mentions one important thing:
Don’t bloggers go there to die?
That’s a stereotype. A stereotype, however, that I once believed as well. I believe blogging is good for my soul, and I always love sharing what I learn. I will continue to blog, but of course under restrictions of not sharing private company information [...]
I noted the problem of Google employees not blogging any more a while ago, when Erik Arvidsson and Douglas Bowman entered Google and basically stopped writing on their blogs, both of which I read with interest.
Now this may of course be a coincidence; both Erik and Douglas may have decided independently of each other and of Google that they wanted to take a break. Nonetheless I worried a bit. Now that Dustin's going to Google, too, I again worry a bit, because his is one other blog I don't like to lose.
Nonetheless Dustin is very clear: he will continue blogging. For me, this is a sort of test case. If Dustin, too, falls off my radar, I'm afraid I'll be forced to conclude that there's something about working for Google that doesn't mix well with independent blogging. Let's hope I'm worrying about nothing.
Blogging
| Permalink
19 April 2007
20 tips for writing a better blog. Tip 2: Encourage comments. For a starting blog, possibly. For a mature blog, who knows? Maybe 'discourage comments' would be a better tip for them.
(Via Paul Boag.)
Blogging
| Permalink
Zeldman on blog comments. He, too, focuses on spam, but does not say much about quality.
Blogging
| Permalink
Jonathan Snook expects spam commenting to become an even greater problem than it is today. Although that's quite possible, I feel that he almost ignores the second possible cause of death for comments: quality (or rather, lack thereof).
Blogging
| Permalink
15 April 2007
Useful overview.
Reference
| Permalink
Eric presents a 'reset style sheet' that essentially removes most default styles for many HTML elements by seting borders, paddings and margins to 0, etc.
CSS
| Permalink
As it says. Useful advice for newbie freelancers. By now I've learned to avoid the worst breeds.
(Via Jonathan.)
Business
| Permalink
Shaun explains how a <base>
tag can mess up scripts that modify the page header before it's loaded completely.
DOM
| Permalink
11 April 2007
Roger gets annoyed at people who offer silly excuses for not following web standards, and offers a veru useful overview of the excuses themselves. Now we have to write rebuttals of every excuse.
Skillset
| Permalink
David "liorean" Andersson takes a look at HTML 5 and XHTML 2. Probably the most complete current overview of where (X)HTML stands right now.
HTML, Standards/W3C
| Permalink
Andrew Dupont divides browser issues into two groups:
- Capabilities (does this browser support
canvas
?), which are addressed by object detection.
- Quirks (bugs), which may have to be addressed by browser detection.
I don't like browser detection for beans, but I'm forced to admit he has a point. The article also contains a few interesting technical details about the browser detection used in Prototype.
Browsers, JavaScript, Theory
| Permalink
8 April 2007
Definitions of some interaction design terminology. Quite useful, since it feels as if new terms and definitions are invented every year.
(Via Naar Voren.)
Reference, Theory, Usability
| Permalink
The nuts and bolts of keeping a foldout menu keyboard accessible.
Accessibility, Events
| Permalink
3 April 2007
Chris discusses and dissects ways and means of looping through an array. I still use the first, simplest way because I'm not convinced reading out the array's length every loop takes a lot of time, but it's useful to have such an overview.
Core
| Permalink
2 April 2007
Tim O'Reilly calls for a Blogger Code of Conduct. His proposals are:
- Take responsibility not just for your own words, but for the comments you allow on your blog.
- Label your tolerance level for abusive comments.
- Consider eliminating anonymous comments.
- Ignore the trolls.
- Take the conversation offline, and talk directly, or find an intermediary who can do so.
- If you know someone who is behaving badly, tell them so.
- Don't say anything online that you wouldn't say in person.
I find 1 interesting; I never thought of responsibility for comments, but it makes excellent sense. To me, 2 is something I decide in private, because I find it hard to articulate my exact tolerance, and it depends on my mood anyway. I implement 4 by deleting trolls.
(Via Tim Bray.)
Blogging
| Permalink
John Resig explores them.
JavaScript, Mozilla
| Permalink
Jeremy on Ajax and Flash, and the continuum between web sites and web applications. When you're working on the application side, Flash becomes a serious option, while Ajax is generally harder to code and less accessible.
Data Retrieval, Flash, Theory
| Permalink
David Flanagan discovers yet more weirdness in IE's window.event
.
Events
| Permalink
Chris Mills' write-up.
SxSW 2007
| Permalink
Older
See the March 2007 archive.