This is part of the SaaS series. Any connection to reality will be strictly denied.
I started in Windows Azure in 2007. Back then, the name “Azure” wasn't invented, and Azure was still called “Reddog.” I started on the OS team, drawn in by my dream of changing the world, and getting to be Dave Cutler's lackey. I didn't get to work with Cutler, but I still may change the world - now that I’ve learned it’s OK to wake sleeping giants. My giant was named Jay.
See, when you join a team at Microsoft, you're assigned a mentor and I was assigned Jay. Jay is a technical wiz. He knows nine flavors of assembly, and has every machine type back to the PDP-11. Jay's also a little odd.
For example, my first day on the team, I wanted to make a good impression, so I sent a mail to the team calling out something clever with the intention of impressing. Four hours later, Jay replied with a 22-page analysis. I started reading, but by page two, I was sweating bullets and scared. Luckily, as I was starting the third page, a new mail arrived. It was another member of the OS team replying with a translation: "Jay means – Yes, good thinking."
Another interesting thing about Jay was he kept a sleeping bag at work and often slept under his desk. I was intimidated by Jay's technical brilliance, so I decided to ask Colin, a fast-tracked junior executive, what to make of Jay sleeping under his desk. Specifically, could I wake Jay up and ask him questions? After all, Jay was MY mentor.
"Dude, imagine if you were sleeping at home, would you want to be woken up? Of course not, let Jay sleep!" – Colin scolded. Armed with Colin's advice, I let Jay sleep in peace.
Several weeks later, I was 12 consecutive hours into fixing a tough bug and needing a break. I grabbed an IPA and decided to shoot the shit with Jay, who was wide awake with me at 2 a.m. We talked for a while about cloud computing and esoteric coding convention when Jay paused a few moments longer than usual. He tried to start his sentence a couple times, but was unable to find the right words or the right tone. Eventually, he looked down at the label he had been peeling off of his beer and in a more withdrawn tone than usual, began to answer the question I should have asked HIM directly weeks ago.
"Hey, I take my mentorship responsibilities very seriously, and I noticed you've never woken me up. You know if I wasn't your mentor, I'd be at home sleeping in my comfortable bed."
I guess the only thing worse than waking your mentor up night after night is letting them sleep under their desk in untapped anticipation.
Monday, February 18, 2013
Sunday, February 17, 2013
I love my 27" IPS monitors with 2560x1440 resolution
Jeff Atwood covered his religious experience with these monitors here.
I have another post talking about the monitor sizes and physical dimensions here.
Most days I spend hours staring at my monitor. As a result, I make sure I have the most awesome monitors I can afford. Right now, that's 27" 2560x1440 IPS monitors. If you've never seen these, find wise friend who already has them, and ask for a demo . Once you've seen them, you'll want to know how to go about buying them.
In Feb 2013, you have 3 choices for this awesome panel:
Choice 1) Off brand from Korea, via EBAY ~ 330:
I got my first 27" monitor from Korea on Ebay for 330$ with shipping. Shipping took 2 days, it had some missing screws in the mount (I don't care since I use monitor arms), and it had a Korean plug (I don't care since I have that plug ~ 4$). The monitor only supports DVI input (this matters, we'll talk about it shortly). I'm pretty sure if the monitor was busted, the hassle of trying to get it fixed would make it a write off, but I've had no troubles.
NOTE: There are lots of different monitors on EBay from this seller, I've no idea how to tell them apart.
Choice 2) Off brand from America, via MicroCenter ~ 420:
I got my second 27" monitor from Micro Center, for 420$ with chipping. Shipping took 2-3 weeks, this had all it's screws and american power adapters. The key difference in this monitor is that it has display port, VGA, HDMI as well as DVI input. In my opinion this is worth an extra 70$. I have no idea how warranty would work this monitor, but I bet it must suck less then dealing with a company in Korea.
Choice 3) Brand name from America, via Dell ~700:
I haven't bought this monitor from Dell, but I'm sure it'll be wonderful quality and have all the connector choices. All my other monitors are top of the line Dell's which I bought for ~1000$ each, not one of them has failed, or even disappointed me ever.
A note about video cards, connectors, and resolution:
Single DVI (normal) can only drive upto 1920x1200. If you want to drive this monitor, you need to makes
sure your video card supports Dual DVI.
If you have a 10$ display port to DVI cable, that'd be a display port to single DVI cable. If you want display port to Dual DVI, you'll need an 80$ cable. Thus I recommend getting a monitor with Display Port input, if the price difference is less than 100$.
A note about 30" monitors:
The same ebay vendor who sells 27" monitors has 30" 2560x1600 IPS monitors for 350$. Be careful, as these have a matte finish. I bought one, and I'm not thrilled. This is my first monitor with a matte finish so I can't tell if it's a poorly done matte finish, or I just don't like matte finish. In either case, I do not recommend 30" matte finish monitors.
A note about monitor arms:
Worthy of another post, but in a nutshell totally worth it - I use this cheap one at home.
I have another post talking about the monitor sizes and physical dimensions here.
Most days I spend hours staring at my monitor. As a result, I make sure I have the most awesome monitors I can afford. Right now, that's 27" 2560x1440 IPS monitors. If you've never seen these, find wise friend who already has them, and ask for a demo . Once you've seen them, you'll want to know how to go about buying them.
In Feb 2013, you have 3 choices for this awesome panel:
Choice 1) Off brand from Korea, via EBAY ~ 330:
I got my first 27" monitor from Korea on Ebay for 330$ with shipping. Shipping took 2 days, it had some missing screws in the mount (I don't care since I use monitor arms), and it had a Korean plug (I don't care since I have that plug ~ 4$). The monitor only supports DVI input (this matters, we'll talk about it shortly). I'm pretty sure if the monitor was busted, the hassle of trying to get it fixed would make it a write off, but I've had no troubles.
NOTE: There are lots of different monitors on EBay from this seller, I've no idea how to tell them apart.
Choice 2) Off brand from America, via MicroCenter ~ 420:
I got my second 27" monitor from Micro Center, for 420$ with chipping. Shipping took 2-3 weeks, this had all it's screws and american power adapters. The key difference in this monitor is that it has display port, VGA, HDMI as well as DVI input. In my opinion this is worth an extra 70$. I have no idea how warranty would work this monitor, but I bet it must suck less then dealing with a company in Korea.
Choice 3) Brand name from America, via Dell ~700:
I haven't bought this monitor from Dell, but I'm sure it'll be wonderful quality and have all the connector choices. All my other monitors are top of the line Dell's which I bought for ~1000$ each, not one of them has failed, or even disappointed me ever.
A note about video cards, connectors, and resolution:
Single DVI (normal) can only drive upto 1920x1200. If you want to drive this monitor, you need to makes
sure your video card supports Dual DVI.
If you have a 10$ display port to DVI cable, that'd be a display port to single DVI cable. If you want display port to Dual DVI, you'll need an 80$ cable. Thus I recommend getting a monitor with Display Port input, if the price difference is less than 100$.
A note about 30" monitors:
The same ebay vendor who sells 27" monitors has 30" 2560x1600 IPS monitors for 350$. Be careful, as these have a matte finish. I bought one, and I'm not thrilled. This is my first monitor with a matte finish so I can't tell if it's a poorly done matte finish, or I just don't like matte finish. In either case, I do not recommend 30" matte finish monitors.
A note about monitor arms:
Worthy of another post, but in a nutshell totally worth it - I use this cheap one at home.
Sunday, February 10, 2013
Remap CapLocks to Control on Windows RT (aka Surface)
Skip this post if you don't know the gospel of mapping your caps lock key to the control key.
This post was stolen from Ed Anderson.
On the Microsoft Surface (aka Windows RT) you can't run unsigned code, so we can't run the awesome ctrl2cap. Luckily, windows supports key remapping higher in the stack via the scan code mapper. I leave figuring out what exactly this powershell snippet is doing as an exercise to the reader. Simply run the following script from an admin power shell console and then reboot.
This post was stolen from Ed Anderson.
On the Microsoft Surface (aka Windows RT) you can't run unsigned code, so we can't run the awesome ctrl2cap. Luckily, windows supports key remapping higher in the stack via the scan code mapper. I leave figuring out what exactly this powershell snippet is doing as an exercise to the reader. Simply run the following script from an admin power shell console and then reboot.
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layout" -name "Scancode Map" -Value ([byte[]](0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x1d,0x00,0x3a,0x00,0x00,0x00,0x00,0x00))
Friday, February 8, 2013
SaaS: Canadian Spotting
This is part of the SaaS series. Any connection to reality will be strictly denied.
“I bet you the bill that dude by the window is Canadian,” I challenged.
Sam, my favorite architect, glanced over the top of his menu and nodded his acceptance. Sam was over-confident given I’d lost our last two design debates.
But, as a Canadian engineer, I happen to know a bit about Mohawk Indians, Canadian bridges and epic failures, and I have no qualms about using said knowledge to pay for my IPA.
You see, in the early 1900s, the Mohawk Indians found a profitable outlet for their intense, fearless nature – steel working. Their boundless courage enabled them to rivet steel girders 80 stories above the ground with the same vigor they ferociously displayed on the battlefield in days gone by.
Mohawk men were the preferred steel workers of the time and with their help, construction began on the Quebec Bridge – the largest bridge in the world in its day. Soon after work began, the lead engineer discovered a problem. The bridge wouldn't hold and collapse was imminent. He warned management, but was ignored. This negligence resulted in death.
Because an engineer didn't do the right thing, the bridge fell and took the lives of 33 Mohawk steel workers with it.
This tragedy still serves as a guiding principle to engineering students today. The students’ wise predecessors had portions of that fallen bridge forged into iron rings, which are passed on during a secret ceremony, reminding graduating engineers to place ethics and moral obligations on the same tier as physics and mathematics. Just like the rings’ previous owners, today’s engineers hear the “clink, clink” on their desks as they work and are reminded of this paramount obligation.
The food was fantastic, and I clinked the table with my ring as Sam paid for my dinner!
“I bet you the bill that dude by the window is Canadian,” I challenged.
Sam, my favorite architect, glanced over the top of his menu and nodded his acceptance. Sam was over-confident given I’d lost our last two design debates.
But, as a Canadian engineer, I happen to know a bit about Mohawk Indians, Canadian bridges and epic failures, and I have no qualms about using said knowledge to pay for my IPA.You see, in the early 1900s, the Mohawk Indians found a profitable outlet for their intense, fearless nature – steel working. Their boundless courage enabled them to rivet steel girders 80 stories above the ground with the same vigor they ferociously displayed on the battlefield in days gone by.
Mohawk men were the preferred steel workers of the time and with their help, construction began on the Quebec Bridge – the largest bridge in the world in its day. Soon after work began, the lead engineer discovered a problem. The bridge wouldn't hold and collapse was imminent. He warned management, but was ignored. This negligence resulted in death.
Because an engineer didn't do the right thing, the bridge fell and took the lives of 33 Mohawk steel workers with it.
This tragedy still serves as a guiding principle to engineering students today. The students’ wise predecessors had portions of that fallen bridge forged into iron rings, which are passed on during a secret ceremony, reminding graduating engineers to place ethics and moral obligations on the same tier as physics and mathematics. Just like the rings’ previous owners, today’s engineers hear the “clink, clink” on their desks as they work and are reminded of this paramount obligation.
The food was fantastic, and I clinked the table with my ring as Sam paid for my dinner!
Monday, February 4, 2013
Hg-git installer for windows
This post assumes you're a developer who has python and visual studio installed and are just trying to get hg-git to work on your windows box.
I'll admit it, I
know and love mercurial, and I haven't got a clue how to use git. Sure I can learn,
but why bother since
there is a mercurial adapter called hg-git? The only fly in the ointment is installing hg-git on windows. The installer is annoying, so I wrote a powershell script to handle it for me.
The installation script, which is self contained in powershell, does the hard work of installation and complains if you're missing dependencies. You can download it here, or see the original version inline below:
I'll admit it, I
know and love mercurial, and I haven't got a clue how to use git. Sure I can learn,
but why bother since
there is a mercurial adapter called hg-git? The only fly in the ointment is installing hg-git on windows. The installer is annoying, so I wrote a powershell script to handle it for me.
The installation script, which is self contained in powershell, does the hard work of installation and complains if you're missing dependencies. You can download it here, or see the original version inline below:
# Install hg-git, on a windows machine.
# This script makes lots of assumptions - you're welcome to fix it to be less
# restricitive.
###############################################################################
#Helper Functions START
###############################################################################
function DownloadFile ($file)
{
$uri = new-Object System.Uri $file ;
$localPath = "$($pwd.Path)\$($uri.Segments[-1])";
(new-object System.Net.WebClient).DownloadFile($uri,$localPath);
$localPath
}
#Helper Functions END
###############################################################################
# Assert Python is installed.
###############################################################################
$pythonPath = "c:\python27"
if (!(Test-Path $pythonPath))
{
$msg = "Python Is not installed checked at [$pythonPath]";
throw $msg;
}
# Install easy_install if needed.
###############################################################################
$easyInstallPath = "$pythonPath\scripts\easy_install.exe"
if ((Test-Path $easyInstallPath))
{
Write-Host("++ ez_setup already installed");
}
else
{
$localFile = DownloadFile("http://peak.telecommunity.com/dist/ez_setup.py")
. $localFile
}
#Installer is going to need VS9.0
# Use it, or VS11, if that's installed.
###############################################################################
if (!(gci env: | ? {$_.Name -eq "VS90COMNTOOLS"}))
{
# If VS 11 is installed, we can use that instead, python just needs to be told.
if ((gci env: | ? {$_.Name -eq "VS110COMNTOOLS"}))
{
Write-Host "++ Setting environment to contain VS Common Tools Installed"
$env:VS90COMNTOOLS = $env:VS110COMNTOOLS;
}
}
if (!(gci env: | ? {$_.Name -eq "VS90COMNTOOLS"}))
{
$msg = "VS Common Tools are not installed - install VS express";
throw $msg;
}
else
{
Write-Host "++ VS Common Tools Installed"
}
# Run easy-install hg_git, with path will involve compilation.
###############################################################################
Invoke-Expression "$easyInstallPath hg-git"
# Make sure mercurialIni exists.
###############################################################################
$mercurialIniPath = "~\Mercurial.ini"
if (!(Test-Path $mercurialIniPath ))
{
$msg = "Mercurial.ini not found at [$mercurialIniPath]";
throw $msg;
}
# if Mercurial.ini exists, test if it contains the plugin.
# if not tell user to install the plugin.
###############################################################################
$hggitInstallLine = "hggit = c:/python27/lib/site-packages/hg_git-0.3.4-py2.7.egg/hggit";
if (select-string $hggitInstallLine -Path $mercurialIniPath)
{
Write-Host "++ WooHoo - hg git installed, you can now use hg clone git+https://"
}
else
{
Invoke-Expression $mercurialIniPath
Write-Host "Please add $hggitInstallLine to $mercurialIniPath";
}
Tuesday, January 29, 2013
SaaS: The recruiter does not think you’re hot.
This is part of the SaaS series. Any connection to reality will be strictly denied.
I've only had one truly unbearable job. It was awful - The
code base sucked, the boss had pointed hair, and to top it off I got a terrible
review.
Let’s rewind. Four months prior I’d just aced a job interview with
HappySoft. I nailed the questions, and the job was a nice fit for my
career. But, I wasn't ready to sign on the dotted line until I evaluated all my
options, namely my next interview with EbolaSoft.
My EbolaSoft interview was at 9am and it started off on the wrong
foot. The interviewer didn't know the answers to his own questions, and couldn't tell me what I’d be working on. With 15 minutes left in the interview
I’d given up on EbolaSoft. At that point the interviewer excused himself and
Rene entered the room. Rene was the recruiter for EbolaSoft, and my heart
skipped a beat when she smiled at me. As she discussed the company, she twisted
a long strand of brown hair around her fingers and I forgot how the interview
began.
That night, with a job offers from EbolaSoft and HappySoft in my
left hand, an IPA in my right hand, and Biff, my college roommate, sitting
across from me, I worked through the details. “Sure the job might
suck, but Rene is hot, and man her smile... Look if the job sucks, I’ll
work less and spend all my time seeing the city with my favorite
recruiter”. Biff, knowing better than to argue after I’d made up my mind,
just paid for our beers and left.
The next morning, I signed the job offer with Rene’s
company.
I started work for EbolaSoft in September, in the middle of a long
death march. Too busy trying to get his feature out the door, my new boss hadn't spent any time thinking about what I’d be working, and he certainly didn't have the time to talk to me about what I should be working on. Worst of all, even though I was always hanging
around recruiting I never saw Rene’s smile again.
Moral of the story 1: Do not take a job because your recruiter is
hot, I don’t care how much she smiles at you.
Moral of the story 2: Rene – if you’re reading this – You made the
biggest mistake of your life.
I've only had one truly unbearable job. It was awful - The
code base sucked, the boss had pointed hair, and to top it off I got a terrible
review.
Let’s rewind. Four months prior I’d just aced a job interview with
HappySoft. I nailed the questions, and the job was a nice fit for my
career. But, I wasn't ready to sign on the dotted line until I evaluated all my
options, namely my next interview with EbolaSoft.
My EbolaSoft interview was at 9am and it started off on the wrong
foot. The interviewer didn't know the answers to his own questions, and couldn't tell me what I’d be working on. With 15 minutes left in the interview
I’d given up on EbolaSoft. At that point the interviewer excused himself and
Rene entered the room. Rene was the recruiter for EbolaSoft, and my heart
skipped a beat when she smiled at me. As she discussed the company, she twisted
a long strand of brown hair around her fingers and I forgot how the interview
began.
That night, with a job offers from EbolaSoft and HappySoft in my
left hand, an IPA in my right hand, and Biff, my college roommate, sitting
across from me, I worked through the details. “Sure the job might
suck, but Rene is hot, and man her smile... Look if the job sucks, I’ll
work less and spend all my time seeing the city with my favorite
recruiter”. Biff, knowing better than to argue after I’d made up my mind,
just paid for our beers and left.
The next morning, I signed the job offer with Rene’s
company.
I started work for EbolaSoft in September, in the middle of a long
death march. Too busy trying to get his feature out the door, my new boss hadn't spent any time thinking about what I’d be working, and he certainly didn't have the time to talk to me about what I should be working on. Worst of all, even though I was always hanging
around recruiting I never saw Rene’s smile again.
Moral of the story 1: Do not take a job because your recruiter is
hot, I don’t care how much she smiles at you.
Moral of the story 2: Rene – if you’re reading this – You made the
biggest mistake of your life.
Sunday, January 20, 2013
Powershell in Real Life: Fixing an MP3 Album I downloaded
Powershell has some quirks, but all in all is awesome. Here's an example:
Today I downloaded an album from the internet...
I have two problems:
I want to erase the duplicate files. I can find duplicate files by searching for any filename that contains (1), I do this by using the -match operator on each file. The match operator accepts a regular expression thus the funny escaping.
Since my regular expression matches the files I want, I can pass those files to Remove-Item:
Next, I want to rename my files to only have the song name. I can do this by splitting the filename on '-', and using the last element. I suspect the following line should work, and test it.
Good that works, now instead of echo'ing lets actually rename the original file to the new name..
Yippy Skippy it works! Happy powershelling.
Today I downloaded an album from the internet...
PS C:\Users\idvor_000\Downloads\music> dir
Directory: C:\Users\idvor_000\Downloads\music
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/20/2013 11:47 AM 8648447 01-Loreena_McKennitt-The_Book_Of_Secrets-Prologue.mp3
-a--- 1/20/2013 11:48 AM 12194913 02-Loreena_McKennitt-The_Book_Of_Secrets-The_Mummers_Dance.mp3
-a--- 1/20/2013 11:47 AM 12026448 03-Loreena_McKennitt-The_Book_Of_Secrets-Skellig.mp3
-a--- 1/20/2013 11:49 AM 20341141 05-Loreena_McKennitt-The_Book_Of_Secrets-The_Highwayman.mp3
-a--- 1/20/2013 11:49 AM 10037007 06-Loreena_McKennitt-The_Book_Of_Secrets-La_Serenissima (1).mp3
-a--- 1/20/2013 11:47 AM 10037007 06-Loreena_McKennitt-The_Book_Of_Secrets-La_Serenissima.mp3
-a--- 1/20/2013 11:51 AM 16985204 07-Loreena_McKennitt-The_Book_Of_Secrets-Night_Ride_Across_The_Caucasus.mp3
-a--- 1/20/2013 11:50 AM 13847459 08-Loreena_McKennitt-The_Book_Of_Secrets-DantesPrayer.mp3
-a--- 1/20/2013 11:48 AM 252931 Loreena_McKennit_The_Book_Of_Secrets.pdf
I have two problems:
- I clicked some files twice, and now have duplicate files (La_Serenissima).
- The files have the wrong naming convention - I only want the MP3 to be named as the song.
I want to erase the duplicate files. I can find duplicate files by searching for any filename that contains (1), I do this by using the -match operator on each file. The match operator accepts a regular expression thus the funny escaping.
PS C:\Users\idvor_000\Downloads\music> dir | ? { $_ -match "\(1\)"}
Directory: C:\Users\idvor_000\Downloads\music
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/20/2013 11:49 AM 10037007 06-Loreena_McKennitt-The_Book_Of_Secrets-La_Serenissima (1).mp3
Since my regular expression matches the files I want, I can pass those files to Remove-Item:
PS C:\Users\idvor_000\Downloads> dir | ? { $_ -match "\(1\)"} | Remove-ItemNext, I want to rename my files to only have the song name. I can do this by splitting the filename on '-', and using the last element. I suspect the following line should work, and test it.
PS C:\Users\idvor_000\Downloads\music> dir | % {echo $_.Name.split('-')[-1]}
Prologue.mp3
The_Mummers_Dance.mp3
Skellig.mp3
The_Highwayman.mp3
La_Serenissima.mp3
Night_Ride_Across_The_Caucasus.mp3
DantesPrayer.mp3
Good that works, now instead of echo'ing lets actually rename the original file to the new name..
PS C:\Users\idvor_000\Downloads\music> dir | % {rename $_ $_.Name.split('-')[-1]}
PS C:\Users\idvor_000\Downloads\music> dir
Directory: C:\Users\idvor_000\Downloads\music
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/20/2013 11:50 AM 13847459 DantesPrayer.mp3
-a--- 1/20/2013 11:47 AM 10037007 La_Serenissima.mp3
-a--- 1/20/2013 11:51 AM 16985204 Night_Ride_Across_The_Caucasus.mp3
-a--- 1/20/2013 11:47 AM 8648447 Prologue.mp3
-a--- 1/20/2013 11:47 AM 12026448 Skellig.mp3
-a--- 1/20/2013 11:49 AM 20341141 The_Highwayman.mp3
-a--- 1/20/2013 11:48 AM 12194913 The_Mummers_Dance.mp3
Yippy Skippy it works! Happy powershelling.
Subscribe to:
Posts (Atom)