Problems with attributes not working in IE and Opera?August 30th, 2010

So, what did I do with my bank holiday weekend? I was intrigued by some odd Opera and IE behaviour — that’s what

I was presented with a site whose styling wasn’t working for certain tags. It was an odd one. I thought it might be an absolute positioning bug, but testing was bringing up nothing – why on earth would simple CSS styling, nothing special, fail completely in Opera?

Then I took a closer look at the source — and something caught my eye. There was some malformed HTML:
<h1 title="test""style="background-color: #ccc">Test</h1>

Gotcha! Removing that innocent looking multiple quote fixed the problem. But I still wasn’t happy. Browsers should recognise and fix badly formed HTML, no? It’s not like a closing tag was completely missing. So I made a basic HTML template with little more than the h1 tag you see above, and just enough HTML5 to make it validate.

Then I played around with it. What happens if I add a space?
<h1 title="test"" style="background-color: #ccc">Test</h1>

That fixed it. Hm. Why on earth would the lack of space break things? Lacking a space is completely fine in both HTML and XHTML. Let’s remove the space again, and test some more. What if I replace the rogue ” with another character – say $?
<h1 title="test"$style="background-color: #ccc">Test</h1>

Wait — that’s a turnout for the books — it now breaks in Chrome. Then it dawned on me. If I replace that dollar sign with a normal alphanumeric character — the character ‘a’:
<h1 title="test"astyle="background-color: #ccc">Test</h1>

That’s it! Without the space between attributes, Opera and Internet Explorer are treating “style as the attribute, with Webkit and Gecko being smart and removing the extra quote. Add the space, and Webkit does the same. Obvious when you think about it, isn’t it?

So that’s what I did with my bank holiday weekend. What did you do?

Review: Apple iPadJune 2nd, 2010

Apple iPad

Photo by johncatral, used under CC licence

It seems that one of the fastest selling items that Apple have made is also one that has split everybody firmly into two camps. Those that think it’s the best thing that Apple have ever done, and those that don’t see the point and think it’s little more than a giant iPod Touch.

Well, it is a giant iPod Touch. But once you get on it it really doesn’t feel like it. I would have preferred a better home screen and some other interface elements don’t quite work well, but it feels right. Every built in application has been reworked, and they all work very well with the extra screen space. Third party applications have yet to perfect this, but it’s to be expected with developers being unable to use a real device to test their application.

Let’s get this out of the way: the iPad is not a laptop replacement. Don’t expect to be able to write more than a few sentences on the keyboard, and don’t expect the iWork apps to be any good. In fact, I don’t think iWork should be on the iPad at all: I found all of the apps either hard or impossible to use, and I don’t see the point in them.

The iPad is for using on the couch, something to use quickly to surf the web or check your email. Something you use to look at your photograph collection — or show off your photograph collection. It quickly turns on, doesn’t need any thought, and does exactly what you need it to do before you put it back in its home — on the coffee table, next to your cup of tea and by the remote control.

The screen really is magic. The multitouch responsiveness is exactly what you expect from Apple, and after two years of using iPhones and iPod Touches it still blew me away. It’s incredibly smooth and quick, and is best experienced in Maps. The pinch to zoom really comes into its own here, and you can get a clear (and large) map which just moves along with your fingertips. I would love to use it for real, I genuinely think it would match both the iPhone and paper maps for finding your way around.

iBooks is a fantastic entrance into the eBook reader market. Although I still love the real thing, I like the idea of electronic books. But there just isn’t a reader that cuts it. They’re all slow and cumbersome to use, mainly because they use electronic ink. Well, electronic ink is a dud technology, at least until the next generation starts to appear commercially. At the moment a regular LED backlit display is the best we have. Which isn’t so bad. You swipe across to turn the page, and instantly the page is turned. You can’t get easier to use than that. It’s not perfect, but the iPad is the only device I would truly be happy to use to read eBooks night after night.

Some of the criticisms thrown at the iPad are a little unfair. For a start, its lack of features I don’t care about. I don’t need half a million ports to plug countless devices into it. And I don’t need the ability to read from a USB stick or DVD drive. Nobody ever uses optical discs anymore, and cloud computing is far better than a USB drive. For a start, you can’t lose cloud computing or leave it at home.

And Flash is a rant for another day. I hope iPhone OS never includes it.

But it’s still version 1, and buggy. It didn’t take long for me to confuse the accelerometer and the interfaces aren’t quite there yet. These issues I hope will be fixed in future releases of iPhone OS, and they aren’t enough to stop you from enjoying the device.

The iPad is a first class entrance as both a truly portable computer and ebook reader. It won’t replace your laptop for work, but it might well replace it at home.

Some mindless babbling about Gadget Show Live 2010 (part 2)May 7th, 2010

So, in my previous post about Gadget Show Live I was a little negative. There were eBook readers that were total rubbish, watches that can be nicked, and 3D tellys that were blurry given the wrong light.

But then I realised, there is a lot of cool new tech out there, you just have to wander around the exhibition space a bit more, open your eyes to what’s already around us, and watch what the professionals can do with enough time and money.

Firstly, sound. I’m a big music fan, and I’m one of those who believes that the quality of the sound has a big impact. By using cheap, low quality headphones, it just doesn’t sound the same. But I’m ashamed to say, I use Apple earphones. I’ve just never gotten around to researching anything better. Having gone to a headphone stand (Zino, if anyone cares) and tried out a pair, I realised what I was missing. All these top quality headphones, and I had my Apple blinkers on and didn’t bother researching if anything else could be better.

Secondly… sound. More specifically, sound around the house. The Sonos multi-room music system, which lets you play any song into any room. It can link to your iTunes library, last.fm, and Napster. And it can be controlled using a dedicated remote control or an iPhone app.

It’s the sort of application of computer networking that I love, it’s very clever and it doesn’t need any complicated setup procedure. It’s simple, does the job, and makes technology great. It is a little pricy though, £799 for a two room bundle is a lot of money when you can share an iTunes library between two computers. But the idea is just brilliant.

And finally, Architectural Mapping, which we were shown during the live show. There’s lots of photographs and videos of this technique in various settings, but it really does have to be seen in person to appreciate just how fantastic it looks.

Some mindless babbling about Gadget Show Live 2010 (part 1)April 16th, 2010

So, last week I went along to Gadget Show Live, in a hope to try out some stuff I’ve never had the chance to play with before (such as 3D TV and ebook readers) and see what’s on the horizon when it comes to new technology.

In the whole, the sheer scale was overwhelming. There were thousands of people and it was hard to get near some stands. But I also have to say that I was pretty disappointed with the quality of what was supposed to be new technology. Not even new technology, but stuff that was being launched this summer or even things that was supposed to be making a big entrance to UK homes this year.

With the new iPad launching in the UK in the next week or so and doing amazingly well in America, eBooks are certainly the next big thing. They’ve been around for a few years now, and I’ve tried out the Sony reader but I’ve never been that impressed. Don’t get me wrong, the quality of the text is as good as ink on paper, but they’re just slow and very hard to use.

The eBook reader I tried out at the exhibition was just as bad. A confusing interface, slow response, and not something I’d pay money for. They had what looked like colour touchscreen models, but I soon found out to my dismay that they were just prototypes (plastic boxes showing either a rather confusing video, or a plastic box with a screenshot stuck to where the screen would go).

I asked a demonstrator how it would compare to the iPad — a reasonable question I feel, as it’s pretty certain that Apple are shaking up this market just as they did with mobile phones — but didn’t get a very clear reply. I think I somehow offended them by even asking the question.

I also stopped at two 3D stands early on. The first stand used the active technique and were mostly selling 3D projectors which I have to say I quite liked. They were cheaper than a 3D TV (even with a couple of pairs of the glasses), and could be attached to anything. Brilliant. It was also of reasonable quality. This was demo’d to me because I noted to the demonstrator that their TVs were flickering. To be fair my eyes are never very good at 3D, and as the demonstrator pointed out the lighting was harsh and was nothing you would get in a normal home.

I moved onto my second 3D TV stand, which used passive 3D (the type you get in a cinema). I had seen this at the cinema but never on a small screen, so to my surprise this looked very impressive. It was much better than the active 3D systems, and you didn’t have to be directly facing the screen. I’ve always questioned 3D TV, but I can now see why people are raving about it. I wouldn’t buy one myself just yet (being short sighted I would find having to wear a second pair of glasses whenever I wanted to watch TV or play a game annoying, and at the moment they are far too expensive for me), but for sports, gaming, or even films, 3D has a future in the next few years.

So onto watches. Or rather, cool digital watches with touchscreen and phone capabilities. I’ve always wanted one of them. It’d be so cool to be able to have a proper LCD (or better) screen on your wrist that shows you the time and date, your calendar, your phone numbers and anything else you want. I was pretty excited when they started to come out a couple of years ago. I was excited to see one on exhibition. There! Ready to buy!

But… no. I couldn’t get over how bad it was. I really do hate being negative over technology because I love it when new and innovative stuff happens. But this was very 1980s (even a fellow visitor mentioned this). The screens were large and bulky (80s), you had to use a stylus to use the touchscreen… assuming that even works properly (80s), and the strap was cheap plastic which would be very easy for the most amateur of pickpockets to steal under 5 seconds. Dreams completely shattered.

But not everything was bad. Some tech — mostly related to sound — really impressed me when I honestly didn’t think it would. There’s also some future developments that won’t be in the homes just yet, but to see it was encouraging. And there were a lot of future developments that I’m pleased to say is with us already. All of this I’ll speak about in my next post.

Review: mflowMarch 29th, 2010

mflow

It’s a mixture between Twitter, Spotify, and iTunes. Simply, it’s Twitter for music, and it’s pretty cool.

Keep an eye out for invite codes (they aren’t hard to find – just keep an eye on twitter), and check it out. It might sound naff in a “what, another music/twitter mashup?” way, but this one has legs. It’s a great way to hear music recommendations and suggest music yourself

When choice goes wrongMarch 5th, 2010

The Microsoft browser choice screen

Due to European ruling, Windows is starting to show a screen to users which gives them a choice of browsers to install, the intent being to let them know about the wide choice of web browsers out there.

But they’ve made a mistake. The majority of people use one of five browsers, yet there’s a choice of twelve options in the browser choice screen. Having a wide range of web browsers is great, but not when they’re presented like this. All that will happen is users will get choice paralysis and hit the red cross at the top right of the window.

Review: Blackberry Curve 8900February 26th, 2010

Blackberry Curve 8900

Blackberry Curve 8900
Photo by O2 UK, used under CC licence

This phone is definitely a businessman’s phone. It concentrates on email, is the right size to fit in your pocket, and looks sleek and smooth. The keyboard is nicely tactile and the keys feel lovely, even if I personally find them a little small to quickly type one-handed.

If only the good design went further. The only other method of input is through a trackball, which is awkward and cumbersome to use. This does mean you get a mouse pointer while browsing the web, which is great, but it also means navigating between menu options (especially on the homescreen) is a chore. The keyboard layout could also have done with a little more thought: I struggled to find how to enter digits, the full-stop is shoved away behind a modifier key, and I kept hitting return rather than backspace.

The menu system consists of rows of icons, which looks very nice and with a touchscreen would work well, but again it’s ill thought out. There’s at least two menu items to change phone preferences and options, and I struggled to perform such a simple task as turning on the mobile phone reception.

Overall, there’s too much wrong with the phone (without even going into the inferior technical specs for such a phone, such as the lack of 3G) which sadly overshadows what is a good looking piece of technology which is a pleasure to hold. With a little more thought, this would have been a decent business mobile phone.

Reusing primary keys in MySQLJanuary 22nd, 2010

I’ve recently had need to reuse the primary key for a table whenever a row gets deleted, for example if a row of ID 5 gets deleted, the next entry will re-use the ID of 5. Usually this causes problems with foreign keys, but as no other table had a foreign key linked to this table, it would cause no problems.

The biggest hurdle was finding what the first missing primary key actually is. This takes a bit of SQL, but the following almost gets it:
SELECT MIN(table.id + 1) AS nextID FROM table LEFT JOIN table t1 ON table.id + 1 = t1.id WHERE t1.id IS NULL

I say almost, because if row/id 1 is deleted, the above code won’t catch it. I’m afraid that you’ll have to use SELECT to check for this:
SELECT count(id) FROM table WHERE id = 1
If the value is 0, then you know you need to create row id 1.

And that’s it. All you need to do is throw this together into a MySQL function (or a php function if you’re not feeling adventurous), and you have the lowest unused primary key all ready for you to put into your INSERT line.

Predictions for 2010January 15th, 2010

A little late, but my predictions in technology for 2010:

Twitter will still be just as popular, and might get a source of income
Twitter isn’t going anywhere soon, and they’ll need to find a sustained source of income at some point. I think this year might be it.

Mobile apps will be big, with more services and brands creating apps
Because of this, it will start to become normal to rely on cloud/remotely hosted services for more everyday things, or storing data they normally wouldn’t on their phone, such as using the Tesco iPhone app for a shopping list rather than paper and pen.

Rupert Murdoch will try and start charging people to read news online
It won’t work. Hat-tip to those at Media Guardian.

Internet streamed media will take one step closer to being at the quality it needs to be, both from the point of view of the user and the broadcaster
People started to take streaming TV and radio seriously in the last couple of years, mostly thanks to BBC iPlayer. But I think in 2010 we’ll hear more from those solutions trying to get streaming TV and radio in one place.

I’ll see how wrong I was in 12 months time!

Why I think the Google phone was a bad ideaJanuary 7th, 2010

The Nexus One: known by its friends as The Google Phone. Let me explain why I don’t get it.

It was hoped to be an iPhone killer. The first phone designed by engineers at Google. Something that would shake up the mobile phone industry. It wasn’t just a smartphone, it was a superphone. What happened? It’s designed and manufactured by HTC, it has no real killer features, and Google’s involvement seems to be that they provided the operating system and are selling it on their website.

The Nexus One was a let-down. There’s nothing new or groundbreaking there at all, save for the voice recognition, the media were wrong when they said that Google engineers designed the phone, and this new entry won’t shake up the industry one iota. Having an ad-supported cheap phone would have been the answer, as many people simply won’t pay £400 for something that they can buy for under £100, or get for free on a reasonably priced contract.

Let’s face it: we’re getting too many phones that are being touted by the media as being “iPhone killers” whereas in reality that just means “it has a touchscreen display”. Design elements are blindly copied from the iPhone, innovation seems to come solely from Steve Jobs and co, and we’re back to before 2007 when mobile phone manufacturers just stopped coming up with new ideas and churned out phones that simply looked good and had a 10 mega-pixel camera.

I might be a big Apple fan, but I’m also a big technology fan. If there was a phone as good as the iPhone I’d be all over it like a child in a sweet jar. I still think the Palm Pre is a great phone, I was happy to forgive the shortcomings because it innovated with its operating system and the designers copied the iPhone screaming “We can do better than that!”

But instead, the innovation we get from the Nexus One is that it’s only being sold online. I wouldn’t consider that innovation: I’d consider it a step back. Technology is meant to be felt. It’s meant to be used. It’s meant to be part of your everyday life and you’re supposed to enjoy using it.

So why can’t we try it out first?

Again, Apple has this right, and I’m pleased that so does o2. Retailers should not only be putting their products on display, but customers should be encouraged to try them out. The screensaver shouldn’t be password protected and the phones shouldn’t be demo models that don’t actually work. I care much more about how easy it is to use a device than I do how it looks tethered to a shelf. I want to be able to choose my purchase with confidence that I know how it works, and that I won’t be frustrated a month down the line when the menu system is awkward to use and it takes longer than it should to write a text message. But I have to deal with it, because it cost me £300.

A Google Phone in principle is a great idea. Google are full of great ideas and they’re always trying to make things better. But with the Nexus One, I think they’ve dropped the ball.