Sunday, 16 May 2021

Why I'm now on Spotify

Here's an important question. If you like music but don't listen to much radio how on earth do you find new music? Or even remember old music that isn't your favourite band?

I am old enough to remember (and really miss) swapping mix tapes with friends. There was also Pandora. Remember that? You'd give it a song and it would generate a playlist of music with the same characteristics as the seeding song - a fantastic way to find new music which was shut down presumably because someone had to pay some license fees somewhere.

I used to spend a lot of time in music shops and have a large CD collection. Remember when digital media came in circles? Anyway. For me, the best time for buying music was back when I was a student and a glorious music shop called Fopp opened in town. They had a sensible pricing policy (none of this £4.99 nonsense), a huge collection of decent music, and they actually played music you could buy in store. Seriously; the number of times I'd be in HMV and would like the music playing and nobody in-store could tell me what it was. In Fopp, it was being played by the staff themselves and the CD would be by the till - wouldn't even need to talk to anyone.

Happy days.

I was also working in a student radio station during this period and between the two I discovered and bought a lot of music. But then Fopp over-extended and imploded, and the adult world happened and it all went horribly wrong.

Like most, I've been listening to music via streaming services for some years but despite its obvious popularity I've managed to avoid having a Spotify account. I've had a Google Play account for ages, which also strips the ads from YouTube (a huge benefit to me) and because I got an Amazon Prime account I also got their music service bundled in. Between these two that really seemed like enough music to be going on with - they both have large collections, and while there is the occasional notable hole it kept me more than happy enough to avoid yet another streaming service.

However, since I've been working from home I've been able to listen to a lot more music (when I'm not in a damned meeting...) and I've notice that an alarming amount of the time, I'm just hitting "go" on my repeating playlist. So, despite having pretty much all of music from all time available to me I'm actually listening to about 15 songs on repeat because it means I don't have to think about finding something new.

That brings me back to the opening question - how do I find more music? Spotify has a "radio" feature which is remarkably like the fondly remembered Pandora service. You give it a seed song, start the "radio" and it plays a load of stuff that is kinda like it. It's a bit hit and miss (nowhere near as good as my memories of Pandora) but it's more than usable and it is also exposed through the Sonos interface if you know where to look. As far as I can see, neither of Google Play (or YouTube Music as it is now) nor Amazon Music has this feature, and certainly not through Sonos.

So at the cost of another monthly subscription, I've finally got a music discovery service. I think I have listened to more new music in the last two months than I have in the last five years so it is definitely working for me. Next up, I need to look at the Spotify playlist features and see if this can be used to resurrect the old world of mix tapes...

Saturday, 24 April 2021

A return to filters

While everyone else has been learning to speak Esperanto and discover their inner sourdough, I've been working on my photography. I have been taking #nofilter pics for a long time, focusing on the details of composition and playing with light however I've been looking at at the pictures taken by a friend of mine and she uses a lot of editing and filters to make colours pop in a way that has left me somewhat envious. She was kind enough to give me a tutorial in her techniques and, while I certainly haven't mastered them, I have had a go and managed to create some interesting effects.

I've created a few images and here is a gallery of the before / after shorts. They are arranged newest to oldest and I think even over these nine images there is a notable improvement. As I uploaded them to Flickr, I tried to explain why I added the filters to each picture and the most important improvement is with the intent behind the edits. Earlier on (the later pics in the gallery), the picture have been edited because I was just pushing buttons to get the technique in my head. Later on (the first three pics in particular), the filters were applied with a specific intent for the end results and I think the results are a big step forward.

I think my favourite is the sunset - it is certainly the best example of why I wanted to learn how to do this. Behold:

Filter comparisons

Now, for some technical talk. I take the majority of my photographs on my phone (a Huawei P10 plus) and all the editing here was done on the phone using the (free) Snapseed application. To get these effects, there are a few base steps (and again - credit to my friend for this!). 

  1. Apply the Accenture style to make the colours richer.
  2. Switch to the Tools tab and in the Details tool pull the Structure up to nearly max. This highlights the details by enriching the colours saturation and darkening the edges (apologies to anyone who knows their stuff - I'm sure I'm mangling the terminology). 
  3. Then in the "Tune image" tool, pull the Ambiance up to about 60% to bring the lighter shades back in. 
  4. At this point go to HDR-scape and apply whichever filter looks best. 
  5. Finally go back to "Tune image" and play with the Warmth, warm or cool depending on the effect you want.

I find these steps give a good base - creating a rich, slightly unreal image with lots of potential for further tweaks to create the specific effect you want. The thing to watch through these steps is the imaging graining. These steps seem to work best highlighting texture, and on big blocks of colour (eg a cloudless sky) they can add their own, breaking down the imagine.

Moving forward, I play with other options in the Tools menu. Drama creates some interesting effects but mostly I stick with the other options on the top row (Tune, Details, Curves, White balance). I can't say I understand them well enough to know what I'm doing yet - at this stage I fiddle and hope!

To finish, a Vignette can bring focus to a particular part of the image and smooth over some graining around the edges.

I really like this technique. It's a relatively simple way to create very different looking pictures. While I will be primarily sticking to my own style, it has been fun challenging myself to create something different from my usual output and I'm very pleased with the results. I will keep playing with it, because she gets some amazing colours out of her work!

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.