H’ok, I’m now on Twitter, and I’ve added the Tweet button to each invidual blog post – let’s see what that does :-s
Now I’m definitely going to bed
H’ok, I’m now on Twitter, and I’ve added the Tweet button to each invidual blog post – let’s see what that does :-s
Now I’m definitely going to bed
Well, thanks to a lovely anxiety attack yesterday (due to the steroids I hope), driving is out for me at the moment. I’m feeling very shaky most of the time, but not weak shaky, it’s more like my torso is vibrating occasionally, it’s most odd.
I’ve been getting lots of rest which is good, but it’s during the day which is why I’m still up at 1:37am. I’ll be going to bed in a minute, and I’ll be sporting a pirate eye-patch, gaarrrrrr.
Incidentally, The Hurt Locker wasn’t really worthy of an Oscar, and Hot Tub Time Machine is nowhere near as funny as The Hangover. Feel free to disagree.
Nothing much to report, I’ve just added my PlayStation Portable ID to the footer, have a look.
And yes, I know I’m not much of a gamer :p
The Telegraph reports on a shock finding that exercise is good for fat people and it is extremely unlikely that fat people’s genes have a pre-disposition to weight gain.
The report was produced by the “Medical Research Council’s Epidemiology Unit in Cambridge”, by “analysing the genes of over 20,000 men and women aged 39 to 79, looking for 12 genetic markers known to increase body mass index (BMI) and the risk of obesity.” (note: items in quotes and copied and pasted from main article, I’m lazy).
Oddly enough, they found that “our research proves that even those who have the highest risk of obesity from their genes can improve their health by taking some form of daily physical activity.”
I’m sure this comes as no surprise to any sensible person. The body is a machine – feed it too much fuel and not burn it off, and it stores it. As lard. Eat 2,500 calories a day, burn off 2,500 calories a day – no weight gain.
I know this from personal experience: I like my food, but I’m careful what I eat and exercise regularly to keep my weight down. When training for both of my black belts, I increased my level of exercise to kickboxing 2 – 3 times a week, and jogging / running 40 minutes 2 -3 times a week. My weight went down from 12st 10lbs (way too high) to an even 12st. In other words, by exercising, I lost weight – amazing!
Now I’m not training as much, the weight is creeping back up to 12st 5.5lbs, which is no good at all. What’s worse is that I’ve been signed off work sick for two weeks with strict instructions to rest, not even jog. So, what am I going to do? Restrict my food intake, of course, and do some gentle walking.
I’m staggered that we (the rest of us who earn a living) are paying for people to have obesity operations on the NHS, when they should have some self-control and stop shoving pies down their throats. Education (or a lack of) has a huge part to play as well, with some fat people not knowing what foods are healthiest.
Incidentally, we’re now allowed to call obese people fat
I’ll sum up this post by what my late father always used to say on the subject of people’s weight: “There were no fat people in Belsen”; he was right.
So, Wednesday of last week, I noticed a funny taste in my mouth (no sniggering at the back), and my gums and teeth felt a bit odd. This carried on for a few days and on Saturday morning, I couldn’t curl one side of my lip back to do my teeth. I thought nothing of it, and went of with my wife and son (and my wife’s mum) for a fun day on fossil-hunting on Barmston beach near Bridlington, which was great. We also had a fantastic meal at Rags, Bridlington as well.
So, Saturday night comes round and my face starts feeling really funny and I lose the ability to speak clearly – well, as clear as usual. A quick peek in the mirror and a shocked looked from my wife confirms that the left-hand side of my face has dropped quite a bit, and my left eye doesn’t close any more.
A quick look online led me to believe it was Bell’s Palsy (not a stroke) which affects the facial nerve and can clear up in anywhere from six weeks to nine months. Understandably, I went to bed a bit dejected and visited Derby’s Walk-In Centre on Sunday. After not too much of a wait, I was seen by a couple of doctors and they confirmed it. On the plus side, my blood pressure and oxygenation was perfect
They decide not to give me any treatment, and tell me to see my GP on Tuesday.
Tuesday rolls around with no improvement, so I go to my GP to make an appointment. This, apparently, can only be done over the phone and not in person, but after a bit of haranguing from me, the receptionist sees sense and puts me in to see the triage nurse who then makes an appointment – complicated, eh?
When I see my GP, they definitely confirm it’s Bell’s Palsy, I’m seen by another doctor who confirms it, and by a fifth-year student who also thought the same. I’m then put on a max dose of a steroid (which should have been done by the Walk-in Centre apparently), and sent out to buy “liquid tears” for my eye, and eye patch, and worst of all, artificial saliva. I mean, ugh.
So, I’m not sure what’s caused it, it could be stress as I’ve had a lot recently with my job, but I resigned recently, so stress over. It could be illness as Bell’s Palsy i’s linked to herpes simplex, the “cold sore” virus and I had a sinus infection recently (I think). It can also be caused by nerve trauma, and I did get punched in that side of the head recently in sparring. By a girl :s
It’s also a real pain that I can’t pronouce my Bs and Ps correctly, as telling someone you have Bell’s Palsy is a bit difficult. Fortunately, there’s not been too much drooling, but drinking is a real pain, I do like my tea but most of it ends up on the floor now. I’m having to drink through a straw, which requires me to hold the left side of my mouth shut to use. Fortunately, I have my sense of taste back and my gums and teeth no longer feel anaesthetised, so that’s always good.
Anyway, more updates on my condition to come, or maybe not, as really, it’s not that bad. The steroids I’m on could lead to suicidal tendencies and hallucinations, but no signs of those yet
There’s been a lot of talk in the broadsheets (not OK! magazine, oddly) about the rising stars of the new Cabinet. Theresa May has done well, until that mis-step banning the EDL (English Defence League) from having a protest march in Bradford. Gove is talking his schools plan up a lot, though it will be a while until it comes to fruition, and Iain Duncan Smith seems to have George Osborne’s backing for his much-needed welfare reforms.
The man who is standing out at the moment is Eric Pickles, currently wielding the sword of cuts against various quangos. His latest target, however, is all the visual clutter on England’s streets – all the “20mph zone” signage, all the arrows, all the pointless signs, the railings preventing you from getting somewhere, etc. As such, he has written to councils reminding them that they are not legally required to put up so many signs, and the money saved could be spent on other things, like repairing the roads.
A good example of pointless signage can be found in the next village: I turn into a country lane (which has no footpath) and halfway along the road is a sign, saying “No footpath for 450 yds”.
I KNOW THERE’S NO FOOTPATH – I HAVE EYES. There was no footpath on the main road, there was no footpath for half the road distance, now there’s a sign telling me there’s no footpath for the rest of the road? I KNOW. What a pointless sign.
Apparently, the Govt. will be asking members of the public to send in pictures / locations / complaints of all this clutter and will be acting accordingly, like they did with the Freedom Bill. I’ll be sending the aforementioned sign in, along with many others. I’m also considering putting a page up on this site with my pics.
Anyway, it’s good news – now, if we can only get them to put roads back to the speed limits they were before speed cameras came along and the limits were reduced and cameras were slapped on them BY LABOUR to raise revenue, that’d be great
Finally! I don’t know where he’s been, but it’s great to see his refreshing “no nonsense” views on the news review
Well, that’s all, really – installed the WordPress app onto my phone (Android OS) and away we go
As we know, the presence of an app_offline.htm in an ASP.Net site will take the site down for maintenance or update, displaying whatever is in the file, e.g. an image, and some informative blurb. As ScottGu says, make sure the file is larger that 512 bytes to avoid the IE6 “friendly errors” feature.
Whilst it’s a convenient way to bring down a site, it brings it down a bit harshly, shutting down the App Domain and all sessions, which is really nice if your visitors are half-way through a financial transaction. I wanted a way to keep active users in their session, send new visitors to the site offline page and track how many people are still connected to the site.
My solution is two-fold: a simple HttpModule and a PerfMon graph. First, the HttpModule:
context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute);
void context_PreRequestHandlerExecute(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
HttpContext context = app.Context;
if (System.IO.File.Exists(context.Server.MapPath("~/site_unavailable.htm")) && context.Session.IsNewSession)
{
context.Response.Redirect("~/site_unavailable.htm");
}
}
<add name="SiteUnavailable" type="YourNamespace.SiteUnavailable"/>
That’s it – just create a file called site_unavailable.htm in the site root, filling it with an informative text, a logo, etc., and make sure it’s over 512 bytes. Now, when a vistor comes to the site and that page exists, they’ll be redirecetd to it. If you create / rename the file when users are active, they’ll still get to use the site until they end their session and try to visit the site again.
How’s it work? Well, the code speaks for itself: it checks for the site unavailable file and whether the session is a new one. If it is, then the user is redirected. The PreRequestExecuteHandler event is used because the Session object is available at that point, but main processing hasn’t really started yet. Yes, it’s looking for a hard-coded filename, but that’s what you’ve got with app_offline.htm as well.
That’s half the problem solved, now how do we see how many users are connected to the site? Enter Perfmon…
Now, when you enable the siteunavailable.htm page, you can watch the perfmon website connection counter go down as users finish their sessions. When it gets to zero, you can go ahead with your update, then rename the siteunavailable.htm page (to _siteunavailable.htm, for example) and hey presto, your site’s back and updated.
As an aside, it may help the perfmon connection counter reach zero quicker if the content of your siteunavailable.htm page says something like “please close this page to enable us to complete the upgrade quicker”, and it would be helpful to provide an estimated time of completion.
Thoughts? Comments?
If, like me, you’re on the T-Mobile network (formerly known as One to No-one), they’ve teamed up with Blockbuster for a great night in offer, presumably to counter Orange Wednesdays.
Simply text “night in” (without the quotes, natch) to 3000, and you’ll be sent a code. Go to your local Blockbuster store, show it to the chap / chapette behind the counter and you’ll get a film and a game (or two films), some cola, a bag of popcorn and a bag of sweets for just £5 – for two nights.
There are some restrictions, namely the code is only good for Mondays to Thursdays, but if you rent on a Thursday, you can return the film late on Saturday. Also, the cola, popcorn and sweets are all Blockbuster’s own-branded, but I can recommend the popcorn
Further details on T-Mobile’s Night In microsite, if I wasn’t so busy painting my house, I’d be taking advantage of this…
Today is St. George’s Day, and as a proud Brit, I’m celebrating – quietly, of course. I wouldn’t want to be accused of being a racist, or scum, or a BNP supporter just for flying The Cross of St. George…
Unfortunately, that’s very likely to happen thanks to the hatred cultivated by Labour towards anyone who dares to be British and White and proud about it, or speak out about unlimited immigration without seeing the “benefits” it brings us.
Still, soon I hope we will be shot of this truly awful, incompetent Labour government and have a strong Conservative government that can start repairing the huge damage done by Labour to this once-great Britain.
Can’t believe Sky have just reported, as breaking news, a plane landing – on a runway, no less. Yes, I know it’s a big deal in some respects, but geez, there are other things going on in the world, er, like the General Election…
Not existential angst, but wondering where I need to position myself as a developer. I’ve missed out on some technologies, and I’m wondering how far down the rabbit hole I should go with some of them.
I’m still very much a web developer, so I certainly should be looking at ASP.Net MVC and jQuery, as well as upgrading my knowledge in the standard Web Forms, not forgetting the AJAX toolkit as well. Behind the scenes, looking at data storage layers such as LINQ to SQL and their enterprise patter, as well as applicable patterns such as the Repository Pattern and even the Active Record pattern.
That’s where things get, frankly, a bit dull and convoluted. I read a great post recently about how coding these days is how to link one library to another, or just whack some XML together to control a Spring.Net DI solution. I, like the author, can’t find the fun in that. Sure, it may get projects done quicker, and it’s standard, but it can also be a lot of overkill. That’s why I’d prefer a simple approach to projects, nice and lightweight, no navel-gazing about what might be required two years down the line, not coding an interface for every single class because “it’s the right thing to do” although it’ll never be used, adding tests to every single method (even private ones) because “it’s the right thing to do”, etc.
I’m a firm believer in Jeff Attwood’s mantra YAGNI – you ain’t gonna need it. If the customer hasn’t asked for it, and if there’s no chance it will be required within a year or so, don’t code it. Write your code in such a way that things can be replaced easily (and yes, I guess that does mean some interfaces, but surely not on every single bloody class), and keep it simple. I use as many syntactical shortcuts as I can, as I’m lazy, but that’s why they were added to the language.
Anyway, a bit off topic – I’m really writing this as a store for where I should be heading. I am a Microsoft chap, and I enjoy the products they put out and their technoology approaches. I find it amusing when I suggest a Microsoft solution (such as ASP.Net’s Forms Authentication) and am told by a colleague that he’ll write it themselves – how many people does Microsoft employ to work on stuff like this? How much R&D do they do? And one person thinks they can do it better? Heh, it’s another contradiction, I guess – I said I don’t like merely linking up one library with another, but I guess you could say that’s all I’m doing with the Forms Authentication, but hey, it’s sometimes a pain to get right and it’s fun wreslting with it BUT it provides a hell of a lot out of the box…
And don’t get me started on form validation – “oh, we don’t use the validation controls because they don’t work”. Yeah, ok, I’ve used them countless times and they seem just dandy.
Gah, back on topic. I really should be looking at what’s new in Windows Forms and the top best practices in that area as well, and look at Silverlight as well.
Hmmm, lots to cover – I’d better get started…
I’m a bit late to the party here, but seeing as none of the mainstream papers are carrying it, even if a couple of people read it, it’s worth it.
Old Holborn reports that the leaders of the English Defence League were arrested today on the way to a static peaceful protest in Edinburgh. Moreover, some of their homes were raided by armed police and computer equipment was seized – here’s a full report on what happened from the EDL.
I don’t see the police doing any raids on United Against Facism.
Make no mistake, a vote for Labour is a vote for more of this treatment from the virtual police state Labour have built – and mostly towards the indigenous population as they force us to bend over backwards, or more accurately forwards, and take their multiculturalism bullshit, along with their now-leaked policy of mass immigration as a method of changing Britiain irreversibly.
I’m not sure what to make of the EDL, I support what they are trying to do and some may compare them to the BNP, but last time I checked, we still have freedom of speech in this country – just. If some “radical” muslim zealot can hold up a sign saying “Death to those who insult Islam” and not be prosecuted (oddly enough), surely the EDL can march carrying signs that say “Laugh at those who insult freedom” and not be arrested.
A more important point: the EDL has been deemed to be dangerous (or whatever) by Labour / the police – who’s next? I doubt they will crack down on the United Against Fascism fascists (whose slogan should be “It’s not Fascism when we do it!”), but perhaps another small minority group like Fathers 4 Justice, who got unpleasantly shut down. Then maybe something closer to your beliefs – and then you.
Again, I have to break out Pastor Martin Niemöller’s poem “First they Came”:
First they came for the communists, and I did not speak out—because I was not a communist;
Then they came for the trade unionists, and I did not speak out—because I was not a trade unionist;
Then they came for the Jews, and I did not speak out—because I was not a Jew;
Then they came for me—and there was no one left to speak out for me.
In case that’s not clear enough, and as Old Holborn says, what they do to the EDL today, they do to me tomorrow…
I cannot WAIT until the General Election and throw the current shower of shit out, and hopefully begin to reverse the horrendous damage they have done to this once-great sceptred isle of Britain.
Damn you Labour, damn you to Hell.
A quick update on my work situation: I have some. I started at the Electrical Contractors’ Assocation up in Mansfield as a Senior Developer on the 21st July. Can’t comment too much, but suffice to say they’re a great bunch of folks and it’s interesting work.