But it works on my PC!

The random thoughts of Richard Fennell on technology and software development

We need to teach children computer science

The Today programme on BBC Radio 4 this morning had a section on children not being taught computer science. so says a variety of employers who cannot find the staff they need. It seems entry to Computer Sciences degrees has been dropping over the years and the current ICT course at school are to blame.

I was at school in the first generation to get access to computers. I did Computer Sciences O level (1982 I think, it is a while ago) and we learnt about flowcharts, CPU, memory and programmed in BASIC on a teletype and sent 5 hole punch paper tape off to a local Polytechnic for processing and a week or so later got back a printout saying error on line 10 (and my staff today complain about their slow PCs!).  During the course we did at least move onto a Tandy TRS80 so it did get a bit more immediate.

My sister is 4 years younger than me, and one of the first group to do GSCE, she also did Computer Science, but in those few short years the course was already moving towards using a computer as opposed to programming/how it works, though she did have access to a BBC Micro I don’t remember her ever writing code beyond making a Turtle robot draw a box. This trend to consumption instead of creation seems to have continued onwards. My son who is 9 now uses a computer for many lessons, but only it seems to look things up.

On listening to the radio article, I agreed it is good to teach the ‘how it works’ for computing, just as it is reasonable to know roughly how my car works, though I have no real intention of trying to fix it. A basic understanding of any tools allow you to use it to its best advantage. However, the biggest advantage of Computer Science in schools to me, which they failed to mention, is it teaches logical thinking and fault finding in an unforgiving world. When coding if you miss that semi colon off nothing is going to work.

This sort of skill that is vital in most modern jobs. At Black Marble we have been involved in this area for years, such as being the corporate sponsor/advisors of  the 2007 UK Winners in Microsoft Imaging Cup with ‘My First Programming Language’. This aimed to teach junior school children how to solve logical problems and program. It also actually addressed one of the issue mentioned in the radio article, the lack of teachers with programming skills (you can’t rely in a keen maths teacher who had built their own computers as my school did on the 80s). It incorporated some AI technology to do the first diagnostic to try to fix the code the student had written before interrupting the teacher, think a complier that can fix the code and explain why the student’s code has failed to the student. This is important when the teacher has 20+ children to help so can only give each one a few minutes.

During this project, and other research work we have done, it showed that many people can benefit from knowing just a little on how to program, not just school children. A good example is the office worker who if they can write an Excel macro can save themselves 20 minutes a day. This adds up so they can save themselves around 60 hours a year and probably reduces there number of errors in calculation too.

I agreed with a recent point on a Herding Code podcast that many people of my age got into computing because they were typing in games from the front of magazines in the 80s With a bit of application you could see how your favourite arcade games worked. This is less true of todays popular games, an XBox title is more like a 3D movie when all you can create is a holiday snap, it is just too big to comprehend. However, the games on phones and PDAs are more accessible, a kid in the garage can see how they work and create their own games and applications with relative ease, it is back like being the late 80s or early 90s.

So I do hope there is a move back to a real Computer Science in schools. It is not as if there are no jobs in this sector.

Windows Phone 7 not synchronising Outlook

I had a problem with my LG E900 WP7 phone over the weekend, Outlook stopped synchronising with our office Exchange server.

It started when I got back from a trip Ireland. My phone switched back from roaming and started to use 3G for data again, as opposed to WIFI. Also over the weekend we had a connectivity problem from the office to the Internet so for a while I could not connect to any of our services from any device. However, even after both these things were sorted my Outlook still failed to sync, it said it was in sync but showed no new email since Friday when it was disconnected from my Irish ISP based MIFI in Ireland. No errors were shown. I waited until I got back to the office and tried a sync via our internal WIFI, all to no effect.

The fix was simple, and obvious, delete the Outlook account on the phone and recreated when I was in the office. Problem is I still have no idea why this issue occurred.

So that is 2 issues in about 6 months, much better than my previous few phones!

Working with Hyper-V, VLAN tags and TFS 2010 Lab Management

I did a post at the start of the year about Lab management and VLAN tags, how they are not supported, but you can work around the problems. Over the past few months we have split our old Hyper-V cluster into one for production and one for test/lab development. This gave our IT team a chance to look at the VLAN problem again.

So a quick reminder of the issue – the deployment tools in Lab management that create environments provide no means to set a VLAN tag for any networks connections they create. Once an environment is created you can manually set a VLAN tag, but it is all a bit of a pain and certainly unsupported.

The solution our IT team have come up with to avoid the problem is to set the default VLAN tag on the physical port on the Ethernet switch. Hence any VMs/Environments on the the new test/lab Hyper-V don’t have to worry about VLANs at all, they are all automatically, in our case, on subnet 200. This works for TFS Lab Management and also means our developers need to have no knowledge of IP routing setup to deploy a VM/environment. Our production Hyper-V box, that runs much of our business systems, still uses manually set VLAN tagging as before, but as there is no auto deployment involved on this system there are no problems.

There is one gotcha though…..

If you try to use a VM created on our old setup, that was previously set with the VLAN tag of 200, it cannot see the LAN, even though it has what you think is the correct VLAN tag. This is because setting a VLAN tag with Hyper-V to 200 is not the same as not setting a VLAN tag in the operating system and letting the Ethernet switch default the port to the VLAN tag 200. So you have to let the switch manage the VLAN tag, the VM needs to know nothing about it. As shown below


So once this is all set you have your routed network, but also have a fully supported Lab Management setup

Typemock Isolator 6.2 released–now with TFS2010 build support

Typemock have recently released a new version of Isolator, 6.2. As well as the usual fixes and enhancements you would expect, this is the first version to support TFS 2010 team build out the box.

Prior to this release Typemock supported MSBuild based TFS builds (2005/2008) but not the Windows Workflow based version in TFS 2010. The issue was that in TFS 2010 builds it was possible for build steps to run in parallel, maybe on different build agent PCs, so you could not guarantee that Typemock Isolator was intercepting the correct threads. You could call the MSBuild tasks to enable the mocking interception, as in 2005/2008) it was just that they did not work in practice on 2010.

To address this problem I wrote a TFS 2010 Build Activity to wrapper the TMOCKRUNNER program to make use all the testing and isolation was run in a single thread. This was (and still is) available from the Typemock add-ons site and there is documentation on the Community TFS Build Extensions site and this blog. In effect you use this custom activity everywhere you would have called MStest in the workflow (the areas circled below)

This is not the way that the new Typemock Isolated 6.2 tooling works. This goes back to the basic technique used for their MSBuild integration i.e. calling an activity to start mocking interceptions, call other  activities to run test as normal, then call a final activity to switch of mocking interception. The way this signalling occurs has been modified so that it will work  under a TFS 2010 build process template. You end up with a workflow similar to the following


The advantage of this model is that you don’t have to fiddle with code to runs the test, unlike my activity which has to wrapper MStest and so needs to be able to handle loads of options command line parameters.

So should make the integration of Typemock Isolator into TFS 2010 build easier. For more detail have a look at the Typmock online documentation

Black Marble at the Abbey Dash in Leeds

We got a good turn out of Black Marble staff at this years Age UK Abbey Dash 10K in Leeds. We were amongst over 8000 runners who turned out for a cool and foggy Yorkshire Sunday morning run.


We had a handicap race amongst ourselves, using a wisdom of crowds poll to estimate everyone target time. This was won by Steve Spencer our Development Director. He beat his target by 20 minutes. I am not sure whether this says more about his fitness or our staff’s opinion of him!


Congratulations to all who took part, I am sure plenty of good causes benefited from the efforts of everyone who ran

More experiences upgrading my Media Center to receive Freeview HD

In my post experiences upgrading my Media Center to receive Freeview HD I said I thought the reason my Windows 7 Media Center was hanging at the "TV signal configuration” step was down to using mixed tuner cards. Well my second PCTV nanoStick T2.arrived yesterday so I was able to try the same process with a pair of identical USB T2 tuners.

Guess what? I got the same problem!

However, being USB devices it mean I could test the tuners on my laptop, a Lenovo W520 (Core i7, 16Gb, Windows 7). So I plugged them both in, they found drivers from the web automatically, I ran Media Center, select setup the TV signal and……. it worked! A few worrying pauses here and there, but it got there in about an hour.

So why did it work on a laptop and not on my Media Center PC?

I considered performance, but it seemed unlikely,the Media Center is aCore2 Duo based system about 3 years old and has had no performance problems to date. So the only difference was that the laptop had never seen a TV Tuner before, the Media Center had.

Unused drivers

So I wondered if the old Hauppauge drivers were causing the problem. Remember in Windows if you removed an adaptor card then the drivers are not removed automatically. If  the driver was automatically added (as opposed to you running a setup.exe) then there is no obvious way to removed the drivers. The way to do it as detailed in this Microsoft Answers post. When you load device manager this way you see the Hauppauge devices and you can uninstall their drivers.

And it makes no difference to the problem.

Media Center Guide Data and Tuner setup

Using task manager I could see that when Media Center TV setup appeared to hang the mcupdate.exe program was running and using a lot of CPU. I had seen this on the Lenovo, but it has passed within 30 seconds or so, on my 3 years old Intel based Media Center PC I would expect it to be a bit slower, but I left it overnight and it did not move on. So it is not just performance.

The mcupdate.exe is the tools that updates the TV guide data for Media Center. It is run on a regular basis and also during the setup. So it seems the issue as far as I can see that

  1. There is corrupt guide data so that it cannot update the channel guide
  2. There is data about a non-existent tuner that locks the process
  3. There is just too much data to update in the time allows (but you would expect leaving it overnight would fix this)
  4. There is an internet problems getting the guide (which I doubt, too much of a coincidence it happens only when I upgrade a tuner)

Simply put I think when the TV setup gets to the point it needs to access this data, it gets into a race condition with the mcupdate.exe process which is trying to update the guide.

The Hack7MC blog post seems to suggest the problem is that the guide data and tuner setup needs to be cleared down and provides a process. post suggest the problem can be addressed by cleared down the data; it provides a process to do this. However I though I would try to avoid this as I did not want really to loose the series recording settings I had if I could avoid it.

So I loaded Media Center and select update guide from the Task menu. This started the mcupdate process and  caused a 50% CPU load, and showed no sign of stopping. Again pointing to a probably one of the issues listed above. So I unloaded Media Center, but mcupdate.exe was still running as was the tool tray notification application. Again I left this a while to no effect. So I used task manager to kill mcupdate and the ectray.exe application.

I had at this point intend to run the process from the Hack7MC post, so stopped all Media Center services, but thought i would give the setup one more try. When I ran the setup TV dsignal I got a message along the lines of ‘guide data corrupt will reload’ and then the setup proceeded exactly as it should have done in the first place. I ended up will all my channels  both HD and non-HD accessible from both tuner, and all my series recording settings intact.

So a success, I am still not clear which step fixed the issue, but I am sure it was down to needing to clear down the guide data and tuner setting fully.

Access denied when running a command with InvokeProcess in a TFS team build

When you are trying to run a command line tool via the InvokeProcess activity in a TFS 2010 Team build you might see the somewhat confusing ‘Access denied’ error. There appears to be no more detail in the log.

I have found that this is usually down to a type on the filename property of the activity.

It should be set to something like

“c:\my tools\tool.exe”

but is actually set to

“c:\my tools”

i.e. it is set to the folder not the filename. An easy mistake to make of cutting and pasting paths in from batch files.

You cannot execute a folder, hence the access denied error. Simple but easy to miss.

Black Marble events for the remainder of 2011 and into 2012

Whilst I have been on holiday Black Marble have announced some new events and this time they are not just in the UK, we have a couple in our new Dublin office location. The programme up to new year is:

Hope to see you at some of these events, I won’t be at all of them due to client commitments, shame I enjoy doing these.

Experiences upgrading my Media Center to receive Freeview HD

[Update: Also so More experiences upgrading my Media Center to receive Freeview HD]

I have used a Windows Media Center as my only means to watch TV for about 5 years; upgrading over the years from XP to Vista and onto Windows 7.

Picture of Windows Media Center

I am a completely hooked on the ease of use, especially if you just want a means to watch and record Freeview (the UK free to air terrestrial service). Far easier UI than any Freeview PVR I have seen, and I personally think easier than Sky+ box (satellite) or Virgin’s Tivo (cable) though I don’t have much experience of these device (and they do look a bit of a pain to integrate with Media Center, but they are not really designed for that)

The key reason Freeview is easy to get going with Media Center is the ease of adding a TV Tuner to Windows 7 (this was more awkward in previous versions but the drivers and install process are good now), it now just works – OR SO I THOUGHT…….

I have been running my Media Center with a Hauppauge Nova T 500 dual tuner for a few years without any issue, this allows two channels to be recorded at the same time. Recently due to the UK switching off the analogue TV signal, some HD channels have become available in my area. To receive these I needed a T2 tuner so I got a PCTV nanoStick T2. Now the first point of interest is that many UK suppliers sell this under the Hauppauge brand, one of the reasons I ordered it as I have been very happy with their kit in the past. Why they do this I don’t know, because as soon as you hit the support forums it is obvious they are different vendors (though part of the same group?).

So I plugged in the new USB tuner, so I now had the 3 tuners, the dual Nova T 500 and the nanoStick. This new device was detected by Windows 7 and a driver installed (without the need to put in the CD-ROM) and Media Center tried to do a signal setup. All seemed OK at first but after the 3 tuners were seen the setup wizard hung with the ‘toilet bowl of death’ busy icon. I left this overnight but it did not move on.

I thought the problem might be that the Nova T 500 could only pickup Freeview whilst the nanoStick could also see Freeview HD. So I rebooted and when it got to the stage to detect the tuners I manual set them up as two groups, one for the pair on the Nova T 500 and the other for the nanoStick. This had no effect on the problem.

So decided to try just the nanoStick; at the manual setup stage I just selected the nanoStick. This worked, I still got the ‘toilet bowl of death’ busy icon, but it cleared in under a minute and the wizard continued to detect Freeview and Freeview HD channels, though this detect phase did take about 30 minutes.

I then tried just configuring the previously working Nova T 500, it all locked up again. So something in installing the nanoStick drivers had screwed up the Nova T 500 install. I tried updating the Nova T 500 drivers to the latest I could find but still got the same problem.

It seems I am not alone in this general problem, a mixing of tuner cards can cause this problems. From the Hauppauge support forums it seems that Nova T 500 is really a USB device bolted onto a PCI riser so I suspect a USB issue, (sorry can’t find the links to this again, but that seems not uncommon with Media Center issues there is no easy central resource, we are in the land for forums – hence Google is your friend, not Bing. I find Google does a better job for forum searches).

So what is my solution? I wimped out and ordered another nanoStick. This has a number of advantages

  • It should just work without hours of fiddling
  • I do not have to reinstall my Media Center to remove the NanoStick drivers
  • All my tuners will be able to receive all their available channels; with the mixed tuner install I would have to make sure I associated tuners correctly so that Media Center knew that BBC1 on Freeview on the Nova T 500 is the same as BBC1 on the nanoStick, but BBC1 HD is only on the nanoStick
  • The image quality seems better on the nanoStick, I don’t just mean that I now have HD, which I do, but I am also seeing less pixilation and break up on the other standard Freeview channels. I assume the nanoStick codecs and silicon are just better, they are a few years newer
  • It also is a step toward replacing my current Media PC, which is in a standard desktop case with PCI slots, with a quieter, cooler running device something like an Acer Revo, just not sure I can justify the cost when what I have works.
  • There is still a reasonable eBay market for a boxed Nova T 500, especially as I have never even opened the wrapper on the Hauppauge remote as I was using the Media Center one.