I’ve just released my first Elixir library: Aerfoirt. Aerfoirt—which means airports in Irish—is a very simple library to help you get basic information about world airports. In essence, it is a key-value store where you look up an airport by its IATA code and it gives you back useful information, such has timezone, GPS coords, and other location information.
This was my first time packaging something up for Hex, Elixir’s package manager as well as my first time releasing any Elixir code that I’ve written. Even though this a very niche library and not many people will end up using it, its intimidating putting code out there in a language I’m still pretty green at.
Installation and basic usage instructions can be found at the repo. If you end up using this within a project you’re working on, let me know! And, of course, bug reports and code tweaks are certainly welcome.
With my wife and I expecting our second child in a mere month, we’ve been talking about names a lot in our house. My wife was a teacher in a previous life and, even though she only worked in schools for a few years, she has a stockpile of names that rub her the wrong the way because of a terrible student she had. Not only that but names for children tend to not even sound appropriate until you’re forced to use them. I remember not being a huge fan of my daughter’s name when my wife first came up with it but now I can’t imagine calling her anything else.
There is an old proverb in software development that I first heard when I was in college and it goes something like: “There are two hard problems in computer science: cache invalidation and naming things”. Every programmer has had variables named i or j that they have come to regret six months later when they are struggling to remember the purpose of a variable. But what is harder than naming variables and more akin to naming a child is naming a project or product. Obviously, everyone struggles with it which is why we have so many products that simply affix “ly” to the end of a word or, in years past, would drop the “e” from a word that ends in “er” (e.g. Flickr, Twittr, Tumblr).
So as I have been working on my new project I have been toiling over what to name the damn thing. I’m usually drawn simple, real words. Things like Bloom or Basecamp or even somethin generic like Pages. The thing is, those sort of words are awful for standing out to search engines. Should I expect people to search for “Schedule SasS” to find me if they can’t remember my domain? Not only that, generic domains are very expensive and since the service will work by sending links around—via email and SMS—I’d like to avoid a long domain like getscheduleapp.com just for the sake of having a .com.
So I’m left with the task of trying to invent a name. I spent sometime trying to coerce the words schedule and choose into weird combinations (without much success) until I had the idea start putting terms into Google Translate. The translation robot would have its way with a word and then I would start referencing the words in other languages that it would give me with available domains. After following this process for a couple words related to the project, I found a suitable word after translating the word choose into Latin: eligo. Its not an awful sounding word and everyone I’ve spoken the word to and then asked to spell it has spelled it correctly. There also isn’t an endless number of results when you search for the word. So I snagged a decent, short domain and settled in on the name.
Eligo certainly isn’t the sexiest name but has grown on me the more I use it. And now my little project has something to go by. Its already been nice referring to it in conversations with my wife at home by a name and just as “that scheduling app that I have been working on”.
I’ve made some great progress on the scheduling app this week and I feel like I’m getting some momemtum on the project. This has been absent from the personal projects I’ve worked on lately so it feels good. I expect to have a very rough prototype done on Friday which my wife and I will start using ourselves the next week. I’d love to get some close friends using an alpha version by mid-February.
I decide to make this project the first real project that I use Elixir and the Phoenix framework. Its been a bit challenging to have things take a little longer to accomplish, having to get used to a new programming language/paradigm and new framework, but I am certain it will be pay off in the long run. Phoenix has been a wonderful framework to work with, even with the learning curve, and is more in-line with how I’ve been wanting to build web apps lately.
I recently started working with a new client that has never been involved with any part of the process of creating a piece of software before. The project is very large and I’ve been having a difficult time breaking the scope of work down beyond the obvious chucks like: web app, iOS app, API service, system administration, etc.
At one point, I stat down at my computer and went through each page of the documenation that I was given (a haphazard wireframe document) and started putting hours to each chunk. After I broke down the application into parts—screens and functionality on iOS, web pages, API endpoints, server set up—I realized that I had worked on similar features in the past and I was able to look at old time logs that I keep with previous clients and start attaching reasonable time estimations. And after I had gone through the entire project I felt like I had a pretty good guess on how long it would it take me. It felt like a long time but creating an app and its accompaning services takes time.
So I sent my findings to the new client and they immediately accepted it, right? Nope. Total sticker shock. Perhaps I could have eased the pain by submitting three or four different estimates. Perhaps I am way off. Either way, I’m now finding myself here at my desk at four in the morning trying to figure out how to shave hours off of this project, one that is already starting to see the its scope increase. Which, now that I’m putting this experience to words, doesn’t seem like a great way to start a project.
We all have our annoyances that others don’t seem to notice but that really bother us personally. One such nuisance for me is the presence typesetting widows on webpages that I create. Widows—and their close siblings, orphans—have a somewhat ambiguous meaning when it comes to printing prose on paper but in the context of web publishing it refers to a word left all alone on its own line of text. Here is an example:
You could certainly argue that widows are merely a styling issue but, nonetheless, it is something that bothers me—at least when they are found in my own writing. The tricky thing on the web is that we have little control over how text is wrapped. Back when designers were laying text out onto fixed pages they could easily avoid widows from occuring by manually dealing with them. On the web, however, it requires a little bit of finesse to solve the problem.
Years back, Shuan Inman released a Wordpress plugin to combat this issue by placing a non-breaking space between the last two words within an HTML tag. He named it Widon’t. And ever since I’ve started writing on my website again, I’ve been itching to get something similar set up within my publishing routine. Sometime last month I became so irritated at the presence of widows on my website that I decided to do something about it.
If you’ve ever gotten to the bottom of my about page then you may have seen that I use a static website generator called Middleman to create and publish my website. Middleman has a wonderful extension API that made it easy to intercept the compiled HTML and then apply my own Widon’t processing to it. Nokogiri made parsing and modifying the HTML so simple that entire extension clocks in at only 50 lines of code.
If you use Middleman and are interested in giving it a shot, you only need to add middleman-widont to your Gemfile and then add one line to your Middleman configuration file:
There are installation instructions as well as a couple of configuration options outlined in the README which you can find in the project’s repository up on Github. Its perhaps a bit irresponsible of me but I haven’t bothered writing automated tests for the extension yet. If that is the sort of thing that you enjoy—or perhaps a project without tests is one of your annoyances—please feel free to contribute to this tiny project.
The extension has been used on this website for the past month or so and I’m pleased with how it works so far. Its already come in handy as I explore the world of ePub too. I am always amazed how big of an impact little details like this can have on a project. Its a nice reminder for myself that it is worth it to sweat the details—even on a humble personal website like my own.
Its a long story that I’d like to ellaborate on later but the gist of it this: I’ve recently developed such a bad taste in my mouth on the state of copyright and licensing that I’ve decided to experiment with not dealing with it at all. I came to the realization that I have a long list of books that I’d like to read that are all in the public domain and, therefore, free from the mess of ownership and copyright. Many of these books are available on Project Gutenberg in ePub format so a bought an E Ink reader to read them on.
The problem is most of the ePub files on Project Gutenberg are a mess. Not just their on-screen formatting but the code is a bit of a nightmare reminding of old days when I would view source on website made with Microsoft Frontpage. Its a shame too because the ePub format is a very simple format, essentially a bunch of XHTML and CSS files with a couple of XML files zipped up. There isn’t any reason the same love and care we put into our websites’ mark up should be absent in these files.
So along with my experiment of not consuming modern media for a spell, I’m going to experiment with constructing an ePub book by hand. I’ve decided to start with one of my favorite books, Walden. I will be paying close attention to typography and formatting while, hopefully, still staying true to what makes ePub a great format: content flexibility. I’ve got the basic HTML ported over and I’m now working on choosing fonts and tweaking spacing and formattng. I’d like to do things in the same spirit of Project Gutenberg so I am limiting myself to only free and open typefaces, which so far isn’t near as challenging as I thought it would be. I’ll be sure to post the file when I’m happy with it.
I’ve been really enjoying messing with Elixir lately. I’ve had a few flings with Erlang in the past and while I always enjoyed it, it never found a permanent place in my toolkit. The goofy—to my eyes—syntax of Erlang is mostly to blame for that but the lack of an easy to use web framework didn’t help much either. I came across Phoenix not too long ago and I’ve started a few personal projects using it. Its really nice having a more readable syntax along with some of things I really loved about Erlang, like pattern matching. I’m liking where this rabit hole is going.