Technology

Animating background images with CSS using @property and circular motion

I have been making some website demos for the purpose of people seeing them and becoming willing to pay me to do that sort of thing. You can see them at http://rainbowunicornkitten.com (I just bought the domain because I thought I’d be able to make something for it).

If you take a look at http://rainbowunicornkitten.com#red-square you’ll see a whole lot of animated images flying about, essentially assembling themselves into one image, with some continuous orbiting of parts of the image. This post is about how I did this, since it involves a bit of advanced css using @property and achieving circular motion of background images without using transform: rotate() or moving elements at all, just their background images, of which I am particularly proud!

Why does this matter?

  1. Background images are how you (should) create decoration in web pages. And not creating html elements purely for decorative purposes is how we’d all like to do it all the time, though it is not always possible.
  2. If we create new elements for each image and then use position: absolute to stack them on top of each other we then have to manage all the elements’ sizes and positions, as well as dealing with the animations themselves. Just using background images in a single element seems clearer and cleaner (and potentially easier).
  3. Once you start moving elements around the page you can quickly run into overflow and scrollbar problems and, on mobile, unwanted space appearing below your content. I really wanted to avoid this, having tried it the positioned way first.

And it should be possible, since we can set multiple background-images on a single element that stack nicely on top of each other, and we can set each image’s position using the background-position property with a list (although AFAICT the background-position-x and background-position-y properties do not take multiple values?)

I started with an image that I carved up into layers using GIMP. All of the images are the same size, not each sized to their content. This makes life a whole lot easier, since my starting point is a well organised set of images each in their final position in the overall effect; I don’t have to shift each image about to get it to where it should be.

BTW this links with a rule that I have derived (which may be how you get taught to do animations, I don’t know). This rule is: before animating anything design your page to be in its final state. I.e. your base or resting state is where you would like things to finally end up, not where you want to start from. You then animate backwards, moving things away from this state to their beginning state at the start of the animation. This means that if nothing animates at least elements are where you would want them to be and it just seems to work better. It’s like pulling back a wrecking ball from next to the wall you want to demolish rather than trying to fire an arrow through a moving gap to hit something behind.

Using @property to animate backgrounds individually

One of the problems of animating background by, for example, animating the background-position property, is that up until recently there has been no way to animate the background position of each image individually. If you put background-position in a keyframe you have to include the background positions of all the images in the background each time, otherwise they would be overridden. This means that if you want to animate multiple background images in the same selector you could only do so using one set of keyframes: hard with two, impossible with the eight images I wanted to separately animate.

What you can and always could do since the arrival of custom properties is use those in place of the individual properties on the background position, so:

background-position: 20px 20px, 50vw 70vh;

becomes

background-position: var(--image1-x) var(--image1-y), var(--image2-x) var(--image2-y)

and then use those custom properties in an @keyframes animation. However this has very disappointing results:

A flip flopping animation of custom properties in css

Basically the values just flip flop between the values specified in the keyframes. There is no interpolation, i.e. no animation.

What can we do about this? The answer is @property . Currently not supported in Firefox, but available in 88% of all browsers according to canisuse.com the @property rule gives the browser the information it needs to be able to actually animate, or interpolate, custom variable values. It looks like this:

        @property --image2-x {
syntax: "<length-percentage>";
inherits: false;
initial-value: 0%;
}

Simply by adding these declarations into our css, browsers (except Firefox) are able to work out what the intermediate values should be and we get animation.

Actual animation of custom properties gives smooth animation, rather than flip flopping between values

Noice!

So now I can have an element with multiple background images with just one background-position declaration but each with their positions individually animated using their own keyframe. In fact I can separately animate each axis of each image’s position, which is about to be important. The Power!

Circular animation of background images

What I really wanted to do though was have some of the image animations in my background run forever in a circular motion, while others just ran once. What we did above using custom properties means we can easily have different animations, each with their own iteration count and timing function, affecting different elements of the background-position.

But how do we get circular animation? Surely it is possible isn’t it? If you’re animating elements, rather than backgrounds, you can use the transform: rotate() function to achieve circular animation: see this Stack Overflow answer which is awesome and cool, but no good to us since we can’t rotate background images separate from their containing elements.

I fell into a reverie. I even lay down on my bed. My mind filled with graphs of circles and x & y axes. I even gingerly approached a dilapidated and hazardously decrepit hut in my mind labeled “Mathematics”. Did I dare to enter? What horrors lay within? Could I, in fact, craft a background-position declaration that used calc() to generate x & y coordinates for a circle from linearly varying custom properties? I shivered.

Luckily I never had to find out. It was that “linearly varying” phrase from the last statement that eventually led to an answer that involves no even remotely non trivial arithmetic.

This is what I was picturing while I thought about making circular animations.

The above is a diagram of my brain, or at least what was in it. I was trying to think how to calculate this myself. I realised that when the x axis was changing fast, the y axis was changing slowly and vice versa. And then something else dawned on me: isn’t the rate of change of values what the timing functions control in animations? So I started to think that I could animate the x and y and that timing functions might help make it circular.

This was something like my first attempt. As you can see, there is some sort of repeating animation that goes around 4 points “circularly” but it definitely isn’t a circular animation. It is a diamond shape: 4 diagonal animations together.

First what it needed was to be 2 distinct animations (nearly there, I promise). But this isn’t it either

Another failed attempt at a circular animation. This time back to a single straight line diagonal animation

Then I knew that I just needed to vary x and y along a straight line with easing applied so that when x was moving fast, y was slow and vice versa. I changed easing functions and messed with stuff, but it didn’t help. And then this technique came back to me: Starting animations mid way. And this is what I needed, as a way to run 2 animation together, but out of step with each other.

Circular (actually elliptical) background animation, just using ease-in-out timing function

Lo and behold, circular animation! Believe me, I was very surprised that it had worked. In my experience life is made up of a lot of “great” ideas that don’t in the end work out. This is an exception.

The code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>anim</title>
<style>
html,
body,
div {
  width: 100%;
  height: 100%;
}

div {
  background-image: radial-gradient(
      circle at center,
      blue 5svw,
      transparent 5svw
    ),
    radial-gradient(circle at center, yellow 20svw, transparent 20svw);
  background-color: black;
  --image2-x: 0vw;
  --image2-y: 0vh;
  background-position: var(--image1-x) var(--image1-y),
    var(--image2-x) var(--image2-y);
  animation-name: orbit-x, orbit-y;
  animation-duration: 2s;
  animation-delay: 0s, 1s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-timing-function: ease-in-out;
}
@property --image1-x {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0%;
}

@property --image1-y {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0;
}

@property --image2-x {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0%;
}

@property --image2-y {
  syntax: "<length-percentage>";
  inherits: false;
  initial-value: 0;
}

@keyframes orbit-x {
  0% {
    --image1-x: -20vw;
  }
  100% {
    --image1-x: 20vw;
  }
}

@keyframes orbit-y {
  0% {
    --image1-y: -20vh;
  }
  100% {
    --image1-y: 20vh;
  }
}
</style>
</head>
<body>
<div></div>
</body>
</html>

Conclusion

So that’s how I used @property to animate multiple background images on the same selector in pure css and then to create circular animations for background images. I used the background-position property to animate backgrounds and exploited the ease-in-out timing function to make animation follow a circular path, an alternative to using transform: rotate() for any circular animation in css.

And this is the thing I eventually made using this technique: https://rainbowunicornkitten.com/#red-square

I hope this has been an enjoyable and useful read. If you want someone to do something like this for your website, please get in touch!

References:

Disney’s 12 principles of animation, exemplified in UX design

How to do circular animations using transform: rotate()

Starting animations mid way using negative delay.

The @property rule on canisuse.com

Standard
Fiction, SciFi

Dead Client Protocol

Short story – June 2020 – SciFi with sex and violence

Like a clock made of rusted parts being forced through its motions complainingly, Alison started the day in the dull, bright, grey dawn. Existing in the bathroom in front of the mirror, the morning boomed in her ears and scalded her eyes and she saw her aged, hollow face unblinking in front of her. She piled on moisturizer and makeup and brushed her fraying hair. Her suit rested on her shoulders like an exhausted bird and, almost insensitive, she walked out the door and went to work.

This day was the latest in a horror anthology where every story was the same as the last, as bleak, as unrelenting, as confused as bleak, as bleak, as bleak. As unrelenting and motherfucking BLEAK. Each day started like a blow to the face with a crowbar and a sickening, winding, punch in the gut. Simultaneously an incomprehensible blur of nightmare would be sucked out of her mind, leaving orphan images and utterly nauseating feelings of torture, of degradation, of humiliation. Alison had been thin and pretty, now she was skeletal and hagridden. Grey almost to the point of translucence, people were worried. People had spoken to her and said she could call them, anytime. People had suggested she see a doctor, and she had. And the doctor had been concerned and supportive and clueless and impotent. She took pills now. Nothing else had changed.

Permanent premises for unspecified leisure activities were not as easy to find as a depressed economy should have made them. Blunt persistence and belligerent negotiation had landed a room in the basement of a flexible use space with good connections and poor management oversight. It always took time and some shuttling to get five grown men and their equipment in place for their few hours of recreation. First were the laptops and cables, then the masks and instruments, and finally the cyberframe. Then a good hour of assembly before being ready to start. The men had to take it in turns to run the subject through their treatments. It could be hard physical work, and none of them could keep it up for the 4 hours each night. Sometimes they executed complicated procedures requiring more than one operator, but they planned these in advance.

The cyberframe is an all purpose electromechanical body. At base, an unprogrammed construction robot. At most sophisticated, a full substitute body with sensorium and movement for a remote human mind. It was this that the boys in the basement of the unused car repair shop were using it for. 

Virtually the first thing a male will do with any new technology is find a way to use it for pornography or sexual self pleasure. Malekind had always slavered at the thought of lifelike gynoid robots which could be purchased, altered and commanded as the owner saw fit. So when this became a possibility there was a giant industry for it, actually responsible for a great many of the technical advances which made ultra realistic cyberbodies, and all the beneficial uses to which they could be put, possible. However, a willing machine is still just a willing machine. The fantasy of masculine power, domination and destruction projected onto a sophisticated dummy is still just a fantasy. Sophisticated pornography, not a substitute for it.

And so the boys in the abandoned car repair basement said “yes, a fake body which we can mutilate and abuse and torture is what we need, but the mind inside must be unwilling”. And a synthesis of advanced human machine interfacing and tech for dream therapy finished the job. Take the mind of a sleeping woman and put it into the weakened body of a cyberframe capable of full sensory and motor integration but not of fighting back or breaking any of the bonds that held it. And do whatever you want to it for a few hours then put her back in her own body, with only nightmare recollections and exhaustion but no evidence, not even any knowledge of what was actually happening. And do it again and again and again. 

The basement boys spotted Alison out on the street. She looked strong, she looked happy and she didn’t look at them. She wasn’t the only one they checked out, but they managed to get into her apartment to fit the dream catcher device under her bed. Then it was all done for her. When their hardons got started her life became horror. And never did they consider stopping. The mercilessness was part of the appeal.

To end it all would require more effort than Alison was capable of mobilising. She sat on the mattress and ran through her daily sobbing before bed. It was more like a drainage procedure than an emotional outburst. The salty fluid flowed out of her eyes for five or ten minutes, her face underneath it unmoving, before she lay down. She didn’t think about how much she wanted to feel different nor how welcome death would be. Those times were long gone. She lay down. She slept.

The cellar club assembled as they normally did. One by one, always plenty of space between each new arrival, they aggregated. Then two of them went to fetch the cyberframe. It arrived in pieces that had to be assembled; otherwise it would look too much like carrying a dead body. Each of the five: the dog, the pig, the cow, the sheep and the lizard masked, set about securing limbs, plugging in computers and power or just waiting for things to be ready. The pig one, who actually knew how this worked technically, poked at a keyboard, setting up restrictions on the frame’s strength and unconscious reflexes so that it would never be able to free itself or stop itself being damaged. And heightened and tuned the sensorium so that it was nightmarish and excruciating. He was proud of the mod which projected the faces of the victim’s family onto the animal masks of her tormentors.

There in the room, as always she now remembered, stood her mother, her father, her sister, uncle and grandfather. She was cable tied to the metal frame bed with the wooden panel underneath. She made limp dream-like struggles and tried to turn her head and curl up, as a rodent squeal wriggled from her lips. Like always in dreams, she could remember all her previous experiences in this place, which all jumped up and down in her. She felt the gravel-like pain in all her body as it did what it could to integrate multiple physical horrors into a single experience. It became staccato, alternating hot and cold, adding an extra strobe-like horror to the relentless tide of memory. Each memory came with it’s own “no!”, as these ran together. The mask wearing apes surrounding the cyberframe set to work.

As the dog, the pig, the cow, the sheep and the lizard did their terrible things and snarled their terrible snarlings, each atrocity added to the howl within Alison, that apocalyptic No. And her biological body, already friable from months of nighttime abuse, throbbed with heartbeats and almost twanged with tension. The final goblin, the lizard mask wearing one, the leader, turned around; held in his hand: a rusty short knife with a bleached handle. This sight brought back to Alison’s mind all the worst of the intimate slashings and electronically enhanced agonies that had been done to her. As her mind spun like a water wheel in a stream of horror, her organic body thumped harder than ever to supply it with energy to spin and more adrenaline to fight. And as it did so it started to throw out a beat and then another and soon contracted without relaxing; an unmoving motor.

The Pig’s window went dark and a “Reconnect” dialog appeared. The cyberframe was unmoving, frozen in expression and pose: mouth open, brow twisted, limbs straining at cable ties. A moment, then every joint and muscle slowly but inhumanly rotated to its default state. The cyberframe rested in a serene pose of lying in state, with its arms by its side. The Pig’s mouth was open and he tapped the key to reconnect over and over, but the dialog just reappeared after saying “Failed”. Then the breathing started.

A cyberframe used for human remoting has a few unsuppressable safety features. The close link between the frame and the human means that to some extent while the frame is operating in this mode the human is in the machine as well as in their own body. The two bodies, or their “brains”, form a single machine in a single state. Highly entangled maybe, at least as far as working out which bit is in charge. When a person gives up remoting a frame, it takes a while to disconnect the two and put the person wholly back in the body. There is no time for this if the person unexpectedly dies. So frames implement a mandated protocol when this happens. They become wholly controlled by the remnants of the remoter’s mind and, apart from the part with the human still in it, reboot, resetting every parameter to defaults and handing all control to the dead person within. This won’t last for long, a frame isn’t capable of maintaining a full human mind for much more than 15 minutes, but for the last 15 minutes of that human’s “life” the frame is totally under their control.

Frames with dead people inside start breathing because the usual suppression of unnecessary behaviour has been wiped. A frame breathes not because it needs to, but because the interface between the person and the frame has become unmediated and direct. The Pig said “Fuck”, because the Pig knew what the Lizard, Dog, Sheep and Cow did not. The cyberframe now had no inhibitions of its self-preservation reflexes, and no weakened motor functions. The sensorium it relayed to the mind inside was clear and unmodified, and pain was optional. The Lizard did the worst thing possible in this situation if it wanted to remain in charge. It went to jab its knife between the legs of the now breathing frame. Reflexes are those motor functions that occur without requiring conscious direction. Frames have them so that things like construction accidents can easily be avoided. Nothing was more a self preservation call for this cleanly booted frame than to break the cable tie securing its right leg and block the jab for its simulated genitals. But the mind inside was very surprised indeed. It now saw the place it was in easily and clearly. There were no nightmarish decorations or demonic wailing. The faces on the individuals in the room were now obviously wearing animal masks, not the faces of her family. She could smell their sweat and even hear their heartbeats. But not her own. The emotional lemon juice which had misted her vision and made her eyes hurt had gone. Her mind was very clear, and now her body appeared to be hers. Though definitely not hers. She moved her right arm and the cable tie holding it snapped more easily than cotton. She snapped the others and stood up on the wooden panel.

The Lizard said: what the fuck is happening? The Pig answered: she fucking died! All the settings were reset. It’s the dead client protocol. – Shit, how long ‘til it stops? – About 15 minutes.  

She’d heard it. It was clear as day. Without needing further explanation, she knew she had been kidnapped in her sleep by these mask wearing vermin and placed in this body for torturing for their pleasure. Now she (her organic body) had died and she had 15 minutes left to live in this machine body. She felt cold in a way she enjoyed. Straightforwardness seemed to be something that came from the body. What was she going to spend the last 15 minutes of existence doing? The Lizard and her new body made up her mind for her. He went for the door and the body just jumped in one hop in front of it, blocking his exit. He tried to shove her out of the way, but the body again just slammed him against the wall without any effort. Her emotions were heating up. This new body was cool, but the mind definitely was not. Unlike being awake before, now all the memories of her abuse had stayed with her. Just a small taste of control had ignited an ecstatic anger, an outlet for all that “No”. Fifteen minutes would have to be enough.

Standard
Technology

The problem with self driving cars is people

Yesterday I read a couple of articles that lent themselves to the “self-driving cars will never work” narrative. Here It will soon be easy for self-driving cars to hide in plain sight. We shouldn’t let them. and here The problem with self-driving cars And, to be fair, I don’t know for sure whether self-driving cars will ever “work”. I know that I want them to though.

Both the above articles have different takes on the “the nerds have closed minds and got it all wrong, typical!” story. I am on the side of the nerds so I think this is unfair. I know self driving cars haven’t suddenly appeared overnight in full level 5 autonomy but a lot of it has been achieved, and I fully expect them to get better soon. Also, both the articles have got stuff right, as far as they go, but they just don’t go far enough.

In the first, Jack Stilgoe refers to his own research at University College London which essentially indicates that the general public want self-driving cars to be distinguishable from those driven by people. He then goes on to explain why he thinks this is a good thing, as well as some reasons it might not be. “To better understand and manage the deployment of autonomous cars, we need to dispel the myth that computers will drive just like humans, but better… Humans drive in conversation with others.” I think this is true, but I don’t think this will be any less true of automated vehicles, or if it is, the problem will be with the people side of the dialogue.

Take the conversation metaphor. It has about it the air of non deterministic magic: “ooo but it’s a conversation, computers can’t do it”. I would say that any well designed interface is just as much a conversation. A bad interface doesn’t listen, a good one does. Also, have you ever heard humans having a conversation? There’s a lot more talking going on than listening. And so it is with the driving conversation. Human drivers are out there shouting their shit all over the place, while the only reason other drivers and non car humans pay any attention at all is the fear of death.

Since I started my computing career I have thought of Heideggerian epistemology as a great model describing how we do and should implement computer systems. For me it’s something like “do, fail, fix repeat”. Yes, it’s trial and error, but with the added oomph of epistemology. We learn only when something doesn’t work. And if we want to truly understand something (such as how driving works) make an attempt to do something with it. So I see people trying to develop autonomous vehicles being in a great project of understanding, probably far more than academics who aren’t.

However I do think this driving conversation presents a problem for self-driving cars. Self driving cars will be too predictable and too conservative and this fact will be abused by other road users. In a conversation they will be like the person who always says “sorry, yes, go ahead” or “what do you think?”. In conversation humans don’t do this enough, and in road use it is the same.

It is generally accepted that for autonomous vehicles to be allowed on the roads, they will have to be much safer than human drivers. Can you imagine if of the approx. 1.5 thousand deaths annually in the UK even a tiny percentage were caused by an autonomous vehicle malfunction? Any model that failed to stop when a person stepped out in front of it would be immediately suspended en masse from all roads until fixed. Human drivers just aren’t that good. How many times have you seen drivers pull out in junctions causing other traffic to slow down or halt? How often waiting at a zebra crossing do 2, 3 or more cars just happily cruise past as you stand there, even if you’re standing on the road? Correctly functioning autonomous vehicles simply won’t do that. And like the xenomorph from Alien, we will learn to exploit that. How long before we stop looking for signs that drivers at zebra crossings have seen us, by making eye contact or whatever the autonomous equivalent would be (I suggest forward braking lights, or replacing the windscreen with a computer screen displaying feedback to people outside), and just blithely step out into traffic, confident that we won’t be hit? It’ll be a matter of judging whether a car can stop in time, rather than whether it will. How many times have you yourself, when stuck at a junction for a short time because of continuous traffic in your path, impatiently decided to pull out halfway across the road, forcing drivers to stop so that you can force your way out? Driverless cars will never pull out, and they will always stop. What stops humans from pulling out unsafely more often is fear of being caught out by other drivers’ inattention and getting hit, or of pissing off drivers so that we get the punishment of the horn and verbal or gestural abuse or even road rage. How many autonomous vehicle manufacturers are researching the vital safety feature of calling other drivers a twat or chasing them down to attack them?

It won’t be so much that we need to know which vehicles are autonomous so that we can act safely around them as knowing which vehicles are being driven by humans so we don’t assume competence. It is also possible that the whole self driving scheme will be made unworkable by humans abusing the machines’ predictable good nature. One way to prevent this is to make sure that all autonomous vehicles are compelled to report other road users, both driven and pedestrian, for infractions, that always incur a penalty. Also I wonder to what extent self driving cars know how to behave with other self-driving cars? Will they get themselves into a farce of English people trying to get in a doorway: “After you. No after you, I insists. Whoops. Oh dear!”?

Slater Victoroff’s point of view is a little harder to pin down. He says that every prediction about self-driving cars has been proven wrong. There may have been many and repeated bad estimates of when self driving will be available, but that doesn’t prove it never will. For many years AI itself went through the same cycle – it’s just 10 years away. However things have really changed during the current century, look at computer vision.

He says that humans crave control and that the idea that people become more comfortable with giving it up as time passes is false. That depends on what you mean by control. I don’t get on a train hoping to drive it. I have no control over it. But only it hurts is when it becomes unpredictable, e.g. when there are unexplained delays, not just not controlled by me. “Since the early days, the problem with self-driving cars has been obvious: there’s no control.” I’m just not sure that is true. It seems that I’d love to give up control, but don’t see any great benefit to partial solutions. I really have no desire to have to pay attention to a car this is driving itself. Or to have to drive the car myself when it is not on the motorway. I am very excited by the idea of getting in a car outside my house, sit in the back right to the door of my destination, scrolling my phone all the way.

He does have a point though that about the journey to get there. “We have to stop thinking about self-driving cars as fully autonomous. When level 5 autonomy is always right around the corner, there’s no need to think about all the messy intermediate states.” There’s a principle in evolutionary biology that goes something like: for a trait to evolve through natural selection, all the intermediate states between the starting and the final trait must also be advantageous. A giraffe’s long neck didn’t come about from a camel’s in one step. The varying neck lengths between the two had each to be selectable. I think the point about technology is something similar. We need to bridge the gap, and we need to invent each intermediate state individually with its own benefits.

Victoroff says technology is not the bottleneck, and perhaps right now he is right. “And the barrier isn’t machine learning. It’s user experience.” I think this is an excellent point, to go along with Stilgoe’s that creating something that we call self-driving cars won’t just be like people-driving cars, but better. It will be something completely new.

Standard
Uncategorized

World Suicide Prevention Day

Today, the 10th of September, is World Suicide Prevention Day. This is a short passage on my own experiences and thoughts about suicide. It does not contain any graphic content nor traumatic life events. It just hasn’t been like that.

I find it very hard to remember things precisely and so have something more like beliefs about the past than hard and fast memories. And I know these beliefs could be wrong, but they are all I have to go on.

When I was in my first school, anywhere between 4 and 7 years old, there was a teacher who was very strict and I was afraid of. One of the ways I reacted was never to ask to go to the toilet in her class, so I would poo in my underwear and carry it around until I got home. Another way, as I remember it, is that I would sit on the windowsill in my room and think about jumping out the 1st floor window, whether I would die and probably how others would react. I never did, but have been more or less obsessed with suicide ever since. There were times when it was an active thought, involving ever evolving plans which would occur many times an hour. At other times it has been more a background part of my mental landscape. This is what is called “suicidal ideation”, I think. These plans were fantasies rather than specific intentions and certainly when I was younger I think a lot of them involved fantasies about how my death would affect other people. This might reasonably be called self pity, but I want it to be heard without its pejorative connotations. I needed soothing and did so with fantasies about how sad other people would be if I killed myself; I don’t blame my younger self for finding that.

Even without self pity, thoughts about suicide became my happy place. Whenever I needed mentally soothing that’s what I would think about, really fantasize about. This continued until the last few years when I have started to observe my habits of thought and repeating emotional experiences with a more keen and objective eye. Even though the suicide as soother still happens in my mind, I now observe it and consider that it is probably not the greatest strategy I could have and think about it more than think it.

There have been other times when the noose of mental anguish has been tighter and in those times the fantasies have become less fantastical and more practical. I have considered more readily available means, and the consequences of these. I have imagined how my suicide might affect my family and wished to find ways to reduce this. I know the effect of a family suicide can have consequences for children and have never found this an acceptable price for my nieces and nephews to pay, and have resented them for it. I have thought about how much longer I can go on without acting. I have never made preparations or specific plans. It is my belief that if I ever attempt suicide I would be successful; I would not leave anything to chance or badly executed. I guess the unexpected could happen even then.

A long time ago I started to assume that I would eventually die by my own hand. I don’t inherently think this is a bad thought. It is part of my wish for control maybe. Even a happy life might be ended by choice during the last stretch, if it is painful or ugly, and I don’t consider this sad or regrettable. But an early death motivated by unbearable psychic anguish is sad if the pain could have been relieved enough to remove the motivation. And a life run through with suicidal ideation as a coping mechanism might be improved enough to make the strategy unnecessary or unhelpful, and by changing its use.

These days I fantasize about my own death and suicide much less and acknowledge how these thoughts have comforted me, but also tied me to suicide as a coping mechanism per se. I seek to accept myself everyday exactly as I am – which isn’t easy. My expectations are astronomical; they must be tamed and I must seek joy in what is. As a result of these changes I have sometimes felt contentment and serenity I could not have predicted, but everything passes and so sometimes depression moves in. I see it much more as an unwelcome occupier these days, like an infection or poisoning rather than an aspect of my identity, that can also direct my thoughts to places that will prolong and worsen my suffering. I try to catch these and say “I saw that Depression. I’m gonna think about my fantasy ice cream combinations instead.” It sounds trivial but such a diversion can save me from an unending meditation on “I’m useless and should be dead”. Perhaps I should also be grateful that this is available to me, since I doubt it is to everyone who suffers.

I want to help prevent suicide in that I want to prevent the conditions that compel people to do it, and to prevent the suffering that others experience because of it. I think a good start is for people to talk openly and honestly, with someone who will be non judgmental, about their feelings and thoughts including suicidal ones.

The Samaritans (UK and Ireland) offers emotional support, including talking about suicide, by phone on 116 123 and email jo@samartians.org. Have a happy day if you can, and if you cannot, my heartfelt hopes for your future.

Standard
Uncategorized

How to Write Comedy – A Beginner’s Perspective

  1. Start your computer, pen or whatever
  2. Open a document, turn a page… you get the idea
  3. You don’t get an idea. Work on it. Think.
  4. Think harder.
  5. Get up and make a cup of tea.
  6. Brood.
  7. Fantasise about being successful.
  8. It is now night – any good creative needs rest so it is your duty to recharge with Netflix before bed at 2.am

Failure let’s start again.

How to start to write

Write what’s already in your head. Don’t wait for it to get better, it probably won’t. But if you write it down you can later remove the bad bits and expand the good bits. Like this, this was just what was lying around in my head. Also writing stuff down manages to clear your mind leaving room for new stuff to come. Let fantasising become work, all you have to do is write your fantasy down. Suddenly you’re ultra productive even when sitting on the loo.

Ok, what else?

I wrote down “Comedy is recreational philosophy”, so let’s see what I can do with that. Why is it philosophy? Cos comedy investigates the everyday with new insight making the ordinary outrageous. I just went to the toilet. How come we have all this equipement to get stuff that has literally been so close to me it was inside me as far away as possible as soon as possible? It couldn’t be any closer to me and now, if I so much as see it never mind any suggestion that I might touch it, I’m disgusted.

Something a bit more elevated maybe. What is a philosophical subject? The nature of reality. Now this is true, but the problem here is that it sounds like it should be the best comedy subject ever since it’s what comedy is in the business of, questioning reality. With high expectations like that it’s likely to be a complete let down. Like sex on a bed of nails with a blow up doll.

One more go: is there such a thing as free will? I doubt it. Or do I? No, I really do. The only alternative to something that is wholly caused is for it to be wholly or partly arbitrary. Which is not free will, it’s just randomness. The idea of free will itself relies on the concept of causation and determinism. Free will is the idea that choices are made as the result of something inherently us. This inherency is part of the chain of causation, not pure randomness. To be us requires us to be just must and not what – ever, which is just randomness rather than a conscious provider of motivational power. 

Standard
Uncategorized

Apocalypse One

Or How I Learned to Stop Worrying and Love the Lockdown

Let me tell you the story of Apocalypse One. It was a time of death; a time of applause on the streets; a time of toilet paper; a time of having too many vegetables in the fridge and not enough will to eat them; a time of panic buying 48 raw chicken wings. It was, as all times are, a different time. Let me tell you how it all began.

When Wuhan in China started appearing in the news with reports of a new infectious disease most of us (me) thought “ah SARS again”. I didn’t immediately think “well this is the big one”. This disease appearing in other countries didn’t immediately do it either – SARS made it to Canada after all. When Italy started to suffer and other countries appeared to have it, slowly it got more serious. I didn’t even then think “we should close all schools” or “lockdown lockdown”. But I was wrong. The sooner we had acted with stricter measures the better it would have been.

Why am I calling it Apocalypse One? If it isn’t the end of the world, then it isn’t the (an) apocalypse, is it? Well etymologically the word suggests revelation rather than specifically the end of anything. It’s just that the bible wedged those two things in together in the last book, so we think of the Apocalypse as the end of the world, which, in the book of Revelation, it is. But also we have been writing and filming apocalypses of all types for a long time, and more than that: post-apocalypses. So the idea that the apocalypse isn’t really the end is something we’re familiar with. Especially since Apocalypse One. Let’s think of it as a revelation, without the biblical accompaniments (the appearance of four creatures which have six wings and are covered in eyes and The Lamb, with seven horns and seven eyes, for example). What has been revealed?

We learned that we really shouldn’t be so scared of apocalypses, that we will live through them, although not all of us. And that the strangest thing about them is how ordinary they are. How much we, society, and life carry on as similarly as possible to how we all did before. Our values remain the same: we don’t start munching on the neighbours at the first sign of toilet paper shortages. But sometimes people still act selfishly, like by hoarding all the toilet paper (thereby causing the shortages) and also sometimes surprisingly altruistically, like asking their neighbours if they need anything while they’re out buying all the toilet paper. There is no massive discontinuity that appears with The Apocalypse. Everything that we know or have experienced so far in life doesn’t become irrelevant: we don’t become different people. Life around us might not be normal, but we still are.

What we really should have learned, more than anything else, is to flatten the curve. Not to hide our heads in the sand. To listen neither to the doomsayers nor the deniers. To look at things with the best evidence and most expert advice, which sometimes will be wrong, since, sometimes, we all are. And to take the most useful steps we can, as soon as we can, so we flatten the curve. The apocalypse cannot be avoided, but since we are going to live through it anyway, we’re better off living through a flattened curve than a ski-jump. Very much better off. Our futures selves will thank us, rather than burying our future heads in our future hands and calling us terrible future names. Without bringing up any philosophical feuds about the nature of free will, our future is in our hands and we can do a hell of a lot about it. And the sooner we start, the more effective our efforts will be.

As you might have guessed this article isn’t about the COVID-19 pandemic. It’s about global warming, which I have started to think of as Apocalypse Four. I don’t have any specific predictions about the nature of Two and Three, just a feeling that Four is about right for what really will be the Big One. And you, I and certainly anyone under 40 is very likely to live through it, much more likely than you are to die during the COVID-19 pandemic. You will be there and the news will be getting worse and “measures will be taken” and it will all feel a bit too little, a bit too late. You’ll be talking to your neighbours about it, you’ll be worrying about whether your parents, or your children will make it through. But most of all you’ll be saying “if they knew so much about it, why didn’t someone do something about it when it would have made a difference?”.

Well that time is now, and that someone is you.

Standard
Entrepreneurship

Wub, wub, wub – or what to do when you don’t know what to do

There are only 2 absolutely essential things to remember when building a startup. The first is iron-clad, laser-sharp, tooth-grinding focus that never slips. The second is that, if that isn’t working, piss around for a bit. Shit I don’t know. This is what I did:

Around September last year I completely lost direction in Ergle. I had been building for a few months, but suddenly felt that wasn’t getting me anywhere. At the same time everyone seemed to be saying “You need other people”. I believed them; I wanted other people. But I just couldn’t see how to get them. So I thought about it. And thought about it. And thought about it. Part of the problem was my understanding of my own strengths and weaknesses. I’m a techie, a coder. I love solving problems and thinking about exciting and new stuff. For me it’s all creativity. What doesn’t come naturally to me is, well, selling; being an extrovert; convincing people. I actually think that my only real problem in this area is my own willingness, rather than any innate lack. Anyway I felt trapped between my skills and my requirements. So I was getting nowhere.

Eventually my brain started coming up with new ideas totally unrelated to Ergle. After fighting this for a while (focus, focus, focus) I decided that, if I wasn’t getting anywhere with what I was *meant* to be doing, I might as well start doing whatever I could get somewhere with. To start with, this was all about a game. Eventually it became called “Cast“. In the beginning it was about having two people react to each others’ actions in a positive feedback way (it had actually come from an analogy with sex). It became about magic. The basic idea being a two person game where each player casts spells at the other which both increase their opponent’s power (yes, increase) and may have other effects, such as creating a shield around them or paralysing their opponent for a short time. Spells would be input using a rune like spelling system. During the game both players’ power would increase at an increasing rate. The player whose power hits maximum first loses, exploding. Thus both players need to cast spells to rid themselves of power and increase their opponent’s. I started looking at how to develop it and did some work with HTML5 and websockets and a Play Scala server, using Akka for game and player state. Great fun. I spent a lot of time thinking about characters in this game, mostly the protagonist. After a while I decided I wanted to visualise this character. The last time I’d done any art work was in my teens and very early 20s. So I went to an art shop, bought some paint, brushes and paper and started to learn to paint. Basically I spent about a month getting up each day and painting until the early hours.

You can see my progress here.

first attempt

First real painted attempt

final version

last, or most recent, attempt

That, it appears, wasn’t enough of a diversion. After finishing painting, I decided this game would need some sound, like music. I bought a pad based music device and then a keyboard. I started using Renoise to put together whole tracks, and uploading them to soundcloud. At some point around the beginning of December I acknowledged to myself that I was just having a good time. So here is a sample of the best of my new hobby: Best Bits

So what happened next? Around mid January I thought, well, am I happy to give up on Ergle and let the rest of the world do what I think must be done in this area, or not? I decided not. This cleared things up a bit for me allowing me to think: I’ll do whatever I can, even if I don’t think it’s what everyone would do. Just do my best.

So that ended up with me deciding to redo the website, which I did, to have a chance at communicating what I was trying to do. In the end I have just engaged Remote Goat (see previously) to help me get that right. And will be doing what I can from now on.

Oh and happy halloween, and christmas, and new year. And Easter. 🙂

Standard
Desire

How The Matrix got it right?

Last night I lay in bed thinking. I was thinking about advertising and economics and value. I wondered what drives all this activity with websites containing content and advertisers putting their content next to it in the hope that people will click on it, web servers and code and server farms and people writing and drawing and maintaining all this. I decided that it all comes down to desire. Fundamentally the fuel, or maybe haemoglobin, of this and perhaps all other human activity is human desire. Without desire, the desire to read articles or watch funny videos, the desire to possess eReaders or protein powder being advertised and the desire to make money from these desires none of it would happen.

Now desire is a interesting thing. In buddhism desire is the cause of all unhappiness; to rid yourself of desire is to rid yourself of misery. Desire is also a very animal thing. It is associated with the part of the brain which developed early in evolution. I don’t think it is right to call it crude or unsophisticated though, since it has been sublimated and transformed into countless forms in human behaviour from art to riding motorcycles to caring for dogs. Also it seems farthest from the domain of computers. Computers found some of the things we find difficult and hard to do, what we may think of as higher functions, like mathematics, easy. Then came solving difficult problems like chess. Computers are now doing a lot more things such as understanding and responding to speech in a useful way, finding directions from A to B and making believable movies showing things that have never happened.

In the classic cyber-dystopia story, like both Terminator and The Matrix, the computers become so bright and clever that they decide either to wipe out or enslave the humans to fulfill their own ends. While I don’t really object to the idea of computers surpassing humans in all sorts of ways, like self-driving cars or aircraft, searching for the best holiday deal, and fighting wars, that might equip them with the ability to subjugate humans, what I find harder to believe is that they would actually want to.

What I think people incorrectly assume is that desire somehow is just there. I think when it comes down to it the very smartest of all machines, if left to its own devices, will do absolutely nothing. And this is where The Matrix comes in. Unlike in Terminator, where the machines decide to wipe out all humanity, the machines in The Matrix farm humans for a specific purpose. In the film it’s for the absurd (for anyone with basic science) purpose of generating electrical energy. But maybe that’s not too far off the mark. If there’s one thing that perhaps machines will not be able to provide for themselves it is the energy of desire.

You could say: but why can’t computers do desire too? Now, you’re not wrong. I don’t think there’s some kind of supernatural quality to desire that makes it uncomputable. First off though, in order to do it, it must be done – it’s not just going to happen all by itself. And it will be hard enough for anyone wanting to do it to have a very good reason. What could that reason possibly be? In general, making tools (which is what computers are) is done to bend something, such as earth, plants or other humans, to our will, to fulfill our own desire. Why would we go to considerable effort to equip those tools, no matter how smart, with desires of their own with which to thwart ours?

I can imagine a great deal of the digital economy being run entirely by machines. I can imagine them coming up with great marketing strategies, of writing code to process orders, of drawing beautiful web page images and even writing content. What I can’t imagine is them doing any of it, or indeed anything at all, without desire. This may be the last function of human beings in the whole economy. Like in The Matrix there may be banks and banks of human bodies suspended in fluid with cables plugged into the base of their skulls, but they won’t be generating electricity, they will be generating desire.

Standard
Entrepreneurship

What has come home to roost?

A few months ago I had a shock. I’d seen and surveyed for lots of companies that worked in Ergle’s marketplace. What I’d seen was lots of companies struggling to come to the realisation that I had. All of them were doing bits of what I was looking to do, but none of them had brought them together into one coherent vision. Then I suddenly saw a company that was operating within a much closer space. After a bit more investigation I realised that there were significant differences in approach and no indication of the same overarching vision, but for a while I felt quite winded.

I brought this experience to the Entrepreneurs Anonymous group I attend every Wednesday morning. It received short shrift, and here’s why.

The first reaction was along the lines of “that’s great”. Why? Well someone else trying to solve the same problem is a strong validation that the problem exists. On top of this they will be in the business of creating a market for the solution, a market I can sell to.

After a while I started to see how much something existing in this space gave me something to push against, which I had lacked before. Almost like I had been treading water previously, my hands and legs flailing freely, but now my foot had touched a branch against which I could push myself up.

Since then it seems that every week I see some news about a startup operating within my space, but so far nothing as broad or ambitious. I keep often have a temporary panic about being left behind, but it soon passes and I do whatever I can to move forward.


 

Over the last couple of weeks I’ve more or less completed my very minimal MVP. I have shown it to Emeline and her crew at Remote-Goat and the folks at the Entrepreneurs Anonymous meetup. Reaction has been very positive, lots of people saying, “wow, I want this now”, as well as giving great feedback on what to do next. I felt conflicted for a while between continuing development work to make this MVP actually usable by Emeline’s team, a great guide to value and best steps in functionality, or to pause development and concentrate on networking, demoing and hunting for co-founders, team members, customers and investors. The answer of course is to do both 😉

So hopefully I will be demoing at Campus on July 16th. Maybe see you there 🙂

Standard
Entrepreneurship

The Dreadful Hiatus

Anyone paying attention will have noticed a long absence of new content on this blog. This is because I couldn’t think of anything worth saying. Now I’m going to write a post about that.

For the last few months, I’ve been writing a proof of concept version of the ergle application. Being in the midst of technical work itself means that I’m not thinking about things that I want to blog about or imagine others wanting to read about. My last post was a result of being deeply in the tech. I think a slowdown in posting is understandable during that time. Plus, well, I’d said a lot of things that I had wanted to say in the posts before. A few years of backed up thinking and fantasizing came out in a few months’ posts. You only need to say “I think big companies are succubi on the working person” once a year at most.

And that’s all fair enough but it wasn’t my real problem. My real problem was success.

Full stop. New paragraph. I remember saying to a friend a couple of months ago that I was slightly worried that things were going too well, that all the hype about entrepreneurialism being a lonely, crisis-ridden, unrelenting treadmill wasn’t coming true. Maybe I simply wasn’t working hard enough. Anyway, that surprising sense of ease soon came to an end. The cause was that I successfully reached a milestone. It wasn’t a major event. A few posts back, I laid out a “plan”. Petty much the first item on the plan was to be able to upload files onto a timeline. Well, I hit this goal; not at full speed with a full tank of gas but narrowly and somewhat arguably. That’s how I like it. So I lifted my head up and looked around me. What I saw made me despair. I saw that I’d just climbed a boulder to reveal the mountain beyond. I hadn’t so much reached basecamp as just managed to book the tickets to Nepal. During the next few weeks I set about my second task, loading emails onto the timeline, which took much longer than I expected; I had a bout of cold/flu (ok, not flu, but a cold just sounds so insignificant); I spoke to the highly knowledgeable Sheen Yap about validation of business model assumptions, which gave me pause for thought; and tried and failed to take what I done so far to my earlyvangelists at Remote-Goat. I experienced disillusion. I got off the spaceship of fantasy and found myself standing in an empty plain. And rather than gazing upon the palace city of my imagination, I was surrounded by the sticks and rocks with which I must build it. I went quiet while I contemplated this.

Now that deflation is passing. I don’t know about other people, but wild fantasizing is part of my process. After having an idea I project so wildly about it’s success and forget completely about the effort required to achieve it. This is probably a necessary part of my motivational make up. When its happening I recognize it and try not to let it take over. One of the problems with fantasizing is that it takes up energy all on it’s own, making it hard to actually do anything. Getting started helps to inhibit fantasy and move into reality. What happened in the last month was the final phase of this. This resulted in a dip in drive as I adjusted from being motivated by the pursuit of the ideal into being motivated by my new day-t0-day life. I became adjusted to doing what I am because this is what I want to do, not just in the hope of achieving an uncertain outcome. Having said that there is still more to be done. Sheen’s ideas about validation are an important part of how I think business should be conducted, and I think I need to do more to follow an evidence based approach. This will be a serious blow on the side of reality.

So there you go, fantasy and the single entrepreneur. Now if I can do something about my megalomania…

Parkour is the physical manifestation of many of the virtues I aspire to in business: agility, resilience, overcoming obstacles and honour. Right now the guys at Parkour Generations are raising funds for a production of Alice In Wonderland via kickstarter. Please back this campaign. Thanks!

Standard