Automate finding misspellings in source code

Typos and misspellings in code can be difficult.

Finding them and keeping them out takes vigilance. Lots of mental energy wasted.

The misspellings tool written in Python can be installed using pip install misspellings.

This tool looks for commonly misspelled words in source code. It has a built-in list of common spelling mistakes.

Example: List all Ruby files and pass each of them to the misspellings tool, with the -f option (file list) set to - for standard input.

$ find . -name '*.rb' | misspellings -f -
./lib/celluloid/exceptions.rb:12: occured -> "occurred"
./spec/celluloid/calls_spec.rb:12: wasnt -> "wasn't"
./spec/shared/actor_examples.rb:950: slighly -> "slightly"
./spec/support/configure_rspec.rb:44: occured -> "occurred"

(As a courtesy, I edited those misspellings in the Celluloid project. It wouldn’t do to let it be made an example of and then not fixing it.)

How to use very latest Bundler in Travis

TL;DR: When Bundler has fixes in master that you need, use the specific_install Rubygems plugin to install and use Bundler directly from a git branch. Example Travis YAML configuration excerpt:

  - gem update --system
  - gem install specific_install
  - gem specific_install
Picture: taken at Cambridge U Library. This is a CC0 free stock photo. But those are nice columns surrounding and wrapping the body of the page. Also: note the shadows of the supporting lines still visible in the finished book.

I will spend the rest of this post unpacking what the above means.

In Ruby, there is a package manager called Bundler. It’s continuously developed, and like all software, can have bugs.

When a Bundler bug gets fixed, the code changes are “merged to master branch”. Then we all wait for the next release. The workarounds are about sticking to an older, non-broken version: use the -v option to choose an exact release. Example: gem install bundler -v'1.13.7'

The Rubygems system does not have a way to install gems “from a Git source URI”, but it does have a plugin system. And luckily, one of the plugins available (but not on that page) is specific_install.

allows you to install an “edge” gem straight from its github repository, or install one from an arbitrary url

In order to work around the “we all wait for the next release” step, we can install the latest and greatest using this plugin.

The plugin’s has also aliased its specific_install action to git_install. The manual claims:

This alias is shorter and is more intention-revealing
of the gem's behavior.

Source: The above Travis configuration snippet comes from a PR to the releaf project.

TODO: Buy a Cinemateket Malmö card today!

Analog film is dying. Digital film is slow in creation. A percent perhaps, of all film, is digitally available. It’s becoming harder to borrow film from archives.
So, not even the places showing old films know how it’s going to be.
Therefore, Malmö’s wonderful film club Cinemateket will sell half-year memberships now. 200 SEK to see all films – in a perfect program – until the end of 2016.
“Stora Cinemateketkortet är ett förmånskort för dig som besöker oss riktigt ofta. Med det går du gratis på våra ordinarie filmvisningar. Stora Cinemateketkortet gäller i ett år och kostar 400 kr. Eftersom vi inte vet hur Cinematekets verksamhet i Malmö kommer att se ut 2017 säljer vi denna höst förmånskort som endast räcker året ut (oavsett när du köper dem). I gengäld säljs de till halva priset.”
Do it!

Pep before PolyConf 2016

I sat down to prepare to get to this year’s PolyConf. I trawled last year’s photos, and found these shots.

(All these photos were taken by polyconf. They’re also All Rights Reserved. So, just links instead of using the awesome paste-a-link-with-oEmbed-support.)

Me having coffee – hair-styling is remarkably difficult in high summer heat.

Will, author of Reasoned Schemer, having coffee sadly, this is the most flattering shot of hime in the collection. The spirited Salt Lake City hacker, whose infectious enthusiasm warmed many conversations was a kind soul and a C64 alumnus. Since then, I’ve bought his book, read half of it, perhaps. It’s mind-bending and kind at the same time. Progress must be slow, as I’m doing this on my own.

Portrait of Robert Virding, author of LFE is tending his language and its community at, a decidedly sub-cultural website. For instance, by translating other people’s blog posts on Erlang to be about LFE. My computer still has an LFE install.

Robert Virding directing Joe Nash (Joe, who presented many a hackathon the world over)

Alban, conf org is a French cinéaste as well as a person who computers a lot

The Bodil birtday cake happened during the closing party

Portrait of Stefan Karpinski, Julia author who’s so genuinely nice that I believe he can run a programming language community. I also believe that community can open “fast execution” to many more people.

Portrait of Leah Hanson, Julia hacker who is working on Learning Julia for O’Reilly (to be published in 2016).

Portrait of Amir, MirageOS hacker who was also kind and nice. This community of communities is incredible like that. See Amir’s homepage and the MirageOS Marrakech Spring 2016 hackathon reports. for more notes and inspirational links.

Portrait of José Valim, Elixir author is someone I never spoke to, but his output is consistent and excellent.

Portrait of Jessica Kerr, functional programming hacker made (and makes) great talks. See her talks page.




Looking forward to PolyConf 2015

On Wednesday, I once again journey south, to Poznan in Central Europe, to participate in the PolyConf programming conference.

Poznan Glowny

As every year, it is about getting new perspective on things, from happy and grumpy people in the field. The field of computering.

I’m lucky to see some familiar faces in the list of people going there, and I’m travelling with qerub, a good friend. (Now, by visiting his website, I saw this wonderfully Acme-hacking project: an S-expression interface to his iTunes library. It’s a year old. I feel like a bad friend for not having seen it before. And, his casing utility camel-snake-kebab has a nicely communicative README.)

Last year, some major themes that stayed with me were property-based testing, functional everything and formal verification (software proofs).

People I met were curious about things, curious about history, curious about sub-fields near their own special field of interest.

To be able to catch the ideas and whims of this three-day madness festival, I will bring a Leuchtturm note-taking book. I’m pretty excited about using it. You may see photos of it on here. Update: inspiration from Bocoups blog, which is covering CSSConf using art.

You’ll hear more from me.

Child themes and repairing them

Meta-blogging, again. It took quite a long time, and had some fits and starts, but now this blog runs on a so-called Child Theme of a freely available WordPress theme.

The trick is that I get to fiddle with small necessary things (like repairing the missing link to jQuery and some Twitter-needed meta tag) in files that are not updated and outdated when the theme gets an update.

|-- functions.php
|-- screenshot.png
`-- style.css

Something like that is enough. The automatically-included functions.php file makes it easy to do things the WordPress way, using their hooks-and-actions concept.

All this, and I really only wanted to install Known, the Indieweb blogging engine that supports webmentions.

PolyConf 2014, talks from day 2

Here are the follow-up notes from my visit to the PolyConf event in Poznan, Poland.

Due to the high speed of talks, I was not able to keep up with commentary, so these are my fragments.

States And Nomads: Handling Software Complexity

The nature of complexity – both as Deleuze & Guattari rhizomes, and as scientific logging in Prussia and Le Corbusier’s replaceable oppressive city visions.

Christopher Alexander

Christopher Alexander, Photo by John Midgley.

A very fine talk by Clojure compiler hacker Zach Tellman.

Phoenix web framework

Darko Fabijan’s been working with Semaphore, a build server SaaS company.

He got interested in distributed computing. Which led him to Erlang.

By way of Elixir, he began using the Phoenix web framework, which can be thought of as Ruby on Rails for Elixir.

The stack uses Cowboy (in place of Ruby’s Rack).

Side-note: I was the hero of the moment, noting a quite subtle typo. I piped up, and muttered “Uneducate yuor quotes. You have smart quotes.” The speaker thanked me.

Use React and ClojureScript to build the Snake game

Alexander Solovyov, software gardener, was an enthusiastic speaker!

In order for you to feel you missed something, here is a sampler of his style on stage:

  • “This magic, I don’t know how it works, but it’s very good”
  • “Uh, I forgot… how to speak.”
  • “A bit of magic, look at that.” Enters keycodes. “I trained like thirty times.”
  • “Initially, it is not dead, right. Let it live. Um, if it is not dead, it is not dead, right.”

Also, he asked for two more minutes, he didn’t just run over time.

He uses up that time.

“I can do eating fruits, in like two minutes.”

“There is a fruit but we do not see it. Which is not exactly Pokemon.”

Mr Solovyov keeps the website Open Source Game Clones which catalogs game projects.

FlowHub: supporting new languages in components

Finnish Berliner Henri Bergius talked yesterday about the FlowHub system. In fiery conversation, he explained which WebRTC things that are needed to make a FlowHub Component live editable. These are all supported in web browsers. The browser experience of WebRTC has full two-way video and audio.

But the FlowHub protocol for live editability only uses “two-way data only sessions”.

To use WebRTC for non-Web browser platforms, the programmer is in a worse place. Much of the systems used are not ported to, say Python or Java.

Extract from the draft that describes use-cases for SDP (Session Description protocol, RFC4566). I believe is the use-case relevant for FlowHub: two parties that want to exchange regular old data.

5.2.3.  Two-Way Data Only Session

This scenario illustrates SDP negotiated to setup a data-only session
based on SCTP Data Channel, thus enabling use-cases such as file-
transfer for example.

Lunch: meeting Wojciech

During eating a sandwich, I had an animated conversation with an Erlang user and Coq proofs enthusiast.

Proofs are constructed using induction. Either, from the bottom up (from axioms up to the theorem) or top-down (picking apart the theorem into sub-pieces, that we can build axioms for).

He explained his interest in formal methods: “I made broken software for twenty years – I don’t want to do it anymore.”

Links of interest:

Per Martin-Löf

This photo of Per Martin-Löf was shot by wikipedia user Txa, a hero to the people. He seems like an interesting person, as well.

Lessons from Erlang (an introductory talk)

Erlang was started in 1987, making it just 5 years older than Ruby.

“Frankly, development is just a fraction of the lifetime of a system.”

Supervisors, behaviors, remote observing tools. Tracing in the VM.

Sadly, I got no “lessons learned” section in this presentation. Practical knowledge-sharing and story-telling is important to me, an OTP fan.

On Ruby (an introductory talk)

There are lots of Rubies: Opal, RubyMotion, mruby. Each of them can be seen as a consumer, like in the ports-and-adapters architecture. The talk suggested a way of portioning one’s software architecture so that relevant part could be re-used on different “hexagon edges”.

Lightning talks

Introducing Pyladies, Poland

PyLadies is a global mentorship group for women in Python. 50+ locations around the world.

Introducing DjangoGirls Poland

Translate the DjangoGirls Tutorial.

Introducing C

txus, a Barcelona joker, makes fun of enthusiastic new-language talks, by introducing C.

But, this joker is not anti-intellectual. He’s quite the thinker.

He has developed Kleisli, a Ruby monads library together with a friend.

txus blog was a pleasant surprise. I hope to follow it for a long time.

He resembled a Danish friend very much.


The installer team at SuSE had a problem: an in-house custom language called YCP.

YaST stands for Yet Another Setup Tool.

  • 600KLOCs of YCP.
  • Custom in-house language.
  • Procedural.
  • 12 years old.
  • 12 people know it.

Needed to rewrite it. Solution: transpiler to re-do it all into Ruby.

Six people, on and off, for six months. Project name: ycp-killer. The resulting Ruby code-base was 700KLOCs.

Links that got away

jstepien’s ints library.

Wikipedia on Mutation Testing and mutant, which txus was involved with.

RailsLTS – Rails LTS is a commercially supported fork of Rails 2.3 and Rails 3.0 that continues to receive security patches now that official support has ended.

PolyConf 2014, a travelogue, part 2

PolyConf 2014 – Talks from Day 1

Morning began with fine cappuccino coffee and honey-spread bread. After initial difficulty to find the venue, me and my companion made it to the large school building where the conference was hosted. Here is an image of us failing to walk into the right building:

Failing to get into the conference

Talks began immediately.

I choose to present some of my notes from the talks here.

Audience participation in the talk hall was not so edifying. As always: “Don’t be that guy.”

The Value Of Diversity And Other Lessons From Biology

Garret Smith, an American Erlang man, (wearing a meme garment saying “utterly terrifying”) wanted us to compare the Paul Valéry evolution steps with making software. The steps are two:

  • Gather Options (“combinations”)
  • Pick the fittest Option

“The Valéry Method” of programming. Mr Smith described it a little like a decision-making tool, for cool heads. I like this.

Garret also went into some basic genetics. He was a character.

Flow-Based Programming For JavaScript

Henri Bergius is a skilled entertainer, presenting flow-based system NoFlo many times a week. While the delivery is low-key, his enthusiasm is strong.

The KickStarter that created an editor for FlowHub

Henri being Bilbo

Cross-Platform Functional Programming With F#

Michal Lusiak of Tretton37 talked about F# – described the eco-system, the deployment situation. “I mostly build apps for iOS and Windows Phone.” He went on to list some greatest hits of the platform.

  • Pattern matching (“OCaml or Haskell people will say it’s stolen from them, and they are right.”)
  • Units of Measure
  • Type Providers, read up JSON into a statically-typed object you can intellisense on. “Dot-driven development”. Type Providers for SQL, for instance. “Strongly-typed SQL”. Traverse your Facebook friend tree.

Honza Kral on ElasticSearch

The search infrastructure ElasticSearch has many clients. They’re well made, and Honza Kral told us what quality work goes into them.

In summary:

Bonus: Word used today include knowledge worker, multimedia, weblog.

PolyConf 2014, a travelogue, part 1

Had a family start to the trip, as my programmer friend has a Polish cousin in Poznan. She treated us to a quick dinner with the activity “sample the wines we try out for the wedding and rank them.” We picked the winner, bottle 3, which was the right answer. A nice chatty evening was had in a warm young family home.

The hotel, Mercure, was a short walking distance away. Fun feature: bathroom lamp with short timer. Instant surprise in the shower.

EuroPython 2008: A belated travelogue

This is an undetailed log of goings-on and other inspiration at EuroPython 2008, which took place in Vilnius, Lithuania (the southernmost of the Baltic countries).

Arriving in Vilnius, which has an airport the size of a thimble, we started into the city in a cab. Cab driver tried to upsell some prostitutes. We were more interested in his anecdotal mini-review of cities:

Moscow, very dark city, very bad people. Here? No problems. Nice little village. … My children can play in streets here.

We get to the small hotel Apia, in the old town. The desk clerk girl gives us a room key, and we climb the stairs, and find that the folks in the room have yet to check out. We are “early”. So, we stashed our bags in a small compartment behind the desk clerk desk (which incidentally only had room for a small bed), and walked the 10 minutes to the conference hotel.

The old town reminds me of a worn-down Visby. Local posters for events range from to Euro-regular to super-cool. A music event poster had remixed a medieval painting of three riders, adding a disco ball to one horse, a cauldron of mushrooms to its rider. One of the horsemen carried a boombox and a gold chain. Very classy execution.

The conference space at hotel Reval: pro. Everything was geared up, rooms were plentiful. The service was immaculate. When I needed to print a PDF document from my USB keyring, it was done for me faster than I could’ve done it myself.

The EuroPython time-slotting of talks: Merciless, in a good way. No speaker is allotted more time than planned. This bit one speaker: Mike P, who presented the interesting SnapLogic framework.

There is a BarCamp/Open Space track, which meant I got to sit in a “JavaScript for Pythonistas” session, talking about JavaScript. That had the upside of one Swedish guy asking the question: “Will you release that?” about some code Isak described. “We hope to do so” was the diplomatic answer. That session was started by Mr Jonathan Fine, who did a smart roundup of who was in the room, what they were interested in, and how we could partition the group smartly, so as to have good subgroups.

By coincidence, merely, we met people we’d met before, Maciej (aka “Fijal”), Jan K, and Grono-Krzysztof. Good clean networking fun. When I say “we”, I mean me and Isak, my colleague.

xFrac (name comes from: xUnit, and “frac” meaning “fraction” — something smaller than a unit) was a testing idea, introduced by Mr Jonathan Fine. It included the JSON subset XSON (which went something like):

['a',{b:'c'}, 'd'] -> <a b="c"><d/></a>

A way of expressing (X)HTML using a tighter format.

Tuesday: Psyco guy: “I just want to go back to PyPy.” He’s maintaining this pre-PyPy optimized C code that has to take care of all corner-cases of Python. (Easier than doing the same for Ruby, but that’s not saying much.) Lightning talks.

Hans Rosling (Trendalyzer, Gapminder Foundation) is a very good speaker: active, and explains things clearly. Not afraid of having opinions, either. He mentioned the SDMX data/metadata format, which seems like a super-complex notation.

Wednesday, final day of EuroPython. I got drafted to “time a speaker”, making sure no schedule over-runs got in the way of the schedule. My speakers were simple to time: tight talks, short questions period.

Thursday, sprint day 1. Me and Isak and Michael Moutakis (Swedish guy, answering the boring question What-do-you-do with “I’m a bureaucrat”.) set out making something “a terrain map of source code”. Terrain map, meaning that “a place should stay in roughly the same place on the map over time”. We wanted to build it using SVN metadata. One of the Launchpad men pointed me to the bzr-svn plugin to Bazaar 1.5. (I tried installing it, but foundered on the plugin.) Thanks!

Me and Isak would parse the SVN metadata, and Michael would use the PIL (Python image library) to create a bitmap image to visualize the data. A single empty line somewhere thwarted us.

Friday, sprint day 2. We continued our battle with the empty line, and grew more and more confused about the dump format. Isak nailed the empty line problem as we were landing in Copenhagen, later that night.

Got home. Beat. Great conference.