Archive for the 'Misc' Category

I love plain text

I'm a programmer, so I've always loved plain text, and I've always been bad at doing most things that require me to work with richer formats. For example, if you ask me to create some sort of schematic or diagram, I always spend way too long working on it, and it never comes out looking very good.

That's why I am so excited with all the wonderful tools that are becoming more and more prevalent, that allow me to work in the medium in which I am so comfortable -- good old plain text -- and yet to output to very rich formats.

For example:

  • I am writing this blog post in Markdown using the Markdown plugin for WordPress. Awesome! i love it. I no longer have to fight with the WordPress rich text editor.

  • I recently needed to create some UML Sequence diagrams to demonstrate flow through the different components of a program I was writing. I'm on a Mac, so I can't use Visio. I spent a long time looking at a number of different options, like OmniGraffle, Gliffy, and so on. Finally, I found websequencediagrams.com, which is awesome. It lets me write a plain-text description of the interactions between the components -- for example:

    iPhone->Server: send request
    Server-->iPhone: xml
    

    ... and it will instantly create the UML sequence diagram for me:

    diagram

    Once you have this capability, the possibilities are endless. For example, websequencediagrams.com makes it easy to write your own scripts in Python, Ruby, Java, or whatever, and create the sequence diagrams. So the point is, I can create the text representation locally on my own computer and check it into source control, and then recreate the resulting diagram whenever I want.

  • yUML is similar, but for other kinds of UML diagrams such as class diagrams. Again, you just write it down in plain text, and it lays out and creates a pretty diagram. For example, with this input:

    [Customer]1-0..*[Address]
    

    ... you get this image:

  • In case it wasn't obvious, both of the above services make it easy to just put an <img> tag in your own web page and point to their server, and your diagram will show up.

  • And then there are things like PanDoc, which makes it possible to write an entire book in Markdown. Today I came across The Little MongoDB Book via Hacker News. So the guy writes the book in Markdown, and then runs PanDoc which creates a very nice-looking PDF out of the whole thing. And of course he stores the original Markdown in GitHub.

This is the way things are supposed to be. It feels so right.

Mailing labels: Google vs. Apple

For years, my wife and I have used Microsoft Excel + Microsoft Word to do mailing labels for Christmas cards. The workflow is weird and confusing, but at least we are familiar with it.

Since I'm a Google fan and an Apple fan, and feel that both companies are really good at making things easy, and since my wife and I are both on Macs now, I thought I'd see how good a job those companies do.

For Google, searched for info on how to do mailing labels in Google Docs. They claim to support labels, but their "solution" is hilariously bad: Start with a document template (people upload tons of them), and then manually change each label. Ha!

Apple's solution is hard to find (I found it by googling), but once you do find it, it's awesome. Export your list to a CSV file, then import the data into the Address Book app, and then say File > Print. One of the printing choices is Labels; and you can specify which Avery label type you want, and you're done!

And they did a beautiful job of handling a few issues I was worried about:

  • I don't normally use Address Book, so it was okay with me if it clobbered existing data that I had in there, but I was wondering if this would work for people who do actively use Address Book. It works fine. First I created a new "Group" called "Christmas Labels 2010". Then I imported into that group. If there are any imported entries that appear to be duplicates of existing entries, it asks me what I want to do (merge, keep both, etc.). I just told it to keep both. Then, after printing my labels, I deleted all the entries I had imported, and then deleted the group.
  • My Excel spreadsheet is formatted in a way that isn't really compatible with the Address Book fields. Address Book has separate fields for first name, last name, address, city, state, zip. My spreadsheet just had three columns: "Last Name" (which was actually the full name), "Street", and "City, State, Zip". When I imported, Address Book did a good job of guessing which field each one should go into, but of course it might import one entry with the last name "The Smith Family" and no first name, and the city "San Francisco, CA 94134", and no state or zip code. Okay, that's incorrect. But it wasn't a problem. When I said to print, the labels looked just fine. (And no, there was not an extra space before "The Smith Family" on the labels, even though it is trying to print "<firstname> <lastname>".)
  • Although by default it didn't guess the correct encoding of the CSV file, I was able to manually specify UTF-8, for the handful of entries that had special characters.
  • A few entries had text that was too long to fit in the default font. Address Book handles that gracefully -- it just printed those ones in a smaller font.

So it's a knockout punch, Apple wins.

Fun with the iPhone spell checker

Going skiing next month. So I started typing some info into the calendar in my iPhone.

I typed Donner, as in Donner Pass.  The iPhone "corrected" that to Dinner.

Um, yeah, that's appropriate.

(I'm also sick of the iPhone changing its to it's.  Its spell checker doesn't know what it's doing!)

Any other funny ones?

Next Page »