Some people bake their own bread. Some people grow their own vegetables. I make my own software. I do it pretty much for the same reason people do those other two things. Yes, you can buy bread at the store, but there’s something special about making it yourself. When you bake your own bread, you get to participate in a little story with a beginning, middle, and end. It begins when you mix whatever is in those little packets together with some eggs you bought from the store. The middle is when you turn on the machine you got for Christmas and wait for the light to turn green. And then the end is when you brag to your friends about how you bake your own bread. In the end you realize that the bread is not even what you really wanted. What you wanted was to be connected to the things around you in a meaningful way.
Big corporations can never give you this experience. They can do a massive amount of market research to scientifically create the tastiest bread in the world. And they make damn tasty bread as well. If I’m just going to gob some peanut butter on something and eat while I watch TV, I’ll pick it every time. But big corporate bread will never give me the experience of being at a dinner party and listening to my dad brag about how he bakes his own bread. That is something that will never be available at CVS.
So I guess that’s why I made my new project playerbm, a bookmark CLI to resume where you left off in audiobooks and podcasts.
Great people have great problems. Alexander Graham Bell invented the telephone because he wanted a better way to bug his assistant. George Mallory climbed Mount Everest because he was extremely annoyed that it existed and nobody was doing anything about it. The history books are filled with people who happen to be extremely annoyed with something important. Annoyance is the mother of invention.
My particular annoyance was a lack of bookmarking functionality in my media player. I listen to some podcasts for about 10 minutes at a time while I eat and then pause the player and go on with my day. If the player closes, I lose my place and I have to remember where I left off. Normally I get it wrong and relisten to about five minutes of the podcast I’ve heard before only realizing this about four minutes in when it’s too late to do anything about it. That really annoyed me so I decided to do something about it.
The nice thing about being a programmer is you can get exactly the software you want. I have kind of a weird workflow in that I like to do everything on the command line so I make a bunch of command line apps for myself. The media players I use expose a nice little interface called MPRIS to get information about the playing track when the media player starts and quits and commands to open tracks and resume playback, so it’s easy to use this in my app. So I could just keep track of what the media player is doing and store that in a database and that’s pretty much what it does.
playerbm --resume ~/path/to/comedy-podcast.m4a
Now playerbm connects to the player and keeps track of my position in the file. Whenever I open it again with the same command, it goes to the saved position. It even works with files opened over http so I can use it with YouTube. That’s just what I need!
To make my dumb little toy, I used an operating system originally developed to run the U.S. telephone network (Linux), a programming language written by the smartest people in the world (Go), a military grade hashing algorithm (SHA-256 to identify files), and I develop it publicly on a platform worth 7.5 billion dollars (GitHub). I think this is a good use of these resources.