Star Trek XI announced

Oliver Brown
— This upcoming video may not be available to view yet.

Ironically I found this out while reading an article on a wrestling site.

Apparently the new movie will be directed and produced by J.J. Abrams, a guy famous for Lost, Alias and Mission Impossible: III and is scheduled for a 2008 release. In a risky move the story will apparently focus on Kirk and Spock’s first meeting at the academy during the early days of the Federation. How they do that with William Shatner and Leonard Nimoy as old as they are is a beyond me, unless they use new actors which is an immensely bad idea.

Oh and they’re apparently not involving Rick Berman in the project at all…

Info on StarTrek.com.

Star Trek, William Shatner, Leonard Nimoy, science fiction, sci-fi, TV

t.A.T.u - How Soon is Now - Stepmania Simfile

Oliver Brown
— This upcoming video may not be available to view yet.
t.A.T.u - How Soon is Now

t.A.T.u - How Soon is Now

One of the reasons for my sudden mention of Stepmania will now be revealed: I’ve created some Stepmania step charts for “How Soon is Now” from the album “200 km/h in the Wrong Lane” by t.A.T.u..

The download is available as an smzip file so it should be a matter of downloaded it and running. It contains the steps as both .sm and .dwi files as well as a background image and banner image. It does not include the music file. Although I realise that technically the images are just as subject to copyright as the music I’m more confident about my host not being bothered.

The step files were synced to the music ripped off the album “200 km/h in the Wrong Lane " which is how I suggest you get the file but I’m sure you can work how to get it some other way if you want it. It has all the difficulties except basic although the challenge difficulty may not be possible (I just used the difficult one and applied modifiers) but it’s all fun anyway.

And I know neither of the images are really anything to do with the song :P How Soon is Now - Download (219kB)

Switching to a Mac is getting easier

Oliver Brown
— This upcoming video may not be available to view yet.

Unless you’ve been living under a rock for the past couple of weeks (possible admittedly - you could have been on holiday) you’ve probably heard that you can now run Windows XP on an Intel Mac using Boot Camp. This could be a great step forward for Apple with regards to capturing Windows users.

Firstly I don’t think Apple will capture the casual market, at least not in the near future. However much certain Mac enthusiasts may claim Macs are easier to use, a Windows machine does everything the casual user wants it to do (and because of the market share of Microsoft it does it the way the expect it to. Not only that but some of the details about installing Windows on a Mac are too much for the casual user (look for the confused look when you explain to them that if they use an NTFS partition to put Windows on the Mac won’t be able to write it. Then see how they laugh when you mention FAT32 as an alternative). The slightly more technical fraction of the market is much more obtainable.

Those with enough confidence with computers to manage the transition may now be willing to make the change. Before, buying a Mac was a big step. Unless you wanted to have two computers it meant giving up a lot. Now you can have the best of both worlds with just one computer. For developers this could be great. With the increasing success of Mono as a cross platform development environment, have a single computer to test everything on (whether it’s been done or not I’m sure it’s technically feasible to run Linux on an Intel Mac). This will ultimate increase the number of developers able to work with Macs and the whole things spirals outwards.

Perhaps.

Free advertising

Oliver Brown
— This upcoming video may not be available to view yet.

TextLinkAds are offering $100 of free text link ads. The catch? You have to buy $125 of advertising. The catch isn’t as big as you’d think. I assumed it meant you spend $125 and get another $100 free, but it doesn’t. You order $125 worth of advertising and only pay for $25. You still need to be careful though. You’re actually ordering a subscription and if you don’t cancel within a month you will be charged again.

TextLinkAds sell hard coded text links (oddly enough) on publishers websites. Hard coded means detectable by search engines. And you can get them at one fifth the “normal” price. To qualify just enter “New client” as the coupon code.

Going more mobile

Oliver Brown
— This upcoming video may not be available to view yet.

I announced limited support for mobile devices viewing the blog recently. That support basically only covered phones with Opera Mini.

Well now I have a WML theme installed so you should be able to view the site with any WAP device.

You can force WML output with any browser though (although most browsers do not understand WML).

Detecting Mobile Phones

You’re first instinct is probably to check the user agent. Although it’s true there are fairly consistent ways to detect a phone from the user-agent there is a better way.

One of the many under-utilised headers that browsers always send (well 99.99% of browsers you encounter will) is called Accept. This is just a list of MIME types that the browser can handle. Since all mobile phones (as well as PDAs can display WML pages, we’ll use this as the basis to detect mobile devices. The MIME type for WML pages always seemed rather odd to me: text/vnd.wap.wml.

if (strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false) $mobile = true;

Now we need to find out if the phone can accept XHTML Basic (or XHTML Mobile Profile or whatever) in pretty much the same way:

if (strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== false) $xhtml = true;

Many “real” browsers are inconsistent with regards to the MIME type for XHTML. As far as I know since mobile phones do not have any sort of backwards compatibility issues they all use the proper application/xhtml+xml.

XHTML Compliant - Thrice!

Oliver Brown
— This upcoming video may not be available to view yet.

I tried validating the markup and my site and found a few errors (nobr tag not allowed, span tag not allowed inside a ul and few others) so I fixed them and I’m XHTML 1.1 compliant once again. That is the home page and a few random pages I tried are compliant. There are probably some posts with random stuff that isn’t…

The main reason I did it was for the sake of any mobile browsers that might complain really loudly about bad markup. So I started reading about XHTML Basic what exactly was and wasn’t allowed. Well I couldn’t find anything useful so I just tried validating as XHTML Basic 1.0. I had to remove script tags, style attributes, replace i with em and again, a few other minor things. The end result is that an XHTML Basic version of the site is available to mobile browsers. Since I don’t have a mobile browser to test it on I can’t guarantee I’m detecting them properly yet. If you want to see what it looks like though, just go to Oliver Brown - Basic.

Then I discovered that it’s mainly PDAs that use XHTML Basic and that mobile phones tend to want XHTML Mobile Profile (XHTML MP also called WAP 2.0). Just changing the doctype was enough to get XHTML Basic to validate as XHTML MP. You can check it out at Oliver Brown - Mobile (it looks the same as Basic).

Just to let you know, when browsing the other versions manually all the links bring you back to the normal site - you actually need a browser detected as being a mobile phone for it to work properly.

AJAX problems in IE

Oliver Brown
— This upcoming video may not be available to view yet.

One of the things I’m working on right now (at work interestingly enough) uses a fairly simple JavaScript function that takes a url and an element id and replaces the content of that element with whatever the url returns.

This worked well until I started getting an odd error from IE - Unknown runtime error. Firefox and Opera both handled this fine. After some fiddling I discovered the problem was the type of element I was replacing into - Internet Explorer doesn’t like you replacing the innerHTML of certain elements.

So far I’ve found TR and TBODY don’t work (and I’d guess THEAD and TFOOT too).

StepMania

Oliver Brown
— This upcoming video may not be available to view yet.

Think of this as an introductory post into something I may mention more in the future. This way I can just send people here instead of explaining everything from scratch every time :P

Ever heard of Dance Dance Revolution (Dancing Stage in Europe)? Well it’s a funky arcade game you control by “dancing”. Arrows scroll up the screen and when they reach the top you press the corresponding button.

The really cool thing is a an open source PC version of it called StepMania. Generally StepMania has more features and allows you to add as many songs as you want (assuming you can get the media files and step charts). In fact there are arcade machines around that are actually a computer running StepMania inside a DDR cabinet (which is a little overwhelming to play because of the sheer number of songs available.

Looking good in every browser

Oliver Brown
— This upcoming video may not be available to view yet.

Okay, “every” is overstating it. The site has always looked how it should in Firefox (and Mozilla variants) and Opera as well as almost right in Internet Explorer. And although I didn’t look in depth it seemed fine on Safari when I used a friend’s Mac.

Well now it looks how it should in IE too. Although I did have to do a pretty nasty hack of sorts (but I remain XHTML compliant).

IE supports “conditional comments”. They’re HTML comments in a specific format which IE interprets as special. Overall this is quite a clever idea since the other browsers see them as normal tags and technically my site isn’t using any no standard markup.

The dodginess in IE (if you hadn’t noticed or don’t use IE) is that the graphic behind the Google links bar was 1px to the left. So all I did was put a style definition inside an IE conditional comment to nudge it to the right: <!--[if IE]><style> #linksbar { background-position: 1px 0 } </style><![endif]-->

Apparently you can do cleverer things with the comments like so conditionals on specific version of IE but that’s getting a little silly and if you want that much control it’s probably better to do it on the server so you don’t send every version of a page to every browser…

For more information, check out conditional comments on Quirks Mode.

Going mobile

Oliver Brown
— This upcoming video may not be available to view yet.

Screenshot of OliverBrown in Opera SSR

Screenshot of OliverBrown in Opera SSR

Following my recent discovery of Opera Mini I fiddled around with stylesheets trying to make the site presentable on mobile phones (well ones running Opera at least). And I seem to have success. The image on the left is how it the page appears in Opera’s small screen mode using the “handheld” stylesheet I defined. That’s about 240px wide but it displays okay at anything down to 176px (the screen width of the Nokia N70). Since the modifications are only to the stylesheet the page is still the same size as before (which is rather bloated) Of course if you use Opera Mini this isn’t a problem since it formats and compresses the page before it gets to your phone. For anyone wanting to do something similar, here are some of the things I did specifically:

  • Lower the font size. I’m not sure whether proportional fonts are ideal here - I just set body { font-size: 10px }.
  • Remove the adverts. Most of the adverts are fixed sizes that are too big for mobile phones. Large ad networks probably won’t pay for mobile visitors anyway. Remove them by giving them a display: none CSS attribute.
  • Set a maximum size for images. All the images have max-width: 95% to stop them needing to scroll.
  • Cut down the margin and padding for basically everything. Especially lists.
  • Hide redundant navigation. Most sites have multiple menus that aren’t necessary and a pain to scroll through. In my case I scrapped the calendar.
  • Resize form elements especially textareas. I’m not sure whether it’s practical to try and post from a mobile phone but I don’t want it to be impossible.
  • Use a sans-serif font - they’re more readable at small sizes. More subjective and only an issue really if you can’t read the serif font.

A final note (in case you didn’t guess): the page is using normal XHTML. Not XHTML Basic, cHTML or WML. Although I haven’t tested it on a real phone Opera claims it will display it fine (which could mean it only works in Opera Mini - but it’s free and apparently better than any other mobile browser out there). cellphones, mobile phones, mobile browsing, browsers