Tag Archives: easy

Standing Desk for Tall People and Multiple Monitors

I’m a tall person and like many developers, I sit. A lot. I’ve been feeling a pain in my back for some time now and I’m determined to do something about it. As usual Scott Hanselman has already been there and done it for you. Buy this man a beer and find a way to keep him alive. He’s our Obi-Wan. OK! Enough gushing.

  1. Exercise. I plan to work out 3 times a week during lunch so as to strengthen my core.
  2. Eating. I already eat health. I weight myself everyday, allowing for slight variations that tend to occur. The idea is to notice any drastic changes. I lost 15 pounds in 1 month due to a thyroid storm but luckily it was temporary.
  3. Standing and Posture. Sitting, hunched over at ill fitting desks and chairs has been my undoing. There have been lots of studies and developers talking about how switching from sitting to standing has helped them so I won’t bore you with the details. Needless to say, tall people are SOL when it comes to office furniture (unless you happen to work at a very nice company that makes an effort to adhere to ergonomic standards).

Did I mention I code? That’s important because we’re inherently lazy (hence the back pain). So, I researched some standing desks. Then I researched some that would fit me. Geekdesk has really nice desks and I was willing to splurge on a desk but waiting 6-7 weeks for it to ship and then paying 300+ on shipping is just not worth it.

Did I mention I’m lazy? That’s important. Because laziness breeds invention. Over my lunch break today, I finally had enough of my back pain and decided to just make my standing desk, even if it is just boxes stacked together in Jenga form. I walked around the house and found 2 things that could immediately help me.

  1. Expedit Workstation – http://www.ikea.com/us/en/catalog/products/S99861340/#/S19861339
  2. Lack Coffee Table – http://www.ikea.com/us/en/catalog/products/40198396/#/20198397

Stack these two together and you get a standing desk that works for a tall person (> 6′ 4″). Benefits include:

  • Simple
  • Works for tall people
  • No carpentry required
  • No separate keyboard tray necessary
  • No furniture destroyed (easy to put the coffee table back when guests come)
  • Supports Dual Monitors (multiple monitors is the only way to work and any solution you use should utilize this)

Standing Desk For Tall people with Multiple Monitors
This is what the result looks like. The laptop is below the desk and makes it easier to sit down when I need a few minutes to rest. I do hope you get to utilize this multi monitor solution. If you’re still hell bent on carpentry and building, take a look at the IKEA Hackers page.

//ToDo Look into getting some cushioning for the feet. I used a yoga mat today and it felt great. Only problem is that my feet started sticking on the mat after an hour. Donn Felker recommended the GelPro mat in one of his tweets and I might need to look into that too.

Advertisements
Tagged , , , , , , , ,

Poor Man’s Validation

Does your validation drive you crazy? Are you writing too much validator code? Have you lost your sense of humor?

image

Well, not to worry because now, there’s a little hack to make Validation easier.

Lets say I had a Company class as defined by:

    public class Company
    {
        public string Title
        {
            get;
            set;
        }
    }

Now, say I wanted to add validation to this so that the

  • Title is Required
  • Title must be up to 10 characters
  • Title can only be Alpha and space

In order to achieve this quickly, you can add the System.ComponentModel.DataAnnotations.dll file to your project (Make sure its the latest one from Codeplex). Then update your class definition as follows:

    public class Company
    {
        [Required]
        [StringLength(10)]
        [RegularExpression("[A-Za-z\\s]+")]
        public string Title
        {
            get;
            set;
        }
    }

Now you can run the following code to validate your class instance as follows:

    //
    // Test instantiation
    ValidationContext vc = null;
    bool bCanCreate = false;
    List<ValidationResult> validationResults = new List<ValidationResult>();
    Company _company = new Company();

    //
    // Test 1 : Acceptable test undeo 10 characters and alpha.
    _company.Title = "The Title";
    vc = new ValidationContext(_company, null, null);
    bCanCreate = Validator.TryValidateObject(_company, vc, validationResults, true);
    Debug.Assert(bCanCreate == true);

    //
    // Test 2: Failure test 
    _company.Title = "32 Pan";
    vc = new ValidationContext(_company, null, null);
    bCanCreate = Validator.TryValidateObject(_company, vc, validationResults, true);
    Debug.Assert(bCanCreate == false);

    //
    // Test 3: Failure test 
    _company.Title = "";
    vc = new ValidationContext(_company, null, null);
    bCanCreate = Validator.TryValidateObject(_company, vc, validationResults, true);
    Debug.Assert(bCanCreate == false);

    //
    // Test 4: Failure test 
    _company.Title = "abcdefghijklm nopqrstuvwxyz";
    vc = new ValidationContext(_company, null, null);
    bCanCreate = Validator.TryValidateObject(_company, vc, validationResults, true);
    Debug.Assert(bCanCreate == false);

So now you’re bound to be validator approved.

image

Tagged , , , , ,