Writing, publishing, geekdom, and errata.

Free Software Activity: MPDQ, an Autoqueue client for MPD with little configuration and no reliance on external services

There are a lot of ways to autoqueue or create "smart" playlists; there's problems with all of them. I've completed a program that solves quite a few of them.

I've written it with MPD (the Music Player Daemon) in mind; it works well with several of the other programs that I've put together (like volume normalization and bpm setting and getting cover art on your phone), but if you use RhythmBoxAudacious (or any players that allows input from the commandline) it's easily hackable.

Which brings us to why I put it together.  I used to work with GJay, but GJay highlights several of the problems I've run into:

* Opaque code (in a language I don't know well)
* HUGE amounts of user input needed to judge the "color" of each song to get it to work well
* Data stored in XML, which tends to require special tools to parse
* Does not handle UTF-8 or UTF-16 filenames (for, say, a Japanese band) well.

MPD_sima is another tool I tried, which highlights the other problems I kept running into:

* Relies on external services (which don't always give good suggestions)
* Is completely reliant on black-box algorithms (Pandora, Google Music, Spotify)
* Falls back on completely random selection from your music library

And so that's where mpdq comes in.

* It's written in bash, and aside from MPD, only requires MPC, Zenity, AWK, and ffmpeg (and if you're on linux you probably have all of those in your repositories).
* It stores its configuration files in plaintext in $HOME/.config/mpdq

There's two setup stages for it after you configure the setup file.

The first is associating genres with each other (and that's where it uses Zenity).  It goes through all the genres you have, asking you to match it with other ones.  Perhaps New Age goes with Acoustic and Downtempo for you, or it only goes with New Age.  Doesn't matter.  If you skip this step, mpdq will use the genre of the currently playing song.

The second setup stage you can't really skip - you have to let it scan all your music files for BPM data and song genre.  (MPD does not store BPM data in its database, so we have to store that separately). That can take a while, but can be updated easily.

Both of those take a bit of time, but not nearly as much as trying to tag each and every file in your music library with an arbitrary "color".

When mpdq is running, it first looks at the currently playing song. If there are matching genres already configured, it picks one of those genres randomly. From that set, it narrows it to songs within the defined BPM range. And then it checks to make sure it's not been played within the user defined length of time.

If the first match doesn't work, it tries again with a slightly wider range of BPM values. It repeats this up to ten times, and if it still cannot find a match, it will try to find a song within the original BPM range in any genre.

It's as good as your music tagging and "matching" of genres is; if you cross-pollinate a little too much you can end up with some "drift", but even then it's a pretty natural and easy slide and not as jarring as going from "Nights in White Satin" to "Bodies".

If you use MPD, I hope you give mpdq a shot.  You can find mpdq on GitHub at

And if you use another music player and use this program as the framework to create an autoqueue for it, please let me know!

Stranger Falls

Don't judge. You know you'd watch it.


We've got a tweak to our flash fiction rules this week due to NaNoWriMo!

Several of us have started our own, self-hosted, flash fiction challenge over at a website we're calling Obsidian Flash.  It's on a forum behind a password, so that anything you write and submit is considered unpublished.  Registration is quick, free, and pretty painless.

Seriously, this thing is the perfect thing for you to do if you think writing is hard (or finding time for writing is hard), and especially if you haven't been writing for a while.  It's also great if you have problems with getting past ideas that "you suck" (every first draft sucks, face it) or self-doubt. And if you're writing for NaNoWriMo, we've put in a tweak to the rules so you can still participate without having to stop writing on your story.

The prompt IS UP RIGHT NOW...and here it is!

Go sign up now at and we'll see you writing this weekend!

Here are the rules:

Welcome to the Flash Challenge!  Our Flash Master is... me!

Here are the rules, slightly changed for NaNoWriMo:

1. All stories should be complete, written and posted within 24 hours of the prompt being posted, and can be anywhere from one sentence to 1,000 words in length.  Typically the prompt is posted by 8pm EST on Friday, and stories are posted by 8pm EST on Saturday. (It'll be a little early this week because of my schedule.)

1a. Because it's NaNoWriMo, you may wish to post a scene, chapter, or character study from your NaNo work that isn't standalone that you write during this time.  (For example, how would your main character react to the prompt?  How can you work it into your existing story? Great way to keep the creative juices flowing!) It won't be eligible for voting, but we value participation, and will give you feedback on it! Please label it NANOWRIMO WORK at the beginning so we know!

2. You may choose to write your story in any genre.

3. Your story must be built around the restrictions—words, themes, photo prompts, word limits, etc.—provided by the Flashmaster at the beginning of the challenge.

4. Once the participants’ work is posted, the voting and comment session begins and continues until all votes are in. Time limit for voting will be determined on the spot, depending on how many people finish the challenge.  Typically this is within 24 hours of the end of the writing portion, or 8pm EST on Sunday.

5. The winner becomes Flashmaster and chooses the prompt(s) for the next contest.  Also, you get all the Internet Bragging Points you think you can get away with.
Don't wait - get going and register at right now and join us!

Free software activities: SSH and TMUX, combined

I use SSH to manage a number of machines around my place, and sometimes having too many terminal windows open confuses this silly bear.

I poked around at some GUI SSH managers, but they either seemed overkill or too complicated or too mouse dependent for what I needed.

So, using the power of tmux sessions, I crafted a script that will create a new specialized session for SSH connections (if it's not already existing) and open a new, named window with that connection in it. And for bonus points, if there's already a terminal window open and attached to that tmux session, it won't attach - it'll just point you to the one already open.

I call it SSH Master (because ego, duh) and you can find it on github at

It must be fraud week for me or something... my experience with a text job scam

It's my week for scammers! Yesterday I got texts from a guy claiming to represent a company (which he didn't) trying to hire me for a position that I hadn't applied for. If you read this thread on Indeed: you'll note that the wording is almost identical (just different company names), and it's a phishing scam.

I've yet to get a call or text out of the blue offering to hire me that wasn't a scam of some kind. (If you've not read it, take the time to read my account of when I went to an "interview" that turned into a MLM sales pitch.)  I've posted the screencap below, along with the text (my replies are in italics) if you can't see the image (click the thumbnail to embiggen it).

Click to embiggen
Good Day, I am Mr. James Love, The Admin H.O.D. Professional Diversity Network, Inc. I am Contacting you in regards to your resume reviewed and Selected on Activehire, I believe this is STEVEN M. SAUS?

Can I help you?

Your Resume Have been Approved by Professional Diversity Network, Inc. You are Qualified to function in one of these open Positions in the company: Accounting Manager, Payroll Clerk, Administrative Assistant, Clerical Admin, Customer Service Rep, Data Entry Clerk, Sales Rep, Sales/Marketing Manager, and Project Manager. Which of the above Can you handle perfectly?

I am woefully overqualified for all of those positions, mate. Also "has" been approved.

Do you have a Gmail account to proceed with the job and to know more about the company, pay scale and duties?

I thought you said you had my resume?
Also, Professional Diversity Network is based out of Chicago. Is there a reason you're texting me from a California area code?

Of course Steven, I need you to send to make sure it tallies with what i have here and also for record keeping. The company has a branch here in California.
This is strictly online and works from home job and you can as well work from anywhere of your choice or anytime that does suit you. Working Hours are flexible.

Then why didn't you e-mail me? I mean, it's not keeping with the script scammers have used (as shown on this Indeed posting) and what you're saying doesn't make sense for PDN.
But that's okay; I'm going to go ahead and send this screen cap on to them so they can decide whether or not this crosses the line of criminal impersonation for a phishing attempt.
And if I'm wrong, well, you weren't going to meet my current salary anyway.
Which you would have known if you actually looked at my real resume.

He didn't reply after that.  :)