Skip to content

Migrating From VB6 to VB.NET

31 Jan 2005
tags: ,

If you are used to programming with Visual Basic 6.0, then Visual Basic .NET is unlike anything you’ve used before. Fortunately, says Huw Collingbourne, the changes are mostly for the better.

Originally published on DNJ Online, Jan 2005

In theory, Microsoft’s Visual Basic .NET should provide an easy path for experienced VB programmers to migrate to the .NET Framework. However, not all VB programmers have been enthusiastic about making the move. VB.NET is so different from Visual Basic 6.0 that even an experienced VB programmer will need to make an effort to learn to use it to effectively.

If this sounds a daunting prospect, the good news is that not only is the syntax of VB.NET broadly compatible with earlier versions, but the language itself is more powerful and elegant than ever before. There is no question of VB.NET being a ‘poor relation’ to other .NET language – it takes full advantage of the .NET Framework and it is, in essence, just as powerful as other .NET languages such as C#. Read more…

Anders Hejlsberg on C# and .NET

4 Jul 2001

The TechEd 2001 keynote was presented by programming pioneer Anders Hejlsberg. As well as being the chief designer of Microsoft’s C#, his résumé boasts the creation of both Borland Turbo Pascal and Delphi. In this exclusive interview with Matt Nicholson, he gives an insight into his work since joining Microsoft, discussing C# and .NET.

Originally posted on DNJ Online, July 2001

Anders HejlsbergMatt: What have you been doing at Microsoft, and what was your history prior to working for the company?

Anders: I’m actually a Danish citizen, born and raised in Copenhagen. I moved to the US about 13 or 14 years ago. I’ve been in the industry since 1979.  I started at the technical university of Denmark and in parallel with my studies founded a little computer company with some other folks. I think we were the first computer shop in Copenhagen, back in the nascent days before PCs.  We were distributors of a British kit computer called Nascom. It was Z80-based and I wrote a whole bunch of different software such as assemblers and disassemblers – you know the kind of stuff you would write back then. I also wrote a small Pascal compiler. You could yank out your Microsoft ROM Basic and slot in our little Pascal compiler. It was in a sense the very early predecessor of Turbo Pascal. It had an on-screen editor, it would compile in memory and then execute machine code. It grew into a more full-blown implementation on CP/M, and then my company hooked up with the founders of Borland and licensed this technology to them. That basically became Turbo Pascal. They re-branded the software that we had written. Read more…

The swarms of complexity

30 Mar 1989

This article was first published in The Guardian, 30 March 1989:

Army ants have been parallel processing for millions of years. Matt Nicholson reports

By Alex Wild (Own work) [CC0], via Wikimedia Commons

Nigel Franks, at the University of Bath, studies the behaviour of army ants in Central America and like many biologists he finds a computer useful. But his work is also producing results that could have important implications for the design of computer systems.

Biologists have long been fascinated by social insects such as ants, bees, and termites because while the individual insect is such an elementary creature, their societies can exhibit very complex behaviour. Army ants are rudimentary even for social insects, and yet the tactics they have evolved to search for food are extremely effective and exhibit a remarkable sense of direction. The whole is indeed greater than the parts.

A swarm can consist of half a million army ants moving across the forest floor in a swathe 20 metres wide, covering 200 metres a day in its search for food. In Africa swarms can contain up to 20 million ants. They live off other insect species, together with larger creatures such as spiders and scorpions. The army ants periodically swarm from a nest, rapidly depleting the area of food, and as a result are nomadic, frequently moving to fresh ground.

Nigel Franks found that the ants would swarm from the same nest 15 times before moving on, and that each swarm would be along a compass bearing roughly 123° anti-clockwise from the previous swarm. The swarm sticks to the chosen compass bearing and if it meets a stream, for example, the column will move along the bank until it finds a fallen branch where it can cross. Once across, the swarm will turn so as to maintain the previous bearing.

Working with a programmer and a mathematician, Simon Goss and Jean Louis Deneubourg of the department of physical chemistry at Universite Libre de Bruxelles, Dr Franks has used a computer to model the behaviour of these ants on the assumption that each individual is itself a simple processing unit, much like the basic computer proposed by Alan Turing in 1936.

Turing described an imaginary device, now called the Turing Machine, that moves along a tape reading, writing and processing the data on it. Each army ant leaves a pheromone chemical trail on the ground, and each ant has sensors in its head that can detect or ‘read’ the trail left by ants further up the trail.

It was assumed for the computer model that each ant in the swarm is exactly the same, and that each follows the same behaviour pattern when it comes to laying and following a pheromone trail. It was assumed that a simple left/right decision is taken by the ant, either moving randomly if there is no trail or following and reinforcing the strongest trail it encounters. It was further assumed that both the rate of decay of the trail and the speed of each ant is determined by the strength of pheromone; that each ant takes up a finite, discrete space; and that the ants leave the nest at a fixed rate.

When this simple model was run, using the computer to simulate the activities of around 100,000 ants, the result was initially disappointing. On Barro Colorado Island in the Republic of Panama, Nigel Franks had observed the swarms creating beautiful fractal structures on the forest floor, culminating in a dense, wide front; on the computer just one main stem led from the nest to the sweeping head of the swarm.

However, the picture changed when the team added food, and the assumption that an ant returns to the nest as soon as it encounters food, obeying similar rules. This resulted in something much more like the swarm patterns found on the island. Three species of army ant have been studied on Barro Colorado, each with a different balance of prey and each with a different swarm pattern. Changing the arrangement of the food in the simulation changed the simulated swarm to patterns backed up by observations. Allowing for the simplicity, the simulation was remarkably accurate.

The implication is that a simple processing unit, obeying a few simple laws, can cooperate in complex problem-solving behaviour when interacting with a few hundred thousand similar units. However, the chemical trail left by each ant could well be more than a simple on/off device. Although the trail is very simple, involving just one or two chemicals, this would be enough to convey quite complex messages.

Nigel Franks is now looking at the uncanny sense of direction exhibited by the ant swarm. The ant’s ancestors had compound eyes but now they are just one facet on each side of the head. The forest floor is very dark, with only occasional patches of sunlight breaking through the canopy. In these conditions an individual ant is virtually blind. What is needed is a large compound eye, sensitive to the light’s polarity, that can make the most of what light there is. He suggests that the 20-metre wide front of the ant swarm could be just that, with the swarm integrating and processing the information gathered from the front.

Whether this is actually the case, he has shown that a sufficient number of simple processing units, coupled with an efficient method of transferring data between them and a certain random nature to their behaviour, can build powerful solutions to problems. He sees the ant swarms as potentially “the ultimate neural network”.

Neural networks are of particular interest to computer scientists. Microprocessors like the Transputer from Inmos give us the means to break away from serial computing, where only one process happens at once, towards parallel or distributed processing, where many elements can all be working on a problem at the same time.

Army ants achieve this level of mutual cooperation without any administrative hierarchy, too. This has considerable implications for collective problem solving, indeed for a whole host of situations in our own society and industry.

But despite the increasing relevance of his work to the computer industry, he is not finding funds easy to come by. It may be difficult to see the relevance of research into a particularly obscure insect species; but it looks as though the computer industry would I do well to look at what biologists can offer. After all, this work demonstrates that “social insects have been parallel processing for 60 million years.”

%d bloggers like this: