Note: This post is based on an old page from the main site that makes more sense here, now that the blog is finally up and running.
Over the years, of course, I have worked on a variety of projects. Some useful, some experimental, some boring. Mostly for employers or clients, some for myself. A lot has been lost to time, and obviously a lot is owned by other people, but what I can find, by all means enjoy.
Quick Note on Licensing
I posted a longer version of this line of thinking back in December, but every year, I lean more heavily towards “copyleft” or (to use Creative Commons terminology) share-alike licenses. As the world has shifted more in the direction of more “liberal” licensing, I’ve taken the path from a position of “only public domain counts” and dividing my work into things I might sell and things I want to share (mutually exclusive sets) to thinking that I might finally understand the central point of the GPL and similar licenses.
For me, I now find value in my projects being available, in the sense that people can work with them even if I (or a hypothetical company who uses it) vanish. A BSD/MIT-style license doesn’t cut it, because those projects can too easily vanish behind a paywall and become proprietary. While I understand the occasional complaint that a GPL-style license makes it more difficult to integrate code into a proprietary system—I used to make those arguments, after all—that’s literally asking developers to work for large companies, companies often sitting on millions if not billions of dollars, for free.
So, if some big company wants to (inexplicably) use my code but can’t deal with the license, remember that these are public licenses. If you’re not willing to repay me by making your changes available (the licensing terms offered to the general public), there are certainly other ways to repay me—I can usually get some use out of significant amounts of money, for example—so make me an offer…
With that, back to the actual software.
One of the things I’m known for, to the extent that I’m known, is designing some obscure programming languages and writing implementations for them. I won’t go into detail about them here, because I already did exactly that back at the start of 2020.
My most useful project to people who aren’t just me has clearly been SlackBackup, a desktop application to download and search messages from Slack teams. Slack isn’t terrible to work with. However, when an employer doesn’t want to pay for the service for a large team—or for a set of small, overlapping teams—workers are put in a position where information quickly falls behind the paywall at arbitrary intervals.
So, this tool uses Slack’s API to download whatever posts and messages are available (that you don’t already have) and stores them locally for easier searching and analysis for sentiment, complexity, and so forth.
I wrote more about it in this post back in late December.
The modern version isn’t complete, yet, but Bicker is a web service developed in Ruby on Rails intended to be a forum-style platform that combines aspects of other communication methods to encourage better-behaved conversations. It’s conceptually based on a product I developed years ago and sold a few copies, but re-implemented using modern technology.
The core premise is that replies can only ever be inserted at punctuation, modeling the idea that it marks enough of a break in the thought that it’s “polite” to interrupt.
However, I’m also developing this as an example, so it has authentication and permissions, plus avatar images via Libravatar. I have also been documenting the development process in weekly blog posts, so stay tuned to the blog to see how this develops and when it will be ready for casual use. Or, since it’s (at the time I write this) only a month into development, feel free to help out!
The project I get the most use out of—in fact, I run it constantly—is uManage.
For a long time, I’ve wanted to keep track of where I spend my time on the computer, if only to get a sense of how much time seems productive and wasted and what I spend attention on but don’t really use. When I looked for time-tracking applications, however, everything I found was paid, required regular manual input, or didn’t allow direct access to the raw data.
Recalling that the (old) Win32API had functions for getting the title of the window in focus, I looked for an equivalent under Linux, since I’ve been an Ubuntu user since around 2011. I settled on
xdotool, prototyping the core feature—logging how long each window is in focus—in a shell script in an afternoon, then developed a more useful solution in C using
xdotool’s API, adding configuration, an interface, some arbitrary logging features, and recording to an SQLite database.
It’s definitely not perfect. Once in a long while, the GTK+ calls trigger a crash with an X server error that I haven’t tracked down, it could access the database in a safer manner, and there’s a handful of features I would like to add, for a few examples. But it does the job and I gather about five megabytes of data per month that lets me quickly keep track of what I’ve been working on, even for a few seconds.
Additionally, I have started working on reports to dig into the activity database and get a sense of the biggest time sinks and attention span. As I have more time to dig into the data and into R, I’ll add to the range of the report.
Note that, while I developed uManage specifically for Ubuntu and so the graphical interface relies on the notification bar API, most of the core functionality should be usable in the command-line version, which would run anywhere that
xdotool runs, meaning most X-based systems.
At some point, I had the thought—similar to tracking the windows in use—that it might be possible to estimate quality of sleep and possibly general health with a simple test of fine reflexes and basic memory on waking up; slower and clumsier would indicate possible problems. The most straightforward test I could think of, since I touch-type, was typing some randomly-generated letters.
I wrote a command-line version in C, TypeTime-old, first, and I still use that in conjunction with a script that I run overnight. Wanting something that could potentially integrate with uManage, I also cooked up Type Time in C♯ and using GTK+ for the user interface.
It appears that there might be some correlation. There are a lot of factors that interfere with performance, of course, but comparing the logs with my sleep and other information, it does seem that the idea holds. Further than that hand-wavy idea is, of course, going to take more thorough analysis of the data. It is definitely promising, though.
One thing I’ve learned over many years of teaching is that word processors are not future-proof. I have needed to move my lecture notes from system to system and/or fuss over styles more times than I care to count. The last straw was moving to OpenOffice and realizing that the implementation of Office Open XML (
.docx) didn’t include styles as Microsoft’s styles, making switching styles for printouts (my notes and outlines) difficult before class where they had Microsoft Word installed.
Class Management is the result of that frustration. It is a set of shell scripts that use antiword, GPP, Pandoc, and PDFtk to take my old notes, convert them to Markdown (which I can easily keep under source control for more permanent storage), and convert the Markdown to convenient PDF packages.
Soon after, I also built a special-purpose grading database from CSV files rather than continue on with spreadsheets for each class. Like with the Markdown files, moving to CSV makes it easy to store under version control, which in turn makes it easy to see when I graded assignments or changed grades, complete with an explanation of why in the commit message.
The upshot is that I now only need a handful of tools that I would use regardless and some standard Linux utilities, rather than a word processor and spreadsheet that may change between versions. And all the parts are easy to find, at least on a single machine long enough to generate the PDFs.
In working on uManage and a couple experimental projects, I dipped into GTK+ user interface programming. It struck me as fairly primitive. The documentation all seems to suggest that everybody programs by creating the entire interface programmatically on demand, complete with layout. Bleh.
I found Glade, but there was still a lot of manual work to connect the generated layout to the various code-bits for actions. Glade Glue is a quick script to solve that for C programs by generating a header file, defining variables for the controls, and roughing out some connection/initialization code that’s probably good enough to use in most cases.
There are features I would like to eventually add, such as building data structures that match the layout, generating handler stubs when they don’t already exist, and maybe supporting additional target languages. The next time I work in GTK+, I’ll give it some thought.
Toys and Prototypes
Most other projects I have available are—at least at this time—more along the lines of interesting diversions and the cores of possible future projects than anything directly useful. Oh, and there are a few small games.
Rust struck me as a potentially interesting language, so when the first official release came near, I put this together to give it a look. Phauxfiles tries to look like a user search from a generic social network.
It takes the names and the profile pictures from public APIs and displays the fake users either as text output printed to the console or served like a web page.
Rust turns out to be an excellent language to work in. This project didn’t lend itself to a full investigation of Rust’s ownership model, so my understanding of it is still primitive, but it works as advertised and the language has a large number of modern conveniences. I may start using it routinely in place of C for utility work.
While I never plugged in any of the patterns, this should be a reasonable start for such a thing. The basic premise is that “people” try to move to the site with the highest value for the cost and value is determined by access to other people. This leads to an even distribution of people, but my hope is that encoding some of Alexander’s patters can show more interesting distributions.
The ideal result would be if the distributions allow for the generation of realistic random skylines.
Years back, I had the thought for an e-mail client that would proactively work in plain text (extracting text from content) and performing some basic analysis on the resulting text, such as estimating sentiment, collapsing common messages, and identifying scams.
The last feature, which has obvious applications beyond e-mail, is prototyped in Ruby as Keywords. To keep the prototype to the minimum possible useful operation, it reads in a text, removes the common English words (which tend not to carry much information), converts words to stems, and uses DuckDuckGo to search Snopes for the most common remaining words in the text, outputting the Snopes assessment of the premise.
Let me repeat that this is a prototype and should not be used seriously. A handful of keywords doesn’t necessarily uniquely identify every document. There is no error-handling. HTML structure is assumed to be constant with no flexibility. It basically scrapes a site that has no public license. It proves that the concept might be workable, but nothing more than that.
Every once in a while, I need plausible-sounding random text. Well, I guess “need” might not be the right choice of words, but you get the idea. Regardless, a Markov process is a nice way to accomplish that goal, and it also often makes a nice example of straightforward, data-driven algorithms.
For both purposes, I put together Markov, which uses a type parameter in the main code that allows the use of non-textual input and output.
I have always been interested in genetic programming, but always had trouble seeing past the examples and demonstrations that tried to assemble unstructured programs from independent instructions. The results are invariably only a first step to actually solving the problems set to them.
A while back, the possibility occurred to me that, just like with biological organisms more or less work, it might be possible to encode the “genetic material” as if the program was meant to be structured, giving the syntax a level of semantic utility. So, Verdigris Genes encodes both the instructions of a program, the structure into which those instructions execute, variables, and so forth.
As a result, all generated programs are valid enough to run and most should run to completion. And the results over many generations aren’t terrible. For very broad requirements, it is possible to evolve programs that solve some instances of a problem, though this can still use a lot of work.
Unnamed Cheapo Weather Client
When I discovered Open Weather Map and its API, I decided to get a sense of what programming in Python feels like, since its programmers all defend it like a religion. So, I threw together the Unnamed Cheapo Weather Client, which pulls forecast data down through the API and displays it in a graphical interface.
It’s hideous and inflexible, but it does work.
I remain unconvinced that Python is anything special, though. Nothing about it seemed to make errors more difficult, make any processes more convenient, or otherwise recommend itself over any other scripting language. It’s not bad, just nothing special.
There isn’t much of a story, here. I decided I wanted to take a good look at the Scala language and the first project that came to mind was to implement Go Fish.
Given that fascinating history, it didn’t turn out badly at all. The game is a console-based interface that plays between the user and a computer player, cleverly named “First Player” and “Second Player,” but it wouldn’t be hard to make it configurable.
For what it’s worth, Scala strikes me as a solid language. Despite having a strong functional influence—which I wasn’t previously familiar with—it was fairly straightforward to learn and there are some clever idiomatic solutions to common problems.
Before I dug into uManage as described above, as mentioned with Glade Glue, I ran some quick experiments with GTK+ user interfaces. Tikili-li-Takili-li-Ptoe was the most significant, and guided a lot of what I did for Glade Glue.
As a game, it’s pretty terrible. The game is just a two (human-only) player tic-tac-toe game that I believe catches all the possible winning conditions. The name, with the Edgar Allen Poe reference(s), is probably the best part about it.
An invisible object is in orbit around your screen. Click where you believe the object should be and it will appear briefly, confirming whether you hit or miss and potentially betraying its speed and orbit radius. You cannot click during this period of visibility.
That’s the whole game. The score, a simple count of hits and misses, is kept in the lower-right corner. Every fifteen seconds, Chasing Phantoms randomly changes the center, radius, and speed of orbit.
Another early package I developed is the (I should have considered trademark law back in the day) Virtual Etch-a-Sketch for Windows. In a Windows Programming class, I developed a non-skeumorphic dial control (works with right/left clicks) and the first thing that came to mind to do with it was a screen-based Etch-a-Sketch™.
Over the years, I used the program as a testbed for whatever programming ideas I thought of. The software has a network-capable terminal interface (i.e., you can connect to the application remotely), a Logo-like interpreter, export into multiple vector and CAD formats, and a groupware/collaborative mode. In other words, this does a lot it shouldn’t do.
I was worried that this final version no longer existed, because what I found on a dusty hard drive didn’t have any of those feature, just the ability to move in the cardinal directions with dials. But then I found slightly-less dusty system backups, so that’s what I’ve made available.
In the meantime, I have renamed it Etched Windows, so that a certain company that might own the relevant trademarks doesn’t feel compelled to sue. Unfortunately, I don’t have access to an appropriate compilers, but the source includes the installer script and help file I wrote.
Credits: The header image is Orrery designed by William Pearson, made by Robert Fidler, 1813-1822 by the Science Museum Group, made available under the terms of a Creative Commons Attribution-Share Alike 4.0 International license.
Tags: software technology meta
Sign up for My Newsletter!
Get monthly (or thereabouts) notifications on Entropy Arbitrage
posts, additional reading of interest, random thoughts, and previews
of upcoming projects, delivered right to your inbox. I won’t
share your information or use it for anything else.
You can view previous issues.
If you disable trackers (like I do), this form won’t work, so you’ll need to sign up on Mailchimp's site. Sorry!