Archive for the 'Computing' Category

Jul 05 2008

Internet access: easy in bars, difficult at home

Published by Dougal under Home, Networking

We’ve been fighting with Virgin Media for about 6 weeks now to get our net access transferred over to the new flat. The entire time we’ve been paying for a service we do not have. This will definitely require remuneration when we finally get a service.

We’ve been surviving thus far with a couple of open WiFi connections that we could pick up. Neither were very close to us — this requires careful positioning of laptops to maintain signal levels — but they were still usable.

Were usable. Past tense. On Thursday night both of the networks we used disappeared. One of them hasn’t come back and the other has but appears broken. I can occasionally get an IP address but it doesn’t forward packets past the router. :-( We are bereft, cast loose in a sea of microwaves, all encrypted… we’ve been really suffering!

We’re currently in Montpeliers, downing cocktails and jealously guarding access to the power socket that is powering my laptop. I can highly recommend their Whisky Sour, which is really delightful, and the Espresso Cocktail, which was apparently made with the wrong ingredients but tasted grand anyway. It’s pouring with rain outside and I feel no motivation to get wet.

Email and blogging may be rather light this weekend because we’ll be snatching whatever access is available in cafés and bars (carrying an Eee around is awesome). Please bear with us!

One response so far

Jun 26 2008

Ordering bus tickets on Citylink website is a silly mess.

Published by Dougal under Bugs

Citylink are a bunch of useless amateurs that don’t have the guts to admit their uselessness when it’s pointed out to them.

I spent all day yesterday and half of this morning trying to book tickets to get to Glasgow. I was repeatedly told by the online ordering system:

Please Note: There are currently no fares available for your origin and destination. This may be because you have selected an open return. Please go back and plan your journey again using the return option.

Naturally this error message appears whether you choose Single, Return or Open Return. If I was unlucky the search would fail completely because the hamsters were having their postprandial snooze.

I emailed them to let them know their site was crap (well, I was slightly more constructive than that). They replied an hour later telling me to upgrade my Java installation — they even directed me to http://www.java.com. This was all rather suspicious, because not only do I have the latest Java install, but their site doesn’t even use Java. It does use Javascript extensively, but (1) the two languages are completely unrelated and (2) Javascript cannot be updated by going to that website. This may cause some minor confusion for the layman but I would hope the person who emailed me, the System Development Assistant, would know what languages they use when developing their system! I say the site doesn’t use Java, but I mean on my computer. Their website appears to run with Java Servlets but that’s all on their computers. There’s nothing that me fiddling with my settings will do.

Just out of interest I fired up IE6 in Windows and tried again. It worked! Well, maybe there is something wrong with Firefox after all… but no, my usual system was now working fine. What had they changed?

So, do you think they told me to look for the tartan paint while they fixed everything in the background? I’m quite inclined to send them a rude email back asking them not to take the piss.

No responses yet

Jun 20 2008

Randomised walks across your neighbourhood: geohashing

Published by Dougal under Computing, Humour, Programming

A few weeks ago Randall Munroe published XKCD 426: Geohashing and apparently invented a new sport…

The idea is quite simple. The world is divided into little degree-by-degree segments (by latitude and longitude). If you see these on a map they look mostly rectangular at the equator and gradually get more triangular at the poles, because the pole-wards side is shorter than the equator side. You can see a picture of the geographical segment around Edinburgh on the wiki.

If you imagine that each rectangle has a starting corner (the one nearest the equator and nearest the Greenwich meridian), which we’ll call (0.0, 0.0). We can identify any spot in your rectangle with a fractional offset from this point — like (0.456, 0.235).

If you want to know the major co-ordinates for your home then a good place to start would be this list for the major cities of the countries of the world.

I’ve put together a Haskell program to demonstrate the next stage of the procedure, though there are plenty of web-based tools to do the same thing. I just wanted to try out the new cabal-install package (akin to CPAN, gems etc for other languages).

Continue Reading »

No responses yet

May 30 2008

Following links to nowhere

Published by Dougal under Bugs

Let’s start with an analogy. I’ve got the manuscript for my bestseller here and I want you to proofread it for me. My options are to email it to you or put it online somewhere for you to download. Email is an effective way of pushing it to you but it might be too large a file to attach. Alternatively I could send you a link which you can use to download from somewhere else. The advantage of this method is that it scales really well — if I want 50 friends to read my new book it’s just as quick to email them all with a link.

There is one disadvantage — if the file isn’t there then the would-be proofreader sees Error 404: File Not Found. And they give up.

Using this analogy we can look at the problem of programs moving data about in memory. There are two ways to do — copy all the data from one place to another, or just copy the location where the data is stored. This is the same idea as emailing the whole document or just emailing the link.

The disadvantages of copying all the data around should be easy to see — it’s terribly slow. All of these delays cost a lot of time because memory access is so much slower than the processor. The alternative, passing references round instead of all the data, is much faster. The only data copied is a tiny little link showing the location of the needed data.

But — and this is really important — if the link points to the wrong data then the consequences can be catastrophic. If the in-memory link (which is called a “pointer”) doesn’t point anywhere then the application (or even the whole computer) can crash. Why such a big reaction to what is essentially a 404 error?

The details to this are quite interesting. Inside your computer there is an intricate hierarchy of privileges — this prevents programs from doing things they’re not allowed to do, like reading protected files without permission. One of the ways in which these privileges work is that each program is assigned an area of memory to use. It can’t just access any old location in memory. If a program tries to access memory outside its own assigned segment it will often be killed by the operating system. (If it is not killed then the program could do something dangerous like interfering with another program or with the operating system itself.) The operating system may state that the program was killed because of a segmentation fault or similar stern warning.

One common fault in programs is trying to follow pointers that don’t point anywhere. These are often called null pointers, since they actually point to address zero in memory, which doesn’t contain anything. This memory location is specifically not owned by anyone, so there should never be any need to look there. Any program which does look there is assumed to be in error and killed by the OS.

You know how common 404 errors are when browsing the web. Null pointers are just as common in programming. They are used all the time and can be quite powerful in many situations. But they are also very dangerous and many modern programming languages do their best to provide the advantages of pointers without the dangers. Sometimes the result is like a safety razor, with most of the function and fewer dangers — and sometimes the result is just the same dangerous tool with a warning sticker.

No responses yet

Apr 25 2008

Did you study computing at school? Or just MS Word?

Published by Dougal under Computing, Politics

Last week in The Herald:

Pupils show a lack of interest in computer studies

University students are being used to help rekindle interest in computing science courses in Scottish schools amid concerns for the future of the subject.

… The difficulty for teachers and local authorities stems from the difference between computing studies and ICT, the latter being more common in schools. Computing studies deals with technical aspects of computers and technology, while ICT teaches pupils the user side of technology.

This was certainly the case when I was at school — computing was taught by people who had no apparent understanding of the subject beyond the use of application software. So that was what we learned. Certainly nothing of the mathematics, programming or rich history of the field. (I started Standard Grade computing but dropped it after a couple of weeks when I read through the past papers and realised I stood a good chance of passing the two-year course without study.)

A day or so after that article in The Herald, two responses appeared on the letters page. The first, from the University of Edinburgh’s school liaison in the Informatics department:

Policy-makers at all levels need to understand that being able to “use” Microsoft Word or Google doesn’t make you a computer expert — it merely makes you just another consumer. If we want our children to be prepared for a better future than as readily replaceable call-centre fodder, then we need to understand that the wielders of tools are always under the control of the creators of tools, and that ICT is not computer science.

I don’t recall seeing the situation summarised with such clarity and conciseness before. This is exactly the problem (and what’s more, the problem isn’t even limited to computing or to Scotland).

What really iced the cake for me was the second letter on the subject that day, from a teacher at my old school. Mark Tennant wasn’t around when I studied there but he obviously knows what he’s talking about, and highlights some alarming turns:

Faced with falling numbers in a department that requires costly equipment and resources to run, it is hardly surprising that head teachers are choosing to close computing departments. I would, however, implore them not to take the easiest option, but rather work with the departments to re-invigorate their computing courses for pupils, right from the start of secondary school.

Even contemplating closing down computing departments seems horrifying from my view — but then, if the subject they teach is as dull as Mr Tennant makes out, what merit is there in keeping them open? It seems clear that the people in charge (of the curriculum and of the individual schools) don’t realise what computing should be about.

I wrote to Mr Tennant (tracked him down via his blog) to thank him for his letter and to ask him how I might help. He says (I hope he doesn’t mind being quoted):

If you are wanting to help out with the campaign then the best thing you can do is make some noise — make sure that you respond to any articles in the press, write to your MSP etc. Broadly, there are three messages we are trying to get across.

  1. There is a difference between computing and ICT skills, and both are important to have in schools,

  2. The computing curriculum is outdated and contains irrelevant content, but we aim to address this through “Curriculum For Excellence”

  3. Head Teachers are limiting pupil’s options if they remove computing from their schools, and parents should be very concerned.

I will be writing to my MSP about this. If you feel as strongly I recommend you do the same. You can find out exactly who that is by inserting your postcode or address on the Scottish Parliament website.

3 responses so far

Apr 24 2008

The possibilities of an Eee PC

Published by Dougal under Computing, Life, Work

Things you can do no problem at all:

  • Stand at the cooker, laptop in one hand for reading email, idly stirring soup with the other hand.
  • Playing Tux Racer on the sofa.

Things that will take some setting up:

  • Connecting up to router console port because there does not seem to be any terminal software in the default repositories.

No responses yet

Apr 16 2008

My mini-laptop arrived

Published by Dougal under Computing, Life, Reviews

I’m sitting on my comfy sofa right now, typing this post in a Firefox browser window, on a cute blue Eee PC 4G Surf. It’s very small — about the width and length of a hardback book, and a couple of centimetres tall — and incredibly light too. I haven’t had to travel anywhere with it yet, but I don’t think it would be a hindrance. (It comes with a little black pouch that feels a bit like a wetsuit.)

The typing is still a wee bit awkward, but I don’t do a great deal of high-speed typing as it is. By far the biggest bottleneck is in my head.

I set up the Skype stuff last night, so I might get to chat with my brother in China before long. I’ll have to remember to keep it on though! It even has a webcam built in, so I might even be able to use that (maybe video conferencing from here to China would not be very effective; I don’t know).

Er, not sure what else to say. Haven’t really done much with it yet. I’ve changed the hostname from the default of eeepc-owner (where owner is the username you first put in on setup). It’s called barnacle to keep in with the sea theme of all my computers. (I’ve mentioned this in previous posts though I can’t remember where. Even our wireless network is named after a sea…)

More information when I can think of something to say! Or if you’ve got any questions that would be good.

3 responses so far

Apr 09 2008

Food, computing, sign language…

Published by Dougal under Computing, Food, Sign Language

Check out the fun time I had cooking burger and fries from Nigella Express. You should try the chips recipe, it’s great fun. You get a freezer bag and put a bunch of new potatoes inside. Then you get a rolling pin and beat the crap out of the little blighters. And then when they’re little chunks — or when you’re tired, whichever comes first — you fry ‘em up. She suggests shallow fry but I think a deep fry would be give a crisper, more golden finish.

Getting nice new potatoes is probably quite important too. The only ones I could get in Somerfield were a bit tired.

I had a deep philosophical conversation with Martin earlier and came to the conclusion that the green Eee was the way to go. (Thanks for the encouragement Calum; you’re still invited for Nigella-food some time!) So I ordered it, and hope to get it within a week. (Finding somewhere that stocked it was harder than I expected.)

Meanwhile, I have to think up, practise, and then record, a ~3 minute presentation for my next BSL assessment. I hate these things where you have talk about your hobby or whatever because I never know what to say. I had this paralysis in school with French essays and it hasn’t really got any easier. Must get thinking…

3 responses so far

Apr 02 2008

Game of Thud!

Published by Dougal under Bugs, Computing, Friends, Programming

I’ve been fiddling with Mono lately, the free software implementation of the Microsoft .Net system. I say, fiddling, mostly just looking at. My good friend Matt wrote a network game of Thud! in C# for Windows. I was trying to get it working under Linux.

I’m happy to say that migrating a Visual Studio project with MonoDevelop worked flawlessly for me. Then I just hit Build Project and it worked. The game is human-player only, so I wanted to write a rudimentary AI to play against. (I don’t really know how to play, so I think I could beat me fairly easily.)

Then I hit this bug in the Mono system which causes complete failure whenever you try to open a network connection — but only if your machine has a dynamic IP address. Yeah, I know…

I wanted to simplify the networking protocol (currently it’s the default .Net serialisation system, which is rather opaque). That will have to wait until I can play the game without crashing it.

No responses yet

Apr 01 2008

My birthday has been tainted

This is a round-up of things that don’t deserve their own blog posts.

  • My birthday seems to fall right in the middle of Homeopathy Awareness Week. The ignominy.

  • Last week Rowan Williams appeared to have contracted Hovind’s disease, a condition common in the United State of America, with symptoms such as absurd mischaracterisation of biological theories. The speech took place on 17 March as the first of three lectures, Faith and Science, Faith and Politics and Faith and History. The official transcripts of these lectures have not appeared online yet. I still don’t know whether he’s merely a nutty man with bushy eyebrows or something even weirder.

  • I’m re-reading Neuromancer for the Nth time and I’ve only just noticed that the Finn wears a tweed jacket. I don’t know how, but I always pictured him in a dishevelled wax jacket. Also, despite the nay-sayers, it’s still an awesome book.

  • I’ve decided not to wait to get myself an Eee PC. The beefier one probably won’t appear until the end of the year and I can always upgrade if it seems worthwhile. Now I just need to find someone who has them in stock…

  • If you’ve got some time to spare, and especially if you hated learning mathematics at school, you should read Lockhart’s Lament (PDF). It’s captivating, entertaining and educational — even funny! — not to mention an extremely accurate picture of what school maths was like. (Incidentally, if you search for lockhart's lament there is a lot of discussion, and in nearly all of them someone has pasted the same mini-critique about it being in a “historical vacuum”. It starts “As I see it, Paul Lockhart’s essay would be much more powerful if…”.)

  • Our internet connection still seems well screwed up so I can’t access Delicious from home. So if anyone checks my saved links you’ll not find anything new. Sorry about that.

  • Alien loves Predator has been updated for the first time in what feels like forever. Now when is Everybody Loves Eric Raymond going to take the hint and follow suit?

That’s all folks.

No responses yet

Next »