- Assert Valid Markup — Great. Automated testing for valid view output. I’m going to try and get this in place once I start testing more.
Tagged as: html rails ruby rubyonrails testing validation w3c xhtml
- Imperial Star Destroyer – a photoset on Flickr — Cal bought a Lego Star Destroyer. It is *huge*.
Tagged as: lego starwars - Charlie’s Diary: What is the sensory bandwidth of Scotland? — Charlies does some maths. The results are at the very least interesting.
Tagged as: delusion futurism scifi senses - BuzzMachine » Blog Archive » The last presses — Jeff Jarvis rambling on as ever – some good quotes in it, though
Tagged as: blogging journalism newmedia publishing web - The F-Word – Malysian Chicken Curry — Yum.
Tagged as: cookery cooking curry food - Rupert Murdoch tells all to Press Gazette – exclusive interview | Press Gazette — The internet is changing, very disruptive technology and there are new inventions coming along every month. One has to stay awake and race to stay up with it, or if you get enough brilliant people around maybe you can get ahead of it.
Tagged as: internet interview journalism murdoch
Tomb Raider: Legend
09 July 2006
Ten years of Tomb Raider, and only one of them was ever any cop. When the BBC and Design Museum ran a public poll for the greatest icons of British design, Tomb Raider was nominated the eighth greatest British Design icon. One notch ahead of Grand Theft Auto, no less. Which begs the question: has anyone who voted for it actually played a Tomb Raider game?
My review of Tomb Raider: Legend is now online at Pixelsurgeon. Surprisingly, the game doesn’t suck. Parts of it are, in fact, “rather good”. This was a turn-up for the books, so to speak.
- JavaScript Closures for Dummies | Developing thoughts — Morris Johns — I’ve needed a decent introduction to closuers, especially in JS, for a while. This one looks good.
Tagged as: closures for:dotcode javascript programming - India, Ink. — A blog about typesetting and bookmaking. Delightfully written.
Tagged as: blog books design layout publishings
It must be the heat
07 July 2006
I had my first ever nightmare about work. Well, I say nightmare; to be honest, it only qualifies as unsettling.
But it did involve Ruby’s unicode support.
If you know what I’m talking about, you’ll appreciate why I was scared.
- Telegraph | Personal view: New breed of journalist for a new world — I have been a print journalist for 42 years and up until, say, three years or so ago I expected to die a print journalist. But there is no point in looking backwards, in being an inky dinosaur, so I have come to accept that the only way forward, for the m
Tagged as: greenslade journalism newmedia publishing
- Balloon. (Scripty postcards.) — Scripty postcards: chunks of Ruby you can run just by evaluating them. They do useful things, and are hilariously insecure – but the concept is delightful. Not sure what I’d use it for… but it all hangs together very nicely.
Tagged as: fun proramming ruby scripting web - RedHanded » Hpricot 0.1 — Crunchy! _why knocks up a really loose HTML parser for Ruby (in C) with some delightful syntax. Now, to knock up some microformat parsers…
Tagged as: gem html parser ruby
- Rossignol » The Big Hook Up — "What one will then wear on the wrist will be, not a mini-computer, but a computerized dialling system to the big hook up." Jim R on fine form, on one of Brian Aldiss’ many visions of the future.
Tagged as: futurism gaming network play scifi society - The lone wolf – Books – Entertainment – theage.com.au — [Murukami] wrote the initial chapters in English, before translating them into Japanese. "I didn’t know how to write fiction, so I tried writing in English because my vocabulary was limited. I knew too many words in Japanese. It was too heavy." Good inter
Tagged as: books howework interview japan literature murukami writing
One thing most web applications need is a static page template. Now, whilst the page content might be static, the template itself might need to be dynamic – either because it’s going to change in future, or because you’ve got dynamic user information that appears in the tempalte.
So the most obvious way around this is the static
controller. Dead easy, this: generate a new controller called static
(or whatever you want). Then just write views for it named after pages you want. For instance: your about.rhtml
file can contain all your “about” information. Then, when you hit up /static/about
(to use the default routing), you get your static content, without having to make a whole page from scratch in public_html
. You could even write a new 404 page on this controller.
All that remains, once it’s working, is to write some dedicated routes, and then the “static” controller can be hidden from existence – just route /about
to :controller => "static", :action => "about"
and you’re done. No need to write any controller logic at all!
Going on from there: one view I’ll always add to that template is the “foo” action.
So: when you’re mocking up a page, you’ll probably use lots of dummy links. Everyone expects this, because it’s obviously just a flat mock. But when you mock up an application, and show it to stakeholders in a working state, they click on things, and wonder why they get ActionController exceptions when it breaks. Also, they wonder why the link that breaks stuff is always /foo
.
Obviously, it’s because I’ve left link_to "/foo"
all over the shop. Have no fear: the easy way around this is to route /foo
to :controller => "static", :action => "foo"
, and then write a static page called foo
.
When you do this, the page should explain that it represents functionality that hasn’t been added yet, but will be added soon, and that the developers haven’t forgotten it.
This (from experience) reassures stakeholders that the thing that is not working will be working soon. It also means that when they do find “grey screen” errors, it either means that something’s genuinely broken, or it means that the developers really have forgotten something. Time to update that link to point to foo
.
It sounds trivial, but it turned out to be an effective communication of diligence on the developer’s part, and saved much time in meetings explaining that “yes, we’re working on that”. Consider it, next time you’re developing for external stakeholders.