My job means I have to sit at my computer all day, 7 hours a day, 5 days a week, 46 weeks a year. That’s 1610 hours a year and 1/3 of my whole day (given that I also sleep about 8 hours so am not conscious I’m in my chair A LOT). This post follows on from my previous post Agonising over a replacement work chair.

I work from home which is great as it means I can get up and do back stretches every hour or so and not get strange looks when I start rolling around on the floor. Working from home also gives me some freedom in terms of what my workstation looks like and up until now I’ve taken the traditional route of office desk and standard office chair. However the chair broke this week and so now I need to replace it and wondered what you would recommend. I currently have a few ideas:

  1. Standard chair - This is the 'safe' choice, it's "just a chair", I'm not suggesting that particular chair, but just something like it. The chair I am replacing is similar to this one and I'm pretty sure that sitting in it for as long as I do has given me the occasional lower back pain and stiff shoulder that I get. I have seen an osteopath a few times and he also said he thought the chair was to blame.
  2. Fancy chair - I quite like the look of a non-standard chair, something that supports me and allows me to move properly. The trouble here is that these kind of chairs cost more than the standard. I know that paying for an osteopath to fix problems after they’ve happened rather than spending the money to get a better chair that meant I wouldn't need to see the osteopath is daft... but a decent ergonomic chair is hundreds and I just don’t have that lying around spare.
  3. Ball Chair - If I went this route I could use the 35 hours a week as exercise time and strengthen my core muscles. It would make it hard to slouch or chill out in the chair while reading documentation though and I'm not sure I could easily transition to something as radical as this. I have talked to people who use these and they’ve said that a few hours at a time is fine, but not a full day. So if I were to get up every hour and move around this is still maybe an option.
  4. Poang This would be unusual and I would need to get a new desk to keep things at the right level. But it would be a comfy chair, all my joints would be 'open', greater than 90 degrees. Plus I already have a spare Poang. Given that I work from home why not make myself comfy and sitting upright all day is not how I’d spend a day if I wasn’t working. Getting rid of my desk and going a bit minimalist might be good.

My employer has said they would pay £100 for a chair but I cannot top that up with my own money as it blurs the question of ownership and complicates things for tax. Sadly £100 doesn't go very far, I can just about get a 'standard' chair for that money, the Ball chair is also within budget. I own a spare Poang... so really it the comes down to the question of whether I want to spend £150 - £600 of my own money on a chair that I'll use for work.

Looking into quality chairs I quickly ran into the Herman Miller chairs, these have been highlighted in Investing in a Quality Programming Chair and in The Real Pain of Software Development [part 2] Phil Haack says that he likes the Neutral Posture chair – again not cheap options.

Of course most of this assumes the traditional desk and chair what about Wild Workstations for Telecommuters? With my Poang I’m getting close to the SurfChair, it’s not quite as luxurious as a La-Z Boy but it looks very comfy and like my posture is being considered which, long term, is very important. I asked this question on the RMAX forums, there are some responses with interesting links

Is anyone else using an unusual workstation set up?

Tags: , | Categories: General | LifeStyleDesign

I need to replace my chair at work; after nearly a decade it has finally had enough of bearing my weight and is now only used to dump piles of washing on. Many years ago I watched a work colleague be carried out of the office by 3 people because his back had gone. I quickly invested in a fairly decent chair for myself at home but getting one for the office has always been another story. But the point I want to make in this post is that a quality chair can really make a difference.

Waay way back in 2004 I had my first bout of back pain and it was caused by poor posture, mostly my posture at work. Sitting in a chair is not a natural thing to do and anything that we do repeatedly we train our bodies to adapt to, so sitting in my chair 8 hours a day trains me into a chair shaped person. There are some good exercises to help me beat the Office Worker Hunch, and I try to do them every day but prevention is better than cure…

Back in 2008 Jeff Atwood described how investing in a quality programming chair may be one of the smartest investments you can make as a software developer, which I have to agree with. If you follow the math in Brain, Bytes, Back, Buns – The Programmer’s Priorities Scott Hanselman breaks down the hourly cost of a US$700 chair to 19cents an hour for a comfortable butt and urges us to “Invest in your own ass”.

I think both these 2 giants have a very valid point, as a developer I spend a great deal of my day sitting on my ass so I should take steps to ensure that I am as comfortable as possible, that I am not putting my health at risk or storing up future health problems through poor posture and a bad working environment. However I disagree that it is the employee’s responsibility to invest in this themselves. Sure I should do my best to look after myself but I believe an employer also has a responsibility to look after their employees. Going back to The Programmer’s Bill of Rights Jeff says

It’s unbelievable to me that a company would pay a developer $60-$100k in salary, yet cripple him or her with terrible working conditions and crusty hand-me-down hardware. This makes no business sense whatsoever. And yet I see it all the time. It's shocking how many companies still don't provide software developers with the essential things they need to succeed.

Point 4 in the bill is “Every programmer shall have a comfortable chair”!

When my work chair broke this week I asked my boss if the company would pay for a new one. I work from home, I’m not self employed but all employees for the company I work for are home based, however if I were to work in an office and my chair broke then I would expect the company to replace it / buy me a new one. I was rather disappointed to be told it wasn’t company policy to provide desks and chairs (something I will definitely ask about next time I’m interviewing for a teleworking / work from home job). An olive branch was offered, the company will, as a one-off, buy a chair for me for up to £100. However I cannot top that up and get a slightly more expensive chair as it makes matters complicated with the tax man.

I’ve spent ages looking around for a chair that I think will provide me with decent all day support that comes in under £100. I know I could stump up my own money and buy something really decent… but, well… times are tight amigo and I don’t have a few hundred quid lying around, which is why I’m agonising over a replacement work chair at 1AM when I should be sleeping. It seems unbelievable to me that any company would seriously quibble over a few hundred quid for ensuring their workers are well looked after and happy. After all a happy employee works hard (and probably doesn’t need to take time off with back aches).

Of course maybe I should go to a bricks and mortar shop and actually sit in any chair I’m thinking of buying rather than looking up the reviews on Amazon what’s comfy to one person is not to another. It would be great if I could try out some chairs for a day each and then make up my mind… maybe there’s an idea for a business, a real try-before-you-buy venture… or maybe I should quit moaning and put my money where my mouth is, or maybe yet again I should just go to bed.

Tags: | Categories: General | Rant

This post follows on from my previous rant Profiling aspnet_Membership_GetPassword with SQL Profiler 2008 and 2008R2 gives different datetime precision, I solved the problem, it was time related and nothing to do with SQL

The problem I was trying to fix was that the ASP.NET Authentication seemed to be failing when an application was deployed on a clients servers, it was working fine for me in development and on our integration and production servers so the problem seemed to be environmental.

After setting the forms cookieless mode to UseUri (which uses the page address to pass the authentication around) I decided to use Fiddler2 and see what was happening with my cookies. So I set the cookieless mode back to default and looked at the cookies as they were being set. Sure enough the ASP.NET Authentication cookie was being set when I logged in, but when the page was posted back the cookie was gone (however not for Firefox… no idea why). Right at the end of the string there was a datetime and it was set in the past.

Turns out that the client web server was 30 minutes out of date, so when I logged in it thought the time was 9:50, it set the expiration of the cookie 20 minutes into it’s future which meant 10:10. However in reality (and I mean normal reality, not some Quantum Physics reality) the time was 10:20, so the cookie had expired and as such was being dropped by my browser.

A painful lesson because I lost over a day trying to solve this puzzle and all because the server time wasn’t able to update itself!

Tags: , | Categories: ASP.NET | Rant

SQL Profiler 2008 and SQL Profiler 2008 R2 are subtly different, while R2 respects the datetime precision the older version does not and spuriously appended 3 decimal places which sent me down the wrong path for far too long… what a crazy waste of time that was

I know that writing a post in anger is rarely the best approach, but I’ve just lost a good hour or so of my life to this problem so I’m venting a little… forgive me. What’s annoyed me you ask? Well are you sitting comfortably… then I’ll begin.

My story starts with me trying to debug a login page, the project I’m working on has just been converted to use ASP.NET Authentication Surprised smile the login works for me on my machine and on our integration server and on our production server, it even works on the client’s development and UAT servers. However when the client has been trying to login the page simply reloads – that got a great big WFT from me. So I started chucking lots of debugging output into the code, nothing fancy just Response.Write in every method and before and after every branching statement, commented out the line of code that requested the next page and tested. Unsurprisingly I saw all my debugging written out to screen. I was again surprised when the client said they didn’t get any of that. So next I cracked open SQL Server Profiler and captured the database calls.

Now it’s at this part that the story really begins; I captured all the calls and then began to replay them to try to figure this problem out. I got to one of the .Net calls and was rather shocked to see it throw an error.

exec dbo.aspnet_Membership_GetUserByName @ApplicationName=N'My App',
@UserName=N'TEST@abc.com',@UpdateLastActivity=1,
@CurrentTimeUtc='2012-04-11 09:57:35.7400000'

This threw the following error:

Msg 8114, Level 16, State 1, Procedure aspnet_Membership_GetUserByName, Line 0
Error converting data type varchar to datetime.

After I got over the fact that this was built in, untampered with code and that I had to do something about it I looked again at the @CurrentTimeUtc value – it seemed quite long, when I trimmed off the ‘.740000’  or just trimmed 3 of the ‘0’s off the sql ran fine. Ok great, maybe the failure to login was because these database calls were not returning any results.

Next I ran the login on my local machine and was not particularly surprised to see that the date was shorter '2012-04-11 10:30:28.157' and it ran without any problems. The websites were set up the same way, using the same version of .Net 2 Integrated, so what was causing the extra precision on the datetime on the client?

Nothing was, actually the sql ran fine because I tested it by writing out the results of the calls to the browser. The problem was that SQL Profiler 2008 was interpreting the call and extending the precision of the date parameter, when I’d captured the calls locally I was using SQL Profiler 2008 R2 I have both 2008 and 2008 R2 installed but only 1 instance of Profiler). What annoyed me is this difference in behaviour, as I said at the top I lost time to this. I had been sent on a wild goose chase and yes that annoyed me to write this post!

The take away from this is that while the profilers may be helpful there is no substitute for actually seeing the results that are returned to your calling code. Yes we should be able to rely on the profilers to capture this without reinterpreting it for you… but you just can’t trust them Sad smile

Tags: | Categories: ASP.NET | Rant | SQL

Joe Stagner recently challenged me to help make the web better, so I took the challenge and I’m pleased that I did because the nightly Firefox I’m using is cool.

Ok so he didn’t exactly challenge me rather he said “If you are any kind of a techie then you run some pre-release software”… what’s that you say Joe? Are you saying that unless I’m running some pre-release software I’m a chicken? Well in that case I will run Firefox Daily and make the web better!

I would say I was a reluctant techie, though if you ask people who know me they may describe me as a magpie because I seem to be attracted to shiny new toys… ooooh look at that, it’s cool… The fact is though that I rely on Firefox for my job as a web developer, not only do I need to do cross browser testing (which is a PITA but  necessary until, as I said nearly 3 years ago in Why Internet Explorer 8 disappoints web developers, “all browsers behave the same, to interpret mark-up in the same way so there is some consistency”!), but IMO the plugins are essential – especially Firebug, lori, MeasureIt, Web Developer and YSlow. In the past I’ve tried early releases of Firefox, to make sure that sites I’ve been working on would work fine on the new version and I’ve been disappointed to find that my extensions didn’t work. I ended up uninstalling and re-installing the older version, the plugin’s are that important to me.

After reading the post from Joe I thought I’d give Firefox another chance and installed the Nightly build, it didn’t overwrite my existing Firefox (v11) which was great, so I’ve got both versions installed and I’m happy with that approach. I’ve made sure I’m sending back the performance data so they can make it better. However I was a little surprised to see that the extensions I’ve linked to above claim they are not supported on (14.0.1a – which at the time of writing this is the nightly version I’m running). They are running fine, so I’m not sure why it says that… maybe it’s because they were already installed and somehow the stable release is powering the extensions in the nightly… I don’t know… I’m clutching at straws.

The nightly is nice though, when scrolling it eases the last bit, so when I spin my mouse wheel to get down the page quickly as it gets to the end of the page the scrolling slows down and nicely eases to the end. It’s not a killer feature, not something I can’t live without, but it’s an example of a little touch that makes it feel better. Bravo!

So if you’re slightly adventurous give it a try Smile

Tags: | Categories: Review