Posts Tagged organization

Automate Everything for Peace of Mind

Anybody who has written a computer program appreciates the warm glow of having a machine do your work.  That pleasure often masks the burden of holding the program’s hand — kicking it off and checking that it ran correctly.

At least for me, the natural tendency is to stop short of complete automation.  Instead, if I’m being lazy, I’ll start the program manually and catch errors by noticing odd behavior.  Perhaps I’ll see a glaring failure message.  Or maybe I’ll just notice that the program ran too quickly.

I do this because I’ve seen trusty programs fail in myriad ways.  I’ve seen malformed or truncated inputs.  I’ve seen choppy or slow network connections.  I’ve seen disks fill up.  I’ve seen memory hogs.

When an error like that pops up when you’re sitting right there at the command prompt, it’s typically easy to diagnose and move on.  When run naively from a scheduler, you might not notice a problem until disaster strikes, sparking a late night emergency call, or worse.  Therefore, I have to fight my natural tendency to hand-hold my programs.

Through experience, I’ve learned to go the extra mile and properly automate my programs.  These are some of my best practices — I hope other people can point out ones that I’ve overlooked.

  1. Every program must use a proper logger.  The first thing I do when I write *any* program is to make sure it’s set up to log using that language’s preferred logging utility.  This allows you to properly investigate what happened every time the program runs.
  2. Save the logs from each run.  It’s possible that an error will go unnoticed for a while, and there’s nothing worse than saying “unfortunately the log file was deleted.”
  3. Validate the program’s inputs.  I’ve been burned before by people who will “always save their Excel spreadsheet in the same way,” “websites that never change,” and data providers that “guarantee their data are validated before given to you.”
  4. Sanity check the outputs.  If you always expect your program to generate some new data, then compare the new results to the old results, and verify that there are actually new results.
  5. Catch errors and retry.  Computers are deterministic, but real world resources are unpredictable. I’ve seen one-off errors too often.  Perhaps I call an external program that fails for an unknown reason.  Or a file copy fails, but when I retry, it works fine.
  6. Have an extremely robust email notification system.  When there’s an error, you should be notified.  One trick is that a failure in the email system should never cause the program to fail.  Perfect this library and reuse it.
  7. Try your program every time you change it.  This is easy to say, but it’s tempting to say “oh, but I’m just adding one line” and not run your unit tests.  If you change it, at the very least, give it a whirl.
  8. Run the program from multiple machines.  Computers fail at all the wrong times.  At the very least, design your program so that only one instance publishes a final result.  Then if that computer fails, you can run a quick command on the other machine to publish whatever that program creates.

Leave a Comment

Evernote rocks, but it could improve

For that past few weeks I’ve been using Evernote to keep a running journal both at work and at home.  As a former user of Microsoft OneNote, I’m delighted to see how well this relative newcomer holds up in the domain of note taking applications.  It impressed me so much that I decided to toss them $45 for a year of premium user status.  That said, Evernote has room to improve.

Note taking programs help me be more efficient at juggling multiple projects.  I work at a trading desk where I develop software, do research with coworkers, and execute trades in the market.  Organization doesn’t come to me naturally, so I use note taking software to store a running journal of thoughts, to-dos, issues, and solutions.  I like the ability to insert primary sources such as emails, webpages, screen captures, documents, or pictures into the journal.  Then I can use tags, timestamps or text search to retrieve it all later.

On the whole, Microsoft OneNote is a great piece of software.  My primary complaint is that it’s a Windows-only application.  It also isn’t free.  My desktop at work runs Windows XP, but my laptop is a MacBook Pro.  As a result, I only use OneNote when I’m at my desk.  Unfortunately, I find that my most critical note-inducing events happen when I’m on the go.  I tend to have my best thoughts when I’m on the move, and people frequently ask me to do things when we’re away from the desk.

On the other hand, Evernote is free and platform agnostic.  I have Evernote installed on my laptop, desktop, and iPhone.  I can also use it from the web.  Evernote keeps all of these clients sychronized.  I’ve never had a problem with conflicts, altough I’ve never tested modifying the same note from two different computers.  The search is speedy and the interface is clean.

I prefer Evernote’s continuous scrolling log as opposed to OneNote’s folders and pages.  In OneNote I wasted too much time fretting over whether I had properly categorized a note.  I also fiddled too much with the placement of notes on a OneNote page (they can be placed anywhere on the screen, whereas Evernote doesn’t have that capability).

One annoyance in Evernote is how it assigns the title for a new note in the Windows client.  The default title is the first setence of the note’s body, which is redudant.  I’d prefer something more clever, like the first few key words.  Either that, or I’d prefer a different entry flow.  The OS X client has an entry flow similar to composing an email.  When you create a new note you start entering the title and tags before entering the content area.

Also, the Evernote Windows client always has a new empty note sitting at the bottom of the journal, which I find a bit confusing.  It’s like always having a new, blank email message open in your mail client.  In general, the OS X client is superior to the Windows client.

Although Evernote supports synchronization at its core, it doesn’t have collaboration cababilities.  It allows you to publish notebooks to the web, but that doesn’t interest me.  I want to collaborate on a shared notebook with other Evernote users.  Essentially, I want synchronization between Evernote users.  I suppose I could give other people access to my Evernote account, but that’s clearly flawed.  Also, when collaborating with other users, synchronization would need to be nearly realtime instead of on demand or every 30 minutes or so.

Lastly, I’d like to see Evernote support tasks a little better.  You can insert checkboxes into your notes, but I’d like to be able to highlight a sentence and explicitly tag it as a todo task.  Then I’d like to be able to add metadata such as who it’s assigned to and when it’s due.

Overall, I have a great first impression of Evernote.  I’m curious to see how it scales up to many notes and to see how it changes over time.

Leave a Comment

Follow

Get every new post delivered to your Inbox.