a blog about research communication & higher education & open culture & technology & making & librarianship & stuff

Corruption Checksum — Python — #adventofcode Day 2

Today’s challenge is to calculate a rather contrived “checksum” over a grid of numbers.

→ Full code on GitHub

!!! commentary Today I went back to plain Python, and I didn’t do formal tests because only one test case was given for each part of the problem. I just got stuck in.

I did write part 2 out in as nested `for` loops as an intermediate step to working out the generator expression. I think that expanded version may have been more readable.

Having got that far, I couldn't then work out how to finally eliminate the need for an auxiliary function entirely without either sorting the same elements multiple times or sorting each row as it's read.

First we read in the input, split it and convert it to numbers. fileinput.input() returns an iterator over the lines in all the files passed as command-line arguments, or over standard input if no files are given.

Read more...

Series: Advent of Code 2017

Inverse Captcha — Coconut — #adventofcode Day 1

Well, December’s here at last, and with it Day 1 of Advent of Code.

… It goes on to explain that you may only leave by solving a captcha to prove you’re not a human. Apparently, you only get one millisecond to solve the captcha: too fast for a normal human, but it feels like hours to you. …

As well as posting solutions here when I can, I’ll be putting them all on https://github.com/jezcope/aoc2017 too.

Read more...

Series: Advent of Code 2017

Advent of Code 2017: introduction

It’s a common lament of mine that I don’t get to write a lot of code in my day-to-day job. I like the feeling of making something from nothing, and I often look for excuses to write bits of code, both at work and outside it.

Advent of Code is a daily series of programming challenges for the month of December, and is about to start its third annual incarnation. I discovered it too late to take part in any serious way last year, but I’m going to give it a try this year.

Read more...

Series: Advent of Code 2017

Research Data Management Forum 18, Manchester

!!! intro "" Monday 20 and Tuesday 21 November 2017 I’m at the Research Data Management Forum in Manchester. I thought I’d use this as an opportunity to try liveblogging, so during the event some notes should appear in the box below (you may have to manually refresh your browser tab periodically to get the latest version).

I've not done this before, so if the blog stops updating then it's probably because I've stopped updating it to focus on the conference instead!

This was made possible using GitHub's cool [Gist](https://gist.github.com) tool.

Read more...

Draft content policy

I thought it was about time I had some sort of content policy on here so this is a first draft. It will eventually wind up as a separate page. Feedback welcome!

!!! aside “Content policy” This blog’s primary purpose is as a reflective learning tool for my own development; my aim in writing any given post is mainly to expose and develop my own thinking on a topic. My reasons for making a public blog rather than a private journal are:

Read more...

Learning to live with anxiety

!!! intro "" This is a post that I’ve been writing for months, and writing in my head for years. For some it will explain aspects of my personality that you might have wondered about. For some it will just be another person banging on self-indulgently about so-called “mental health issues”. Hopefully, for some it will demystify some stuff and show that you’re not alone and things do get better.

Read more...

Becoming a librarian

What is a librarian? Is it someone who has a masters degree in librarianship and information science? Is it someone who looks after information for other people? Is it simply someone who works in a library?

I’ve been grappling with this question a lot lately because I’ve worked in academic libraries for about 3 years now and I never really thought that’s something that might happen. People keep referring to me as “a librarian” but there’s some imposter feelings here because all the librarians around me have much more experience, have skills in areas like cataloguing and collection management and, generally, have a librarian masters degree.

Read more...

Lean Libraries: applying agile practices to library services

A Scrum board suggesting to use Kanban

Kanban board Jeff Lasovski (via Wikimedia Commons)

I’ve been working with our IT services at work quite closely for the last year as product owner for our new research data portal, ORDA. That’s been a fascinating process for me as I’ve been able to see first-hand some of the agile techniques that I’ve been reading about from time-to-time on the web over the last few years.

Read more...

Mozilla Global Sprint 2017

Globes

Photo by Lena Bell on Unsplash

Every year, the Mozilla Foundation runs a two-day Global Sprint, giving people around the world 50 hours to work on projects supporting and promoting open culture and tech.

Though much of the work during the sprint is, of course, technical software development work, there are always tasks suited to a wide range of different skill sets and experience levels. The participants include writers, designers, teachers, information professionals and many others.

Read more...

Not just certifiable…

A couple of months ago, I went to Oxford for an intensive, 2-day course run by Software Carpentry and Data Carpentry for prospective new instructors.

I’ve now had confirmation that I’ve completed the checkout procedure so it’s official: I’m now a certified Data Carpentry instructor! As far as I’m aware, the certification process is now combined, so I’m also approved to teach Software Carpentry material too. And of course there’s Library Carpentry too…

Read more...