This post is unofficially sponsored by Hannaford Nature’s Promise Frozen Organic Peas with my unofficial slogan, “oh right, I need a vegetable.” But, honestly, these are great peas.
]]>(I wrote about this idea last year when I built an e-paper display to show the book I’m reading.)
To make this feature work, I updated read-action (my GitHub action that keeps track of my books in a JSON file) to add an output parameter. The nowReading
output parameter contains the metadata of the book I’m currently reading.
Now, every time I use read-action to add a book I’ve started, my workflow can access a parameter containing the data to display that book on my site. But, I still need to get that data from a private repository to my public repository.
Since I run read-action in a private repository, I used a repository dispatch to pass the book data to my public repository. I did this by updating the workflow in my private repository to add a step after read-action. This new step checks if read-action has the output parameter nowReading
. If it does, then it will use repository-dispatch to send the contents of nowReading
to my public repository as an event.
- name: Now reading
if: steps.read_action.outputs.nowReading != ''
uses: peter-evans/repository-dispatch@v2
with:
repository: katydecorah/katydecorah.github.io
event-type: now-reading
client-payload: '{"github": ${{ toJson(steps.read_action.outputs.nowReading) }}}'
In my public repository, I created a workflow that waits to receive the now-reading repository dispatch, and once triggered, it will write the contents to _data/now-reading.json
and commit the file.
name: Now reading
on:
repository_dispatch:
types: [now-reading]
jobs:
nowReading:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update now-reading.json
env:
JSON_DOC: ${{ github.event.client_payload.github }}
run: |
echo $JSON_DOC > _data/now-reading.json
- run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A && git commit -m "📚 Now Reading"
git push
As soon as the workflow commits the file, GitHub pages will build the site to display the book. My site uses the following markup (more or less):
<h2>Now reading</h2>
{% assign nowReading = site.data['now-reading'] %}
<div class="home-now-reading">
<img alt="" src="book-{{nowReading.isbn}}.png" />
<div>
<strong>{{nowReading.title}}</strong> by {{nowReading.authors | join: ", "}}
</div>
</div>
Or, I can tell you right here, that I’m currently reading “The Worlds I See” by Fei-Fei Li. (This sentence will update once I start a new book.)
]]>Where can you find trusted documentation and examples? For web projects, I start with MDN and web.dev, these sites are well maintained, cited, and beginner friendly. While you could go right to the technology’s specification, I find that these sites help explain the source material through practical use cases. Documentation does expire; check to see when the page was published or last updated. If it was over a year ago, then you will want to check if there’s been changes to the technology since then.
Is there a linter? If you’re working in a programming language, then there is likely a linter that can help guide you. When starting a new JavaScript or TypeScript project, I check for an accompanying plugin and then enable it with the recommended configuration. Plugins have helped me improve my Jest tests, and learn web component and TypeScript best practices. Linters are excellent teaching tools and guides.
What other tools can give you signal? If you’re building with a new framework, tools that measure performance like Lighthouse and Accessibility Insights can give you hints if you’re compromising on performance, accessibility, and many other metrics. These tools will challenge your assumption that your project works because “it works for me”, towards making your project more inclusive.
“How can I simplify this function?” And, proceed with caution, other AI prompts. If you have access to AI tools like Copilot, you can ask how to simplify your code or improve its readability. However, if you are an absolute beginner to whatever you are learning, be skeptical of guidance generated by AI; it can confidently lead you in the opposite direction.
“How do you stay up-to-date?” Next time you are in the same space as someone in your industry, consider asking this question to learn from how they learn. Chances are you will learn a new source for information or validate your current learning path.
How are others doing it? After checking out trusted documentation to get a sense for the patterns, search for tutorials on your subject. Tutorials on personal sites are a gift as they can often provide raw feedback and examples that may more closely match your use case. You’ll want to use the tutorial’s material thoughtfully and consider finding an additional source to help verify content.
And once you have learned something new, you should consider writing about it.
]]>Shot with Olympus E-M10 Mark IV processed with VSCO with e1 preset.
]]>When this site turned 1, I wrote about it. There’s one important quote from that post:
Spending hours on potentially useless web projects, but loving every minute of it.
I wrote that sentence a few months before I would join Mapbox and it’s almost sweet how untrue the statement about useless projects turned out to be.
My story with Mapbox actually started earlier that year. A Mapboxer was scouting on Dribbble and found my (one and only) post, leading them to this site. They emailed me to see if I was interested in working at Mapbox and referenced my posts. The next month, I flew down to DC and worked out of the garage for a week. I had to turn down the offer because I wasn’t ready to relocate.
I continued to work on my blog, sharing and writing about my CodePen projects. And then I wrote another blog post, tweeted it, and a few hours later I had an email asking me to join the Mapbox team remotely; the email referenced that blog post.
I stayed at Mapbox for over 7 years where I met and learned from the best of the best. I worked with people who saw me, pushed me, and challenged me.
Around the same time I started at Mapbox, I befriended Joni Trythall on CodePen. After she tweeted about an interesting conference, I emailed the organizer (who turned out to be Joni) about how I could help. A few weeks later, I was a co-organizer of Ela Conf. In our last year running in 2017, Shanise Barona joined the organizing team and we stayed in touch.
Fast-forward to the end of 2021, I had three job offers. In all three, I had a connection from Ela Conf, with one being Shanise. Shanise was working on Accessibility Insights at Microsoft, which was the job I wanted but didn’t think I would get. And then I did.
Through all those potentially useless web projects, I built a career, made friends, and, most of all, grew up right here, in plain HTML and CSS.
So, that thing you weren’t sure about sharing? Share it.
]]>But for over 2 years, I dutifully tracked my (alleged) heartburn. At this point, I was 3 years into having trouble swallowing foods and waking through the night with heartburn-like pain.
I did all the tests and saw all the specialists, but everything came back normal. My doctor said, “I know you’re uncomfortable, but there’s not much else I can do.” I coped the best way I knew how; I created an iOS shortcut that added a row to a Google spreadsheet to track the date and time of my heartburn. There were charts.
If I couldn’t fix the pain I had with swallowing food and drink then surely I could cure heartburn. I ran experiments to see if my heartburn changed. I tried:
When all my experiments failed, I asked my doctor to repeat all the tests. The last (and worst) test proved that I have achalasia, a rare swallowing disorder that impairs the esophagus’s ability to move food and liquid to the stomach. It was never heartburn.
One year ago today, I had surgery to treat achalasia. I now have an esophagus that works much better and this terribly boring data-measuring anecdote.
I was perfectly in control of all the data about my alleged heartburn, without actually being able to control it. My data collection became a strange comfort. A worry stone. Hope.
I did learn a few things on my path to diagnosis: