I added a new feature to the site called “stars.” When it is enabled, you can add a little star anywhere on the site by tapping.
I’m planning to write an article about why I wrote it, but in the meantime let me know if you have any feedback on the feature: sean@seanmcp.com
Notes
A feed of short notes, thoughts, or ideas, preserved here on SeanMcP.com.
This week I gave a talk titled React Bug Catcher: Tools and strategies for debugging React apps at React Global 2022. It was a good experience, but I really underestimated (again) how much time it takes to prepare a conference talk. ⌛️
LEGO Bricktales looks so good! It’s like an open-ended LEGO Island, a favorite from my childhood. Hopefully the real game turns out like the trailer 🧱
Requesting data before rendering the user interface is putting the horse before the cart. It’s great to see tools like React Router moving in that direction. 🐎
I started watching Brian Vaughn’s Deep dive with the React DevTools profiler to learn more about using the React Profiler, but there are a bunch of general tips for creating more performant React applications as well.
Watching it was a good use of 37 minutes!
In doing research on debugging, I’ve found Diomidis Spinellis’ Effective Debugging to be really insightful. It’s chock-full of helpful tips and real-world examples that illustrate the recommendations well.
If you are looking for a general book on debugging, then I highly recommend it.
In Deep dive into React Native’s New Architecture, Atharva Patil does a great job of summarizing all of the changes that are coming to React Native in 2022. Definitely worth the 7-minute read.
I have enjoyed working with React for the past few years; it always felt like the right level of abstraction from working with the actual DOM. That being said, I have also become wary of how error-prone React hooks code often becomes. Solid.js feels like it uses a lot of the ergonomic parts of React while minimizing confusion and errors.
– Nick Scialli in Solid.js feels like what I always wanted React to be
Today marks the end of a chapter and the start of a new adventure. Onward and upward! 🦄
I was able to update @11ty/eleventy
for this site from version 0.12.0
to 1.0.0
without any issues only one hiccup.
Kudos to Zach Leatherman & co. on the 1.0 release!
20 Things I’ve Learned in my 20 Years as a Software Engineer by Justin Etheredge of Simple Thread made it to the top of Hacker News, and there were some interesting insights from the article.
There is no “right” architecture, you’ll never pay down all of your technical debt, you’ll never design the perfect interface, your tests will always be too slow. This isn’t an excuse to never make things better, but instead a way to give you perspective. Worry less about elegance and perfection; instead strive for continuous improvement and creating a livable system that your team enjoys working in and sustainably delivers value.
[Watch out for the 0.1x programmer] who wastes time, doesn’t ask for feedback, doesn’t test their code, doesn’t consider edge cases, etc… We should be far more concerned with keeping 0.1x programmers off our teams than finding the mythical 10x programmer.
If you are using your tools, and you don’t love or hate them in a myriad of ways, you need to experience more. You need to explore other languages, libraries, and paradigms. There are few ways of leveling up your skills faster than actively seeking out how others accomplish tasks with different tools and techniques than you do.
Good written communication is one of the most important skills for any software engineer to master.
The article is worth the read (warning: a few vulgarities).
Every time I use esbuild, I’m impressed with its simplicity and speed. This new generation of JS tooling is really exciting!
Google Chrome has been crashing on me without warning the past two weeks, so I’m going to give Microsoft Edge another try. Nice to see that there are more extensions available in Edge Add-on store.
Pop quiz: What does the following evaluate to in JavaScript?
Object.keys('hmm...').length
Answer: 6
. Here JS treats the string as a type of array which itself is a type of object. Who knew!
WebAssembly sounds neat and has real potential, but the setup for a “Hello World” programming is pretty complex: https://wasmbyexample.dev/examples/hello-world/hello-world.assemblyscript.en-us.html
In the article How I Built My Blog, Josh Comeau walks through the tech stack behind his lovely personal site. It’s neat to see the choices that he made and the reasoning behind them.
Netlify is moving their React UI component library to Tailwind CSS:
what started with organised PostCSS gradually grew to become a complex and entangled global CSS architecture with a lot of specificity and overrides. … the added tech debt it introduces makes it difficult to keep shipping fast without adding any regressions. Besides, as the number of frontend developers contributing to the codebase also grows, this kind of CSS architecture becomes even more difficult to work with.
To accomplish this, they set a deadline, divided the work across their front-end guild, and tracked their progress on GitHub. They added some internal tooling for visual-regression tests and to make building class lists easier, especially for conditional cases.
If you wait until you are feeling productive, you will never be.
One of the things I miss most about Windows when working on macOS is the window management.
I’ve tried a few window management apps in the past, and today I’m giving Rectangle a spin. So far, the keyboard shortcuts feel logical and the app isn’t trying to do too much.
We’ll see how it goes!
This morning I added a new page with an embedded emoji picker: https://www.seanmcp.com/sm/emoji-picker/
It embeds Nolan Lawson’s emoji-picker
web component in a webpage and prompts you to copy when selecting an emoji. You can see the source code here.
I’ll use this when doing computer activities with my three-year-old son, but others may find it useful as well.
I enjoyed reading Hacker Christianity by Ben Hoyt. It’s nice to ready perspectives from the intersection of Christianity and programming. I’ll be on the lookout for more like this.
Today I learned that in Vim :w
stands for “write” and is not a weird alias for “save.” That’s much easier to remember.
I added a /uses page to keep track of the extensions and programs that I use everyday. Nothing is revolutionary, but there are a few extensions and user scripts that I find helpful.
github1s
is the coolest thing that I have seen in a while. By changing the url of any GitHub repository, you can open the repo in a VS Code browser. This is begging for a userscript to add a link to every GitHub repo
I tried for a long time to find this resource, so I’m going to save it here: Add DuckDuckGo-powered search to your website
You can add site-wide search to any static site using an HTML form
and a few fields. Pretty cool!
To find the date a file was created in Node, you can use the fs.stat
or fs.statSync
methods and look for birthdate
. See this answer on StackOverflow.
This might work differently based on your operating system, so your mileage may vary.
Max Böck has a guide for persisting files inbetween Netlify builds using a custom plugin.
It looks pretty straightforward, so I’m going to file that away for later 🗄
The W3C has a feed validator that is pretty handy when you are working on generating RSS/XML feeds.
10 bad TypeScript habits to break this year was shared on the latest edition of JavaScript Weekly.
There are a few useful tidbits in there, but I’m particularly interested in using class Foo implements Bar
to mock data for tests (6) and using descriptive names for generics (7).
I added a new section to the site called “Bookshelf”. This was modelled after David Rupert’s bookshelf, with the additional ability to include notes for each book.
I’m really enjoying the ability to add features to my site as needed.
🚀 I released a new version of eleventy-plugin-emoji
this morning. Two minor changes: 1) the filter now supports a label, and 2) the default class name is now eleventy-emoji
.
Nunjucks and Liquid have different methods for passing arguments to a filter.
In Nunjucks, it’s:
{{ 'value' | filter('arg') }}
In Liquid, it’s:
{{ 'value' | filter: 'arg' }}
Each note is a simple markdown file. All the data necessary to render on the screen is set at a higher level, so it’s super simple.
Edit: Okay, I needed to add a date field.
My favorite part of this setup is that I can commit a new note through GitHub, which automatically triggers a Netlify build.
Why messages? I really like the idea of preserving content that would otherwise be shared on social media on my own site.
It’s definitely not the most popular option (in fact, I doubt anyone else will read these), but I think it’s the right decision in the long run.
Hello world!