Monday, June 28, 2010
Visualisation tools - Part I, resonance
Saturday, March 27, 2010
The origin of Sheldon?
Sunday, March 08, 2009
Programmers' resources
Friday, March 06, 2009
Programming books
You may think it odd, but I've read a few programming books, in various languages. Okay, I've skipped the reference chapters, and occasionally danced lightly across other bits that I found dull, but I've read the substance of them. The first was K&R, and it was a revelation. I'd done a bit of BASIC and a bit of assembler, but my ideas of programming were largely shaped by FORTRAN, specifically Data General's FORTRAN 5. Dynamic memory allocation was a new, and fascinating, concept.
I read K&R over a weekend. It helped that it was the first (pre-ANSI) edition, and quite short.There was a time when I tried out a variety of Borland products. Turbo Pascal's manuals included an excellent introduction to OOP. Turbo C++'s documentation was very sparse by comparison. Borland C++'s documentation came on CD, with 10-volume dead-tree edition an option. I was never tempted to try to read it through. Borland C++ was vastly superior to Microsoft's product, but I've long since given up expecting the market to make rational choices. Borland continued to make innovative products. In a rational world Delphi should have wiped out VB. It spawned C++ Builder, which was in a class of its own, and JBuilder, which found itself up against some stiff competition.
But I digress. I read Stroustrup. It was hard work, but I got through it. It certainly didn't grab me in the same way as K&R (and it was a lot longer).
I wanted to like Eckel's Thinking in Java. I really did. To be fair, it's aimed at novice programmers, and covered far too much of the basics, far too thoroughly for my needs. I hadn't the patience to read it.
Next up was Perl. I read the llama, and learned a lot. It's hard to write three interesting chapters about regular expressions, but that book's a good introduction to the language. But it's still just a primer. For a full understanding of the language, you'd have to read the camel. But I couldn't. It's a good reference, but I couldn't find the motivation to read it. At this point, I have to mention Perl Cookbook. I haven't read that from cover to cover either, but it's an invaluable resource when writing Perl. (And while seeking a link for that last sentence I discovered PLEAC - I must investigate that further.)
After Perl, there were two other languages I wanted to explore (three if you count Lisp). Ruby and Python were the major contenders. At the time I was using NetBeans for Java development and NetBeans 6 came along with Ruby support out of the box. So I read The Pickaxe. Wow! This was the book I'd been looking for since K&R.
As with Eckel on Java, I really wanted to like Core Python Programming. The eight reviews on Amazon, all awarding it five stars, seemed almost too good to be true, but I felt if they were all part of a marketing exercise, somebody would have added a bad review. I'm finding it hard work.
Sunday, November 04, 2007
Respect for Flash
"And I have never seen a Flash movie that was worth waiting for."Then came Line Rider. Am I alone in thinking that the latest version has lost some of its charm? It's certainly lost some of its challenge. Now I've encountered Animator vs. Animation and its sequel Animator vs.Animation II. AvA is surely to Flash what Luxo Jr. was to rendered graphics in 1986.
These are outstanding Flash movies, well worth seeking out for their own sake. But if I'm looking for information, Flash just gets in the way.
Thursday, September 06, 2007
MIcrosoft take on the world
In my previous article, one of my major grievances concerned people's failure to use styles. Sadly, Microsoft feel compelled to revamp the user interface to styles in every major release of Word. In Word 2003, they changed the Styles drop-down menu on the Formatting toolbar to clutter it up with “styles” generated on-the-fly as well as those formally defined. This, of course, made real styles harder to find. They also relegated the modification of styles to a new pane. And even there, Modify Style… was quite well hidden.
Numbered paragraphs in Word have always frustrated me. The fact that there is an entire newsgroup devoted to the subject of numbering in Word suggests that the implementation is unnecessarily difficult. But one aspect had me baffled for years. I've often needed to use hierarchically numbered headings and, in Word 2003, I was often frustrated by the fact that I could rearrange hanging indents and margins in a numbered paragraph and apparently change a style to match the current paragraph, but the next time I applied that style, it would revert to the previous indents and margins.
A former colleague (Thanks Iain!) eventually worked out what was going on. In Word 2003, Modify Style | Format | Numbering | Customize brought up the Customize Outline Numbered List dialog, with its own tabs and indents that superseded those under Modify Style | Format | Paragraph.
Now I've moved to a new employer and, just as I was beginning to understand Office 2003, I have to use Office 2007. I can’t find the Customize Outline Numbered List dialog (or equivalent) anywhere. My new employer wants reports with hierarchically numbered headers, but also wants individual conclusions and recommendations to be numbered in a way similar to H2, without actually being H2. In particular, it looks very silly if the complete text of the conclusions and recommendations appears in the contents. I can get around this by limiting the contents to level H1, but it’s a kludge.
All of this is detail; the biggest change in Office 2007 is that they've done away with the menu bar. No, I'm not kidding. After years of writing guidelines about how the menu bar should include File, Edit, ... , Help, they've thrown away the book. This might be an improvement for users who've never used Windows, Apple's System or any Unix/Linux desktop environment. But for anyone who's used a computer in the past decade or two, it's a pain in the butt.
As I said at the start, Microsoft need change for change's sake; well actually it's for money's sake. They have to keep selling product; and when your product is software, you need to convince people that their current software is obsolete and needs to be replaced. A while back, I read in one of my employer's internal newsgroups somebody complaining that the version of Office we were using was obsolete, because the subsequent version was three years old. The implication was that software became useless because it was old, that it somehow wore out. I pointed out that the decision to replace, or not to replace, software was a commercial one. The cost of replacing software includes the costs of:
- the software itself;
- additional memory to run it;
- upgrading processors to run it;
- additional disk space to run it;
- training staff to use it;
- rewriting templates;
- rewriting macros;
- and probably a few others I've forgotten.
Running a business is a balancing act, balancing the conflicting interests of suppliers, employees, customers and shareholders. Office 2007 is perhaps the most stark example of how the interests of the shareholders can conflict with the interests of all the other stakeholders. When the business is Microsoft, it's the shareholders against a substantial proportion of the world's population.
Wednesday, March 14, 2007
Credible science
The WTF story provides a link to SCIgen, where we can read of "scientific" conferences that apparently accept papers submitted without peer review. Amusing though this story is, it points to a serious issue: if practical jokers like SCIgen can get papers published, so to can incompetents and frauds.
The SCIgen site links to a page at the Technical University of Vienna, which accuses the Wessex Institute of Technology of a similar lack of standards. It's not perhaps surprising that WIT didn't feel obliged to respond in detail to all of the accusations, given the way they were presented, but that's unfortunate, because there was prima facie evidence of a case to answer. And when WIT were making hundreds of pounds from every paper accepted for publication, they had a duty to their customers to show that their peer review process was honest.
The accusations against WIT were over ten years ago. Even if true, the events described were perhaps an isolated incident. WIT seem to have put such events behind them, until Scott A. Minnich & Stephen C. Meyer happened along. Minnich and Meyer were bright enough, and dishonest enough, to leave their silliest creationist conclusions out of their abstract. They weren't bright enough, or were dishonest enough, not to reference Nicholas Matzke's paper a year earlier that discredited their irreducible complexity nonsense. Matzke's explanation is neatly summarised here by cdk007.
Of course, conferences' review processes are subject to ineluctable time constraints. Journals can afford to be a bit more rigorous. That's why the Sokal affair was such a shock. Alan Sokal published a nonsense paper in the journal Social Text. The same day it appeared, this appeared in a different journal. When I first read that last, I was slightly puzzled as to why Sokal seemed to believe that he belongs to some coherent body called "the Left", some of whose members he thinks have let the side down. I've since learned, from ScienceBlogs and elsewhere, just how one-dimensional US politics is.
In the Sokal affair we saw how social scientists could be fooled by real scientists like us; my, how we laughed. Real scientists could never be taken in so easily. Oh yeah? The Bogdanov affair wiped the smiles off a few faces.
Notice how the Wikipedia article on the Bogdanov affair has been protected against vandalism. The controversy rumbles on. One of the major supporters of the Bogdanov brothers was a Professor Yang at Hong Kong University. Unfortunately (a) the university had never heard of him and (b) his postings were traced (by IP address) to a Paris dial-up connection. The Bogdanov brothers lived in Paris at the time.
If smart people can be awarded PhDs for fraudulent science, how much credence can we give to scientists who announce their results on the Web, on TV or in the press? At best, a rush to publication is motivated by the increasing need for academics to court funding. Fleischmann & Pons might charitaby be seen in this category. At worst, it is a sign of incompetence or fraud. Steorn are little more than a PR agency, and are not to be taken seriously. But the world's energy problems seem to attract miracle solutions. If it's not a hitherto unknown energy source, it's pretending the problems don't exist. Martin Durkin, who has a record for "selective editing" has been given airtime by Channel 4 again. His allegations are debunked at
RealClimate.
Monday, February 26, 2007
A few words about words and Word
Introduction
The following are some thoughts on writing and formatting British English. Due to restrictions imposed by my employer, it assumes the use of MS Word under MS Windows. This document was mostly written some years ago, but I occasionally get irritated and feel the need to express my views on this subject. It's been cobbled together over the years, with more thought in some areas than others.
The purpose of this document is to provoke thought and debate. We may end up with a difference of opinion, but at least it will be considered, informed opinion rather than habit.
Style guide
Introduction
This section is largely about matters of taste, rather than absolute rights and wrongs. Inevitably the boundaries are a bit blurred. Where there is no absolute right and wrong, any organisation ought to have a house style.
Gowers’ The Complete Plain Words is essential reading for anyone writing British English. Any employer whose business whose products include reports written in British English should buy a copy for every small office and several for every open-plan area. Better still, all staff should have a copy each.
Title Case (sic)
is an American invention. You won't find it in any UK newspaper for instance. This side of the pond, it is usually recognised that spaces are enough to allow readers to distinguish words. Gowers acknowledges that book titles should be in title case, but uses "sentence case" for chapter headings.
Justification
That's an odd one. Typographers deplore it but most books and all newspapers use justified text. It generally makes the page look neat at a distance, but can lead to very ugly text when long words appear in narrow columns. It can also lead to unsightly and distracting "rivers" of whitespace running down the page, especially if there are double spaces between sentences (see below).
Spaces between sentences
The notion of typing two spaces between sentences is a typist's superstition. There is some small argument in its favour when using monospaced fonts, because the full stop can appear detached from the preceding sentence. It has no place when using proportional fonts, but those who favour it will assume they are right because they know no better. It's a bit like the superstition against split infinitives in that respect.
Fonts
Organisations should set, and their employees should conform to, standards on this. I've read a lot of views on the subject, and the consensus seems to be that large blocks of text are easier to read in serif fonts and sans-serif fonts are better for headings. However, some evidence suggests that the "easier to read" is more because it's what we're used to than because of some intrinsic quality of the font face. In any case, practically all research on this area has dealt with text on paper; on a computer screen, especially without anti-aliasing, serifs are crude and ugly. Nevertheless, we should conform to our companies' standards on this.
For emphasis and headings, italics and boldface are much easier to read than underlines and block capitals.
Common spelling and punctuation errors
Apostrophes
If in doubt, don't. Gowers suggests using them when talking about individual letters, "mind you p's and q's". I would argue that the letters should be in quotes.
Capitals
If in doubt, don't.
-ise/-ize
Authorities differ. Fowler suggests using -ize whenever possible. Gowers is more pragmatic (and possibly more relevant because it's more modern). According to Gowers, in British English, -ise is never wrong, but -ize sometimes is. Hence it's easier to use -ise, but don't criticize (sic) others unless you know they're wrong.
Using Word
Introduction
Back in the early 1980s, Apple introduced the world[1] to the user-friendly drag-and-drop user interface. Corporate computer-buyers showed that they didn’t understand the most obvious economics. The price of a Macintosh out of the box was £ 1000 more than a comparable PC. The cost of training staff to use it was much less – in the medium term, the Macintosh was far cheaper than the PC. This point was beyond the myopic vision of the bean-counters.
Although it took Microsoft until 1995 to come up with an operating system anywhere near as user-friendly as Apple’s, they were quick to spot the advantages for applications, and Microsoft Office has always been easy to use. But still the bean-counters miss the obvious. The cost of training staff to use tools like Word is much less than it used to be, but it is non-zero. Pretending it is zero, and just leaving staff to get on with it, just means many more expensive hours of frustration as people reinvent the wheel, and work around Word features, because they don’t know how to make the features work for them.
Styles
This one really irritates me. It's bad enough that we reinvent the wheel with every new document, but some people reinvent the wheel with every paragraph. In a typical document, you will have a title, a hierarchy of two or three levels of heading, some body text, perhaps some bullets, and a few oddities such as references and captions. Each of these types of text should be presented in a consistent way, with a font face and size, margins, tab stops and paragraph spacing. Word provides a mechanism to define a series of styles, wherein all these features are defined. It even provides, with each document template, a series of default styles (and more factory defaults if you control-click the drop-down menu of styles). These are easily tailored to your needs (but please don't mess with your employers' templates without good reason). Please, please, PLEASE use them - they'll make your life (and mine) a lot easier.
One word of caution - I would advise against using the Normal style, because many other styles inherit its characteristics, and any changes you may make to Normal in future may have unforeseen consequences. Body Text is safer.
If anyone understands the arcane mysteries of bullets (and I would suggest bullets are only used in conjunction with styles), please explain them to me.
Cross-references
Word provides a mechanism for maintaining links to figures, tables and references in documents. It's not infallible, but it can save a lot of very tiresome editing.
Track changes
This is a useful way of putting comments and suggested changes into other people's draft documents.
Fields
These are useful for embedding boiler-plate text, such as the document title, as well as formatting things like page numbers. Right-click on a field (usually shaded with a grey background) and select "Toggle Field Code" to see the field codes - this is often useful when your page numbers are going screwy.
“Keep with next”
All heading styles should have this option set. Widow/orphan protection on body text is quite useful too.
Miscellanea
File names
Windows, and Windows applications, are inconsistent in their handling of spaces in file names. To keep life simpler, it's best to avoid them, especially in folder names.
What's the singular of "miscellanea"? "Miscellaneum"?
[1] Yes, I know it was invented at Xerox's Palo Alto Research Center - but they did nothing with it.
Friday, December 29, 2006
Picture perfect
Wednesday, September 20, 2006
Ajax
Ajax is not a single technology; rather it is a cobbling together of several disparate tools, adapting them in ways they were not designed to work. In other words, it's a kludge, but it's one that makes dynamic Web pages look a lot more like desk-top applications than they ever did before. It will never be what Java could have been without the Sun/Microsoft pissing contest, but it's the best we've got for now.
The term "Ajax" seems to have been coined by Jesse James Garrett, and one of its earliest uses was in his February 2005 essay for Adaptive Path, where he says it "is shorthand for Asynchronous JavaScript + XML". He cites Google Maps as one of the best-known examples of Ajax technology, and references Joel Webber's blog as simple as possible, but no simpler for an explanation of how it works.
Throughout 2005, the Web was abuzz with tales of Ajax. In September of that year, venture capitalist Dan Grossman in his blog A Venture Forth listed his Top 10 Ajax Applications, followed swiftly by his
Top 10 Ajax Applications (Part 2).
In 2006, the novelty wore off, but quietly in the background people have continued developing their Ajax applications. "Applications" is the appropriate word, because of the way Ajax brings the Web and the desktop closer together than ever before. When Protopage featured in Dan Grossman's original list , it was very close to being the Web application I had always wanted. It has been steadily refined ever since, and my own Protopage (with its public interface at http://www.protopage.com/david.mclaughlin) is now one of my favourite Web portals.
People who care about accessibility may have concerns about Ajax. The most obvious one is that it relies on JavaScript, which has a different flavour for every browser on the market. Microsoft's version isn't even called JavaScript, but JScript. But there is a standard, ECMAScript, which provides cross-browser compatibility for a significant subset of JavaScript and JScript.
Another concern is that Ajax applications sometimes "break the Back button", but I fear there is an element of cargo cult thinking behind this taboo. When using a browser to step through a series of static pages, it is obvious what the Back button should do. When running an application within a browser, it is no longer obvious: should it go back to the previous page, or to some previous state within the current application? Ajax developers should give careful thought (and user testing) to what the back button should do in any given situation.
Further reading
Ajax (programming) in Wikipedia
Ajax in SWiK
Wednesday, August 30, 2006
The wacky world of the Web
"We have developed a technology that produces free, clean and constant energy.
This means never having to recharge your phone, never having to refuel your car. A world with an infinite supply of clean energy for all.
Our technology has been independently validated by engineers and scientists - always off the record, always proven to work."
They're obviously doing something right, to get all of this publicity, but exceptional claims call for exceptional evidence. If you want to write off a century and a half of thermodynamics, that calls for very exceptional evidence indeed. And their evidence? "independently validated by engineers and scientists - always off the record". In other words, none at all. I won't be holding my breath.
Reading about Steorn reminded me of another proponent of alternative energy sources, Gary Johnson. On the face of it, he seems like a sensible chap. His book "Wind Energy Systems" (on that page) is a pretty decent text. But scroll down to the bottom of the page to find his two treatises on a whole new energy source. The evidence for its existence? The gist of the argument seems to be:
1. All energy sources known to physics are running out.
2. God wouldn't let us run out of energy.
3. Therefore physics is incomplete.
It's logic, Jim, but not as we know it.
Browsing through The Daily WTF, I stumbled across a reference to Alex Chiu. Clearly an out-and-out fruitcake. Or is he? Maybe he's found some suckers to pay for his snake oil. Even a brutal interview on Slashot doesn't seem to have perturbed him.
For a real loony, how about Gene Ray? Or is he some experiment in artificial intelligence?
Usenet newsgroups seem to attract their fair share of nutters. From uk.legal, there's Mike Corley (Just how incompetent do you think MI5 are? They've been trying to kill you for fifteen years?) And from sci.military.naval, there's Alan Yu, who has been persecuted for years by "invisible tiny (like small ant size)" government agents.
Friday, June 30, 2006
Quis custodiet ipsos custodes
First a few comments on Design by Fire itself. It looks good. Very good. Better in Firefox, but not bad in IE. But it relies on Javascript for navigation. Minus several million for accessibility.
Now for their comments on Nielsen.
Keith
XHTML? Where have you been? Try Googling in ciwah. Internet Explorer is broken. It cannot handle XHTML without some serious hackery. As long as 90% of Web users cannot deal with XHTML qua XHTML, it would be stupid (or ignorant - I've done it myself) to use it.
HTML Strict is the only way to go.
Verdana? ciwas is the place to Google for that. Verdana is produced by Microsoft. In an astonishing act of magnanimity, it is available for Mac as well as Windows. It is not, nor is it ever likely to be, available for Linux, FreeBSD or other systems. That's not a major problem though, is it? After all, CSS provides for graceful degradation by allowing a list of alternative fonts to be suggested. Unfortunately, Verdana lies about its size - at a given nominal size, it is taller and much wider than other faces. That means it is impossible to include Verdana in a list of fonts that will look even vaguely similar.
Didier
Flash? There's a saying; well okay, it's not widely known, indeed I coined it myself, but I've been using it in sigs and elsewhere for some time:
Flash doesn't make Web sites inaccessible; trained monkeys make Web sites inaccessible.
Flash isn't necessarily bad. And Macromedia have given serious thought to accessibility issues. But Flash attracts trained monkeys.
The problem with Flash goes deeper than that. I'm willing to entertain the possibility that a competent designer could use Flash to enhance a Web site, but I have never seen an example. Pause a few moments to let that sink in.
I usually use the Web to find information. That usually means reading text. I have never seen a use of Flash that allowed me to find what I was looking for more quickly or easily.
Of course there's more to the Web than text. Occasionally, as with Flickr, images are central to the purpose of a page or an entire site, but a few well-chosen graphics can add life to almost any page. I'm prepared to believe that Flash offers potential benefits that go way beyond simple line graphics or photographic images. but those benefits have a cost. Even with today's broadband links, Flash takes time to download. And I have never seen a Flash movie that was worth waiting for.
And yes, that's a challenge.
Sunday, March 27, 2005
An old dog learns a new trick
The first Web pages were exclusively textual; then came graphics. Pretty soon, it became clear that constructing Web sites could be as much a matter of graphic design as information design. Dave Siegel was the great evangelist of this school of pixel-perfect Web design.
I like good graphical design. I can spend hours choosing just the right font and colours, kerning, anti-aliasing and cropping. But somewhere along the line I, like many others, lost sight of what the Web was for. Now, I'm aware that that's a can of worms: different people have different ideas, and to say that others are wrong is to run the risk of being labelled a zealot. Well, maybe I'm a zealot.
Presentation is all very well, but if the content is inaccessible to the target audience, it's useless. In the UK, where I am, commercial organisations are legally obliged, under the Disability Discrimination Act 1995, to address accessibility. I believe the US has similar legislation called the Americans with Disabilities Act and Section 508. But how can we assure Web sites are accessible?
As is so often the case when you're looking for information on the Internet, the best place to look is not the Web, it's Usenet, and particularly the Google Groups (formerly DejaNews) archive. The groups in comp.infosystems.www.authoring, and in particular the HTML, site design and stylesheets groups are a good source of advice. But be careful - there's a lot of zeal there.
But the Web would be a very dull place if there was no graphic design. Jakob Nielsen is widely respected; indeed, it's unusual to see his name without the phrase "usability guru" nearby. But few companies would be content with a Web site as minimalist as his.
The key to accessible Web design in 2005 is the separation of content and presentation by the use of Cascading Style Sheets (CSS). Two leading advocates of this approach are Eric Meyer and Dave Shea. It's hard to imagine how that separation could be better demonstrated than by Dave's CSS Zen Garden.
Which, finally, brings me to the new trick mentioned in the title of this piece. Using graphics for titles while respecting accessibility isn't just a matter of choosing good
alt text. Image substitution is the way to go. Let me at it!
Friday, March 11, 2005
Start at the now
Surfing the Web is not really much of a hobby with me. I'm much more likely to while away the time lurking in newsgroups. But a few sites have recently caught my eye. AskTog is full of quite obviously sound advice on user interface design. Not a subject of immediate interest to a lot of people, you might think, but when it's a matter of life or death or the election of the most powerful politician on Earth, it's surely of interest to everybody.
While on the subject of politicians, I'd like to mention what our (UK) politicians are up to as I type this. Politics is another subject that usually isn't of much interest to me, but what's going on in Westminster today is really quite scary, and is probably the best argument in 300 years for the continued existence of the House of Lords. I think Richard Miller in uk.legal succinctly expresses the concern of any rational person.
And here's the original seven, plus or minus two paper.