Beeston Centurions U9s sports men of the league

June 12, 2011


http://boos.audioboo.fm/swf/fullsize_player.swf

It’s starting #esendexis10

June 9, 2011

Add Filters to Views Using Named Scopes in Rails

May 25, 2011
This really helped me deliver a rather lovely solution to filtering records on Bunch Rides.

http://www.idolhands.com/ruby-on-rails/guides-tips-and-tutorials/add-filters-…

and here’s what I did: http://rides.bunch.cc/clubs/54

and the helper code:

def table_filter(filters, selected_scope)
content_tag(:div,
raw(filters.collect { |filter|
content_tag(:a, filter[:label], :href => “?show=#{filter[:scope]}”, :class => (‘selected’ if filter[:scope] == selected_scope)) }),
:class => ‘table-filter’)
end

Adam Bird

CTO

Esendex Ltd

Tel: +44 115 989 5100
Fax: +44 115 924 2969
Mob: +44 7815 777 555
Cell: +1 407 766 6620
Email: adam.bird@esendex.com
Web: www.esendex.com
Blog: adambird.com
Twitter: adambird

Esendex: Every message matters

Confidentiality: This e-mail (and any associated files) is intended only for the use of post@posterous.com and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not post@posterous.com you are hereby notified that any disclosure, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and then delete it from your computer. Messages sent to and from us may be monitored. The views expressed in this message are those of the author Adam Bird and do not necessarily represent the views of Esendex Ltd.

Security: This e-mail and any attachments are believed to be free from any virus but it is the responsibility of the recipient to ensure this is so. E-mail is not a 100% secure communications medium. We recommend you observe this when e-mailing us.

Esendex Ltd is a limited company registered in the UK, with company number 04217280 and having its registered office at 15 Warwick Road • Stratford Upon Avon • Warwickshire • CV37 6YW.

[v1.1 EN]

Can Nottingham make the most of its own creative class?

April 19, 2011
I was interviewed recently, along with Toby Reid (@tobyjbreid), by the Business Editor of the Nottingham Post. We both believe Nottingham as all the ingredients to become a creative and tech power house.

http://www.thisisbusiness-eastmidlands.co.uk/nottinghamshire/Nottingham-make-…

My interview on The Entrepreneur Show

March 25, 2011

Loading video …

I was lucky enough to be interviewed by @robwilmot on his Entrepreneur Show yesterday. It was a great opportunity to share my views on how Nottingham is going to harness some of the current successes in the creative and technology scene to really cement is position as a leading centre for the UK.

The Big M Went Bold And Got It So Right

March 23, 2011
I was at the Big M mobile conference (http://thebigm.mobi/) on Monday and am very glad I was. Chris (@bookmeister) and Mike (@m1ke_ellis) made some bold decisions in putting on this event and they paid off.

Bold Decision #1 – Bath

Tech innovation and Somerset are not necessarily two words I would associate but they absolutely showed the rest of the country what a great scene exists there. Nottingham (where I live and work) could learn a lot. It is a beautiful city that is a joy to visit. In the battle for talent that cities are (or should be) engaged in now, they have served Bath well.

Bold Decision #2 – No WiFi

Didn’t miss it, in fact I’m glad it wasn’t there. The mobile signal was good enough to get emails if anything urgent cropped up. I would imagine this was one of the reasons why people talked to each other more and probably got more out of the speakers. I go to too many conferences these days where people are too busy, surfing, and interacting with people that aren’t there rather than engaging with the speakers.

Bod Decision #3 – Price

£200 for a one day conference seemed reasonably pricey and pitching this right would have been a really hand wringer but it was spot on. It meant everyone who came really wanted to get something out of it and I’m guessing it meant they could afford the calibre of speakers that they attracted.

Bold Decision #4 – Comedy/Rock Club Venue

Forget anonymous hotels or convention facilities, more events like this should be held in this kind of venue. Komedia (http://www.komedia.co.uk/) had all the facilities and looked fantastic. People arrived and there was a palpable buzz as they went through the door into the venue proper. Going to a gig for ‘work’, brilliant. It was especially entertaining watching as a bunch of geeks spilled out on to streets at the breaks, blinking as they readjusted to a bright and very real world still existing outside.

If they run it next year I will absolutely be going as should you.

Adam Bird

CTO

Esendex Ltd

Tel: +44 115 989 5100
Fax: +44 115 924 2969
Mob: +44 7815 777 555
Cell: +1 407 766 6620
Email: adam.bird@esendex.com
Web: www.esendex.com
Blog: adambird.com
Twitter: adambird

Esendex: Every message matters

Confidentiality: This e-mail (and any associated files) is intended only for the use of post@posterous.com and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not post@posterous.com you are hereby notified that any disclosure, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and then delete it from your computer. Messages sent to and from us may be monitored. The views expressed in this message are those of the author Adam Bird and do not necessarily represent the views of Esendex Ltd.

Security: This e-mail and any attachments are believed to be free from any virus but it is the responsibility of the recipient to ensure this is so. E-mail is not a 100% secure communications medium. We recommend you observe this when e-mailing us.

Esendex Ltd is a limited company registered in the UK, with company number 04217280 and having its registered office at 15 Warwick Road • Stratford Upon Avon • Warwickshire • CV37 6YW.

[v1.1 EN]

Going International (live’ish)

March 9, 2011

Thanks to @pcmcreative for live streaming my talk at Nott Tuesday last night.

http://static.bambuser.com/r/player.swf?vid=1481211

Let’s Show Graduates What Nottingham Can Offer

March 3, 2011
I think it’s time we showed graduates and under-graduates that Nottingham not only represents a great place to get an education but also a fantastic city in which to build a life and career. We have some great creative and tech companies in the city crying out for talented people to join their successful teams. We need to connect people with these opportunities before they depart for more ‘traditional’ destinations.

To do this, I’m running a recruitment event for internships, work placements and graduate positions in the creative and tech companies of Nottingham.

Before you run a mile with visions of milk-rounds and corporate presentations I’m going to set it up it in a way that better reflects how we, the new wave of businesses in the city, operate.

While I appreciate that we’re all often in ‘competition’ for the best talent we can get, a collaborative approach will reap for more benefits for us all. Let’s level the playing field a little and work together to represent Nottingham to the next generation of talented individuals so they can join us in changing our own particular worlds.

So here’s the, current, plan

1. Contribution to the costs are in proportion to the employers size. I’m looking for a couple of larger organisations to underwrite the event (Esendex will be one) in order that we can get it up and running. Current thinking is: 1-5 employees £75, 6-15 £150, 16-30 £300, 30+ £600.
2. No presentations, no formal standing up in front of a room full of candidates. Each employer will be represented by a number of existing team members (in proportion to the number of opportunities/size) there to discuss them with the prospects.

3. Venue will probably be something like Antenna and the costs are to put money behind the bar and some simple catering.

4. Promotion is through word of mouth, contacts, social media and every other way we all know how. Of course the success of the event will rely on everyone knowing about it.

5. Participation numbers (both employers and candidates) will controlled and ticketed, using Amiando probably

6. I’m looking at April as the best time to run it.

Firstly, let me know what you think. What have I missed, what could be improved, what help can you give in promotion? Please use the comments so we can have a discussion.

Secondly if you can offer opportunities to graduates or under-grads then come direct: adam.bird@esendex.com, @adambird

We’ve started something in Nottingham, let’s push it to the next level.

Base View Model in ASP.NET MVC

November 8, 2010

I needed to reference some user context variables from within my site master page that had some logic behind their retrieval.

In this example I need to choose the display language for a user.

  1. Check cookie present indicating user’s language preference
  2. if not use HTTP language header
  3. if not use the application default language

The pattern I’ve ended up using is to implement a base view model from which all my specific view models inherit as follows:

public class BaseViewModel {      public string UserLanguage      {       get       {           return HttpContext.Current.Request.Cookies["language"] != null         ? HttpContext.Current.Request.Cookies["language"].Value            : CultureInfo.CurrentCulture.TwoLetterISOLanguageName;      } }  }

 

I then use the generic class for the master page

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<BaseViewModel>" %>

Which then allows me to reference the model in the master page and keep the logic for deciding the language to display centralised.

Not sure I’m wholly happy with the inheritance as it adds a level of dependencies which smells a bit off but in the small application I’m working in it was easy to implement and does what I need.

UI Integration Testing with CassiniDev and WatiN, not Selenium

September 30, 2010

This was to be my first foray into UI integration testing. I’ve always been a sceptic, scare by the brittleness of any kind of recorded UI test. Luckily Gemma and Jonathan in the dev team persisted and showed me Selenium RC and WatiN. Both these solutions allow you to write the integration tests in code, a critical requirement for me.

Also key for me was this had to work in Hudson, my chosen Continuous Integration server, so simple deployment and management was key. I love being able to check everything I need into source control and have it ‘miraculously’ run on the CI server with little or no config.

The first thing I needed was a deployable web server I could, ideally, run in process. Enter CassiniDev and specifically the CassiniDev4-Lib.dll. Now this was really tricky to get going ;) .

1. Add reference to CassiniDev4-Lib.dll

2. Put following code in my TestFixtureSetup

_hostServer = new CassiniDevServer(); _hostServer.StartServer(@"..\..\..\clubrd.web");

 

Selenium wasn’t quite so simple.

It failed the simple deploy requirement because you have to run the Selenium Server and then use the RC libraries to interact with it and send commands to then run on browsers.

It also has/d a bug where it sends a HEAD before it sends a GET which breaks if your MVC Controller Action as an HttpGet attribute. It sends a 404 because HEAD isn’t acceptable.

Sky from the CassiniDev team was über-helpful finding this out for me http://cassinidev.codeplex.com/Thread/View.aspx?ThreadId=227174.

WatiN was a different story though. Very simple to use and all run in process. There were a couple of gotcha’s though.

I had to make sure NUnit was properly running .net 4, stackoverflow helped me there http://stackoverflow.com/questions/2635794/nunit-fail-with-system-argumentexception-the-net-4-0-framework-is-not-available

And I got a rather gruesome COM exception when I pushed it all up to my CI server. 

NSystem.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess) at WatiN.Core.IE..ctor(String url)

Luckily I found this post that talks through setting the COM permissions correctly for this kind of issue. Specifically giving the correct permissions to the user account used by the Hudson server. http://www.stuffthatjustworks.com/How+To+Fix+UnauthorizedAccessException+Retrieving+The+COM+Class+Factory+For+Component+With+CLSID.aspx

Early days, but I now have a green build that includes actually navigating to one of my forms and entering text within an integration test.

Selenium seemed to be the obvious choice for UI testing. I read somewhere that Google is throwing loads of effort into developing it so it would be a good horse to back. However, when I look at my requirements I don’t need what Selenium offers.

Multi, cross-browser testing is nice but I’m just looking to confirm stories are operational and routes through my application are valid. The simplicity of WatiN seems to satisfy that nicely.


Follow

Get every new post delivered to your Inbox.