Friday, January 8

Text storage, database or files?

Something that's bugged me on and off for a while now is optimising my text (e.g. blog posts) storage on my sites.

Way back in the day my host limited MySQL databases to 100mb. So I scripted my sites to store a filename rather than the body of text. The file was then grabbed and outputted using whatever PHP functions came to hand at the time. The alternative obviously is storing the text directly in the database.

With database size limits now gone, I'm asking the question which is less resource hungry?

Using Files

Once the database query is returned, PHP has to go and get the file and its contents. Finding and returning the file makes expensive disk reads.

Using the Database

The database simply returns more data, but with database servers often not residing on the local machine and more data having to be transferred across the network.

Which is Optimal?

I keep reading about bottlenecks first appearing with queries to a database, so it makes sense to me that reducing the load there would be preferred. But using a database and then storing a bulk of data in the file system seems a little like defeating the point of using a database to me.

All thoughts, much appreciated :)

Labels: , ,

Thursday, January 7

Hello 2010, hello blog

5th February 2009, yeah 336 days since my last blog. Oops.

Oh well, it's no good crying over spilt milk nor unwritten blog posts. New year, new start, resolutions and all that I've signed up to Project52 - that is a pledge to post new content every week for a year. Goodness knows if I'll stick it, but hopefully I can manage to pass 9th February 2010 :)

Managing Expectations

This isn't going to be gripping stuff, that's not what I'm aiming for. I'd like a simple log of my thoughts and what's interested me week by week. I might surprise myself and write something deep and coherent once in a blue moon but dont bank on it :)

Starting at the start - week 1

Happy new year, and all that jazz... Having been with family over the holiday we ventured home-home*, which turned out to be only a whisker away from complete stupidity. Snow. With the A68 blocked at Carter Bar, and all reports to steer clear of the A1 near Berwick, we headed for Coldstream and up through the Scottish Borders that way. Three ruts to keep the wheels in for a two-way road - which is ok (as it can be) until you meet something coming the other way, because hitting the 6-10 inches of white stuff just off line almost renders a car uncontrollable. Well be got through, but it was fairly hairy in places - most places!

*home-home = St. Andrews

Puppy

Teabag - yep that's his real name - is our puppy. He's a muppet, wee monster, and in some lights has the meerkat-look about him. He also hasn't really mastered the art of sleeping at night, or come to think of it >not<.

Formula 1

Mostly tapping my fingers awaiting the 2010 car launches to begin. Couple of gems though, Donington Park looks like it'll be saved after what Simon Gillet did to it, and the-team-formerly-known-as-and-still-are-until-they-can-think-of-something-new BMW Sauber have confirmed they'll unveil their car 31st January. On the other end of the good-stuff scale Flavio Briatore won his appeal against his lifetime ban by the FIA - albeit on a technicality, it's bad for F1's already bad image. Jean Todt has some work to do.

Web stuff

Work has slowed on my personal projects, but I'm narrowing on some GeoIP muggins for PigeonSportLive, and finalising some updates to the drivers on F1-Fans. Oh and kicking off #Project52 :)

Labels: , , ,

Thursday, February 5

Ubiquity: interesting, useful, but...

The other day, over in the twittersphere @ryancarson pointed my attention to something called Ubiquity.

I'm not going to try and describe what it is, not even Wikipedia can do a decent job of it. Check out the video:


Ubiquity for Firefox from Aza Raskin on Vimeo.

Pretty cool huh?

The idea kind of ran and ran in my mind when I finished watching that, the possibilities are pretty huge. I mean imagine being able to port anything, anywhere in a couple of keystrokes.

Hey this looks great, but when I started playing with it it started to feel all too familiar. It's just a command-line.

Ok, quite a clever command-line, but still just that.

I hate the command-line. They're just so unintuitive. In order to accomplish anything useful you've got to know the dictionary of commands and all of their options. There's no fumbling around tinkering with settings and buttons, mooching and discovering new better ways of interacting with your computer. Its all or nothing, type in the command, hit enter... oh and hope.

If this is the future, I'm disappointed.

But lets hope not, please let someone come up with an interface to retain the purity whilst overcoming the barrier of entry, either that or for the command-line truly embrace the full complexity of language.

Labels: ,