Executive Stand Up Desk Conversion DIY

Recently, I found myself in a situation where I wanted to begin using a stand up desk, yet I didn’t want to stop using my nice executive-style desk.  The solution – convert my existing desk to a stand-up!  And I have to say, I’m very glad that I did.  The reactions I get when people first see the desk, and then press a button to watch it suddenly transform into something new is absolutely priceless.

The conversion process presented many challenges, so I hope to provide a succinct, yet helpful tutorial for any other DIY-ers out there who want to do something similar.

First, to whet your appetite, here is a picture of the desk that I converted:

20171113_200917.jpg

And here is the end product:

20171113_203323 - 25

I’ve uploaded a few videos, too.  Check them out!

https://youtu.be/WBKNx2g3mPc

https://youtu.be/u14myGvdgCk

The Linear Actuators, Control System, and Power Supply

First thing you need to do is get some the harder-to-find items.  The legs themselves are linear actuators, which are connected to a control panel and power supply.  For this desk, I headed over to Progressive Automations and ordered the entire thing as a package.  I went with a package because it eliminates most of the problems associated with keeping the legs in sync.

I did quite a bit of research, and the Progressive Automations FLT-004 is the biggest, largest, quietest, fastest, and highest quality I could find.  I wanted to make sure that these things could handle any weight I threw at them for a few reasons. First, I have multiple monitors.  Second, I intend to continue this project by making the entire desk tiltable, allowing you to lay down while you work.  I’m unsure how much that portion will weigh, so better safe than sorry.

Another benefit of this package is that it handles the syncing of the legs for you automatically.  For example, the rear-left leg won’t raise or lower faster than the other three legs, regardless of how much weight you place on a particular corner.  This is very important – because if you just use any old linear actuator, you’ll run into problems with the four legs not extending at the same rate.

You can find the model I used here: https://www.progressiveautomations.com/flt-004

Unboxing

I took a few pictures and a video of the Progressive Automations system after unboxing.

20170124_181623

The Desk Top

The next step was to remove the top portion of the desk from the “cabinet” portion.

20170428_224532

20170428_224544

Adding a Mountable Surface

After doing this I found there wasn’t a large enough surface to mount the legs to.  So, I decided to purchase a piece of high-quality plywood and cut it to fit the hole underneath the drawer.

20170428_224821

20170428_224830

Attaching the Legs

Once the mountable services were added to the bottom of the desk, I was then able to attach the legs using #14 3/4″ sheet metal screws.

20170501_115909

20170502_094602

Testing the Legs

Now that all four legs have been attached, I tested the desk out.

20170502_122000

20170502_122116

Making the Desk Mobile

Since this desk is very, very heavy, I decided to add wheels.  In general, you won’t see wheels added to a lot of stand up desks.  I imagine the reason is because when the desk is in “stand-up” mode, you don’t want it rolling around on you.  However, since I also have a desk base in addition to the four legs, I have something that I can attach the wheels to to allow the desk to be rolled around when not in “stand-up” mode.

I decided to add four casters to each “base”, or set of drawers under the desk.  That means there are eight total casters.  The casters I decided to use are called made by a company named Woodtek and are model #163703.

619XTR5uqzL._SL1001_

I modified the the caster quite to remove the ability to change the wheel height.  I also added washers to the caster to force to to sit in a certain position.  Here is a photo showing the modified caster.

20170602_100201

I then mounted the caster so that the wheel barely rose above the edge of the base.

20170602_100222

Once all four casters were added to a desk base, it looked like this:

20170602_100248

20170602_103215

Mounting Power to the Desktop

The problem you now run into is that when you switch between “stand-up” mode and “sit-down” mode, the electric plugs for your monitors and computer need to move with the top of the desk.  To address this, I ordered a mount to hold my battery backup.  The product description for the mount is “Oeveo Universal Mount 600-10H x 6W x 10D | Adjustable Computer Wall Mount, UPS Mount, or Other Electronic Device Mount | UNVM-600”.

61jKyQmHxNL._SL1000_

In addition to the battery backup, I also mounted a large power strip.

41tTaWJ0wLL._SY90_

And then used J channel for cable management.

413la NSFoL

Mounting the Control Box and Battery Backup

The Progressive Automations Control box easily mounts to the bottom of the desk.  I then used the Universal Mount described above to mount the battery backup.

20170928_143723

Conclusion

I’ve been using my desk for over a year now, and I absolutely love it.  If you’re looking for a much fancier stand-up desk than what you traditionally see out there, definitely give this a try.  It is absolutely worth it!

I’ve uploaded a few videos, too.  Check them out!

https://youtu.be/WBKNx2g3mPc

https://youtu.be/u14myGvdgCk

Advertisements

Sys.WebForms is undefined on iPad

Is your site working perfectly fine everywhere except as an iPad full-screen application?  Is it giving you a “Sys.WebForms” is undefined error in javascript? Or is it acting like ajax is disabled in some other way?

This was an incredibly difficult problem to track down, so I thought I’d share it here to pass on the knowledge.

In my case, I was using Telerik’s RadScriptManager, but later I found it wasn’t limited to Telerik’s controls, but to any ajax-related code.  However, I point out Telerik in particular because on their forums they offered a dozen solutions that led me in the wrong direction.

The root problem is that the iPad full-screen app gives a user-agent header that ASP.Net does not recognize, so it believes that the browser does not support ajax.  This results in the ScriptManager not including “MicrosoftAjaxWebForms.js” and all sort of other things related to ajax panels not loading.

So the solution is to tell ASP.Net that the user-agent in question does support ajax.  Luckly we have a custom base page for all of our ASPX files, so I only had to add this in one place:

protected override void OnPreInit(EventArgs e)
{
    if (Request.UserAgent != null && Request.UserAgent.IndexOf("AppleWebKit", StringComparison.CurrentCultureIgnoreCase) > -1)
    {
        this.ClientTarget = "uplevel";
    }

    base.OnPreInit(e);
}

I found this solution here.  Thank you! http://blog.lavablast.com/post/2011/05/29/Gotcha-iPad-versus-ASPNET.aspx#comment

WARNING: EF Code first may only be appropriate for children

I would like to warn anybody who wants to use code first (specifically TPC inheritance) to only use it when you plan to stick with the simple scenarios that you’ve already seen proven out through examples on the web.  Once you begin to stray from these examples, you’ll find yourself with code that doesn’t work with no way to fix it (since, per the Microsoft way, the important classes are all “private internal”).  Here are just a few examples of limitations that I’ve encountered:

1) If you want an entity base class that is not abstract (to, say, work around a bug in RIA services) with a TPC (Table per Concrete Type) configuration, forget about it… there is absolutely no way to do it.

2) Generic types are not supported as entities or as entity base types.

3) If you want to define the properties on your entity at runtime, using ICustomTypeProvider or IDynamicMetaObjectProvider… again, forget about it.

I could go on and on, but the point is that I’ve run into more “not supported” scenarios with this library than almost any other I’ve ever used.  That said, I love the concept… and once EF code first becomes at all extensible, I’ll fully support it.

Entity Framework Code First Migrations: Executing migrations using code, not PowerShell commands

Migrations are cool, but all the documentation only shows how to automatically update the database using the Visual Studio Package Mananager Console, like so:

Update-Database

However, I want my database to be updated through code like some of the older builds of Entity Framework Code First allowed.  Well, I did some digging, and here’s what I came up with.

var migratorConfig = new DbMigrationsConfiguration<NorthwindContext>();
migratorConfig.AutomaticMigrationsEnabled = true;

var dbMigrator = new DbMigrator(migratorConfig);
dbMigrator.Update();

If you’ve enabled migrations for your project using the Package Manager Console, you should have a file called Configuration.cs in your Migrations folder.  You can use this instead of using DbMigrationsConfiguration<>.  So with this setup, you’d have:

var migratorConfig = new ProjectNamespace.Migrations.Configuration();

var dbMigrator = new DbMigrator(migratorConfig);
dbMigrator.Update();

Lastly, you should be aware that the DbMigrator constror creates an instance of your DbContext.  So it’s very easy to create an infinite loop if you try to update the database from your DbContext contructor or from an implementation of IDbContextFactory.Create().  However, this is exactly what I wanted to do, so I just had to add some thread-safe checks around my database migration code:

public static int IsMigrating = 0;
private static void UpdateDatabase()
{
    if (0 == Interlocked.Exchange(ref IsMigrating, 1))
    {
        // Manually creating configuration:
        //var migratorConfig = new DbMigrationsConfiguration<NorthwindContext>();
        //migratorConfig.AutomaticMigrationsEnabled = true;

        // Using configuration defined in project:
        var migratorConfig = new ProjectNamespace.Migrations.Configuration();

        // 3
        //var dbMigrator = new DbMigrator(new Settings());
        var dbMigrator = new DbMigrator(migratorConfig);
        dbMigrator.Update();

        Interlocked.Exchange(ref IsMigrating, 0);
    }
}

Code first and WCF RIA services: Failed to get the Metadataworkspace for the DbContext type ‘{Type}’

While working with WCF RIA services, DbContext (DomainContext), Entity Framework code first, and Silverlight, I received this error quite a bit whenever I tried to run or compile the Silverlight project. 

The error means that there is something wrong with your code first model.  For me, it was usually some attribute that had a wrong string it.

It is annoying because it’s almost impossible to fix this error without knowing the tricks. Good news though!  The way to get around this error is to browse to your WCF RIA service. 

1) In order to make your service browsable at all (at least consistently), you should make your project use IIS rather than IIS Express.  Go into the project settings, under the web tab, and make sure “Use Local IIS Web server” is selected and “Use IIS Express” is not selected.

2) Now you need to find the URL your domain service uses. 

2.a) Make sure “Show all files” is enabled at the top of your Solution Explorer window. 

2.b) In your Silverlight project, expand the folder “Generated_Code”.  Open the file at the root of that folder.  Search for “http://”.  You’ll find a URL that looks similar to:

http://localhost/{WcfRiaServiceProjectName}/{Domain-Service-Namespace-And-Type-Name}.svc

3) Compile the web project by itself so that you have the most up to date error showing when you browse to the URL.

4) Browse to the URL!  It should give a much better error message.  Make sure you have the web project showing exception details. If you don’t, the web page will tell you how to do so.

VirtualBox 4.1.2 Installation freezes

I was having a lot of trouble getting VirtualBox 4.1.2 installed on Windows 7 x64.  It kept freezing at about 75%.  Eventually, I’d have to kill the installation process, but VirtualBox would still show up in my Programs and Features as being installed.  Here’s what I did to finally get it working.

1) I had various Citrix and Cisco VPN related products installed, so I uninstalled all of them.  During one of these installs, I was prompted about a VirtualBox install being suspended, though I don’t know if that was relevant.

2) I went into Device Manager and deleted some extra network adapters I had lying around.  The one that stuck out was one that was installed by OpenVPN a while back, even though OpenVPN is no longer installed.

Next time I tried the install, it went without a hitch!

Are the newer generation of developers reliving past mistakes?

Though I doubt many agree, I have to say: the recent fervor behind HTML 5, CSS3, and JavaScript feels like a step in the wrong direction.

Let me explain:

I come from a time when web development made you want to cry.  I happen from a time when each browser you chose to support would require one to develop an independent set of hacked CSS rules, JavaScript, and often, HTML; and each of these browsers would require testing after each and every change.  I’ve come from a time when debugging in JavaScript meant inserting “alert” statements in dozens of places within the code and then hitting refresh in a browser.  I come from a time when large web applications would contain scores of redundant code, and scores more of unused styles and JavaScript, which would be destined to remain in the application as if they were naught but malignant tumors.

Don’t get me wrong: application development is my passion.  But doing what needed to be done to get a web application working wasn’t development… it was pre-ordained bug fixing.

But as time progressed, things became more hopeful.  XML gave us a flexible way to store data.  Then XHTML gave us a way to read web pages without concern for misinterpretation.  Then SOAP allowed us the ability to share data with others.  Then Silverlight and Moonlight gave us hope of finally ridding ourselves of the shackles that are HTML, CSS, and JavaScript, forever.  Then Windows Phone 7 arrives, promising the market share the world needs in order to take XAML seriously.  And even if you chose not to embrace XAML, you knew that the holy grail was just around the corner.

But then Apple slew Moonlight. (And I will forever curse you, Apple, for your proprietary spells have cast a gloom on us simple software folk.)

And then the masses began to talk of HTML5 as though they’d forgotten how his ancestors had ravaged our towns.

And now I can’t help but wonder, as we progress into the future: will future generations of programmers be forced to deal with the same crap that we had to deal with, over and over again?

Will the technologies used in application development prove to follow a cyclic pattern?  Clothing style does this… just think of how both the 70’s and 80’s styles have come around.  In said fashion, will one generation reintroduce hacker mentalities and force the subsequent generation to deal with the consequences?

Or will advancement be more like some technological tug-of-war between the heroic Architects and the evil Hackers… both alternately giving and then gaining ground as one seeks to build and the other seeks to destroy?