Scheduling cron tasks in mixed time zones
Jake McCrary's Musings
by Jake McCrary
1M ago
Have you ever needed to schedule a repeating task on a Linux host? If so, you’ve probably reached for cron. cron is widely available and reliable; it is a great choice for scheduling tasks. Sometimes you find yourself scheduling a task and, ideally, you’d be scheduling that task referencing a different time zone. This is a common need if your programs are interacting with systems hosted in different areas of the world. If one system you interact with starts up at 7 AM Europe/London and another at 8 AM America/New_York, it would be much better to schedule your program to run using times specifi ..read more
Visit website
Reading in 2023
Jake McCrary's Musings
by Jake McCrary
5M ago
At the beginning of every year (not so much the beginning this year), I take the time to update my records of what I’ve read the previous year and write up a summary. Previous summaries: 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022. I’ve continued to keep track of my reading using Goodreads. My profile has nearly the full list of the books I’ve read since 2010. 2023 Goals Last year I wrote: I’d like to do a better job of keeping track of my reading. This should be pretty easy to do. I don’t feel too bad about the reduction in reading but I’d like to read more this year. Some of ..read more
Visit website
Reading in 2022
Jake McCrary's Musings
by Jake McCrary
1y ago
At the beginning of every year, I look back at my records and reflect on the books I read the previous year. Previous years: 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021. I’ve continued to keep track of my reading using Goodreads. My profile has nearly the full list of the books I’ve read since 2010. This year I did a poor job of keeping Goodreads updated. I had somewhat stopped updating Goodreads, or at least caring if I did it accurately, because I thought they were killing the ability to export your data. Luckily, that feature hasn’t been removed so I’m going to continue using the s ..read more
Visit website
Bookmarklets on mobile are useful
Jake McCrary's Musings
by Jake McCrary
1y ago
Bookmarklets, little snippets of JavaScript that you keep around as a bookmark, are useful. They let you execute some JavaScript to perform almost any action you want on a website. Some bookmarklets I use on my desktop browser include: A collection of bookmarklets that let you change the playback speed of most embedded videos. A bookmarklet to manipulate the URL of the page you’re visiting. A bookmarklet to save the current page’s URL to pinboard.in. For years, I thought I was restricted to only using bookmarklets in my desktop web browser. I hadn’t effectively used mobile bookmarks before a ..read more
Visit website
Reading in 2021
Jake McCrary's Musings
by Jake McCrary
2y ago
At the beginning of every year, I reflect on books I’ve read in the previous year. I take a look at my records, fix errors, and think about reading goals for the upcoming year. Here are links to my previous end-of-year reflections: 2013, 2014, 2015, 2016, 2017, 2018, 2019, and 2020. I’ve continued to keep track of my reading using Goodreads. My profile has nearly the full list of the books I’ve read since 2010. Here is my 2021. 2021 Goals Last year I wrote: I have quite a few unread books sitting on my virtual and physical bookshelf. This feels like setting a really low-bar but this year I’d ..read more
Visit website
Tests are living documentation
Jake McCrary's Musings
by Jake McCrary
3y ago
Tests can serve many purposes. You might write tests as a way of driving the design of your software. Other tests might be written in response to a discovered bug and, if written first, those tests you know when you’ve fixed the bug and act as guardrails preventing the reintroduction of that bug. Tests can also be used to confirm you haven’t changed behavior while refactoring. Tests can also be used as documentation. Unlike non-executable documentation, tests will always match the implementation’s behavior. An example in a comment or other documentation deserves to be in a test. Take the follo ..read more
Visit website
Improve your tests by picking better constants
Jake McCrary's Musings
by Jake McCrary
3y ago
The constants you use in unit tests matter. Like test and variable names, they can improve the readability of your code and make it easier to understand test failures. Imagine the following. A new developer joins your team and asks a question about how the code resolves config values. You are unsure of the details so you pair up with the new teammate to dig into the code. You know the codebase uses a relatively simple key-value pair concept for configuration. It reads keys and values from a known files and, based on some rules, either ignores or overrides values when keys are duplicated across ..read more
Visit website
Reading in 2020
Jake McCrary's Musings
by Jake McCrary
3y ago
At the beginning of every year I reflect on my reading from the previous year. I take a look at my records, fix errors, and think about reading goals for the upcoming year. Here are links to my previous end-of-year reflections: 2013, 2014, 2015, 2016, 2017, 2018, and 2019. I’ve continued to keep track of my reading using Goodreads. My profile has nearly the full list of the books I’ve read since 2010. Here is my 2020. 2020 Goals Last year I wrote: I was encouraged by how many non-fiction books I read this year and how many of them ended up earning a five star rating. I’d like to continue that ..read more
Visit website
Speeding up magit
Jake McCrary's Musings
by Jake McCrary
4y ago
Magit is a great Emacs tool and by far my favorite way of interacting with git repositories. I use Magit nearly every day. Unfortunately, refreshing the magit-status buffer is sluggish when you are working in a large repository. A few months ago, I became sick of waiting and investigated how to speed up refreshing the status buffer. After doing some research, I learned about the magit-refresh-verbose variable. Setting magit-refresh-verbose to true causes Magit to print some very useful output to your *Messages* buffer. This output shows how many seconds each step of magit-status takes. Here is ..read more
Visit website
Creating a custom Kindle dictionary
Jake McCrary's Musings
by Jake McCrary
4y ago
Back in April 2013, I created and published a custom Kindle dictionary for the book Dune. As far as I can tell, my Dune dictionary was the very first custom Kindle dictionary for a fiction book. I created it because I was reading Dune for the first time and there were many unfamiliar words. These words could not be looked up by my Kindle because they were not found in any of on-device dictionaries. These words were in Dune’s glossary but flipping back-and-forth to that on a Kindle was a huge pain. I initially worked around this by printing a word list from Wikipedia and carrying it with me. Th ..read more
Visit website

Follow Jake McCrary's Musings on FeedSpot

Continue with Google
Continue with Apple
OR