Here is a sub-500-word story that I wrote for the 4th PodCastle flash fiction contest that ran through July and August 2017, with the three winning stories aired on episode 499 of the podcast in December. Telling any story in less than 500 words is an interesting challenge, and what I ended up producing trades more in tone and tension than in plot or payoffs. It was received fairly well and made it into the semifinals, but there were many stories that were better-written, more interesting and much more deserving of the prize. A lot of fun was had in the process, anyhow, and I’m proud of this little story and myself for finally getting some fiction out into the world, however short it may be.
I’m hugely thankful to David Ferguson who provided feedback and editing on the story. Without his great input it would be utter rubbish.
I hope you enjoy it! Let me know what you think in the comments below or on Twitter.
They came into the cities like countless other wild creatures had before them. At first they were cautious, caught by humans only in brief glimpses when they darted through the glow beneath lampposts and windows. On the walk home a person might see a pair of reflective eyes watching from the bushes, cold and wary, before they disappeared in a blink. They were mostly silent, which helped them go unnoticed, and when one did make sounds it was easy to mistake its yowling for a cat’s or even a baby’s. They ran from adults but did not mind children. In fact when a child was alone they would observe it closely, curiously, almost as if trying to remember something.
As their numbers grew so did their confidence. They rummaged in bins and fouled on lawns. They stole food and trinkets through open windows. They were seen breaking into containers, smashing them with rocks or prying them open with sticks. They would peer in the windows of family homes, hiding the moment an adult turned to look. Sometimes a ground floor window would have a new crack in it in the morning. People would wonder.
Their nests became larger and easier to find. The media buzzed for a morning about the novelty of an abandoned nest found on the twenty-first floor of a construction site. Perhaps its inhabitants had lived off builders’ unfinished lunches, or the rich pickings that could be raided from the alleyways behind nearby restaurants. Footage surfaced online of one appearing to beckon to a toddler who was alone in a garden, and a clip showing a group catching pigeons went viral.
People got wiser about living in their presence. The popular advice went like so: don’t leave doors or easy-to-reach windows open, don’t encourage them by leaving food out, and put locks on bins. The less-given, less-taken advice was to nail a horseshoe above the door, but it sounded far too superstitious for most. Regardless of the precautions people took, they got smarter in response. It turned out they could open doors, teaching each other the technique. It was rumoured they could even pick locks.
In the countryside they had merely survived. In the city, they thrived. Newspapers and politicians began to talk about “pest control” as they went from curiosity, to nuisance, to threat.
It was near midsummer when a baby girl went missing from her ground-floor bedroom. At first it was a routine investigation, given little more than a paragraph buried near the middle of the national papers, but it quickly became clear something was different. Something the police were avoiding questions about.
One of my goals for 2018 is to ready 20 books. That’s about 2 books per month! So far I’m enjoying doing more reading, because over the last few years the amount of books I’ve managed to get through has really dropped off.
A book by Diane Coyle (who incidentally was on Planet Money’s The Indicator podcast this week). I read this towards the end of 2016 and finished it in January 2017, so I don’t remember the details very well, but I do remember finding it interesting. Being a book about the future of civilisation, it has its share of gloomy forecasts, but it has a positive message, too. We can, in fact, solve (or at least handle) these problems that face us in the 21st century: climate change, the financial meltdown cycles of capitalism, overcompetition for natural resources, economic inequality, the crisis in democracy…
There’s a lot of them. Diane’s presents some of her solutions as almost inevitable, sooner or later, and that the longer they are delayed the more damage will fill the gap until their implementation becomes unavoidable. Her main suggestions are, in brief and broadly:
Improve how progress and production is measured and statistically analysed. How are we to address any issues if we cannot fully understand their scale and their causes?
Encourage saving of money and discourage spending, in particular on high-carbon consumption. She advocates taxation on consumption. Promote investment in projects with long-term benefits, rather than short-term returns.
Austerity is okay if you convince the public that it’s for a good reason.Cuts in public expenditure are “inevitable” as is “reforming the provision of services”. Yeah, uh.
Reduce income inequality.
Experiment in how to re-engage disengaged citizens with public policy-making processes. With the Internet?
The Office for Budget Responsibility is a good thing, in principle, because it has “an explicit duty to take account of the long-term and future generations”.
Countries should just go ahead and address the issues of climate change as best they can, with or without international agreement. They certainly shouldn’t wait around for that to happen, anyway.
I don’t remember much about this. It comes from the right place, one of deep skepticism about the mores that bind us to the millstone, but it is not written well or accessibly. I found it a little masturbatory, to put it bluntly. And not in the good way.
Which made me sad. I would like to be able to recommend a book on this subject to people.
I enjoyed this! It’s about a guy who gets catapulted overnight from royal family reject to improvisational imperial majesty. The reader shares his POV as he navigates his way through the tumultuous waters of his first year of emperor-hood, dodging schemes and plots galore. The setting is kinda cool, with baroque, almost steampunky elements, and some excellent made-up names, like Varenechibel and Edonomee.
Take my review with a pinch of salt. I read the book on the flights to and from San Francisco, and I appreciated perhaps more than I would have otherwise because it allowed me to escape into a fantastical world in which people have leg room.
The story has progressive leanings, but I find myself agreeing with Lyta Gold’s opinion that
Novels like The Goblin Emperor are especially disappointing because they’ll go out of their way to include genuinely progressive elements – acknowledgement of inequality, protagonists of color, gay characters, heroines who persist – but consistently stop short of portraying anything resembling large-scale political or societal change.
Isn’t it great how much effort some factions put into undermining the ability of people to reach political consensus, or indeed any kind of agreement at all, by sowing distrust in scientific sources and demolishing the integrity of the journalistic profession? All so they can make more money?
Chuck Wendig continues his flawless streak as the writer of Miriam Black, hardcore detective extraordinaire who can see how you die. This is pure edge-of-your-seat excellence, like the preceding three novels in the series. Not much more to say about it than that. It’s just good.
It took me a long time to get around to reading this one because it felt like finally saying goodbye to an author whose books played a massive part in raising me from childhood to young adulthood, laughing, crying and thinking all the way. He’ll never really be gone, though. Not while his characters are still taking readers like me on adventures they’ll never forget.
A horror story. I am not referring to the novel, but to the following sentence: I read a Warhammer novel. My first. And the really scary part? It’s not my last.
Richard Murphy on what exactly tax is, and how it’s an indispensible tool for shaping the economy and addressing social ills like economic inequality and excessive carbon consumption. We should all care about it a lot more, and put to flight the school of thought that says that tax is inherently evil. He proposes a lot of ways to improve the United Kingdom’s tax system, as well as providing some useful lessons on how money works.
More economics. A guided tour of how badly messed up the market for land in the United Kingdom and a number of other Western economies is, and how it messes up other areas of those economies. The book is in agreement with The Joy of Tax about a number of things, like how bad council tax is, and how we should probably tax land ownership. I found it quite interesting, but a little dry and technical in places, like its title. I might re-read it to see if I understand some more of it.
On December 11th I gave a talk at C++ Edinburgh about my hobby project game engine, Quiver. I was barely prepared and kind of blundered my way through it, but the audience seemed to enjoy themselves, and I certainly had fun. Somehow I ran to over 30 minutes, when I thought I had only been going for 10. Time flies! The recording is below.
I made the presentation slides using React.js because I wanted to try using something that’s not PowerPoint or Google Slides. It worked, but there’s something odd about needing to run a web server in order to present some slides.
How many times have you tried to call a function that alleges to return a time value only to realise you don’t know what units the value is in? Or that takes a time value as a parameter, but doesn’t specify whether the value is expected to be in milliseconds, seconds, or hours?
// What is it? I guess milliseconds? Could be microseconds!intGetGameTime();// deltaTime is probably in seconds?voidTakeStep(constfloatdeltaTime);
Hopefully there are comments somewhere near the declaration of the function that can help straighten things out, but you may not be so lucky. You may have to read through lines and lines of code to see how these functions are used before you understand what units they use.
APIs like this are hard to understand at a glance and can cause a lot of bother. Consider the potential cost of a bug that occurs when an API expects milliseconds, but is passed seconds. Here’s a slide from Bjarne Stroustrup’s CppCon 2017 keynote:
…in which he pointed out that the failure of the Mars Climate Orbiter was due to a software bug that would have been completely avoidable had a particular API encoded the units of measurement it used (in this case, imperial instead of metric).
UPDATE: STL pointed out in a Reddit comment that Stroustrup’s slide is wrong! But the sentiment is correct, anyway.
And so we have strongly-typed time values like C#’s System.TimeSpan provides. In the world of C++, many libraries and frameworks have their own time type. For example, SFML has sf::Time and sf::Clock. sf::Clock::getElapsedTime returns a sf::Time, which can be compared to, added to and subtracted from other instances of sf::Time. Then it can provide its value as seconds (float), milliseconds (int32) or microseconds (int64).
Until C++11, the language didn’t have a standard way to represent times. Then chrono was added to the standard library.
chrono exists at a higher level of abstraction than sf::Time/sf::Clock. The library consists of three concepts: clocks, time points and durations.
Clocks
Clocks are time providers, consisting of a starting point (“epoch”) and a tick rate. A clock has a now() member function that returns how much time has passed since the starting point. The standard library provides three clocks for your basic out-the-box time-getting functionality, the main one being system_clock. If you need to, you can create your own class or bundle that satisfies the Clock concept.
Time Points
time_point represents how much time has passed since the start of the clock it is defined in terms of. For example, a time_point<system_clock> would record how long since the system_clock started. You’d initialise it like so:
time_point<system_clock>t=system_clock::now();
You won’t be able to initialise it with the now() of a different clock because its time_point type isn’t convertible to that of the original clock.
(Note: because high_resolution_clock may be an alias to system_clock, it may be possible to convert between their time_point types. Don’t count on it, because your code may not be portable if you do.)
At runtime a time_point is a simple arithmetic type like an int or a float, and it can be added to and subtracted from other time_point instances, as long as they all come from the same clock.
Durations
A duration is, like a time_point, just a puffed-up arithmetic type. Unlike time_point, it’s not coupled to a specific clock type at compile time.
Along with its runtime value the duration contains a compile-time ratio specifying the units of time that value represents. A ratio of 1:1000 means milliseconds, a ratio of 1:1,000,000 means microseconds. The default ratio is 1:1 – that is, the default units for durations is seconds. The standard library defines some ratios for us in the <ratio>header.
You declare and set durations like so:
(duration::count returns the value of the underlying arithmetic type.)
// integral representation of 10 millisecondsstd::chrono::duration<int,std::milli>d(10);// d.count() == 10d=std::chrono::milliseconds(5);// d.count() == 5d=std::chrono::seconds(10);// d.count() == 10,000
Casting from seconds to milliseconds can happen implicitly, but in other cases it is necessary to use duration_cast.
User-defined Literals
These are wonderful little things of which chrono provides a handful. The s literal, for example, turns its operand into a duration<unsigned long long> or duration<long double>.
usingnamespacestd::chrono_literals;// integral rep of 1 secondstd::chrono::duration<int>t1=1s;// floating-point rep of 1 secondstd::chrono::duration<float>t2=1s;// floating-point rep of a fraction of a secondstd::chrono::duration<float>t2=1ms;
Conclusion
Finally, here is the API from the beginning of this article, rewritten to use chrono:
For one thing, I settled into my job. I have a long way to go and so much more to learn, but I feel like I’m in the swing of things now. I still find it amazing that people are willing to pay me to write code for games, surrounded by awesome people in a lovely office. I’m very excited about what I’ll get to work on in 2018.
In February I visited San Francisco to attend Game Developers Conference (GDC), an amazing opportunity to rub shoulders with people from all across the industry. I wouldn’t have gone if Connor hadn’t invited me along with him, so I’m very thankful to him for that. You can read all about my GDC experience here and my time in San Francisco here.
In the summer I took a few days off work to attend two short courses at Edinburgh University. The first was “Scottish Politics in Context”, which was a whirlwind tour of Scottish politics from the early modern period to the recent upheavals. The second was “Introduction to Solar Power”, a one-day course that explained the many ways we can use solar power, from heating water to the various kinds of photovoltaic cells. We also got to make our own PV cells using blackberry juice as a dye, which I didn’t know was even possible. I’d recommend both courses. I’m definitely going to do some more short courses this year coming.
In October me and Natalie went on holiday to the South of France, my first actual holiday out of the country for years. It was excellent.
My Mum moved house, so I had to say goodbye to the house I grew up in. I felt sad, but the process made me realise that I’ve well and truly moved out – her house hadn’t felt like my home for several years. Her new place is great, anyway, so it’s all worthwhile. (It also made me think about the Edinburgh housing market (Holy shit! (What the fuck?)))
In the latter half of the year I reached out and became an attendee of C++ Edinburgh, the local C++ usergroup. Everyone who attends is nice, works on cool stuff and has a lot of knowledge to share. In December I gave a short presentation at the meetup about my game engine, Quiver, which was quite good fun. I hope I can fit in some other meetups in 2018.
Speaking of Quiver, that project chugged along a fair bit, although I struggled to commit enough time to it. I finally came up with a good name, so it’s no longer just “the Quarrel engine”, and I made it open-source. You can check it out on GitHub. I look forward to continuing to tinker with it next year – there’s a lot of work to do! Maybe I’ll actually make Quarrel into a playable game! (Ha ha!)
In short, my 2017 was a blast. Just about everything that could have gone well went well. I have a lot to be thankful for. I live in a lovely flat with a lovely flatmate, I have excellent friends and a wonderful girlfriend, I love my job and it seems to like me. I know that 2018’s going to be a tough one (both professionally and personally), so I’m glad I get to begin it on the best possible footing.
Thanks for reading. I hope your 2018 is productive and peaceful.