Interfaces – The Good and The Ugly

(there is no bad…just pros and cons)

I want to start off this with a positive spin. Interfaces are great. They help make your life much easier. Using interfaces is real easy too:

public interface IEntity
int Id {get;set;}
DateTime DateCreated {get;set;}
DateTime DateUpdated {get;set;}
string CreatedBy {get;set;}
string UpdatedBy {get;set;}
bool Enabled {get;set;}
int DisplayOrder {get;set;}

Continue reading Interfaces – The Good and The Ugly

WordPress new install on Windows IIS 7 with 500 Internal Server Error

Wasted 3 hours of my night working on this.  I was asked by a friend to install WordPress for them so that they can do everything.  Sounds like very little work for me.  Sounds like money for old rope.  No problems I thought. BOOM!  500 Internal Server Error. Continue reading WordPress new install on Windows IIS 7 with 500 Internal Server Error

Low Facebook page views (or why have I done all this work for nothing?)

So Facebook seem to have a random algorithm for posting to peoples’ news feeds. I did a test over the last couple of days.  I posted 3 different types of posts to my Facebook page (not timeline, a company page and it only has 450 likes) to see what the number views would be – Facebook page owners get to see how many folks viewed a post.  I was quite shocked actually.  Here are the results to find out why you might have low page views. Continue reading Low Facebook page views (or why have I done all this work for nothing?)

Tables not aligning center in some mail clients

Another one of those pesky email clients not working properly.  With the advent of MailChimp and cool CSS stuff, you kinda get lazy.  I did and forgot to add the old school version of layouts on tables.  I only added the style=’margin: 0 auto’ but Hotmail web based client actually stripped that out!

The Solution

Add align=’center’ as well as the style=’margin: 0 auto;’.  Another simple thing I know I will forget – hence adding it here.

Remove jQuery validation on specific button

So you’ve just built what is the best form ever! It has 1 set of fields, 3 buttons – save, delete, cancel. Pixel perfect styling as per the designers Photoshop file, and the CSS that anyone would dream of. And then it stops working! You click the cancel button! It validates the form!! NO! It’s a cancel button. It should stop what you are doing. Really simple fix, and am just writing it down here because I will forget.

The Solution

Add a css class of cancel on to your button. That’s it. Simple!

IIS, Trailing Slashes, and HTML extension

I hate URLs that don’t end in something.  I do.  I REALLY do.  That’s why most of the website I have built end in .html or for the MVC ones, a trailing slash.  But don’t you just hate it when a search engine or user somehow picks up a URL that doesn’t have the trailing slash? e.g. /my-lovely/url/without-a-slash ARGH!  I see it a lot on WordPress sites because of the amount of sharing going on.  I would have thought this would have come up more often, but it seems people don’t mind it.  I mind.  I think I have trailing slash and .html OCD.  I found this post on stackoverflow which was great but as always it didn’t work – too many blogs saying it does, when it does.  So for posterity here is what I did: Continue reading IIS, Trailing Slashes, and HTML extension

Email lists and duplicates

Just came across a really nasty problem which we have all faced from time to time.  Well the past couple of days it was my turn.  And email list of ~16,000 but each row having slightly different content, except the email address.  The names could be slightly different e.g. concatenated in 1 field, not there, or in the 2 correct fields (people stop have a “Name” field with first and surname  in it!). Continue reading Email lists and duplicates

ICO European Cookie Law

Many of you will know the ICO cookie deadline will hit the shores of the UK in May 2012. What’s funny is the ICO website developers are a bit crap at their job.

1. Go to :
2. Accept their cookie thingy at the top.
3. If you can, change the value of the cookie they set
– it’s called “ICOCookiesAccepted”
– change the value from “true” to “false”
4. See how their website still has Google tracking on it even though your cookie says false?!

Could that be breaking the law?