Monday, October 31, 2005 - 19:14

I generally try to not to blog about work, however much I'm tempted or need to vent - it's just not a good idea, for a whole variety of reasons. One thing I am going to say, however: if you have a web app, which connects to a web service, and you end up wanting this web app to look and act just like a normal windows forms app - why not just make it a windows app, and save your developer a whole lot of stress and extra, needless, messy work? I mean, if you want something that looks like a duck, and quacks like a duck, why dress up a goose in a duck costume?

So in an effort to avoid talking about work, or other things that I'd like to talk about but not in a public forum, I thought I'd give a list of what I've been reading lately. I don't really expect this to interest anyone much, I'm really just talking to myself as usual (only more so) :-)

Right now, I'm reading Pride & Prejudice by Jane Austen, since I realised that I've never actually read any Jane Austen and thought it was time that I did. And this was the only one that they had at the library. It's okay - good to read when you're stressed, since all their big worries just seem so small, it's quite amusing.

I'm also reading Grunts! by Mary Gentle, which I've found rather disappointing. I've been wanting to read it for ages, and saw it on special at Kalahari.net snd included it in a giant order of about 6 books. But despite it being billed as a comedy, it's not really funny - the basic premise might be mildly amusing, in that it's a bunch of orcs who start acting like US marines due to the influence of the uniforms and weapons that they find in a dragon's hoard, but the bulk of the book seems to be a lot of battles and people being blown up.

The third (and last) book that I'm currently busy reading is The Borribles, by I don't know (and am too lazy to get up and walk the couple of steps over to my bookca^H^H^H^H chair with books piled on it to check. I don't know if it's just not my sort of book, or if I just wasn't in the right mood last night when I started reading it, but I haven't got past page 3 yet.

Yes, I really am reading 3 books simultaneously :-) As well as the latest issue of Realms of Fantasy.

Books that I've recently finished reading: Do Not Pass Go, by Tim Moore - a view of the history and present of London, as seen from the perspective of the properties of the Monopoly board. It was quite interesting and funny, although all the complaints about how they've torn down all the magnificent old buildings gets a bit boring.

Thud!, by Terry Pratchett - I was really looking forward to this one too, and it was okay but not great. I think this was partly because the edition I got was the US edition, which had a lot of typos as well as a really large font. But I remember that Nightwatch didn't impress me much at first, but when I reread it I enjoyed it a lot more, so maybe this one will be the same. But it struck me as being a cross between Nightwatch and The Fifth Elephant, and not really as new and groundbreaking as the Discworld books normally are.

Hmm, what else have I read recently? Tons, but nothing that really sticks out in my mind. I also bought a bunch of the Penguin birthday books (again, can't remember what they're really called, and too lazy to get up and check), so I carry a couple around with me in my backpack and pull them out whenever I'm bored or go to McDonalds or somewhere for lunch at work. Currently reading "Scenes from Academic Life", "Why The World Went To War", and "In Defence of English Cooking". Oh, and I also recently finished "Frost On My Moustache", also by Tim Moore, another travel type book that's quite funny (I ran out of Bill Bryson). Also re-read a bunch of Tom Holt books (Paint Your Dragon, and Wish You Were Here).

Labels:

Wednesday, October 26, 2005 - 09:35

Biometric ID cards and passports for SA

This is scary.

http://www.iol.co.za/index.php?set_id=1&click_id=13&art_id=vn20040815115028445C654537 (tinyurl http://tinyurl.com/bu9kr). Basically, South Africa is going to introduce biometric ID cards and passports within 6 months, forcing *everyone* to reapply for a new ID card (we currently have compulsory ID books - large parts of the population don't have one, because they can't afford them (and the new one is about 10 time more expensive), and many still haven't converted from the previous format to the current one, which has now been compulsory for about 10 years).

This paragraph particularly scares me:
"Gilder said the implementation of a new identification and passport system would make it impossible to forge documents because each card would have a microchip with the carrier's biographical details and fingerprints."

Our government obviously hasn't been paying attention at all to the whole ID card issue in the UK, and this quote shows that they haven't a clue about the security aspects. Plus, the government system is so rife with corruption that I'm convinced it will still be very easy to get fake ID cards - another part of the problem is that many people don't have birth certificates or any way to prove their identity, so they just get issued ID books on the basis of two other people saying that they are who they say are.

I really wish that they would look at the problems the UK government is having and learn from that - the odds that we're going to somehow do it better and circumvent all those issues are less than 0.

I'll post more about this when I have more time (in fact, I'll probably just rewrite this post, so don't get attached to it :). I just wanted to get something up as soon as I could. I would say I'm shocked, but totally despondent about our government probably describes it better.

Labels:

Friday, October 21, 2005 - 09:55

Useful SQL script

Here's a really useful script that generates insert statements for all the rows in a table, essentially letting you save your table data to a file. It's great if you want to send the contents of your table to someone else, or as a backup for sample data, or all sorts of things.

http://vyaskn.tripod.com/code.htm#inserts

Looks like there are some other useful scripts on that page too, but I haven't had a chance to look at them yet.

Labels:

Sunday, October 16, 2005 - 00:27

PictureBox in C#2.0 Beta

I'm having an odd problem with PictureBoxes in C# 2.0. Specifically, I'm having a problem assigning them at runtime (not changing their image - that's fine).

This is best illustrated using code snippets.

This works (MapPB and pictureBox1 are both PictureBoxes):

private void button2_Click(object sender, EventArgs e)
{
pictureBox1.ImageLocation = @"D:\Misc\cthulhusmall.jpg";
MapPB.ImageLocation = @"D:\Misc\cthulhusmall.jpg";
}

This doesn't - MapPB just stays empty:
private void button2_Click(object sender, EventArgs e)
{
pictureBox1.ImageLocation = @"D:\Misc\cthulhusmall.jpg";
MapPB = pictureBox1;
}

And the same for this:
private void button2_Click(object sender, EventArgs e)
{
MapPB = pictureBox1;
pictureBox1.ImageLocation = @"D:\Misc\cthulhusmall.jpg";
}
and of course this:
private void button2_Click(object sender, EventArgs e)
{
MapPB = pictureBox1;
pictureBox1.ImageLocation = @"D:\Misc\cthulhusmall.jpg";
MapPB.ImageLocation = @"D:\Misc\cthulhusmall.jpg";
}


It's as if it's okay to change the properties of a PictureBox, but not to assign another PictureBox to it :-S Once you do that, you're screwed, no matter what you try to do to itafterwards. I just can't figure out why.

I've never really used PictureBoxes before, so I don't know if they work the same way in 1.0 (and something to 1 on a Saturday night/Sunday morning, I'm not too eager to write some code to try it out); and I don't know if this is by design in 2.0 or a bug, seeing as it is a beta release.

If you have any ideas or solutions, please leave a comment - this is seriously going to impact the design of my app, if I can't assign PictureBoxes at runtime :-(

Update: as a friend pointed out a couple of minutes after I posted this, of course it won't work, since the control that is drawn is the one in the form's control collection, and not MapPB. So changing the object that MapPB points to is not going to change the control that's drawn.

Labels:

Saturday, October 08, 2005 - 17:35

Online Music Download Sites, or The Lack Thereof

I know I've said this before, and lots of other people are saying it too, but the music industry really needs to rethink their distribution channels.

I generally don't want to buy an entire album, unless it's a compilation; most groups, I like one or two of their songs but an entire CD is just too much. But I cannot physically buy just the tracks I want.

This is where online sales should come in, but it fails dismally, particularly in South Africa. As far as I know, there aren't any legal international download sites that let you buy if you are in SA (I'm not counting the russian sites - I suspect that they're semi-legal at best; I don't trust them with my credit card details; and I'm pretty sure that they don't pass the money back to the record labels, so why should I give them any money?) And that's leaving aside the whole DRM issue, anyway.

So that leaves local online mp3 download sites, of which I only know one - Musica. They let you stream music for 10c a song, and download for R9.99. But. There are a whole host of restrictions, some of which I can get around, most of which just put me off entirely.

You have to use IE, even just to browse the download site (such as the payment and DRM info!), and you have to use MediaPlayer to play the tracks (whether streamed or downloaded). Tracks are .wma, and cannot be played on iPods. You can only play tracks on 3 PCs (and I don't think that's 3 simultaneously - I think they mean if you buy a new PC, or rebuild your old one). Not really a problem, since I wouldn't be buying in high volume, and could just use something like FreeCorder to capture the soundcard output as mp3, thus getting a DRM-free mp3(and I suspect that this is why DRM downloads seem to be successful - people are buying them, but then un-DRMing them immediately, which presents a false image to the music labels).

But things get worse. The download server isn't local, which means it's slow (they use a UK download service). You must use a credit card to purchase music, although they do say the site is secure (I haven't got that far to check it out myself). Some tracks on the site are region-specific and you may not be able to download them (although they reassure you that you then won't be charged for them - I should hope not!). Some tracks are limited as to the number of times you may play them, or for the number of days you are allowed access to the track for (so much for, "if you download the track it is then yours to keep permanently"!). You need to download and install their "Music Manage" software, to either download or stream tracks! (Again, not from a local server).

You can either buy a pre-paid package, or a subscription. Prepaid packages come in preset amounts - R9.99, R19.99, R49.99, R99.99, R199.99, or R399.99 - so you can't just choose how much money you want to put into your account.

There are a lot of songs that they just don't have, such as "Incomplete" by the BackstreetBoys (so it's not just relatively obscure tracks that are missing).

Credit expires 12 months after you have bought it, never mind that it's your money.

So that simply isn't a viable option, and I will not buy from them. Which means I'm stuck. So if anyone knows of any legal MP3 download sites, accessible from SA, preferably without DRM, where you don't have to install any of their software, please let me know! This is just such a potentially huge market, I'm amazed that there isn't more pressure being put on record labels to allow reasonable online, international sales, but I guess that they have such a stranglehold on the industry that they can do what they like with impunity :-(

Labels: