Where is the Foreman?

Recently I have been looking at the area of Peer Code Reviews and where and when they may help my team produce better quality software (lets just skip over defining quality software for the moment).

I think Peer Code Reviews have an important role to play in producing quality software. As do Code Guidelines, Automated Tests, Architecture, Tools, Pair Programming, Multiple Monitors, Training, VCS and Free Pizza.

Yet many companies don’t do Peer Code Reviews.  I suspect more do Free Pizza than Peer Code Reviews. That puzzles me. Perhaps even scares me.

Uncle Bob recently blogged on “Where is the Foreman?” (and follow-up) – “the guy who makes sure everything is done right”. This is the guy who would decide if Peer Code Reviews would help a team or project and if they feel they would help,  make damn sure they happen.

I would recommend you give it a read and then look at your own team and see if that person exists…and if not, then either:

  • You don’t need a foreman. Well done. Not all teams need Foreman.
  • You need a foreman. Well done. Get one.

Either way, give yourself a big pat on the back for considering it. But remember – to ask this question again in three months. You never know…

As an aside, I think the Foreman idea overlaps a lot with the original idea of a Scrum Master aka guardian of the process.

Related Links:

  • I always encourage folks to read the for and against arguments – so also give this a whirl We don’t need a foreman (against the Foreman)
  • and We Need More Foremen (everyone should be a Foreman but perhaps a Referee is needed)

Shout out for the Scottish Ruby Conference #scotruby

Back in 2010 I dabbled with Ruby (remember when Microsoft was still doing stuff with IronRuby) and during that period I attended the Scottish Ruby Conference – and thoroughly enjoyed it! I was surrounded by a see of Apple products wherever I sat and stared at very little GUI IDE on the stage (I recall a lot of VIM and Emacs). It was so different from my “day job” and I left with huge respect for the then small but passionate community.

Well, my twitter #scotruby tells me it is on again today. It looks like a beautiful day in Scotland and a big part of me wishes I was there.


Visual Basic 6 is still going strong

I like C#. I like the .NET Framework.

Pretty much every software challenge a client throws at you can be solved using C# and the .NET Framework. Which is marvellous. It gives you confidence that you can deliver solutions.

However I also know that a for a lot of those challenges, they can be more swiftly solved using … Visual Basic 6.

Somehow at work we got onto this topic today. My own view is “getting stuff done” is still harder today than it once was with languages such as Visual Basic 6 (or indeed others from the era such as SQL Windows). That chat lead me to have a quick look at the “state of Visual Basic 6” in 2014:

Interesting isn’t it?

A lot has been written about the strengths (and weaknesses) of Visual Basic 6 but for me it really boils down to:

  • It is simple to learn and to master
  • It is an early example of opinionated software (think Rails but for Client/Server and desktop)
  • It was “powerful enough” to solve a large class of problems (pre-Web)
  • It didn’t get between you and the problem

I also recalled that Scott H had posted something on this before I left Microsoft end of Dec 2012. Here is his take.

It has a great line in it:

The things that Visual Basic 6 did still need doing. – David Platt

How true…

Lest I forget… Wipe a database but retain schema

  1. EXEC sp_msforeachtable”ALTER TABLE ? NOCHECK CONSTRAINT all”
  2. EXEC sp_MSForEachTable”DELETE FROM ?”
  4. EXEC sp_MSforeachtable”DBCC CHECKIDENT ( ‘?’, RESEED, 0)”

The interesting things are:

  • There’s a clever ‘loop through all the tables’ stored proc
  • Line 1: You need to disable constraints (e.g. Foreign Keys etc) before you delete the data or they won’t let you delete stuff
  • Line 2: Then delete all the data from each table. You could probably use TRUNCATE which would be faster but wouldn’t give you the chance to not step 4 as it’ll reset the IDENTITYs automatically
  • Line 3: You need to turn the constraints back on again
  • Line 4: You can then reset all the IDENTITYs back to zero with the last statement

But worth also taking a look at the discussion on Stack Overflow about this approach and alternatives.

[I’m really just testing word publishing of posts – tbh, bit of a fail]