Categories
Me Other

Ajax and the common man

One of the hot new(ish) things in web design is Ajax – standing for Asynchronous Javascript And Xml. To quote Wikipedia, “The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire Web page does not have to be reloaded each time the user makes a change.” You’ll have seen the results on websites like Flickr, where you can edit the descriptions on your photos without having to load a new page. An impressive example of an Ajax-rich WordPress theme can be seen here; click on the buttons at the top to get the full effect.

Which is great, of course. Except that one of the joys of the internet is its accessibility for the casual user who wants to make a webpage. HTML is, really, an extremely simple system to use. CSS means a bit more to learn, but once you get the hang of it, it actually makes your life easier. And that’s all you need to arrange content on a page. If you just want to create a static webpage, you can do it entirely from scratch just with HTML and CSS, and how good the content is and how good it looks are entirely up to you.

Even using software like WordPress, it’s easy enough to just use some knowledge of HTML and CSS to restyle the output. The software is built in PHP, and you just have to work around the PHP tags, moving them around as necessary; it’s usually obvious from context what they do. So you can completely change the look of a site without doing any of what I’d call real coding. The various changes to the appearance of this site and its predecessors have all been done without me knowing any PHP. Ajax kills that, as far as I can tell; hacking around a theme to change the styling becomes a suddenly much more technical exercise.

I completely see the point of Ajax – when it’s used well, it transforms the user experience. And I’m not suggesting that anyone stop using it just for my sake. New software makes it easier and easier for people who know little about computers to share their thoughts and pictures on net; it’s just an unfortunate side-effect that as the software gets more sophisticated, it gets harder for a dabbler like me to get my hands dirty and tinker with the machinery.

I guess it’s a natural progression with all technologies. In the early days of motoring, you *had* to know how to do basic repairs to your car by the side of the road, and the engine was simple enough that you could probably do it with a couple of spanners and a can of oil. The fact that cars are now so reliable that you barely need to know how to check your oil and tyre pressure is a Good Thing, of course. But it still seems a pity when things get professionalised out of people’s hands to the point where they never get to do things themselves from scratch, whether it’s baking bread or creating a webpage.

Categories
Culture Me Other

Homemade bacon

I’ve been enjoying Hugh Fearnley Whittingstall’s Big Book Of Meat. It’s incredibly thorough in giving you all the information you need to understand how to buy, prepare and cook meat for the best results; even without any recipes it would be worth owning. I’ve just tried his recipe for curing your own bacon.

Basically, you make a cure mix of salt, sugar, bay, juniper and black pepper, and rub it into a piece of pork belly once a day for five days, pouring off any liquid that gets pulled out of the meat. And that’s it. If you also include saltpetre, it keeps it pink, but I didn’t bother with that. I’m using chunks of it in a beef and Guinness stew – HFW is very keen on the importance of adding bacon to stews – but I fried a couple of scraps to see what it was like, and apart from going white when cooked it tasted just like proper, high quality bacon. Presumably if I’d used saltpetre it would have stayed pink. This is my lump of bacon with a lump cut off it:

EDIT:

I forgot to say: one of the less important things I like about the HFW book is that all the measurements are in metric. In this country, we’ve theoretically been moving to the metric system for the past 40 years, and still everyone uses a mishmash of units – feet and inches for people’s heights, metres for building specs, miles for road distances, pints for beer – and it’s ridiculous. We should just get our collective act together and stop whinging about it. Food is sold in metric units anyway, by law, so why do all cookbooks still have two sets of quantities in all the recipes?

Categories
Culture Other

My latest web design bonnet-bee

I was looking through WordPress themes on the Codex. I find it surprising how many people design themes with flexible-width text columns – i.e. ones where the columns get wider and narrower when you resize the browser window. One of the first things you learn when you pick up a book on typography is that if there are too many or too few words per line, the text becomes difficult to read. That’s one of the reasons newspapers divide up their articles into columns; with such small text, columns running the full width of the page would make it very difficult for the reader.

Picking a book at random off my shelves (a biography of Lewis Carroll, as it happens), it has about 13 words a line. On my computer, this blog has about 15 words/line. I can’t control how it will look on other system/browser combinations, but hopefully it doesn’t have many more than that. But this online version of Ulysses, with the browser window at a fairly typical width for me, had 24 words/line; and more if I stretch the window. That’s just silly.

Web design isn’t the same as traditional typography, but there’s no need to reinvent the wheel. I just can’t see any advantage to flexible-width columns that would make up for the loss of control over how the text looks – and indeed the overall look of the page. Either decide to support people with small screens, or not, but pick a page-width and stick to it. Of course, if useless bloody Internet Explorer supported the max-width property, that would be a good solution, but you have to work with what you’ve got.

Categories
Culture Me Other

WordPress Theme Competition

Well, that WordPress 2.0 Themes Competition I entered has had 188 entries. Hmmm. I’m not sure I like those odds…

It’ll be interesting to see what people have come up with, and to find out what the judges were looking for.

Categories
Nature Other

Learning algebra

Something Kevin said sent me towards an article in the Washington Post about the uselessness of algebra to normal life, and the ensuing mouth-frothing response in the comments over at Pharyngula.

Two things I’d say. It rather makes me despair to see people talk about algebra as though it was advanced mathematics. Algebra is hardly even a branch of mathematics; it’s just a notational tool to allow you to move beyond arithmetic. It’s not quite true to say that it’s impossible to do any maths more advanced than arithmetic without algebra; the ancient Greeks managed without, for example. But it’s certainly completely central to the way maths is done today. Unless you think that high school should be satisfied with achieving no more than basic literacy and numeracy, passing a one-year course in basic algebra is not an outrageously high standard to hold for high-school graduation. Depending what you think a high-school diploma should stand for, it might even be an outrageously low standard. Judging by the article, this girl who couldn’t graduate because she didn’t pass algebra actually didn’t have basic numeracy skills, which means both that she shouldn’t be qualifying high school and that the school system has competely failed her.

The other point I’d make about the ‘I’ve never needed to use maths since I left school’ argument is that we all forget a large proprtion of what we learned in school unless we use it frequently. I did maths to quite an advanced level at school; I did two maths A-levels, which, for non-UK readers, meant I got as far as complex numbers, basic calculus, polar functions, basic mechanics, some statistics including things like Poisson distributions.

I can’t actually do any of that maths anymore. But having done it does mean that I’m not intimidated by equations; that I know what a standard deviation is, and a tangent and a function, and what binary numbers are, and what calculus is useful for so on. It’s not enough to enable me to do anything much, but understanding the concepts makes it easier to read popular science books, for example, or to make some kind of judgement about how useful a statistic is.

I also think that as a result, I’m much more comfortable than I would otherwise have been doing the kind of maths that *does* come up in everyday life. It’s good that schools teach a bit more than the students will really need, because hopefully that means the important suff will have a chance to really get properly absorbed.

Categories
Nature Other

Evolution, ID, Carl Zimmer, monkey-men and suchlike. Again.

I’ve just added The Loom to the linkroll. The Loom is the blog of Carl Zimmer, who wrote the excellent and rivetingly eye-opening Parasite Rex, as well as the excellent but marginally less riveting At the Water’s Edge. They’re both worth reading, but the parasite one would be my recommendation just because the subject matter is that bit more unusual. Anyway, I was reading a long discussion in the comments about how to sell evolution to the public, and it reminded me a of a point I’ve been meaning to make for a while.

The ID movement’s current Big Idea is a rather technical attack on the mechanism of natural selection. It looks good because they appear to be engaging with biologists on their own ground, rather than relying on appeals to scripture. On the other hand, the point which seems to have the most visceral appeal to the public is the question “do you believe that you are descended from an ape?”

But there are two questions here. The idea of ‘evolution’ – that all form of life on earth share common ancestors, that Ivory-billed Woodpeckers are similar to Pileated Woodpeckers because they are actually related to each other, and yes, that we are descended from apes – is independent of natural selection. There were evolutionists before Darwin. And the weight of evidence for evolution is overwhelming.

An analogy: Newton said that a dropped apple falls to the ground because all objects are attracted to each other by gravity in proportion to their mass. Whether that’s true or not, the apple still falls. Someone who rejected Newtonian mechanics would not therefore expect apples to float in midair; apples definitely fall, and the only question is why.

Even if IDists have found a fatal flaw in natural selection*, it doesn’t make any of the evidence for evolution disappear. We are definitely descended from apes (and reptiles and fish and little wormy things). Natural selection is by far the best explanation we have for how it happened, but the evidence for evolution is now so strong that if natural selection was disproved, we would need another evolutionary explanation to replace it.

*they haven’t