Ranty thoughts about MySQL, with added Oracle

I regularly use MySQL for many of my personal projects (except for that one that uses SQLite). As such, I have a well-used MySQL server on my main cluster in London, and another well-used MySQL server on my local cluster in my flat, not counting the numerous development MySQL servers sat on pretty much every device I own (including my phone…).

At work, we’re developing and maintaining an application which is backed by an Oracle database, and much of our application logic is contained within this database. As such, I get a lot of exposure to Oracle as well, and have even gone as far as setting up an Oracle XE instance at home, just to play with.

I’m not a cranky person, I don’t often complain about things, but recently as I’ve been getting more and more exposure to Oracle, and building more and more complex applications in my personal time on top of MySQL, I’ll try and do something that I know will work perfectly in Oracle, but for some unknown reason it doesn’t work – normally it is a very old bug or design decision I disagree with in MySQL.

To be fair, I have a fair share of grievances with Oracle too, which I’ll try and mention at the bottom, but mostly it’s MySQL’s issues that drive me up the wall.

Most of these stem from the differences between the two systems, and the intended audience of each. Oracle is much more enterprise-focused, but some of the things I mention below would not only be useful to MySQL users, they would allow developers to better leverage the database’s power, rather than being forced to do lots of data manipulation within the application layer.

Continue reading

Internet censorship doesn’t work. At all.

When David Cameron announced that he was planning to force all the ISPs to implement automatic filtering of porn on the internet, a lot of people said it was a good idea in principal. And a lot of people who know how the internet and/or filtering tech works said it’s never going to work.

Let me clear something up. I don’t think kids should be looking at porn. I also don’t think there’s a damn thing (on a technical level) that can be done to stop them.

Filters generally work with blacklists and whitelists, and heuristic patterns. Basically speaking, some sites may never be blocked, others will always be blocked, and the heuristics will likely work with keyword lists, so if a page contains a word like XXX or a phrase like “hot hard-core action”, the filter will probably block that site.

Enter the problem: now this site contains those phrases and isn’t one of the huge well-known sites, it could be blocked by those heuristics. Other sites like LGBT sites, rape support sites, and even teen puberty help sites could find themselves blocked, and not all porn sites will contain those phrases so some will inevitably slip through. What’s more, ISPs could find themselves breaking the law by following the law. The LibDem LGBT site was one of those caught in the crossfire, and blocking the website of a political party around election time could be seen as something like electoral fraud.

Apparently parents can override these filters, but what’s to say that parents don’t let their more knowledgeable kids manage the net connection? Or maybe don’t want to disable them because they’re oblivious to the issues? Or even worse, what if the kid is trying to get support regarding parental sexual abuse?

There is so much that could go (and has gone wrong already) with this, and there’s so much damage that could be done to vulnerable people who are trying to get support. It’s a real kick in the teeth for charitable organisations who are doing their best to help people, and then the government comes along and pushes this through.

This is one of many examples of why I feel so strongly against Governmental intervention in technical matters such as internet governance. If you don’t understand the technology, don’t try and legislate for it. Learn the technology, how it works on a basic level, for example with filtering learn how filtering works, and what sort of things get filtered, advantages and disadvantages, and problems. Don’t assume the industry will work out the problems Mr Cameron.

Samsung Galaxy SIII

As my phone contract with Orange was nearing it’s completion, I decided that I would upgrade to the Samsung Galaxy SIII.

It’s a pretty good phone, running Android 4.0.4 Ice Cream Sandwich, 16GB internal memory, Samsung Exynos 4 Quad SoC based on a 1.4 GHz quad-core ARM Cortex-A9 CPU, so it’s not slow! The UI (TouchWiz) is pretty responsive, but a bit different to what I’m used to with HTC Sense – such as the customisable number of home screens. Admittedly, I do miss some of the things that the HTC Desire had – such as a widget to enable the hotspot mode, but there are so many really nice things with this phone – including the availability of Google Chrome :)

The S3 is also my first device which includes an NFC (Near Field Communication) reader, and I’ve found that I can read a number of different things somewhat unexpectedly, including both my bus pass and my passport – I’m hoping I’ll have some chance to play with that technology in the future, especially since I have some NFC tags on order :)

There has also been a bit of a problem with these phones – it was discovered by some researchers that on opening a URL using the “tel” scheme will automatically open the dialler and pre-fill in the number. For example, a link such as the example below will open the dialler and dial 012345:

<a href="tel:012345">click me!</a>

However, some special numbers (called USSD codes) will automatically detect as these special numbers and automatically start something – most phones can be made to show their IMEI number by dialling *#06#. If, by clicking a link such as this your phone shows it’s IMEI, it’s vulnerable to attack. The Galaxy SIII has a special code in it which can be used to run a factory reset without confirmation and without possibility of cancelling it. This could be started simply by clicking a link in a web page. Thankfully, my phone doesn’t appear to be affected by this, but a large number of Galaxy SIIIs out there are vulnerable.

Overall, it’s a brilliant phone, and I’m really glad I got it :)

Raspberry Pi, and Raspberry Pie

:(

I went to bed early last night cos I knew I had to be up early this morning. Getting up at 05:30 is something that is incredibly rare for me. Unfortunately, it was a bit pointless this time around.

I was trying to get one of these:

Copyright 2011-2012, Raspberry Pi Foundation

It’s called a Raspberry Pi, and it’s essentially a computer the size of a credit card. With an ARM11 processor manufactured by Broadcom, 256M RAM, HDMI/RCA video output, 2 USB ports and Ethernet, powered by micro-USB, with SD for storage. What more could you want for a basic computer system?

Initially, it’ll run a variant of either Debian or Fedora Linux, and my plan is to use it either as a local web server/proxy server/dns server, or maybe running XBMC as a low-power media frontend. It’ll also be good for simply messing about with.

Oh, did I mention the price of this thing? No?

$35 (USD).

In the process of trying to order one, we (everyone who wanted one) brought down not only RS Components’ website, but Premier Farnell too in mere seconds. They were warned about the traffic, but seemingly thought the warning a bit frivolous since both of them didn’t adequately prepare for a HUGE traffic surge.

And now I have a craving for raspberry pie.

The Twelve Days of Christmas

A good quiz question might be “How many gifts were given during the carol ‘The Twelve Days of Christmas'”. The answer, 364, might be known by a reasonable number of people by now, but let’s look at the problem both from this perspective, and another perspective: how many legs were in those gifts?
Continue reading

Courage and Cowardice

Something I’ve learnt over the past few weeks is that cowardice builds walls in our lives, makes us hide our true feelings for each other, and prevents us from doing what we want to do.
Only with courage can we break down those walls, and bring us closer together in our friendships. Courage enables us to do what we want, and enjoy ourselves, and enjoy our time with others.

There are those who won’t like what you say or do, but we all have a right to an opinion, and a right to our own beliefs, for “It is our choices that show what we truly are, far more than our abilities.” (Albus Dumbledore in Harry Potter and the Chamber Of Secrets).

We should be proud of who we are and what we believe, and not worried about what people might think of us.

That said, we should respect each other’s opinions and beliefs, or we will be dismissing valuable friendships and ideas which can help us grow as a person.