iamhigham.com adventures in multitouch

26Jul/101

Nice GIT prompt in Bash (includes current branch)

Need a good looking prompt that shows which branch your working from, try this;

PS1='\[\033[00;32m\]\u\[\033[01m\]@\[\033[00;36m\]\h\[\033[01m\]:\[\033[00;35m\]\w\[\033[00m\]\[\033[01;30m\](`git branch 2>/dev/null|tr -d \*\ `)\[\033[00m\]\$ '

Check it....

Filed under: Uncategorized 1 Comment
21Jul/103

Dan’s adventures in SEO part one…

So, after leaving full time employment and becoming self employed I worked for a digital agency in Ipswich on a short contract. Whilst I was there I came to realise how important SEO is, I mean, I knew how important it was before but this place did it well, really well! So I knew if I was serious about my company being anything more than an umbrella for contracting I was going to have to attract people to my on-line presence which means doing a few SEO tricks.

First part of the plan is Twitter based, ever noticed that when you tweet about an unusual subject or something slightly of the norm you often get a flurry of new followers! So, as I was saying, here is the plan. Write a small on-line tool which will periodically scan RSS feeds from various sites, run all the articles through a set of user-defined (per-feed) filters, queue up the qualifying articles and then trickle those out via twitter.

That's got to work, right?

Right now, @tactusworks has next to no followers, watch this space...

EDIT : as my friend Dan pointed out, this isn't really SEO but in my mind it's all for achieving the same thing which is making your audience more aware of your existence.

Filed under: Uncategorized 3 Comments
29Jun/100

Opacity Masks in WPF / Silverlight

Discovered the opacitymask property today! If you want to be able to apply a gradient brush to an object in one direction, but change the opacity in another (think blending out objects horizontally against a background with a gradient running vertically) then you can do it like this...


<Rectangle>
<Rectangle.OpacityMask>
<LinearGradientBrush EndPoint="0.0,0.5" StartPoint="1,0.5">
<GradientStop Color="#FF000000" Offset="0"/>
<GradientStop Color="#00FFFFFF" Offset="1"/>
</LinearGradientBrush>
</Rectangle.OpacityMask>
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF03D3E0"/>
<GradientStop Color="#FF006A74" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
Filed under: Uncategorized No Comments
23Jun/100

Entity Framework users beware!

Discover a nasty little problem with EF today. If you design an Entity Framework object against a instance of SQL Server 2008 and then try and use said objects against an instance of say 2005, you can run in to all sorts of problems with data types unknown to 2005. If this does happen, pop open the offending .edmx file and change the ProviderManifestToken attribute of the Schema node.  It looks something like this;

<Schema Namespace="Model.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">

Go ahead and change to the version of SQL server you plan to deploy to and hey presto no more "Type datetime2 is not a defined system type" errors etc etc

More info here

Filed under: Uncategorized No Comments
22Jun/100

I like Silverlight, there, I said it!

Anyone who knows me is very aware of the fact that I am a big Linux fan and have no doubt sat in despair as I have bawled on and on about how great it is, which it is. I can certainly remember sitting working on a website with a colleague using ASP and VB6 COM components asking ourselves how it was our employers had missed such technology as PHP and plumped for the inadequate Microsoft offerings.

Lets get one thing straight here, in my humble opinion, Linux is and always will be a much better hosting environment for web sites. It's less resource hungry (who needs a UI when the server's primary job is to serve web pages), is in wider use and is free, ticks all my boxes that's for sure. Not one day goes by where I don't clap eyes on an email that says something along the lines of "Is anyone on server blah blah blah, I need to get on and all the connections are used up", two connections! TWO! I mean c'mon, the last time I checked a b'gillion people can log on to a *nix server!

Rant over, what I was going to say before I got on my pedestal, was that WPF and Silverlight are actually in reflection (after using them for a while) a pretty sweet offering, for the job they were intended. I use WPF and C# for all of my work in multi-touch applications, I now wouldn't dream of trying anything else, the language just fits and the tools albeit very visually focused are really good. I love using Expression Blend, it makes designing interfaces an absolute breeze and some intelligent individual (martin fowler?) came up with a great pattern (MVVM) based on MVC for binding visual objects to data, brilliant!

That said, if I want to build a visually rich interface for a web application that I can't acheive using HTML and jQuery then I might go for Silverlight. Yes, there is loads of stuff in WPF that you don't get in Silverlight but you can work around all that pretty easily.  This leaves one problem, hosting, I wouldn't touch let alone pay for Windows Server. So, I want to be able to build a Rails application and come up with some easy way of making it play nicely with a Silverlight front end. Here is what I have planned;

1) I build my skeletal rails application generating scaffolds for all of my data entities.

2) I write a rake task that generates (and maybe compiles in mono) a Data Repository style interface to all the RESTful resources generated by rails

3) Import this in to my Silverlight app and away I build, binding visual shit to de-serialised objects from Rails.

4) Deploy on to Linux and laugh about the very thought of using Windows as an application server.

What do you think, genius or complete waste of my time?

P.S - Read this book, it's bad ass!

Filed under: Uncategorized No Comments
22Jun/100

Twitter!

Apparently, this should post to twitter

Filed under: Uncategorized No Comments
22Jun/101

New server, new on-line beginning

I have just started renting a brand spanking new server in the heart of a super-fast German data centre. So I am currently moving sites over from my Slicehost virtual server, sorry Slicehost, nothing personal, its just for a little bit more cash I can get a dedicated box. This is a resurrection of my old multitouch blog with a bunch of other stuff thrown in for good measure. Peace. Dan

Filed under: Uncategorized 1 Comment