MacSparky and DEVONthink

Yesterday I had the pleasure of chatting with David Sparks about an upcoming Field Guide he’s doing on DEVONthink. He had asked for power users of the app, and given that I’ve been going back and forth with it for years I sent him a screenshot and let him know I’d be happy to help. He responded and here we are. If you’ve ever listened to David on one of his podcasts, he’s just as personable and friendly speaking with him one on one.

I’m looking forward to the new Field Guide. My part in it will be as a kind of power user addendum where a few existing users give a glimpse into what their setup looks like. I hope David can get something useful out of my rambling, overall I felt like I barely scratched the surface of what I wanted to say about DEVONthink. I didn’t get into the custom CSS for Markdown display, or the Sorter menu extra, or how you can import a webpage from Safari as Markdown and strip all the adds and other junk out of it. I didn’t get into backup and restores of the databases, or my Take Note hotkey (^space), or how I integrate RSS into my research database to stay on top of new developments in AWS. Ah well, there’s only so much you can do in 15-20 minutes. I’m sure David already covered all of this in his Field Guide anyway.

Also, since DEVONthink is so good at search and discovering additional data, I closed all but my research database during the recording so I didn’t accidentally surface any proprietary or personal information. One of the biggest reasons I use DEVONthink is because it can keep all my personal data private and secure between machines, but that wouldn’t do much good if I just showed the world my bank account numbers or details about our AWS environment in a search result.

Hopefully David can work some magic in editing. If I’m honest I’m a little nervous about how my section is going to turn out, or if it’ll be included at all. Overall though, I think I’ll be in good company, and that the Field Guide is going to be a great success. I’ve got a lot more to say, maybe I should revisit that podcast idea I’ve had for a while. No matter how my part tuns out, it was great to talk to someone who’s work I’ve been following online for years. David’s work with OmniFocus and Paperless have been foundational, and I hope he has the same success with DEVONthink in the upcoming months.

Inner-Document Markdown Reference Links

I’m writing a fairly large document for internal use at work, and instead of using something like Word I’ve generated a bunch of markdown files that I’m stringing together with the excellent Pandoc to generate a very nice PDF file with LaTeX. The resulting PDF is beautifully formatted, thanks to the Eisvogel template. A key part of the PDF is a functional table of contents outline in the sidebar of Preview, and the ability to link to different parts of the PDF from arbitrary text.

Pandoc generates header identifiers for each section of the document automatically, which you can use as normal markdown-formatted links. The documentation states:

A header without an explicitly specified identifier will be automatically assigned a unique identifier based on the header text. To derive the identifier from the header text,

  • Remove all formatting, links, etc.
  • Remove all footnotes.
  • Remove all punctuation, except underscores, hyphens, and periods.
  • Replace all spaces and newlines with hyphens.
  • Convert all alphabetic characters to lowercase.
  • Remove everything up to the first letter (identifiers may not begin with a number or punctuation mark).If nothing is left after this, use the identifier section.

So, the header Header identifiers in HTML becomes #header-identifiers-in-html. I did this manually exactly once before I was certain that it was going to be far too tedius and something that could be easily solved by awk, or so I thought.

It turns out that the BSD version of awk included with macOS doesn’t support the flag needed to convert to lowercase, so instead I grabbed a quick perl command and sandwiched it between two awk commands:

sed s/\ /-/g | perl -p -e 'tr/A-Z/a-z/' | sed s/^/\#/g

Then all I needed to do was drop that in a file with a shebang header and mark it executable, move the file into BBEdit’s “Text Filters” folder and it was made available to BBEdit from the Text menu. Now I just highlight some text I want to format as a link, and select the menu option.

I suppose I could get even fancier and muck with the clipboard, and work all the other Pandoc rules into the script, but I imagine this will take care of %95 of my use cases for what I’m doing. That’s more than enough.

Resurrected Site

Late last month the domain for this site expired. I had plenty of warning, ample time to log into the Hover dashboard and renew it myself. I could have even left the auto-renew on, like I have for the past twelve years, but this year was different. This year was the end of 2020, and at the time I felt I had enough of the internet. It was time to log off, possibly forever.

The internet had become a toxic place for me, full of political arguments and outrage, it felt like every time I logged on I was watching everything burn around me, and I didn’t want to be a part of it anymore. I left Facebook years ago, I left Twitter in 2020, and I was using my blog to rant about political issues, which was never the intention of this site. This site is here for me to practice writing, to share what I’ve learned, and to force me to think things through1. It’s a repository of my thoughts on the tech industry over time, and a reflection of where I’ve been in my career and mindset.

I didn’t want this site to be something that I knew would start arguments with people I love. My wife and I both got COVID-19 about this same time. There was a lot going on. I let it go.

But then… January 20th rolled around, and 2021 officially started, and with the new year I suddenly felt lighter, more optimistic about the future. I started thinking about sharing tidbits I’ve learned, and I started thinking about the work I’ve put into this site over the years. I remembered how much I enjoyed “blogging” as a hobby, when it was a hobby.

I’m seeing the world with fresh eyes this new year, and I hope you are too. There’s certainly a lot to look forward to, especially as a Mac user. New rumors about M1 MacBook Pros, iMacs, and possibly even the elusive xMac finally making an appearance all have me thinking this might have to be an upgrade year.

I’m also picking up a couple of new hobbies this year. I bought myself an entry-level mountain bike that’s a big step up from the old Walmart special I’ve had for almost a decade. I’m looking forward to exploring the trails around central Iowa. I’m also waiting for a telescope to be delivered. I’ve got an iPhone mount for it, and I’m hoping to be able to do some very, very basic astrophotography. I’ll post what I learn as I go.

They say that getting old means that your sense of time gets warped, one day merges into the next into the next. The days all start to look the same as months turn into years. The fight against that is to never stop learning, to never stop exploring. Novelty is what fights old age, it’s having things worth remembering.

What do you say we make 2021 worth remembering?


  1. As one must when writing, otherwise it doesn’t make sense. ↩︎

Student Advice

A student asked me for advice for what to focus on getting into the compsci field. Here’s what I said.

I have two pieces of advice:

  1. Stay curious. If you come across something you don’t understand, keep digging till you do.
  2. Start building. The best way to learn is to do. Build a web page, build an app, build a server… whatever direction you want to go, pick a project and start digging in. As you go you’ll hit obstacles, you’ll find things that you don’t understand, when you find yourself there, remember number one and keep at it till you’ve figured it out. Honestly that’s how I’ve built my entire career.

My personal bias is to recommend the devops path, and the first step on that path is to learn Unix. You can download Linux (a Unix clone) for free, or if you have a Mac can pop open the Terminal app and go to town. Figure out what the shell is, what common commands are available to you, and start writing out a personal library of scripts.

Unix is everywhere, it took over the world and no one even noticed. Unix is the core of macOS, iOS, Android, ChromeBooks, and every server running in the cloud. It’s in Internet of Things devices, it’s in your smartTV, it’s probably in your routers and cable modems, and if you do a search for “Unix or Linux Sysadmin” or “devops engineer” you’ll come up with thousands of available jobs.

Here’s an easy trick to get on the path to knowing your computer, once you are in a Unix or Linux environment, run “ls /bin”, that will show you some of the basic programs available to you, pick one, say, “dd”, and run “man dd” and read the manual page on the command. Keep going till you know what every program in the list does.

Secondly, and very closely related to learning Unix is learn networking. Learn the TCP/IP stack, the three-way handshake, basic subnetting, Literally everything is networked, so a solid understanding of how it all works can only help. It’s all just signals down a wire.

On a more practical level, I recommend opening up a Github account, buying a domain name, and using Github to host a webpage with Jekyll. Use that webpage to write about what you learn. Share your projects. Even the experience of getting the Jekyll site up and running is a good exercise. It’s complicated to get started, but once you figure it out, you’ll have a good base for how a lot of things work in industry.

The combination of doing, then writing, helps with your learning, and it gives back to the community for the next person who wants to learn. Come to think of it, I haven’t done enough of that myself lately.

As far as sites to read… well, you could follow Hacker News although I don’t. I know quite a few folks who do. I prefer to follow individual blogs like cks. The tech industry was built, originally, by academics and interested folks building and sharing what they’ve learned, and… well, at it’s core it still works that way now.

I hope it’s good advice, and I wish the student luck on the path to their new career.

Healthy Tech

I deleted my twitter account this morning. I’ve been on Twitter long enough to remember when it was spelled twttr, and there was a SMS bridge to a specific number, 40404 if I remember correctly. For me, it’s always been a fun place to chat about Apple and technology. Twitter was a place to learn about new tech and be part of the community of developers, designers, and enthusiasts. Through Twitter I’ve found apps I use every day, books that I love, Authors to follow. We’ve chatted live through Apple keynotes, commiserated through hard times, and found common interests across the world. But… that’s just not what Twitter is anymore. At least not to me.

I quit Facebook a few years ago because I was using to to get into Political arguments. Today I quit Twitter for the same reason. The old Twitter I loved is still there, but it’s buried under the weight of supporting modern society. Politics makes my blood boil, the hypocrisy, the mindless parroting… it’s not good for me to be involved in, and I find that it takes only the slightest provocation to lash out and start an argument. Of course, in my mind at the time, I’m trying to prove a point, I’m debating, but that’s not the truth. The truth is that it doesn’t take much for me anymore to want to argue, and that’s just not healthy.

A friend suggested I watch The Social Dillema on Netflix. I initially resisted because I figured that I’ve been in the tech industry for so long I know what the AI is doing. I think more people should watch the show, but I didn’t think I’d learn anything I didn’t already know. But, having the day off today and nothing better to do, I watched it anyway, and I’m glad I did. There was nothing too revelatory in the show, but while watching it I did begin to second guess my participation in any platform that contributed to the decline in mental health and societal structure, and also contributing to a rise in depression, self-harm, and suicide. This is horrifying.

The crux of The Social Dillema is that technology has moved faster than our brains have had time to adapt, not to mention our societal norms and laws. We’ve gone from having to be physically together to socialize to socializing through a screen in a single generation, and now we are starting to see the effects. For me, I’m taking the War Games approach… sometimes the only way to win is not to play.

That’s not to say that I’m abandoning technology altogether. I still believe that humans can and will solve the biggest problems we face through technology. Climate change, overpopulation, pandemics, food and water shortages can all be overcome through technology. I believe in a future where clean energy powers our vehicles, green cities provide healthy and sustainable living communities, where we’ve reversed the effects of climate change, and where, through the building of this future, everyone has meaningful employment.

Furthermore, I believe in personal technology that works for you, where your privacy is paramount, and the systems we choose to use respect our time and mental health. So far I think Apple is doing a good job of helping to build this future, showing the path forward to a sustainable business model that prioritizes privacy over advertising. They could be doing more, but I think they are doing better than the other big players in the industry.

When I pick up my phone I want to know that I’m not going to get lost in an endless feed, that I’m not going to wind up arguing with a stranger, or worse, a friend. I don’t want to feel left out, insufficient, or incomplete. I want my technology to help me feel more on top of things, to help me make better choices, to eat better, sleep better, get more exersize, be more productive at work, and remember things for me that I might otherwise forget. I want technology to help me learn new skills, and help me hone old ones. To be the bicycle for the mind.

The answer to the dillema is not to abandone technology… the genie is out of the bottle there. The answer is to be mindful about how we use technology, and to demand better from the developers building these services and devices.

I’m an optimist. I believe we can have healthy relationships with our technology, and I believe that we can overcome the hardest problems our society faces. To do so we must understand the problems, generate in ourselves the desire to overcome them, and then start working together.

Multiple Macs, one location for screenshots – Tech Reflect

Jump to Post

Here’s how you set up your single screenshots folder:

  • Open a Finder window and click on iCloud Drive
  • Create a new folder called Screenshots
  • In Terminal, type these commands:
    • defaults write com.apple.screencapture location “~/Library/Mobile Documents/com~apple~CloudDocs/Screenshots/”
    • killall SystemUIServer

Another great tip from Cricket. I’ll be setting this up on my Macs from now on.

Delete Previous Word or Path Item in Terminal

Jump to Post

In pretty much any Cocoa app, option-delete is an incredibly useful shortcut to delete the previous word or path component. If you mess up typing a word, for example, you can start fresh instead of having to use the mouse/trackpad or hit backspace multiple times. For paths, it’s great for when you want to remove a few components from the end of a path.

In Terminal, however, this is not possible by default. You can enable a command in the Edit menu called “Use Option as Meta Key” and it will restore this Cocoa editing behavior.

Pair this with the ZSH auto-suggestions, and good grief is this going to save me so many backspaces. 16 years I’ve been using that terminal, had no idea that’s what this option did.

Getting Small Again

It’s been quiet here at home lately. Grey and overcast, rain morning, noon, and night. A good time to rest and recover from a lot of busy weeks. I’m essentially an introvert, and while I enjoy visiting it tends to take a lot out of me. I’ve always preferred long conversations over coffee to loud concerts or clubs. I’m on the couch this morning, my wife’s dog is next to me. The dog kept us up a lot last night. It’s nearly silent, but for the breath of the dog and the clack of the keys.

I watched “Amazing Stories” on TV the other day, the one about a guy who went back in time to 1919. While he spent most of the show trying to get back to 2019, he found that he actually preferred life 100 years ago and wound up staying. It’s an interesting thought experiment to consider the things that we’ve gained over the past century, like civil rights, women’s rights, advances in medicine, heating and cooling, the ability to stay in touch over long distances, but also to think about the things that we’ve lost along the way too. Independence, civility, an overall slower pace of life. I live in a small town and I think a lot about what could revitalize it. Folks that lived here for a long time say that it used to be different, the buildings that are crumbling and empty around the square used to be stores that were stocked and full, kept in top shape. A person could walk down to the square and see their neighbors going about their business.

The butcher, the baker, and the candlestick maker.

What I miss is the opportunity for someone to open a shop selling what they’ve made with their own hands, and be able to make a living off of it. People in town say that things changed when the state put in a highway that bypassed the town, but I think that was only a symptom… a sign that pointed to a real cause. Things fell apart because people stopped shopping in the town. They stopped shopping in town because they could get things cheaper if they drove 20 miles to shop at Walmart instead. The desire for cheap goods has decimated small towns and small businesses, making us dependent on massive corporations that exploit the world’s poorest and most vulnerable to make a $5 t-shirt.

What I wouldn’t give for a generation of makers and independents to turn this around. Sometimes I like to write or envision future scenarios where that’s taken place. Not that there’s not a place for big companies. Something like the MacBook or iPhone simply can’t be created by a mom & pop shop, but they could definitely be made here, by us.

We still have a fantastic barber and a, well, mediocre doctors office in town. Although, of course, the doctors office just recently stopped being independent and is now part of a regional system. Now when I call to make an appointment I get re-routed to someone 25 miles away instead of a mile down the road. I was in the office one day when an elderly gentleman was waiting in line right in front of me, and I asked him about how things had changed over the years. He didn’t have much time to talk but the description he gave was striking. I asked him what happened and as he was walking out the door he turned and said “everything got big, big, big!”

I don’t want to go back in time to 1919, I rather enjoy the privileges and comforts that we have now (especially considering that the idealized past so many think about was generally only great if you were white and male), although I also believe that a lot more of us could benefit from living more of Teddy Roosevelt’s “Strenuous Life”. I want to go forward. I want to live in the future where we’ve figured out these things. Where we’ve created self-sustaining communities of independent makers, linked by high-speed rail systems and electric cars powered by the wind and the sun. Where we all grow gardens full of good food, and we know where the goods we buy come from, and maybe even know who made them. Where we know our neighbors. Where we know the mailman’s name and recognize his uniform and know approximately when to expect him. Where teachers are revered for the responsibility they have. Where the ability to fix a broken thing is given the respect it deserves.

I wish I knew how to make that vision a reality, and now in this isolated time of the Coronavirus, it seems more relevant than ever. We spent too many years getting big, what we need now is to get small again.