Friday, 26 July 2019

A Dream of #Deployless

I recently read that Dark language post about incredibly quick deployments and got really excited. I likes me a good pipeline, but I’d rather not have one at all if I could possibly help it. I want to have the same experience of editing a file on a server and seeing the changes, but with modern controls and safety.

Now, Dark is still vapor-ware in the sense that it hasn’t been published, so unless I luck out and get an invite I’m not going to get to play with it for a while. But it inspired a hunger in me for a better experience.

I’m tired of deploy pipelines. I’m also tired of having to spend hours to get going with a language. Install a few binaries, add packages, realise you need to have multiple versions of the same language installed so add some kind of run-time switcher. Then configure a complex build process. I get exhausted thinking about it.

I wanted to work through the Elm in Action book but I definitely didn’t want to do anything beyond start programming. I decided to use Glitch, a collaborative online coding environment that sprung from Fog Creek.
Screen shot of the Glitch online editor
I found someone had created a baseline Elm app in Glitch so I “remixed” it i.e. used it as the base for my own work. Now, I could have used the browser-based editor but I’d much rather use VS Code, my current fave editor. Turns out, Glitch has a new Code extension for this exact purpose. So I installed that and started typing.
Screen shot of the Glitch extension in VS Code, writing Elm.
The extension is still very early. It crashed every 10–15 minutes, which was annoying. On the other hand, it never once lost any of my code and it is quick to reload VS Code, so I can live with that.
One of Elm’s big features is that it allows no run-time exceptions. The compiler is very helpful and uses the Maybe and Result types to handle the sorts of things that end up in run-time failures. So I could have the elm compiler logs scrolling as I typed, and when I got it right and the project compiled, I knew it was going to work.

Meanwhile, Glitch has integrated Git in a feature they call Rewind. It’s pretty crude — it effectively takes snapshots every few minutes and turns them into Git commits. It’s supposed to be collaborator friendly but I personally need more documentation from my source control. That said, it was free and took zero setup. And source control is due a re-evaluation in terms of usability.

As I made changes in VS Code, I’d pop over to the running version at https://photogroove.glitch.me/ in another tab and refresh the page to see the changes.
Screen shot of the web app that was produced.
It ain’t pretty, but it’s live
To recap, with the installation of a single extension, I was writing code in a language I hadn’t installed, in my preferred editor, watching it compile on the server, have its container restart, and refresh the page to see my changes.

Dark is planning to offer the killer feature that would make this work for a serious team project: integrated feature toggles. By my understanding, they automatically version new functions and types that you write and provide progressive deployment tooling similar to LaunchDarkly, directly from their editor.

I don’t think this future is going to be for every situation. Game development, AI, systems programming, native mobile development are all going to continue to do things status quo. But #deployless absolutely is the future for web apps and services. I can’t wait for it to happen.

Saturday, 25 May 2019

We take safety seriously

welcome the dreamers, the hurt, the weak
the poor, the isolated, the mad
he tangata, your huddled masses
he tangata - and smiling faces on shiny posters
We take safety seriously

Entry to this office is controlled
no helmets - no hoods - no sunglasses - no patches
we may ask you for proof of identification,
he tangata
We are here to help - we take safety seriously
three guards, numb with boredom
one operates the door switch
in case of zombies, I’m gonna hide out
in my local WINZ office.
he tangata
more news, daily of homeless in cars, motel debt
living on maraes, of Bennett playing her fucking games
someone arranged an in-car sleepover as a protest
should be fun for the middle class, concerned
we take safety seriously
“Oh yes it got terribly chilly, but we made do
with some wine and card games - it was fun
felt so good to be speaking up and helping each other, you know?”
he tangata
Welcome to Work & Income, NZ
We take safety, seriously

Godiva, Abjection

So now
you are seen
hoist and ragged and
given
martyred to the people

You are seen

We know you
exposed – filaments, form
tendons, tied – more
your shame
excites the crowd
dogs (snap and foam)

Jezebel - who praised Ba’al
become Whore to Beelzebub
victors’ ancient slurs
quicken pulses still we
see
you
.

in silence and in secret
you are known, loved
and forgiven
draw the blinds and let lie

You Live Alone

You live alone. One day you will come home from work, close the front door behind you, and know that there is someone in the house. You will walk down the hallway towards the lounge. You will know that the person is sitting on the couch, in the lounge, waiting for you. You will be completely certain that they are there, unseen face turned towards you. You will slowly, quietly, approach the open doorway. You will see (of course!) that the room is empty.
Later that evening, you will be preparing dinner. You will have fresh fish fillets on the bench, covered in flour. The butter in the pan will have just melted. As you reach for the fish to dip it in the egg to fry it in the pan, you will realise there is someone standing behind you, between you and the refrigerator. You will sense their eyes on you. You will stop, frozen in the moment, wanting to turn around but not wanting to move at all. Finally, you will turn, quickly, to where you know the person is standing. You will see (surprise!) that there is no-one there. You are alone.
It will be late at night. You will have watched a movie. You will have brushed your teeth and washed your face. You will have switched off the lights in the rest of the house and retired to your bedroom. You will be reading by the light of the bedside lamp. You will be tired and you will let your attention wander and you will find that your eyes have closed. You will be about to open your eyes again, to continue your novel, when you will notice that there is someone in the room with you. You will sense them, close by. You will not be able to hear them, even though you find that you are holding your breath. You will reassure yourself that you are imagining things, but you will know that you are not. You will slowly, deliberately, open your eyes. You will see who it is that’s been waiting for you. You will not be alone.

A Small Favour

She asked me for a favour - it was a little thing, really. One of my little things. A finger. My pinkie, to be precise. And because it was a little thing, and because I loved her, and because I wanted her to be happy, and maybe a little bit because I thought it was hot, I agreed.

I didn't miss it much. I didn't ask where she kept it. When I asked her why she wanted it, she said that she wanted a piece of me, and I was satisfied.

Then, she wanted another one. A toe. The outer one. I was a little hesitant, but by that time I was a little scared in our relationship, I didn't want her to leave, and so I said 'yes'. I didn't miss it much.

But father, I'm writing to you now using just my thumb and index finger to hold my pen. I have no other fingers, no, nor toes. I'm afraid she will ask me for these last two. And if she does, I'm afraid I will give them to her. And I think I will miss these very much indeed.

Your loving son,
Carlos

Peace and Quiet

Woke up Monday morning
there was nothing I could do
Curled myself into a ball and
closed my eyes, thinking of you

By midday the phone was ringing:
Boss's number; killed the sound
Left it there, vibrating gently
by the window, on the ground

And I thought
what really happens if you give up life for good?
I think I'm gonna lie here till I feel just like I should.

That night my flatmates came home
from their jobs; I heard them laugh
When they'd all gone off to sleep
I ate some food and took a bath.

Wondered briefly what would happen
if I never left this place
Then just lay, eyes on the ceiling
picturing your angry face.

Woke again to sounds of knocking
They were banging on the door
Luckily I'd thought to lock it,
Wedged the drawer to be sure

I guess they'll keep on trying
Won't they just leave me alone?
Don't want to see them through the window
or to hear them on the phone.

There's only one person I'm missing
And I know you won't return
So I'm gonna burn my life until
there's nothing left to burn

What really happens if you give up life for good?
I think I'm gonna lie here till I feel just like I should.

Violet Card Parable

I know I need a Violet Card. With a Violet Card I qualify for additional support while I wait in the long line. This is important, especially if you don’t have family who can come and bring you food while you wait in the long line. I ask my friend and she shakes her head in pity at me. No, she says, you have to collect a form for a Violet Card from the Department directly. Actually, I’m not sure if they call it a Violet Card anymore. I can’t remember, she says, I heard they changed it. Don’t go to the Department office in Central, she tells me, they do Blue Cards, Violet Cards and Green Cards too so the lines are longer. She’s heard that you have to be there queuing before it opens if you want to be seen at the Department office in Central. East is better, she says.
So here I am, at the Department office in East. Out the front, two guards stand in front of the bright yellow sign. They look bored. Things have changed since last year, since an incident at the Department office in South. More guards, these days.
I walk in, down the stairs. There’s a faint buzzing in my head, from the air conditioning. I see the end of a queue, but I don’t know for sure it’s my queue, that it’s the queue I need to stand in. It goes around a corner.
I walk past the people in the queue, around the corner. At the far end of the hallway I can see a door through to a waiting room. A guard stands besides the door. I walk towards him. He shakes his head, nods at the queue. I’m close enough now to see that they are waiting to collect a ticket from a ticket dispenser. There are three along the wall, but only one seems to be working. I think I know what I need to do, now: I need a ticket so that I can wait in the waiting room.
I turn around and walk back to the end of the line. The people standing in line stare at me, apathetically, before returning their gazes to their phones. I imagine that they resented me walking past them. I imagine they wondered who I thought I was. I imagine they feel cheered by the presence of someone else, further behind them. I imagine they tell themselves “At least I’m not at the back of the line anymore”.
I pull out my phone, instinctively, and tap at it, bored already. I stare at the backs of people’s heads, at the beige walls, up at the ceiling. I tap my fingers against my legs until the man standing in front of me shifts his weight to the other leg and I imagine he is standing, annoyed, wanting me to be quiet but not wanting to turn around and tell me that. I try and be quiet, but my breathing sounds loud to me.
The line advances, slowly. A person joins the queue behind me, and then another. I round the corner. Now I can see the waiting room. I try to read something on my phone, but the buzzing is making it hard for me to concentrate.
The buzzing in my head is becoming louder. I look around, trying to find some sort of distraction. There are posters on the wall, of smiling families, of a man cheerfully reading a letter, a woman sitting at a coffee table. The text of the posters is friendly: “You and us, in partnership, together”, one reads; “Helping you get back on your feet”, another.
Elsewhere there are smaller, A4 pieces of paper stuck to the wall. One of them warns that tardiness to appointments may cause your Cards to be revoked. Another reminds me that omitting to inform the Department about other Cards that one possesses is a prosecutable offense. A third suggests that I consider the space to be a “Neutral Tone Zone” and that everyone’s vocal tones must remain within a neutral range or risk ejection from the area.
Finally I reach the front of the ticket dispenser. I slide in my Green Card and punch in my Department Customer Identification number. There is a moment’s pause, then the dispenser starts rattling. I assume this is part of the normal operation, but it continues, on and on. I start to count in my head. How long has it been since it started rattling? Twenty seconds? I’ll count from there and stop if it takes more than a minute. Thirty. Is a minute too long? I look back at the line. They look at me. Forty. No, a minute is fine. I have a right to be here. I haven’t done anything wrong.
Did I do it wrong?
I try to think back to the numbers I entered. No, I can’t have typed them wrong. I know them by muscle memory these days. I realise I’ve forgotten to keep count. Shit. Where was I?
The rattling stops abruptly and a ticket appears. I pull out my Green Card, and take the ticket. I turn away and walk towards the waiting room. The waiting room is nearly empty. A couple huddle in one corner, a disheveled man counts his fingers in one of the chairs by the door, a guard sits near the far door. The walls have been painted a cheerful pastel blue, and are covered with more posters and pamphlets and warnings. There is music playing, some kind of reedy whistling is piping through a small speaker mounted in a corner of the ceiling. At the far end of the room, a man sits at a counter below a large screen displaying what I assume is a ticket number. It’s not my ticket number, and no-one stands before the man. He is staring at his screen, tapping keys.
I sit.
Time passes. I want distractions; I read the posters. The whistling song continues. I don’t want to take my eyes off the ticket number screen, afraid I will miss my number. What is my number? I look at my ticket. X28. Ok. The screen says P35. It can’t be linear, there aren’t enough people here. Someone else walks in from the hallway, sits down.
Time passes. The number on the screen finally changes: N02. It’s not linear. No-one goes to the counter. The man behind the counter looks around the room. After a moment, the number changes again: 50R. The couple stand up and walk up to the counter.
The buzzing in my head reminds me of its presence. I imagine that it has a rhythm, like an old air-conditioning unit. BzzzzZZzzzZZzzzZzzzz. The couple leave. The number stays on the screen, unchanged. The man behind the counter goes back to staring at his monitor. Someone else comes in and sits down.
I can feel the buzzing curling around my ears. I become convinced that it has a weight to it, that it exerts a pressure that I start to feel, pressing on my skin. I remind myself that we’re all living under the pressure of the atmosphere. I focus on my breathing. I feel the buzzing wrap itself around me, close against my skin.
The number on the screen has changed, and the disheveled man is at the counter. He wants something. He doesn’t speak well. The man behind the counter explains, slowly, that the disheveled man hasn’t brought the correct paperwork, that the Department can’t help him until he brings a log of his Green Card usage. The disheveled man doesn’t want to leave. The man behind the counter smiles and explains that he cannot help without the paperwork.
I wonder if there is going to be a fight, but the disheveled man turns and shuffles out of the room. I hear him muttering to himself. The guard looks disappointed, before returning to staring across the room. The man behind the counter stares at his monitor, pecking at his keyboard.
I can feel the buzzing starting to inhabit the back of my head, down by the base of the skull. It is warm and red and insistent. I breathe. I look at the large screen. In my pocket, I clench my thumb against the skin of my hand, letting the pain distract me from the buzzing.
I see the number on the screen change to X28. Is that my number? I know I was an ‘X’. I pull the ticket from my pocket. Yes. I have the right number. The man behind the counter is looking up and around the room.
I approach the counter. I try to ignore the buzzing in my head. The man behind the counter smiles. His smile doesn’t reach his eyes. He asks what the Department can do for me today.
I tell him I would like to pick up the forms needed to apply for a Violet Card. He smiles and tells me that the Department doesn’t provide Violet Cards anymore. Is there anything else he can help me with today?
I’ve heard about this. They’ve changed the system, but you can still get the same effect, somehow, with some other card. Maybe they’ve renamed it?
I ask him if there is a replacement or equivalent for the Violet Card. He stops me, no, the Department only offers Blue Cards these days. I know a Blue Card isn’t what I need. I mention the fits, ask if there is anything that might help with that. He smiles and waits for me to continue. I remain silent. He smiles a moment longer. I stand there. I can tell he knows what I’m asking. Have I used the correct words? Perhaps I’m really in the wrong place. Please let me be in the right place.
Oh; he says; perhaps you are looking for a Red Card supplement form for the Blue Card. Yes, I say, that must be it. Do you have a Blue Card already, he asks. No, I don’t have a Blue Card, yet. You need a Blue Card as well, he tells me. He reaches over and takes a red form from a pile, slips it into a larger, blue form. You must take this, he says, indicating the red form and smiling at me, take this and get this part here filled out by a registered psycholocutioner, then fill in the rest, and ring our main number to arrange an appointment to start the process. Please bear in mind that our current waitlist for appointments will mean at least a ten working-day wait from the time you call to arrange the appointment.
Can I arrange the appointment now? I’m sure I know the answer but I ask anyway. Oh no, he says, we don’t allow that as we must have received a referral from your psycholocutioner before we can arrange an appointment. You will want to wait at least two days from your appointment with your psycholocutioner but no more than five working days, as referrals expire within a fortnight.
He smiles at me. Is there anything else the Department can do for you today? I clutch the forms to my chest. No, I say, thank you, that’s all. Have a lovely afternoon, he says, and turns back to his monitor, his left hand reaching to press the red button he must use to change the ticket number on the big screen.
I turn and walk out. The people in the line to the ticket dispenser lift up their heads again and watch me leave before returning to their phones.