Browser Versions

Every couple of months, I have a look at StatCounter’s Global Stats page, it’s probably one of the most balanced internet usage statistics services in the world, as their counter widgets are installed on a wide variety of websites. Most statistics services are based on access to specific servers, like the W3C’s one. I have a great deal of respect for the W3C, but I don’t believe statistics based on users visiting a technical web developer site is balanced.

As a web developer, browser and operating system usage trends are of great importance to me, though often depressing. I feel I need to know what browsers are most relevant for me to test sites against (if only more people did this, the internet would be a better place…). This philosophy has brought up a few questions about geography and intended demographics.

If the site is of a technical nature, should I instead focus on statistics from the W3C site? Should this blog be better optimised for those the W3C suggests? If so, perhaps I should consider Linux fonts and some more obscure browsers.

Does a shopping site primarily designed for European delivery really care what browsers the Asian market are using? In Europe, Internet Explorer 6 had 3.32% of the usage share in September 2010, but in Asia it has 16.26%!

The best solution, of course, is to optimise every site for every browser, but there comes a point where hours (or even days) of extra work would be done for a browser no one will ever use. Time is money, and money comes from the clients. I feel it’s my responsibility to advise clients as best I can to save them money. I guess it comes down to percentages. Do I or my clients care about a browser with 5% usage share? How about 3%? 2%? Where is the line drawn?

The situation is even more complex when you consider your clients needs in more detail. I’ve recently completed a website for a client who owns an iPad and an iPhone – these devices occupy a marginal share of browser use, but in this case special care was needed to ensure the site worked flawlessly on both. On a similar note, though most people begrudge fixing websites for Internet Explorer 6 or 7, if the client is a business that still has either of these browsers installed on their workstations, the fixes and optimisations suddenly become a lot more important.

A lot of my musings on this matter are courtesy of Internet Explorer. I desperately want to drop IE6 from my testing cycle, but I can’t. I kept telling myself “if it’s under 5% share, who cares?”, but such a cavalier attitude doesn’t make clients happy.

I think it boils down to: Write it for Firefox, fix it for Internet Explorer 8, test it in Chrome, Safari and Opera… Then apply whatever fixes are necessary for Internet Explorer 6 and 7 in a separate stylesheet. Lately this approach has been working well – sites work in everything, but don’t have (as a previous client once put it) “Razzle Dazzle” for the lower share browsers.

Crackers

Let me define a few terms in the IT world:

Hackers: Used to be known as the seedy, dodgy guys in films who break PCs. Nowadays hackers are the elite programmers who can turn Lead into Gold and such.

Crackers: Always considered “bad”, and now taken on the original definition of hacker. Crackers break things for their own purposes (spam, taking down servers etc).

I’ve had a run-in with some crackers lately which is starting to annoy me. As a server administrator, I wish I could do more about it. PCs in Saudi Arabia, Korea and China have been doing their best to take over my server through SSH, and in separate attempts, turn my server into a spam “bot”.

The widespread abuse of PCs and servers worldwide is becoming a serious issue. I have enough experience to keep these guys out (though I should have changed my SSH port before today…) and haven’t been seriously affected by it, but what about the other guys?

I’m a strong believer in security above all else, but I’ve been somewhat upset recently by a large company not using basic security consistently in their own card processing example code.

I think the point I’m making is twofold:

1. People need to consider security more carefully. You never know what will happen or when. Change default SSH and Remote Desktop ports. Sanitise all your data. Use passwords that no one could possibly ever guess. Use blacklists and blacklist data providers. Implement brute force limitations.

2. Governments need to consider cracking and PC abuse more seriously. If someone breaks into 1000 houses and steals a little money from each, they’d be in prison. If you steal 1000 bank records and commit minor fraud on each, you stand a fair chance of getting away with it. Hell, if you’re in the right country, no one will care.

The world needs to sit down and enforce specific laws around cracking, proxy servers without sufficient logging and infact any service that doesn’t maintain reasonable IP logging. Server owners worldwide need to be held responsible for continuously allowing (willingly or through negligence) cracking, unlawful or illegal activities on their systems. If you’re not logging it and willing to pass this on to the relevant authorities as required, you should be held partially responsible.

You do something illegal on my server, I’m rollin’ over on ya.

Sandy Bridge Processors

I just read about the new Intel processor and graphics hybrid code named “Sandy Bridge”: http://www.bbc.co.uk/news/technology-11280200

This has got me thinking. Intel is ancient in chipset terms. They’re responsible for so much in PC history, and I’m certain we wouldn’t be close to where we are today without them. In saying this, they’re not perfect. Intel’s 3D graphics performance has always been considered a joke and their bugs in the early Pentium chips will haunt them for some time.

AMD, another huge player in the processor market, bought ATI recently – a huge player in the 3D graphics market. I remember many years ago, my ATI mach64 and SLI Voodoo 2 graphics cards. ATI has come a long way and made itself an important and powerful company, well respected by business and gamers alike.

So what does this mean for Nvidia? Over the last decade, they’ve generally been considered slightly superior to ATI for cutting-edge 3D graphics performance, but are non-existent in the processor market. I’m also a personal fan of theirs as I run Ubuntu on my desktop PC – they actually care about Linux users and maintain good drivers.

I can see the benefit of integrated CPU and GPU chips, but at what cost? Will this push Nvidia into obscurity? Will Intel spend millions in research and development to make itself a name in the graphics industry? Will the next decade be Intel and AMD, with the Nvidia and ATI brands left to the archives?

I hope Nvidia make some intelligent decisions over the next few years and don’t become redundant. Losing them will be a loss for everyone. Competition breeds excellence.

Call to Arms!

I never thought I’d type this entry.

My previous website portfolio has included code to apply hacks and fixes for IE6, 7 and 8. While I’m on the topic, this is good advice for all you budding (or some experienced) web developers out there. Why do I only apply fixes to 6, 7, and 8? IE5.5 and lower are basically no longer used, and people using it expect almost every site they use to look bad with it. IE9 isn’t released yet, and you simply don’t know how your fixes will look in it. This is the common philosophy: Develop it properly, then hack it for IE. Since every version of IE has substantially different rendering bugs, you can’t realistically apply the same fixes for IE6-8 in IE9 before you’ve tested it. You should always be as specific as possible with your hacks and fixes, to save them having unwanted effects in other browsers.

As I was saying. I installed the Internet Explorer 9 beta today. I loaded my most complex sites (with only IE6-8 hacks). I closed my eyes. I’d have prayed if I wasn’t atheist.

I spent a moment in the darkness of my mind thinking about the beautiful curved edges. The advanced Javascript applied styles. The HTML5 video. So pretty.

I opened my eyes.

I blinked.

At this stage, I’m pretty convinced my eyes are still closed, or my mind has stuck on the beautiful imaginings of the Firefox, Chrome, Safari and Opera view of my portfolio. I called my wife over and asked her: “What do you see?”

Internet Explorer 9 actually displayed the site properly. HTML5 video, inline-block li tags with styled block div child elements, curved borders – the lot.

It actually worked. All of it!

It actually worked.

This brings me to the title of this post. Call to Arms:

Now that Microsoft is showing some care towards standards, we all need to upgrade. Lets stop this trend of IE 6 and 7 (plus 8 to a lesser extent) usage NOW. Petition your IT manager, bully your friends and colleagues. No really, bully them.

If a genie appeared before me now and granted me one wish: It would be to instantly upgrade the whole world to IE9.

Thank you Microsoft. It’s been 18 years coming, but thank you.

Domain Sale

A while ago I had an idea. Since that time, it’s been pushed further and further back as more important projects have started. Finally, I realise I’m never going to develop the idea, and it’s time to let go and sell the domains. I’ve created a little sedo account and popped two domains up:

localtakeawaymenu.co.uk
localrestaurantmenu.co.uk

If you’re interested, there should be links to register and buy from the sedo holding page.

Centered LI in UL without Float

It’s so simple. You want to use UL elements for your menus. You want to style them with CSS. You want all the LI items centered.

Until now I’ve been using “float: left;”, which then leaves you to manually center the whole UL with specific margins. I’ve developed a simple CMS system which generates all the menus with LI entries, and this obviously poses a big problem with template design. I’d mostly ignored the issue until my latest client, who wants the CMS and lots of centered menus.

I had a quick look online, and most of the sites out there suggest this feature is some kind of black magic, requiring the sacrifice of some poor capra family mammal. Obviously, any simple solution would require decades of tweaking to work in Internet Explorer 6 (from this point forward to be known as “The I Hate Microsoft Browser”).

Nope. In the inimitable and immortal words of “The Meerkat”: Simples.

Here’s whatcha do:

Step 1: It puts the “text-align: center;” in the UL.

Step 2: It puts the “display: inline;” in the LI.

Step 3: It doesn’t put the float in either.

(Don’t worry, this doesn’t involve Buffalo Bill or ointment)

This appears to even work in IE6. (Yes, I know. Shocking isn’t it?)

Apple HTML5

Yes, two posts in one day!

Apple have released a cutting edge HTML5 demonstration site, rejoice! It’s at http://www.apple.com/html5/

It demonstrates a number of features provided by CSS3, Javascript and a couple of HTML5. A couple of HTML5.

It’s viewable in all HTML5 compatible browsers, as long as your HTML5 compatible browser is Apple Safari.

Wait… What?

Yup, that’s right. Apple’s HTML5 demonstration site doesn’t really showcase a lot of HTML5, more alternative standards like CSS3, and you have to use Safari to see it. Why, isn’t the ‘Apple WebKit originally “borrowed” from Linux’s Konqueror and used in Google’s Chrome‘ good enough? Is Mozilla Firefox “chopped liver” now, in the eyes of Apple? Is Opera now considered HTML1?

The whole point of HTML5 is cross-platform support. I’m getting sick and tired of Apple’s campaigns, arrogance and disrespect for the industry as a whole.

Apple, Windows, Linux…

I’ve spent a lot of time using Mac OS X Snow Leopard, Windows XP and 7, and Ubuntu over the last year. It’s remarkable and amusing how similar and dissimilar they are in surprising ways. I think the main issue people overlook is what the core of the operating system is built on, or derived from.

Mac OS X is Unix based/clone

Linux is Unix based/clone

Solaris is Unix based/clone

Windows XP and 7 is WinNT based

Well, isn’t that lovely, but what does it mean or matter?

Operating systems based on similar systems tend to work in a similar way. To oversimplify this, I often use a tool “rsync” to update content from my desktop to my web server. I’m familiar with this tool. I booted up my Macbook and wanted to copy a large folder to it, but didn’t have Samba installed on my Ubuntu desktop… I used “rsync”! The desktop options are also similar (or identical) between Gnome/Linux, Mac OS X and Solaris.

Windows is a highly proprietary ”beacon” of sorts on the landscape now. Ubuntu is doing wonders for the Linux world in general. Mac OS X is pushing ever forward courtesy of Mr Jobs and his zealous band of fanatics. Solaris will probably remain a niche product and go the way of OS/2 eventually (die a slow and painful death).

This operating system selection is now giving me a headache.

I use Adobe Photoshop. I play World of Warcraft (yes, I said it. I actually admitted it). To get anything above Photoshop CS2 working AT ALL in Linux (courtesy of Wine), you need to pray the Wine developers find the time to develop their software further, or Adobe suddenly decides to release a Linux version. To get World of Warcraft working in Linux, you need a supported graphics card (most Nvidia cards, or modern ATI cards) with proprietary drivers. On this note, might I add I use an ATI X1250; Screw you ATI. Screw you. Apparently this chip isn’t modern enough to let me run the official ATI drivers.

If it wasn’t for my crap graphics card, ATI being bastards and needing more memory to properly virtualise Photoshop, I think I’d actually uninstall Windows now. The utility and synergy between my Linux desktop and Mac laptop are far more useful to me than kludging around with Windows integration with either, and aside from the two examples, the software available in Linux and Mac OS X suits my needs perfectly.

I find myself wondering, if hardware manufacturers spent more time supporting alternative operating systems such as Linux, would a lot more people switch? I know I’d have my grandfather on Linux if his random choice of multi-function printer was supported fully.

P.S. Take note ATI, if you’re too lazy to support slightly older graphics cards in your official Linux drivers, I’m too lazy to continue my 15 year support of you. Next purchase: Definitely Nvidia.

H.264

I’ve taken some time to calm down after recent statements by Apple and Microsoft regarding their choice of HTML5 codecs. I’ve tried to consider all sides, and yes, I can see the (probably FUD based) uncertain patent landscape with Ogg (Theora, Vorbis). I don’t think this is the only reason for it.

Lets back up a moment and look at Flash. I personally think, though useful some years ago, it is unnecessary, cumbersome and a resource hog. Flash used to be necessary for graphically advanced websites and video. It still is for Internet Explorer (at the time of writing). I guess I back Steve Jobs stance on Flash in general. I think it’s about time we stopped using it and Silverlight. We should now embrace HTML5, Javascript and the new video tag. I still use Flash for video playback as a fallback mechanism for PPC Macs and IE<9 of course.

Now, the HTML5 drafts were being written up and someone somewhere must have said “Well, we need to pick a video format”. You can almost see the conversation:

Apple: Well, our gadgets have H.264 decoders built in, so really we can only support H.264.

Microsoft: Yeah, H.264 is a good idea, it’s err, better quality. Umm, the patents are clear too because we’ll just licence it. Yeah, that’s great.

Microsoft directs a small grin in Firefox’s direction.

Firefox: Wait a minute guys, we’re open source. We actually can’t get a licence for H.264, what’s wrong with Ogg Theora/Vorbis anyway?

Chrome: Yeah, what about our Linux distribution of Chrome? Licensing H.264 for that isn’t feasible.

Apple: Well, we don’t have Ogg decoding chips, so no offence, but screw you guys.

Microsoft: Tell you what then, we’ll allow DirectShow wrappers so people with Ogg codecs installed can view your precious open source Ogg.

Now let me explain what’s wrong with this scenario:

Web developers and hosting providers like myself now have clients requiring video content on their sites. They’re keen to use this HTML5 they’ve heard about, and I’m keen to avoid Flash. Not to mention the obvious benefit of supporting Apple devices. My last project had an additional requirement of working properly on PPC Macs, which I found to have issues working with H.264 Baseline video either through HTML5 or Flash.

I’m now looking at tripling my disk storage requirements for video content. MP4 H.264, Ogg Theora/Vorbis and Flash FLV (dependant on client requirements).

While I’m more than happy to upsell my hosting to account for this additional space, all my clients now have to pay more for their video content as a result.

Microsoft’s solution stinks of anti-competitive behaviour, as their “install a codec” policy even goes against their “bundle more codecs so people don’t download malware ridden ones online” policy in Windows 7. Similarly, why can’t Apple support the Ogg format on their desktops at least?

I don’t actually use Firefox, but I’m angry on their behalf. They’re being pushed into a corner, and I can’t see a way out for them.

Just do me a favour: Make sure you provide Ogg format video every time you use HTML5 video and show these guys, they’re not going to push Firefox into obscurity like it’s predecessor.

On a related note, I’m developing a distributed video re-encoding system to ease deployment of fully compatible video solutions. Information on this will be available on lamped.co.uk soon.

News Just In: Piracy Bad!

Every day I take the time to read my iGoogle. It has my weather, news, email and RSS feeds. There is no better place to get my daily dose of informationm and kudos to Google for managing to provide such an excellent facility. I’m aware other sites can provide similar, but they tend to be filled with a lot of extra crap I really don’t want – popups and the like.

Today I bumped into http://www.telegraph.co.uk/technology/microsoft/7545722/A-third-of-people-think-it-is-acceptable-to-pirate-software.html – an article based on Microsoft research. Apparently most people use pirated software. My last employer used pirated Windows Server, pirated Windows XP on every workstation, pirated Adobe CS3 suite, pirated Microsoft Office.

For the record, I use a legal Windows XP for gaming and entertainment, and Ubuntu for everything else. I even get my music through Spotify – I expect my sainthood any moment! If anyone has any tips for Spotify randomly crashing in Wine, that’d be lovely.

If Microsoft’s poll wasn’t so blatantly a political move in light of the Digital Britain legislation, one might suggest they change the focus and find that actually, 99% of people use pirated software, without issues. They quote figures relating to viruses and crashes, presumably in the hope it’ll scare people off. I often wonder if the Microsoft execs don’t live in a different world. Infact, I’m sure they do. While I’m on the subject, I have an old friend who works for Microsoft, I’m going to point him here and seek his anonymous feedback.

On a slight tangent: How do people start up using industry standard software, when such software is quite so expensive? I want to type a piece here about Photoshop and Gimp (yes, there’s Paint Shop Pro etc, etc. Photoshop and Gimp are the big boys of proprietary and free in my world). There’s lots to be said for cost of ownership – free support in Windows and paid-for support in Linux, and it’d be a never ending debate. In the grand scheme of things, Photoshop is known by many and despite the initial cost, you may employ trained people quickly. Gimp is less known and has training costs, and potentially harder to recruit for.

Anyway, I’ve rambled through this entire post. I don’t know what the answer is. I DO know, I won’t pay for Windows 7 or Photoshop while Ubuntu / Windows XP and Gimp will suffice. I really hope http://www.reactos.org/ gets somewhere, though I imagine it’ll suffer similar fates to DR DOS and the AARD debacle (look it up).