Coding with Jesse

Journaling for thirty years

The stack of journals I've filled over the past thirty years

I've been writing in my journal since I was sixteen. I just turned forty-four, so that means I have journals covering almost thirty years of my life.

When other people hear about my journaling practice, they say things like "I could never do that", or "I tried it but I couldn't keep up with it."

So if you, too, would like to keep a journal but are struggling to start or maintain it, I thought I'd talk about how I've managed to do it consistently for so long.

  1. First of all, for me, it is definitely not a daily practice! I absolutely do not care how often I do it. Sometimes I write more than once in a day. Sometimes I write a couple times in a month. It doesn't matter to me. This is because..

  2. I don't try to write about everything that happened. Yes, I do write about some things that happened, but these may or may not be big things. I write about the big things, sure, but I also write a lot about small, insignificant anecdotes that I'd like to remember. But most of what I write isn't even about things that happened. Instead...

  3. I write about whatever is on my mind. I use journaling to dump my thoughts on to paper, to give myself a time and place to process the things going on in my life, and help me to put into words the feelings and worries and hopes and goings-ons in my world at that moment. Whether I'm puzzling over which direction to go in my business, or processing a big social event I just attended, or thinking about some world event, or documenting the unfolding pandemic, or taking stock of those special moments as a parent, my journal is a place where I can "think out loud" (on paper).

  4. I write as little or much as I feel like. Sometimes I write just a few sentences. Sometimes I write five pages. If I feel like stopping, I stop. If I get pulled away to do something else, I may or may not come back to finish later. It doesn't really matter. I don't try to write a full page, even though the journals I use have a place for the date at the top. I'll stop and start on any line.

  5. When I start writing, I write the date. When I'm done, I sign my name and close the book. It's not important, but I did this as a teenager for whatever reason, and this gives a sense of closure, like the thoughts are now frozen in the book and I can walk away and leave them behind.

  6. I can go back and see how I felt at certain times in my past. For example, my wife is pregnant with our second son, so I was recently going back to reading what was going on in my mind when she was pregnant with our first son. It was surprising to be reminded of all the stuff that was going on back then that I'd totally forgotten about. It's always enlightening to read about the things I was worried about that never came to be. And it's fun to read about decisions I made while journaling that ended up having a significant impact on my life for years to come. It's also interesting to see the patterns and cycles, the ups and downs in my life, my business, and in my energy levels and inspiration, that ebb and flow year after year.

  7. Even though its nice to go back and read old journals, almost all the benefit comes from the journaling itself. It's the process of thinking, reflecting and writing that takes the thoughts out of my head and puts them on paper. When I'm done journaling, it's like a fresh start. I'm decluttering my mind, getting my thoughts in order, and throwing out things I no longer need. When I'm done journaling, I have a fresh energy where I'm ready to take on something new.

  8. Although I don't have any strict routine around journaling, I almost always like to journal on Saturday mornings with my first coffee of the day. It's a great time to have some quiet time to myself, wake up slowly, reflect on what happened over the past week, take stock of all that's going on in the back of my mind, and decide on what I want to do with my free time on the weekend. I'll sit there for an hour or so, and when I finish, I'm relaxed and inspired and ready to go have a wonderful weekend.

  9. I don't write for anyone but myself. Sure, I know in the back of my mind that one day, in the far future, my children or grandchildren might read through these, so there are a few things I might not say, or might write in a secret code for myself, but otherwise these are secret documents that are written for nobody but myself.

  10. It doesn't really matter what books or pens you use, as long as you enjoy them. My favourite books are either Moleskine or Leuchturm1917, A5 ruled black hardcover notebooks. They're pricey, but they don't fall apart, and they're a pleasure to write in. I want them to last a long time. My favourite pen at the moment is a retractable black Stabilo Palette 0.4mm gel pen.

If you're curious about journaling, or struggled with it in the past, I hope this helps you see a different approach that might work better for you. I highly recommend journaling, though it might not be for everyone. For me, it helps me think and process my life, allowing my mind to be quieter overall, while having the small benefit of documenting the things in my life that would otherwise be easily forgotten.

Published on November 12nd, 2024. © Jesse Skinner

I refuse to be a slave to The Algorithm

A dark shadowy figure sits on a throne in a Gothic cathedral

It used to be fun to post online and share things with friends. It didn't matter what you said or did, you'd get comments and likes from your friends. Now, that has all changed.

I don't remember when The Algorithm showed up. At first nobody noticed. Our feeds didn't change much. When we opened the Social Network, we'd see some big news from a friend at the top. It was helpful not to have the important things buried, so we thanked The Algorithm.

Slowly, eventually, things got confusing. We would share some things with friends, and nobody would see them. We would share other things with friends, and they would go viral. We all struggled to understand what The Algorithm was doing.

Only The Algorithm decides who will see your posts. Nobody understands the rhyme or reason of it all. Not even the people who work at the Social Network.

You must be very careful not to make The Algorithm angry. But nobody really knows what makes The Algorithm angry.

Some think it's the words we use that anger The Algorithm. People whisper in the shadows, "Do not use this word, or you will be punished." "Use this emoji instead of this word to hide the meaning from The Algorithm." "Uh oh, it seems The Algorithm has learned of the emoji, use this one instead."

Others think it may be our behaviour that can make The Algorithm happy.

"Be sure to like and comment on others' posts to boost your reach." "Log in once a day to show The Algorithm that you're a faithful servant." "If you don't enable push notifications, The Algorithm will have its revenge."

I've seen so many people become a slave to The Algorithm. They started off sharing the things they care about. They didn't get much response. Then, one random day, they shared yet another thing. Maybe it was a photo of themselves at the beach. Maybe it was a funny video they made on a whim. Maybe it was a meme they made about a politician. Suddenly, The Algorithm smiled at them and showered them with more attention than they had ever experienced in their entire lives.

The next day, still glowing from their newly found fame, they shared again. The Algorithm ignored them. They stared at their notifications, but nothing came. Nobody saw what they posted.

"What does The Algorithm want from me?" they wondered. They tried sharing something else, something very similar to what had succeeded. Maybe it was another photo of themselves in a swimsuit. Or another funny video. Or they made another meme. The Algorithm nodded at them and they got some more attention, but nothing close to what they had experienced before. They hungered for more, but didn't know how to get what they desired. They were trying to win a game, but had no idea what the rules were.

Soon, they were posting the same thing every day. Swimsuit photos. Funny videos. Political memes. Whatever it was The Algorithm had liked at first, they tried again and again to recreate it. But it was never as successful as that first time.

See, The Algorithm is doing more than shaping your feed. The Algorithm is shaping you, and everyone on the Social Network. The Algorithm rewards and punishes us at random, leaving us to guess what the secret factors are. The Algorithm encourages us to self-censor, or to create content we don't care about. We just want to be heard. We just want to share and connect with friends. The Algorithm knows this and knows how far we're willing to go to get what we desire.

Well, I refuse to be a slave to The Algorithm. I'm not going to try to guess what The Algorithm wants. I'm not going to play its games.

I'm going to spend my time in places without a gatekeeper. I'll be writing on my own blog. I'll be scrolling through my RSS reader to read others' blog posts. I'll be listening to podcasts in my podcast player. I'll be reading books and listening to audio books. I'll be reading and posting and liking and boosting on Mastodon. I invite you to join me.

Published on November 7th, 2024. © Jesse Skinner

Autumn: A time to simplify

A cup of tea in autumn, fallen leaves on grass in the background

Today is Battery Collection Day in my city. A chance to say goodbye to all those dead batteries I've been collecting all year. I put them out with the many bags of dead leaves I raked this week. There's also a recycling box full of old paperwork I managed to get rid of while cleaning my office.

Autumn is naturally a time to purge and simplify. Animals retreat into their homes, stockpiling food or preparing for hibernation. Trees, anticipating the destructive force of winter, pull their energy inwards and shed their leaves. Farmers harvest the year's crops and sell what they can, or store some away for the cold months.

Coincidentally, or maybe not, I also feel a deep urge to simplify my own life, to pare down, to have less, to do less. I'm saying "no" to more opportunities, the ones that don't feel like they fit. I have my few favourite clients, and I'm not looking to take on new work. I'm looking to declutter my house, to sell, donate or discard items which I don't need.

I feel a desire to finish things instead of starting new things. I'm playing video games I started when I was a child but never finished. I'm reading books that sat with a bookmark in them for years. I'm checking items off my To Do List that have been on there all year. I'm filing taxes and clearing out drawers and getting things done. I'm drinking tea that has sat in my cupboard all year, enjoying tossing the empty boxes away.

There's a coziness that comes with simplifying. As I check off each task, discard each item, or finish each project, my world feels calmer.

Eventually Winter will be here, a time to hunker down and enjoy the simple life. Eventually it will be time to start new projects, to expand my world and embrace the excitement. My wife will be having a baby, and there'll be new life in our home, a new beginning.

For now, though, you'll find me drinking tea and trying to finally beat Final Fantasy on the NES.

Published on November 5th, 2024. © Jesse Skinner

Setting up a new computer

I love getting a new computer. I don't copy over all my files from my old computer anymore. Instead, I like to use it as a chance for a fresh start.

I have a vision, but so far it's been only a dream. My vision is that I could get access to any new computer, and within a few minutes be totally up and running with my full developer work environment, all my photos and videos, my documents, and everything else I have and need. The reality is nothing like this, of course. But I'm getting closer to it. Here's how I did it with my new laptop this past month.

Software

The first thing I need to do is set up my operating system (arch btw) and download all the software I need and use on a regular basis.

For me, this includes installing i3, fish, VS Code, git, rsync, rclone, mariadb, node, keepassxc, aws-cli, terminator, chromium, libreoffice, spotify, syncthing, workrave, and a few other things.

I could probably automate this and install everything that I had on my old computer, but I actually love the process of starting from scratch here and only installing the software I actually need and use. Arch Linux starts with a very minimalist environment, so I know that there's really nothing on this computer that I haven't explicitly installed.

Starting from scratch also gives a chance to try out some new internal services. For example, I'm now trying out using iwctl to manage my wifi connections instead of wpa_supplicant.

SSH keys

Once I have my software installed, the only thing I have to copy over from my old computer on a usb stick are my SSH keys, ie. the contents of ~/.ssh/.

These keys give me access to everything else. Once I have these keys, I'm already starting to feel at home.

Git

The SSH keys give me access to servers. On one of these server lives my private Git repositories. I like to keep all these git clones in a /code directory on my computer. I clone all my active projects via ssh:

sudo mkdir /code
sudo chown jesse:jesse /code
cd /code
git clone ssh://[email protected]/~/git/codingwithjesse
git clone ssh://[email protected]/~/git/joyofsvelte
git clone ssh://[email protected]/~/git/dotfiles
# etc..

dotfiles

One of the Git repos I cloned is a private dotfiles repository that has all the configuration I care about. I make sure to push changes to this repo from my old computer one last time before cloning here.

I use symlinks in my home directory so that the files live in the repo. I have an install.sh in my dotfiles repo that sets it all up:

#!/bin/bash

BACKUP=backup-`date +%s`

mkdir "$BACKUP"
mv ~/.bashrc "$BACKUP"
mv ~/.bash_prompt "$BACKUP"
mv ~/.bash_profile "$BACKUP"
mv ~/.aws "$BACKUP"
mv ~/.gitconfig "$BACKUP"
mv ~/.config/i3 "$BACKUP"
mv ~/.config/i3status "$BACKUP"
mv ~/.config/fish "$BACKUP"
mv ~/.config/rclone "$BACKUP"
mv ~/.local/share/fish/fish_history "$BACKUP"

DIR=`pwd`

ln -s $DIR/.bashrc ~/.bashrc
ln -s $DIR/.bash_profile ~/.bash_profile
ln -s $DIR/.bash_prompt ~/.bash_prompt
ln -s $DIR/.aws ~/.aws
ln -s $DIR/.gitconfig ~/.gitconfig
ln -s $DIR/.config/i3 ~/.config/i3
ln -s $DIR/.config/i3status ~/.config/i3status
ln -s $DIR/.config/fish ~/.config/fish
ln -s $DIR/.config/rclone ~/.config/rclone
ln -s $DIR/.local/share/fish/fish_history ~/.local/share/fish/fish_history

Of course, the set of dotfiles you care about will probably be different.

rsync

I also keep a backup of all my important documents (taxes, contracts, PDFs and spreadsheets) and my passwords (keepass database) on my server. I use rsync to backup these files, and I also use it to restore my backups:

rsync -avz [email protected]:~/docs ~/docs
rsync -avz [email protected]:~/passwords ~/passwords

Perhaps I could keep these in Git repos as well, for simplicity. It might be nice to have versioning on my tax documents and contracts, even though they don't change much.

rclone

For larger files, like photos and videos, I use rclone to manage an encrypted backup in object storage. I really enjoy using rclone. I love how it provides a really easy user command-line user interface, abstracting away a wide variety of cloud storage systems. I've switched between these services based on price a few times, and it was really easy to do.

rclone also has a useful ability to mount a backup to a directory. For the first time on this new computer, I have this set up in /mnt/media, with directories like /mnt/media/photos and /mnt/media/videos so I can easily browse and view all my content without copying anything to my computer.

I have this set up as a user-based systemd service. It's user-based so that it has access to my credentials in ~/.config/rclone.

I created a file in ~/.config/systemd/user/rclone.service:

[Unit]
Description=rclone
AssertPathIsDirectory=/mnt
# Make sure we have network enabled
After=network.target

[Service]
Type=simple

ExecStart=/usr/bin/rclone mount --allow-other --vfs-cache-mode full media: /mnt/media

# Perform lazy unmount
ExecStop=/usr/bin/fusermount -zu /mnt/media

# Restart the service whenever rclone exists with non-zero exit code
Restart=on-failure
RestartSec=15

[Install]
# Autostart after reboot
WantedBy=default.target

I enabled and started it with systemctl:

systemctl --user daemon-reload
systemctl --user enable rclone
systemctl --user start rclone

This was my first time creating a systemd service manually, and the first time I added a user-based service, and I found it really cool. I would like to learn more about systemd. It seems like a really simple and powerful system, so I can see why so many people have strong feelings about it.

Home! Sweet home!

From here I'm all set-up and ready to go. I immediately feel at home, and quickly forget that this isn't the same computer I've always used.

All my code lives in Git repos that I push to a remote server. All my important configuration files live in a Git repo. All my important documents and passwords get backed up to a remote server. All my photos and videos live in a remote bucket storage. As long as I have access to my SSH keys, I'll be able to get up and running from scratch on a new computer within a few hours.

There's really nothing that lives only on this computer, and that makes me feel great.

Published on October 30th, 2024. © Jesse Skinner

Svelte 5 is here!

In case you missed it, Svelte 5 was finally released!

It's been here for a while as a pre-release, but I held off on using it until it was finalized. (I didn't want to learn how to use the new syntax and then have to un-learn and re-learn as the team reworked things and added or removed functionality. But now these decisions have been finalized, the syntax is cemented, and I'm excited to start trying out these new ways of doing things.)

Svelte 5 marks a significant change in the language itself. "Runes" are a new way of writing reactive code with Svelte. This allows a major simplification of the API and surface area of Svelte, making Svelte easier for beginners to learn and use. I think it was a smart move, as it surely makes it easier for people to switch to Svelte.

For those of us who are already deeply invested in Svelte, the new syntax will take some getting used to. Fortunately, the old syntax will continue to be available until Svelte 6 or 7 is released, so we have some time to adapt and learn. Also, there is a migration script. I haven't tried it yet, but it should automatically switch your code over to the new syntax.

Some of the more "magic" Svelte features, like the reactive $: statement, are now deprecated. So are some features I really loved, such as being able to add modifiers to event handlers like on:click|preventDefault. Stores will continue to be supported, but there is some pressure to switch over to using runes instead. I haven't made up my mind yet as to whether I'll rewrite all my stores with runes, or whether I still prefer how stores work in some cases.

I'm also excited that this marks the beginning of a new chapter in the Svelte story. I think it's similar to when React introduced hooks, and changed the way we write React code. I can't imagine hooks will ever go away, and similarly I think runes are here to stay.

If you still haven't tried out Svelte, I think this is the perfect time to learn it. It's already a very mature platform, and this recent change means things will likely be quite stable from here on out. I started using Svelte in production in 2019, and I haven't looked back.

To read more about migrating to Svelte, including all the new syntax, check out the well-written Svelte 5 migration guide. Be sure to click on the "Why we did this" sections for more background and context on the reasoning for the changes. I found these to be very helpful to understand the logic around the changes.

Published on October 29th, 2024. © Jesse Skinner

Does your web server scale down?

A laptop computer sleeping in the moonlight

Are you paying for servers sitting idle in the middle of the night?

When we talk about scaling a web server, we often focus on scaling up. Can your server handle a spike in traffic? As your business grows, can your database handle the growth?

There's less focus on scaling down. It makes sense, because most businesses are focused on growth. Not too many are looking to shrink. But if you're not careful, your server costs might go up and never come back down.

No web traffic is completely consistent. It grows during the day when people are awake. It shrinks at night when people sleep. It spikes with a popular marketing campaign. It retracts after a marketing campaign winds down.

A simple approach to scaling is to turn up the dial when a server gets overwhelmed. Upgrade to a server with a more powerful CPU. Increase the memory available. Unfortunately, this approach only moves in one direction.

A better solution is to have a dial that can turn both up and down. The way to achieve this is through a pool of servers and a load balancer. When traffic increases, start up new servers. When traffic decreases, terminate the excess capacity. Keep all your servers as busy as possible.

For lower volume sites, serverless deployments handle this beautifully. When nobody is using the server, you don't pay anything. When there's a spike, it can scale up to handle it.

At some point, it becomes cheaper and faster to run your own servers. If you do, you'll want an autoscaling pool and a load balancer. It might only have a small server in it most of the time. You'll need to define some rules so that it scales up when it gets overwhelmed. When things calm down, make sure it scales back down to one server.

You'll sleep better at night knowing that your servers and costs are resting too.

Published on June 12nd, 2024. © Jesse Skinner
<< older posts