R1D57: March 16, 2018 – Time spent 1hr
Today’s Progress: Worked through more of Introducing GitHub, Second Edition, started research on checking URL status as a way of catching broken thumbnails on Alaskana Explorer.
Thoughts: I had to wake up way early to drive someone to the airport this morning, so I could not support my normal routine. I decided to let 40 minutes of reading and working through Introducing GitHub to count towards my coding hour. After work and a walk on a local beach, I spent a half hour running down a method suggested by Dominic at the National Archives (NARA).
I am SO GLAD I chose to work through the book today. It helped me realize that I made a rookie mistake that was directly related to my discomfort yesterday. As n00b as it sounds, my workflow had been:
- Start editing my files
- Commit them to master branch if I was confident of my code
- Create (or try) to create a new branch if I thought code needed more work
- Get a “you’ll overwrite this file through checkout!”
- Do some kind of workaround I barely remember to get my new branch
I somehow got it backwards. Now I understand that the right way to work with GitHub is:
- Decide my code needs some work
- Create a branch with a meaningful name
- Edit my files in the new branch. Keep committing there till I want to push the new code to the web.
- Create a pull request to merge my development branch with my master branch
So I’ve changed my workflow. This will also make working with Amy and future collaborators easier.
On to today’s thumbnail work. Yesterday, Dominic at NARA offered this update and idea to aid in my determining what NARA thumbnail files need a workaround:
“@ddcornwall: Sorry for the delay! I don’t yet have much news for you on this front. Our developers are working on rolling out a fix for the issue I mentioned elsewhere in which some fields are inaccessible via the API as their top priority. We view these object-related bugs (this and #8) as the highest priority after that, but don’t yet have a timeline. We’ll definitely update this issue with any news. For now, it may be necessary to implement some code that checks the HTTP status code of the file URL, and only tries the workaround if it’s not 200, if that’s possible? Sorry again for the inconvenience!”
I hadn’t thought about trying to check the status of the URL, but if it was possible, Dominic’s suggested approach made sense. So I spent my half-hour evening coding time researching how to do that. I think I’ve pieced together an idea with code that will help. You can read that and the whole inconsistent thumbnail display saga as issue 8 in our GitHub Repo.
Tomorrow I take another friend to the airport. At 3:45am. We’ll see what happens.
Link(s) to work: