AIAIO: Our Blog

AIAIO: Our Blog

The pulse and reviews of Alexander Interactive

Archive for May, 2012

Making virtualenv on windows with powershell a little cleaner

While I code on a mac at home, I can’t live without my giant dual screens and solid state drive at work so I’m on a windows 7 box. Most of the time it’s fine, does everything I need, and I’m happy. I became full of rage for the first time last week trying to properly get virtualenv to play nice with powershell. (If you code on windows and are in the terminal a lot, switch to powershell, its great and comes with windows 7. There is a download for Windows XP)

I’m not going to recap how to set up virtualenv for your project as there is a great walk through on that here. The issue on windows is around when you want to activate your project. Powershell has a restricted execution policy turned on by default. The manual way around this is to run powershell as an administrator, and run this:

Set-ExecutionPolicy Unrestricted

Works, but that’s an extra click. You can also change this value permanently in the registry at the key listed below, but that didn’t seem to stick when opening powershell through launchy

HKLM\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell

Enter my hacked up solution.

Create a shortcut for powershell with these parameters:

Target: %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Unrestricted
Start In: %HOMEDRIVE%%HOMEPATH%

Then, if your workspace and projects are set up relatively the same, you can create a powershell script (or a cmd script if not using powershell), named workon.ps1 that looks something like this:

$ENV:PYTHONPATH=""
cd C:\Users\tbroder\workspace\$args\
.\myenv\Scripts\activate

I threw this in my C:\Python26\Scripts folder. It assumes your project lives in a workspace folder, that your project name is a single word, and that all of your virtualenvs are called myenv. Example of using it below:

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\Users\tbroder> workon gsb
(myenv) PS C:\Users\tbroder\workspace\gsb>
Technology

Hamster Time Relay

Our tradition of Hamster Time lives on at Ai.  Last Friday’s theme took a more physically active twist.

In honor of the Crossfit Regionals and a Ragnar Relay that took place last weekend (and our fond memories of American Gladiators and Battle Dome), we decided to host Ai’s first ever Hamster Time Relay.

With teams of three or four, Ai’s finest took on the following challenges:

Challenges

  1. Ride scooter from corner of office, into Wilbur*, around the table, out of Wilbur, to the front door entrance
  2. Take Developer book off of front desk and balance on head as you walk to Piglet*
  3. Solve word jumble puzzle on Piglet whiteboard
  4. Balance an egg on a spoon and walk from Piglet, around the spaceship couches, as you step over obstacles on the ground
  5. Place egg and spoon in bowl on file cabinet by the printer and pick up a cut-out mustache and put on the blindfold
  6. Pin the mustache on Ron Swanson
  7. At the pool table, shoot the eight ball into any pocket
  8. Go to Boat Drinks* and write Alexander Interactive on the whiteboard
  9. Limbo out of Boat Drinks under a pool cue
  10. Pick up a blown up balloon from the café table and keep tapping it in the air until you travel back to cross the finish line
Hamster Time Relay Map

Highlights

  • David Ow, Director of Project Management, did try to become another obstacle by positioning himself on the ground as another thing to step over while balancing the egg on the spoon.
  • The toughest part of the whole thing was the word jumble (the words ended up being: Mayor Jack, Canopy and Schmelkin).
  • Terran, a Back-End Developer at Canopy Commerce blew the competition away by solving the word jumble in record time.

Results

The team that completed all activities the fastest won.  Times were not revealed until the last team was finished.

Six teams competed, but there was one clear winner – Team Canopy, comprised of Terran, April (Producer), and Jesse (Visual Designer) took home the 2012 Ai Hamster Relay title with a time of three minutes and 15 seconds (3:15).  Almost four minutes separated first place and sixth place.

Video, including interviews with the winning team, to come.

* Our conference rooms are named as follows – (Wilbur, Piglet, Burt Reynolds, Charles Bronson, Boat Drinks, Lamb Chop) – because why shouldn’t they be?

Funny Stuff