Sunday, September 14, 2014

This is my next: Site Reliability Engineer at Stack Exchange

AvoidInjuryIn my career I have been very lucky to work with some great people at incredible companies, and although there have been a few curveballs along the way I have always felt like I was exactly where I was supposed to be. Well a few months ago I stumbled across an open position at a company I admire that fit my skill set, and while I was enjoying my current position at 3M HIS I knew I would regret if I didn’t at least investigate the opportunity. Fast forward to today and I am excited to announce that next week I will be starting a new job as a Site Reliability Engineer (SRE) at Stack Exchange focusing on Windows and PowerShell.

The company is based out of New York, but I will be working remotely from home to make sure that the world’s best network of Q&A sites is always available to answer any questions you may have ranging from Bicycles to Mathematics, Scifi to Skeptics, and Cooking to Home Improvement. I have used their original trilogy of websites on just about a daily basis to get answers to questions about programming, system administration, and general PC issues. I have watched as the company grew from a idea about how to improve the Q&A experience into one of the top 100 network of websites in the US and experienced a few curveballs of their own along the way.
In my new position I will get to work with an all-star team of system administrators and software developers and be a part of a community that has quickly become an integral part of the software development experience (and other online communities). I am excited to be in a position where sharing knowledge and experience is a core tenant of the company and where I am encouraged to both use and contribute to open source projects. I can’t wait to dig into the Tools and Hardware, and who knows, I may even have something interesting to talk about at a future users group or conference.

Create TFS Patch File With Pending Changes using TF and 7Zip

I recently had to do a TFS migration and upgrade and during that process needed a way to copy pending changes between the Production and Staging TFS servers. The goal was to be able to test the upgrade in a stage environment, modify the build scripts so that they worked using a new code structure, and then create a patch file that could be applied to the production instance of TFS. I checked online and found a solution that used the unified diff feature of the tf.exe program, but this didn’t work very well if you had to checkout or add many files as part of applying the patch. Also instead of creating a large TXT file I wanted a ZIP file that had full versions of all the files that were modified in the current workspaces.
After playing around with the tfvc commands I was able to write up a PowerShell script that would detect any pending changes in your current workspace and then use 7Zip to create a patch file with just those files. Here is an example of the Export-TFSPatch.ps1 script:
Here you can see it detected 10 files that were checked out in the workspace and created a zip file with just those files:
You can then copy that zip file to another system and use the Apply-TFSPatch.ps1 script to apply those changes to the new workspace. This includes checking out any existing files so they can be overwritten and adding any new files from the patch to the TFS workspace.
After applying the patch you can then use TFS to check in the pending changes on your workspace:
If you want to use these scripts you can find them at my CodeBlog Github repository.
The TF.exe command is very sensitive to which version of Visual Studio you used to create your workspace, so if it complains try changing the $tfexe variable to use 11.0 (VS2012) or 12.0 (VS2013).

Blog.TheG2.Net - Your guide to life in the Internet age.