Home > Blog > 2014

All Posts From : 2014

CMS Horror Stories

We all know some CMS's are more user firendly than others, but sometimes, even the nicest CMS can be scuppered by an abysmal implementation. Usually this is either the developer not being familiar with the CMS, being on drugs of some kind, or possibly just being a bit rubbish :P

I got to thinking on this recently after being involved in some pitches where the client has stated up front that they hated Umbraco. That's quite unusual for us, most of our clients really love the CMS, so we asked what it was they hated, and got shown the CMS systems they were currently using built on Umbraco. What an eye opener! I think I'd hate my CMS if every single page was just one tab, with a single TextArea that says "Paste HTML here" next to it (and yes, I've seen an actual implementation like this).

We showed the clients some Umbraco implementations that were actual sane, and they changed their mind about Umbraco (yay!) once they saw what you could do with a decently thought out site. This isn't just something I've seen with Umbraco though, I've seen some terrfifying examples with other CMS systems and home grown CMSs as well. Without naming any names, here are some examples I've seen over the years:

  • the aforementioned every single page is a text box that you paste HTML into site
  • a site where the developers put a custom caching framework on top of the CMSs quite fast caching framework, slowing it down to the point that it had to be load balanced just to get even crappy performance out of it
  • a 10 page mobile site that had an insane amount of IOC, business logic and interfaces, probbaly the second most over engineered site I've ever seen
  • sites where all the properties are on one page, sometimes 50+ of them, with little information about what they're for, other than not particularly descriptive labels.......
  • Dropdowns to select things with mystery meat names (how are you supposed to know what Offer 1, Offer 2 and Offer 3 actually are?)

It just goes to show how important it is to think about the editor experience when you build your sites with a CMS. The site could look quite pretty, but if the editor experience is shit, the users will hate using the CMS, and they won't get the most out of it!

So, what are some of your worst CMS horror stories that you've come across?


Farewell to Arms

For as long as I can remember, I've always favoured function over form in my Laptops. From all the way back in the mists of 2001 when I got my first 15" Dell Inspiron, right up until my current (soon to be retired) laptop, my machines have been huge Cold War era looking slabs of plastic that you could beat a man to death with in a street fight if it came down to it.

All of my laptops have been beasts, none more so than my last one, which wasn't so much a desktop replacement, as a desktop motherboard and processor squished into a very large case with a battery that could charitably be described as a fairly decent UPS. That said, it was, and still is, one of the best laptops that I've ever owned. It could chew through hardcore builds and tasks like a chainsaw. It had more ports than you could possibly want to use, and was insanely expadable and upgradeable. But, it came with some significant downsides, which became more of an issue as I worked in client offices more, travelled more, and started cycling into work:

  • It was heavy (almost 10kg including the brick), it got to the point I was leaving spare bricks at random client offices, just so I didn't have to carry them round with me
  • I looked at folks using their laptops unplugged, and wept with envy, the 40 minutes or so I could get from the battery just didn't cut it
  • I couldn't travel with it, the laptop by itself took up pretty much my entire hand luggage allowance on most flights, in the end I ended up buying a smaller 11" machine for travel
  • It was noisey, the bottom of it had four huge fan intakes that ran constantly, which meant that being around me was like being around a 10kg slab that sounded like it was about to launch itself into the stars

That said, it was a fantastic bit of kit, and I always joked that no-one was going to nick it (anyone who could run off lugging that lot was welcome to it frankly).

But after a year of cycling everywhere with it on my back, and a few painful walks into Leeds, I decided enough was enough. After much thought and chatting to other devs, I decided to try a MacBook Pro and try something that combined reasonable performance with portability, and the chance to learn sme new stuff.

I'm pretty much set up on the system now, and I'm going to blog soon about how I've set my machine up to help others who might be interested in doing something similar. It's a 15" Macbook Retina and it's set up with Windows 8.1 running on Bootcamp (which I also run through a VM in OSX). My initial observations after a week are as follows:

  • The "Macs just work" crowd can go fuck themselves, seriously. I've had issues getting it set up, just like any other system.
  • That said, OSX is a much fluffier OS than Windows 8, it's much better OS for personal stuff than Windows is currently
  • The hardware is pretty damned excellent. It could do wiith a few more USB sockets, but hey ho
  • The trackpad is excellent, and I don't seem to be suffereing with the keyboard like some folks have
  • Windows 8.1 is really, really bad at handling high DPI displays, especialy with multiple monitors
  • It's light, gloriously so. Anyone who thinks the MBP is heavy is welcome to borrow one of my other machines for a month and see how heavy they think it is then
  • It's quiet, the fans only really kick in when I'm doing something nasty to either the processor or graphics card, and while they're surprisingly loud for such a slender machine, they're still an improvement on the beast

Hopefully I'll get my blog post up on the exact setup that I'm running and how I set it up done soon! Watch this space.......

Disaster Planning

I moved recently, and in the process I cleared out my home office. One of the many things I found and binned was a bunch of evelopes from around 2006. What was in the envelopes? All of the source code, along with instructions of what to do with it, for eavery one of my clients at the time, all neatly addressed and sat in draw.

Why did I do this? Well, back in 2006, not long after I went freelance, I was diagnosed with very advanced Hodgkins Lymphoma (a Cancer of the immune system). I was pretty ill, and I wasn't 100% sure what would happen, so I made a bunch of backups just in case!

I'm fine now (touch wood) but I still think about work in terms of what would happen if anything were to happen to me. These days all of my client work is on distributed source control, which makes getting the code out to clients very easy if anything bad were to happen. I also try and store any useful/important information about the code that can't be gleaned from the comments in readme files as well to help things along.

It might seem a bit morbid, but as a developer, I've come across many, many instances where a developer has buggered off mid project, not leaving much behind and then had to go in and try and salvage the project. So I'm always keen to make sure that if anything does happen to me, my client's aren't screwed.

Do you have any contingency plans in place in case anything happens to you? I'd be interested to know what others do for this sort of thing!

Time to Upgrade

You may have seen my laptop at various UK hackathons and conferences. It's a bit of a monster. It's got a full sized 17" screen (none of this widescreen malarkey), contains a desktop motherboard and processor (a fast quad core one at that), has 16GB of RAM, and can hold up to 3 hard drives (it's currently sportins 1.5TB worth of SSD and spinners). It's the most powerful machine I've ever owned, there's nothing on it that can't be replaced or upgraded (indeed it's had several life prolonging upgrades in the 5+ years I've had it) and it's by far and away one of the best laptops I've owned in the last decade.

That's the good stuff. Here's the downside, it's big. Think of the biggest 17" laptop you've owned, then double it, in both size, and weight. It's bulky, it weighs nearly 10KG including the power brick (which is actually the size of a house brick, if not slightly larger), and the battery life is a comical joke. Brand new, I got a mighty 1 hour and 15 minutes unplugged, and these days I'm lucky if I get 5 minutes. I cycle to work a lot now, and it's got to the point where I have a power brick at home and one in my client's office, just so I don't have to carry the extra weight. Taking it to events like Codegarden or other European events isn't practical, the machine accounts for pretty much my entire carry on allowance all by itself (plus carry it around for three days would be a nightmare).

Now that the battery is on it's way out, I'm starting to think about upgrading to something new, and this time, rather than just going for something that's a powerhouse, I'm going to try and balance power and practicality.

My criteria are that it must be powerful enough to do serious dev work on, enough grunt for some light RTS gaming would be a bonus, but not essential. Light enough that I can chuck it in a bag with other stuff, rather than it's own dedicted bag of doom. I'd quite like it to last at least 4 years as well.

I'm currently mulling over one of three options:

1) Bite the bullet, and get a Macbook Pro, a lot of web devs I know use them now, and I can run all the Windows stuff I need in either a VM or Bootcamp (probably a VM though). Pros: it weighs fuck all, it's well built, they hold their value well, the retina screen is nice, and hipsters will think I'm one of them. Cons: it's expensive, the specs aren't great for the money, it's not user upgradeable/repairable, I have to buy a load of additional adaptors for things like Ethernet/DVI/VGI that most real businesses use, oh and the freaky keyboard layout. This one is tempting on the weight alone though and the amount of good things I've heard from the folks I know who've made the jump.

2) Get something with plenty of grunt, that's big, but not as berzerk as my current rig. I'm thinking Alienware M17, or one of the 17" Clevo laptops that isn't a full desktop in a box like my current one. Pros: much better bang for my buck, bigger screen, easily repairable/upgradeable, all the ports I'll need are actually built in. Cons: still quite big and heavy (albeit almost half of what my current setup weighs in at).

3) Something halfway inbetween, like a Lenovo or something. Not really sure what's out there on this front, as I normally tend towards the more powerful end of laptops. Pros: cheaper! mosty upgradeable. Cons: probably won't last quite as long as my current rig.

I'd be interested to hear what other web dev types are using laptop wise. Are you one of the hip Macbook kids? How do you find it? Is it all sunshine and roses, or are there downsides too? Do you have a workhorse Windows laptop that's a good balance of performance and practicality that you'd recommend? Anything to avoid like the plague (back in the day I remember there being some terrible build issues with Vaios for example).

Please let me know your thoughts in the comments! I'm genuinely interested to find out what folks are using!

Using URL Rewriting to Restrict Access

If like me, you use Umbraco, you'll probably be familiar with the UrlRewriting.Net module that the site uses that can be used to create rewrites and redirects on your site. However, if your site is running IIS7 or later, you should really be using the IIS Url Rewrite Module instead. It's MUCH faster, supports more advanced rule matching and conditions that UrlRewriting.Net, and is extensible too if you want to write your own rewrite matching code.

If you've never come across the module before, you can learn all about it's many features and there's a ton of useful tutorials and info over on the IIS.net website.

I'm going to assume that you're familiar with how the module works, and I'm going to show you a couple of nifty tricks that you can use to use the module to restrict acess to your site, say during testing, or an Umbraco upgrade, and how to do it in an SEO friendly way.

First, how can you restrict access to the site?

Lets say you're updating a section of your website and you want to lock people out of the section temporarily. I'd normally create a page that tells the user about this, and then create a rule something like this:

<rule name="Restrict Access to Umbraco" stopProcessing="true">  
    <match url="^/umbraco/(.*)" />
        <add input="{REMOTE_ADDR}" pattern="123\.123\.123\.123" />
    <action type="Rewrite" url="/update-notice/" />

How the rule works is that it checks the path for the path ("/umbraco/" in this example) and if their IP address doesn't match a specified address (you can add as many clauses as you want for different addresses), they're shown a rewritten update notification page ("/update-notice/"). IN this example, the original URL is kept, but you could change the rule to a redirect if you'd prefer.

Secondly, how can we make it more SEO friendly?

The above approach is fine for quick stuff, or things that need to be permanently locked down, but what about SEO? What am I talking about? Let's say you lock everyone out of your site while performing an Umbraco upgrade, what happens when Google or any of the other search engines try and spider the site while you've locked them out? They'll probably see the page you've set up, and flag that the content has been redirected (or re-written, depending on how you've implemented the rule). This can negatively affect your SEO. What you REALLY want to do is return a 503 HTTP status. This tells the visiting client that the page is unavailable, but only temporarily, due to server maintenance. This will mean that Google will ignore the fact that your site is down, and stop indexing and try again later (and most other search bots will do the same).

So here's an example rule that returns a 503 status for the entire site, EXCEPT for a specific IP address:

<rule name="Return 503 For Whole Site" stopProcessing="true">  
    <match url=".*" />
        <add input="{REMOTE_ADDR}" pattern="123\.123\.123\.123" />
    <action type="CustomResponse" statusCode="503" subStatusCode="0" statusReason="Site is unavailable" statusDescription="Site is down for maintenance" />

This works very similarly to the previous rule, except that the ENTIRE site returns a 503, unless you are coming from the specified IP address. Using this technique, it is possible to safely make the site unavailable for users/search bots, while still having it available to you for testing etc.

There's a lot more that you can do with the module, and I shall post some more tutorials soon, mostly focused around SEO!