#100DaysOfCode R1D58 – Yet more GitHub

R1D58: March 17, 2018 – Time spent 1hr

Today’s Progress:  Finished Introducing GitHub, Second Edition. Merged another pull request.

Thoughts: I had to wake up about 3:15am to drive someone to the airport this morning. That left me very fuzzy, so I just worked through the rest of Introducing GitHub, Second Edition and merging a pull request from my collaborator. I’m not totally sure I did it correctly. I didn’t work on any of my own code today, but I am mostly more confident in my GitHub skills.

Link(s) to work:

Posted in Technology | Tagged | Leave a comment

#100DaysOfCode R1D57 – More GitHub, delving into status codes

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:

  1. Start editing my files
  2. Commit them to master branch if I was confident of my code
  3. Create (or try) to create a new branch if I thought code needed more work
  4. Get a “you’ll overwrite this file through checkout!”
  5. 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:

  1. Decide my code needs some work
  2. Create a branch with a meaningful name
  3. Edit my files in the new branch. Keep committing there till I want to push the new code to the web.
  4. 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:

Posted in Technology | Tagged | Leave a comment

#100DaysOfCode R1D56 – New collaborator, fun with GitHub

R1D56: March 15, 2018 – Time spent 1hr each day

Today’s Progress: Reviewed, approved and merged Alaskana Explorer interface changes submitted by Amy Carney, my new project collaborator.  Logged known issues into GitHub repo’s issues section.  Recreated thumbnail feature branch to account for new directory structure.

Thoughts: Today was more working with GitHub as a project manager than working on code, but it’s all good. Amy Carney is a friend and a coworker at MPOW. She is great with front end web development and expressed interest in bringing the Alaskana Explorer project’s interface into the 21st century. So she asked if she could be a contributor and I gratefully accepted. She’s already updated the look of the home page and soon she’ll be working on the other pages.

Because I’m still on my learning curve with GitHub, it was a small struggle to figure how to review Amy’s pull request for the front page and then to do the actual merging. Because she sensibly created subdirectories for our js and css files, the file structure of my thumbnail-upgrade branch no longer reflected what was on my computer and I temporarily lost the new thumbnail-display-code in progress. But since GitHub is all about version control, I was able to retrieve the experimental code and create a few feature branch to get a handle on the thumbnail display.

File this next bit under “Why didn’t I think of using a core GitHub feature?” Previous to Amy’s onboarding to the Alaskana Explorer project, I had been keeping bug lists and feature ideas here and in my “project notes” file. When Amy started her work she opened issues on my repo and assigned them to herself. I saw that and thought “Right. The issues tab is where you open problems and discuss solution ideas. Hmm. I even did that myself on the National Archives (NARA) Catalog API GitHub repo. I should totally be doing that here!” So I combed through my project notes and bug lists and opened them as issues on the GitHub Repo. Then I assigned them to me.

It’s good to get another perspective on one’s project. I’m definitely richer for it.

Link(s) to work:

Posted in Technology | Tagged | Leave a comment

#100DaysOfCode R1D55 – GitHub review, new API docs and thumbnails

R1D54 and R1D55: March 13-14, 2018 – Time spent 1hr each day

Today’s Progress: Reviewed GitHub features and procedures. Reviewed revised National Archives (NARA) documentation. Worked on thumbnail issues in Alaskana Explorer.

Thoughts: I did code yesterday. I just got done with it so late in the morning I did not have a chance to blog about it. I’ve been splitting my coding time between working on the Alaskana Explorer and reading through the O’Reilly book Introducing GitHub, Second Edition by Brent Beer. While I’ve been using the web and desktop version of GitHub for awhile, I have to admit I haven’t always understand how best to use them and this has led to some awkward moments. Additionally, I’m pleased to have a friend join me on this project as a collaborator. More about this later. Between these two facts, I thought it would be good to systematically explore GitHub.

On the Alaskana Explorer, I started work on the third item of my recent task list:

  1. Implement search browse work around – basically giving them a link to the same search in the full NARA catalog.
  2. Update program pages to make it clear I’m not limited to records from the Alaska Digitization program.
  3. Start working through my problem thumbnails.

I haven’t gotten very far yet. After reading the new NARA Catalog API documentation, I thought I’d have another go at excluding fields I didn’t want. This did not appear to speed up my searches but it did deprive me of material I need to make the NARA thumbnail workarounds function. And from the vast pile of broken links in my tests, I still need those workarounds.

I’m not positive, but it seems like a different workaround MIGHT be needed for each field office contributed the digital files. I’m not positive this is the case but I will know more when I do closer analysis of the “file” and “object” sections of a BIA newspaper and an Alaska Village Census roll.

You can follow my thumbnail display journey on the “thumbnail upgrade” branch of this project on GitHub.

Link(s) that helped:

  1. Revised National Archives Catalog Search API documentation

Link(s) to work:

Posted in Technology | Tagged | Leave a comment

#100DaysOfCode R1D53 – DST, Packing force break / new display code online

R1D53: March 12, 2018 – Time spent 1hr

Today’s Progress: Worked on Alaskana Explorer. Update web version with new display code code. Added Village Census Rolls as a subject browse. Have new thumbnail issues.

Thoughts: I didn’t code on Sunday. The change hit to Daylight Savings Time hit me hard. Plus not only did I have to pack, but Sunday was the one day I went to an early conference session. So no coding. But the #100DaysOfCode rules say you can break one day and still continue. So here I am at Day 53. Would have been nice to be at Day 54, but better than being at R1D1 again.

While I still have odd thumbnail display issues, I figured what I had was better than what was up on the web between the expanded universe of objects for the people to find and my refactored code that I think better shows what I’m trying to do. So I committed that to the web application. At some point I’ll need to fix the about page.

I also got a workaround idea for the fact that in search I can’t page past the first 10 results.

Tasks starting tomorrow:

  1. Implement search browse work around – basically giving them a link to the same search in the full NARA catalog.
  2. Update program pages to make it clear I’m not limited to records from the Alaska Digitization program.
  3. Start working through my problem thumbnails.

Link(s) to work:

Posted in Technology | Tagged | Leave a comment

#100DaysOfCode R1D52 – Order matters, accepting good enough

R1D52: March 10, 2018 – Time spent 1hr

Today’s Progress: Worked on Alaskana Explorer. Thumbnail debugging continues.

Thoughts: I fixed my problems from yesterday by changing the order of some of my if-else-if. Basically I had to find an arrangement that did not result in an if statement checking for something non-existent. If I didn’t have to run off to my conference soon, I’d offer more detail.

Now I’ve discovered that the thumbnail workaround I got from the National Archives breaks some thumbnails as it fixes others. I’ve put in a question about how much longer they think they’ll need till we don’t need the workaround. Overall it still fixes more than it breaks. So HOPEFULLY tomorrow I’ll be deploying my refactored code to my web site. Though I will need to check how records I get in search (as opposed to browse) behave.

Link(s) to work:

Posted in Technology | Tagged | Leave a comment

#100DaysOfCode R1D51 – Refactoring on the road, another way to break a thumbnail

R1D51: March 9, 2018 – Time spent 1hr 15 min

Today’s Progress: Worked on Alaskana Explorer. Refactoring completed. Thumbnail debugging continues.

Thoughts: Today I inserted multiple console.log statements into my various if-else-if statements and fixed four special cases of thumbnail breaking. Then I tested all current browse searches saved one. Everything looked great. So I deleted my debugging console.log statements. Then remembered the last browse search I hadn’t tested against. Yep. Code crashed. Record that only links to compressed data files, so no thumbnail. I’m out of time today, but I’ll check it out tomorrow.

Takeaway – debugging console.logs don’t get removed until ALL data you can think of has been tested.

Link(s) to work:

Posted in Technology | Tagged | Leave a comment