超賢 Chao Xian : I BATMAN

Weeknotes 4

(2 minutes reading time)

Last week was pretty low key too. Again, delayed with writing this up for last week! Last week, I:

  • Advised someone who wanted to gain more experience and knowledge of the GOV.UK platform. Their idea was to switch teams and I pointed out the pros and cons, mainly thats being on a mission team is the best place to work with a multi-disciplined team as opposed to shifting onto a “lights on” team.
  • I went along to the GDS-wide Frontend Community meeting and learned some interesting stuff.
  • I fixed an accessibility issue with some of the error messaging in Smart Answers.
  • Added Whitehall as a dependency to Smart Answers as well when it needs a list of countries.
  • On Tuesday morning (from 12 am) I volunteered to run a rake task to remove the word “MP” from profiles, as Parliament dissolved. However, I also spotted that loads of body content also had “MP” manually added. I spent a little while finding all the instances of this problem until around 2 am…
  • But at the same time I learned that you can use string interpolation within a regex pattern. So when I wanted to find all examples of a politician’s firstname and surname followed by “MP”:

    .match?(/#{forename}\s#{surname}\sMP\s/)
    

    …so that night I ran:

    people.each do |person|
      mps << person.biography.match?(/#{person.forename}\s#{person.surname}\sMP\s/) ? person.slug : next
    end
    

    That threw up a bunch of profiles that needed to be addressed, that thankfully the Content Designers on GOV.UK got onto in the morning.

  • I added one of our apps to govuk-docker, which was licence-finder and learned a bit more about how to use Docker.
  • I also had the worst migraine for a while on Thursday. It started as I got into work - my vision went fuzzy, like a bad TV picture glitching, before the pain set in. I had to go home and sleep! Quite rare for me these days.
  • I finished the week fixing a minor issue with govspeak-preview tool.