Friday, 26 March 2021

After 52 weeks - the perils of lockdown come home

This week, the 52nd week of pandemic restrictions, the isolation hit me hard. I took a trip to the supermarket, looking for supplies I can't buy at the shop at the end of my street. Shuffling around the long aisles I encountered many strange, moving forms. Forms that I believed only existed in two dimensions on my screen. But no - here they were, moving in the real world. How had this happened? These "people" were out there, making sounds like speech and I was confused. But not as confused as when I realised I couldn't find the talcum powder. I searched the shelves,  yet nothing. 

Seeing my difficulties, one of the "people" wearing the logo of the place  (so "staff"? Kinda like an online chat bot, but walking and exhibiting intelligence and not completely useless) came over and asked if they could help. They stood at a pandemic-respectful distance and looked at me like they wanted something. A response, that was it. My brain lurched and jumped. How to communicate? What to do? Finally, my brain kicked to life after what seemed like an eternity of standing there.

I raised my hand; pointed at the shelf and just barked "talc". Then "talc?" Look of confusion from me. 

"Talc".

Not my finest moment.

Anyway, he was cool. I eventually found the power of Words to Peoples and apologised for being inarticulate and then together we failed to find the talc. It was amusing, but on reflection also weird and troubling. I have spoken to maybe five people in person in about a year and actually holding a conversation in person is surprisingly difficult. We were both masked and distanced, so I wasn't concerned about COVID (beyond the ongoing background concern of course) and I've certainly talked a LOT to people over Zoom and equivalents, but in person is different.

It made me think about what returning to normal is actually going to be about. Not the common stuff about whether we work in offices again, or when the pubs will open, but the smaller everyday changes. I remember walking around shops in thick crowds. I remember people standing like lemons in the middle of the street because they didn't see the need to consider where the people were around them. I remember people - oh that's it, I'm remembering people. Over the last year, there have been far fewer folk out and about, and those that have have by and large been aware of their fellow humans and taken them into account. I really hope this is something we can keep moving forwards.

I'm curious what else is going to come up as I look around? I imagine the first time I get on a train again will be a weird experience.




This post is from a series of shorter posts, written roughly once a week while the country is on lockdown to capture my feelings and reactions as we go. They are all tagged with coronavirus.

Saturday, 27 February 2021

Bots - a triumph of automation

I'm a bit lost on a website - they've been selling a particular bouquet of flowers for years and years and I'd like to reorder it. But it's not there! Maybe it's a pandemic thing, who knows. Still, at least there is a live chat function so I can ask this question. Live chat is a great way to get customer service, but unfortunately can be costly. Still, it looks like they’ve made the effort here.

Me: Hi there. I’m looking for a particular item <with sufficient description> that used to be on sale but I can't find it. Has it gone?

Ellie the Helper: Hi! Can I take your name please?

Sigh. It’s a bot isn't it? Can you imagine if this played out in an actual store.

Me: <repeats question>

Ellie the "Helper": Are you still there? 

Me: Yes…

Ellie the Definitely Human Helper: Hi! Can I take your name please?

Hhgggnnn… 

I hate bots. I see a lot of them as a user, and also see a lot of requests for them as someone whose job is on the web. They are seen as a nice, positive way of finding information on a website without the user having to find things. Or, to put it another way, without the site owner having to spend money on a decent user interface, information architecture, design, etc etc. Then they can cheap out on customer service too by making it look like there is a real human while trying to fool the user.

The technology does not work that well.

Me: Bob

Ellie the Script Executing HelperBot: Hi Bob! Here is a close alternative! <link>

And I'm presented with a bouquet of flowers. On a flower delivery website. Literally the only thing in common with what I was looking for is "contains flowers". On a flower delivery website.

No attempt to answer the actual question, of course. Just "here is another thing you can buy". It's ok though - automation saved the day and provided another seamless bot experience!

Saturday, 16 January 2021

After forty two weeks - and the start of a new year

It's the start of 2021 and gosh, hasn't this pandemic been going on for a while. I'm not going back to writing weekly updates - this has been going on for far too long for that - but since it's the first post of the year I wanted to note the passage of time.

Looking back, this time last year I was writing about having a rough January and what I was going to do to make myself feel better. Then I wrote much the same in February - little knowing what the rest of the year had in store. This year, January is again rough going - I'm starting to think that maybe I just don't like January. Rather than trying anything clever to make myself feel better, I'm going to have a think about the good that is happening at the moment and put down three things I'm going to pursue above all others.

First, the good. After a thoroughly miserable year in 2020 we're seeing some actual positive change. There is now a deployable vaccine for COVID, it's going out and real people are getting immunised. We're in a lockdown again, but it's not a stop-gap to drop the numbers so we can build them up again on the other side - combined with the vaccine we should start seeing infection rates come down and stay down. The government has also declared we're going to have a slow re-opening, which frankly will be good for people to ease back into being social again as well as eminently sensible for disease control.

In America, President Trump is finally leaving office and might actually suffer some (potentially serious) repercussions for his actions. It's a horrible mess and I'm really pleased I don't live there, but from a distance it looks slightly positive. Similarly, while I don't comment on UK politics here, I'll also say that I feel more confident in the direction of the UK than I have for a while. Both these are relative, granted, but I'm looking for the sunshine.

On a personal level, many things are terrible as they are for pretty much everyone. So I'm going to focus on three things in the short term.

First, I'm going to do what I can to approach the next four weeks in as positive a mindframe as possible. I'm going to smile, I'm going to make jokes. I'm also going to take care of myself - I intend to work more sensible hours this year, and for the moment I'm also going to do a lot more to take the time I need when I need it. That thing I tell all my people to do, then don't do myself.

Whatever is true, whatever is noble, whatever is right, whatever is pure, whatever is lovely, whatever is admirable - if anything is excellent or praiseworthy - think about such things.

Philippians 4:8

Second, I’m going to focus on my physical health. This has really suffered during lockdown (again, like many people) and I need to do something sustainable now, not in six months when things will be (hopefully) far more normal. This means I'm going to eat better and exercise more and track my progress properly. Although I'm going to measure more often, I'm going to try to judge success at the end of each month, not each week.

Third, I'm going to cook a lot more. Hopefully this won't be too much of a contradiction with my second point. I like making things, I like cooking, and once upon a time I was pretty good at it. I want to get back into practice properly and it should be entirely possible while I have no commute at all. To cook in the evening (as opposed to "place thing in oven"), I have to finish work at a sensible time and that will help with both the other points too.

I've also got an idea for an app which should help me with recording recipes and cross-referencing ingredients for better ideas. I'll write about that another time, when I’ve thought it through properly.

Welcome to 2021 everyone. Remember that it's not 2020 again, even if right now it does feel like it.




This post is from a series of shorter posts, written roughly once a week while the country is on lockdown to capture my feelings and reactions as we go. They are all tagged with coronavirus.

Thursday, 31 December 2020

The year that was, 2020

Well, shit. I'm writing this on the last day of 2020 and thank goodness this year is over. There are plenty of reasons I am very pleased to see the back of this horrible year (COVID being the obvious one) but this isn't the place to write about that. This annual post is traditionally about reviewing my new years resolutions and reminding myself of all the creative things I've managed to do. It has, after all, not all been Division and ... err ... Division 2.

  • 18 posts on this blog (19 including this one) - sixth consecutive year of a post per month
  • regular posts reflecting on life in lockdown
  • did some writing (and GMing) for a MUD
  • continued running a weekly exercise class in the park in Bath
  • another year of the Year in Pictures site - this is the sixth year and we're up to 29 photographers
  • started a Rails project linking Humble Choice to Steam tags, re-learning a load of good developer craft skills
  • rebuilt my server from scratch
  • learned about Github Actions
  • built a pihole for my home
  • renovated the home network at my parents' house (and made them a pihole too)
  • upgraded all my live projects to use a modern version of Ruby and etc
  • 298 contributions to various projects on github (well up on last year)
  • learned the basics of wood turning (and made two bowls)
  • extensive instagramming
  • loads of photos on my flickr stream

Resolution count - 6/10. Nice.

Frankly, I'm astounded that this year of all years I've managed this much. I also achieved one of my stretch goals (of five but that's not the point). This is testimony to my own levels of awesome. Or, more accurately, this is testimony to a lot of effort to not just disappear into work during lockdown.

Speaking of work, I deliberately don't reflect much on work int this post but there is something worth remembering. This year I made some decisions and moved out of London and back to Bath properly. While it has been in the middle of a pandemic, so hardly the homecoming I anticipated, it still has been fantastic to stop the commute and live in one place again.

Next year... well. I've been writing this review post for seven years now, starting way back in 2014. In the last few years each year I've written some variant of "this year has been all about work - something to change next year". Then I've utterly failed to actually follow through. With lockdowns and COVID, work and life are blurring which makes stepping away all the more difficult so this year I'm going to have to work much harder at building a non-work life. However, I've been making some progress recently with picking up programming again and as long as coffee shops reopen before too long I hope to carry this on and build on it.

Nobody knows what 2021 is going to bring. Normally, I write about wanting to do things and learn things and so on. But the world isn't set up for that at the moment. I have my normal hopes, but more importantly next year is about the people. Life is exceptionally dark at the moment, so what can I do to bring a little light?

2021. Here we go.

Sunday, 20 December 2020

A first look at Github Actions with Rails and Postgres

In my last post, I mentioned that while upgrading my Heroku tech stack I noticed Codeship was experiencing some kind of outage. This seemed to stop anything appearing in the "checks" part of a pull request (including any kind of error message, which was a long way from helpful) and I decided to investigate Github Actions for my CI/CD needs.

I've been thinking about using Github Actions for a little while, for two reasons. First, I wanted to run my linting in my CI pipeline and I know of a rather good tutorial for getting started doing this using Actions (thanks Dean!). Second, this should move my CI config to the project repository (keeping it together and putting it under version control) and remove a dependency on a third party SaaS product. I can't help feeling that the recent Codeship outage (which I only noticed because the check was missing in my PR, and could easily have missed this) vindicates this last point.

As a side note, Codeship now seems to be fully working again.

Anyway, the Rubocop implementation is actually pretty straightforward, but it took me forever to get the tests running because of a few tricks and gotchas which I thought I'd record for posterity.

Bundler

Let's start with a timesaver. I read a lot of examples while setting this up, and some had extensive Bundler config in them. However, if you're using the ruby/setup-ruby@v1 action for setting up Ruby (code here) and you put in:

  with:
    bundler-cache: true

It will just handle everything bundle-related with no more configuration. Hurrah!

Migrating Capybara driver to Apparition

I have no idea if anyone else is still using Capybara Webkit to drive their Capybara tests but I was. It has recently become a pain to install because the underlying library (QtWebKit) has been deprecated. I found this out after quite a while of trying to get the QtWebKit libraries accessible in my Action. That didn't work.

It seems Thoughtbot, the authors, agree with me and have deprecated the thing and recommend a move to Selenium or Apparition. I chose the latter because of claims of backwards compatibility and it was very easy to switch when I finally realised that this was a more sensible way forward. The changes can be seen in this commit along with the inclusion of an Action setting up the Chrome driver in my test workflow.

Configuring the database to work in a containerised world

Good grief this took me forever.

In theory, this is really easy - configure a Postgres database as a service, when the tests run connect it up, and bam. In practice it is also really easy, requiring minimal config to get it working. However, it requires getting a load of options to line up and since it's all running on Github servers, the feedback loop is annoyingly slow so painstakingly iterating through a million tiny variations to get to that simple working config took an eternity.

In the end, there were only two things to note.

First, when configuring the Postgres service one HAS to specify a port (despite it being the default port).

Second, remember to update the test database config in database.yml to accept some environment variables (and also default to allowing the tests to run locally). It's really easy to do when you actually remember to do it...

It's highly like these are more down to my own incompetence than anything hidden or surprising.

And done

And lo, it works. While it took a while to figure all the details out, the results are actually really simple and easy to duplicate for other Rails projects.

The whole change for implementing Github Actions and implementing the other updates can be seen in this PR.

Saturday, 19 December 2020

Upgrading to the Heroku-20 buildpack and Bundler 2

I figured it's about time to start moving my various running applications and kit to Ubuntu 20, now there is a new LTS version and well before v18 totally dies. I know I'm late to this party, but I've been busy.

Today I updated an application hosted on Heroku and since it wasn't 100% smooth thought I'd capture my steps, both for myself in future and anyone else who finds it useful.

The tech

  • Ruby on Rails application
  • Ruby 2.5.1 (Ubuntu 18 default version)
  • Bundler 1.17.3
  • Heroku on buildpack 18
  • Codeship for automated testing and deployment

The process

On Heroku, go to the app page then its settings. On this page you can change the stack via the big red "upgrade" button. This requires a redeploy of the application.

Back at the app, I updated by ruby version (.ruby-version file for me), installed bundler and ran bundle update --bundler to upgrade from Bundler to Bundler2. This provoked some other minor config changes, all in this diff.

Then Codeship broke. As in, it was totally down. Sigh. When this came back, the build was not working, giving me a deadlock error when running bundle install. This gotcha took a while to fix (hence writing this post). In the end, all I had to do was add gem update --system to the build setup commands before gem install bundler.

And voila, we're in the modern world and everything works.

Saturday, 14 November 2020

After thirty four weeks

It has now been around thirty four weeks of lockdown and the pandemic. After a period of the country beginning to open up, the rising number of cases and the increase in the R number has forced a return of a full England-wide lockdown.

To state the blindingly obvious, this has been a very difficult year and despite some signs that maybe the world is getting better (not least some promising news about a COVID-19 vaccine) a dip back into full lockdown, while undoubtedly the right thing to do, is a very hard pill to swallow. I deliberately stopped writing these weekly posts because, frankly, I ran out of ways to say “this week I worked hard and spent some time walking in the dark” but after a break I think I need to collect my thoughts on how I’m going to work through the next few weeks.

For me, the approaching winter combined with the loss of places to gather (ie coffee shops) means hugely increased isolation. I can no longer go somewhere to be around humans, which, as someone living alone, is very important to generate that low-level social contact. It also means I can no longer go places to do things. Outside of work, I normally take myself out of my flat to write (words or code) to put myself in a different environment which helps me think and focus. Now everything I do, whether it’s work or sleep or work or relax or write or work is all in these four walls and it makes it very hard to compartmentalise each area. That is making it hard to shut off work (especially at the end of the day), or “get things done” at the weekend.

So, with that recognised, what am I doing?

Firstly, running on low power, I’m going to make sure I set myself appropriately straightforward goals. I’m going to keep todo lists, but make them very achievable which should help motivate me to do them and give me small feelings of satisfaction if I do. I’m going to aim to do less, but aim to do it well.

Secondly, I’m going to make more of an effort to put things in my diary. Generally, I prefer a slightly more ad hoc approach to life since in work my time is dictated by the tyranny of my diary. However at the moment I think I need specific things to look forward to, and specific commitments to motivate me to get moving.

Thirdly, I’m going to pick up a new(ish) hobby. While people have been learning languages and so on, I don’t have the mental capacity to take on something completely new. However I’ve been doing a lot of photography over the years and I’ve found myself taking many pictures of the architecture here in Bath in the dark. I think I’m going to focus on this through lockdown and write a post about the pictures towards the end. It’s a mini-project that will give me some focus.

Fourthly, I need to contain my working hours. There is a lot going on at work at the moment and given my “office” is a few paces from where I’m sitting right now, it’s far too easy to still be sorting out that last thing at 8pm every night. Then a walk, then food, then the evening is more or less done. Done continuously, this way of working has a significant negative impact on those around me and it is very unhealthy for me too. So I’m doing what I can to make sure I am done by at the latest 18.30 every day. That is still a long day against my contracted hours, but it’s a positive step towards putting work in a sensible box.

So that’s four concrete steps I am going to take through lockdown 2. Let’s see how it goes.




This post is from a series of shorter posts, written roughly once a week while the country is on lockdown to capture my feelings and reactions as we go. They are all tagged with coronavirus.