My blog posts are being cross posted to Facebook, which is good, but nothing is showing up in my friends pages, which is annoying as feck. I tried flushing the connections, so see what happens.
Tag: computers are evil
What have I done?
The oldies’ computer was dying a horrible, horrible death so we replaced it with a Samsung tablet and I reinstalled the laptop with Ubuntu. What’s worse, they’re now on FACEBOOK!!!
Oh, the horror!
On the importance of backups!!!

As part of my normal website maintenance, I have a cron script that backs up my whole website and wordpress database. I have now noticed that the file backup hasn’t been running since mid-november. That shouldn’t normally be a problem, until the time when you make a typo in a unix command that, instead of deleting files with a ‘_backup’ tag DELETES EVERY FUCKING FILE IN A DIRECTORY. I managed to kill the command before the whole lot of my new galleries got killed, but I lost four. Two were in a previous backup, one I could rebuild in short order. The last one will need some serious digging around to find the original files.
So kiddies, lesson for today is MAKE SURE YOUR BACKUPS ARE UP TO DATE!
Google: this app is not available in your country
Well, that was painful as hell.
Ever since we moved from the UK to Switzerland and opened a bank account with the BCV, I’ve been trying to download and install the app from the Google Play Store without success. It keeps complaining that the app is not available in my country (O.o). After much swearing at uncooperative phone systems, turns out that the culprit is the Google Wallet. My credit card, which I registered a loooong time ago, has a UK address, which is what Google bases itself on (in part). So, I had to update my credit card details, then flush out my browser cache, and voila, app downloaded. It really didn’t help that the default language for the Swiss play store is German, nor that the mobile phone reception on campus is shit so I couldn’t get the 2-step Google verification codes easily. It took me about an hour of faffing to get it done.
Debugging is a state of mind

Another reason not to like Macs
I had an interview last night and they asked me to do a coding exercise on a Mac with no mouse, a custom trackpad layout and an Australian keyboard layout. It took me longer to figure out how to use the damn thing than it did to do the exercise. I have come to the realization that using a mac is like driving a really, really shiny car with a manual gearbox that has only one pedal. It looks good on the outside, but you need to throw out everything you’ve learned about driving a car out the window because if you want your pedal to be a clutch, you need to use the indicator stalk and if you need a break pedal, you need to wiggle the wiper stalk.
tap! tap! tap!
Is this thing on?
Update: that’s better… stupid facebook API.
This man is my personal hero
The truly lazy are often the most creative. Like this developer, who was caught outsourcing his entire job to China so that he could spend his time at work… not working.
The ruse—highlighted in a Verizon case study—was carried out by an employee called “Bob” who worked at an anonymous “critical infrastructure company”. The trick was only spotted when someone noticed suspicious activity on the company’s VPN log. The report explains:
“We received a request from a US-based company asking for our help in understanding some anomalous activity that they were witnessing in their VPN logs. Plainly stated, the VPN logs showed [Bob] logged in from China, yet the employee is right there, sitting at his desk, staring into his monitor.”
While Bob apparently received glowing performance reviews, all of his development work was being carried out from China. In fact, he pulled off the same scam across multiple companies concurrently, earning “several hundred thousand dollars a year”.
Further investigation revealed a typical day’s work for Bob included: reading Reddit for two hours, shopping on eBay for an hour, browsing Facebook for two hours, and checking LinkedIn for a further two.

Computers can sometimes be evil piles of shite
I’ve had to do not one but two factory restores on my tablet and I still need to manually faff with updating the firmware. I had to root it to solve a known issue in android ICS. When the JB update came available OTA, I couldn’t run the update because my tablet was rooted. The only way to do a stock restore was to flash the official ROM. That kinda sorta worked, but for some godforsaken reason, my lock screen disappeared and was replaced with a promo-type display. There were a few other weird behaviours as well, like the fact that some configuration settings would not stay put, no matter how many times you set them. Unacceptable. A full data wipe/restore did nothing to fix this either. So now I downloading yet another 1gb ROM to see if I can get my baby back into a usable state. Grrr.
Best code comments
Software developers are a whimsy bunch. Sometimes, the long hours and tiredness makes your brain go bye-bye. This is the result:
/** * For the brave souls who get this far: You are the chosen ones, * the valiant knights of programming who toil away, without rest, * fixing our most awful code. To you, true saviors, kings of men, * I say this: never gonna give you up, never gonna let you down, * never gonna run around and desert you. Never gonna make you cry, * never gonna say goodbye. Never gonna tell a lie and hurt you. */ // // Dear maintainer: // // Once you are done trying to 'optimize' this routine, // and have realized what a terrible mistake that was, // please increment the following counter as a warning // to the next guy: // // total_hours_wasted_here = 42 // //When I wrote this, only God and I understood what I was doing //Now, God only knows stop(); // Hammertime! //Dear future me. Please forgive me. //I can't even begin to express how sorry I am. //private instance variable for storing age public static int age; options.BatchSize = 300; //Madness? THIS IS SPARTA! //I am not sure why this works but it fixes the problem. //This code sucks, you know it and I know it. //Move on and call me an idiot later. // I am not responsible of this code. // They made me write it, against my will. // drunk, fix later #define TRUE FALSE //Happy debugging suckers
I’m probably guilty of a few similar ones myself. Makes me giggle :)
