Tag: Writing

    NaNoGenMo: A 50,000 Word Target I can Meet

    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.

    One of the ways in which a number of my friends spend November is participating in National Novel Writing Month, or “NaNoWriMo”. This is its 15th year, in which some 300,000 amateur novelists signed up to write their hearts out over the course of 30 days.

    It’s ten years since I first came across the idea, and in all ten of those years I have professed myself too busy to dedicate that much time to churning out my sub-standard fiction.

    This year, though, I discovered a similar project I couldn’t help but have a go at—NaNoGenMo, National Novel Generation Month. The idea is simple—instead of spending November writing a novel, spend November writing a script that can write novels for you.

    A lot of NaNoWriMo novels are fanfiction of highly variable quality, so in homage to that, my NaNoGenMo script uses exactly that as its source material: specifically, a user-selected category or search on FanFiction.net. It will scrape the stories it finds for sentences, store them all locally, then set to work mashing them together in various gramatically-reasonable ways until the 50,000-word goal has been reached.

    Thumbnail of example NaNoGenMo output

    During the course of writing the script I tested it mostly with Doctor Who fanfiction, some of which is not particularly bad. But then I discovered that FanFiction.net has categories for cross-overs, where authors borrow characters from two of their favourite ‘universes’. These are generally, shall we say, less well written.

    So, if you’d like a glimpse into a world where Bayesian poisoning spammers hawk not Viagra but My Little Pony / Sonic the Hedgehog fanfiction written by 12-year-olds, look no further than the example output that my NaNoGenMo script generates.

    If you’re up for some more bizarre fiction written by haiku-spouting drunken Markov chains, check out the list of NaNoGenMo competitors, quite a few of whom seem to have taken my code to new and stranger heights!

    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!

    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: 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: 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: 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: 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.

    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