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;}
}
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.
If you’ve read my previous posts then you know am trying that 5:2 diet. 2 days of the week I fast. But that’s meant to be a 24 hour fast? Because if the last thing I eat the day before is 7pm (am trying not to snack) that means the next thing I have to eat “normally” is the day after the fast at around 6am. That’s 33 hours fasting… Is that not a bit much?
Due to my sins (it would seem) I still have to work with VB.net from time to time. But I am so used to doing this:
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.
Tonight I got a chance to play with the Twitter Boostrap. I plugged it into my MVC4 testing app (more on that in another post maybe). And I quite like it.
It’s now been a few weeks on this diet. As I said, I tried it out last year, but this years intention was do keep it going weekly. Yesterday was the first “fast” period of week 3. I really shouldn’t be blogging about it now. I should wait till the end but I couldn’t resist.
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!
Add align=’center’ as well as the style=’margin: 0 auto;’. Another simple thing I know I will forget – hence adding it here.
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.
Add a css class of cancel on to your button. That’s it. Simple!
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: