Tic Tac Toe Kata

datePosted on 12:39, March 17th, 2009 by Peter Fitzgibbons

This week I am starting a Tic Tac Toe Kata in response to a programming exercise by a future employer.  (Wave to you!)

Here are my rules for performance of the kata:

  • Blog after every long session developing – discuss progress and response about the “kata” of the kata
  • Track time for every session.  Report will be posted at kata completion
  • Use Story-driven-development.  Using Cucumber.  And thusly Behavior-driven-development through RSpec.
  • Document api via RDoc

And here is the kata:

What we have in mind is a simple Tic-Tac-Toe program.
At the least this program should:

  1. Allow for a human player.
  2. Play against a human.
  3. Have some user interface, text is fine.
  4. Never lose. Furthermore, it should win whenever possible.

We would like you to use Ruby as the programming language.  (My Pleasure!)

So, in my next posting I’ll be into project setup, prerequisites, and the first story or two.

Update 3/17/09: Add RDoc to expected deliverables.

Downtime and Lost Data

datePosted on 20:09, February 6th, 2009 by Peter Fitzgibbons

Yo All Followers.

This blog has had downtime and lost data due to my hosting provider’s server move and my own error in choosing a custom DNS config within my virtually-hosted node.

What does that mean to you?

  • Some posts may be missing. (please tell me if you know)
  • Comments are gone.  Sorry those of you who took the time to write.
  • Formatting may be futzed.  I don’t know which formatters I had running, will have to re-do formatting.  Give me a say-so if you have a favorite post that you’d like to love first.
  • new URL.  This is the most painful, as I wasn’t able to post a “moving to x.y.z” before the change.

I hope you all like to follow me again.  More Ruby goodness up and coming.

Regards,

Pete the Ruby Evangelist.

FUD all over again… This time with Testing!

datePosted on 09:15, June 1st, 2007 by Peter Fitzgibbons

Well, Jamie Cansdale has been getting heat over time from M$ over TestDriven.Net, formerly NUnitAddin.

M$ turned up the heat over the last week, and seemingly put it to HIGH yesterday.

Ian Ringrose simplified the discussion :

“Is it safe for me as a developer without a large legal department to work with Microsoft technology? “

FransBouma says : “Nail on the head.”

Yes… Nail on the head.

categoryPosted in Uncategorized | commentsNo Comments | moreRead More »

Pros & Cons – Rails vs. .NET Study

datePosted on 08:48, June 1st, 2007 by Peter Fitzgibbons

I’m debating between moving my career in one of two ways :

Rails

Study ruby on rails, leave Microsoft development, move my career in a new direction. I feel immediate happiness in this endeavor.

Pros

  • Test-driven development “baked in” to the development software
  • Installation and environment setup is free. No extra computer is required.
  • Ruby language contains “best-practices” of multiple languages and is “modern”. Ruby applies “LOLA” (Law of least astonishment), which makes it easier to apply “best-practices” to written code.
  • Community is VERY robust. Meetings are regular. IRC and listservs have heavy message traffic
  • My current skills apply to Ruby/Rails, even when from a different language/framework (IE Microsoft)
  • Best practices of Ruby/Rails align with current software-development industry research on best way to structure project management, design software, and build maintainable large-scale web systems.
  • By writing code in a system that aligns with best practices, I feel like I’m doing “the right thing” when I’m writing software.

Cons

  • Job Market is “currently” limited.
  • I need time to develop the skills/experience to support current income
  • Achieving experience appears to be a catch-22

.NET

Study Microsoft Certified Professional Developer (MCPD) / .NET 2.0. Give in to “the state”, admit that a governmentally structured certification machine also has a thriving job market. Join a Microsoft Consulting Firm full time and be a valuable contributor to their technologies.

Pros

  • Easy Job Market
  • I have valued skills (according to last job-seeking process)

Cons

  • Cost of Entry (Need new computer ($1000) + Software + Certification Testing $)
  • I don’t agree with Microsoft attitude toward developer community
  • I don’t agree with Microsoft attitude toward open-source / linux
  • Developer community is not robust (Few user group meetings in Chi, Forums/Elists don’t answer questions)
  • Microsoft web-development software (ASP.NET 2.0) does not support test-driven development
  • Microsoft development software is often confusing to read and confusing to use. Microsoft does not apply “LOLA” (Law of least astonishment).

Updated: 20 June 2007 12:35:00. This rounds out the pro/con list to more clearly present my perspective on what direction to take my career.

categoryPosted in Uncategorized | comments2 Comments | moreRead More »

Here is a 1-2-3 for building your own VB.NET 2.0 Console application that will allow the upload of SSIS packages to SQL Server storage in the MSDB folder of your choice. The process also allows correct operation of XML Configurations on the packages (other configurations should work too, not tested by me in production though).

Here goes!

  1. Launch VS.2005. Start a new VB Windows Console Application project.
  2. Add Microsoft.SQLServer.ManagedDTS library to References
  3. Paste this into Module 1.vb
    Module Module1
    
        Sub Main()
            Dim packages As System.Collections.Specialized.StringCollection = My.Settings.packageManifest
            Dim pkgName As String
            Dim fileName As String
            Dim processContinue As Boolean = True
            For Each pkgName In packages
                Dim pkgFilePath As String = My.Application.Info.DirectoryPath + "\" + pkgName + ".dtsx"
                If Not System.IO.File.Exists(pkgFilePath) Then
                    Console.WriteLine("Package " + pkgName + ".dtsx is not found on the local file folder.")
                    processContinue = False
                End If
            Next
            For Each fileName In System.IO.Directory.GetFiles(My.Application.Info.DirectoryPath, "*.dtsx")
                pkgName = System.IO.Path.GetFileNameWithoutExtension(fileName)
                If Not packages.Contains(pkgName) Then
                    Console.WriteLine("File " + pkgName + ".dtsx is found on the local file folder but is not included in the .config
     section.")
                    processContinue = False
                End If
            Next
            If Not processContinue Then
                Console.WriteLine("Please verify that all files in the .config
     section are on the local folder.")
                Console.WriteLine("Please verify that all files in the local folder are listed in the .config
     section.")
            Else
                For Each pkgName In packages
                    PackageHelper.SaveToSQL(pkgName)
                Next
            End If
            Console.Write("Press Any Key ...")
            Console.Read()
        End Sub
    
    End Module
    
  4. Create a new class PackageHelper.vb and paste this code
    Imports Microsoft.SqlServer
    
    Public Class PackageHelper
    
        Private Shared Function loadSSISPackage(ByVal pkgName As String) As Dts.Runtime.Package
            Dim dtsapp As Dts.Runtime.Application = New Dts.Runtime.Application
    
            Dim pkg As Dts.Runtime.Package = dtsapp.LoadPackage(pkgName, Nothing)
    
            Return pkg
    
        End Function
    
        Public Shared Sub SaveToSQL(ByVal pkgName As String)
            Dim dtsapp As Dts.Runtime.Application = New Dts.Runtime.Application
            Dim pkgFilePath As String = My.Application.Info.DirectoryPath + "\" + pkgName + ".dtsx"
            Dim ssisFolder As String = "\\" + My.Settings.targetSSISMSDBfolderName
            Dim ssisServer As String = My.Settings.targetSSISserver
            Dim ssisPackagePath As String = ssisFolder + "\" + pkgName
    
            If Not dtsapp.FolderExistsOnSqlServer(ssisFolder, ssisServer, Nothing, Nothing) Then
                Console.WriteLine("Server:" + ssisServer + "  Folder:" + ssisFolder + "  SSIS Msdb Folder is not found on server.  Check Project Settings (Settings.settings).")
            ElseIf Not System.IO.File.Exists(pkgFilePath) Then
                Console.WriteLine("Package: " + pkgFilePath + "  The file specified is not found in the " + My.Application.Info.ProductName + " current directory.")
            Else
                Console.WriteLine("Saving package to SQL (" + ssisServer + ") " + ssisPackagePath + " Starting ...")
    
                Dim pkg As Dts.Runtime.Package = PackageHelper.loadSSISPackage(pkgFilePath)
    
                If dtsapp.ExistsOnSqlServer(ssisPackagePath, ssisServer, Nothing, Nothing) Then
                    Console.WriteLine("Saving package to SQL (" + ssisServer + ") " + ssisPackagePath + " Removing Previous Instance ...")
    
                    dtsapp.RemoveFromSqlServer(ssisPackagePath, ssisServer, Nothing, Nothing)
    
                End If
                Console.WriteLine("Saving package to SQL (" + ssisServer + ") " + ssisPackagePath + " ...")
    
                dtsapp.SaveToSqlServerAs(pkg, Nothing, ssisPackagePath, ssisServer, Nothing, Nothing)
    
                Console.WriteLine("Saving package to SQL (" + ssisServer + ") " + ssisPackagePath + " Complete")
            End If
        End Sub
    End Class
    
  5. Add Settings.Settings to the project to create the XML configuration file for the installer.Name: targetSSISserver
    Type: String
    Value: your server nameName: targetSSISMSDBfolderName
    Type: String
    Value: Your MSDB Folder Name – This must pre-exist on the target SSIS ServerName: packageManifest
    Type: System.Collections.Specialized.StringCollection
    Value: newline-delimited list of package names. This will be an element list in the XML Config file.An example resulting app.config :

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
            <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
                <section name="SSISPackageInstaller.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
            </sectionGroup>
        </configSections>
        <userSettings>
            <SSISPackageInstaller.My.MySettings>
                <setting name="targetSSISserver" serializeAs="String">
                    <value>CHMW003732</value>
                </setting>
                <setting name="targetSSISMSDBfolderName" serializeAs="String">
                    <value>Deployment Test</value>
                </setting>
                <setting name="packageManifest" serializeAs="Xml">
                    <value>
                        <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                            <string>stageGAAPUploadReserves</string>
                            <string>packageNotFound</string>
                        </ArrayOfString>
                    </value>
                </setting>
            </SSISPackageInstaller.My.MySettings>
        </userSettings>
    </configuration>
    
  6. Build the console app. Copy the SSISPackageUploader.exe and SSISPackageUploader.exe.config to a new folder along with the packages you intend to upload.
  7. Modify the SSISPackageUploader.exe.config to contain the intended targetSSISserver, targetSSISMSDBfolderName, and packageManifest
categoryPosted in Uncategorized | commentsNo Comments | moreRead More »

New world, new information

datePosted on 13:17, January 7th, 2007 by Peter Fitzgibbons

Well, after a 20 year separation from teh Cult of Mac, I have finally returned. It is nice to see the tight tight integration of EVERYTHING on the Mac.

While all things round and sweet are looking chipper, my former web hosting is dead and gone. I recovered a few posts, all others are basically lost forever. (Well, at least until I can manually rebuild the posts from MySql backup).

Happy New Year anyway!

categoryPosted in Uncategorized | comments1 Comment | moreRead More »

Sexy is only Skin Deep in Software

datePosted on 13:12, December 26th, 2006 by Peter Fitzgibbons

So I just watched the “5 minute video” by Iron Designer for .NET

Very sexy. Very very sexy.

As an MSDN subscriber (thanks to my corporate sponsors employers) and MCP (SQL Designer test or something, I’ve forgotten), this is very enticing…

AND .NET has failed me in several situations where I was trying to do something “outside the box”.

How does Ruby on Rails compare to this ?

Well the 10 minute video is almost a religious experience to many. AND Ruby and Rails DOES NOT fail us in situations where we wish to go “outside the box” in order to accomplish something.

That is all

categoryPosted in Uncategorized | commentsNo Comments | moreRead More »

Totmato Sauce, Software, Human Variability

datePosted on 09:16, September 28th, 2006 by Peter Fitzgibbons

Malcolm Gladwell at TED 2004 describes the research of Howard Moscowitz for Campbell’s Soup / Prego.

The lessons learned from Howard beautifully correllate with Kathy Sierra’s Quantum Mechanics of Users

The Nutshell

If users are asked for their preference, they will likely tell you something very common and rather vanilla. When given the experience of the choices, say during a taste test, the aggregated results are NOT similar, and in fact group around a handful of common choices.

Design Investigation for Software

My take on this is that during Design Investigation for software – be it website, desktop application, even for print – if at all possible, build the DEMO of the choices involved and get the trial user into the experience and THEN ask the user what is their preference.

This approach in awareness of user preference, user experience, and human variability could take the design into the “I Rock” space of the passionate user.

http://headrush.typepad.com/creatingpassionateusers/2005/12/thequantummec.html#trackback

categoryPosted in Uncategorized | commentsNo Comments | moreRead More »

In Search Of …

datePosted on 09:17, August 24th, 2006 by Peter Fitzgibbons

Peter John Fitzgibbons (Gillies)

My father is John Cecil Joseph Gillies (John Cecil Gillies)

My grandparents :

Robert Cecil Gillies and Millie(Mildred?) Gillies were separated in 1940s.

Millie and Ted married in 1961. Both deceased in 1979.

My aunts :

Roberta, Virginia and Ivy are all living. Roberta is now in Windsor, NS, CA. Her husband Roger passed away serveral years ago (2000?).

I am looking for anyone who shares this ancestory. I would like to learn who you are.

I want you to know that John Gillies is terminally ill and will pass away sometime in the next 10 days.

You may email me at peter.fitzgibbons@gmail.com

categoryPosted in Uncategorized | comments3 Comments | moreRead More »

Gmail – Spam – Recipes!

datePosted on 13:12, July 8th, 2006 by Peter Fitzgibbons

So, I’m perusing my GMail Spam folder today just to see if any non-junk is in there…

and what do I find on the quick-rss toolbar??? SPAM RECIPES!!

Like so…

categoryPosted in Uncategorized | commentsNo Comments | moreRead More »
1234PreviousNext