# Reading and Writing just got easier with Markdown

I need to quickly take notes and share them as part of my job. It may be keeping a log during meetings, recording field notes during an observation session, or just doing preliminary notes for a web page I’m posting. However, a lot of the existing tools on computers have limitations.

• Plain text is easy to write and generally easy to read, but there’s a lack of formatting. You can’t identify headings, create tables, insert images, or easily create hyperlinks. You can keep that information using some kind of markup language…. like HTML.
• HTML is standard. It’s all over the place, you can format your pages nicely, and it does a reasonably good job at separating information from presentation, especially if you stick with the vanilla tags. Everyone can view HTML on their browser as well, so it’s very potable. Unfortunately, HTML is also really verbose and difficult to write. You can’t easily add linebreaks or headings. Miss a close tag and you’re toast. You have to type a LOT. You can ease this by using a WYSIWYG editor, but then your HTML markup becomes very ugly, and you’re committed to using that editor.
• LaTeX is also very flexible but is mostly limited to PDF output (yes, you can output to HTML, but that requires a non-trivial amount of commitment to installation and setup).
• Microsoft Word is easy to use, but is not portable to systems without Word. It exports to HTML but also has reasonably ugly HTML output. It also takes a really long time to launch and is difficult to check into a version control system.

So what is the solution? Well, I’ve discovered Markdown a few months ago, which is a lightweight markup language that is readable as plain text, but allows easy conversion to outputs like HTML. So what this means is that you can write your documents in a plain text editor, read them in a plain text editor, but also convert them easily into a web-viewable format. I’m beginning to take notes and make initial drafts of documents in Markdown because you can easily go from Markdown to almost anything else by either copy-and-pasting it, or by converting it to your target output format.

On Mac OS X, I use a command-line tool called MultiMarkdown by Fletcher Penny which is easily installable if you have Homebrew (http://mxcl.github.com/homebrew/). Then, you can either convert your documents using the command line, or use one of many text editors set up to compile your plain text into something else, like HTML.

I personally use the TextMate bundle that’s supplied by the author of MultiMarkdown. I can easily output my text file as HTML with a keyboard command, and then I can move that onto a website or similar if needed. Just today, I set up TextMate to write a timestamp when I press “ll<tab>” (that’s two lowercase letter Ls followed by a tab) so that I can easily take notes during a user study. Now, I don’t have to watch the time and try to write it in. And, since it’s in Markdown, the time shows up as bold text underneath some nice headers. If I want, I can copy and paste my original notes into Excel, post them online, or just look at them in the plain text editor without seeing all of the ugly HTML associated with it.

I’m not sure what the Windows equivalent is, but there are a lot of Markdown text editors out there and even Javascript client-side applications that allow you to write Markdown and show you a real-time preview of the Markdown in HTML! That is pretty nifty.

There are a lot of Markdown tutorials on the web, but here’s a brief command reference just to emphasize its simplicity.

# This is a Level 1 heading.

## This is a Level 2 heading.

### This is a Level 3 heading.

===============================

Creating lists

* List item
* List item
* Nested List Item
1. Numbered item
2. Numbered item

Here is some [text of the link](http://example.com "Example")

You could also use reference-style [labels][1].

[1]: http://example.com "Example"

Images

![alt text](/path/to/image.jpg "Title")

Code spans

This is a Unix command: find . -type d -exec chmod 755 {} \;

You can also include larger code blocks by indenting code with 4 spaces or 1 tab.

Bold/Italics

**Bold text** __Also bold text__ *Italic text* _Also Italic text_

MultiMarkdown also has syntax for tables and equations that I haven’t yet had a need for (and therefore haven’t learned), but I suspect that could come in handy as well.

In any case, I am feeling already that Markdown is going to make my life easier because it’s lightweight, you can write and read it anywhere, and it is easily transformed to useful output formats. I like to keep my thinking about formatting separate from content, and this enables me to do so in a lightweight way. While LaTeX is nice for print documents and Word is good for collaborating with others, having a simple system for quick notes is really convenient as well.

# Academics: Do You Program a Lot?

I know many Ph.D candidates and professors who can program and do program on a regular basis, but I didn’t really consider how often most of these students spend their time programming.

During an academic job interview, I was asked if I programmed a lot. Yes, I program. Do I do it a lot? Well, not exactly. None of the projects I currently work on rely on my programming skills, but I use programmatic thinking frequently. Like most computer science students, I write short scripts for frequently-used tasks. I build my CS361 web site using a shell script, Mustache and JQuery. I write 50-line Python programs to generate level templates for a research project I’m working on. I fix Javascript bugs here and there. I write R scripts to make my data analysis repeatable. But I don’t program like a programmer working in industry would program. I’m very much an end-user programmer, now. Not a novice programmer – an end user.

These end user programmers are the very people we usually assume have no formal computer science background but need to engage in programmatic thinking. Still – with all of this exploration and discovery, I would be hard-pressed to say that I program 50% of the time at work, even.

Most of my time these days is spent writing and designing materials, as well as assisting other students with analysis of their data; I also spend time preparing materials for the Software Engineering I class that I teach this term. Where in that do I find time to program? Generally, I don’t, so most of my programming is relegated to my free time. Perhaps I am not efficient with my free time. I often try to spend time learning frameworks and toolkits that I know about but haven’t worked with extensively or I try to find tools that may help me immediately or in the future. Lately, I’ve also found that I’ve been programming for the pure fun of it – doing projects in Processing or trying to learn live coding in Clojure.

Thus I come out of this post with two questions. How many of you out there have a programming background, but program now as an “end user”, that is, the software products that you build are not the deliverable, but instead they help you get other deliverables out the door? Second, how many people in academia program “a lot”, perhaps, let’s say, program for more than 40% of their work time and 40% of their free time?

# Where’d that go? Losing Items on Amtrak Cascades Trains

I’ve had terrible luck lately and have managed to lose items both coming to and going from Bellevue for CSCW (ACM Conference on Computer supported cooperative work). On the way there, I lost the poster tube with the poster that I was presenting. On the way back, I lost a book. Fortunately I managed to find the poster in time but thus far I haven’t been able to locate the book.

One thing that Amtrak does not do is post the phone numbers for its stations on the web. Normally, I don’t tend to do personal posts like this one but I figured that Amtrak Station information for the Pacific Northwest might come in useful to someone some day and therefore have compiled a partial list of phone numbers for the major stations below.

# Amtrak Cascades Train Stations in the Pacific NorthWest

Seattle King Street Station Baggage Claim: 206-382-4128
Seattle King Street Station Lost and Found (M-F only): 206-382-4713
Portland Union Station: 503-273-4871
Eugene-Springfield Station: 541-687-0972

Though the Lost-and-Found in Seattle was closed, I did reach the baggage claim about an hour and a half after I disembarked, gave them the train number and time, car number, and seat number, and they were able to retrieve the poster and hold it in the back for me to get it later that evening.

Also, the trains do tend to turn over quickly, and the route numbers change a lot, so try to call soon. In my experience calling though, they’ve been really nice in trying to actually locate your items – while writing this post I even got a call back from the Seattle station asking for details.

Now that said, since these numbers have been posted, you probably shouldn’t try to book tickets or ask general questions of the station. That’s best handled online or through their ticket agent anyway, which is reachable at Amtrak’s web site or through 1-800-872-7245.

# Managing Citations in Word Using Zotero

I am a LaTeX user. However, the unfortunate reality is that Microsoft Word is in very common use and if you’re collaborating with other people, one of your collaborators is going to insist on using Word. The EUSES group at Oregon State University has traditionally used Word on most of their projects.

BibDesk

One thing that I like about LaTeX is that its citation management is quite good – it’s easy to add references, move them around, and have the Bibliography build properly. Right now, I use BibDesk for much of my reference management. It’s extremely lightweight, stores data in BibTeX format, and is quite portable across systems.

## The Need to Keep Files

One of the limitations of BibDesk is that it doesn’t handle files very well. You have to often add them manually to each entry, and it doesn’t keep them organized nicely on the file system. One may wonder – why keep files at all? Can’t you just grab them from the ACM Digital Library when you need them?

Well, yes, but I like files. If I have them, I can work offline. I can use Spotlight (rather than Google) to look for files on my hard drive. I also need files so I can transfer them to my iPad and iPhone. There are also a number of references that simply aren’t on the digital library and have taken a bit of effort to acquire, so I’d rather not lose them.

This led me on a quest to find a slightly better reference management system.

## Endnote? Mendeley? Papers?

There’s actually no lack of citation managers out there. Endnote is a relatively long-standing program that is known for providing citation management to Word. Papers is an award-winning paper management program for Mac OS X. Mendeley is a free cross-platform solution that can scan PDF files and automatically fill in a citation with data online.

### Collaboration with Mendeley

Mendeley Desktop. Notice how OMGHUGE it is.

My choice for about the past year was Mendeley. It is a closed-source program that has an online web presence and a sync server, meaning that once you put your papers into the software, it can display them for you on the web, or sync them onto a new computer. You can also share groups of citations with others – great when you’re surveying literature.

However, the program is big, slow, and uses tons of screen space. I’ve also been experiencing issues with it recently of it not quite finding the right information based on a search of the title. When it was given the paper’s title, it was often filling in the journal with “Society” or something ridiculous like that. It was also not recognizing conference papers as such, often leaving them as the default “Article”.

I began to search for something more robust.

## Enter Zotero

I had actually heard of Zotero about the same time I acquired Mendeley (thanks Neil!), but I hadn’t ever bothered to figure it out. Then, I heard that there was a plugin to Microsoft Word that helped you manage references.

What?

Zotero, Firefox Extension

Zotero is a free Firefox add-on. It lives and dies with the web browser, and by default is a little panel at the bottom of your browser window. It, like Mendeley and BibDesk, has the three-panel layout that is “Citation groups”, “Citation list” and “Citation details”.

However, I never really figured out Zotero until I learned about this button that doesn’t exist in the “proper” Zotero panel:

The Zotero Add to Library Button

The “Automatically Capture Bibliographic Information From The Web” button (it doesn’t have a name in the Zotero documentation) appears on pages like ACM Digital Library, IEEE Xplore, and Amazon, where information about references is displayed. When you click this button, it creates an entry for you and populates it with the correct information. Suddenly, I realised that this is a tool that I’ve wanted for a while, because where do I get most of my scientific articles from? I get them from the Web. So, rather than having to copy and paste the BibTex entry into BibDesk (annoying but doable) or downloading the PDF and dragging and dropping it into Mendeley (and then having Mendeley get the information with a 70% chance of it succeeding), I can just skip the process and import it all directly.

## Microsoft Word Integration

Zotero in Microsoft Word. There is a toolbar as well as a "Script" menu item in Mac OS X.

When you restart Word, you’ll get a little toolbar as well as a script menu. The script menu contains items that are relatively self-explanatory. You can add citations, add the bibliography, edit the citations and bibliography, refresh the document if you change the database from Zotero, and set your preferences (i.e. your citation format).

One reason why I like this tool is that it’s very lightweight. You can send this version of the document to someone without Zotero, and as long as they don’t try editing all of the fields, they will see the references just fine. This enables you to collaborate with them without having to worry about getting the references out of format (which was something that happened a lot in EndNote X2).

However, Zotero also has cloud-based sync and group-sharing features like Mendeley does, so you can use those features as well to keep your computers in order, and to share citations with your collaborators.

Right now I’m pretty sold on this tool. It is cross-platform (though unfortunately tied to Firefox, but I hear there are Chrome and Safari alphas), syncs documents, imports data automatically, keeps files organized (it saves them in your Mozilla Profile unless you tell it otherwise), and integrates with Word. And, it costs no money. It even imports and exports BibTeX, meaning that I don’t have to give up or even migrate from BibDesk.

If you’re struggling with reference management then I think Zotero is something you might want to try. Happy citing!

Not too long ago, I was able to memorize passwords. Like many people, I used a common set of passwords and had “tiers”.

There came a point when I suddenly stopped being able to memorize passwords. While I wish I could blame aggressive password policies, the reality is that there simply started to be too many to remember. It coincided about the same time that I signed onto Twitter, because around then I also signed up for services like Dropbox, WordPress, and continued to post on forums at ArsTechnica. It started to become a mess – I was resetting my Facebook password every time I visited the site (which is probably about twice a week) and every time I wanted to post a comment on Ars Technica. It was rather ridiculous.

In addition to managing passwords, I had to know them – I had an iPad (and now an iPhone) and if I need to check some online cloud-based service using one of them, I have to be able to access my passwords. I think the final straw was when I forgot my Mastercard Secure Code, had to reset it twice (I forgot the password as soon as I hung up the phone with the bank) and consequently ended up accidentally ordering four rice cookers from NewEgg. Fortunately they were willing to RMA them without a restocking fee, but it was a large hassle to even have to deal with that.

I eventually caved and bought into the Password Manager tools. I had heard about these here and there for a few years but had never really tried them. I caved and tried 1Password (they’re a Canadian company, actually).

I must say that the simplification that using a Password Manager affords is immense and is extremely reassuring. I now get to keep one main password in my head and I can make it as complicated as I want. In the meantime, the other ones are kept secured (and encrypted). I sync the accounts across Dropbox, and I can use both my iPad and iPhone to access them.

For those of you who don’t want to spend the money of 1Password (it’s about $50 but there are occasional promotions – I got an educational discount as well as an iSlayer coupon code; the iOS version is$20) I’ve heard of free, open-source alternatives like KeePass. Though I haven’t used it myself, it works across multiple platforms including Windows, Linux, Mac OS X, iOS, and Android. It’s not really the specific software that counts, but the mere idea of using software to manage your hundreds of logins that reduces your cognitive load significantly.

## Less Security? Maybe More?

One concern that you might have is that keeping one password instead of many is less secure than memorizing a few. This might be the case until you forget them. The problem with having to frequently recover passwords is then you’re simply using your email client as a very inefficient password manager – you’re asking the site to send you a password and then you’re using the email account’s password to keep track of things for you.

Just skip the middle man!

The alternative situation is that if you don’t know your online banking or credit card passwords, you have to call them and verify your information. This is inconvenient and time consuming, and can actually be a security risk for yourself because if you happen to be on the phone in a public place, someone might listen in on your call and catch a little too much information about you.

## Manage Data, Not Just Passwords

In addition to managing passwords, 1Password also keeps data secure and encrypted too, which is a nice little benefit. I have started to put receipts and other data there, not because they’re so valuable that they need encryption, but because it’s a convenient place to look when you think, “Ah hah, I need to recover this important document.”

## Browser Integration

One of the benefits of using a Password Manager is that it integrates with the major browsers through the use of Add-ons. Firefox, Chrome, Safari, and Internet Explorer have compatible extensions for 1Password. The system recognizes if you’re logging in or registering for web sites and automatically adds an entry for that web site.

Do you need to create a new password? The system has a password generation tool that you can use to create a password without the effort of having to come up with something.

While there are some limitations with the page login (it doesn’t automatically work on many financial web site logins because they are multi-stage), you can still check the passwords manually if you can’t remember them. Overall, the convenience outweighs the few situations where it does not work exactly as intended.

## Synchronization

The 1Password tool also synchronizes using DropBox. Quite simply, it means that I can keep the same database across multiple computers and even on my mobile phone

Overall, I recommend the shift to Password Management Software. The simplicity that switching has afforded me has reduced my overall stress level immensely.

# Using Technology To Simplify Your Life In Spite of Technology

Hi everyone!

For those of you who haven’t heard, I’ve graduated from the University of Victoria with a Ph.D and have moved on to Oregon State University doing a postdoctoral research position. I am currently working with Margaret Burnett. Her group is mostly a Human-Computer Interaction group with flavours of Software Engineering. She is especially focused on end-user programming, in which ordinary end users have to solve programming problems, like when they use Excel; as well as human interactions with machine learning systems.

There are many interesting things going on at OSU. I think it’s partly because it’s a new place, but also because as a postdoc, I have a number of additional commitments I didn’t have as a student. I’ve participated in grant proposal writing, paper writing, and similar duties, and as the postdoc in the group, I am involved across a larger number of projects than as a Ph.D student. This means that I have more things to keep track of, more meetings to go to, and more people to interact with.

While in the United States, I took the plunge and bought an iPhone 4S. This adds another level of complexity: a smartphone requires data for it to be useful, and now I have yet another device in which I have to manage data on. The iPhone is useful as a way to check my calendars, my To-Do lists, and to read papers on, but it requires a new level of organization to ensure that it can serve these purposes.

As a result of this rather increased level of complication in my life I am going to write about Using Technology To Simplify Your Life In Spite of Technology. Why the funny title? Well, technology has the ability to help you, especially through automation, but at the same time it requires time. You need to commit to keeping the devices updated and working, and you need to ensure that they’re going to be serving you.

I’m hoping that these upcoming articles will help some people gain ideas about how they can synchronize, share, and acquire knowledge, and maybe stay organized in the process. I’m sure that many of you readers are familiar with many of the tools and techniques I’ll discuss (since, after all, you might have told me about some of this stuff in the first place) but I hope that hearing about how these services are integrated together might help others out there.

# Some LaTeX Code to Help Track Your Work

Here are a few LaTeX snippets that I am using in my thesis to help me keep track of things.

I use this to highlight where in my document I’ve managed to edit up to.

% A reading marker, to help proofreading
\rule{\textwidth}{0.5pt}\\%
}

## A “To Do” Marker

This one makes a note in the paragraph margins and marks it with a “TODO”. Some of the code is reused from here.

% Make the fonts small
\setlength{\marginparwidth}{1.3in}
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\footnotesize #1]%
{\raggedright\footnotesize #1}}

% Put the margins on the left side
\reversemarginpar

% My TODO macro
\newcommand{\TODO}[1]{%
\marginpar{\textbf{TODO:} \emph{#1}}%
}%