24 Nov 2019
I’ve made some much-needed updates to the site over the last couple of weeks, and I’d like to summarize some of the changes and things I learned along the way.
Unfortunately, I don’t have much formal training in design beyond art classes in middle school, but I like to think I at least have a sense of what looks good and what does not (though I probably couldn’t formulate a cogent explanation as to why something looks good). One facet I’ve been working to develop in is color theory. Ironically, I think the RGB color system may have deterred me from doing so for quite some time. As an implementation detail, RGB is great, and as a lifestlye, it can’t be beat! However, it is a terrible way to think about color. Need to find a tint or shade of grey? No problem! Just make sure all of the component values are equal? Need a tint or shade of a color? Good luck unless that color happens to be red, green, or blue. Enter: Hue, saturation, and lightness, or HSL. You know that weird circumscribed triangle you sometimes find in photo editors? Yeah, that’s HSL. It’s an incredibly powerful tool for describing color, as it expresses it in terms more analogous to how humans process color. Hue refers to the point around the color wheel where its pure color resides. Lightness is a spectrum from black to white and indicates how bright the color is. Saturation is a spectrum between the hue and lightness, and is orthogonal to it, defining how prevalent the pure color is. The pure color component is the key to HSL’s power, in my opinion. Want a tint or shade of purp—I mean violet? Dial in the hue and saturation you want and then slide along the lightness spectrum to your heart’s content. Try doing that in RGB!
HTML5 Semantic Elements
For the uninitiated, HTML is an initialism that stands for the Hypertext Markup Language. I’d like to direct your attention to the word “markup,” as it’s doing the real heavy lifting in describing what it does. HTML syntactically structures and encodes the semantics of the content of the document within the document itself. Generally, this additional information is used to determine how the document should be laid out visually, but that information can be expressed in different ways for different people. For example, italic tags exist because a visually-impaired individual might not be able to see the subtle change in font depending upon how the page is rendered, but a text-to-speech program would also be able to convey that emphasis audibly. With this in mind, I’ve been incorporating more HTML5 semantic elements where applicable, such as wrapping paginated entries in
section tags to better delineate them, and adding the
button tag to my theme toggle switch. They’re particularly great because there’s no need for to worry about graceful degradation, as even browsers as old as IE6 can be taught how to handle them (more on that later) with as little as a single CSS rule. The internet was invented as a means of sharing information, but that information is only useful to those who can access it. Increasing accessibility (and awareness of accessibility as a ideal) is only to the benefit of everyone.
Disregarding Deprecated Browsers
Time stops for no one, especially anything related to the web. Before I began this overhaul, I knew I wanted to fully-embrace technologies such as Flexbox, but I also wanted to make sure this site is accessible to as many people as possible. In order to maintain my sanity and minimize hacks, I drew a line in the sand; I won’t be supporting any browser that isn’t supported by their developer, which I believe to be a reasonable compromise. I was astounded to discover that meant I only had to support as far back as IE11. I should clarify that when I say support, I mean in terms of visual appearance and functionality. I’ll still worry about graceful degradation when appropriate, but nothing more. After all, I’m one guy, and this is a personal website. No one’s life depends on my site’s footer displaying correctly.
“Hello darkness, my old friend”
no some fear, for the
noscript tag is here! Unfortunately, there’s nothing I can do to prevent the slow-mo wipe effect of potential doom or possible page re-rendering as the layout updates, but I can make sure that the correct image is displayed without being downloaded twice by wrapping a fallback
RSS, Weblinks, and You
I’m kicking myself for not taking note of where I first saw a weblinks page (although the idea is probably as old as the internet, because everything is a remix), but I love the idea! It’s basically your bookmarks bar (or at least the interesting links) publicly available for others to peruse. I’ve made my own (find it in your local browser window!), and hope that I can use it as an opportunity to not only share things that are new and interesting to me, but things that I’ve known about for awhile and still find interesting or noteworthy, because "every day somebody’s born who’s never seen The Flintstones"Copyright 2000-something Merlin MannCopyright 2011 John Siracusa (relavent xkcd). In a similar vein, I’ve also gotten into RSS like it’s 2009. My primary motivation was to limit my consumption of algorithmic content from platforms whose desires with respect to how I use the platform may not be (Read: aren’t) congruent with mine, which is totally fine, but recognizing that reality necessitates diversifying the channels through which I consume information. In the same spirit (and because it took basically no work on my part), I’ve also set up an RSS feed for this blog, so others can take a listen to what I have to say if they so desire, rather than if an algorithm is confident enough that they will. Oh, and I use and highly recommend FeedReader, as it’s built with Gtk, looks great, works great, and respects my window control preferences (@GNOME Feeds)!
I’m very satisfied with the updates I’ve made over the past couple of weeks, and there’s certainly still more to be done (apparently there’s some design paradigm known as “mobile first,” and I guess I’ll have to see what that’s about), and I’ll probably write some more about those in the future. I hope that others can take these ideas and lessons and apply them in their own endeavors of building a home for themselves on the web. As a wise man didn’t once say, “Be the change you want to see in the world.”
Emoji in GNOME on Arch Linux
17 Oct 2019
Emoji 🚀 are ✨ great! ❤️ In a 🏠, with a 🐭, in a 📦, with a 🦊! The only places they really don’t belong are in the premise’s of movies, and CLIs (I’m looking at you, Kubernetes). One place I was sorely missing them though was on my Arch installation, until today that is.
For the uninitiated, under the hood, emoji are simply characters that were long-ago relegated to an unused corner of the Unicode table. As a result, this means two things for us; first, we’ll need to find a font that includes them, and that also means confronting…
fontconfig *cue: wilhelm scream*. Second, we’ll need a way of typing them. In hindsight, that’s more like two and a half to three things, but I digress.
Finding the perfect font
Fonts are like opinions in that opinions are like assholes; everybody has one. The only things that everyone can agree on are that Arial is just a cheap knockoff of Helvetica and that Comic Sans isn’t the problem, people who use Comic Sans in inappropriate contexts are, but all of that goes without saying. There a quite a few emoji fonts out there, actually. As an iOS user, I should naturally believe that Apple’s emoji are hands-down the best (And I do, they’re absolutely gorgeous!) but sadly, due to licensing I couldn’t possibly install them (And no, I’m not using San Francisco Mono as my system monospace font! What could possibly lead you to ask such a ridiculous yet poignant question?). The few fonts that I did actually try include
twemoji-color-font. Had I thought about it for half of a second and realized that Noto emoji is used by Android, I would’ve stopped myself right there. No offense, but it looks like the typographer drew them grasping their pen in a fist like a cartoon character.
"This is fine."
Next stop, Twitter Color Emoji, Twitter’s open-source emoji font. I’ll admit it, I think it looks pretty good. Having been burned once not five minutes ago, I decided to give the
README a thorough go. Not even one quarter of a way into the document, I stumbled across this little gem:
Note: This requires Bitstream Vera is installed and will change your systems default serif, sans-serif and monospace fonts.…
DejaVu includes a wide range of symbols which override the
Twitter Color Emoji characters…
Bitstream Vera is the source of the glyphs used in
DejaVu, 99%+ of people will not notice the difference.
You’d never guess, but I use DejaVu, and I quite like it, and I am one of the less-than-one percent who will notice the difference. So like any rational human being, I fire up
yay and installed it anyway, foolishly confident in my skills and ready to pit them against
fontconfig in glorious battle. After way more time than I should care to admit, I mostly had it worked out. Take that, RTFM! Happy as a clam, I carried on to the next step on my endeavour.
Selecting a Selector
As mentioned earlier, emoji are just characters, and so unless you’re Tom Scott, or don’t mind memorizing keycodes (I can’t find the forum post but yes, someone suggested that. I hope it was in jest 😰️), you’re going to want a way to select them graphically, preferably with some sort of search functionality included as well. Luckily for me, I use GNOME, which has an emoji picker built in that I knew nothing about and is apparently only documented in this Gitlab issue. Great! …except for the part where it only works, understandably, in Gtk applications. No worries, next stop, GNOME Shell Extensions! Everything useful in GNOME is à la carte these days it seems, and a system-wide emoji selector is no exception. Thankfully, there’s Emoji Selector, which includes a search feature! Hooray! Two clicks and we’re off to the races—oh no. Remember that quote from a paragraph ago that mentioned that DejaVu overrides Twitter Color Emoji but I thought I had fixed it? Turns out I hadn’t in this particular circumstance. And remember a paragraph ago where I had mentioned that I love Apple’s emoji but would NEVER violate their licensing? (If there any lawyers for Apple in the room, uh, you’re needed somewhere else) Ok, now that that’s taken care of, turns out that there’s an AUR package. I’m sure you’d never guess, again, dear reader, that in this twisting and turning tail there would be another turn, however this one is pretty minor. The conflicts list in the
PKGBUILD is actually ridiculous. A quick
4dd and a few more incantations (sans any StackOverflow searches, thank you very much), my eyes were met with the prettiest emoji my system ever did see!
Sadly, they were too beautiful for GNOME Shell it would seem, as in Emoji Selector they were rendered as silhouettes. UPDATE: Turns out I just needed to restart GNOME Shell. 🤷🏼♀️
Again, "This is fine."
All was not forgiven, though. I still had a couple of qualms about using a shell extension as an emoji selector: First, it couldn’t actually insert the emoji; it only copied them to the clipboard. You still had to manually paste them into whatever text buffer you were editing in. Second, the selector itself is just a popup menu item; it will always appear in the upper right corner of the screen, regardless of where the cursor is. This is admittedly a very minor quibble on the surface but for crying out loud this is a post about me wanting to be able to effortlessly spam my writing with modern-day hieroglyphs! Anyway, the fixed position of the selector almost never anywhere near where I’m typing really interrupts the flow of whatever context I might be in. It’d be much more preferable if the selector were able to be implemented as a drop-down list like other tools, such as autocomplete, do. After (I’ll admit it) some StackOverflowing, I stumbled across
ibus-typing-booster. I had some vague recollection of
IBus complaining about things way back when I used Ubuntu, but I never really knew what it did. I wish I had bothered to learn earlier because “Wow!” is it powerful!
Intelligent Input Bus is a multi-lingual input-method framework. Basically, it allows a user to easily input characters regardless of their keyboard’s physical layout. As we know, emoji are characters (I’m sorry I keep hammering that, but I’m always really excited by realizations that beneath the many layers of abstraction that modern computing sits upon, almost everything is incredibly mundane in implementation), meaning that it’s perfect for the job and, as icing on top,
IBus operates via a panel that’s rendered at the text cursor!
This is actually great!
Installation (at least on Arch) proved to be a little obtuse, as it requires executing a program called
ibus-setup. *sigh* Maybe I’m just becoming curmudgeonly in my old age, but separate setup applications have always felt like an antipattern to me. Perhaps I’m naïve, but why not do whatever initial configuration is required during installation, or perform a check on every run? For a daemon especially, even having the user manually perform it would be preferable. Perhaps I’m only saying this because of what happened next, though. At the end of executing, a preference window opened with some configuration options and no obvious “save” or “cancel” buttons to be found. Upon closing the window and trying to setup
ibus-typing-booster, I was greeted with an error dialog stating that the
Ibus daemon wasn’t running. There wasn’t any mention of any
DBus service or
systemd unit to start. Did I miss something? Do I have to restart my session? I was consulting the Holy ArchWiki and the only nugget it offered was the suggestion that some environmental variables may need to be set, so I tried that, and restarted my session as part of it and sure enough,
IBus was up and running, but not knowing what action specifically solved the problem is frustrating, and may even cause trouble in the future if I need to fix anything. To be fair, I wasn’t being very scientific about it. I could have tried restarting my session first, but to be honest, I was getting a little tired. Having accomplished the necessary prerequisites, I turned to the matter of configuring
ibus-typing-booster. This may be another reason why, in retrospect, I may be unnecessarily critical of
IBus's documentation because I tip my hat to the creator of
ibus-typing-booster, Mike Fabian. His
README and documentation are my new gold standard to strive for in terms of communicating how to use the tools I make to others. The instructions are detailed but not incomprehensibly dense, and include screenshots! Even though the version of GNOME I use had buttons in slightly different places, seeing that the windows presented matched what was shown content-wise is a welcome relief when you’re deep in a sequence of steps.
I hope you enjoyed this tale of trials and tribulations. I think it highlights nicely that, as often is the case in Linux and in life, the first solution is rarely the best, and that experimentation can lead us to discovering solutions to problems we didn’t even knew we had. In the example of
IBus, I’ve been learning French and now will be exploring if it can help me with typing all of the accented vowels, c-cedillas, and guillemets more easily.
One side-effect of my desire to share what I learn with others is that it also really encourages me to go the extra mile to make sure what I come up with is well-polished. One such example is the instance of this mildly-irritating error initially given by
☹ en_US dictionary not found. Please install hunspell dictionary!
This would appear as the top suggestion (sometimes multiple times) no matter what I typed, and if I’m being perfectly honest, had I not written this article, I probably would’ve suffered for a quite a while until repeated incidents of accidentally selecting it for insertion would drive me to find a solution. But knowing that there was a chance I wouldn’t be the only person benefiting from the extra effort (and honestly taking solace in the fact that the solution to this problem
probably already exists on the internet), I fired up my search engine of choice and got to researching. Here’s what I found.
Hunspell is a spell checker based on MySpell that’s used in a surprising amount of software, according to their homepage.
ibus-typing booster uses it for completion prediction, thus requires dictionaries for any languages it’s used with. Installing a dictionary requires jumping through a few more hoops than usual if it isn’t in your distro’s package repos (Luckily everything is in Arch’s repos). The process is detailed in this StackOverflow post but the tl;dr of it is to download the desired dictionary from Apache OpenOffice Extensions, extract the
.otf file (It’s basically a
.zip file. You can actualyl just change the extension and use something like
unzip), and move the
.dic files to a directory on the
PATH given by
Honestly it might be more convenient to just install Arch.
First Do No Harm
14 Oct 2019
Chef Sugar is a module for the infrastructure automation tool Chef. In September, it came to the attention of the module’s developer that Chef had entered a contract with the United State’s Immigration and Customs Enforcement agency. Citing "a moral and ethical obligation to prevent [his] source from being used for evil", he removed the code from its public repository. While this is not the first time a developer removing a public module has garnered attention, it raises a number of questions for the free software and open source communities, namely, “What should ‘free as in freedom’ actually entail,” and “what can developers actually demand of their users?”
Free Software isn’t Free
One of the Free Software Foundation’s mantras, mentioned earlier, is “free as in freedom,” and as anyone who’s taken an introductory philosophy course in University (*raises hand*) can’t help but mention (aside from the fact that they took Philospohy in University) is that freedom comes in two flavors, positive and negative. As a result of this dichotomy, the notion of absolute freedom is a fallacious one. One individual’s positive freedom to exercise an action can infringe upon another individual’s negative freedom from the consequences of that action being exercised.
On a less abstract level, free software imposes requirements on its users by way of waiving copyright restrictions in accordance with the terms enumerated in its license. The severity of these requirements vary from trivial attribution requests to the viral terms of Copyleft licenses. It is clear that the “freedom” of free software is bounded to some degree.
Ethical Source Software
Ethics in computing is hardly a glamorous topic, a sentiment that only compounds the a priori feelings of apathy towards it. What’s the worst thing that anyone has done with a computer? Invent Facebook? Unlike other professions, such as medicine, computing is seen as benign, and rightly so because it is only ever employed directly in benign tasks. The problem with this perspective however, is that it ignores the nature of computing; that computing is a means to an end, not an end in and of itself.
The most apt illustration of this idea comes from the earliest days of computing, before the advent of the semiconductor, when in 1933 the Deutsche Hollerith Maschinen Gesellschaft, a direct subsidiary of the newly-christened International Business Machines (IBM), began collating census data for the newly-appointed Chancellor of Germany, Adolf Hitler. Their work quadrupled the the number of citizens associated with Jewish heritage at the time, accounting for almost one-third the murders committed in concentration camps by the end of the war.
Today, orders of magnitude more data is being processed with computational power unimaginable almost a century ago, with the aim of identifying persons in the United States without the necessary heritage or legal documents. Though the intent may be dissimilar from that of the leader of the Weimar Republic, the results are not. This is the power of computing: it confers upon the user a multiplicative force that warrants even greater care.
David and Goliath
Now, dear reader, I’m sure you’re thinking, “That’s all fine and good, but I’m just one developer. You honestly expect me to be able to go toe-to-toe against *insert big corporation here*!?” Yes, I do, because others have, and made a mark. Case in point: The much-maligned JSON license, a near-carbon copy of the much-beloved MIT license, with one additional caveat:
The Software shall be used for Good, not Evil.
These nine words ring of origins on Mount Sinai and have caused concern among fellow developers and lawyers alike, with users (in a twist directed by M. Night Shamalan) such as IBM, asking for special licensing. Listening to the JSON licenses’ creator, Douglas Crockford, speak about it gives one the sense that its inception wasn’t exactly driven by serious ethical concerns regarding the use of JSON, however it does demonstrate that licensing does matter and can be a powerful tool if wielded properly.
A Hippocratic Corpus for the Rest of Us*
One of the biggest criticisms of the JSON license, that I must agree with, is that the wording is ambiguous at best. Assuming that you and I would like to contribute to a cause greater than mere trolling, we will need a license with a little more substantive language. Enter, the Hippocratic License, created by Coraline Ada Ehmk, of Contributer Covenant fame (yes, the one that broke the Linux Kernel Group). Written in the spirit of the oath sworn by doctors for millennia with 0% of the problematic wording of the original (seriously, go read it, it’s great!), the Hippocratic license embodies the (one hopes) same spirit of the JSON license while deriving its language from international law.
It is truly incredible that individuals are taking a stand for what they believe in ways that go beyond slack-tivism. While changing the terms by which others can use some code you wrote and put on the Internet probably won’t prevent future genocide, we’ve shown that it can help hinder efforts by those who wish to amplify their effectiveness with such tools, albeit indirectly, and if nothing else, sends a message that such actions are not tolerated.
If you have code you wrote and put up on the Internet like I do, please consider updating your licenses, and whether or not you distribute code publicly, consider contributing to further the important work of putting the power of computing to the use of making the world a better place for all of us (and come on, you’re already giving $5 per month to that podcast about Apple computers and magic tricks).
* Nailed it.
- Black, Edwin (2009). IBM and the Holocaust: The Strategic Alliance Between Nazi Germany and America’s Most Powerful Corporation (Paperback) (Second ed.). Washington, DC: Dialog Press. OCLC 958727212.