Google Code Migration : Genetic Algorithm Templates

With the closure of Google Code, I’ve moved some projects to github. All personal projects so far, but related to talks our blog posts from the past, so may still be of interest.

The first project I want to highlight again is written in C++ and implements genetic algorithms using mainly C++ templates, just to see how powerful they were. It taught me a lot about generic code, and how a poor type system can interfere with the clarity of your code. It also prepared me for one of my first talks, about Genetic Algorithms at a Beauty of Code techmeetup.

I’d like to look at a Python port, to see if my expectations of using dynamic typing would answer the concerns I have about code clarity. For now though, it’s available for reference. It’s not production tested, and there are parts that are embarrassing, but it might be interesting if you want to know what genetic algorithms might look like.

code development programming ux

User Experience Matters : Pecha Kucha at TechMeetup Glasgow

Thanks to all of you who came to TechMeetup Glasgow, hope to see you next time in Edinburgh or at Open Rights Group in Glasgow (also on Google+). The Pecha Kucha is an interesting challenge, and this was my first one, so any advice on how to improve is greatly appreciated. The slides (including the pptx download) are available on SlideShare, and I’ll add the video once it is available:

The book that I recommended in the talk is : Lean UX: Applying Lean Principles to Improve User Experience but I was also recommended Don’t Make Me Think!: A Common Sense Approach to Web Usability by Steve Krug and Rocket Surgery Made Easy: The Do-it-yourself Guide to Finding and Fixing Usability Problems (Voices That Matter) by Steve Krug which I’ve added to my reading list.

The Creative Commons graphics I used are :

Crayons 1
Clipboard and Pens
Mobile Usability Testing Demonstration

beta code development lifehacks programming

Html5 (.1) : the language of the cloud?

I’m back in Scotland now, so I’ve posted up my updated presentation for Techmeetup and DDD Dublin. This presentation should work in Firefox 4 (and 3.5 up with html5 turned on in about:config) and will mostly work in Chrome, although you will need a microformat reader such as Tails Export for Firefox. If anyone can test this on Safari or can recommend a Chrome extension, please comment below and I’ll add it to my follow up post when the talk hits Channel 9.

For those of you in Dublin who want to see the video that refused to play during the session, here it is :

As before, I would like to acknowledge the following that I used in preparing my presentation:

I would also like to thank the organisers of Techmeetup and of DDD Dublin for all the hard work, particularly for DDD where the Irish audience were unfortunately thin. I hope all the attendees will spread the word for next year.

A few things I learnt from these two sessions :

  1. The smaller room and audience in Techmeetup were far more conducive to audience participation. The room in Dublin was a little intimidating, and a lot of the audience were strangers, which doesn’t happen much at Glasgow events these days.
  2. If you want to connect a widescreen netbook to a 4:3 projector, don’t expect it to know what to do. Set it up manually or spend 15 minutes with 2 screens that cannot sync and needing a reboot.
  3. Make sure your backup is compatible with at least one other machine (hint: Windows or Mac are more popular than Linux)
  4. If all else fails, make sure you have a video of the presentation to hand.
code development programming

HTML5 and the Beta Browsers

I’ve dug out my HTML5 talk again, as I’ve been invited to present at TechMeetup in Glasgow on Wednesday. As I now use FireFox 4 Beta as my main browser (App tabs and Panorama are too good to give up), I’ve been trying to get my presentation, written in HTML5, working on it, and on the Internet Explorer 9 beta. I also tried the it on the latest release versions of Chrome and Opera. Oddly, Opera is the only browser not to display anything, given that the S5 presentation framework I use is ultimately based on an Opera demo. This may be something I have broken in the template. Opera is stuck playing the loading screen.

The presentation (that I will upload after the talk) now validates according to the W3C validator. Chrome, Firefox and IE all display the content, and all hide content when moving to the next slide, but Chrome and FireFox format the content to fit on the screen whilst IE simply lists the content. The CSS3 demos do not work in IE, suggesting that CSS may be part of the problem, although the CSS support in IE9 is light years ahead of previous versions. Certainly it appears that the layout model on IE is different enough from that used by Chrome and Firefox to merit having to redesign any site for IE. Since the w3c does not publish a rendering validator, I will not comment on which one is most standards compliant. I will merely say that even in the brave new world of HTML5 and CSS3, where rendering is more strictly defined, web development will still need to be done to the lowest common denominator.

Of the new HTML5 features in my demo, FireFox 4 has some changes to svg handling which interferes with the inline svg in my presentation, and has tidied up the UI for features such as geolocation from the previous version. Other parts of my presentation are held back by the lack of FireFox 4 support for some of the extensions I use. In particular, certain aspects of FireBug and Web Developer I use for live editing either do not work at all or are unavailable for local pages (I’m not sure which). IE follows Chrome and FireFox in not offering support for the new form input types, in partcular date and datetime. Given the problems datepickers are giving me in my day job, this is a big disappointment to me. I notice that IE, like Chrome does not animate PNG files such as the ones here, but unlike Chrome, also has the wrong background colour. IE is also the only one of the 4 browsers not to support the Mozilla <video> demos – although youtube html5 does appear to work, so this could be a codec issue. I don’t currently have access to Safari to see how well that does – I suspect it too will fail.

IE9 does have some good debugging support through its F12 Developer Tools, and, whilst the add-ons catch up, IE9 is easier to use to debug web pages than FireFox 4. Browsing through remy’s html5 demos, it looks like content-editable is more persistent than in should be in IE, because editing that page seems to persist the lifetime of the tab. Still, that’s why it’s a beta. I’m also disappointed to see that the Offline Application Manifest is not supported, as that would seem to be the perfect partner to the pin-to-taskbar functionality. Still, I’m happy to see support for canvas and inline svg, particularly given FireFox’s problems, although I hoped for a higher score on the HTML5 test (where it gets less than 100 compared to 159 for Opera and over 200 for Firefox and Chrome) and the ACID3 test (where 95 beats FireFox on 91 but falls behind Chrome and Opera on 100).

Now that I’ve finally got my hands on IE9, I’m less excited by it than I am by Chrome and FireFox. It looks as if it will still need plugins (Silverlight?) for rich internet applications, meaning that developing a full cross-platform web application means either limiting functionality for certain browsers (which will need to be done for IE6 for a while yet anyway), or writing a plugin for IE to bring it up to the level of the other desktop and smartphone browsers.

Given the pace of releases, I’m surprised how little new I can add to my presentation. Whilst every browser is moving forward, the baseline standard still appears to be where it was, there’s no cross-browser video format, no cross-browser forms support (input types or validation), no cross-browser Web Application support, no cross-browser geolocation support and no cross-browser CSS transforms. In fact, the canvas and structural elements seem to the only features in my survey with cross-browser support, and given the poor showing of canvas in the results, it’s going to be a long road to adoption, unless you’re in the mobile space.

code programming

July Tech Meetup Glasgow: The Beauty of Code – Techmeetup

The video for my Genetic Algorithm talk has been posted to the TechMeetup blog for those who want to watch it (and can withstand my stuttering 😉 ). If you want to grab the original presentation itself, it’s in the repository for the C++ template project: geneticalgorithmtemplates \ talks and presentations \ techmeetup glasgow 20090701 (edit : now moved to github)

Craig Nicol on Genetic Algorithms

Craig provided a high-level introduction to what genetic algorithms are and how they can be used.Genetic algorithms is a search technique used in computing to find exact or approximate solutions to optimization and search problems. As the name suggests, they’re inspired by the process of evolution in the natural world. The typical genetic algorithm consists of a genetic representation of the solution domain, and a fitness function for evaluating the solution domain.Craig used example to clarify the topic and his presentation stimulated an interesting discussion of potential applications of the technology.

July Tech Meetup Glasgow: The Beauty of Code – Techmeetup

Craig Nicol talks about Genetic Algorithms from TechMeetup on Vimeo.

Hope to see you at the techmeetup talk tonight.

Blogged with the Flock Browser