Things to Remember:
January 1-9

I always think I will remember more than I do. This is the first in an attempt to create a habit of writing “Things to Remember” round-up posts when I feel inspired to do so.

Picture of a foggy/smoggy sunset where you can barely make out a skyline of downtown Los Angeles

I’ve done a major revamp of my work habits so far in 2018. Part of that was acknowledging that a) normal to-do lists and Trello boards don’t work for my brain and b) my expectations for how much I can achieve in a given day are way, way too high.

It sucks, but I simply do not have the capacity to act on every great project and blog post idea that comes to me. If I try to do that, I end up in this weird paralysis where I semi-start projects, get distracted with something else part-way through, and constantly disappoint myself.

Although I’ve been a major proponent of coworking most of my self-employed career, over the past month I’ve been working from home. That’s enabled me to design my workspace more intentionally. One important component is a whiteboard on the wall next to me that holds two items 1) bull-sh^t things to do (emails, etc) that I can quickly cross off and 2) things to remember.

This “things to remember” portion came into after listening to a Developer Tea episode, “3 Fallacies to Avoid as a Developer”. One of the fallacies was that we think we will always get better at remembering what we learn, the other is that we are terrible at estimating development time, and I can’t remember the third (🙄).

I was initially thinking of doing a weekly “Recap” newsletter or something, but then I remembered my idea to bandwidth ratio and nipped that in the bud. Instead, whenever I feel inspired to do so, I will write a blog post containing a list of whatever is on my whiteboard – things I’ve learned, things I’ve accomplished, memorable tweets, whatever.

Without further ado, here are Things to Remember from around January 1 – 9, in a format that should probably be a dictionary list:

Not-too-technical Things

Long live libraries: I saw this tweet while I was working at a library the other day, and it’s a good point:

Breakout email management from Wes Bos: I learned about this on Wes’s podcast with Scott Tolinski, the Email Managment episode of Syntax.fm. Wes gets way more email than I do so some of that doesn’t apply, but the gist is that relying on email for your to-do list (which I have 500% been prone to doing) equates to giving other people write access to your to-do list. Emails are decisions. Make the decision sooner than later, or decide it is a decision you don’t have to make.

2018 will be the year of CSS: I say hell f#ckin’ yeah to that. I want to remember this proclamation from my wonderful friend Claudina Sarahe:

I like Figma: I missed the Sketch train and have hopped between Illustrator and designing in code when I needed. Figma is a nice, light alternative for getting at least some design guidance in digital form. I created some initial designs for the website for the non-profit Cool Cars For Kids:

Screenshot of header designs in the Figma design application

More Technical things

Lamda Calculus: This was brought to my attention via the Impostor’s Handbook which is turning out to be a goldmine. Lamba Calculus foundation of functional (and pretty much all) programming. It is a language of just functions. Even true and false and and are made of functions in Lamda Caluclus. Here’s an enthusiastic guy live coding Lamda functions in JS, and here’s what looks to be a solid article about it.

Markov chains: This was also brought to mind via the Imposter’s Handbook (it’s really 💯). True to the memory fallacy, I have almost completely forgotten what this is between the time I wrote this on my list and my writing of this blog post (approx. 6 days). A Markov chain is a computer science concept that refers to an event’s probability being dependent only on the state of the previous event. Here’s a nice Khan Academy video with some background. Markov chains come in specifically at about 4:50.

The wp_options table can be slow: I figured this out when debugging a slow site (which turned out to be from the item after this). Here’s a good article from 10up’s blog about wp_options table bloat.

Don’t use a URI in file_get_contents: Specifically, use get_template_directory() rather than get_template_directory_uri() inside the path for file_get_contents, unless you want to add 5+ seconds to your server response time. Here’s a tweet I wrote about that.

Script dependencies in WordPress can bite you: For example, let’s say you have:

wp_enqueue_script('site-js', get_template_directory_url() . 'assets/js/site.js', array('jquery', 'gsap'), '1.0.0');

If gsap is not enqueued, WordPress will not enqueue site-js either.

Inter UI is a cool font: I updated this website from Adelle Sans on Typekit to Inter UI by Rasmus Andersson. I used the “FOUT With A Class” font loading strategy from Zach Leatherman‘s excellent font loading guide. While I spent much, much longer on this task than I anticipated, I learned a lot since previously my webfont loading had only involved using Typekit’s API.

Sorting categories by last post published date: This was a request for a website project, and I had no idea how to do it. I figured out a pretty manual solution wherein I first got all the categories, got the most recent post from each, sorted those posts by date, got the category from each of them, then displayed that list. It’s a weird solution, and I think there is a better one using a query variable and the parse_order parameter within WP_Term_Query. That aside, coding this solution was a major leveling up moment for me. Here’s the code if you’d like to look, and stay tuned for the blog post I wish I’d found when I was researching this solution.

That’s all for now!

I will leave you with this simply gorgeous shot of downtown LA:

Picture of a foggy/smoggy sunset where you can barely make out a skyline of downtown Los Angeles