Friday, March 09, 2012

Photos from Agile Austin March 6, 2012

Bob Wilson,the owner of Industrial Andons and Jidoka Consulting (www.industrialandons.com) presented a overview of the Lean process and conducted an interesting demonstration with Legos.
pic
pic
pic
pic
In the demonstration we had two teams with processing plants scattered throughout the world, or the room in our case. A runner had to move Lego pieces in batches between plants where the Legos were processed for 4, 7, or 10 seconds.
pic
pic
pic
pic
pic
pic
pic
pic
pic
The game emphasized the lean principles of no overproduction and continuous flow. Bob showed a surprisingly simple solution at the end.
pic
Afterwards I had a chance to talk with Bob and asked him what mistakes he sees most often with software companies. He said most software companies spend too much time upfront in requirements gathering and design, and not enough in simple prototypes and discussions with the users.

Friday, March 02, 2012

Converting all default values of GETDATE() to GETUTCDATE() in SqlServer

Since our business in getting more international, I needed to convert our database which has many default constraints of "GETDATE()" to "GETDATEUTC()". I wrote a little SQL script to locate all default constraints containing "GETDATE()" and replace them with "GETUTCDATE()". It also converts all the old date values to UTC time.


set nocount on
declare @tableName varchar(255)
declare @columnName varchar(255)
declare @constraintName varchar(255)
declare @newConstraintName varchar(255)
declare @myDropCmd varchar(512)
declare @myCreateCmd varchar(512)
declare @timeZoneCommand varchar(512)
declare @timeZoneOffset int
select @timeZoneOffset = Datediff(hh,GETDATE(),GETUTCDATE())

-- original query from MeanOldDBA at 
-- http://www.developmentnow.com/g/113_2004_9_0_0_433030/Search-for-defaults-in-table-DDL.htm
DECLARE mycursor CURSOR FOR 
   SELECT
   so1.name AS table_name,
   sc1.name AS column_name,
   so2.name AS default_name
   FROM
   sysobjects so1
   INNER JOIN syscolumns sc1 ON so1.id = sc1.id
   INNER JOIN sysobjects so2 ON sc1.cdefault = so2.id
   INNER JOIN syscomments sc2 ON so2.id = sc2.id
   WHERE
   sc2.text LIKE '%getdate()%'
OPEN mycursor
   FETCH NEXT FROM mycursor INTO @tableName, @columnName, @constraintName
   WHILE (@@fetch_status = 0)      -- while OK
     BEGIN
        print '-- Table: ' + @tableName + ', Constraint: ' + @constraintName+ ', Column: ' + @columnName
        SELECT @myDropCmd = '  ALTER TABLE ['+@tableName+'] DROP CONSTRAINT ['+@constraintName+']'
        PRINT @myDropCmd
        EXECUTE (@myDropCmd)
        SELECT @newConstraintName = 'DF_'+@tableName+'_dtime_utc'
        SELECT @myCreateCmd = '  ALTER TABLE ['+@tableName+'] ADD CONSTRAINT ['+@newConstraintName+'] DEFAULT (GETUTCDATE()) FOR ['+@columnName+']'
        PRINT @myCreateCmd 
        EXECUTE (@myCreateCmd)
        select @timeZoneCommand =  '  UPDATE ' + @tableName + ' SET ' + @columnName + ' = DATEADD(HOUR, '+convert(varchar(3),@timeZoneOffset)+', '+@columnName+')'
  PRINT @timeZoneCommand
  EXECUTE (@timeZoneCommand)

        FETCH NEXT FROM mycursor INTO @tableName, @columnName, @constraintName
     END
CLOSE mycursor
DEALLOCATE mycursor
GO

Saturday, February 11, 2012

Automatic Acceptance into Texas Public Universities, the Top 10% Rule.

Our family met with the College counselor for McNeil High School yesterday, to ask questions about what it takes for a high school student to get automatic admission to Texas state colleges. Here were my questions and his answers; hopefully this will help you.

What does it take to get automatic admissions to Texas public colleges?
In general, the top 10% of a high school's students get automatic admission into state colleges, but only the top 8% get automatic admission to UT.

How is class rank calculated?
Only the four core classes--Social Studies, Science, English, and Math, plus foreign language classes are added into the class rank GPA.
McNeil students have two GPAs, one 4 point based and the other 6 point. The 6 point is used for class rank. (I'm still fuzzy on how to calculate this (4pt GPA * 6/4?)
Often, only the first six semesters of high school grades really count towards college admission, since the deadline for many college applications is before the first semester senior grades are finalized.

What were the GPAs recently to get into those percentages?
For the class of 2012 the lowest 6-point GPA to get into the "top 8%" was 4.89; for the top 10% it was 4.75;
For the class of 2014 the lowest 6-point GPA to get into the "top 8%" was 4.95; for the top 10% it was 4.82;
5.63 was highest 6-point GPA from last year.

Other useful information:
Dec 1st is the deadline for UT admissions, Jan 15th for A&M. Curiously, the A&M scholarship application due date is earlier, Dec 15.
Visit ApplyTexas.org to apply to most state colleges and some private schools in Texas.

Tuesday, January 24, 2012

Getting Four Screens Hooked Up to a Laptop

I love lots of screen real estate. With my new dell laptop I got two extra monitors working directly from the upgraded docking station, but I wanted more. The solution was to install Synergy on my laptop and on a second computer and use a monitor from that second computer. With Synergy I can use the same keyboard and mouse for my laptop and have those inputs sent to the second computer so it feels like four screens.

On my left-most screen, the tiny laptop screen, I always have Outlook open and use it for mail and calendaring (is that a word? - it should be), my second screen I use for Visual Studio, the third for Unit tests and Emacs, and the fourth screen has a browser since it really doesn't connect to the laptop.
Synergy is a pain to configure, and sometimes cuts out, but for the most part it works quite well.

Wednesday, January 11, 2012

Photos from Austin Dot Net Jan 9, 2012

Josh Arnold spoke to the 120 attendees about client-side Continuations. One of the most impressive things was Josh's mastery of the keyboard and shortcuts.

Brandon Satrom gave the main presentation about HTML5, which was well received.
The slides from his presentation are here on github.
My Random takeaways:
Pressing F12 in IE9 will give rendering for older versions of IE of the current page.
jQuery.corner.js is a good polyfill for getting rounded corners in older browsers.
jQuery.Visualize is a simple way to create HTML5 charts from tables.
The excanvas.js polyfill does replicate most of the functionality of the Canvas element, but not all, be careful.

Thursday, January 05, 2012

Photos from Agile Austin, Jan 3, 2012 - Kanban System Design

Julie Chickering, an Agile Coach with Rally Software, presented to 90 people an introduction to Kanban Tuesday night. Here's a few pics of the evening.





Many in the audience were using Kanban and had good comments. One person talked about using swim lanes to ensure that technical debt was actually done, so they had a lane for the usual features and a lane for technical debt that according to their policies had to have something in it.

I know nothing about Kanban. My (probably misguided) takeaways:
Kanban not as perscriptive as scrum
Kanban Focus:
1. Visualize workflow
2. Limit Work In Progress (WIP)
3. Measure and maximize flow of work
4. Make policies explicit
5. Improve the process

A Goal: move work through in predictable sustainable manner.

Advantage of Kanban is you can start where you are. First step is to visualize work flow.
Where does work demand come from? what frequency? what size?
WIP Limits are the number, not the size of tasks.

In the daily standup, walk the board from right to left and see what it tells you. Anything blocked? Unlike scrum, not everyone needs to talk.

Metrics: first one is to measure cycle time.

Tuesday, December 27, 2011

Dynamically Adding a Style Sheet

I've been looking at some of Google's code for their Html5Slides project and like the way they dynamically link in a style sheet:
var el = document.createElement('link');
  el.rel = 'stylesheet';
  el.type = 'text/css';
  el.href = 'http://www.Example.com/...' + 'styles.css';
  document.body.appendChild(el);
I think they code it this way so people using their HTML5 slide template don't have to include a bunch of extra css files, just this one JavaScript file. If people get the file dynamically from Google all the time, Google can change the styles without breaking people's links. It's just one less dependency.