The browsers in my life

In the post I'm going to cover which browsers I'm currently using and why.  I do try and check out a variety of browsers so I can I see what features are out there and how our users may be viewing our sites.

Chrome

I like the process separation.  This is especially nice when you have a lot of tabs open like when you're surfing eBay.  The clean UI and speed of this browser are also very nice.  I really like the "new tab" feature that picks up on your frequented sites.  On the downside are no extensions/add-on's.

Safari

I really liked this browser when it came out.  Again the speed and clean UI were very appealing.  On the downside, no extensions and really super annoying Apple updater that wants to give you iTunes and QuickTime and Open Office!  Hey, I'm a fan of open source, but you can't just install stuff on peoples machines!

Internet Explorer

Using IE7 and IE8 beta 2.  Need to make sure our sites work with the browser most of our visitors use.  On the plus side I can wedge in the Google toolbar.  IE8 seems to be nicer.  It's a recent install for me, so I can't really say a lot about it.

Mobile Internet Explorer

I do check our PDA page with the IE browser on my Windows Mobile 6.1 smart phone.  I also check the couple of pages that link off of that.

Flock

This is an interesting browser in that it tries to integrate social networking, email and blogging into the browser.  The end result is a funky, distracting, somewhat awkward and cluttered interface.   On the plus side you can use Firefox extensions with it.  This browser just didn't "work" for me.  The UI seemed confusing, forced and cluttered.

Firefox

Firefox is my browser of choice for most of my surfing needs.  Why?  Extensions and the user UI customizations that are possible.  I'm using the Google toolbar add-in.  I've installed the "better" gMail and Reader extensions.  I've found add-on's that change the appearance to something I like a bit better and the tabs look more like Chrome.  There are also add-in's and options that make life easier for a web developer.

I would really like to see the individual process and "new tab" feature of Chrome brought into Firefox.

How our Dev team uses OneNote

I like the OneNote 2007 product.  I use it for both personal, academic and business uses.  Today I'm going to share with you how my team uses it to support our development process.

OneNote Basics

OneNote is the electronic equivalent of a notebook binder which can contain multiple sections and numerous pages per section.  ON2007 adds the major feature of being able to have multiple notebooks.  Notebooks can be shared on a network drive or via a SharePoint Server (they can also be stored locally or on a flash drive).  ON has on-line/off-line capability with notebook synchronization.  While ON has some features that are best used with a TabletPC - such as being able to write or draw on the page, a TabletPC is not required.

OneNote also has a great search capability which includes grabbing text out of images and searching in audio files too!

Operations Manual

We have put together an “operations manual” in OneNote.  The idea is to document routine and some times not so common tasks.  We originally started off with a single section in a notebook with lots of pages and now we have a “section group.”  So my suggestion here is start off small and let your sections reveal themselves.

For example, we now have tabs (sections) for:

  • Original information we haven’t moved anywhere else yet--a catch all.
  • Daily tasks
  • Nightly tasks
  • End of session
  • Server specific stuff
  • A section that is a data dictionary

Each section can have from a few to many pages under it.

Where does the Operations Manual content come from?

Basically, if we come across a task that we don’t know how to do, we ask the person that is the expert to document the task.

Then someone else runs through it with the expert – making additional notes or changes.

Now, we have at least two people that have run through it plus it is documented by the expert with “newbie” notes.

To me, one of the biggest advantages of using ON is that you can focus on what's important--the content.  When deal with a word processor to document processors we quickly get bogged down in the proper formatting of the document and in making the tool happy.  Did I mention that it's really easy to search all of the pages in ON too?  With multiple word processor documents, you'd need a desk top search of some sort and have to deal with more pessimistic file locking when editing them.

Project Documentation

We also use ON for capturing project information – meeting notes, tasks, pictures, diagrams, etc.  ON has OutLook integration so at the end of a meeting you can quickly email the notes that were taken to all of the meeting attendees.  You can set task flags on items as well.  I have found that even handwritten minutes can quickly be mailed out to everyone and that they are acceptable.  ON does have a feature to convert handwriting to text.  However, it is not 100% accurate.  If you intend to email out plain text you are almost better off taking notes via keyboard.

In an earlier post I talked about taking pictures of whiteboard diagrams and dropping them in OneNote.  ON also has the ability to capture from TWAIN devices such as a scanner.  So if you have printed source material w/out a digital version, scan it in.

OneNote also includes a screen clipping feature like SnagIt! So you can easily put screen captures in with the project information.  There are also send to ON tools for OutLook and IE.  If you want to preserve formatting you can print to ON.  So, if there is an email that has particularly relevant information you can send or print it in with those project materials.

That just made me think about another nice feature.  Say, you do have a nice PDF document you got from a vendor.  You can drag-drop that PDF onto a project page, choose to insert the file and now it's part of the ON document!  So, you can keep notes, pictures, sound files and other files all together in the same notebook.

Summary

OneNote 2007 has many more features than I have mentioned.

I find OneNote 2007 to be an affordable and indispensable tool that supports our operations and development roles.

Team member opening

We currently have an opening for a full-time entry-level member on our team.  We are also considering applicants for an intern program.

If you are interested in being a team member in an environment that uses agile techniques such as pair programming, test driven development and iterative cycles please review the job description and submit an applicationBe sure to mention in your cover letter that you found out about the job here!

Software Rot

I have an apple sitting on my desk right now.  As I was looking at it, wondering if I'm going to eat it before it rots I couldn't help but think of that time lapse photography where you see fruit decaying.

You've probably heard about bit rot.  So, I was thinking how does this apply to software?  What can we do to preserve the fruit.  I didn't like the notion, that no matter what you do, the apple is going to rot.  Then I thought, hey maybe software is more like a new car.  If we take care of the car, keeping it clean and maintaining it we're going to have a useful automobile for many miles.  We may eventually choose to replace it because of upkeep costs or changes in style... people are fickle aren't they?

Now, the car that doesn't get the maintenance... it rusts, it fails, it falls apart...and it's like the "broken window" idea... as it decays we want to take even less care of it.  We want it to fail so we can replace it with something new.  Or because it is in such poor shape, when the mirror busts off we just slap on another that doesn't really match.  But, we don't care because everything is in such a poor state anyway.

Or maybe the car was put away in the garage because the original owner is gone...and it doesn't age gracefully.

These are things that happen to software.  What can we do?  Take care of our software.  As we learn new concepts keep our systems polished.  Revisit the application with code reviews, this also helps out the new people on the team.  Then you don't have to worry about not having available the one person that knows the code.  If the system was developed with n-tier design then maybe a new paint job (GUI) is in order?  I am sure you can think of other things you can do to keep your systems from rotting.

So, keep your systems clean, polished and maintained!

XOBNI out again

Well with the latest push update of Xobni that included LinkedIn integration, which I liked, my Outlook decided to start crashing when you looked at it funny.

I noticed that when you tried to resize the Xobni toolbar it would crash.  Also, when trying to move a group of tasks from the past to today it would crash.

After uninstalling Xobni, Outlook complained that the plug-in wasn't available and proceeded.  I think I got one more crash out of it.  I've rebooted since then and now all is well.

I'll keep an eye on the progress Xobni makes towards release and may eventually reinstall.

Windows Mobile 6.1 Upgrade Experience Report

There is a new WM6.1 release out for the Motorola Q9c sold through Sprint.  After reading a bit about it I decided I wanted to do this upgrade.  This is my experience report from upgrading my device.

I started off by going to the Motorola website and downloading the upgrade tool.  This is about 18M.  I thought sweet, this is going to be easy.  I was wrong.  The upgrade tool is merely a downloader type tool.  The first part of the install this tool verify's the device and then it proceeded to download the update--about an hour on DSL. 

You are also told to make sure you have the device backed up as it is wiped as part of the install.  However, they give you an option to keep personal information.  I did this.

When doing the update you'll see a black and white DOS like screen on the device.  I did end up with an error in the install process.  The software on the PC detected the condition.  I had to power cycle the Q9c by removing the battery.  The process picked back up where it was when I plugged it back in.

Around this time the device reboots and you'll see a graphical Windows Mobile 6.1 screen.  Status on the PC indicates around 34% complete. 

Soon thereafter a manual reboot is requested by the software.  During reboot I see the Sprint screen.  When I reconnected the device nothing happened.  I power-cycled it again while it was plugged in and this time it was detected.  ActiveSync was seeing the device with a guest partnership.  The software continued loading the device and then went to load my personal settings.

Next, it looked like partnerships were removed and the device rebooted.  It might take a couple of seconds before the auto-reboot.  Don't panic.  After it rebooted is when it recreated the partnerships.  If you end up with an ActiveSync screen that is showing a guest partnership, reboot the device.

Bad Stuff

While my settings were retained and information that was on my SD card was left alone, I did have to re-install all of my applications.  I also had to reinstall the GPS application. 

Partnerships & Blue Tooth

Even though my Exchange partnership was showing up, it wasn't working properly.  I ended up removing and recreating it.

I also ended up with a second partnership on my personal Outlook account on my home PC.  I removed the original partnership and renamed the newly created partnership.  I started getting some synch errors on the PC, so I backed off what was being synched and added them back on one at a time.  That seems to have taken care of the synch problem.

All BlueTooth settings were lost.  I need to recreate those pairings.

Cool Stuff

I now have my Yahoo! small business email accounts set up and working.  They use SSL connections so I wasn't able to configure the email client to work with them previously.

A feature I really like is that I can now lock and auto-lock my device with a PIN or password!  They still haven't updated the software to display owner information when the device is locked.

Other cool new features include a "slider" home screen, zoom feature in the web browser and the threaded text messaging.  Microsoft got it right when they made it very easy to see a text "conversation" and respond without having to create and address a new text message.

Summary

Overall, a worthwhile upgrade.

You need to plan several hours for this upgrade and for reinstalling applications--oh yeah and for playing with, I mean learning more about it.  It is not for the faint of heart.  You need to be at your PC that you normally sync with--you'll be using ActiveSync.  If you're using a laptop, make sure you're plugged in!  Losing power or Internet during the process and you could have a bricked device.

ProjectCards Evaluation and Installation

I'm looking at ProjectCards as a tool to augment my current project management process that uses OneNote.

What do I hope to gain from using ProjectCards? 

  • I would like to have a management and user friendly dashboard for reviewing project/release/iteration/task status. 
  • Be able to determine how much time there is in unscheduled stories.   This can be accomplished by creating an "unscheduled" iteration and moving all unscheduled items into it.
  • Be able to easily review and work with unscheduled stories -- release planning?   There are numerous filters and planning group options available.
  • Be able to link to detailed information in OneNote.  Using the custom fields URL type I can link to OneNote or a HelpDesk ticket.  However, with anything other than a standard web URL you end up with a funky empty "error" browser on your screen.  The ProjectCards staff said they would change this in the future so it will let the OS handle the URL.
  • Be able to determine overall project time
  • Be able to set up multiple users with various access rights.  Besides being able to easily set up and manage users, there are a handful of default roles built-in to the system which seem to do the job nicely.
  • Be able to identify in what release a feature was added/enhanced or changed

How will OneNote continue to be a part of the process?

Detail information - notes, pictures, technical data, etc for the stories will reside in OneNote.

Installation

The installation instructions were a little confusing for the windows server since it talked about needing TomCat.  It ended up being a very simple install.  No configuration was needed.

Hm. How do I specify where the repository is located?

I later discovered how to configure the project data directory in the following post:

http://www.projectcards.com/forums/viewtopic.php?t=850

I pointed out to the ProjectCards guys this oversight in the manual and they agreed that it was a pretty big omission and belonged in the next manual.  On the down side it seems that the install directory for the web reports is fixed, UNLESS you use another different web server.

The first time I used the client to connect to the server I took their advice and changed the admin password.  It then promptly gave me a "corrupt license key" error.  I quit and logged back in with the new password--everything went through OK.

Evaluation

So, now I can take a look at the product and the manual to determine if it will meet our requirements outlined above.

Sketch out the project using "themes" and putting cards under them.  For example, the Search feature theme may have search by name, search by room number and search by parking spot under it.

You have to go into each individual story to set it's time and status.  It'd be nice to be able to do this from the dashboard grid.

Use drag and drop to schedule a task in an iteration.

Filtering in the theme view allows you to quickly see unscheduled stories.

I'm finding it annoying that a single account can only be logged in from one location.  So, when I'm working at the desktop pc and then I go over to the TabletPC to do something, I'm logged off of the desktop and any unsaved changes are lost!

I can link to a OneNote section using a custom field of the URL type.  However, it thinks it's a bad link format.  Also, it tries to open it in a ProjectCards wrapped web browser.  So, you end up with an empty blank browser and the correct OneNote document open.  Maybe, "dumbing" down this feature may be appropriate.  ProjectCards guys indicate that they will do this in a future release.

Manage users can be used to create users that are used through out the ProjectCards application--that is they are good for all projects.  You can use Manage Project Access to set a users access level in the project--that is you can set what role they have in this project.  You can create custom project roles.  Unfortunately, they are only good for that project.

If you have a single team that is working on multiple projects (a program in PM parlance), then you'll want to check out the "planning groups" feature.  This same feature also works well for multiple teams working on a single project.  Tip: once you have one item of the planning group type on the release plan, drag and drop other items under the planning group and they will have their planning group automatically assigned.

I'm still warming up to how the iterations work.  Basically, you set your start day and then specify how long each iteration is in length.  So, you don't have the flexibility to say nothings going to happen this couple of days so we don't want to start the iteration until the 1st of the month.

Support

I've emailed with the developers on a number of occasions and they have either provided an answer to my query, engaged in a dialogue to better understand what I was trying to do and added items to their feature requests.

Transferring large files from Mac to Windows

As it turns out, one of the last big bastions of incompatibility is the file system.  Windows machines can't do anything with the Mac's Hierarchical File System (HFS).  However, Mac's can read Microsoft's NTFS format.  But they can't write to the NTFS disk. 

Both platforms do support the FAT32 file system.  However, when you are dealing with large files, for example home digital video, FAT32 is lacking.  FAT32 supports a maximum file size of 4Gig.  So that hour video you made that is 11Gig ends up getting truncated.  So, how do we get the files from the Mac to the PC?

I tried FTP - way to too slow and timed out eventually.  Also, tried sharing the PC disk and making an SMB connection from the Mac to the PC.  However, it looks like there is the same 4Gig file size limit in the SMB software.

What I ended up doing was putting the video files on a Mac formatted portable drive.  I then took the portable drive to the PC and used a piece of free software called HFSExplorer.  With this software I was able to open the Mac volume and "extract" the files to a local NTFS drive.  It worked great!  I started it running before going to bed (45Gig to run through).  Although after only a couple minutes it had already "extracted" over  a gig.  Much faster than any of the other methods I had tried.

I used HFSExplorer on a Windows XP machine.  However, it is written in Java so it should be useful on other platforms as well.

Xobni

Xobni looks like a nice Outlook add-in. However, within a couple of hours of installing I was getting familiar with scanpst.exe . Coincidence?

I removed Xobni and no corrupt pst's since.

2008.05.14 UPDATE:

I determined that it was possible that I had an undetected corrupt ost file before the Xobni install. I'm giving it a whirl again.

2008.05.21 UPDATE:

So far, so good. No additional Outlook corruptions. The feature I like the most about Xobni is the quick access to the phone # for the sender and the list of files you've exchanged with them (and can click on to open).

New Language Features in C# 3.0

Overview

C# 3.0 adds several new language features.  In this article I will review Auto Implemented Properties, Object Initializers, Collection Initializers, Local Variable Type Inference, Language Integrated Query (LINQ) and Anonymous Types. 

I picked up this material from an excellent video by Luke Hoban.

Auto Implemented Properties

public string CustomerID { get; set; }

The private variable is no longer necessary.

Object Initializers

Customer cust1 = new Customer()

{ CustomerID = "ALKI", ContactName = "Marcel" };

Even if a method doesn't have an overload which lets you fill in some properties right away, you can use the Object Initializer to accomplish the same thing.

Collection Initializer

new List<Customer>() { cust1 };

As above but for collections.

Local Variable Type Inference

var customers = new List<Customer>();

How sweet is this?!  But, only for local types.  You won't be doing this with class level variables.

Language Integrated Query (LINQ)

Enumerable.Where(customers, c=>c.city == "London");

customers.Where(c=>c.city == "London");

var query = from c in customers

where c.City == "London"

Select c;

Where is an extension method

LINQ uses Lambda expressions.  Here c=> c.city == "London" is the Lambda expression.  The => is read "goes to."

LINQ can be used to query against XML, objects or SQL.

Anonymous Type

The neat thing about anonymous types is that you can create a type on the fly with no name/type, hence anonymous.  This new type can have a different number of properties than the query source.  For example, say you're doing a query on the customer object, the query result can be set up to only contain the customer ID and name.

Var query ...

select new

{  CustomerID = c.CustomerID,

   ContactName = c.ContactName };

// the property names above are optional, if not specified the property name of source object is used.

Sprint Motorola Q9c vs. BlackBerry 8830

This year at Christmas it was time for new phones. My wife was leaning towards the Motorola Q9c because of it's media features. I picked up a Black Berry 8830. I wanted to give the dark side a try after having had some exposure to their emulators and development toolkits. I liked the idea of being able to develop for the 8830 with Java or .Net.

I liked the keyboard and auto-completion features of the 8830. I also liked the way the text messages were threaded. The little bit that I was able to test the GPS and web features of the 8830 seemed nice. I was NEVER able to test out it's email capabilities. The only time I could get web based features to work was when I was on the EVDO network. The web features simply wouldn't work on the 1X network. After hours of tech support time it was determined that it "should" work, but it was likely a problem since they are in the process of upgrading the local area to EVDO. This upgrade "should" be complete within the next couple of months. So, I ended up switching to the Q9c.

The Q9c was $50 less than the 8830. It also includes pocket versions of office applications. That would have cost another $100 on the Black Berry. The Q9c also includes a capability to make voice memos. I would have had to purchase a $30 utility for the 8830. I had numerous sync problems with the 8830 and had to wipe out directories on the PC in order to solve them. I can't imagine what a non-technical person would do! The Q9c syncs up with my PC AND my work Exchange account! I set it up myself. With the 8830, I'd have to contact the Black Berry administrator, secure licensing and be subject to all of the RIM outages!

Another nicety of the Q9c is the megapixel camera which the 8830 doesn't have. Also, the Q9c has a honkin' battery which can last for days! Now, I do miss the trackball and GUI of the 8830. I liked that I could go to one place for all of the settings and they were all there in a long list. I didn't have to drill down and navigate through a tree to find the right setting. Also, I like that I could easily change the fonts on the 8830. It had a very nice screen and good feel to it. The Q9c has a rubbery feel which makes you worry less about it sliding around.

The stock 8830 case was blech. The Q9c didn't come with a case. Both have blue tooth, GPS and standard mini-B USB power/sync connectors and 2.5mm head phone jack.

I was thrilled that the 8830 had a password management program built in. However, our security guy advised me that it's not secure. Also, I wasn't able to locate a corresponding desktop application.

I liked that the 8830 did display owner information when the screen is locked. My old Palm OS PDA's would do that as well. I haven't seen the Q9c do that. You've got to dig to find owner information. As I recall, the 8830 also had a better integrated "today" screen.

The Q9c misses hits in that I can't browse the file structure of the internal storage via file explore in ActiveSync. It does support mini-SDHC cards though!

I miss the blinking LED of the 8830 that would let me know when I had a text, or missed a call, etc. You've got to wake up the Q9c so that you can see the screen to look for the icons that indicate missed calls, etc.

Overall, I miss some aspects of the 8830. However, the Q9c is doing a great job of meeting my needs. Papyrus and eWallet are essential add-on's. Oh yeah, the Q9c WORKS on the 1X and EVDO network. That right there was the biggest factor for me.

Tablet PC Head to Head

I typically use a Gateway M-285 Tablet PC.  However, this week it's in the shop and I've got a loaner E-155 Tablet PC.  Let me start off by saying that this is really an apple and oranges comparison.  About the only way's that they are similar is that they are both Tablet PC's from Gateway running Vista.  That's about where the similarity ends.

I found the E-155 reasonable for running applications but it was definitely slow compared to the M-285.  The difference was very noticeable when running Visual Studio.  The E-155 has a 1.2Gig processor with a gig of RAM.  The M-285 has a 2.0Gig (as best I can recall) processor with 2 gigs of RAM.  Both are Duo processors.

The E-155 has a WACOM screen which is active/passive.  What I mean is I can hover the stylus over the screen with out touching and it displays the pointer.  However, I can also just use my finger to push buttons as well.  The M-285 has an active only screen, which means you have to use the special stylus.  I must say, after experiencing the WACOM screen I do prefer the feel of it over the M-285's very slick glossy screen.  The WACOM screen seems to have sort of a matte finish which I like.  The E-155 screen is 12" which seems a little small, but the display is very crisp.  The M-285 14" is an outstanding display, although over time it seems to have gotten a little bit dimmer.

I typically use my tablet along with a docking station and external monitor.  Here the E-155 really falls down.  The video coming out of the external port is downright blurry.  I'm sure this is due to the fact that it's using an integrated video adapter with shared memory.  The M-285 I use has been upgraded to a video adapter that has dedicated memory and it was worth it.  The M-285 external video is very nice, I typically run an external monitor at 1280x1024 with it. 

A nice feature of these tablets is that they share the same docking station.  So the video comparison was with the same docking station and monitor.  I did also try plugging directly into the E-155's external video adapter and it was still just as bad.

The E-155 has the M-285 beat in the portability department.  I also like that the way the fan vent is arranged it is on the "top" side when in my typical tablet orientation.  The E-155 case is rubberized in the palm rest area which feels down right weird.  The E-155 is much lighter than the M-285.  A large part of the weight of my 285 is due to the 12-cell battery that I went with.  I typically get 4-5 hours of use out of it.  The E-155 gave me several hours of use on it's standard battery.  I started off in High Performance mode and dropped to Balanced before needing another battery.  Another thing I really liked about the 155 is it's built in fingerprint reader.  This made it very nice to be able to quickly unlock the machine.  It's something I'll look for on my next tablet.

Sound quality is good from both of the tablet's.  Better than many other laptops out there.  I haven't had much luck trying to record from the M-285's built in microphone.  I have not tried the E-155's dual mic's.

Overall, I very much like both tablet's.  The E-155 is a nice device for running Outlook and OneNote and doing general computing tasks.  It can be pressed into development service but it won't like it... neither will you!  The 155 is so slim and light weight you won't hesitate to grab it before leaving the office.  The M-285's weight help's keep up your arm strength.  But it won't balk at doing whatever you ask of it.  It is not unusual for me to have the 285 running Visual Studio, NUnit, SQL Server, IIS, Outlook and OneNote simultaneously.  If I could keep both machines, I could see some benefit in that.  I'd get rid of the PDA and use the 155 primarily for Outlook, OneNote, running a few client side tools and as an eReader.  If I could have only one machine, it would likely be the 285 with dock.  Gateway has the 295 out now.  The 295 it seems to me is a slightly upgraded 285 with the WACOM screen.

Doing TDD without a Test Runner

What can be done in VBA/VB6 and other environments is the following:

  • Create a code module that will serve as your test fixture.
  • Write individual methods to do your tests in this code module.
  • Have a "master" method that calls all of the individual tests.
  • The individual tests give you feed back ala debug.print with test name and"PASS" or "FAIL" also return a boolean to the master method.
  • The master method can return FAIL if it picked up a false from any of the test methods that were called.

Now you can use the immediate/debug window to call your individual test methods or your master test method. I found this approach very helpful when working with a legacy Access 97 application.

Outline for introducing TDD

This outline is meant to serve as a guide for a developer that is experienced with Visual Studio, C# and NUnit to use in introducing Test Driven Development (TDD) to others. You, the trainer, will want discuss the why and how behind the tasks.

This guide was put together in the context of VS2005 & NUnit.

http://nunit.org/

You may opt to have developers work in pairs for this training.

Learning the basics

Start off by discussing why tests are set up in a different project.

Create new projects Polynomial & PolynomialTests

Delete class1.cs under both of them

Include a reference to the project under test

Include a reference to the test framework

Create test fixture BasicPolynomialTests (class)

We will be implementing a compute method which returns the result of f(x) = x^2 + 5x + 6

the using statements that are needed by the test framework

using NUnit.Framework;

using NUnit.Framework.Constraints;

using NUnit.Framework.SyntaxHelpers;

Don't forget to make the test fixture public

Reviewed that there are reflection tags for the test fixture, fixture setup/teardown, test setup/teardown and the test itself

When and when not to use the different setup's/teardowns

We talked about setting up test classes based on what kind of set up they need

Talked about arrange-act-assert (See William Wake) http://weblogs.java.net/blog/wwake/archive/2003/12/

It can take a little bit to show/explain "this method doesn't exist yet, we're writing the way we want it to work"

With a nice IDE the method stub is generated for you (they really liked that) .

Create BasicPolynomial class, make it public - watch for namespace conflict

review the red-green-refactor sequence

make sure everything compiles now and you have a red bar in the test runner

implement the code that computes f(x)

compile and check out the green bar

Now refactor f(x) - it can be refactored to (x+2)(x+3)

Show them were they can find reference material on both the "classic" and new "constraints" assert methods

(we used the new NUnit constraints syntax)

http://nunit.org/index.php?p=assertions&r=2.4.3

Discuss how unit tests can be used to verify expected behavior

I think a string replace does this, is my expectation correct?

Talk about how we can do TDD in environments that don't directly have a testing framework - i.e.

Access

A little thinking for the trainees

Now the user wants to be able to solve all problems of the form Ax ^ 2 + Bx + C

Create a GeneralPolynomialTests fixture

Create a new GeneralPolynomial class

Need a constructor that takes (A,B,C)

Test classes with different set up revisited

Add an empty constructor() that defaults to 2,3,5

Don't forget your test first! (in a new class)

Refactor: the empty constructor can be implemented in a number of ways

  • Setting initial values on declaration of private variables (yuck)
  • Setting the private values in the new empty constructor
  • Constructor chaining GeneralPolynomial():this(2,3,5)

http://www.c-sharpcorner.com/UploadFile/rajeshvs/ConsNDestructorsInCS11122005010300AM/ConsNDestructorsInCS.aspx

Move the new test class to it's own file

Summary

As you can see, when it's listed out, that's a lot of material for a new comer to digest for a fairly simple example.

I worked through the above in about an 1 hour and 45 minutes with a team.

After you've gone through this guide, ask if there are any questions. Let them know you are available to help.

Pick up a slew of books on TDD/xUnit topics and add them to the corporate library.

OO Confidence Course

Right now some of my team is in Object-Orienteed Analysis and Design training.  They appreciate that they are learning the concepts.  However, the instructor has not presented them with code in any language.  Therefore, we are going to do an "OO Confidence Course."  The idea is that we will briefly discuss the foundations of OO, look at the language specific implementation and then work through implementing the concepts in code.

This VB.Net and C# comparison guide from Frank McCown will provided to serve as a handy reference to language specific constructs.

If you are working to learn OO on your own or want an additional book to read on the topic that includes code, I can recommend Head First Object Oriented Analysis and Design.

After an initial session with this course, it's likely that someone new to OO would likely take around 4 hours to complete this confidence course.  I think an experienced developer could rapidly complete this course.

At a later date, in the course of professional duties, would be a good time to look at defining properties in an interface, CRC cards and unit tests.  The purpose of this exercise is to build OO confidence, so we're working hard to avoid "scope creep."  Also, because this is an exercise we ended up having an abstract Person and Concrete Person classes.  We needed to create the concrete class that others inherit from so we can show off the inheritance polymorphism in the demo section.  It's also significant to note that when demonstrating the interface polymorphism that the student class does not inherit from another class.

Here is the "OO Confidence Course"

 OO Confidence Course

For Group Discussion

  • What is polymorphism?
  • How does inheritance work?
  • Why do we use encapsulation?
  • Language specific discussion
  • C# this/subclass, base/superclass

Abstract Person class

This class should have properties/accessors/mutators for:

  • Age
  • Gender
  • Name

Override ToString method to display name and age

Create an abstract method ContactPhoneNumber that returns a string

Concrete Person class

Inherits from Person

Implements the abstract method ContactPhoneNumber
    Return "123-555-1212" for the phone number

Employee

Diagram and create an employee class that inherits from ConcretePerson

This class should have properties/accessors/mutators for:

  • ID #
  • Job Title

The constructor should give the person a default ID of -1 and a blank title, age, gender and name

Overload the constructor to accept an ID#, Title and Name

Override the ToString method of employee to display the data in all of the fields

Create a method that calls the base/superclass toString()  - call it superToString

Implement the abstract method ContactPhoneNumber
    Return "987-444-3535" for the phone number

Create an Interface called IStatusInfo

The interface definition should require a method isEmployable that returns a boolean

Citizen

This class inherits from person

Implements the IStatusInfo interface (return true)

Student

This class has a single property of name

Implements the IStatusInfo Interface  (return false)

Demo Program - Console application

Create an array/arraylist of ConcretePerson objects

Populate the arraylist with data

  • 3 employee objects
  • 2 Citizen objects

Loop through all of your person objects

  • print the base/superclass toString (does this work?)
  • print the this/subclass toString
  • Print the ContactPhoneNumber

For one employee object

  • print the base/superclass toString (does this work?)
  • print the this/subclass toString
  • print the string returned by superToString 

Create 4 IStatusInfo objects

  • Set them equal to the 2 citizens you created earlier + 2 students

Loop through all of the IStatusInfo objects

  • Print the result of the call to isEmployable

Distributed Version Control System

After watching this Google Talk by Linus Torvalds I'm really wanting to give a distributed version control system a try.  I'd like to give git a go, but from what I've read it looks to be a pain under Windows.  First blush looks like Mercurial may be a candidate.  I thought it interesting that Mercurial needs an external merge tool like TortoiseMerge to do the actual merging.

After doing a little more reading, I'm probably going to give Bazaar a try.  A big reason is it's explicit support of Windows.

Kyle Cordes has a good write up about this topic on his blog.

Need a source code control solution?

If you are looking for a source control solution...

You should definately check out and read up on Subversion (SVN), TortoiseSVN and Ankh. Subversion is the version control system. It can run under a windows service, file system type repository or under Apache.

We have it running with Apache on a port other than 80. TortoiseSVN is for windows shell integration. Ankh is for Visual Studio IDE integration. There are articles out there that talk about how to use SVN with SQL server.

SVN uses a different process than VSS. It doesn't really do locking. It's more of an optimistic merging/updating process when needed. The documentation covers in depth how the tool/process works http://svnbook.red-bean.com/

We are successfully, using these products at work. They are far superior to VSS. At home, I use Ankh and TortoiseSVN with an external USB drive for the file repository.

http://subversion.tigris.org/ http://tortoisesvn.tigris.org/ http://ankhsvn.tigris.org/

Bryan

Developer Tool: Digital Camera

I have found having a digital camera to be an indespensable and freeing tool. One of the ways I have used the camera is to take a picture of design work done on a whiteboard. We then stick it in OneNote notebook which is shared out for the team.

Taking a picture keeps the process simple. You are constrained if you want to change the design, but it's easy to just do a new drawing on the white board, working off of the existing digital version. I have found this process to be more lightweight and creative than huddling around a monitor and trying to do something with Visio.

And with the resolution of today's camera's, I've been able to pictures of print outs or blue prints at a high enough resolution that they are legible when viewed on the computer.

The other day when we were having difficulty describing a prolbem to a component vendor's tech support, we used the camera to shoot a short ~1 minute video that showed the problem. We uploaded the video to a website where the tech guys could view it and we had our answer the next day. It was way quicker and easier than trying to put together a sample project with a readme to illustrate (if it behave the same for them!) the problem.

To make the process painless, it's important to have a media reader attached or built in to your computer for pulling the images off of the SD, XD card whatever. I have found it's simpler to just work with the media rather than mess with hooking up the camera to USB and going through it.

Vista Sidebar Gadget

I put together a little Vista Sidebar Gadget. Using the information found here and more specifically here, it wasn't difficult to do. The gadget I created is useful for those that follow the Legislative process of the Missouri House of Representatives.

EarthLink Non-Existent DNS redirection

EarthLink,

Your spreading of your new program finally hit the DNS servers that I use on my EarthLink DSL. And at first blush it had all the appearances of browser hi-jacking.

So no matter how you paint it, you may not be technically "browser hi-jacking" but you accomplished the same thing.

http://blogs.earthlink.net/2006/08/handling_dead_domains_1.php

Your blog claims you are doing this to enhance user experience. That's BS and you know it. The real motivation is ad/click revenue.

This feature is no different than when someone hacks a DNS server and repoints a domain.

The only acceptable course of action for EarthLink is to disable this "service" and issue an apology to users.