← Home Subscribe Replies Archive Reading Also on Micro.blog
  • Daily Planners for 2021

    The last few years I’ve enjoyed keeping a paper journal of some kind for both personal and work related things. The separation is good so that private work stuff can stay at work, and also so that I’m not looking at work when I should be relaxing or doing other things.

    For 2021, I’ve landed on using a Hobonichi Techo (A6) for my personal planner, and a Hobonichi Cousin (A5) for work. The larger size is helpful for work because it gives me room to take notes and sketch out ideas, where for home, I think the smaller size will be nice since I can more easily take it with me.

    Another benefit of the Cousin is the integrated weeks pages — the smaller planner has weeks as an add-on book — which I hope will be good for planning out my work tasks. A week at a time is feels like about the right resolution for me to be thinking about work, so I’m hoping it’ll work out well.

    → 10:32 PM, Nov 28
  • I’m surprised that the further we get away from the election, the less threatening all the bluster from Republicans about throwing away votes and stolen elections seems, and the more sad and pathetic it all looks. Not that I don’t think refusing to concede, and claiming Democrats stole the election without evidence, is disgusting and will only make the next several years that much more miserable than they needed to be. Still, this thing which felt so threatening before feels so impotent and laughable now.

    → 5:50 PM, Nov 10
  • It’s Morning in America Again

    Congratulations to everyone on electing Joe Biden President of the United States. No one knows what happens next, but a lot of people worked incredibly hard for this, and all of us have suffered in one way or another under the evil and malice of the last four years.

    We all deserve to celebrate today, and then it’s time to win those Senate seats in Georgia.

    → 1:05 PM, Nov 7
  • The “Butt in Chair“ Writing Process

    I’ve been reading all of John Scalzi’s Old Man’s War series of books — of which there are six — and was interested to read this article on his writing process.

    I’ve been writing books now for 20 years and my experience really is that it’s not complicated, it’s just mostly sitting down and doing it, one day after another. Inspiration for me happens because I’m writing, not the other way around. In talking with other long-time writers, I’ve learned that’s how it works for most of us.

    This reminds me a lot of when I read Stephen King’s autobiography or Anne Lamont’s Bird by Bird. I guess the “sit down each morning and write for a set amount of time“ method is a pretty common one among successful writers.

    → 4:14 PM, Oct 19
  • I think Trump was trying to project strength – or something – when he went back to the White House, but all I saw was a sick old man struggling to breath, and who was too caught up in his own macho act to not put himself and the people around him in unnecessary danger.

    → 2:23 AM, Oct 6
  • If you’re into video games and watching other people play them, come follow me on Twitch and hang out. I’ve been streaming things like Stardew Valley, Super Mario Maker 2, Splatoon 2, and Cities: Skylines (although I’m not too good yet).

    → 6:04 PM, Sep 27
  • This is the view out of my office window today. I guess ever year now the state will catch on fire and spew so much smoke into the atmosphere it won’t be safe to go outside? Something to get used to, I guess.

    Smoke

    → 12:15 PM, Sep 9
  • Hyrule Warriors: Age of Calamity

    Just watched the trailer for Hyrule Warriors: Age of Calamity, and I’ll definitely be playing this. I enjoyed the first game, but it felt disconnected from the world of Zelda. It’s exciting that the third-party developer that makes Warriors games are working closer with Nintendo this time to make something that ties into Breath of the Wild.

    → 1:00 PM, Sep 8
  • September

    I feel like I just looked up and realized it was already September? I haven’t even blogged sine May. I could have sworn it was more recent than that. This whole year has been a blur.

    What a time to be alive.

    → 3:21 PM, Sep 7
  • I’m doing a little project in my free time of re-reading K&R’s “The C Programming Language” and completing all of the exercises. It’s pretty time consuming, but I think worthwhile. Thankfully it’s a short book, so it’s not as daunting as it could be.

    → 10:00 PM, May 23
  • Really digging this sort-of-retro terminal theme and font combo I’ve got going. The theme is Gruvbox and the font is Input Mono Narrow Medium.

    → 2:27 PM, May 14
  • Even if you don’t care about the topic, this post on how to name servers is worth reading just to get his script which turns 8-bit images into ASCII art.

    → 2:34 PM, Mar 25
  • Things I’m Doing Since the Lockdown

    Next week will be my third working from home, and there’s no clear date when it will end. I’m still not used to it, but I’m trying to do what I can to stay healthy while we’re all stuck at home. My time has consisted of at least a few of these each day.

    1. Going on at least one thirty minute walk a day.
    2. Trying to get my father to stay home.
    3. Playing guitar.
    4. Reading old books about old computers.
    5. Blogging and tweeting more.
    6. Trying to reassure people who are more worried than I am (and I’m pretty worried).
    7. Buying books from my favorite bookstore online so that hopefully they don’t go away forever.
    8. Realizing I have to keep in touch with friends better.

    This is pretty rough. I have a lot thoughts, and a lot of feelings. It’s hard not to feel anxious all the time, and I can feel things like sleep quality decline.

    I know that I’m incredibly lucky to have the kind of job I do and to be in the position I am in. I can’t stop thinking about all the people who aren’t so lucky though. It hurts to think about so many people suffering as much as I’m afraid they might.

    → 12:27 AM, Mar 21
  • BitBar: Easy Custom Menu Bar Apps

    BitBar is a free app for macOS which — essentially — lets you create custom menu bar apps from shell scripts or other command line tools. If you can write a program or script (in Shell, Python, C, Swift) and print, you can put something in the menu bar. BitBar also lets you define how often it should automatically refresh each specific script.

    My favorite thing I’ve made uses the speedtest-cli tool to refresh what my current download and upload speeds are and show colorized output based on the results.

    2020 20 03 bitbar speedtest

    The script might look strange if you’re not used to awk, but the main thing to know is that $2 (the second space separated for the line) represents the result number and $0 represents the whole line. So I’m grabbing the number and then printing the whole line with a color based on the value. Also, awk is cool and you should learn it.

    #!/usr/bin/env zsh
    
    echo "⏱"
    echo "---"
    
    /opt/local/bin/speedtest-cli |
    awk '/Download/ {
            if ($2 < 25) {
                print $0, "|", "color=red"
            } else if ($2 < 90) {
                print $0, "|", "color=orange"
            } else {
                print $0, "|", "color=green"
            }
        }
        /Upload/ {
            if ($2 < 4) {
                print $0, "|", "color=red"
            } else if ($2 < 9) {
                print $0, "|", "color=orange"
            } else {
                print $0, "|", "color=green"
            }
        }'
    
    → 1:43 PM, Mar 20
  • More Parseable Output, Please.

    Since reading Unix: A History and a Memoir by Brian Kerninghan (of K&R), I’ve been a little enamored with the idea of writing small command line tools. This article titled Hints for Writing Unix Tools hits on a bunch of things, and is worth reading, but one that really jumped out at me was this:

    Output should be simple to parse and compose. This usually means representing each record as a single, plain-text formatted line of output whose columns are separated by whitespace. (No JSON, please.) Most venerable Unix tools—grep, sort, and sed among them—assume this.

    Trying to parse the output of something like this on the command line is incredibly frustrating:

    {
        myThing = "Blah"
        percent = 0.5
        ...
    }
    

    However, if the output is tab delimited:

    myThing     blah
    percent     0.5
    

    Parsing it with Awk, sed, or other Unix filter tool can usually be done as easily as awk '/myThing/ { print $2 }'. I wish more tools paid attention to this. Maybe if you were writing Unix from scratch today, you’d have processes communicate using structured data (I think this is what PowerShell does?), but you have to work with the system you have.

    Everyone knows that regular expressions are terrible, but what my theory presupposes, is that a large percentage of the “how can I parse …” questions on places like Stack Overflow that are solved by a crazy regex wouldn’t exist if more tools had sane output.

    → 12:31 PM, Mar 19
  • The Growth of Command Line Options, 1979-Present

    This post shows the growth of arguments for a bunch of the most common Unix commands over time. The author demonstrates how we went from 99 in 1979 (Version 7 Unix), to 393 in 1996 (Slackware), to 700+ today (Ubuntu). After that, they make the argument that maybe that isn’t inherently a bad thing? Super thought provoking if you think about design or use a shell all day.

    → 2:06 PM, Mar 18
  • I don’t necessarily want to say I’m one of histories great innovators for having the idea to label power adapters with the name of the thing they came with… but I think it’s pretty smart.

    → 1:10 PM, Mar 12
  • Added a new pin to my denim jacket which I’m pretty into 😉 Wondering if anyone will notice I have the BBEdit icon on my jacket around work? If they do, I guess I’ll know that I should become friends with that person.

    → 2:34 PM, Mar 3
  • Script for Better Man Page Viewing

    If you’re on macOS, you can open man pages in a separate, nicely formatted, window by using the x-man-page URL scheme.

    Example Man Page

    Typing x-man-page://ls, however, isn’t super convenient. This script lets you type xman command_one two... and open each page in a separate window. If it can’t find the command you asked for, it prints a message to stderr. Enjoy!

    #!/usr/bin/env zsh
    
    function xman() {
        for i in "$@"; do
            if [ $(command -v $i) ]; then
                open x-man-page://$i
            elif; then
                printf "Can't find command: %s\n" "$i" >&2
            fi
        done
    }
    
    → 1:23 PM, Mar 3
  • I wrote seven tests today of my own free will to confirm all the variations of a string that could get returned based on a number of factors were what was expected. So I think I’ve finally gotten religion on testing.

    → 6:02 PM, Feb 28
  • It seems almost too obvious to say, but something I’m thinking and trying to do at work is to always leave code better than when I found it. Even if it’s just a tiny improvement. If something can be more clearly named, more testable, faster, I should just do it.

    → 3:03 PM, Feb 28
  • “I’ve ripped off very few songs in my life, but I’ve ripped off the Hot Pockets theme in like three songs.”

    Jenny Lewis Tiny Desk Concert: www.npr.org/2020/02/2…

    → 1:40 PM, Feb 25
  • Filter Through Command in BBEdit

    I’ve used BBEdit for a long time, but only recently started digging into the scripting side of it. If you’re willing to write your script against it’s scripting dictionary in AppleScript or JavaScript, you can do a lot, including attaching a script to every menu command in the app. You do however have to write a script and put it in the right place before you can use it. Sometimes I’d rather pipe my text through grep 'foo' | sort -u like you can on the command line, and have it format my text for me.

    TextMate has exactly this command, so emulating that seemed like a good place to start:

    FilterThroughCommand_TM.png

    I figured out that I could build most of what TextMate has as a BBEdit Text Filter:

    FilterThroughCommand_BB.png

    Dr Drang had already done pretty much exactly the same thing, but I wanted my script to remember at least the last command I ran, which won’t work with his approach. To get that, I needed to make a proper AppleScript so that I could take advantage of persistent properties (which is a super useful thing AppleScript can do if they’re saved as an scpt file).

    You can copy the script below into Script Editor and save it in script format to BBEdit’s Text Filters folder:

    property default_command : "sort"
    
    on RunFromBBEdit(_range)
    	set shell_command to the text returned of (display dialog "Enter a shell command:" with title "Filter Through Command" default answer default_command)
    	
    	if shell_command is "" then
    		quit
    	end if
    	
    	set default_command to shell_command
    	
    	if _range as text = "" then
    		set text_content to text of front document
    		set results to executeCommand(shell_command, text_content)
    		set text of front document to results
    		return ""
    	else
    		set text_content to _range as text
    		set results to executeCommand(shell_command, text_content)
    		return results
    	end if
    	
    end RunFromBBEdit
    
    on executeCommand(shell_command, text_content)
    	set AppleScript's text item delimiters to {ASCII character 13}
    	set results_text to text items of (do shell script "echo " & quoted form of text_content & " | " & shell_command)
    	set AppleScript's text item delimiters to {ASCII character 10}
    	set return_text to text items of results_text as text
    	set AppleScript's text item delimiters to {""}
    	return return_text
    end executeCommand
    
    → 3:38 PM, Feb 23
  • Set up MacPorts as a replacement for Homebrew last night. So far so good I think? The only package which wasn’t available so far was swiftlint, which I can build myself.

    → 2:57 PM, Feb 9
  • I’m trying to make a habit of saying “thank you” instead of “sorry” whenever it’s appropriate. For example, thanking someone for their time instead of apologizing for taking it.

    → 3:17 PM, Feb 5
  • Using os_signposts with Instruments is so cool and useful for seeing what your app is doing and zeroing in on specific operations. This post shows the kind of thing I’m talking about if you haven’t used signposts before: www.iosdev.recipes/os-signpo…

    → 5:45 PM, Jan 31
  • I’m looking for alternatives to Napkin for marking up and combining multiple images in a similarly flexible way and would welcome any suggestions. Most of these apps are either full blown image editors or only want to work on one screenshot at a time without a flexible canvas.

    → 1:27 PM, Jan 13
  • I’ve been using NetNewsWire on macOS for months, and I’m now using the iOS beta as well. Like the Mac beta last year, it already feels high quality and exactly how I want. New NetNewsWire is a different app than old, but it somehow captures what I’d missed using other readers.

    → 12:22 PM, Jan 10
  • Off to a good start exercising in 2020. Ring Fit Adventure is definitely making it a lot easier to keep the streak going on days I don’t walk or bike enough.

    → 12:27 AM, Jan 8
  • I’ve been playing Ring Fit Adventure each day for over a week, and am enjoying it. I don’t know how well it will work for getting in shape long-term, but with the number of overhead presses and squats I’m doing, my strength seems like it’s going to have to improve at least.

    → 11:16 PM, Jan 4
  • RSS
  • JSON Feed
  • Micro.blog