Archive

Archive for the ‘Work Environment’ Category

How to Save Time by Automating your Development Process

March 24, 2011 Leave a comment

In some of my other posts I have talked about ways to speed up the process of delivering software.  Below is a bullet point list of items I have been involved in over the past couple of years.  From start to finish these steps have  improved the quality of our development teams and our products. 

 

Source Control – Team Foundation Server  (TFS)

I hear a lot of people downing TFS. However I have had nothing but good experiences using it.  Setting it up proved a pain (at least 2008) but with 2010 it has become much easier.  It integrates well with Visual Studio 2010 which is my main IDE thus is the perfect choice. 

Continuous Integration (CI)

Continuous Integration is the process of automating the build process from your source repository.  There are a few good products on the market but my favorite is TeamCity by JetBrains.  It is written in Java and seems to be the most flexible across many different languages and platforms.  The best part is it is free for the Professional edition which for my personal development environment is great.  There are a number of different build configurations and agents that are available.  It is the “manager” of our whole build process. 

CI includes

  • Building Source Code
  • Running Unit Tests
  • Running Integration Tests
  • Building the MSI installers
  • Starting the data generation processes
  • Other miscellaneous tasks

Installations

There are many ways to package software for installation.  Some of the more common vendors such as InstallShield and Wise allow for automating the building of the installer packages (MSI’s) so this can be incorporated with the CI server above.  Plus with the MSI’s you can script the installations with simple windows batch files. 

Testing Environments (QA)

In one of my previous posts I wrote about automating VMware workstation.  I have been doing this for over two years now and it works flawlessly. 

http://tsells.wordpress.com/2009/09/20/how-to-save-time-automating-vmware-workstation/

As a developer – I still automate and install the build locally so I can be more effective when working with our Quality Assurance Team to assess any anomalies that may occur between a development and production (installed) environment. 

Test Data

Test data is critical for developers and testers to be able to confirm the product is working as expected.  There are many different ways of developing this.  I personally have done this with SQL Scripts, 3rd party utilities, and now I am using a tool I built custom that builds databases for all supported database platforms. 

Summary of Process

  1. Developer checks in code throughout the day
  2. Source Code is downloaded and rebuilt continuously
  3. Unit / Integration Tests Executed
  4. Daily Build Runs (full build to use for the steps below)
  5. MSI installs build
  6. MSI’s deployed to Server
  7. Data is generated
  8. QA Testing environments are reset
    Once the developer checks the code in – there are NO man hours involved to setup the environments to be ready for testing.  When this was a manual process, it took at least 6 – 8 hours for the process to be completed by no less than 4 people. 

New Hyper V Home Server Build

February 1, 2011 2 comments

I have a business venture I am involved in now that requires some more horsepower at home.  I had a Hyper V server (Core 2 Duo E6600 with 8 gigs of Ram) that was sufficient.  Now I need to run multiple database servers so I decided to invest in a new server (tax deductible of course) that wasn’t equivalent in price to another mortgage payment.   I decided to go with a higher end desktop class system that can server as a virtual server.

New Server Specs

AMD Phenom II  1055 6 Core Processor (2.8 Gig)

Asus Motherboard

16 gigs of matched DDR 3 Ram

Hard Drives (Raid 1)

  • 2 x 250 – C: (System)
  • 2 x 320 – D: (VM OS Host Drives)
  • 2 x 1500 – E: (VM Data Drives)
    The Host Operating System is Windows 2008 R2 with Hyper V.

I setup the VM’s on dynamic expanding drives on the D: array.  Each VM gets a Fixed Size Data Drive setup on the E: array.  This proves more than sufficient since each of the VM’s are normally being used sequentially as they are database servers.

The setup is not complete – but when finished will have the following

Hyper V Server 1 (Existing Server)

    • Domain / DNS Controler
    • TFS Source Control Server / TeamCity Continuous Integration Server
    • Web Server (internal facing only) – OnTime project management software
    • Web Server (external facing)

Hyper V Server 2 (New Server)

  • SQL 2008 R2 (2 GB)
  • SQL 2008 (2 GB)
  • SQL 2005 SP3 (1 GB)
  • Oracle 11g2 (2 GB)
  • Oracle 11g1 (2 GB)
  • Oracle 10g2 (1.5 GB)
  • MySQL 5.5 (1.5 GB)
  • XAMP Server with MySql  5.1 (1.5 GB)
  • Secondary Domain Controller (512 MB)
      I use Hyper-V Monitor to watch the status of the machines

Download here

image

I use Hyper V Management Console to manage / administer the servers.

With this setup I can now work effectively on my main desktop (Quad Core – 8 Gigs of Ram) or my laptop (Dell with an I Core) and have a fully virtualized network at my disposal.

Backups

For backups I have jobs / agents / batch files that copy critical components (configuration files, database backups, etc) to my Windows Home Server.  I use I-Drive  to monitor these folders for changes and upload any changes immediately to on-line storage.  With this plus having my code spread across multiple machines I am in no danger of losing more than a single day’s worth of work since I check in code ritually at least twice a day.

Increase productivity with Visual Studio 2010 and Drop Box

August 13, 2010 2 comments

I often find myself developing on different machines (work laptop, work desktop, personal laptop, personal desktop, etc).  It is a pain to persist short cuts and other settings across multiple environments.  One way to increase productivity and ease management of these settings is to use drop box. 

  1. Create a drop box account and setup a local share.  http://www.dropbox.com/
  2. Setup a folder in your drop box location for Visual Studio
  3. Modify Custom Settings Locations (see details below)

Modify Visual Studio Environment Settings

Setup machine

  1. Open Visual Studio on a machine that has been preconfigured
  2. Go to Tools – Options
  3. Select the Environment folder and select Import and Export Settings
  4. Select Browse and save your settings in the Visual Studio folder inside the drop box directory
  5. Close Visual Studio

On Each additional machine

  1. Setup Drop Box via the steps above
  2. Open Visual Studio
  3. Go to tools – Import and Export Settings
  4. Select Import selected environment settings
  5. Select Yes and save off current settings
  6. Select Browse and Point to the drop box folder
  7. Import settings
  8. Go to Tools – Options
  9. Select the Environment folder and select Import and Export Settings
  10.   Select Browse and save your settings in the Visual Studio folder inside the drop box directory
  11.   Close Visual Studio

Warning – if you are using custom add ins on some machines but not others you may run into some issues depending on the add in location and settings.

 

Share Common Code Snippets

Setup

  1. First create a folder in drop box for Snippets
  2. Add desired code snippets to folder

On each Machine

  1. Open Visual Studio
  2. Go to Tools – Code Snippets Manager
  3. Click Add and browse to folder created above
  4. Select the Folder and click ok

Now all custom snippets will be shared across multiple machines and only need to be edited once when changing. 

 

Share Custom Templates

Setup

  1. Create a folder in the drop box labeled templates
  2. Create 2 subfolders (item and project)
  3. Copy any custom templates you have to these folders

On Each Machine

  1. Open Visual Studio
  2. Go to Tools – Options
  3. Under Projects and Solutions – browse to the correct subfolders created above for Project and Item Templates
  4. Click Ok to Save

Now all custom templates will be available to each machine and only need to be edited once when changing. 

One key factor to successful programming – Workstation Setup

May 12, 2010 Leave a comment

While some say nothing beats developing on the beach with your laptop and a nice drink in your hand I tend to disagree.  While the previous is nice one in a while – a comfortable (and ergonomic) setup is key when coding for long periods of time.  Over the years I have tweaked me environment both at home and at work to really improve my posture as well as eliminate neck issues I had from sitting for so long.  Below is my before and after environment.  I can now sit down and code for 8-10 hours with short breaks every hour or two without feeling completely exhausted at the end of the day.

Here is my old work environment.  Notice the basic office chair and old style computer desk and how everything was cramped?  This was not conducive to writing code.

image

I set out and built a desk that met my needs.

image

I used 3/4” and 1” MDF for most of it and just coated in polyurethane.

image

I put some electrical box conduit on the back for running wires to keep them off the ground.  Note the wheels on it for easy access to pull out.

image

My new environment is much more comfortable now.

All visual items (monitors and TV) require very little head movement and are centered at eye level.

image

I swapped out the basic office chair with a higher end mesh back chair.  This made a world of difference and I don’t get hot any longer sitting in this chair.  Note that the green is a lot brighter with the camera flash.  It is normally a darker color.  This paint change from the standard white wall also made a big difference.  My eyes don’t get nearly as tired.  Now I can code until 4 am instead of 3am.

image

I moved my servers and all of my routing equipment into the closet to lower the ambient noise (and temperature) in the main office.  I have a vent that takes the air out of the office.

image

I am seeing more and more programmers go with the black background on Visual Studio and SSMS.  I still need the white background (preference) so I have found that having a darker background and turning the brightness down on the monitors a bit compensate and get some of the same benefits as the darker IDE backgrounds.

If you have a custom setup that is neat please post a comment with a link to it.  I would love to see it.

Update ***

Here is my setup at work.  Notice the hard back chair – it made a world of difference.

Update 08/22/2010 – I modified the environment again to be more conducive for longer hours of coding (and gaming).

  • I moved the TV up high (less distractions but still available)
  • I added a 24 ” monitor as the center piece and moved the other two around
  • Added a laptop stand for the new Dell work laptop (ICore – yes)
  • Added a foot rest (must have)
Follow

Get every new post delivered to your Inbox.