Year: 2010

    An Experiment in Dynamic Democracy

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Dynamic Democracy

    I’ve been an advocate of opening up our democracy and involving the public in government decision-making for some time, without doing anything particularly concrete about it besides placing my vote. The Digital Economy Bill fiasco showed us that, really, we’re not involved with the day-to-day workings of government at all, and born of that is this experiment.

    I’d like to know what we, the people, think our government should be talking about. I’d like us ordinary people to submit our ideas, vote on other people’s ideas, and come up with some idea of what we really care about. And so here we are:

    Dynamic Democracy

    This is all very experimental at the moment – please sign up, post ideas, vote on other people’s ideas, and if it proves popular I’ll take it on as a permanent project. Let’s do this!

    RABIES, Six Years On

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Somehow, against all odds, a party we threw in June of 2005 to celebrate the graduation of Racheet and Andy turned into a regular yearly event. This, for spaffy self-indulgent reasons, is its history.

    RABIES 1
    RABIES, a horrible backronym of “Racheet and Andy’s Big Incredible Extravaganza of Summertime”, came at what was the end of my second year at University. Andy and I cooked what was to be a sit-down meal for 18 specially-invited guests, and would have been just that if we’d had enough chairs and tables to seat everybody. In practice most of us sat on the floor and served ourselves buffet-style from food on the two big tables we’d borrowed from the Games Society.

    There was suspicious vegetarian stuffing, an experimental recipe all of our own. There was Christmas pudding (what better time than June?), there were swordfights in the garden under the blazing sun, and there was performance of the worst lemon fanfic we could find on the internet.

    It marked the closing of a time in my life that was saturated with the company of so many friends – a time I knew would soon be gone, but RABIES was always about forgetting that for a day.

    It was, with the possible exception of the day I proposed to my girlfriend, the happiest day of my life.

    RABIES 2
    If the first RABIES marked the end of a year of friendship, the next marked the end of a year of drama. So much fell apart in the nine months that preceded it, yet by the end, by the time June and RABIES rolled around, much was fixed again.

    2006 was the graduation year for many of us, myself included. We spent days trying to figure out another suitably horrid backronym involving everyone’s initials, but in the end gave up and declared it “RABIES 2”. Racheet and Andy were both still in attendance, so it didn’t seem too much of a stretch!

    Out of necessity we relocated to a different house and the sit-down meal became a barbecue, a change that was to define all future events.

    RABIES 3
    RABIES 3 was a turning point for me. Having graduated and moved away, I was coming back to Southampton just for the party. And having not spent a great deal of time in my old University town that year, RABIES had moved on a generation. It had become adopted by the Games Society as a society event, attended now by freshers that everyone else knew, but I had never met.

    I had no imminent leaving to forget that year. But as a father-to-be with a brain full of all the stress that entails, I suppose it helped me forget about that for a day – pretend I was back at University again, with a child’s carefree existence away from what my life had become.

    RABIES 4
    As the now increasingly inaccurate RABIES 4 approached, a thread appeared on the Games Society forum asking what on earth “RABIES” stood for. It dawned on me then: they don’t know who Racheet and Andy are. Three years had passed. Those graduating that year could have spent three whole years of University life in the time since we’d said goodbye to those two.

    RABIES 4
    And when I arrived, people clustered around me, asking how I was, bemoaning how long it had been since we’d last met, asking how my job was, how my son was. I was old.

    New traditions were born here – the location moved once more, though the barbecues remained. It was here that the dubious tradition of “Shirtless O’Clock” was born, and where our fondness for fire staves and poi blossomed into fire-swords, fire-chucks and the fire-naginata. Truly, it was a new generation of drunken recklessness!

    RABIES 5
    The fifth RABIES continued in a similar vein, with alcohol and barbecue and fire aplenty. We also ventured deep into the hedge behind what was by then known as the House of A (and E), no longer the preserve of Gemma and Tallulah and the Chemistry students of the once-glorious Extreme Breakfasting Society. Beyond that hedge we found all kinds of bizarre things. We emerged bearing them, but we emerged changed people.

    RABIES 6
    And now, RABIES 6 has been and gone. Five years have passed since Andy, Mark and I first sketched up a guest list of the friends we’d like to invite to a sit-down meal in honour of their graduation.

    The attendance these days tops 40, and the hunt continues for ever larger back gardens in which to hold it. Nothing short of 20 pounds of mince and 40 sausages were bought for the barbecue, and outdoor tables groaned under the weight of drinks bottles piled high.

    And oddly, things have come full circle, for Andy is graduating again this year, albeit in a city far from us.

    I am the last of what we called the Soton Kiddies to still be in attendance at RABIES; the only person to have been to all six. I don’t organise, these days, and I am barely involved with the cooking.

    And I wonder, at times like these, how long RABIES will continue.

    Will I still be going when I’m 30, five years from now? Did we create a tradition that will last the test of time, still happening every year 10 or 20 years from now, when no-one remembers any of us, and RABIES has become an acronym for something else entirely?

    Farewell, Dynamic Democracy

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Back in April, the Digital Economy Bill was rushed through the wash-up procedure of the outgoing government without the due debate and consideration that I and others believe such a far-reaching bill deserved. My disillusionment with the government decision-making process over the following week led me to set up and announce a new site, called “Dynamic Democracy”. It was an experiment to see what would be discussed if everyone was involved – on an anonymous basis – rather than just our elected representatives that often do not do a good job of representing us anyway.

    The site allowed all users to create and comment on ‘Bills’, encapsulated ideas or laws that they would be pushing for if they were in power. Registering gave users the ability to vote bills (and comments) up and down, leading to a list of highest-ranked bills that represented the users’ favourite potential policies.

    Dynamic Democracy saw little success, possibly because writing a full, well-thought-out bill represented significant effort that a casual browser would be unlikely to commit. ‘Karma’, the point system that aimed to encourage users to submit bills and comments, did not prove to be a good enough incentive as there were so few users to compete with and no direct reward was ever implemented for reaching high karma levels.

    What the site did bring, however, was a number of enquiries from like-minded individuals all over the world, keen to discuss the ideas behind the site and whether or not something like Dynamic Democracy could ever be implemented as a real government policy-making tool. One of the more notable contacts, Denny de la Haye, stood as a candidate for Hackney South and Shoreditch in the general election and promised to implement a crowd-sourced voting system similar to Dynamic Democracy for his constituents to voice their opinions in Parliament through him. (Denny, who sadly did not win his seat, now represents the UK arm of political party DemoEx.)

    I have decided that today is the day to close the Dynamic Democracy experiment, because today the UK government announced their “Your Freedom” website. While largely focussed on repealing or changing laws rather than the complete freedom to suggest anything you like, Your Freedom is certainly in the same vein as Dynamic Democracy, with the crucial extra feature that is endorsed and used by our government and thus ideas proposed there stand at least some chance of making it into official government policy.

    Time will tell whether that really happens, or if like the No. 10 Petitions site, suggestions will be responded to with an e-mail from the Prime Minister’s office explaining why thousands of users are all wrong. But I do still hold out hope.

    Did Dynamic Democracy influence the government in their decision to create Your Freedom? Almost certainly not. As my discussions with visitors to the site have shown, I am far from the only person to have come up with this idea, and neither am I the only one to have coded up a website around it. No – this is simply an idea whose time has come. A vast gulf exists between Westminster and the world outside, just as it always has, but these days the public are coming to question why that is and if we can do something to correct it. And nowhere is the desire to bridge that gulf stronger than among the tech-savvy youth that have the drive and the ability to use the internet to that end. Sites like these will come and go a hundred times over the coming years and decades, and slowly but surely we’ll reshape our government into what we want it to be.

    So to everyone who contributed to Dynamic Democracy: thank you, and goodbye.

    If you’d like to contact me about Dynamic Democracy (or anything else), you can still do that via email. If you’d like to help get the Digital Economy Act repealed, please vote up and comment on one of these ideas on Your Freedom. If anyone would like use of dynamicdemocracy.org.uk until my ownership expires in 2012, let me know. Stay tuned for the announcement of another project that bridges politics and the internet in the next few weeks.

    The Cautionary Tale of Sultan Hamnvik

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    That the car park was eerily futuristic, with automated sensors telling you how many spaces remained in each lane, should have been your first warning. No, yet earlier than that. You should have realised when it took you four attempts to leave the dual carriageway at the right junction. No amount of poor navigation skill could have led you to fail that many times. You should have realised, then, that the place distorted reality around it. Whether it was just unusually massive, or unusually evil, you couldn’t tell from the outside. All you could tell was that it twisted your perceptions, made your mind and your car run in circles. But these circles were concentric, spiralling ever inwards, towards the core. Once you saw the sign and the inviting arrow beside that junction, all hope was already lost. You were caught in its net.

    As General Adama would say, “Frak”.

    Frack, €5.99

    Frack, €5.99

    From the moment you step inside the door, pick up your eye-wateringly yellow bag and utterly useless paper tape measure, it has you. You will follow the arrows on the floor, never deviating from the predetermined path that your Swedish overlords have ordained for you. There are shortcuts, sure, but do you really want to try them? The other customers will give you strange looks, they’ll know that you’re not yet truly one of them. And they will report it to a member of staff, as is the duty of a Loyal Customer. Then you will be dealt with. No, no, dear customer, it is better to stay on the path.

    Heed the throng of Loyal Customers. Their bellies are full of nourishing meatballs, and they have set off on the Great Pilgrimage with you. Their children scream and wail while they peruse the bland infinity of moderately-priced flat-pack furniture, but to no avail. The adults are consumed, they have become cogs in the machine, and you are elated to be joining them.

    The names, the names are what seals it. The twisted, maddening names, the names that perhaps once were Swedish or some other language before the Taint reached them. Now they are trapped in a Limbo between meaning and non-meaning, luring you in, trying to get you to understand them. You look, you try to pronounce them, you curl the sounds around your tongue, probing for meaning, but there is none. They will haunt you for the rest of your days, sitting in the back of your mind, luring you back to this place just in case you can extract some meaning from a second exposure. Behold the names, behold their terrible glory! Behold the creature of madness that spawned them! Chant with me! Ia! Ia! Cthulhu f’thagn!

    Behold also the Stack of Identical Grinning Babies!

    Behold also the Stack of Identical Grinning Babies!

    Beware most of all what seems to be the end of your journey, for there is a terrible choice that awaits you. There are steps up and steps down. Those leading up are warm and inviting, ushering you on with a yellow tone you now find soothing to your soul. But beware it, beware it! It leads back to the entrance again, from where you have no choice but to complete your whole damning journey again, hoping and praying that you will still have enough sanity left to choose differently next time. If not, all hope is lost. You will follow the Path again and again, forevermore walking the spacious showrooms of this cursed place. One day you will awaken from where you had collapsed on a comfortable pine-effect divan and find yourself changed, wearing a yellow polo shirt and with a spacious utility belt for pencils and tape measures. You will have become an employee.

    No, such things should not be mentioned. It is too terrible a fate. Take heed of my warning, Loyal Customer, and choose the steps going down. They lead into the belly of the beast, a grey expanse of unending shelves where boxes are born and die. People here have discarded their yellow bags in favour of metal trolleys, all the better to gorge themselves on the wares of this place.

    This is the most dangerous place of all, but you must endure it. Your life depends on reaching the end of it. It is guarded by the beeping, clacking checkouts and the fallen employees who feed them, but get up to speed on the trolleys and you just might make it through.

    'Salida' might be in some kind of crazy Paella-language, but at least it's a real word.

    ‘Salida’ might be in some kind of crazy Paella-language, but at least it’s a real word.

    Take heart, dear Loyal Customer. Escape is possible, but you must persevere. Here I have told you everything I know, everything I have experienced, in the hope that it will aid you. I ask of you, if you should make it out alive with this document, place it as near to the entrance as you dare venture in the hope that some other poor soul will find it and survive just as you have.

    Farewell, and good luck.

    Yours in faith,

    Sultan Hamnvik

    Lord of Mesopotamia

    Part-time Viking Hamster

    Sultan Hamnvik

    a thousand words: A New Timesink has Arrived!

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Somehow unable to cope with actually having free time of an evening, I have taken on yet another project which will doubtless push me deeper into the dark, untamed wilds of the internet, the land stalked only by the mysterious beast known as the “web developer”.

    Eric has come up with the idea for a fiction-writing community known as “A Thousand Words”. The concept is simple:

    • Users submit photos or other images that they find interesting
    • Every week (or other suitable period of time), one of these is chosen by the site staff
    • Users then write short stories, of around 1000 words, inspired by the picture
    • Users rate, comment etc. on each other’s stories

    I’ll be coding up this site in my spare time over the next few weeks, and you can check out my current progress on the live site at a thousand words.  Currently, the database design is done and I’m partway through the UI of what will be the main page.  My todo list is roughly:

    1. Finish the main page and story page UIs.
    2. Add bare-bones pages for all the GET/POST functions, e.g. registering accounts, submitting stories, submitting pictures.
    3. Test all the functions.
    4. Work on their UIs.
    5. Start closed beta testing for anyone interested.
    6. Liberally apply jQuery to improve user experience.
    7. Add commenting, possibly via DISQUS.
    8. Add proper user profiles, gravatar support etc.
    9. Get everyone I can find to try and break it.
    10. Release!  Open the flood-gates, and despair at the dribble I receive.

    As I go I’ll be posting updates and hopefully-interesting insights here, and you can always check the site at athousandwords.org.uk to see how I’m getting on.

    a thousand words: First Sketches

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    With the main browsing UI for a thousand words up and running, it’s time to bore the world with more pointless trivia before moving on. Today: design sketches!

    Pretty much every software project I undertake these days begins with a sketch of the user interface and an initial structure for the database. Labouring under the cruel ‘no whiteboard’ conditions at home (maybe I should get one?), I drew these out on paper. Passing the UI sketch over to Eric after about 5 minutes’ work, she described it as “awesome”. I think that’s the first time that’s ever happened; the general response at work is along the lines of “but where are you going to put giant-ugly-element-X that I’ve just thought of and wasn’t in the spec?”. So that was that, and I’ve coded it up pretty much as it was on paper.

    The database hasn’t changed much from the original design yet, but it will have to soon – as designed, the vote (‘stars’) system doesn’t record each user’s vote on each story, so it can’t support users changing their vote. Sometime during development I’ll have to devote a few hours to figure out the best way of handling it, though that probably comes down to a few minutes as someone on Stack Overflow has inevitably asked about it already.

    a thousand words UI Sketch
    a thousand words Database Design

    Next up on a thousand words is coding the first few forms that will allow users to register and log in, submit photos and submit stories. That should be done within the next few days, and will allow me to play with actually changing the contents of the database, rather than just showing views of it.

    a thousand words: GETting and POSTing

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Another day, another bunch of functionality added to a thousand words. With the main public-facing interfaces largely complete, I have moved on to the guts of the site’s user interaction. The site now has working, but ugly, implementations of:

    • E-mail address / password authentication, with cookie support based on a secret phrase generated at registration.

    • Registration itself, including the setting of a display name (users authenticate with their e-mail address, so we need something friendlier to display in the UI). Accounts are created in an unactivated state, and an e-mail is sent allowing the user to use their secret phrase to activate the account (GETted via a “click here to activate!” URL).

    • Picture submission, which adds the submission to a ‘queue’ table. In time there will be an admin interface for moving items from the queue to the real pictures table, i.e. promoting a suggested picture to “picture of the week” status.

    • Story submission, which adds the story to the live site and takes you there after submission. There’s currently no edit capability, and the picture that the story is based on must be manually specified by ID number. (The latter will become a scrollable jQuery list of all pictures.)

    A story edit/delete interface is my next task, and once that’s done, the core functionality (excluding any user profile-related code) will be largely finished. After that there’ll be a period of testing and improving the interfaces of the new functions, before I put a call out for a couple of willing guinea pigs to try and break the site for me! If anyone out there is expecting to be really bored sometime this week, let me know!

    a thousand words: Hot Profilin’ Action

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    A few days’ laziness (by which I mean a few days’ Starcraft) have passed with not much work being done on “a thousand words”. That came to an end tonight, with a productive evening resulting in a working profile system so that users can now add and display personal information, change their registered e-mail address and password, etc.

    There’s now a database backend for the voting and commenting systems, which will be complemented by their GUI pages tomorrow night.

    Once that’s done, that’s the last of the main functions out of the way and we’re basically down to tweaks. I think we ought to, in no particular order:

    • Decide on what formatting users can add to stories, and filter for it

    • Add a word count, and possibly limit submissions to e.g. 600-1400 words

    • Add a means of reporting stories and pictures for e.g. copyright issues

    • Add a means of rating stories, so users can mark them as containing sex, violence etc.

    • Create an admin interface, so we don’t just have to run the site with raw SQL queries

    • Add ranks, etc. (incentives for achieving high Total Stars)

    • jQuery up some of the main bits to improve user experience

    • Implement the scrolling list of pictures for users to select when creating a new story

    At that point, I think it should be ready for open beta. Hopefully we can get it all done within a week, before I depart for internet-less shores!

    a thousand words: Alpha, Beta

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    “a thousand words” has now reached a stage where every feature that I give a damn about is implemented. Thus, we’re opening it up to a limited beta test to iron out the wrinkles and get a list of any features potential users would like to see us launch with. If you’re bored or simply have a love of breaking other people’s shit, head along to http://athousandwords.org.uk and see what hell you can raise. As the Big Red Box Text warns you, really don’t submit any work of fiction you care about, just in case some kind soul finds an SQL injection vulnerability and trashes the database.

    Since last time I bored the hell out of you all, voting and commenting has been implemented, registration has been fixed, filtering HTML tags from submissions has been added, as has a word count and the picture selector on story submission. There’s been a bunch of behind-the-scenes tweaks to improve security too.

    The one feature that Eric definitely wants is a way to mark stories according to their content. We could do this in several ways – I would prefer, if anything, to just have a “not for kids” option on each post and a Date of Birth field associated with user accounts, so we can hide stories as required. Other options include a range of ratings (U, PG, 12, 15, 18…) or tags for certain content (violence, sex, language) so people can avoid whatever they’re picky about.

    This probably ought to come with a Report button so that users can report incorrectly rated stories, and I would add a similar feature to report pictures. (Picture submissions are moderated, so Goatse isn’t going to make it through anyway, but the mod team might miss subtler things like licencing terms and copyright infringement.)

    At that point, all that’s left on my list is the admin interface and anything that users suggest during this beta. Hopefully we’ll be ready to launch by the time I depart for sandier shores at the end of the week!

    a thousand words: Finishing Touches

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    The vast majority of user-reported bugs and requested features on “a thousand words” have now been sorted out. As requested by my co-conspirator Eric, we now have an ‘adult content’ filter based on a date of birth field in users’ profiles, and a ‘report’ button to bring problematic stories and pictures to the attention of the moderators. There’s also a DeviantArt-style “request critique” option to let users know what kind of comments you’re looking for.

    Timestamps have been fixed, “no stars yet” ratings introduced, and text field policies such as “mustn’t be empty” have been added across the site. A few rendering issues in IE have been sorted out, so it now looks much the same across all platforms.

    The biggest change is unfortunately something most of you will never see – the moderator console. Picture submissions and reported stories/pictures now sit in queues that can be dealt with by moderators. An item entering a queue triggers an e-mail to all mods, who are invited to review it and make changes as appropriate. Once changes are made, the affected users are then e-mailed to let them know what happened (and in the case of reported items, to give them a chance to challenge it).

    There’s one major feature request that’s not yet been implemented: file uploads. Once in the system this would allow users to submit pictures from their hard drives rather than from the web by URL, and would allow moderators to copy URL-linked pictures to the site to avoid hotlinking. (At present we don’t hotlink, but we do therefore have to copy pictures to the site manually using FTP.) It could also allow users to use a non-Gravatar picture for their profile.

    Depending on how things go, that may or may not be ready by tomorrow night. On Saturday morning I jet off to sunny Saudi Arabia, so any changes not made by then are going to remain unmade for a while. From that point it’s in Eric’s capable hands as to whether she wants to release the site or not. Even if the site does advance to release status, I’m still taking bug reports (they’ll sit in my inbox until I get back), so keep on letting me know what’s broken and what you’d like to see added!

    For the Discerning Lady or Gentleman, SuccessWhale version 1.1

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    The sudden proliferation of peoples’ syndicated tweets from sources such as Foursquare and Fallen London annoys me far more than it should. Any more sensible old grouch would pick up his pipe, don slippers and write a strongly-worded letter to the local newspaper about how this ‘checking in’ business is corrupting society.

    Instead, I made my Twitter client block them. Also, you can now do it too!

    SuccessWhale users will now see a link at the top-right of the interface called ‘Manage Banned Phrases’. Clicking it will take you to a page where you can specify a semicolon-separated list of things you don’t want to see, such as “4sq.com;fallenlondon.com;bieber”. Once confirmed, any tweets in any timeline that are sucky enough to contain one of these phrases will be hidden from your view.

    Twitter: now 12% less full of shite!

    An extra feature has been rolled into this release, which is the ‘Reply All’ button. It only appears where two or more people are having a conversation (three or more if you’re included too). Clicking on it starts a reply to everyone mentioned, not just the tweet’s originator. So if @Alice is talking to @Bob, and you click ‘Reply All’ on one of her tweets, your entry box will then read “@Alice @Bob”.

    So that’s version 1.1. Share and enjoy!

    SuccessWhale is a free, open, multi-platform web-based Twitter client. It’s hosted at sw.onlydreaming.net, and you can find out more about SuccessWhale here. It’s GPL-licenced, so you can download yourself a copy too if you want one.

    A Farewell to Marmablues

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    May 1998, half a lifetime ago. It was my 13th birthday, and my parents – no doubt annoyed by four years of me messing with the family computer – bought me my own. It had a 333MHz processor, 32 glorious megabytes of RAM, and most exciting of all, a 56k dial-up modem.

    With Microsoft Word as my co-pilot and under the ever-watchful phone-bill-monitoring eyes of my parents, I discovered the delights of owning my own website. It had it all, oh yes. Giant background images, a different one for each page. Animated GIFs. Background MIDIs. Frames, <blink> and <marquee>. Web rings to click through, and Tripod’s banner ads inserted at the top of every page. It was called “The Mad Marmablue Web Portal”, and it was exactly as horrendous as you are imagining.

    A few years later, a chronic lack of smallprint-reading led me to buy it a ‘free’ domain name, only to receive a scary-looking invoice a month later. In the end my parents sent the domain reseller a letter explaining that I was a dumb-ass kid who shouldn’t be trusted on the internet, and that was that. But at the age of seventeen, in possession of a Switch debit card, I found a web host who would set me up with a domain and 100MB of space for £20 a year. “marmablue.co.uk” was born.

    Today, it died.

    I shouldn’t feel sentimental about jettisoning an old unused domain, particularly not one that harks back to the late-90s animated GIF horror of the Mad Marmablue Web Portal. But it was a part of my youth, the place where for the first time I could put something and anyone could see it. It was where I took my first steps with HTML – by ripping off other websites, naturally – and in time, it was where I first learned JavaScript, PHP and SQL too.

    I will miss it. But if I sit very still, and very quietly, I can still hear that horrible 8-bit MIDI rendition of the RoboCop theme tune. So maybe I won’t miss it all that much.

    Windy Morning Mechanics: How Big a Sail do I Need to Fly Away?

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    I recall walking to school in a hurricane in what must have been 1989 or 1990, grabbing onto a nearby fence to hold myself steady, wondering how strong the wind would have to be to pick me up off the ground. In the intervening 20 years I never did work it out. It’s a windy day today, so, to the Classical-mechanics-mobile!

    It seems intuitive to me that the answer to the exact question posed by my five-year-old self is “really bloody strong”, and that a better question might be “how much surface area would I need, positioned at the optimum angle and given a certain wind speed, to counteract my weight?”. Or alternatively, “I’m off down to the workshops, how big a sail do I need to make myself?”.

    Let’s start with the pressure on a surface due to the wind, ignoring any issues of aerodynamic flow. Bernoulli’s equation gives us a pressure differential dp, by:

    dp = (v2/2) ρ

    Where v is the velocity of the air, and ρ its density.

    The force, F, exerted by the wind on a solid of area Ap perpendicular to it would then be:


    F = dp Ap
       = (v2/2) ρ Ap

    Assuming the wind is blowing horizontally, in order to generate the maximum amount of lift, the sail should be at 45° to the wind. In this configuration, half the force exerted on the sail will push it in the direction of the wind, and half will push it up.

    However, tilting the sail by 45° (π/4 radians) reduces the area which it presents to the oncoming wind. The area presented to the wind, Ap, as a factor of its true area, A, is given by:


    Ap = A sin(π/4)
         = (√2/2) A

    Substituting this into our force equation, we get that:

    F = (√2/2) (v2/2) ρ A

    Or to simplify,

    F = (A v2 ρ) / (2 √2)

    As mentioned earlier, only half that force is upwards, the other half being in the direction of the wind. So the vertical component of the force, Fv, is:

    Fv = (A v2 ρ) / (4 √2)

    This force is being employed to lift a mass m in Earth’s gravity g, so we have that:

    m g = (A v2 ρ) / (4 √2)

    Rearranging this for the sail area required gives us:

    A = (4 √2 m g) / (v2 ρ)

    Numbers time! If we assume a bored software engineer of mass (m) 80 kg, Earth’s gravity (g) of 9.8 m/s2, air density (ρ) of 1.2 kg/m3, and the Met Office’s current estimate of wind speed (v), 54 miles per hour or 24.14 m/s, our answer is:


    A = (4 √2 × 80 × 9.8) / (24.142 × 1.2)
       = 6.3 m2

    That’s quite a bit bigger than what I could achieve with bat-style wings between my arms and body, but not totally unachievable.

    For my 20 kg five-year-old self, that area would be four times less, at 1.6 m2.

    Part 2

    Since we’ve got this far, we might as well check out my “really bloody strong” hypothesis for how strongly the wind would need to be blowing to enable our engineer to take off unaided.

    Rearranging the equation for wind speed gives us:

    v = √((4 √2 m g) / (A ρ))

    Our engineer has a surface area (from behind) of approximately 1.5 m2, so all other things being equal, the wind speed, v, required is:


    v = √((4 √2 × 80 × 9.8) / (1.5 × 1.2))
      = 49.6 m/s
      = 110 mph

    This is well into hurricane territory on the Beaufort scale, although still a way short of the fastest wind speed ever recorded.

    As for my five-year-old past self, if I had quarter the mass and the same density, I also had around (1/4)2/3 = 0.4 times the surface area. The air speed required to lift me off the ground at that age would have been:


    v = √((4 √2 × 80 × 9.8) / (0.4 × 1.5 × 1.2))
      = 39.2 m/s
      = 87.7 mph

    Also comfortably in hurricane territory, though not quite as outrageous as 110 mph. Maybe if, back then in 1989, I’d stretched my coat out and angled back at 45°…

    Thanks to Tam Coton for correcting my original error in the final section.

    Sea Battle, now with more Processing

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Nearly a month ago now, I blogged some sketches and ideas for a game I felt like writing. masterofwalri made a passing reference to Processing in his comment, and having heard people mention it in the past, I figured I should check it out.

    I’m very, very glad I did.

    It neatly deals with the issue of what I should develop for. The comments were leading me down the Java path anyway, but Processing’s two-click export to Applet and bundles for Windows, Linux and Mac OS sealed the deal. And it’s easy to program in too – it’s clear that it’s beginner-oriented, but it’s also ideal for simple games like this as it simply removes all the starting faff, like sorting out JPanels and TimerTasks and all the rest. Time will tell if Processing over-simplifies things and stops me doing something I want to do, but for now it is excelling at the main task of high-level programming languages – reducing the amount of brain overhead I need to allocate in order to talk to the computer.

    One lunchtime has produced 270 lines of code – which already includes the game area of the GUI, controllable player ships, and the beginnings of AI for the enemy ships.

    Note: this blog post is old, and the game now has more functionality than is described here. The next blog post in the sequence is here.

    Currently there’s no real gameplay – you can’t build, and ships can’t shoot or be damaged. You can move your ships (starting at the bottom of the screen) around, and the AI ship will hunt yours. Click on a ship to select it (blue circle), then click elsewhere to set its destination. Red lines, when they appear, show when ships would be shooting.

    The next block of code will give the ships customised gear, health points, and the ability to attack and sink others. With that will probably come attack animations, which with my lack of skill in that department, will take a while. After that, damageable bases and win/lose conditions, then the build/research system. Finally, graphics tweaks, AI improvements and game balancing will finish it off.

    More bloggery will appear once more coding occurs!

    Sea Battle: That’s what Guns are for!

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Another day – or three, in this case – brings another ton of functionality for Sea Battle. (Previous posts: 1, 2)

    Today’s release reduces the target frame rate from 60 to 30 frames per second, in an attempt to alleviate the CPU hogging reported by aefaradien in the previous post’s comments section. As I said in the comments, it’s not an issue I see on every machine, so I’d be grateful if any testers could tell me what PC setup they have, and how much CPU power the game takes up.

    Today’s version also fixes the spinning ships bug that just about everyone reported. What it doesn’t do is make mouse clicks any more responsive, which is annoying me too. Please bear with it for today, I’ll see if I can work out how to deal with that soon.

    Mostly this release is about new features. Sea Battle now has:

    • Ships are now implemented as having separate Hulls, Weapons, Engines and Radars

    • Ships can shoot at each other (finally!)

    • Ships have health (and health bars), and can be destroyed

    • Bases have health (and health bars), and can be destroyed

    • That means there’s now a win and a lose condition

    • Enemy ship AI now considers your ships’ scariness – a factor of firepower and remaining health – to pick targets it thinks it can defeat

    • You can now build, with appropriate build delays and an 11-slot build queue

    • The enemy can now build too

    • Colours have been tweaked to make ships’ allegiances more obvious

    The only real bit of functionality that’s still missing is the research / build options. Currently, clicking the Build button produces a ship of a predefined configuration – you can’t change that config or research better ones. The AI builds random ships up to and including as powerful as your default one, and has a reasonable amount of ‘thought delay’ to its actions, meaning that you can achieve victory fairly easily. (Just fill up the build queue and send every ship North as soon as it’s built – you’ll lose a few, but enough should survive to destroy the enemy base.)

    Note: this blog post is old, and the game now has more functionality than is described here. The next blog post in the sequence is here.

    Sea Battle: Here Comes the Science Bit

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Another day down, and somehow Sea Battle is remarkably close to the finish line. (No idea what I’m talking about? See previous blog entries 1, 2 & 3.)

    First things first, my failings: CPU use and mouse sensitivity are still not fixed. I’m now having to re-render more of the window on each refresh than before, so if anything they might be slightly worse.

    On the Facebook thread, Scott and Mark mentioned an AI issue in that a suitably scary player ship, when parked close to but slightly off to one side of the enemy base, will be ignored by enemy ships in favour of attacking the player base instead – even when they have no hope of destroying the player’s base before their own is destroyed. As far as I know that issue is still there, though improved enemy research and build AI should mean the enemy is pumping out ships just as scary as yours.

    On to the new features:

    • All 10 hulls, weapons, engines and radars are now implemented

    • You can now choose between them when setting build orders, so you can build in whatever configuration you like

    • Research is now implemented – click on an unresearched component to start researching it

    • You start the game with only basic components, and must research more to survive

    • Colours: Grey – not researched yet, Green – researching now, White – available, Yellow – selected (clicking Build will build this)

    • Enemy AI now handles its own research

    • Enemy AI now builds intelligently rather than randomly

    • You can now drag a box to select multiple ships

    And bug fixes / tweaks:

    • Base health significantly increased

    • Building a second ship without moving the first no longer places them on top of one another

    • Pathfinding code tweaked to cope with much faster/slower ships now all the hulls and engines are available

    • Fixed an issue whereby the blue radar circles were drawn at half the ships’ actual radar range

    Still to come:

    • Ship / submarine hull and vs ship / submarine weapon distinction

    • Tweaks to enemy AI

    • CPU use / mouse responsiveness fixes

    • Menu system and difficulty picker

    If you’d like a good strategy for beating the game at this point, I recommend you begin by keeping your build queue about 3-4 ships full, building the best thing you can at any point. Research-wise, rush down the weapons tree as far as Harpoon missiles, throwing in a couple of hulls and radars. Avoid engines for now. As soon as you have Frigates with Harpoons and Radar Mk 4, keep building them until you’ve fended off all the enemies near your base and you have a fleet of 15-20 of them, then move them all right up to the enemy base. With that fleet you should be able to destroy the base before the ships they build wear yours down too much.

    Sea Battle: Of Ships and Submarines

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    The distinction between surface ships and submarines in Sea Battle has turned out to be a more thorny issue than I originally imagined.

    The original plan was to have two classes of vessel, based on their hull types – ship or submarine – and weapons that could hit ships, submarines, or both. A future update could also have included aircraft “hulls”. However, the more I think about the game balance issues, the less I’m convinced that this is a good decision with the tech tree and playing field size that Sea Battle currently has.

    Sea Battle’s tech tree, as it currently exists, has four straight “trees” with 10 items in each. By and large, each component that you research is better than its predecessor. (Later hulls are heavier and take longer to build, so small hulls are still useful. However, you would rarely want to choose anything other than the best weapon, engine and radar that is available to you.) Combined with the small playing field, this makes for a fast-paced game of a few minutes, with each player researching and churning out ships constantly to gain the upper hand.

    There are a number of reasons why the current tech tree is inappropriate for submarines. Firstly, the weapons that a submarine could have: there’s only two. The Sting Ray torpedo (weapon 8) and Tomahawk missile (weapon 9) are the only weapons appropriate to be fired from a submarine. This would make rushing down the hull tree to submarines pointless unless you’d already reached near the end of the weapons tree – and in most games, you don’t even get that far.

    It also creates a UI complication, in that currently, any combination of hull and weapon is permissible. Submarine-appropriate weapons would break that behaviour.

    There’s an issue with anti-submarine weapons too. Again, only two (Depth Charge (6) and Sting Ray (8)) are appropriate for use against submarines. But since a viable submarine build wouldn’t exist until Hull 6 + Weapon 8, they would only exist in the late game, at which point Depth Charges just can’t hold their own against other weapons – so why have them at all?

    To abuse game theory, the logical choice is for players to build Depth Charge ships when they become available, then hold them in reserve as insurance against their opponent building submarines. But if you see your opponent stocking up on Depth Charge ships, you might as well not bother building subs and just go for better weapons and radar instead. Whoever commits to a strategy first ends up on the losing end.

    To cure these problems, perhaps we need to take another lesson from Warzone 2100’s book and have separate tech trees for different weapon types. So rather than one tree of 10 weapons, we have two trees for anti-ship and anti-sub. (And potentially anti-air later.) If we’re going down this route we ought to have different hull trees for ships and subs too. But at this point it’s turning into a rather different game – a slower, more traditional rock-paper-scissors RTS. But these games benefit from larger playing fields, varied terrain and squad-based combat – none of which Sea Battle is particularly well suited to in its current form.

    So the question stands: Do I expand Sea Battle significantly to include this extra complexity, on the understanding that I would probably need to rewrite it in something other than Processing and that may consign it to the pile of “projects I lost interest in”, or do I just ignore the issue and for the sake of simplicity not treat submarine hulls as any different from ships?

    Daily Promise: Design Sketches

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Current flavour of the month of some of the geek crowd, “Health Month”, is a social network of sorts on which users compete to achieve certain health-related goals. Each month, each member sets a number of goals for themselves to achieve. Its core mechanic is health points – you start with 10, lose one every time you fail to meet a goal, and players who perform well can heal you.

    I’m enjoying my use of the site with three goals this month, but I’d like to step it up and set lots. Unfortunately, having more than three goals costs money. (Not that I think the site’s owners don’t have a right to charge, but it can be a deterrent to users such as myself.) It also currently only allows two “custom” rules per month – beyond that, you have to stick with the pre-defined ones.

    Another social health site is Tweet What You Eat, on which users tweet their food intake and have the site, or the community, calculate statistics such as their calorie intake.

    Over my lunch hour, I’ve come up with some sketches for a site that sits somewhere between the two. It takes Health Month’s goals mechanic, opens it up and removes some of the social aspects that in my opinion Health Month doesn’t implement all that well. It also drifts closer to Tweet What You Eat, in that rather than being its own service it piggybacks of Twitter for its social side.

    At the moment this is just a fun concept I’m toying with – I don’t really have the time to make it at the moment, I doubt the space between Health Month and Tweet What You Eat is wide enough to make a new site popular, and I feel a little guilty about thanking Health Month for the enjoyment I’ve had by becoming its competitor.

    In the notes below it’s dubbed healthi.ly, though as that domain is parked, it’s come to be known as “Daily Promise” instead.

    Home Page

    Daily Promise Home PageThe home page would largely be a “log in / register” affair, possibly also showcasing successful and popular users in a side-bar (not shown). Big banner text explains the rough concept, with a “read more” link to a full “About” page. On the registration side, we make it clear exactly what Daily Promise does and doesn’t do with access to your Twitter account.

    Set Up Goals

    Daily Promise Goals PageThe main setup page is where you set your goals. Users can set any (reasonable) number of goals, they can drop and resurrect old ones, and add new ones, at any time. Performance against all the goals is tracked and visible on this page. Adding new goals and dropping old ones can be tweeted, but as with every tweet opportunity, the user is presented with an @Anywhere box that they can freely edit and can choose not to tweet as easily as they can choose to tweet. The tweet links to the list of goals on their profile.

    Daily Performance

    Daily Promise Daily Performance PageOnce goals are set, the user logs in each day (and can fill in past gaps) with whether or not they have met each goal. Each day’s entry presents some brief statistics, and you get more stats on the week after filling in Sunday’s performance. Very good or very bad performance suggests a Tweet that a user might like to make. The tweet links to their performance log on their profile.

    Performance Log

    Daily Promise Performance LogThis is a user’s main screen. It displays a chart of passes and fails for the last month or so as green (pass), red (fail) or grey (goal not active) squares. Below the chart, more detailed stats are presented, as well as an encouraging text summary of how the user is doing.

    Settings

    Most of the core settings such as username, display name, avatar and bio are handled by Twitter. Daily Promise’s settings probably boil down to privacy (stop me being searchable, delete my account, etc.) and removing annoyances (always tweet on condition x, never tweet on condition y, etc. – all of which have an “ask me” setting by default).

    Friends

    Daily Promise Friends PageThe user’s “following” list from Twitter is used to generate their list of Daily Promise friends. Avatars, usernames and Daily Promise performance summaries are displayed here. Clicking through to a user’s profile shows the “performance log” page, topped with name / avatar / bio / etc.

    So, and interesting idea, or an appalling one? Would you use this? Should I get off my arse and code? Should I have finished the last six things I started before prototyping something new? Your thoughts are, as always, appreciated.

    Daily Promise: Coming Together

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    Despite the lack of response to my earlier post, in which I floated my design concepts for “Daily Promise”, boredom won out in the end and I started coding anyway.

    It’s now coming together, and all bar the Twitter-integrated social aspects are largely complete. Here’s how it’s developed:

    Home Page

    Daily Promise: HomeThe social side – top users, etc. – still isn’t implemented, but there’s a reasonable-looking homepage in there. The main body is taken up with a short description and a big graphic explaining how the site works. Side-bar widgets provide the Twitter login and alternative login (bypassing twitter.com). The site now has a proper name, Daily Promise, and with it a logo and style that is reflected throughout.

    Set Up Goals (“Manage”)

    Daily Promise: ManageThe “Manage” page has remained almost exactly faithful to the design. New promises can be created, old ones deactivated and deactivated ones can be activated again. A Tweet box appears for the user to announce their new promise, if desired.

    Daily Performance (“Enter”)

    Daily Promise: EnterAgain, there’s not a lot of difference here between the design and the reality. Each promise has a yes/no choice, and after completing a day’s entries, Tweet boxes appear for the user to let their friends know about their successes and failures. “Winning streaks” aren’t yet implemented.

    Performance Log (“View”)

    Daily Promise: ViewThere’s no ability to scroll through your history yet, but the default display shows 4 weeks (which scroll if necessary). Just as in the design drawings, the history table is followed by a text summary of how the user is doing.

    The “View” page also, with a few additions, becomes a user’s profile page, which is accessible to other users.

    Configuration

    Here you can set your password for the alternative login, and delete your account. It’s exactly as dull as it sounds.

    Friends

    That’s my big job for the next few days! It doesn’t exist yet, but it’s now my top priority.

    Daily Promise: Avatars Everywhere!

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    After a couple of days and one frantic family-free morning, Daily Promise is getting near completion. Here’s what’s new since last time.

    (This is post number 3 in my series on the development of _Daily Promise. The others are here: Design Sketches, Coming Together.)_

    Friends Page

    Daily Promise: FriendsHere’s the Friends page – again, almost no deviation from the original design sketch. The friends page pulls in the list of people that you follow on Twitter, matches it up against Daily Promise’s user list, and if any match, they’re your Daily Promise friends! They’re simply displayed in alphabetical order, along with a summary of their performance. Invisible users (see later) don’t appear, even to their friends.

    Nicer User Pages

    Daily Promise: User PageClicking on one of your friends takes you through to their ‘view’ page (minus any editing functionality). It also shows you their Twitter bio, and how long they’ve been using Daily Promise.

    Top Users Widget

    Daily Promise: Top Users WidgetThere’s now a “top users this week” widget on the home page, showing the performance of the top 5 users. This resets at midnight on Monday morning.

    Spam your Friends!

    Daily Promise: Tweet BoxTwitter integration now includes boxes suggesting Tweets you might like to make after each significant activity. Just as promised in the “How does it work” graphic, Daily Promise never posts to your Twitter account without you deliberately clicking a “Tweet” button each and every time. Do no evil™!

    Behind the Scenes

    A lot of other stuff has changed in the last few days that isn’t immediately obvious to users:

    • Authentication fixed – users using the alternative login weren’t able to do Twitter things. That’s sorted.

    • Account visibility – your account can now be set to invisible, meaning it won’t appear anywhere – top users, friends lists, etc. New accounts are given a prompt to set their visibility before starting to add promises.

    • Account deletion simplified – you now only have one, nuclear, option for account deletion. It erases all traces of you having used the site. Do no evil™! 🙂

    • Removed promises no longer shown in the history table – ‘cos no-one likes to be reminded.

    • Fill in data for yesterday – when creating a promise, users can opt to enter data for yesterday, giving them something to fill in straight away.

    • History table scrolls – narrow displays can’t fit the whole history table in, so now it scrolls (in reasonably modern browsers).

    • Time zones implemented – we pull the timezone you have set in Twitter, so Daily Promise will roll over to a new day at your local midnight.

    • Crontastic! – we now update stats and things from an hourly timed cron, to avoid extra loading on user-requested pages.

    Next Steps

    This all brings me to the slightly worrying conclusion that Daily Promise is damn near finished. So, where do we go from here? I’ll have a few more days of bug-fixing and implementing features that people request, and then it’s difficult decision time:

    This has been a fun project for the last week or so – does it deserve a domain and advertising, or shall I let it quietly die?

    Announcing: Daily Promise!

    This is a post from my blog, which is (mostly) no longer available online. This page has been preserved because it was linked to from somewhere, or got regular search hits, and therefore may be useful to somebody.

    After a couple of weeks of development – documented here, here and here – I think I’m ready to call Daily Promise version 1.0.

    It’s a site that helps you keep track of your promises day-to-day, giving you a pretty display of which promises you’ve kept when, and letting you compete against your Twitter-using friends to be the best at keeping your daily promises!

    For now, you can find Daily Promise at http://dp.onlydreaming.net.

    I’ll make the same deal as I made with Dynamic Democracy, but doubling the number so that I can be more sure of it taking off, and that’s the following:

    At the moment the site does everything I want it to do, and it’s hosted on a subdomain of my main website, which I have no problem with. What I would like to do is give it its own domain, and start implementing feature requests that people send in. So that I don’t end up spending money on something that’s going to die off quickly, the deal is this: When it gets 20 active users, it gets a domain and some TLC. If it doesn’t make it to that point, it stays like it is.

    So if you’d like to help me make something of this site, please start using it, and show it to any of your Twitter-using friends who might need a little help getting healthy, keeping fit or any other goal that Daily Promise can help them with!