harriyott.com

28 September 2005

Replacing A4 notebooks

For years I've had a paper A4 notebook at work, in which I jot down meeting notes, phone numbers, quick design notes, to do lists, things that have happened etc. This is great, but not very searchable.

Today I installed some software to partially replace the notebook. Not only is it searchable, it is searchable from any PC on the network. It's easy to add notes, and categorise them, and it automatically timestamps each item. Sound familiar? It's a blog.

21 September 2005

Team Test data files not copying to test directory

Interesting. A data file configured in localtestrun.testconfig wasn't getting copied to the "out" directory. Checking it into SourceSafe and running the test again solved the problem. Curiouser and curiouser.

15 September 2005

Free wine at the geek dinner

I can confirm that at the geek dinner on 5th October that there will be a free bottle of Stormhoek wine per attendee. Hugh has kindly agreed to give out bottles each, as most people will be driving.

14 September 2005

Sussex geek dinner - 5th October 2005

The next Sussex geek dinner will be at the Highlands in Uckfield, largely because the mussels were so good last time.

I've booked us in for 8pm. Please let me know if you'll be coming, so I can make sure you get a seat.

Hugh has generously offered to sponsor the event by providing some free Stormhoek wine.

14 September 2005

Team system initialization

There are different types of initialization for unit tests in Team System: per assembly, per class, and per test. I was going to write about these myself, but Cindy has already done so.

11 September 2005

Chaos in Excel

I found a book about chaos (being the branch of mathematics, as opposed to the US government's response to the hurricane) in the local library, and knowing nothing about it (other than having seen pretty fractal pictures) decided to check it out.

In the book, there was a formula for predicting a theoretical population change, where the next year's population equals rx(1-x), where x is between zero and one. Zero is extinction, and one is the absolute maximum the population could be. I can't remember what r means, and I can't get the book without waking Julia.

Anyway, I thought I'd try this out in Excel, as it looked easy. If you want to join in at home, here's what to do.
  1. In a new spreadsheet, put the value 2.7 in cell A1 (r).
  2. Put the value 0.02 in cell B1 (initial x)
  3. In B2, put the formula =$A$1*B1*(1-B1)
  4. Select cell B2, and drag the small square in its bottom right corner down a few hundred rows (or right to the bottom if you can be bothered)
  5. Insert > Chart > Line > [first type] > Next
  6. Set the data range to be $B$1:$B$500
  7. Next > Next > As object in > Finish
If my instructions are correct, you should have a graph that starts low, leaps high, and zig-zags a few times before settling at about 0.629.



Changing A1 to 3.0 produced a graph that zig-zagged between two values that appeared to be converging very slowly. So slowly, that at row 65536 they still hadn't met.



At 3.5, the zig-zags take on four values, rather than two (I've change the scaling for clarity):



At 3.57, there seem to be eight values:



At 3.61, I can't really work out how many values there are, or how often they occur, but the graph looks like a combination of the previous ones. Looking at the rows at the bottom, the spacing of numbers starting with 0.7 are 26, 14, 10, 28, 20, 18, 10, 10, 12, which seems random to me.



At 3.71, new shapes are starting to appear in the chart:



At 4.0, a curved shape appears:



Now for the chaotic bit. There's a bit more stuff to do in Excel here:
  1. In C1, put the formula =B1
  2. In A2, put the formula =A1+0.000000001
  3. In C2, put the formula =($A$2)*C1*(1-C1)
  4. Double click the small black square in the bottom right corner of C2 (which should fill down the formula)
  5. Set the data range of the chart to be $B$1:$C$500
What we've done here is to draw a new line on the graph, which compares 4 with 4.000000001. You'd think they'd be pretty similar, and they are to start with, but the small difference gets multiplied up really quickly, and the lines soon go their separate ways. After only 37 points, the values are more than 0.9 apart, within a range of 0.0 to 1.0!



The lines become completely unrelated to each other, and this is the essence of chaos. A change of one billionth can affect the line of a really simple formula in so few values. This is the numerical equivalent of the butterfly flapping its wings in
Doddiscombsleigh affecting George Bush's opinion polls ratings.

Anyway, if you've got this far, have a play about with different values of r and x, and see what happens.

I'm not a mathematician, so this is all brand new to me, and really rather intriguing. I don't understand why this does what it does, but I'm going to be mulling it over for a while yet.

6 September 2005

The geography of computing

I've lived all my life in rural Sussex, apart from 3 years at university in Exeter. Before I started there, I had never been there, so I didn't know my way around. I immediately checked out how to get from my halls to the campus, and from halls into town. They were both simple, involving a 10 minute walk along a single road. Not long after, I went straight from campus into town, and had to work out a new route, not wanting to go via halls. I started building up a mental map of the city, which at this point was just a triangle of three routes. Obviously I had a paper map, but it takes time to learn what a road with a particular name looks like.

After a while, I became familiar with different areas. I got to know the roads around my halls, the main shopping streets, a few streets around one of the other campuses. To start with, my mental map was mostly areas joined to the area where I lived with a single road. Every now and then, I would walk down a new road, and find a familiar area at the end of it. I sometimes had to redraw my mental map when two areas turned out to be next to each other, rather than a mile or so apart as I had thought.

Learning .NET is a similar process. I've spent time in a few areas, and I'm starting to see how some relate to others. Database access and XML are nearby, and file I/O is close to XML with serialization. Other areas I've heard about and seen on the street map, but I've not visited, such as reflection, drawing and remoting. I'd like to visit these one day, but .NET is a big city.

Having lived in southern England all my life, my knowledge of the north is sketchy. I know Brighton, Eastbourne, Exeter, bits of London, and a few other towns quite well. Although I have been north a few times, I have no idea how the different towns are situated relative to each other, or basic features of the towns, such as rivers, motorways, or even which counties they are in. I have heard some things about some places, even though I've not been there: Liverpool's dock area has been recently renovated, Carlisle has a biscuit factory, and Newcastle has a football team that wears stripes.

Similarly, I've programmed in a few languages: C#, C++, C, VB and Pascal, and know them quite well. I've never programmed in Java, Ruby, Smalltalk, Ada, RPG or Fortran, but I have heard some things about them: Java has garbage collection, RPG has a limited number of variables, and Ada is a palindrome. These languages are part of the geography of programming, some of which I may visit one day, if they offer something I can't get locally.

Having lived in England all my life, I don't know much about other countries, other than the occassional holiday and one foreign business trip I've been on. There are some places I quite fancy visiting, but I'm unlikely to get to, like Tibet, Brazil and New Zealand. There's other countries that I don't fancy visiting, and I'm unlikely to get to, like Iraq, Belarus and Zimbabwe. Again, I know odd bits about these places from what I've read, but nothing in detail.

Similarly, I've really only been involved with the programming side of computing, and maybe setting up the odd PC and server. Although quite fancy it, I haven't installed a web-farm, designed a CPU or planned out a car with CAD. There's some things that I don't fancy that I haven't done, like networking an office block, writing a game, and administering a mainframe. I know odd bits about some of these things, but nothing in detail.

So there we are then. Sussex, England, the world: .NET, programming, computing.

2 September 2005

The World's 2nd Simplest Code Generator

I started using The World's 2nd Simplest Code Generator yesterday, and it is really useful for those little things that it isn't worth creating a CodeSmith template for. It's already saved me about 90 seconds.