November, 2007
Version 0.4
I've just released 0.4 of the BitTorrent library with a few minor improvements. Silo kindly pointed out to me that the "modified-by" field (used in most isoHunt torrents and possibly elsewhere) was being neglected, so its now part of the Torrent class and included in example.php. I have also added control over the timeout to query a tracker as a parameter in all scrape functions. The default timeout is now 5 seconds in line with my rant about ridiculous timeouts and because multi-tracker torrents can be painfully slow to query. With Demonoid now down, you'll have to be careful about how high you set this timeout.
Link to This Article |
Comments (1)
Tags:
BitTorrent Library
Blinded by the Lights
Microsoft is really redefining "Cross browser, cross platform" with their new web platform Silverlight. I think the new definition is "works in all versions of Internet Explorer and Windows". Yawn.
I'm not even sure if it thinks its installed in Safari because all I can see is the word "Installed" on their very badly broken site, but a couple of attempts to view pages with Silverlight content seem to have cleared that up (it wasn't).
Link to This Article |
Comments (0)
Tags:
Microsoft, Silverlight, Internet Explorer, Browser Bugs, Safari
Network-Related Timeouts
Something that constantly baffles me about Windows XP's networking is the ridiculously long timeouts before an attempt to connect is considered as having failed. Why, in this modern age of relatively high-speed networks, are Microsoft still assuming that 30 seconds is a resonable time to expect a networked computer to respond in? In how many cases is this length of time actually going to produce a result anyway? I think I would be right in assuming that if a successful connection hasn't been established within 5 or 10 seconds, its not going to happen in 30, and if it is its taking way too long. It seems to me like Microsoft is catering to people who are willing to wait until its absolutely certain that no connection can be made - a group of people who I'm sure are in the minority.
However, the timeouts wouldn't be such a big problem if they didn't directly interrupt my usage of the computer. The real issue here is not so much the length of the timeouts as the way that this delay actually freezes the user unterface. Not only is the user forced to wait 30 seconds, but they must wait 30 seconds while the UI appears to have completely locked up, even if XP is simply querying for information about a network shortcut or file. I have found myself trapped in "My Network Places" for 30 seconds at a time, staring at a frozen screen, waiting for long-dead shortcuts to be queried. Why on earth did Microsoft allow a network-based activity - an operation highly prone to failure - to completely freeze up the interface while it executes? One of the most critical principles of interface design is to keep the user informed. Never let the interface freeze, particularly when its freezing during a particularly common activity.
I've seen worse: the latest driver software for a Bluetooth dongle I bought locked up so commonly that I had to revert to using the original drivers that came with the package. In an attempt to make the interface more user-friendly, the company had integrated access to all Bluetooth features into Windows Explorer. Great! But whenever I selected any of the icons, I suddenly found myself waiting for minutes at a time for the software to query the dongle.
Delays of even a few seconds after performing what should be considered a non-committing action (single left-clicking an icon) can be painfully jarring to the users experience of your software. Modern software and hardware is fast enough that - in general - we should not be waiting for over 15 seconds for a non-critical device to respond before getting back to the user about whats happening.
Link to This Article |
Comments (0)
Tags:
Windows, Rant
Anytime TV - A Case Example of How Not to Do It
Any Australian internet users would, I'm sure, have recently been exposed to a bunch of ads talking about iiNet users having unmetred downloads on Anytime TV. I was excited to hear about this both because I'm an iiNet customer and because I think there is a strong market for digitally distributed movies. "Finally" I thought "someone has caught onto the fact that iTunes is popular and is going to offer an equivalent service for movies". Wrong. Anytime TV has to be a joke, because I can't think of any other reason that a company offering DRM laden movie downloads would have a range as miniscule as they do. Their purported "hundreds" of movies are in fact in the low 300s and while that still technically counts as "hundreds", I'm sure you'll agree that it doesn't warrant the expression. Aside from this, the whole site is broken in everything but Internet Explorer (and I'm not sure if it works in all versions of that either) and seems largely incomplete, with sections missing and broken Javascript everywhere (yes, even in IE). I'm not entirely sure, but I also suspect that they are including SQL in their query string parameters - I couldn't be bothered checking closely.
When I first heard about them, I had plans of writing a plugin for MediaPortal that would allow users to browse Anytime's range of movies, buy and watch them on their Windows-based Media Centres, but it seems like its not even worth the effort now. I tried to send them a message saying what I thought but I couldn't find anywhere to provide feedback (that's a great way to run a business), so I filed a tech support request with my message inside. Clean up your act Anytime, otherwise you'll just end up being a waste of time.
Link to This Article |
Comments (0)
Tags:
Rant
Use Google Maps More Easily
Something I've just noticed is that its really easy to zoom in and out on Google maps by double-left clicking the location you want to zoom in on or double right clicking the location to zoom out on. It makes it a lot easier to use, especially on sites like truelocal.com.au, which use the map heavily but haven't got the fully featured zoom slider.
Link to This Article |
Comments (0)
Tags:
Google, Tip
Backup Solution
I've been shocked at how cheap hard drives have become recently and with the cost so low, how could I resist the urge to expand on my my almost full 250GB drive with a new 500GB sata solution for just 0 AUD. Something that I don't do enough of is backing up, so since I (currently) have an excess of space I've decided to put it to use backing up my files. In this article I'll quickly run through the process specific to my setup which may or may not be useful to others.
The Hard Drive
I got my Western Digital Caviar SE16 500GB SATA drive from a lovely little shop called MSY in Ultimo, Sydney. My housemate, Josh, kindly introduced me to them and their ridiculously cheap prices - check em out. That aside, the first problem I had was actually installing the thing. I have a Gigabyte K8T890 Triton motherboard, which would be coming into its second year as my main PCs motherboard and is apparently showing its age. When I connected the drive and booted the PC, it did not display any devices under SATA, nor would the drive show up when I tried to initialise it in Windows. It turns out that the WD SE16 is a Sata II drive and my motherboard is only capable of Sata I. My understanding is the difference is purely speed, so fortunately fixing it is no big thing (but WD didn't make it easy by not explaining the pins on the label). In order to enable legacy Sata I mode on my drive (and I would assume most WD Sata II drives) you simply need to connect pins 5 and 6 with a spare jumper as pictured below:
Luckily for me I have a collection of absolutely useless PC bits, which have dozens of spare connectors stuck on them so I just used one of those. You can easily pick one up from an electronics retailer or a computer store (perhaps even for free if you're lucky) if you don't happen to have any lying around. So that's the hard drive working, on to the actual backing up...
Working Out What to Back Up
The main drive I'm interested in backing up is some 250GB in size, so I could theoretically just image it and keep the image on a partition the 500GB disk, but that solution only works until I start needing more space. A better way to do it is obviously to only back up specific things, but it can be hard to work out where you're going to actually save space. This is where a great tool that I've used for a year or so comes in: WinDirStat. WinDirStat will scan any drives or folders you chose and show you a list and graphical representation of the largest and smallest files. Using this, its easy to work out what you do and don't need. For example, I convert a lot of videos to Quicktime format so I can play them on my iPod Touch, so space-wise my "My Documents" folder is dominated mainly by that - even though its totally useless to me in the event of needing a backup:

WinDirStat will easily help you determine what you can leave out, which can often be a lot safer and easier than working out what to leave in.
Automating the Backup
Humans are terrible at automation; we don't have built in clocks and rarely remember to make backups until its way too late. But why rely on you when the computer can do it more accurately and quickly. The credit for this find comes from LifeHacker but their search mechanism is a little weak, so I couldn't find the story its from (sorry!). The solution they recommend for backing up is a piece of software called SyncBack. It's available in both freeware and a paid version, but I always prefer to go with the freeware first up to make sure I'm getting the right thing. I have yet to try it in the long term, but the guys at LifeHacker speak highly of it so I'm confident it will do the right thing. It's got a relatively friendly user interface, although if you want anything more complicated than automatically copying a folder from one place to another (Windows Task Scheduler and xcopy, anyone?) you need to delve into the advanced option. I will update my experience with this in the future.
Something to remember if you have Windows on a different partition is that its a stubborn beast which doesn't like to move its Application Settings (so conveniently configured per-user nowadays) to another drive. If you use Outlook (Express/Full), Firefox, Internet Explorer, Thunderbird or pretty much any multi-user application and you're not sure where the actual data it uses is, chances are its probably stored in C:\Documents and Settings\\Application Data, where C is your Windows drive letter. You can get there easily by entering %AppData% into the Run dialog (Start > Run). Backing up that whole folder is a good idea, because its not huge and you can always sift through it after a hard drive failure if you ever need to.
Conclusion
And there you have it: I now have a working backup solution, which has been way to long coming. I've also got to automate the backing up of my Subversion repositories, which reside on a different server, not to mention my blog (believe it or not I'd hate to lose it) and web server configuration. I may cover that if anything exceptional or useful arises.
To anyone that managed to hold on through this: the price of hard drives is too low to let yourself lose data to a failed hard drive. Data recovery is expensive, hard drives are not. Drive failures are not a possibility, they're an eventuality and you're not going to be warned before they happen.
Link to This Article |
Comments (0)
Tags:
Backup, Tip
A Big Thank You...
Thank you Sony / BMG for protecting hard working artists from their fans. Had you not laden all of your recent releases with ridiculous piracy counter-measures, who knows how many legitimate music buyers would have been able to simply do whatever they want with your artist's CDs. It's a good thing that we have companies like Sony / BMG protecting artists from wanton consumers like me, who would otherwise be "ripping" and "burning" all over the place with no constraints and might even be able to put music on some kind of portable device! I feel uneasy just thinking about it!
But seriously, I am quickly becoming fed up with having to get my Mac-owning housemates to rip CDs for me - CDs I've legitimately purchased - because they have been specifically designed to be un-rippable. This is the fourth or fifth time this has happened in the last 3 months and I find it enraging that companies like Sony / BMG feel that they are somehow entitled to control how I will play their CDs. Sure, there are legitimate piracy concerns, but here's a pop quiz for you: How many times have these counter-measures actually been successful in stopping the flow of a new release onto the pirate web? Here's a hint: the answer is "zero". Perhaps instead of punshing fans for buying the music, they should be researching a better way of appeasing those who feel that they're overcharging for releases. The first place to look might be alternative distribution means (and I mean DRM free); but no, somehow I feel that unless it becomes unprofitable, record companies would prefer to keep things the way they are.
In other news: I'm very excited about my new Butterfly Effect coaster, the latest in my growing collection of table decorations.
Link to This Article |
Comments (0)
Tags:
Music, Piracy, DRM, Rant
The Perils of Convenient Field Names
Autocomplete and remembered passwords have now become a staple of every major browser, but this convenience comes at the cost of security. I'm sure we can all see the obvious security issue of saving all our secret passwords so that we don't have to login, but sometimes there are more subtle problems that slip past. Like for instance a "bug" I spied on the PayPal site earlier today.
Having created a new developer account and attempting to login I seemed to have entered the wrong password and couldn't login. No problem, I could just reset the password. When I got to the ubiquitous secret question/answer prompt, I found that FireFox had conveniently remembered the value I had entered into the secret answer field when creating the account. Helpfully, it filled out my answer for me, allowing me to reset my account without having to type a thing. Granted, the only way this could really be exploited is if someone had access to the very same PC I created the account on and its not a glaring security hole, but it is something to think about. Anyone with access to the PC I used need not know my password, they can simply reset the password to something else without even needing to know my answer before-hand (and perhaps in doing so gain knowledge of my answer to every other secret question).
Always remember that, helpful as autocomplete is, it can be a real hole in your flawless security wall if mischievous users can just have your 5-layer password recovery system filled out automatically for an account because you used the same field names as on the account creation form.
Also for the record, I don't use the secret answer in the picture anywhere, I'm just giving an example. I personally think secret questions and answers to be pointless and insecure as they simply allow an alternative means to gain access to an account (why bother with a password when you can find out or guess something much easier with the same result?).
Link to This Article |
Comments (0)
Tags:
Security
Drives Mysteriously Disappear in Vista
I recently witnessed a strange occurrence where, without any particular reason, my housemates Vista machine suddenly lost all of its CD and DVD drives and seemed unable to find them. He hadn't made any recent hardware or software changes that could explain why this had happened, so we were a little baffled as to the origin of the problem. After reading some voodoo techniques involving putting the computer to sleep and waking it (and voila, mysteriously your drives are back!), we found that giving it a good old System Restore back to around 5 days ago seemed to do the trick. Take note of the timing if this happens to you, as its a lot easier to pull up a system restore than it is to follow the suggestions given here, particularly since some people have claimed the registry entries described don't even exist.
My experience with Vista so far has been much like this. Microsoft has done a fairly poor job this time around, so lets hope they fix it up in later releases. At least they have System Restore I suppose.
Link to This Article |
Comments (0)
Tags:
Windows Vista, Tip
A New Kind of Certification
We're taking a bit of a time-leap here, but I just came across a posting by Jeff Atwood (a hero of mine) from earlier this year in which he discusses the "Works on My Machine" certification program. I found it quite an amusing read and he even made a nice little badge for it:
I'd consider it a worthwhile read for pretty much anyone who's ever been tempted to utter those four deadly words (I know I have - too often). Its also highly relevant - perhaps outside the scope of what Jeff was discussing - to the web development field, what with its vastly inconsistent browsers and plugins. I'd suggest all developers print out the badge and keeping it somewhere within sight as a funny little reminder, that regardless of how well your project works on your machine or looks in your browser, the important part is that it doesn't work on someone else's.
This certification is offered by the same body that developed the system administrators' "What did you do?" error response plan and the tech support help-lines' "That should be working" customer care guarantee.






