Thursday, 30 December 2010

Simple private messaging

Ran across this plugin the other day. It gives you very simple, private messaging for Users on your app.

Needs some fiddling to make the messaging private - otherwise anybody can read anybody else's message... but otherwise, pretty neat. It basically does most of the heavy-lifting for you, and lets you get on with the customisation... which is the point of using other people's plugins.

Friday, 24 December 2010

Gotcha: db index name must be a string

Might just be Rails 2.3.8 - an exception is thrown whenever I use a symbol for an index name. I get:

rake aborted!
An error has occurred, all later migrations canceled:
undefined method `length' for :my_index_name

The code causing this would be something like:

add_index :widgets, [:colour, :weight], :name => :index_by_colour_weight

it’s solved by just using a string instead:

add_index :widgets, [:colour, :weight], :name => 'index_by_colour_weight'

Sunday, 19 December 2010

Dosbox and old games

So... my favourite game of all-time is still X-Com: terror the deep. I've been playing it off-and-on now since it first came out 15 years ago.

It is a game with extraordinarily long game-play time. Come to think of it, I think I still haven't actually completed a game yet... it takes months of gameplay to complete... but it's still fun enough that I like to play it anyway.

Now, the thing is, it's a really old game now - it's a DOS game that was able to be played on the then-new Win95... but it hasn't transferred well up the line. I've had to keep around an old laptop for the precise (and only) purpose of playing this game.

For obvious reasons (including the bulk of said ancient laptop), I did not bring that laptop with me to the UK. Which means that I've been deprived of my favourite game for some time.

Lately, however, I learned of Dosbox - which I can now rightly praise as an awesome DOS emulator that actually works on Linux (as well as other, lesser O/Ss). ;)

I had some issues with getting the game to play and save - before realising that I hadn't properly "installed" the game before trying to play it straight of the CD - and thus it didn't have write-privileges, causing it to fail to save a game... or to write the sound-file etc.

but after I figured that out - it's worked just fine. Awesome!

Monday, 13 December 2010

The perils of pagerank

Now that RubyGlasses has gained a bit of PageRank, I've noticed a marked increase in the amount of people emailing me requesting "Link swapping".

I've generally been deleting these along with most of the spam... google doesn't like linkswapping, and I won't do it. (all hail oh mighty google!)

However, I've also received one or two offers of advertising... and, to me, that's different. I'm happy for an advertiser to pay me to put ads on my site that are relevant to my audience.

However, after a recent email-conversation, I now have to make it clear to potential advertisers that these ads are going to be obviously ads.

I will freely confess that I don't get very many offers of advertising. I've had two so far... one that I've accepted (see if you can spot them) and one that I have most definitely not.

The first did want me to *not* use certain ad-like keywords in proximity to their ads... no doubt they're after a bit of my pagerank "link juice" as well as the actual click-throughs that are likely to accrue (yes, I actually asked them about this). That was ok to me, as long as it was obvious to my readers that what was going on was actually an ad... ie paid-for content inviting people to purchase something.

The reason I turned down the second offer, however... was different. In fact, I didn't even need to turn them down - just stated what I was and was not going to do.

The second exchange began with an offer to "have cooperation in marketing". I'll admit that maybe I didn't completely read the email in question because it also explained that they expected me to "add our product information with links to < thecompany > on your blog"... I read this and thought "advertising"... but in the following exchange (I asked if that's what she meant), discovered that she expected to write articles about her products... and put them on this blog.

After explaining that I write my own articles she responded with (and I paraphrase) "Oh ok, so *you'll* write articles about our products on your site, and put links to our products"

I had to then explain that I write articles about Ruby-on-Rails or web-development or freelancing... if her products were relevant to that then I might write an article on them... but I would *not* promise to be favourable.

She then responded with a "suggestion":

I have read your email, I have one suggestion, how about we write articles suitable for your site, and you put it on your site. We can also pay for you on adding them, but how much per article will you charge?

I mean, what does it take to get through to these people? My final email to her reminded her that I write my own articles, and that I will happily post paid advertising at the bottom of my articles - and that she could even dictate the text of the advertising... but that I would not post fake articles written by somebody else about her products.

She said she'd stay in touch...

Saturday, 11 December 2010


*sigh* I admit defeat.

Though I've "won" three years in a row, this year, I quit after a week... it's kinda sad, but I felt it was a necessary decision.

After a week of the usual noveling, I realised I had so many other commitments this year that one more was really piling on the stress a bit too thick. I weighed up whether or not I needed to complete this one time - and decided I didn't need to prove to myself that I *could* finish a novel as I've done it three times already.

So, for the first time since I discovered the wondrous new world of NaNoWriMo, I failed to finish.

I'm sad about it because this year I actually had a full plot. Most years I just began with an idea and a few characters... It was a Romance (I try a new genre every year) - which lent itself to easy plotting... but I realised a week in, that I just wasn't satisfied with that, and had already begun to add action/adventure elements (the hero was captured by desert pirates... leading to a chase...).

In any case - it'll be there, waiting for me in January - when hopefully I'll dig up a bit more spare time.

Wednesday, 8 December 2010

Less Wrong: the art and practise of Rationality... and Harry Potter

I just found an amazing website that basically constitutes a broad exploration (with much discussion) on the art of "being less wrong".

What's interesting is that I happened upon it because my sister pointed out to me the most interesting Fanfic I've ever read: Harry Potter and the Methods of Rationality.

I don't read fanfic, as a general rule... it's usually just somebody's personal fantasies, and almost never as good as the original fiction.

But this one had me hooked from chapter one. It seems to constitute a kind of course-by-example into the Art of Rationality. No doubt more poignant if you've actually read the original, but fascinating none-the-less. Try it and see for yourself.

If you're not into fanfic at all - then feel free to cut to the chase - skip it and go straight to the Less Wrong wiki.

All this stuff is brought to you by the Singularity Institute which is dedicated to making sure that the predicted technological singularity is Friendly, rather than unfriendly, towards us mere mortals. Less Wrong was created in order to build a community of rationalists that would be able to improve the world in general (including, but not limited to the singularity). The soundbite mission statement being raising the sanity waterline

Thursday, 2 December 2010

I'm not a militant feminist

I assume non-gender bias at the start; I don't care what pronouns you use, and most of those "war of the sexes" ads are just plain funny.

Which is why I was totally surprised by an ad I saw today which suddenly made my "feminism" detector spike off the charts.

I can't find a pic of it online, so I'll have to describe it.

It's for some kind of smartphone.

A smug-looking geek-boy is standing there, with a gorgeous-looking girl with her arm wrapped around him.

The caption: "It's about how smart you are".


In case I need to state the obvious - clearly, being totally smart means that if you're a smart guy you get the hot-looking bird... but what makes him look smug is just as clearly *not* about how smart she is.


I like geek-boys, and for me it *is* more about how smart they are... but I'd hope that for the geek-boys it'd be about how smart *I* am too!

On further reflection, I think I'd be almost as scandalised if the ad showed a smug geek-girl with an Adonis draped over her.

What mostly annoys me is that it implies that the main benefit of being smart is to be able to entice the beautiful people to hang with you despite how plain-looking you are. In other words - even though it says it's about how smart you are... it's still about how pretty you are... :P