Hairy Sun

Matt's Blog on Some Geeky Topics

Oh (Ergonomic) Keyboard, Where Are Thou?

TLDR I have found the perfect keyboard (for me) that has the following features:

  • Ergonomic
  • Mechanical Switches
  • Split
  • Matrix
  • Thumb keys
  • Programmable
  • Open Source (Bonus)

(My new keyboard on my standing desk stand (raised by Logitech box to correct ergonomic height). Old unicomp in background)

I’ve become a keyboard snob

After building my first computer some moons ago, I soon became interested in ergonomic designs. Perhaps the fact that they were different from normal keyboards was what drew me to them initially. Which led me to ponder-why would anyone want a keyboard that is shaped differently than a normal keyboard? That led to me learning about RSI and ergonomics. I started off with a cheaper logictech keyboard that I found at Software and Stuff. I purchased a keyboard for use at work. Surely if I was going to make my living typing code I should invest in my equipment to protect myself. Besides, how would I throw a frisbee and play ultimate if I had carpal tunnels?

Time passed and I picked up a used MS ergonomic keyboard. It seemed pretty good other than the arrow keys were arranged in a cross pattern. (Why change that yet leave everything else in the same position? It boggles the mind). I seemed satisfied and life went on.

Eventually I picked up an MS 4000. It was available and the local office store and felt decent enough when trying it out in the store. It worked fine (or seemed to). Until I started looking into keyboards more. I learned about switches. Each key has its own switch that activates it. The best switches were mechanical buckling key switches. They had a distinct tactile “click” when the press of the finger activated the key. This was supposed to provide for more ergonomic typing because your finger didn’t try to crush the key, but rather could feel when it was activated. They also made a cool sound. And if you typed fast enough it was like having a little machine gun. (The sound also corresponded to the mechanical activation, so you could base your finger movements on that as well). Another great feature about BS keyboards was that they seemed to last forever. As I looked into them many people had IBM Model M keyboards from the 80’s that were still going strong. I had already destroyed the switches on one keyboard and had just figured that keyboards were disposable. (Which was a sad thought because it seemed like every “ergonomic” keyboard at the time had limited runs, so you never knew what your next keyboard would be).

Hmmm, but there weren’t any buckling spring keyboards in ergonomic designs. Wrong! IBM actually produced an ergonomic version, the M15, for a short time in the 90’s. The only problem was they didn’t sell well and they stopped producing them. Of course since they were BS switches they should still be around. Ebay to the rescue. Sadly it appeared that every other ergo keyboard geek had the same idea as me. The price for these rare keyboards if they ever do reach Ebay is pushing $1500! (There just happens to be one on ebay right now with a buy-it-now price of $1249, that’s a steal!) I love my fingers and wrists but apparently not that much. But BS springs intrigued me. Plus I was using ThinkPads as my main workhouse and came to appreciate the track point in the middle of the keyboard. I could mouse around without taking my fingers off of the home row.

It just so happened that the company that bought IBM’s BS equipment and processes, Unicomp, also continued to make a BS keyboard with a trackpoint. Another key event of that time was that a key on my MS 4000 also went out. And after reading about BS switches I became very sensitive to typing on my “ergonomic” keyboard. (Finding out about BS switches was like reading “The Elements of Typographic Style”, once you know about kerning and ligatures you look for them everywhere. It’s hard to unlearn that factoid). I became very apparent that hitting the wider keys on the left edge with my pinky was a great pain. I believe this was because the keys are so wide that the keycaps are rubbing against the mechanism during depression causing binding and lockup. Due to that I would press them even harder, which is bad, and even worse for pinky fingers.

I figured if the current ergo designs have crappy keys, maybe BS switches are good enough and picked up a Unicomp Endura Pro. I was pretty happy with that keyboard. (My only gripe is that the buttons for the trackpoint aren’t BS and so they become worse over time or even stop working). But I loved the switch mechanism. It was probably half in my mind (Stockholm Syndrome) and half due to the crappiness of the switches on the MS 4000. If I ever had a keyboard that was in an ergonomic shape it would have to have high quality switches.

In the subsequent years I read about Kinesis, Maltron, and eventually Truly Ergonomic brands of keyboards. These companies were the only companies offering “ergonomic” designs in keyboards with mechanical switches. (None had BS switches, but they used Cherry brand switches, which many like because Cherry’s don’t just come in one style like BS switches-loud and tactile. Cherry’s have different switches that fill in a matrix with different values for activation force, tactility (or lack thereof), and loud (or not). Cherry Blue’s are supposed to be the equivalent of BS switches (or similar enough). The mechanical mechanism on these switches should be smooth and last for years, instead of months.

An interesting feature that I loved about these nicer ergonomic keyboards was that they used a “matrix” layout. If you look at any modern keyboard you will note that it slants up and to the left. If you think about that, it doesn’t make sense that both hands go up and to the left. Shouldn’t one hand do that and the other hand go in the opposite direction? And I haven’t even gotten to actual layout of the keys. Both of these “features” are hold-overs from days gone past of typewriters, where layout was designed to limit typing speed as to not jam the mechanism. In a modern age, where we have ergonomics yet also want to type fast shouldn’t we drop the legacy features of days past completely? Apparently not. Most keyboards still adopt the slanted layout. But the ergonomic keyboards I mentioned do not. Conforming to century old norms for keyboard layout has led to a lack of innovation in keyboards.

But all of these ergonomic keyboards had a glaring problem. They were “ergonomic” but hard coded the ergonomics! Similar to using a “magic number” in programming, they had physical plastic cases that forced (or assumed) the typist to conform to their ideal of button positioning and distance between hands. That seemed restrictive and silly. There were actually split keyboards that existed. Each hand was separate, but they all had crappy rubber dome switches and/or non-matrix layout!

What to do?

I ended up surfing across a forum for keyboard enthusiasts, http://geekhack.org/. One day in the ergonomic keyboard subsection there was a post. This was in October 2011. The post had renderings of a cool looking programmable, split, matrix style keyboard that would cost around $400. Pricy, but it had most of the features I wanted. Fast forward a year and a half later. After hacking/compromise of geekhack, (continued discussion continued on http://deskthority.com/), lack of community members interested in organizing a group buy, and http://massdrop.com/ stepping in to organize a group buy, I finally had a kit to build a keyboard. Fast forward a long night after than and I had my keyboard. It cost $240 and took about six hours to assemble (having never really soldered before myself).

(Device in action at my standing desk (plastic still has wraps on it))

Features include:

Mechanical switches I purchased Cherry Blue switches which are both tactile and non-quiet to emulate my buckling spring switches (my co-workers have yet to complain about my BS switches). They are rated at 50 million presses, which should outlast me. Having broken a couple rubber dome switches this was important. Also I appreciate that they are smooth and consistent, which has not been my experience with rubber dome switches. Once you go mechanical rubber dome keyboards feel chintzy. (The Lenovo and Apple laptop keyboards are pretty decent though).

Ergonomic A tenet of most ergo designs is that your hands are allowed to come to a natural position, rather than forced to fit into the confines of a keyboard based on a century old typing device. Check.

Columnar Layout Rather than a normal staggered layout like most keyboards, the ErgoDox has a columnar layout. Your fingers on both hands don’t naturally point up and to the left, and your keyboard shouldn’t either. (This might take some getting used to. Some columnar layouts put the number 2 above “Q” rather than one because your muscle memory seems to hit that better. I’ve just tweaked the configuration of my layout to try that scheme). Here’s my current configuration.

Split Halves This was a biggie to me. Again, the Maltron, Kinesis, and TrulyErgonomic all look like they are decent keyboards, yet they hard-code the distance between the hands. With split halves I have 3 degrees of freedom for each half and can create infinite combinations. As the standing desk vs sitting all day debate is raging, I think there is a middle ground. Common sense seems to indicate that variety is probably better than either end of this dichotomy. You should probaly stand, walk, and sit during the day. Wouldn’t it be nice if you could position your hands close together for a time, and then spread them out further apart? Most keyboards don’t allow that. I’ll probably get some sculpy (maybe 3d printing) and experiment with stands for tenting and other angles of the keyboard. (The similar to the stand accessory for the Kinesis Freestyle2).

Thumb Keys Humans have opposable thumbs. Yet most people only use one thumb to type on one key. That seems to be a huge waste. Many of the more modern keyboards (Maltron, Kinesis, and TrulyErgonomic) have keys for the thumbs. This is probably the root of the cause for a steeper learning curve for these keyboards. Because many of the keys are moved under the thumb (and away from the fingers that normally depress them) it can make typing a chore until muscle memory is built. But I believe there should be big dividends after that time.

Programmable The folks at Massdrop created a nice little web application to create layouts for the keyboard. One cool feature is that these layouts can be “stacked”. You could create a layout for qwerty, dvorak, and colemak. You can let the keys under the thumbs be optimized to your desires. I’m still messing around with key configuration as I’m getting used to the keyboard.

(It took me about 5 hours to put this thing together. I’d appreciate a LinkedIn recommendation for my soldering skillz)

Open Source This applies to software and hardware. The firmware is on GitHub. The designs are in the open. Even though it took a commercial company to step up and organize the group buy, one could produce their own keyboard using the existing plans. Because I physically built this keyboard, I feel like I have some semblance of understanding of what is going on at the hardware level and could “fix” a problem with a switch or short should it arise (say a drink was spilled into the keyboard). I’m not sure that is the case with most keyboards out there today.

Yes, it is the most expensive keyboard I’ve ever purchased. But it is cheaper than both Maltron and Kinesis and costs about the same as the Truly Ergonomic. But I feel it is a better keyboard than all of those. I also flip that cost issue around and say it is an investment in tooling that should pay dividends. Also if the ergonomic benefits hold out, it is an investment in my body. Surely my wrists and hands are worth $240, which is about half of the cost of the original estimate.

Future Plans

Right now I’ve only used the keyboard for one full day at work. I’m tracking the commands I do in emacs. After a couple days of recording the commands I’ll examine what I’m doing and see if it makes sense to create a layer with emacs specific chords. I’m more cognizant of my finger movements, both when they migrate off the home row and with my thumbs. I’m trying to figure out what optimizations I could make to my layout. Since all the keys were the same, I threw on some bandaids the indicate hand position (yep need to order two more keycaps).

I’ll be honest. It is harder to type of right now.

One thought I’m having is geeking all out. Considering that many musicians can play a guitar and a bass guitar differently, I’m wondering if I should treat this keyboard as a new “instrument”. Rather than slightly tweaking the normal “QWERTY” layout, perhaps I should try MALT or Colemak. Considering that when I’m using the thumb keys it does feel like a different instrument perhaps it would be easier to make the mental switch between normal keyboards and my geeked out keyboard. Another nicety is that the keyboard itself contains the mappings. So if I use the ErgoDox on another machine I’ll get my mappings. Which is not the case if I’m using DVORAK on my normal laptop, but then switch to my wife’s where she’s using the standard QWERTY layout. Thoughts on this?

I realize many just do not care. A keyboard is a keyboard is a keyboard. For those I’m sorry you suffered through this post. For the rest, realize the the keyboard is currently the biggest interface we have with computers. If we can interact more efficiently and ergonomically isn’t that a noble effort?

(the package from Massdrop)

Full Disclosure. I have no affiliation with Massdrop (other than they are located near my Alma mater). They delivered me a great product. They are planning on doing another run of these soon. If you are interested follow them, or follow me on twitter. I’ll probably tweet about any new group buys they do.

PyCon Preview: Functional Python and Comprehensions

PyCon is right around the corner, and I am lucky to be able to deliver two tutorials this year. For our Utah Python meeting in January, I will be going over a portion of the Hands-on Intermediate Python Tutorial. People seem to enjoy this tutorial, and since I’ve been trying to read up on Clojure a bit, I thought I’d expand the functional section ever so slightly.

If you are in town, Needle.com is hosting and providing food starting at 6:30. Otherwise you will have to sign up for the tutorial at PyCon. Here are slides from the Functional portion.

Feel free to follow me on twitter, or leave comments. Cheers!

Advice to My Younger Self

Every time I see an intern or new junior programmer I fight off the urge to give the the advice I wish someone had given me. So rather than sound preachy, I’m going to pretend that I’m from the movie Frequency and give advice to my younger self. In that movie (released in 2000), one of the characters is fore-warned to invest in an oddly named company—Yahoo.

In a similar vein, I would tell my older brother not to just be a designated driver for a fellow student named Sergei, but actually take interest in his research and his novel idea, PageRank. Rather than work for Big Blue, go help Sergei crawl the web, and when I graduate two years later, convince me to do the same. Or have more faith in that Apple recruiting event you went to in 1998. Believe that the network effect of Windows can be shattered.

Those are silly fantasies because hindsight is 20/20. Being in the exact right place at the right time is different than being in the close to right place at the right time. It is hard to predict where lightning strikes. But it is possible to have multiple lightning rods up, rather than insulating yourself from them.

During the last few months of my schooling, life was very exciting. We were in a huge bubble and didn’t know it. People were dropping out of school to work for well paying jobs. I even interviewed at a company with the express intent of dropping out with a semester left to work.

During this time a buddy and I had just won the competition for best Senior Project. We had created a colloborative browsing engine, that let you surf the web and chat with your friends in real time about it. And during the day of the show, real VC’s actually showed interest our “product”. Companies with similar products interviewed us to join their teams, we even pitched VC’s (who claimed that our solution being based on MySQL and not Oracle would never work). By having something of value we were in demand.

In the end being disenchanted with VC’s we went off to work for companies while intending to moonlight on the project. I went off to work at an “Enterprise” Search company. My buddy was off to Apple. I believe Apple’s stock was around $10 at that time. At this point those silly fantasies bother me and I kick myself. They come in and state that some existing companies can be more exciting than startups. I didn’t buy it at the time.

Working at a search startup was cool. A lot of my co-workers were PhD types and I loved soaking in their knowledge. Along the way I would slowly learn two axioms of programmers. (Or I should have learned these and wish that someone just sat down and said them):

  • Programmers are lazy
  • Programmers want control

Of course programmers are lazy, they make computers do their work for them. They also have a tendency to do the least amount of work possible and once they become comfortable in their situation they are like a raft floating down a big river. Occasionally they need to row hard to change their position, but if the river is cooperating they only need little course correction. It can be a nice little rut to be in, especially if lightning struck you and you decided to take interest in Sergei’s project or think that Steve Jobs could actually turn around this floundering company. On the other hand, most startups fail, and a rut can be a tractor beam that leads to the Death Star of complacency or job loss.

Programmers, in addition to being lazy, are prideful, arrogant snobs, who love certain tools and programs for no apparent reasons and love to force others to accept these beliefs. Or they are just lazy and go with the flow. They want to control the search space, or re-create a company that had been reduced to nothing by a north eastern monopoly. Programmers want to reinvent the wheel themselves. Part of this is a desire to understand all aspects of a system. Part of it is arrogance. Harnessing Open Source enables you to lazily control the system.

During this time of the heyday of Slashdot, I was installing Gentoo and playing with Python outside of work. I would read about the ongoings of user groups and the cool things they would do with such technologies. Said user groups happened to be in my backyard, but rather than being an active participant, I would just read about their events after the fact. Perhaps this was due to my introverted nature, or perhaps because I’m a lazy programmer.

During this time the bubble collapsed. My company started going through round after round of layoffs. Perhaps because I was a good engineer (but probably more likely because I was cheap relative to all the PhD’s), at every round (I believe there were 7 or so), my job ceased to exist. But (due to my mad skills (or my relative cheapness)), a new opening within the company occured with every layoff. And I took them, going down with the sinking ship. I had officially entered the rut.

Had I put in the extra effort to get involved with the local user groups, I’m convinced that I would have not been in this rut for very long. I’ve seen many people expand their careers via user groups.

So barring wishful thinking about working at a once in a lifetime company, my advice to my past self would be to get involved earlier. If you put forth a little effort getting involved in your community (and networking at the same time) you will have the opportunity to have more control.

My advice? Get yourself out there. Blog, attend gatherings, tweet (when it is invented), contribute back. Sitting around in your rut only insulates you.

How to Set Up a Goaltimate Field

I continue to prefer Goaltimate for groups of 13 or less. It’s a great game, one gets lots of touches and newbies, seasoned folks can play together. I think it improves new ultimate players throws better than ultimate does. It’s great for warming up. We usually play until we have enough for ultimate. People continue to be skeptical before playing, and the majority comment something like this after playing:

That’s a lot more fun than I thought it would be

That’s cool. Where did you get the hoop?

I prefer this to ultimate

Ok, only a few say the last one, but they have said it. Then there’s the group of people who won’t give goaltimate a chance. They’ll either sit out and wait til there’s 10 people and then want to jump to full field 5 on 5 ultimate, or they’ll play grudgingly. There seems to be another small group of people who believe that goaltimate is too hard on their bodies (knees and ankles) who also won’t play unless they’ve got 5 other people begging them to. But I’m digressing.

A complaint I’ve heard is that it takes too long to set up goaltimate. I don’t think that’s valid. (With the aluminum hoops it’s even quicker). A field can be set up in about 2 minutes. Here’s how:

How to set up a Goaltimate field

Step 1: Find a good field

A benefit of goaltimate is that it can be played in smaller areas. I’ve played inside in basketball courts. Can’t do that with ultimate. Also, nice large grassy areas tend to get chewed up quickly. But smaller ones not so much. So you can usually play goaltimate on a better field (often it’s right next to the ultimate field).

Step 2: Step up the hoop stakes

Because the hoop is fixed in size, it’s important that it be set up the correct distance of 18 feet. Here’s an easy way to do it. If you got a pvc set (with 8 pieces) connect 4 of them. That will be 16 feet long, so stick a foot on each side and you’ve pretty much got 18 feet. If you’ve got the nicer aluminum poles, find the middle and mark it with a sharpie. Here’s an illustration that should make it pretty clear.

Setting up the pole is a two person job. (As is taking it down). Have a person on both ends of the pole and put both ends on the stakes at the same time. People seem to be wary of making the pole bend, but it will do it.

Step 3: Goal line cones

The goal line cones are set inline with the hoop, 3 feet away from each stake, making them 24 feet apart from each other.

Step 4: Back goal cone

From the hoop take 8 paces back (I’m assuming your paces are 3 feet), and drop a cone. Note that the depth of the goal is the same as the width of the front cones. It seems that some like shallow endzones (perhaps the intent is to make the goal actually be a semi circle, which it is not). The full endzone opens things up a little and allows for more endzone throw possibilities. Here’s an image:(The rest of the images are top down) (Note that the regulation field image (the circular one) doesn’t have the endzone scaled correctly)

Step 5: Finish the goal cones

From the back cone I work my way around with 3 more cones on each side.

Continue in the 2/1 pacing around.

One last time

Step 6: Make the “crease” (optional)

If your players tend to goaltend a lot and don’t like the 3 second rule (or just step out if front of the hoop and poach there), you can make the crease in front. The rules specify that you can’t hang out in the area 1 yard in front of the goal either.

Step 7: Set up clear/2 point line

From here on out I’m no longer “regulation”. I’ve never seen a circular field in the different games I’ve played at. Most are either rectangular or boundless. When we play indoors, we play rectangular (obviously), and we play without boundaries outside.

Regulation calls for a clear line of 30 yards that arcs out from the hoop. And then a 2 point line (that is parallel to the goal line) at 20 yards out. Again we normally just set up four cones about 20 yards back for a clear/2 point line. The distance of 20 yards can be tweaked depending on energy levels, number of players or field size.

Another (non-regulation) tweak that we add is a cone about 10 feet behind the endzone. This is the “no-clear” area. If the disc ends up behind it on a turnover, you don’t need to clear. Some people are confused in that they think they can clear it there as well. NO! If they pick it up behind the cone, then they are cleared, otherwise the only way to clear is the normal clear line.

Here’s another illustration with dashed lines indicating what the cones are meant to

Other tweaks

We normally play 3 on 3 or 4 on 4. If we’ve got more people, then we’ll sub on error. What that means is if you throw an uncatcheable throw, or you drop a catcheable throw, you sub out. This tends to give everyone a pretty fair playing time.

I’ve posted previously about how to make hoops. My original PVC set got a crack once as a player collided with the hoop (must have blended in with the white snow at the time). I’m a fan of the aluminum hoops (which I also have). They are better in every way; lighter, smaller, easier to store, easier to setup, easier to take down, and more durable. Why weren’t we using them yesterday you ask? Because my friend who has (permanently borrowed) my PVC set arrived first….

Real-life Generators and a Peeker Too

After a long day of manual labor last weekend, I spent a couple minutes relaxing by converting some PDF’s to mobi files so my mom could read them on her Kindle. Her Kindle supports PDF, but reading PDF’s on Kindles (especially of the non-DX eink variety) is a pain. You can zoom into sections, but it isn’t appropriate for long reading, and the default fonts are too small. One of her favorite features is to bump up the font size on mobi files, especially at night. So I obliged.

To that end I’ve created some code that helps in this process—ebookgenerators. Most readers don’t care about the process of converting pdf to mobi. How I cleaned up the text might be interesting though. I used a chain of Python generators!

A few have complained that my Iteration and Generator book doesn’t have enough real examples. Some form of this blog post will probably end up as a chapter there. So without further ado, here’s some code.

A concept I briefly mention in my book is a Peeker class. A peeker can look ahead during iteration. This is useful if deciding the output of an action requires more than one item. Here’s mine:

Peeker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class PeekDone(Exception):
    pass


class Peeker(object):
    def __init__(self, seq):
        self.seq = iter(seq)
        self.buffer = []

    def pop(self):
        if self.buffer:
            return self.buffer.pop(0)

    def peek(self, n=0):
        """ this can raise an exception if peeking off the end. be
        aware and handle PeekDone appropriately"""
        try:
            if n == len(self.buffer):
                self.buffer.append(self.seq.next())
        except StopIteration as e:
            raise PeekDone('Exhausted')
        return self.buffer[n]

    def __iter__(self):
         return self

    def next(self):
        if self.buffer:
            return self.buffer.pop(0)
        else:
            return self.seq.next()

I use the PeekDone exception as a sentinel value, rather that returning a special value. Here’s an example of a generator removing double blank lines from lines of text using Peeker:

remove_double_returns
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def remove_double_returns(lines):
    lines = Peeker(lines)
    for line in lines:
        try:
            next_line = lines.peek()
        except PeekDone as e:
            yield line
            return

        if blank(next_line):
            yield line
            lines.pop()

        else:
            yield line

That could be done by someone fluent in awk in probably two lines. But here’s one that I wouldn’t want to touch.

fix_space_in_paragraph
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def fix_space_in_paragraph(lines):
    """ If paragraphs span pages (often) then there could be extra
    returns in the paragraphs....
    """
    lines = Peeker(lines)
    for line in lines:
        try:
            line2 = lines.peek()
        except PeekDone as e:
            yield line
            return
        try:
            line3 = lines.peek(1)
        except PeekDone as e:
            yield line
            yield line2
            return
        if blank(line2) and (not ends_sentence(line)):
            # don't use line2 so pop it
            lines.pop()
        yield line

Here’s a simple generator without Peeker. I need to ensure that paragraphs have a empty line between them so docutils does the right thing:

insert_extra_paragraph_line
1
2
3
4
5
6
7
def insert_extra_paragraph_line(lines):
    for line in lines:
        if ends_paragraph(line):
            yield line
            yield '\n'
        else:
            yield line

In the end, using a chain of these generators, I was able to generate three mini-ebooks for my mother before she left for a week-long cruise.

My scripts for cleaning up the text looked something like this:

script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys

import ebookgen


def run():
    data = sys.stdin
    data = ebookgen.remove_leading_space(data)
    data = ebookgen.remove_dash_page(data)
    data = ebookgen.remove_carot_l(data)
    data = ebookgen.remove_two_spaces(data)
    data = ebookgen.remove_double_returns(data)
    data = ebookgen.insert_extra_paragraph_line(data)
    data = ebookgen.insert_rst_sections(data)

    for line in data:
        print line,

if __name__ == '__main__':
    run()

I Would Like Sphinx PDF Generation to Support the LaTeX Memoir Package

I would really like to use the same toolset for publishing POD (Print On Demand) books that I use for ebooks. Yet the pdf generation abilities of both docutils and Sphinx seem more focused on pdf “ebooks”—pdf’s that you would read from a computer—not pdf’s that are approriate to create physical books from. I think the solution is to add support for the LaTeX “memoir” package to Sphinx. I’ll eventually get around to it, but it is not on the top of my stack. To that end I’ll pay up to $200 (paypal or Amazon gift) to get that support.

For those not familiar with memoir, here’s a snippet of the README:

Memoir is a flexible class for typesetting poetry, fiction, non-fiction and mathematical works as books, reports, articles or manuscripts. Documents can use 9pt, 10pt, 11pt, 12pt, 14pt, or 17pt as the normal fontsize and, if you have scalable fonts, 20pt, 25pt, 30pt, 36pt, 48pt, or 60pt sizes, or even larger. Many methods are provided to let you create your particular design. The class incorporates over 30 of the more popular packages.

Here are the details. The first person who notifies me of two github repos that meet the following points will get $100:

  • A github repo containing a Sphinx project that renders out to pdf using the memoir package. The document must have an example of:
    • Half Title Page
    • Title Page
    • Copyright Page (on verso page)
    • Dedication
    • Table of Contents
    • Introduction
    • Chapters (should start on right page)
    • An index
    • blank pages at the end
    • Customizing page size
    • The chapers should have an example of:
      • Text spanning multiple pages (lorem ipsum is fine)
      • Normal text
      • Italicized text
      • bold text
      • monospace text
      • Sections
      • footnotes
      • a code block
      • an admonition
      • a long admonition that is longer than a page
      • an admonition with a code block inside of it
      • a figure
      • a table
  • A github repo containing a fork of Sphinx that has memoir support. When using this fork with the above project, a suitable pdf should fall out. Numbering of chapters is correct, page numbering is correct (odd on right side), index is correct, etc.

Ideally most of the book (Table of Contents through Index) would be pure rst (or sphinx rst++). I’m ok with raw directives on the front matter.

If you are familiar with LaTeX and Sphinx, this should be pretty straightforward. It would also be a great project for someone interesting in learning those technologies.

The person who can deliver the above will make me quite happy. But, as I said, I would pay up to $200. The remaining $100 will be appropriated to the developer (or someone else) who sees that this gets pushed upstream into Sphinx proper (ie when I see a bitbucket commit with the changes on the Sphinx project). So the person who files the bug, patch and follows through with any needed tweaks to get this into mainline will get that money. I reserve the right to split up this portion among people as well.

(I apologize in advance for the github requirement, I prefer that system, so the first deliverable needs to be there. Given that Sphinx prefers bitbucket, you need to play well with them for the second deliverable.)

Coding Is a Life Skill That Should Be Taught in Elementary School

As a seventh grader I had the choice between learning French and Spanish. I choose Spanish because it was practical (or at least my parents convinced me of that), while it seemed that all the cool kids took French. Excuse my French but I think my parents were right—taking French expecting to actually use it (or have a reason to use it) would be a waste of time. (Sorry to the 2% of my blog visitors to whom that hits home). In fact the same could be said of the two years I took Spanish. I remembered only the colors and my Spanish name, “Paco”.

But taking Spanish for two years twisted my brain enough that I actually took a year of German after (again useless if I were expecting to use it to purchase say a Mercedes). And it was easier this time. When I did become fluent in Spanish three years later, I was grateful that I had learned how to conjugate verbs previously. My uptake was quicker because I had practice. In two months I was dropped off in the middle of Colombia and held my ground ok. (Later my Spanish professor would inform me that speaking in Spanish is insulting in Gringolandia, and I don’t pull it out too much now. So it was useless.)

Likewise, the Pascal class I took in High School wasn’t super practical. I didn’t even have a machine at home to code Pascal on. I haven’t coded in Pascal since. Yet the logical manner it taught me to think has been a wonderful life skill. It has even helped me to debug plumbing issues. When a the faucet is clogged, I could just disconnect the pipes connecting the faucet to the wall and start snaking around in the wall. But (given that I have girls around with long hair) it makes sense to start right at the faucet itself and snaking that without even disconnecting any pipes. Less mess, and more time for other less grimey things.

(Alas learning more about plumbing has helped in other areas as well, such as knowing how to replace a toilet, or stop a leak. It’s probably a decent life skill to have if you are a homeowner or live in a place with running water.)

The section I took on Lisp in college was not super practical either. Even then no one programmed in Lisp. Why did I waste that time? Because I have experienced functional constructs, I now appreciate them and see their utility (and even the allure of Clojure). I appreciate list comprehensions, first class functions and the laziness of generators. (If you have read this far in the post you’ll notice that I also like parentheticals.)

I had the chance to teach ~80 year old man how to program. He wanted to learn just for the sake of understanding what the little creatures inside of his computer were doing. Waste of time?

I’ve taught 3rd graders how to create ebooks. That was really an excuse to teach them xml, html, css, typography, fibonacci sequences, image compression, debugging and actually learning how to use a computer for something other than clicking the blue “e” and typing in starfall.com. I neglected to inform them that they could have just as easily written their books in Word and exported to HTML. I don’t feel guilty about that. (Some even wrote thank you cards in both HTML and the rendered output!)

I have also been able to teach 3rd graders programming. They were able to create simple text games with conditionals, functions and looping constructs. Did they create the next 3D shooter? Did they even create a game that they’d like to play more than once? Mostly not. But they learned a little bit about how computers work. They also learned how to think logically, and how to be specific. (My wife compiler still complains that my English isn’t specific enough—too many “this” and “that”s at line 0. To which her compiler responds “I have no idea what you are talking about!”)

Today, the world still runs on Excel. A poor man’s database or programming environment. Just today a co-worker asked to help move some data from Excel to a program so more advanced calculations could be performed on the data. There was also an urgency to get rid of the manual labor of tweaking rows and columns. The end user wanted automation and power. (And to be lazy).

If you have any inclination of working with programmers you should take CS101. You need to have some semblance of understanding of what they need and what you need to help them. Do you feel like a doofus when a car repair person is telling you what you need done to your car? Do you want to get ripped off by the plumber telling you the twenty things he needs to fix?

How often am I burdened by my (loving) family and neighbors, who knowing that I “work with computers” think that that means I can clean the spyware off their XP installation! I imagine that I would not play that beast of burden if others had some understanding of how computers and the internet actually worked.

Surely a little understanding of what powers the digital aspects of our lives can’t be too harmful.

Indy Python Workshop and UTOS Conference

Today and tomorrow the Indianapolis Python Workshop is running. From the website, “The Indianapolis Python Workshop for women and their friends is a free, hands-on, beginners’ introduction to computer programming.” This event was inspired by a similar event in Boston.

I love this local effort to empower others by teaching Python. To show my support for the event, I’m running a promo on my Treading on Python. It will be discounted to $0 during the event as supplementary material.

For people local to the Rockies, the Utah Open Source Conference is coming up next month. In addition to many awesome talks, I’ll be giving 2 three hour workshops on Beginning and Intermediate Python. Though not free, the low cost of the event is a great deal considering the quality and quantity of the presentations.