Tuesday, August 30, 2005 - 14:12

Google's Gone Insane

I've always supported Google, but I came across two things today that are making me change my mind ...

They are now allowing anyone to sign up for gmail (according to the googleblog, at any rate - I can't see a sign-up link on gmail.com). But there's a catch: "From there, you can get an invitation code sent to your mobile phone, and with this code, you can create a Gmail account." WTF?! Not everyone has a mobile phone, and not everyone lives in the US! Further on, they say: "Right now, sign-ups only work with U.S. mobile phone numbers, but we're eager to support others." Yeah. Like they're going to bear the cost of international SMSs? I really hate this US-centric approach that so many companies are taking these days (second only the broadband-centric approach). In fact, that's probably why I can't see the sign-up link - they're probably checking IPs and only allowing US-based ones. Although I did find this link (ironically, via google).

Then there's an older issue, which I only came across today. Since April, Google prefetches the first link in your search results, without telling you (if you're using Firefox, that is). I can understand how it may be useful to some people in some circumstances, but I think it's a security risk and, even worse, it's detrimental to dial-up users. My bandwidth is scarce enough, I don't need it downloading something that I don't know about and probably don't even want! I don't know how I missed this in April (oh yeah; I was probably too preoccupied with resigning!), but there's a lot of info out there if you want to know more. This is probably a good place to start. Oops, almost forgot to tell you how to disable prefetch: in firefox, type 'about:config' into the location bar, and once it's loaded, set 'network.prefetch' to false. Simple, but not exactly intuitive.

Labels:

Monday, August 29, 2005 - 14:52

Windows Forms Layouts

I've been working with forms in .net lately, and there are a couple of real deficiencies. I think some of them may have been fixed in 2.0, but unfortunately there are lot of us still using the older version!

The most annoying thing is that you can't zoom in or out of the form that you're editing in the designer. It's fine if you're only creating a small form, but if you're working on a large form you need to keep scrolling around to see the various parts. Sure, you can close some of the extraneous windows (such as the Solution Explorer), and even some of the necessary windows (such as the toolbox), but it's just not enough. Why not have a zoom control like most image editing packages?

It would also be really useful to be able dock or anchor controls to each other, rather than only to the edge of the form. I think that this has improved in 2.0, although maybe not in this exact way. And a less buggy docking system would be great... currently, I'm trying to design a form with various controls on it so that some of the controls (checkedlistboxes) expand horizontally and vertically when the form is maximized. This involves lots and lots of panels, anchoring, and docking! Each control (together with its label) has to go on its own panel, anchored appropriately, and those panels need to be grouped into other panels - each subpanel must be docked correctly within its parent panel. And then depending on how complicated the form is (which isn't very: a simple 2 x 2 layout, maybe a 3 x 2 in some cases), those panels need to be docked within another panel. And then you need a resize event handler for each containing panel, to resize the inner panels appropriately - see this Code Project article for a simple example.

And this is finicky enough, but it's even worse when the panels refuse to dock correctly. The order in which you dock controls is very important, and sometimes not intuitive. In this case, I have three vertical panels - the left should dock to the left, the right to the right, and the middle should fill the available space. But if I dock left to left, then right to right, then middle to fill, the middle panel takes up the left panel's space! No matter what order I set the docking in, it just won't work. And if I dock the middle panel to the right, it docks to the right of the form, not to the left edge of the right-docked panel. In this case, anyway ... in other situations, that's worked okay.

Aarrrgh.

Update: It turns out that while setting the docking in the right order is important, what is even more important is the order in which the controls are instantiated. You know that code generated by the designer that you're not supposed to edit? Well, if your docking isn't working correctly, you may need to edit it. For example, I have a label docked the top of the form, and a datagrid also docked to the top, but I want the label docked above the grid, and the top of the grid essentially docked to the bottom of the label. It was working on one form, but not on the other - the difference was that the grid had to be instantiated *before* the label.

Labels:

Thursday, August 25, 2005 - 16:27

I support the Flying Spaghetti Monster


I was planning to get home and watch Smallville yesterday, until I realised that it ended last week :-( But seeing as I had some time to spare, I thought I'd write about the Flying Spaghetti Monster, which I've been meaning to do for a couple of days.

There are a million links on the subject, so I won't go into detail. Basically, the FSM (and associated religion, Pastafarianism) was thought up as an answer to the Intelligent Design movement. Again, there are a million links that explain this better than I do, but Intelligent Design (ID) is basically creationism dressed up as science. Quoting from the ID wiki page:
"the assertion that certain features of the universe and of living things exhibit the characteristics of a product resulting from an intelligent cause or agent", and "Scientists who support ID claim it has all the merits of a solid scientific theory. This claim is widely opposed by the majority of the scientific community."

The Kansas State Board of Education recently decided to include ID along with Evolution as part of their science curriculum. Now, ID is not science. I'm not saying that religion should or shouldn't be taught at schools, but if it is it should be taught as religion, and not as science. And this is where the Flying Spaghetti Monster (FSM) comes in. There is an alternate version of ID which says that the FSM created the world, and planted a bunch of evidence to make us think that the world is older than it really is. It is important to dress as a pirate when worshipping the FSM, as he becomes angry otherwise. And they present a very convincing graph showing that the rise in global warming is directly correlated with the dwindling number of pirates.

A letter describing the FSM version of ID was sent to the Kansas State Board of Education, saying that as stated by them, it is important that children learn all alternative theories and make up their own minds based on the evidence, and that to not teach the FSM along with ID wouldn't be fair. Quoting the ID wiki page again, "Most ID advocates state that their focus is on detecting evidence of design in nature, without regard to who or what the designer might be." So ID does not exclude the possibility of the FSM.

A lot of sources have now picked up on the idea, and it's gaining a lot of support. Some of the board members have written back to say that they agree, and will vote against including ID in the curriculum. There's a Wikipedia article on the FSM, and a bunch of boing boing posts (check the August archive). There's even a shop to buy FSM merchandise - I have my eye on the "I want to believe" t-shirt, pity about the exchange rate ... And if you're interested, there's a bunch of links available on the pages I've linked to above, plus googling for FSM, Flying Spaghetti Monster, Pastafarianism, Bacontarianism (an Atkins-compliant response to Pastafarianism), The Pesto Manifesto, Spaghetti & Pulsar Activating Meatballs (a rival faction) or any similar terms will get you loads of links, not just on FSM but also on ID, its shortcomings, its challenges to scientists and those who promote the theory of evolution, and the scientific community's responses to those challenges.

Really, there's a ton of material out there, and not only can I not repeat it all here, I wouldn't do it half as well as its already been done. Go and take a look.

Update: BoingBoing is selling FSM shirts via spreadshirt, to support the NCSE. They have quite a range of styles (although only one design), and are reasonably priced: but they don't tell you how much shipping will be (if you're outside the US & Canada), and they don't ship to a bunch of countries, South Africa included :-( And they don't seem to reply to e-mail queries, either - I e-mailed them over the weekend, and still haven't had a reply.

Update: I came across two good articles: Unintelligent Design, and Show Me the Science.

Labels:

iPod Battery

I've been meaning to post some stuff about my new iPod - what I like, what I find annoying, etc - but I haven't quite gotten my thoughts together yet. But some battery-related issues have just really annoyed me, so I thought I'd vent :-)

The iPod mini (and apparently the new iPods as well) don't come with a mains adapter - you have to either buy one, or charge from the usb cable. Leaving aside the fact that they told me only to charge when the battery is flat, which isn't going to happen if it charges every time you plug it in to your PC, charging via usb isn't as convenient as it is with other devices.

You cannot charge the iPod when your PC is off or suspended, which really sucks.
You cannot listen to music while your iPod is connected to your PC, even if it's only charging.
It takes about 4 hours to do a full charge.

Since I don't like to leave my laptop on charge overnight, and leaving it on without charging all night would drain it's battery, it means that I can't charge my iPod overnight. Which, since it takes 4 hours to charge, means that it's most convenient to charge it at work. Which means that for a whole morning at work, I can't listen to music. (And it means that I have to take the usb cable with me).

So does it mean that it's worth the R300-odd for a mains charger? Hmm, probably not :-)

Other annoying things are that you cannot tell, while it's charging, how far it's charged. It might have just started, it might be at 99% - you can't tell. And at a quick glance it's not even easy to tell when it's finished charging, since the only change is that the little charging icon in the top right corner stops animating; the big "Do not disconnect" icon just keeps flashing.

Also, I know that they say the battery indicator is approximate - but wow, it's really approximate. It drops rapidly at first, then sits for a while, then drops again. It gives you a vague idea of battery remaining, but only very vague.

Labels:

Wednesday, August 24, 2005 - 15:23

Saving app settings in dotnet

I have this app where I just wanted to save a couple of little settings in the app.config file. Retrieving them was easy enough, but I couldn't figure out how to write them to app.config.

Turns out, you're not supposed to use app.config to store app settings (it's meant for once-off, deployment time settings, not runtime settings). And it just seems like way too much effort to reading and writing my own xml file ...

Step in Profile, by Alvaro Mendez. It's brilliant - easy to use, and it stores/reads to/from .ini files, the registry, config files, or xml files. It's the way app.config should work. It's what microsoft should have included in .net for storing user app settings.

Labels:

Google Talk

So Google Talk was released today, and I've been using it a bit.

It's got a nice, clean, simple interface, but the simplicity comes at the cost of configurability. It has some nice features, but fewer than msn messenger (especially with msgplus). I haven't tried any of the voice stuff, since it won't work very well over dial-up anyway. Here's a quick review:

Some of the cool things:
  • You can set your status to show when you're chatting, and you can set custom status messages
  • Apparently handles multiple conversations nicely
  • Integrates the gmail notifier functionality
  • The chat window icon on the task bar shows when the person you're chatting to is typing
  • All chats with a particular contact are shown in the same window - even if you close it, the history is restored when next you chat (I assume this is on a per-day basis)
  • Easy to rename contacts
  • Auto adds contacts from your gmail address book that have talk installed (I'm not sure if this is good or bad, actually)
  • Not so susceptible to random sign-outs as msn
  • Doesn't repeat "Whoever says:" for each new line the person types
Some of the not-so-cool things:
  • You can't set where your conversation logs are stored
  • You can't set the frequency at which it checks your gmail
  • The chat window icon on the task bar doesn't show the person you're chatting to's status (well, it would be cool if it did, but it's not exactly a flaw)
  • You can only chat to gmail users
  • It's yet another IM client that I need to have open
  • No "appear offline" feature
  • No event log (like in msgplus)
  • Don't seem to be able to group online/offline, or custom groups
  • No display pictures
  • No file transfer
  • No smilies
  • Doesn't log your conversations (says it does, and it must because it keeps a conversation history, but it's not in a human-readable format)
  • Can't set timeouts for changing status to "away"; no config for changing status to "busy"
Some buggy things (apparently others don't all have these problems, but I doubt it's just me):
  • Help takes you to maps help
  • The minimize button for the chat window doesn't work if you've opened the talk main window during the conversation
  • The "inbox" links don't work
  • The "Application settings" link/button doesn't work
  • Closing the search box doesn't.
This is just what I've noticed about the features I use - it doesn't support things like online games like msn either, but I never really use those anyway; ditto for msgplus sound stuff.

Overall - well, it's cool, and I'm sure it's going places (I've seen some ideas about integrating it with google maps, etc), but is it worth switching? But seeing as you're probably not going to get all your existing msn contacts (or whatever IM you use) to switch to google talk, it's not really a question of switching to talk so much as adding talk to your list of IM clients - I guess it comes down to whether there's anyone you want to talk to who only uses talk :-)

Labels:

Thursday, August 18, 2005 - 16:49

Anonymous Methods

I just came across another situation where anonymous methods would be really useful: when using BeginInvoke (and presumably Invoke, as well).

Now I realise that this may not be the best design, but I have an app which imports a bunch of files into a database. To keep the GUI responsive, I've moved all the file loading/parsing/storing stuff into a separate thread. But to keep the user informed, this thread needs to update the gui with the filename it's currently processing, any errors that it comes across in the file, and it keeps a progress bar updated as well. So basically it's a non-gui thread that needs to update the gui updated.

Now I know that it's not a good thing to update the gui from a non-gui thread (although it seemed to work fine, but that's just chance, I guess), so I need to use BeginInvoke to update the gui in the context of the main, gui, thread instead. And that's fine, but a lot of the updates are just one-liners to set labels on the form, and it seems a bit painful to declare a delegate and write a method just to be able to call one line via BeginInvoke.

And this is where anonymous methods would be really useful. I suspect that they will be often abused, and they can dramatically reduce code readability, but this seems like the textbook situation for their use.

Labels:

Wednesday, August 17, 2005 - 23:26

It Doesn't Make Sense

It's been a while since I posted anything - I guess it's because over the last couple of weeks I've been alternately too busy and too bored to blog . Yeah, I know that doesn't make a ot of sense, but then what does?

In fact, that's kinda the theme for this post - things that don't make sense. Actually, it's a just a couple of random points I wanted to make, but I can spin them so that they appear to have this common theme :-)

So first off, Smallville. I never used to watch it - it seemed like a pretty dumb idea - but then someone said it was good, so I watched a couple, and got hooked. Today was the last episode of Season 2 (yup, we're pretty behind here in SA), and I realised that something's been bugging me about the premise behind it. Okay, lots of things actually, but this one in particular: Clark was a toddler when he landed on Earth during the meteor shower, but he and Lana seem to be about the same age. But she remembers the meteor shower, and how everyone helped out afterwards, and she remembers her parents as well. But shouldn't she have been a toddler too? I didn't watch the first season, so maybe it was explained there, but it seems odd that they'd leave this big inconsistency, since they've done a fairly good job fitting in everything else.

Then, on to two things that will never make sense: broadband in SA, and Microsoft. Microsoft first: I've been trying to learn more about asp.net, but all the resources I find assume that you know asp, and then explain how asp.net differs, which doesn't help me much since I don't know asp. I came across the Microsoft Elearning site, who coincidentally were offering a course on asp.net for free (normal price $349 - unfortunately the free offer is now over). They also have a bunch of free courses on VS2005, and SQL Server 2005. They even have an offline player which allows you to download the course content and view it when you're offline.

So far so good. In practice, though, not so useful. It's a mission to download the player, and a mission to download the content (you need to install flash for IE; it doesn't recognise that you've installed flash, and makes you install it again; you can only use IE; etc. etc.) Still, I wanted to view the course, so I went through the whole process, downloaded some content, then realised that I didn't really have time to do it at work and decided to transfer it all to my laptop. First issue: the content is stored together with the player in the Program Files folder, which seems pretty dumb. Also, you can't launch the player until you've downloaded content - it just redirects you to an html page if you try. But the website said if you want to view the content on another machine you need to install the player on that machine, so I took it to mean that if I installed the player on my laptop, and copied the content folder across, I'd be set. But no - the player on the laptop refuses to see that content has been downloaded and is available, and won't let me launch the player.

So I e-mail tech support - their answer is, sorry, it wasn't designed to do that. No help, no trying to find a workaround, just no. So I e-mailed them back explaining what I was trying to do, and why, and isn't there a registry key I can set, or something, and asking how it recognises that content has been downloaded so that I can mabye get around it *somehow*. No reply. So I e-mail the usability tech support, and get told that it is their version of copy protection - they don't want people to be able to buy the content then distribute it free to other people! It's insane. I understand that they want to protect their income source, but I'm sure that it can't be too difficult to get around it (although I haven't figured out how, yet), so they're just making life difficult for legitimate users! I'm sure lots of people would like to download on one machine and view on another - I can't download it via my laptop, since that's only got access via dial-up, as opposed to the broadband connection at work. Luckily it was a free course - if I'd paid $349 I'd be truly pissed off.

Update: It turns out that if you download even just a single section of content on the second PC, it then sees all the content that you have transferred as well. I assume that if you download new content (for the same or new courses) on the first PC again and transfer it again, that it will then see that too without having to any further downloading on the second PC, but I haven't tried it out yet. Really, they could have just told me that in the first place!

Which leads me neatly to my final point, the sad situation of broadband in SA. Hopefully things will improve if ICASA implements their recommendations (although they're apparently already backing down; also, Telkom has threatened to stop their adsl service if they're regulated), but in the meantime things are pretty bad.

I don't need a lot of bandwidth, and I don't want to pay a large monthly fee, so I was looking at the lower end of the market, where there are basically 3 options:
  • MyWireless, at R299 for 500Mb - on a month by month basis, but the modem costs about R2600;
  • iBurst, at R199 for 200Mb - also month by month, modem is on special for about R1600;
  • Vodacom 3G, with a lot options (but for comparion, R199 for 250Mb) - modem is generally free or pretty cheap, but you have to take out a 24 month contract.
So none of these options are really feasible. And you have to buy the modem from the ISP; can't get it somewhere else, otherwise it won't work on their network. And maybe it's just me, but an initial outlay of R1600-R2600 seems a bit steep for something that only costs R199-R299 per month! ADSL starts at about R450 per month (ISP + line rental), plus an installation fee plus the modem cost, so that's even worse. The world is moving to broadband, and putting more and more stuff on the web, and dial-up just isn't going to cut it. We need to get really affordable broadband in SA fast, or we'll get left behind. And the only way to do that is to get real competition - who can compete on an even basis (no more telkom line monopoly), and where there's enough competition that prices actually drop (as opposed the cellphone networks, who can each charge a fortune because the competition does too).

And now I'm off to study for my learner's, which I have to do to be able to do the test for a motorbike >125cc licence, even though I already have a motorbike <125cc licence and a car licence... yet another thing that doesn't make sense.

Labels:

Friday, August 05, 2005 - 13:51

Trying to buy an iPod

It's amazingly difficult to buy an iPod. There's such a range of prices, and the differences between physical shops and online shops is incredible. And then there's the range of iPods themselves...

I was torn between the 20Gb 4G iPod, which I saw at a very good price at Digital Planet, and the new 6Gb mini (blue!), which wasn't a whole lot cheaper. After looking around I realised that I really wanted the mini (it's cool, and the sides are all round, and it's blue), even though later I might regret the lack of extra space; so then I had to try to remember where I'd seen the best price :-)

It came down to Digital Planet, at R2045, who didn't have stock; Project 3, at R2099, who not only had stock but are just around the corner from me; or Have2Have at R2025, plus R135 overnight shipping. Of course, now that I've decided to get one, I wanted to get it right away, so I went out to Project 3 at lunch time to pick one up. The price on the shelf was higher (R2188, I think), but they said that the price I'd been quoted was the cash price, so that was okay - except that when I pulled out my credit card to pay for it, they said that credit cards don't count as cash. Odd, because everywhere else they do... but, fine, I thought, they've lost a sale, I'll just buy it from Have2Have.

So I went off to order it online, only to find that the credit card details submission page isn't secure! I was stunned - who doesn't secure that kind of information these days? And the worst part is, they have a whole page on how secure their site is, because it uses SSL, and you can tell by the little padlock in the browser. I suspect that if they do have SSL set up, someone forgot to hook it up to their actual site, because there's no hint of security on the submission page - http, not https; no padlock; no certificates; no nothing.

Their help page not only says how secure their site is (which would be nice if it were true), but also says how it doesn't need to be secure anyway, because the media has just blown it all out of proportion, and really, what are the odds of a bad guy stealing your credit card number while it's in transit, etc. And they go on to compare it to people stealing your bank statements from your garbage, and they go on, and on. I was totally stunned at the level of ignorance and irresponsibility they display. And while they do accept internet banking direct bank transfers as well, I decided that I wouldn't support a site that is as security-deficient as their's is.

So this morning, before work, I was back off to Project 3, cash in hand, to buy my iPod. It takes a really long time to charge (and it's worth doing the initial charge properly), so I haven't got to play around with it yet. But it looks really cool ;-)

Labels: