A new design for 2009

Out with the old, in with the new

Out with the old, in with the new

I don’t really go back and look at a blog in a browser once I’ve found one I’m interested in.  RSS feeds, Wii versions, compact mobile versions and Twitter have all drive me to the information without having to monitor streams and streams of bookmarks all day long.  Soon enough Google Wave will crash its way in and make it even less likely anyone will ever even see your site.  I can often find it difficult to motivate myself into redesigning those first impressions, here.

But the Xbox got RRoD.  So I haven’t got anything better to do.

Design

This new layout is quite a lot cleaner than the old one – especially the minimalist header which for the first time has no sign of the beloved post-it note.

The sidebars used to take up most of the screen space on my 7″ eee pc, so they’re now completely collapsible giving more screen space to the posts.  A feature which wasn’t possible with the old layout because of the really poor way I laid it all out.

Functionality

I also wanted to use the redesign to play around with some jQuery, so the underlying code is cleaner and more modular than it was before.  Being able to move the sidebar boxes probably isn’t particularly useful yet, especially as I’m not saving the preferences – but it’s a nice demo, anyway.

Facebook status is gone.  Twitter status is in.

The navigation is a lot clearer and to the point, including adding my recent job-hunting-related portfolio page to the list, as a welcome reminder to myself that I must endeavour to update it regularly.

Speed

Last but not least, the content now loads before the sidebars.  It’s an obvious mistake to fix really – but I’m pleased it finally is 🙂  I’ll be optimising more with the help of Google Page Speed, but I’m too lazy to do it today 🙂

Your thoughts?

Leave me a comment to let me know what you think.  Good, bad, or just plain ugly?

The Hostel Life for me – a retrospective

It’s been a month since my last blog post and it really is about time I posted again. Not being able to think of something to write about, I found this old unpublished post in the vault, whilst doing a routine clean-up of PDAs, phones, and memory cards. I’d written this just after I left Mostar, Bosnia, and started on into Montenegro. It has been tirelessly restored by a dedicated team, and is reproduced in its full form, here for you.

Excluding the quick 10-15 minute power naps on the bus this morning, it’s now hour number 33 since sleep was my nearest and dearest friend.

After the tour pretty much wiped out any energy I might once have owned, we left the hostel en masse for the nearest alcohol we could find… Small twinges of bad ideas probably began around to be realised around that 30 minute argument between the police and the bar owners over whether they should close the bar, since it was well past last orders.

Or perhaps it all started before that, when Aaron convinced me that the 7am bus to Budva, Montenegro was a really good idea. Riches lie there. Milk, honey, that sort of thing. The alternative was a stop at Dubrovnik, which I was a little opposed to having already spent a couple of nights there back in 2004.

Although, the point it all started spiralling into the pit of really bad ideas, actually, if I’m completely honest with myself – was probably around the time we all decided that ending the evening by visiting Mostar’s only nightclub was a really good idea..

This is a weird travel-circuit – there are very few hostels, and there are very few directions in which interesting things lie. Split, Sarajevo, Mostar, Dubrovnik, Budva. The only choice most travellers in this area have is whether they’re going North or South. Both Montenegro and Albania only have 2 “real” hostels in the whole country, I’m assured. The others are clearly mere pretenders. Not hostels at all. 5* hotels masquerading as traveller meeting points, with golden bunk-beds stuffed with goose feathers from paradise, I would assume.

Most people I’ve spoken to about my holidays have asked me if I wouldn’t prefer travelling with other people instead of on my own. If you’ve never stayed in a hostel or you enjoy the opportunity to meet with large groups of complete strangers with very different backgrounds. Now’s the time to try.

What I’m trying to say is… It probably all went wrong, when I went clubbing.

I’m not much of a dancer. The best places to drink only really serve beer, they have warm fires, a pet cat, a quiet jukebox lightly humming any number of rock classics, they’re often found on the back of a mill. They most certainly don’t have bubble machines. See, there are two types of people in this world. People who love clubbing, and the people like me. Fortunately I wasn’t the only person like me in our group, as quickly became apparent after a few beers. “What the fuck are we doing here?” asked Welsh Alun. “You’re right, I hate clubbing”, I replied. Our separatist group quickly grew in numbers, as we all stubbornly stood near the bar enjoying ourselves clubbing only through the act of collectively hating it. Still not leaving, of course.

And so it turned out to be quite a memorable night. We got back to the hostel in the very early hours. Others helped me to stay awake so I could catch my bus at 6am, including a trip into Mostar so I could actually see the place “by day”. Before it becomes hour 34, and the hallucinations get stronger – I think I should probably go and find my golden bunk bed, and catch a little sleep.

GalleryTweet – Twitter for your Gallery2

This post is no longer being maintained due to budget constraints - please check the project page for the latest information: http://codex.gallery2.org/Gallery2:Modules:gallerytweet

I’m releasing the updated module for Gallery2 under the name of GalleryTweet. It was prompted by a few people mentioning they couldn’t get my earlier hack to work – so I thought I’d build something that was (slightly) more robust, and might stand to work on installations other than my own.

You might want to skip my ramblings and jump straight to the download, so here’s a link for you folks:

  1. Install by unzipping to the root of your Gallery2 installation, and activate through the plugins panel.activate
  2. Once logged in, edit your Twitter settings through the left navigationmenu
  3. You should enter your twitter username / password, and the format you’d like to send your Tweets out with.twitter-settings
  4. Now while you’re browsing the Gallery, Tweet about any images using the link below the thumbnailtweet

Please drop me a message on Twitter @kevinblake if you’ve found the plugin useful, can’t get it work, or have any other feedback.  That download link again, in case you missed it the first time:

Happy Tweeting!

This post is no longer being maintained due to budget constraints - please check the project page for the latest information: http://codex.gallery2.org/Gallery2:Modules:gallerytweet

April Fools 2009

I can’t keep the pretense up any longer, I’m not really a bodybuilder and it’s not really my new web site.  I’ve been redirecting this site to my alter-ego at kevinblake.com all day long.  Fooled ya, didn’t I?

Kevin Blake - rumours of my career change have been greatly exagerrated

Rumours of my career change have been greatly exaggerated

Whilst rumours of my career change might have been greatly exagerrated, it’s been another good April Fool’s Day worldwide as individuals and businesses have thrown off any seriousness of the rest of the year by turning to Newsbiscuit-esque stories and ideas everywhere.  April 1st is of particular interest to me as a web developer, as an opportunity to proudly display the more playful side of a company, attract new audiences, and to make people smile.

So here are some of my favourites (apologies if a lot of these links don’t work.  Chances are, it’s not April 1st any more).  If you’ve been following me on Twitter today, you’ll have probably seen a lot of these already.

And lastly, in the papers…

Do you have any favourites I’ve missed?  Don’t forget, it’s never too early to start planning next years pranks 🙂

Getting document reports from Amazon Seller Central SOAP services (C#)

Developing against the Amazon API becomes a lot more straightforward with being able to get at the errors with your XML documents. Validating against the XSDs is only part of the solution, but even downloading reports can be tricky. Trouble is, the documentation from Amazon is a very closed & private sort of affair – sometimes out of date and sometimes very sparse. Perhaps they should think about a wiki 🙂

Getting at your reports consists of two parts, firstly – use the Document ID (long) you got from posting the XML in the first place.

Code block    
public DocumentProcessingInfo DocumentStatus(long DocumentID)
    {
        //Setup the service interface, set the URL of the service
        //and add our credentials.
        merchantinterfacedime myAmazon =
            new merchantinterfacedime();
        myAmazon.Url = ConfigurationManager.AppSettings["URL"];
        myAmazon.Credentials =
            new NetworkCredential(
                ConfigurationManager.AppSettings["UserName"],
                ConfigurationManager.AppSettings["Password"]);
 
        //Setup our merchant details.
        Merchant myMerchant = new Merchant();
        myMerchant.merchantIdentifier =
            ConfigurationManager.AppSettings["MerchantIdentifier"];
        myMerchant.merchantName =
            ConfigurationManager.AppSettings["MerchantName"];
 
        //Send it all off to Amazon.
        DocumentProcessingInfo myStatus =
            myAmazon.getDocumentProcessingStatus(
            myMerchant, DocumentID);
 
        //Return the status of the document.
        return myStatus;
    }

This will give you the status of your upload, as well as whether it’s complete or not. It also gives you another document ID, which you can use to get at your much-needed reports.

Code block    
public string GetDocument(string id) {
 
        StringBuilder report = new StringBuilder();
 
        merchantinterfacedime myAmazon =
            new merchantinterfacedime();
        myAmazon.Url = ConfigurationManager.AppSettings["URL"];
 
        myAmazon.Credentials =
            new NetworkCredential(
                ConfigurationManager.AppSettings["UserName"],
                ConfigurationManager.AppSettings["Password"]);
 
        //Setup our merchant details.
        Merchant myMerchant = new Merchant();
        myMerchant.merchantIdentifier =
            ConfigurationManager.AppSettings["MerchantIdentifier"];
        myMerchant.merchantName =
            ConfigurationManager.AppSettings["MerchantName"];
 
 
        ReferencedBinary incomingDoc = new ReferencedBinary();
        // the seven-digit string is the document ID number
        myAmazon.getDocument(myMerchant, id, out incomingDoc);
        IEnumerator enumer = myAmazon.ResponseSoapContext.Attachments.GetEnumerator();
        while (enumer.MoveNext())
        {
            // Print the document to standard out
            Attachment downloadedDoc = enumer.Current as Attachment;
            StreamReader r = new StreamReader(downloadedDoc.Stream);
            report.Append(r.ReadToEnd());
        }
        return report.ToString();
}

And tying it all together:

Code block    
long amazonId = #######
string report = GetDocument(DocumentStatus(amazonId).processingReport.documentID);

Your report will be in XML, and give you any validation errors that might be preventing your feed from working properly, as well as some very helpful status on the number of items processed. How did you ever live without it?