There, I’ve said it. Desktop PCs are better than laptops, because they are more stable.
I can guess why – poorly written software. Every bit of hardware in your PC – the video card, the USB port, anything *plugged*in* to the USB port, the hard drive, the DVD drive, they all rely on software usually called “drivers”. These are specialised pieces of software that know how the device works, how to put data in, how to get data out, howe to make the blue LED light up, how to put it in powersave mode, how to switch it out of powersave mode, how to check which power mode it’s in, etc.
In any computer, drivers are loaded and unloaded depending on whether the machine is docked or undocked, depending on whether it’s on battery power or not (in a latop), and so on. My Dell laptops switch their internal (wired) network cards on or off depending on whether there is mains power – nothing to do with *the*network*, just a knee-jerk reaction to a lack of guaranteed power. In principle, it’s a good thing, preserving battery life. But, add all the devices you might have – a USB memory stick, your phone – which you put on charge via USB, your iPod (so 2009), various internal bits like the internal microphone, video display card, ambient light sensor, and myriad other devices, and, come insertion or removal of the power cord, there’s a good few devices to consider. And, so, there’s a good few drivers to consider, too.
Going back to the point about the lack of good developers for drivers, the thing that most software developers lack is imagination. They get a specification, and, if they are good, they implement it. (If they are bad, then all bets are off, and your computer is hosed. And there are more idiots than you think. ) (This is one of the reasons why I don’t recommend Internet Explorer – IE is more or less part of the operating system, and the idiots on some social media web site are far too close to your operating system, and so to your computer stability). Assuming they are good developers, the specification might tell them what to do when the power cord is removed. It might tell them what to do when the laptop is removed from the docking station. However, they (the developers) rarely imagine all the possible interactions – what if the USB driver decides to do the same thing at the same time, for example? Each time, Windows might choose a different order to detatch the devices. So, there are countless permutations of what might happen, and, rather than think about them, your typical (good) software developer will pass decisions on what-to-do-when-X-happens up the chain to the person writing the specification he’s implementing. In other words, they don’t question the specification, they take a stand that it’s the whole story. It’s easy to do, a bit like saying “but he told me to do it!” while pointing at your big brother, and, after all, you have been told to impeiment *the*specification*, not make something that works in every concievable situation. However, by doing so, they remove the imagination from the process. They do not ask “what it the user holds the trackpad button down on our app as we enter suspend state?” Because that would be more work, wouldn’t it? And if you have a laptop, dock and undock regularly, then then these assumptions become important and affect the stability of your system.
Sp, I reckon that most of the problems with a Windows machine comes from the on-off switching as a machine is (a) given power (or power removed) (b) docked (c) put in sleep mode or (d) put in hibernate mode. And the problems experienced are due to the poor quality of the software called drivers – the stuff that talks to the various devices. And a desktop has far fewer events like these than a laptop.
Plug in a USB stick to your desktop – OK. This has been done several bilion times in dozens of countries throughout the world, and Microsoft have sorted out the problems. Do the same on a laptop – ditto! Shutdown five internal devices because the power cable has been unpluged – Hmm, well as Windows changes the order each time, and your laptop is pretty unique – especially that webcam – I’d have to give that a ~20% confidence level. Good luck with that, sir.
So, I have a desktop machine again, in my new job. I’ve not lost a status symbol by ditching the laptop, but I have gained some reliability. Until I unplug my mp3 player and my phone within the same five-second period, of course. Repeatedly, I mean. And I need to apply Windows updates or things might go wrong.
Well, a couple of things happened. One was an unexpected reboot due to a power outage. Another was that the system failed to come back up fully after the power surge. In fixing this, I found that the problems I’d been experiencing had gone away. This was slightly unsettling, as, although most Windows users know that turning it off and on again might be the first attempt to solve a problem, this is normally not the case with *nix machines. However, in *nix machines, if a file (E.g. a shared library) is in use, it can often be removed from the filesystem but running apps that use it can continue to run – until the reboot. As I’d been building many, many packages from source, altering the compiler used, starting and stopping daemons, altering the USE flags (Gentoo specific) used, and even the profile (again, Gentoo specific), I reckon that my machine was so confused about what was on disk, what was in use, and so on, that it wouldn’t co-operate. And the reboot cured that.
So, after the reboot, I had to fix Apache, otherwise my webmail would not work. And, as I’d manged to get the server software for my Logitech Squeezebox running under a chroot environment, I tried (and succeeded) in getting that going too.
So, I have a working system, but the kernel is ancient – six years old. And, I’m sat in a hotel room in Europe, and I can’t access iPlayer, because the bbc have detected that I am not in the UK, based on my IP address. And I’m bored. Nothing happens in Luxembourg on a Sunday. Even mindless violence is boring. (So, I went to Germany instead.)
My first thought is VPN – if I ran a VPN, then all my traffic would pop out the other end, and I’d appear to be somewhere near Reading. But, a bit of reading tells me that I need a kernel with TUN (IP tunnelling) enabled. I check my .config, and it is, yet I have failed to set some other critical variables. I balk at the idea of installing a new kernel on a machine that hasn’t had a kernel update in six years remotely. If I was there, I’d do it, and I might still *prepare* for the upgrade from here, but there’s no way I’m putting a new kernel in place on a headless, keyboardless machine. I’m relying on this for (a) email for the family (b) webmail for me and (c) an anonymous proxy just in case someone is watching me.
Hacking pay Wifi
Then, I thought about internet access. In my current hotel, I have to pay €6 a day for access. So, I did a quick google for “hack hotel internet”. For a guy with a Linux server available, there are two really good options. Both rely on laziness in the people who wrote the hot-spot software.
You’ve been at an airport, in a station, a cafe, wherever, and you get an unencrypted wi-fi signal. Brilliant! But when you access a page, the wi-fi router intercepts your request and puts an “enter your details” page – you need a username and/or password to get access. However, they’ve often been lazy, and will either allow DNS or ICMP traffic through.
DNS is where your computer converts a name (like wordpress.com) into the number used to actually send requests to another computer. ICMP is a low-level way of talking between computers, and as 99.9% of stuff that’s useful uses TCP/IP (much cleverer) then it appears harmless to let it through – it’s useless.
However, clever people have leveraged these. By adding information to the standard messages used, with a server at the other end that understands them, you can emulate or bypass the local network *if* it allows either DNS or ICMP through. This has the side-effect of all *real* requests coming from the server – which, in my case, is in good old Blighty! iPlayer, here I come!
However, to use these, I need a kernel that supports TUN. I refer you to the above paragraph on needing a kernel that supports TUN.
The other thing, I’m not happy running a huge server 24/7. I bought a nice NAS device that could be hacked, but, by the time I got one, the manufacturer had blocked the holes. I now have a slightly expensive 1TB hard drive. So, as I have an old laptop (actually scarily old, it’s overdue to fail), and a nice hard drive, I can simply install Linux (and a kernel that supports TUN!), mount the drive in an external closure, and I have a working system. Actually, I think I might buy a new low-energy PC (or laptop) instead, ‘cos that laptop is doomed to failure if I push it. And, I’m probably NOT going to use Gentoo, I’ve been using it for over ten years, and as I now know how the thing works, I want to forget about the details and just have something that works. So, a major distro, probably ubuntu.
On the Road…
No, not a review of Jack Kerouac’s classic semi-autobiographical book.
I’ve recently started working in Luxembourg. Most people are aghast and think it’s a huge way away, but to drive here from London is easier than driving to Glasgow. There are planes, trains, and, I guess, dirigibles if you don’t want to drive
The first thing that struck me was that despite the fact that I thought I’d encountered every kind of door lock, light switch, tap (faucet) or shower mechanism, there’s always another to discover. This shows mankind’s ingenuity in all things, a creativity that sets us apart from the rest of God’s creatures.
The second thing is that despite Luxembourg being tiny (have a look on the map, they have devoted quite a lot of it to roads. They have some massive junctions, with acres of tarmac, and a variety of different lights for drivers, pedestrians, and special lights for bus drivers. To cross the (on average; they come nd go a bit) 9-lane road from my office to the mall across the street, I have to negotiate four different sets of pedestrian lights. To be honest, it is one of the main roads into Luxemboug city, and the traffic does flow quite well, and pedestrians are definitely fairly treated.
The third thing is that it’s not cheap. It’s almost impossible to find free parking in a town (however, if you live there, you get a resident’s permit). Lunch will set you back a tenner. Even a sandwich is around four Euros. Hotels are expensive. The only cheap things are fuel (a good 15 cents/litre cheaper than neighbouring countries), booze, and fags.
However, it’s a very calm place. One of my colleagues, from East London, said that most people stay a year or two and then get bored. I can understand that. It’s not exciting, and no-one appears very excited. People aren’t keyed up – they don’t nip across roads where there are gaps in the traffic, for example. However, it’s not like Germany where even if nothing is coming they wait for the green light. But everyone seems to go to great extremes not to upset anyone else.