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]

FREE Building Real-World Cloud Apps with Windows Azure e-book (Jan 2014)

Not the one I did back in 2010 (which is now horribly out of date!), rather a shiny new one which walks you through a patterns-based approach to building real-world cloud solutions. It covers the development process as well as architecture and coding practices.

Download the E-book (PDF) and optionally the companion Fix It Project

The content is based on a presentation developed by (the awesome) Scott Guthrie

  • Norwegian Developers Conference (NDC) in June of 2013 (part 1, part 2)
  • and at Microsoft Tech Ed Australia in September, 2013 (part 1, part 2)


2014 …when PlayStation 4 meets PlanetSide 2

Planetside 2 on PC is amazing as a solo player and epic in a great squad … but you need a very good PC as the battles are huge (Think Battlefield 64 and then double it and then double it again and then …)

Or… you need a PlayStation 4.

It is a free genuine AAA game, which is not pay to win.

Reason #1 why not to buy an Xbox One…

(This is really just a test of Live Writer)