Category: Blog

  • The Standing Desk – In the Light

    It’s been almost a month since I started the Standing Desk experiment. My first setup was down in the basement, since that was the desk that fit my monitor stand. In the middle I had a week of vacation, where I didn’t do much standing at the desk, though I did have my laptop on the old desk.

    This was the setup upstairs

    Photo May 31, 12 52 10 PM

    That has now been replaced with this:

    standingdesk

    I spent a portion of the Fourth of July holiday moving my old desk downstairs, and then bringing the smaller one up stairs, setting up all the monitors again. A cleaned things up and minimized the setup, and learned a few things.

    First, put the bigger, nicer monitors on top. I had them reversed in the basement, which wasn’t great. The smaller ones have less stuff on them, which isn’t great when I primarily use the top two for work (browsing, editing, email).

    Photo May 31, 4 31 55 PM

    As you can see, the setup isn’t a lot different, but I did move a few of the podcast items off and I have a touch more space.

    It’s also better to have the start bar on the top screen for me. I can more easily see the programs running without leaning over. Plus it’s cool to see the programs shoot out from the bottom and maximize.

    In the last few weeks I’ve also learned the shoes matter. At first I thought it was because of the basement floor, but I found that the padding helps. I’ll look around for floor mats to help up here and see if that makes a difference.

    The books and boxes work, but they aren’t great, and I’d like more of a surface at keyboard level for my coffee, water, etc. Whether I build or buy something is up for debate. I’d like to build something, but it’s time. I’m pressed a bit and if I can find something cheap, I might grab it.

    Plus this gives me an excuse to hit the new IKEA store in Denver Winking smile

  • Fourth of July Bloopers

    Here you go. The raw ones.

    It’s a holiday, and usually I’m spending time with the family and enjoying the day.

    In all seriousness though, this is an important day for US citizens. The birthday of our country. Take a moment and read the Declaration of Independence or the Constitution and remember how our country was founded and the principles we should hold dear. Interpret things today, but remember that this country was founded on the idea of freedoms.

    Despite any differences with other citizens, we should celebrate our country.

  • Decryption and CASTing

    In my last encryption post I showed how to encrypt and decrypt data with a symmetric key. However there was a piece of the explanation I left out. If you look at that post, suppose that you ran this query after you’d encrypted the data:

    -- decrypt the data
    select 
      id
    ,firstname
    ,lastname
    ,title
    ,Salary = DecryptByKey(EnryptedSalary)
    ,EnryptedSalary
     from Employees
    go

    The results wouldn’t be what you’d expect:

    decrypt

    The binary data is returned, which isn’t rendered correctly. The salary column is the decryption, and the EncryptedSalary is the encrypted data. Note they are different.

    This stumped me for awhile when I was playing with encryption and I checked the dercryptbykey page thoroughly before I realized that the return type was varbinary and needed to be CAST.

    If I cast this back to nvarchar, I get the data:

    select 
      id
    , title
    , Salary = cast(DecryptByKey(EnryptedSalary) as nvarchar) 
    , EnryptedSalary
     from Employees

    decrypt2

    In my example, I CAST to nvarchar, and then to numeric, mostly for clean coding. This is numeric data. Can I cast directly?

    select 
      id
    , title
    , Salary = cast(DecryptByKey(EnryptedSalary) as numeric(10,4))
    , EnryptedSalary
     from Employees
    go

    No. I get an error.

    Msg 8115, Level 16, State 6, Line 1

    Arithmetic overflow error converting varbinary to data type numeric.

    This isn’t a valid CAST, so I need to double up the CASTs as shown in the original post.

  • Colorado Wildfires

    More than a few people have asked how I’m doing with all the fires in Colorado, so I wanted to drop a quick note. I’m fine and the family is safe. We are near Parker, CO, so not very close to the fires themselves.

    We were affected slightly by the Springer Fire near Eleven Mile Canyon just west of Colorado Springs. I was supposed to attend Camp Alexander with my son as the Boy Scout summer camp a couple weeks ago. However as we arrived at the facility, it was being evacuated due to the proximity of that fire. We did go camping near Grays Peak instead, and I had a quiet, fairly unwired rest of the week at home.

    The Colorado Springs fire (Waldo Canyon) is near the Air Force Academy, about 50mi SW of me, and not very close. The High Point fire near Fort Collins is a good 80-90 miles away from me, so that’s not a problem. The only close fire was the small Elbert fire about 30-40 miles South and slightly East of the ranch, but that was quickly contained.

    All is well here, just hot and dry. Hoping for some moisture soon.