...real work is taking over!
That's not strictly true, but one of the joys of working as a computer programmer is that often there's quite a large overlap between hobby and work. The last few days, I've been getting to grips with Linux and PostgreSQL and PHP. Up until the turn of the year, I'd been Microsoft through-and-through. Not because of some fanboi love-in (ok, maybe a bit - I still think Microsoft wrote some of the best applications in the last twenty years) but because it worked perfectly well for what I needed, both in work and at home.
I'm a total noob with Linux and Postgre - I've used PHP and even mySQL but always within a familiar Windows environment (ok, stop shouting at the back, we all know PHP plays nicer with Linux - but it does work on Windows too!)
I had a crash course in setting up a Linux server, thanks to Justin and DigitalOcean.
I was really impressed by DigitalOcean and how easy (and, let's be honest, cheap) it is to set up a server; $5/month gets you a 20Gb Linux Ubuntu server with 512Mb RAM - not the biggest, baddest server you're ever likely to see, but at about £3.50 a month, and a working server within 55 seconds, they're certainly one of the best hosting companies I've come across in a long while! (and they take PayPal).
Their tagline is "simple cloud hosting built for developers".
And they fit that perfectly: creating, reinstalling, flattening and rebuilding a server is done through a web-based control panel, and takes just seconds. Very, very impressive!
So as quickly as Justin was typing his responses through online chat, I had the server up and running. I took me a day or so to fully appreciate the power of "sudo apt-get install" but now I've got all the tools installed on my home machine, I'm almost sold on it!
One of the advantages of working with PHP is the massive library of code that already exists, to do a lot of the grunt-work. And one of the things I was keen to try out was the much simplified social media integration that PHP affords (as writing oAuth routines in classic ASP is a real headache!).
I found HybridAuth which is a great set of routines to quickly get you logging in and out of all your favourite social media platforms - such as Google, Facebook, Twitter, Windows Live and Yahoo!
Unfortunately, the power of community-built software is also it's biggest downfall - and part of the reason why I'm still so distrustful of open-source zealots who insist on using "open" software just for the sake of it. And, sadly, HybridAuth has fallen foul of the "open curse": While I was able to get Google, Facebook, Twitter, and even Windows Live integrated with a simple php-based website in maybe half an hour (it took that long to create accounts and make API keys and secrets on each one) the Yahoo implementation simply doesn't work.
And searching around on the 'net for answers to "hybridauth yahoo error" returns a million and one pages, all from users of the software, asking how to fix it. And zero pages from people who have actually read, understood, and posted a solution to the problem. Such is the way with a lot of open source software.
In theory, it's great - people add to and improve peer-reviewed software, ensuring it's integrity, making sure it works properly. In practice, everyone assumes someone else will be responsible for fixing it. After all, we've just had the Heartbleed "incident"; a vulnerability in some open-source encryption routines - used by some of the biggest online companies in the world - which every else assumed someone else had validated.
I'm finding a similar problem with my PHP routines.
I love the fact that I can copy-n-paste some code and it just works.
What drives me up the wall is that sometimes it doesn't.
And if truth be told, I can't be bothered learning how it all works in order to fix it - because if I did, I probably wouldn't have migrated to PHP in the first place!
No comments:
Post a Comment