Web development blog

Blog

Sounds of Selly Oak

Today my shiny new Zoom H2 arrived. It’s a pint-sized solution to the problem of mobile podcasting: a quadraphonic microphone, MP3 recorder, guitar tuner and analogue-to-digital device. I think this might be the best thing I’ve ever bought…ever.

Stef Lewandowski uses one when he records various bits of audio, and I knew that for the re-launch of my podcast this would be the piece of kit enabling me to be truly mobile. I’ve been carrying it around in its box all day today, showing it off to various people and just itching for a chance to try it out.

So after an extremely enjoyable bout of alcoholism with Danny Smith, Kevin Rapley et al, I turned it on, plugged my headphones in and rode the bus from Selly Oak back to my flat in…sort of Selly Oak, sort of Bournville, sort of Weoley Castle.

And here is the resulting audio. And by way of proving that nothing is perfect, I’ve had to convert this from the original WAV to MP3 on my PC because the unit’s conversion generated some unseemly artifacts (ie: nasty bits of noise). It does record straight to MP3 though, so I’ll give that a try at some stage.

But until then, please enjoy my journey from the high street to my front door preserved in beautiful stereo sound!

“Can you hear that lifelike knocking? It’s your neighbours complaining about the noise.”

Beware the underdog

Whilst watching the replay of Ronnie O’Sullivan vs Stephen Hendry today I was reminded of a conversation I’d had with Kevin Rapley, Daniel Davies and Danny Smith at the last Birmingham blogmeet. Cor, name-dropper me.

Dan Davies (who, to lessen confusion shall henceforth be known by his web-name as Danux) was quizzing me over a post I’d written about open source web technologies, upon which he’d already commented. At this point I was set upon by both Daniels and accosted. Danny Smith wanted to know why I couldn’t get behind the open source ethos and posited the theory that it’s all about the underdog, a concept we Brits love. (I can hear the Great Escape theme in my head as I type.)

This was a viewpoint I could understand, and it was the first time anyone had tried to intelligently explain why open source has value, apart from the financial benefits of not having to pay for your software. This helped me understand why I have the utmost respect for the open source ethos but will always choose the best solution to a problem (ie: the problem of finding a good web browser) based on technical factors rather than a shared communal empathy.

I don’t mean to belittle the idea at all, and I can completely understand it. People like to see others “sticking it to the man”, including me, but for whatever reason that doesn’t translate to my digital world. I choose software based on how good it looks (I equate this with an idea of “build quality”), how good the support seems to be, how compatible it is with my current system, and of course the price.

Because most open source applications are developed for the love of programming rather than to fulfil a commercial requirement, the UX element can slip. Plus most open source programs are built to be compatible with other open source programs, which really means Linux.

What interested me more is the idea of the underdog in a wider digital sense, and how it can affect other choices we make online. My friend Dave wrote a post entitled Apple is Totally Anti-competitive and got what can only be described as a barrage of abuse in comment form. Some of it was down to a few accidental factoids, but a good deal of it was down to the fact that Dave had simply dared to pour scorn on the mighty Apple.

People love Apple in a way that they don’t love any other company. People love Google but who loves Yahoo? They’ve all propagated evil, but because we think of them as the underdogs, this stuff gets automatically edited out by our subconscious. Microsoft are no more anti-competitive than Apple, but it’s Bill Gates’ wrists that get slapped when he tries to bundle software together, so when Steve Jobs makes iTunes the only way to sync your iPod without it breaking or distributes Safari under the guise of a software update, the technology community raises an eyebrow and that’s it.

I’m neither an Apple fanboy nor a Microsoft…er…lover, but the quite obvious double standards that exist around technology and intellectual property boggle my noggin.

So why the Ronnie reference? Well, here’s a man who has been playing professional snooker since ’92, has had nine 147 breaks and was the highest ranked 2002, ’04 and ’05 (get all the stats at snooker.org), but because he has a history of mental problems and has been known to crack under pressure, and because we know he’s capable of so much more, he’s always the one the crowds flock to the Crucible to see. Although no-one would call Ronnie the underdog, we attach the same romanticism to him as we would with any fresh new talent.

And that’s the case with the likes of Apple and Google. Their fans have a romantic link with these corporations in much the same way as open source developers do with the platforms they use, but what confuses me is when Apple talk about chasing three blokes in Miami for opening up the OSX platform or MySQL sells for $1 billion, this does nothing to curb the romance.

Maybe I’m just an old stick-in-the mud. Yeah, that’s probably it.

Byron’s first stumbling block

On Thursday I started work on my new content management system for ASP.NET, called Byron. I wanted to make it both flexible and efficient and in doing so I’ve had my first setback, and it’s all to do with data.

ASP.NET has a great model for creating flexible applications that can be configured very easily and without having to write too much unnecessary code. The Provider module means that you can put all the logic for a set of functionality in one place, and worry about the nuts and bolts later.

For example, I started off with a DataProvider system. I created a base class with a load of functions for accessing information about users and their roles, so that I could build a login system for the admin area later down the road. I then built a MySqlDataProvider which inherited from the DataProvider class and which would actually handle the instructions that the DataProvider was being given.

So basically the user system says “reset this user’s password” and the DataProvider says ”OK. Oi, MySQL? Check this user’s password would you?” MySQL comes along, resets the user’s password and tells the user system it has done so. (A very simplistic description, but hopefully it makes sense.) That all works great because the MySqlDataProvider knows what data to access, in what table and what to do with it. Now comes the tricky part.

I want the system to be a framework or platform, more than a CMS. I want Byron to form the basis of all .NET sites I develop in the future, so that means the system needs to be flexible enough to deal with any type of content, be it a page, a blog post, a contact form or a news article. Because there are subtle differences between examples 1, 2 and 4, a catch-all system wouldn’t work, so total flexibility was what was needed.

So I built a ContentProvider and setup a whole load of stuff in the site’s configuration file so that new types of content could be created, understood and rendered. It all went swimmingly until I came to the point at which I’d have to access data for each page, post or article.

And that’s where the stumbling block came and whacked me square in the noggin. How do you access data from a database without knowing

  1. what the content will be used for, and crucially
  2. what form that data is held in?

It could conceivably be XML, a MySQL or MS SQL database or even - heaven forfend - a bunch of text files. If I wanted the system to be totally flexible it would have to cope with all of these, and more. And that’s actually OK as long as you know what data you need, but because the content system was dynamic too, I didn’t.

I knew that if I really knuckled down I could create a really fancy generic query system where the complexity of each query could be communicated and passed from the ContentProvider to the DataProvider and back again. But this would end up slowing the system down, and I’d have a foot-long white beard by the time I’d finished. So I had to make a compromise, and from now on, Byron will only support a MySQL database.

I wanted to allow the support of any database that can interpret SQL (a “programming” language for databases), but there are limitations which I won’t go into, so it’s MySQL or no SQL. Hey, if it’s good enough for WordPress it’s good enough for me!

Say hello to Byron

A few conversations, be they online or offline have lead me to think about whether I should be demonstrating my .NET skills through my own CMS. My priorities have shifted since I setup this site on WordPress, and now I think demonstration is more important than procrastinating.

My mate Kevin is already using version 2.0 of Bluemilkshake.ContentManagement on his site DigiKev, but it doesn’t give him everything a blogger needs. Yes he gets the basics: he can add new posts, add links, images, metadata and so on. But it doesn’t ping any servers when he updates his blog, and it doesn’t notify any posts to which he has linked.

Plus the system is not necessarily the most efficient. It was built on a module basis (a little like WordPress widgets, except those widgets don’t have to be stuck in a sidebar: they actually form the makeup of each post), so each block of text is one module, and an accompanying image is another.

It’s because of the issue above that I thought, rather than upgrade an existing system I should think about it from a new perspective, taking the things I love - and removing the things I hate - about WordPress. I should point out though that I’m not out to produce WordPress for ASP.NET, and I’m not creating a blogging platform. I want to create a content management system that implements a really solid blogging system.

So Byron is born. It’s an ASP.NET 2.0 application using a MySQL database. Why MySQL? Because Microsoft SQL Server is just too damned expensive. Why ASP.NET? It’s too long to go into, but it’s by far the more powerful language, at very little extra cost when looking at shared hosting. I’ll be writing it to support any form of database (or even a set of XML files), but this might not come till later in the development process.

I thought it’d be a great idea to blog the development process of this new project through from its conception to its first deployment and provide code snippets where they have value. If you’re not a programmer this will hopefully give you an idea of how a CMS is built, and if you’re a PHP developer this should show you that ASP.NET developers are real-world programmers.

I should point out that in an earlier post I extolled the virtues of systems like WordPress because of their “pick-up-and-go” style. That still stands. You can setup a new WordPress site in about five minutes from a standing start and that’s no mean feat, so I have nothing but respect for that system. It works too; really really well and the development community behind it is immense. I just think it’s important to put my skills on show on my own site.

Wish me luck!

Your browser is not a blogging platform

In a recent post, Lee Robertson of Epiblogger gave us seven reasons for why Firefox is better for blogging than Internet Explorer. Actually it’s got nothing to do with Firefox at all, but more to do with the add-ons that are available for it.

Why Firefox should have such a glut of add-ons in comparison to IE I’m not sure - and please don’t mention it’s because it’s open source: Firefox is cool because it’s written by nice people who make their code available for everyone to break, and IE is horrible because it’s written by Microsoft who are all fascists. I digress. I do that sometimes.

I really like Lee and Rhett’s work: Rhett has critiqued my friend Kev’s blog and is a regular listener to, and critic of my podcast. They’re both good writers with good ideas, and this latest post by Lee is no exception: i just don’t agree with the argument.

To demonstrate that, I thought I’d look into each of Lee’s points and try to rebut them, if only for the sake of balance. It’s got nothing to do with fairness, I just think IE7 is a better browser than Firefox. So to point 1:

  1. “Firefox might not have been the first browser to offer tabbed browsing, but it is one of the greatest features for bloggers to have.”
    Agreed, and it’s implemented into the core of IE7.
  2. “Firefox add-ons extend Firefox to make it much more than a web browser…”
    I used to be a desktop software developer and find the continuing blurring of the lines between desktop and web apps unsettling. I don’t like the idea that soon everything from watching IPTV to listening to Internet radio will be done through a web browser. I think web browsers should stick to being web browsers. Lee then goes on to look at the add-ins that make Firefox a great blogging platform.

    1. CoLT is a plugin that allows you to copy and paste the text and URL of a link so you can easily paste it into your post editor.
      Can I not do that already? I highlight the link text then hit CTRL+C to copy, or right-click the link and select Copy Shortcut. Or am I missing something?
    2. ScribeFire is an alternative post editor, so if you don’t like your WordPress/Blogger/etc interface you can use this.
      Windows Live Writer does this already, is browser-independent and is surprisingly good. I’ve used it before and was impressed at how well it worked with a standard blogging platform or - I imagine - anything that implements XML-RPC.
    3. FireFTP is an FTP client for Firefox.
      IE has supported FTP since version 5 (and in stable form since 6), or you can just use Windows Explorer. When Dreamweaver fails to connect I go straight to Windows Explorer for my FTP, and have never needed any third-party software.
    4. Zemanta suggests pictures and links related to your blog post.
      This sounds really cool, and according to the FAQ they’re testing an IE version. Either way, one point to Firefox.
    5. Web Developer gives you a massive set of tools to help test your web pages’ functionality and appearance.
      A brilliant add-on and another point to Firefox. If you develop for the Web and use Firefox but don’t have this add-on, get it. Chalk up another one to the mighty ’fox.
    6. Twitterfox is a Twitter client for Firefox.
      There are a whole glut of these and they’re very useful but I found that - as I documented in Adventures in Browserland - being too closely connected with such a vibrant community was distracting. Nevertheless, it’s something IE doesn’t have.
    7. Dictionaries and language packs
      What Lee’s referring to here is, not a dictionary but a spell checker. Some blogging platforms include their own but are often horrible (WordPress is no exception), but as I mentioned in How to Make Sense of your Blog, ieSpell is a great add-on for IE that gives you multi-lingual spell checking support that works really well.
  3. “Multiple Home Pages - This goes along with tabbed browsing. You can open several pages as your home page.”
    Very true, but another feature that was implemented at the same time as tabbed browsing into IE7.

Obviously some of the features I’ve documented here are very much in the “me too” vein, where Microsoft have been trying to play catch-up with the rest of the online community, but whether a development camp thought of an idea first or whether they’re implementing something that has gone missed for ages is by the by.

In all of this I’m completely discounting IE6 and all those who have gone before. IE6 is a dreadful browser with more bugs than a dung heap in Mexico - see, I do jokes too - but its successor far surpasses even Firefox in my opinion. I still think there’s no reason to use anything other than IE7 on a Windows machine unless you need to use some of the tools I’ve mentioned that IE doesn’t have (mainly the Web Developer toolbar).

So that’s my rebuttal. If you think there’s something I’ve missed or you just want to call me Microsoft’s bitch or a capitalist pig-dog please be my guest! I am a capitalist pig-dog but no, I have never suckled at the mighty Gates teat, and never will.

Count me in!

I’ve just added my name to the list of attendees at WordCamp UK, a big bloggy love-in for all fans of the amazing blogging platform that powers this site, amongst many thousands of others.

If all goes well it will be taking place between the 19th and 20th of July, at a place (in Birmingham) yet to be decided. Stef has been busy putting a logo together and suggesting ideas for venues, and a tagging system has already been put in place to group all related posts together (see the wordcampuk tag below).

At the moment details are sketchy but a potential crowd of 200 could be expected. Lots of people have been putting their hands up to offer help and services - myself included - so we’ll see who gets to do what.

Are computers really technical anymore?

I find the excuse “I’m just not technical” a little strange. This phrase was hammered home ad nausium on last week’s episode of The Apprentice by the almost totally ineffectual Lucinda, and I’m not sure I really buy it anymore. Even Nick Hewer pointed out that the actions being performed in the latest task - copying some images from a digital camera to a PC - were really not complex.

The problem of being “non-technical” has nothing to do with technology in my opinion, but has almost everything to do with listening. Because people feel left behind by an industry that is a) moving incredibly fast and b) runs just about every aspect of their lives, I think they switch off and become unable to follow instructions.

I think it has a lot to do with fear: of the unknown, of the damage they might do if they click the wrong thing, but computers are very good at coping with that and just as pencils have rubbers so do computers have undo options and recovery functions. I do have sympathy with this, but I think people are perhaps a little too quick to jump to the “I’m not technical” argument.

As a web developer I often get calls from clients saying “I got an error and I don’t know what to do”. I ask them what the error was and they can never tell me in the first instance because they don’t take the time to read the message, but when they do read the message they almost always know how to deal with it. However bugs in software or problems when two perfectly well-written programs butt heads can throw up unexpected errors and at that point the non-technical card can be played quite legitimately.

Maybe the NUT’s comments on the importance of teaching technology at a young age will help to improve this mindset, but there is another side to early adoption, which is over-reliance. When I was at uni even my technology-obsessed brain instructed my feet to walk to the library and seek out a book on a particular subject. Yes I might use the library’s computer to find it, but I always knew that what I was looking for could be found amongst the thousands of tomes this relatively small library held.

When I was in my second year a lecturer told our group that some first year students had come to him complaining that they couldn’t find the information he’d tasked them to collect. When quizzed on this they told him that the Internet was down or they couldn’t get into the computer room or some other guff of that nature. When asked why they didn’t think of going to the library, a light bulb seemed to go off in their heads. This demonstrated quite clearly to all attending that 12 months had obviously had a massive impact on the way technology was taught at or regarded within schools and colleges.

There is an important balance here, and one which the NUT seem aware of, between being able to “work” a computer and becoming so reliant on it that all other forms of research seem archaic or pointless because obviously you can find everything you need on Wikipedia!

Actually a law student friend of mine told me that he delights in pissing off his mathematician mates by changing some of the results of equations on Wikipedia and watching the look of consternation on their faces when they discover that the numbers didn’t in fact add up and that for once the Internet was wrong.

I tried that once myself in an article about Bruce Forsyth but my less-than-subtle amendments were quickly spotted and rectified. Better luck next time.

Something old, something new

Two new album purchases today from 7digital, in the form of Passenger’s album Wicked Man’s Rest and an album by a band I’ve been meaning to listen to for years…wait for it…Ben Folds Five, by Ben Folds Five.

My friend Kev has what we in the office have Christened a “music server”. It’s really nothing of the sort, just a 250 gig USB hard drive crammed full of tracks nicked from the real music server at his last place of work. Brilliant idea, one of which has spawned the seldom-played but wonderfully random iTunes game, which simply involves picking a word at random, typing it into the media library software and playing the results.

Kev was off ill yesterday and, getting bored of the meagre collection of albums I haveon my iPod - about 260, but even that amount gets samey after a while - Dave suggested we have a change, and rifling through the list of artists on Kev’s machine I came across Ben Folds Five. Obviously I’d heard of them and could vaguely recollect that I may have heard one of Ben’s solo tracks, so I thought I’d give them a go. A couple of weeks ago the track Jackson Cannery had popped up on last.fm and I’d quite liked it, but I was really surprised and very happy to have really enjoyed the entire album, having seemed not to have dated in its 13 years or so of being on the shelves.

Now I’ve got a mammoth post brewing - eewww - about my opinion of the state of British music so I won’t go into this in detail (it won’t be a suggestion that music hasn’t been the same since [insert band name here]) but Ben Folds Five is a band that tipifies something very important that separates British and Ameri/Canadian music. More on that story later.

The second purchase on my list has yet to be given a full listen, as the numbers are still crunching inside 7digital’s lackluster desktop downloader, but I’m really looking forward to hearing it after listening to a track featured on Nick Reynolds’ 55th podcast edition. The band are Passenger and the album is, as mentioned above Wicked Man’s Rest. According to Nick it’s been out for some time, but when you’re as out of touch as I am, something from a mere 8 months or so is positively hot of the press!

Named and shamed: me

Let’s get one thing straight: I’m a passionate guy. I care a lot about the Web and I like to see things done properly, and get annoyed when people don’t fully take the time to understand their industry. But passion doesn’t always need to be public.

In an earlier blog post I completely slated a web designer. I deliberately chose not to critique the site for reasons I won’t go into, and instead wrote passionately and with emotion. Although I stand by my comments and my right to publish my opinions within my own space, I don’t think it was perhaps the most professional course of action.

I talk a lot with colleagues about “web ethics”, but what I would consider ethical behaviour spreads wider and has a deeper impact than what’s on the screen, and although I believe my comments were valid, the way I chose to make them was unethical.

Lesson learned.

Adventures in browserland

I’m a sucker for change. I like to shake things up, and I get bored very easily, so I’m always interested by new browsers, search engines, social networking sites, gadgets and other assorted whatnots. Now Flock is hardly new: I tried it back in 2005 and enjoyed the experience, but it was pretty much useless if you weren’t using del.icio.us… which I wasn’t. However, something spurred me to try it again and see how far it’d come. But first, to give you a bit of background:

Flock is a web browser based on Firefox, but with a much more attractive interface and a whole raft of social features. In fact it is this feature set that fuels its marketing as a “social web browser”.

Now let me get one thing straight. I’ve never liked Firefox, and I don’t like the assertion that it is God’s gift to web browsing. Certainly there’s a hell of a lot to be said for the Gecko engine on which it’s built, but the interface is dull and unfriendly and it’s less flexible than IE6. And why? Even IE6 supports liquid layouts without the use of tables, but which the Gecko engine never did. (I won’t go into the whys and wherefores of that, but it is true).

I wholeheartedly invite someone to supply a link to a site that successfully uses liquid layouts in CSS: I would genuinely like to be proven wrong because it’ll save me a whole bunch of time in the future!

Also the argument that people constantly trot out about it being open source is, for the 95% of people who use it (mostly web professionals because no-one else cares enough) frankly, bollocks. It matters not one jot whether you can download the source code if you’re not a programmer. Unless you’re a developer who wants to get his hands dirty, open source does not matter. There, I said it.

All of the above applies to Windows users only, by the way. For Linux and OSX it’s the best browser available, it’s just that for Windows, IE7 is better.

So, why Flock and not Firefox? Well for one the interface is much better. The dialog boxes are still too clinical and unfriendly for my liking, the scrolling isn’t as smooth and intelligent as in IE and editing in WordPress has some weird side effects. But all of these petty little issues were overridden by the rich feature set. For example:

The People Sidebar shows you an at-a-glance view of your social network identities. You can update your Twitter status, read through your Facebook minifeed, browse your Flickr library and go straight to YouTube…and more besides.

The Media Bar gives you a river of images and videos from sites to which you subscribe, using something they call media feeds, a bit of black magic I still haven’t managed to figure out (it’s not based on RSS, so I’m not entirely sure what is, in fact, the deuce.)

The Feeds Sidebar shows you a folder-based list of all your RSS feeds, marking out those which have unread items. You can read through them, marking off the ones that you’ve read (it’s supposed to happen automatically but rarely works) or easily sharing them via your blog.

If you’re a Google or Yahoo! Mail user you can check your inbox and compose a new message with a mere two clicks. You can share your favourite links via del.ici.ous, keep clippings of web pages and write new blog posts directly from your browser window. The search facility is great too (it defaults to Yahoo! but we all make mistakes).

And it is precisely because of all of these features that I’m getting rid of it. My small but ever-growing RSS list coupled with my subscription to a constantly changing Flickr photo stream means I’m forever seeing little red icons that demand my immediate attention.

This is not Flock’s fault. Of course this behaviour is by design and it’s great, not to mention being what I thought I wanted, but now I realise that these features simply distract me from work. I thought I wanted to be updated when someone published something new, but at the moment it feels like I’m being notified every time someone farts and it’s all too much!

There are a few other issues aswell, like not being able to sync all my accounts, settings and feeds with my laptop or even my Pocket PC, but the real reason is that all these fantastic connectivity tools are just far too tempting. You can’t have a Media Bar and not fill it: that would be a hideous waste of the developers’ precious time!

Plus you could say “why don’t you just ignore the red icons until you’re ready?” but you’re crediting me with self-control that I just don’t have. I want to know what’s going on right now, but my conscience tells me there’s work to be done.

So it’s been a fun few weeks playing with Flock and spending the time getting it just the way I like it - including installing the English rather than American dictionary for the excellent spell checker - and if you can control the urge to press the big red buttons that say “do not press” then check it out for yourself: it is of course free!

And if you feel like berating me for my earlier rant on open source web browsers please feel free to leave a comment: I’m all about debate!

Right then. Start, Control Panel, Uninstall a Program