You are NOT a Software Engineer!

I enjoyed You are NOT a Software Engineer! by Chris Aitchison. It’s a fun analogy. Writing software certainly does feel more like something roughly planned and growing organically or evolving rather than something perfectly specified and executed. And I think this is OK.

Another thing we coders often forget: we are also authors. We write code for humans (others and our future selves) to read. I want you to be stoked when you read what I write! And coding is writing.

Avoid trivial merges with github pull requests

I like a clean, boring git history. I prefer this:

* 6ca186e Someone set us up the commit
* f55bcf8 Initial commit

to this:

*   494c94e Merge pull request #1 from kormoc/pr_test
|\  
| * 6ca186e Someone set us up the commit
|/  
* f55bcf8 Initial commit

The latter includes 494c94e, a technically unnecessary commit. I call it a trivial merge, other folks call it a merge bubble.

By default, github will preserve trivial merges when you use the “Merge pull request” button.

If you don’t want these trivial commits in your history, you have to pull (fetch/merge) locally. When someone creates a pull request for you, github sends you a handy email with a command you can cut and paste to perform the merge locally.

You can merge this Pull Request by running

git pull https://github.com/kormoc/pulltest pr_test

Or view, comment on, or merge it at:

https://github.com/meonkeys/pulltest/pull/1

Recall that git pull does an implicit merge. If you merge locally and there are no conflicts, the trivial merge will be omitted.

You may miss the trivial commits because they include a reference to the pull request on github. I won’t. I might ask the patch submitter to refer to the pull request by name/link in their commit log message.

If you want to prevent anyone from pushing trivial merges, more work is required.

Update 2013-06-25

I now prefer what GitHub’s merge button does, namely: preserving the merge history for pull requests.

3 Reasons Why You Should Never Use Enlocked

Enlocked advertises easy, secure email. Sounds good to me! My current solution (Thunderbird+Enigmail) works, barely, but it is a big pain in the tukhus. I’d go for something better. Heck, I’d pay for it. And Enlocked is free!

I gave their Chrome plugin a try. Installation was a breeze and it worked exactly as advertised. It integrates almost seamlessly into GMail (when replying, quoted text is still encrypted, but they’ll probably fix that soon). It really was friendly enough for anyone! But I’m not dusting off the old blog just to tell you that. No ma’am.

Unicorn and Cow (and sentry)

1. They encrypt and decrypt using their own key.

If you’ve ever spent the not-insignificant time to learn and use PGP yourself, you’ll know that one point of going through all the trouble is complete, end-to-end encryption. You don’t have to trust your email handlers. Any of them. And there can be many! So, uh, you just never give your private key to anyone, ok? Everyone gets their own keys (there are plenty for everyone, and they’re free!). That’s the way PGP works.

I should say that I’m not positive Enlocked uses their own key. It could just be a key they generate using some secret they securely get through you via OpenID or something fancy like that (even so, they’re free to brute force your secret day and night since they have the key). But without knowing for sure, you might as well assume it’s their key and they can decrypt your messages anytime they darn well please. Or if someone forces them to decrypt messages (like a government, or someone with lots of power or money), same result.

2. They encrypt and decrypt on their servers.

From their How it Works page:

The systems at Enlocked only have access to your messages for the short time we are encrypting or decrypting them, and then our software instantly removes any copies.

This is really more of the first reason (no end-to-end encryption), but it’s just another place where their inevitable security breach could occur.

3. Their software is closed-source.

If you know me you know I’m a Free² Software zealot, so you expect this kind of propaganda from me. But transparency is really important where the actual encryption and decryption takes place. They must at least make their client-side code available for review.

Sorry Enlocked, nobody serious about security will adopt your software until you address these issues.

Disclaimer: I’m no security expert. But Bruce Schneier is. If you really want to get schooled on security, read anything he’s written. For instance: Secrets and Lies: Digital Security in a Networked World.

Link Checker Wishlist

Link checkers spider through your website and make sure that links work. I want an awesome link checker. Ideally, it would espouse as many of these attributes as possible:

  • easy to learn
  • easy to configure/customize
    • example config: don’t hit URLs on other servers
  • sensible default behaviors
    • example: respects robots.txt and ‘nofollow’ link attributes
  • scriptable / embeddable
    • useful from command line
    • useful from within CI servers like Jenkins
  • recurses (parses HTML, follows links)
    • and smartly avoids checking the same pages twice
  • fast
  • thrifty with memory
  • pluggable
    • example plugin: run jslint on all JavaScript
    • example plugin: validate HTML 5
    • example plugin: validate CSS
    • example plugin: compute accessibility score
    • example plugin: JUnit XML output
    • example plugin: OpenDocument spreadsheet output
    • example plugin: Excel output
    • example plugin: CSV output
    • example plugin: JavaScript engine
    • example plugin: follow hashbang URLs
  • beautiful source code
  • FLOSS

offline HTML 5 validation

HTML 5 logo

I’m liking Henri Sivonen’s Validator.nu service. I’ve got it running locally, and it works well. I can use it as a web service and validate HTML from within Vim, using quickfix to rapidly resolve errors. My Jenkins CI server uses the same validator via phpunit tests.

Warning: it took me a very long time to get it running locally. Technically easy (just run a build script), but it downloads tons of libraries and files before it can do its job.

Elegant Lead Sheets are Back!

As the holidays are fast approaching, many musicians will be called forth to back a multitude of sing-alongs. Be prepared! Musicians that care memorize or use sheet music, and nerdy musicians love Chordie!

Chordie turns text files with embedded chord names into beautiful, stafless PostScript lead sheets.

Chordie is a fork of Chord, and is written in under 5,000 lines of K&R C. Chordie currenly only runs on *NIX-like operating systems, but there may be ports to other operating systems someday.

UPDATE: Chordii is the new name for this project.