Tuesday, October 27, 2009

Engineers Must be Driven

My wife and I were discussing colleges with my son's Physics teacher, Robert Campolieto of Lawrence Academy.  Our son is interested in Engineering and Computer Science, and during the discussion, Mr. Campolieto said,
"Engineers must be driven ... it isn't good enough to just be smart or engage in discussion; engineers must be driven to produce results."
In the Guerrilla Guide to Interviewing (version 3.0), Joel Spolsky recommends hiring "smart people who get things done," and I feel "being driven" is a stronger way to summarize "get things done," since it implies that a person has an innate, internal motivation to accomplish things.  I now include "drive" as one of the key attributes I look for when assembling a team.  Driven individuals naturally inject energy into the team and create a sense of urgency that compels the rest of the team to move faster.

How driven are you?  What are you driven to accomplish?

Friday, September 25, 2009

Three Options and a Recommendation

During my tenure at HP in Chelmsford MA, I was technical lead for a memory system design where I had the good fortune to work with Milton Makris.  Milton was the engineering manager for the project and together, we led a 25 person ASIC team to develop and verify three custom chips for HP's commercial and workstation Unix systems.

Milton was an energetic, positive, and innovative manager and I learned a lot about managing and leadership from him.  When faced with a need to make a decision about a complex situation, Milton would always say, "three options and a recommendation."  A simple, yet powerful phrase that helps in many situations.

In the faced paced high tech world, we often feel a sense of urgency to make decisions quickly.  However it's easy to make suboptimal decisions, which ends up wasting more time than was saved by making hasty decisions.  Unstructured discussions tend to focus on one aspect of a decision at a time, without fully understanding impacts in other areas.  For example, if a "critical" project is falling behind schedule, the discussion may focus on pulling in the schedule for this project, without fully assessing other impacts such as delays to other projects, increased costs, and lower efficiency from resource thrashing.

"Three options and a recommendation" provides an excellent framework to increase discipline and objectivity to team decision making without adding excessive overhead.  Before coming to a decision, the team takes the following steps:
  1. Identify at least three different options.  At this stage, it's important to encourage creative thinking to explore a range of possibilities.  "Crazy ideas" should be welcomed, not discouraged during this phase.
  2. List pros and cons for each option.  Be as objective and quantitative as possible, gathering as much supporting data as practical.  For example, "it's more work" is too subjective.  "It will require 3 extra person weeks of work" is much better.
  3. Write a summary of the options; define the schedule, scope (feature set), and resources for each option. Identify all dependencies and associated impacts.
  4. Recommend one of the options and include an explanation.
With a rich set of information organized into "three options and a recommendation," the team is now well prepared to run a productive meeting to close on a high quality decision.

Tuesday, September 15, 2009

A Lesson in Teamwork

A number of years ago, I was coaching a soccer team of 5-6 year old boys and girls.  At our first practice, I told the kids we need to pick a team name and asked for ideas.  The boys starting blurting out names like Destroyers, Bombers, Blasters, and so on.  After the boys ran out of variations on destruction, one of the girls said, "how about the Strawberries?," which drew a loud round of boos from the boys.

I said OK, let's take a vote and started working down the proposed names one at a time, counting votes along the way.  Each of the boys voted for his own idea with an occasional supporting vote or two from the other boys.  When I got to the Strawberries, all of the girls raised there hands at once, and I said, "great, our team is the Strawberries!"

Surprisingly, the girls did not plan to work together; it was a wonderful example of spontaneous and implicit teamwork!

Saturday, September 12, 2009

Porting a web site from MS SQL to MySQL - Part 2

In a previous post, I outlined a plan to port the Build-It-Blocks web site from MS SQL to MySQL.  I plan to run the Windows stack (Windows, .asp, and IIS) on MySQL via the MyODBC connector.  Being a Red Sox fan, this feels like getting David Ortiz to hit with A-Rod's bat, but I digress.  So far, things are going smoothly:

1. Install MySQL and MyODBC

I chose to install MySQL from the zip file, primarily because I wanted the ability to leave the Windows Server in a known good state if something went wrong; by doing a manual install I knew I would be able to "un-install" everything if necessary.  Also, all of my experience with MySQL has been on Linux, so I'm comfortable with the manual install process.  Using this post for reference, I installed MySQL with no trouble.  I then downloaded and installed MyODBC from the MySQL website, also with no problems.

2. Export the MS SQL Database to MySQL

Stephen Wong, a student at Cornell, successfully exported the existing database from MS SQL to MySQL as follows:
  • Set up a DSN using Control Panel -> Administrative Tools -> Data Sources (ODBC)
  • Open the MS SQL enterprise manager and navigate to the desired database via the tree on the right.
  • Using the export tool start the table export wizard.
  • Select the desired database in MS SQL.
  • Select the corresponding database in MySQL using the proper ODBC.
  • The wizard will tell you if any tables didn't transfer properly.
3. Port the existing .asp files to use MySQL

Having no prior experience with .asp, my approach was to learn just enough to modify the database calls and leave the rest of the code unchanged.  Fortunately, there was only one place where the existing .asp code connected to the database.  Here's the relevant code snippet:

    ' define the datasource variables
    ' datasource = "blocks"
    ' dsUser = "moduledev"
    ' dsPass = "biy311"
    ' create and open the database connection
    Set conn = Server.CreateObject("ADODB.Connection")
    ' Change DSN to a MySQL DSN
    ' conn.Open = "DSN=" & datasource & ";UID=" & dsUser & ";PWD=" & dsPass
    conn.Open "DSN=mysql_dsn"

I commented out the line that connected to the MS SQL database, and added one line to connect to the MySQL DSN, and it worked!  I then tried to connect using a connection string instead to eliminate the dependency on a correctly named and configured DSN, but I could not get it to work, so I decided to move on and come back to it later.

I reviewed the rest of the .asp code, and as far as I can tell all of the database calls use stored procedures; something like:

    sqlStr = "exec sp_GetAllFunctions"
    set rs = Server.CreateObject("ADODB.RecordSet")
    rs.Open    sqlStr, conn, adOpenKeyset

To port to MySQL, all that needs to be done is to replace "exec" with "call" for every database call in all the .asp files, which is pretty straightforward.

The next step is to port all the stored procedures to MySQL.   Based on the expert and welcome advice from Roland, Sheeri, and Dan, who commented on my previous post, I suspect porting the stored procedures may be the most difficult part.  But, I like challenges!

Friday, September 4, 2009

Porting a web site from MS SQL to MySQL

My son is starting his senior year in High School, and he's doing an internship at Build-It-Yourself, a site for helping kids ages 8-13 design and build their own toys and robots. A section of the site, Build-It-Blocks, has a library of reusable, functional building blocks, construction tricks and presentation tips. In talking with my son, I learned that there's a desire to port Build-It-Blocks from MS SQL Server to MySQL. I offered to help out since I have some experience with MySQL from my work at Tokutek.

Several thousand person hours went into creating the existing site, so one of the goals is to re-use as much of the existing code and content as possible. Other goals include running on Windows, and minimizing the amount of effort required to complete the port.

To get started, I reviewed the existing implementation, and it consists of:
  • Just over 100 .asp files
  • 116 stored procedures
  • 1 database with less than 100 tables
I did some research, and based on this article I think it will be fairly easy to port to MySQL using the MyODBC connector. Here's an outline of the porting plan:
  1. Install MySQL and MyODBC
  2. Export the MS SQL Database to MySQL
  3. Modify the .asp code to connect to MySQL and use MySQL stored procedures
  4. Port the stored procedures from MS SQL to MySQL
I'll post more details as we work on the port the MySQL - should be fun!

Friday, July 17, 2009

Why Mr. Stapler?

Welcome to my first blog posting - you're probably wondering why I chose "mr-stapler" for the blog name. Back in 1991, I was working for HP and I spent a year and a half traveling to and living in Japan working on a joint project with Hitachi. I learned that in Japan, a stapler is called a "Hotchkiss," and my Japanese colleagues quickly took to calling me Mr. Stapler.

In the early 1900's, the E. H. Hotchkiss company manufactured staplers like this one, and started exporting staplers to Japan in 1910. Lacking a native Japanese word, the stapler became known as a "Hotchkiss" (Hochikisu).