Daniel Norton

an experiment in occasional usefulness

My System to Remember Things

I am quite forgetful. (My wife will gladly back me on that statement.)

My #2 rule of “Things Daniel Should Always Do” is:

If I really want to remember something, I should write it down.

This is especially true in the complex world of software development where on any given day I’m juggling between two or three different programming languages, SCM tools, databases, IDEs (because for some reason not everyone uses IntelliJ… weird, I know.) I’m reviewing SQL scripts, approving pull requests, debugging running systems. And I might need to run a whole assortment of unix commands to keep everything humming along.

Thankfully, we live in a world with an almost limitless supply of tools for the memory deficient like me. Here are the services that top my list.

Google Keep

Google Keep is a relatively new offering from Google, but it is quite handy for short lists and notes. I tend to keep a daily task list of my top priorities that I create during our daily stand up. It helps me stay on task.

Evernote

Evernote is the “Grand Pooba” of note taking apps. It can record almost anything. Because of the overwhelming options, it’s a good idea to define and stick to a strategy. There are millions of results for “how I use evernote” including this lifehacker.com article. If you want a full run down of all the cool stuff it can do, go there first. I’m just giving a brief summary of how I use it.

First if you use Google Chrome, install Evernote Web Clipper. You’ll thank me later. You can use it to grab screen shots or whole articles of any web page. I always screen grab order confirmation pages and keep them in a “receipts” notebook.

Second, take advantage of the Evernote Android app to scan business cards. I created a notebook called “contacts” that is just a collection of scanned business cards. The text parsing feature of Evernote makes this worthwhile, but I do suggest adding your own meta data to the card.

Third, although I don’t suggest actually storing passwords in Evernote, it’s very useful for keeping some account information especially because the OSX and Windows desktop clients let you encrypt/hide text. note: I don’t use a password manager although I really should.

Github

Github is my preferred online dumping ground. Besides keeping all of my personal development projects either on github or bitbucket, I have started adding useful development commands and notes in a repository called dev-notes. These notes are an incredibly valuable asset to me, and I visit the repo multiple times a day. Here’s a fun aside: I often jump to my dev notes by Googling “dnorton dev notes”. Try it out.

Google Drive

Google Drive makes another appearance on my list of useful memory tools. This is my Microsoft Office replacement, and I use it for detailed note taking, presentations, spreadsheets, etc. When I’m learning a new language or taking a Coursera course, I will have a Document open to take notes. I then go back, edit, and refine the document so that it’s easier to find useful information.

Dropbox

Dropbox is just a folder that lives everywhere. I keep all of my technical ebooks, photos, important documents in Dropbox so that I never have to worry about having them available. Simple and elegant.

There are other tools that creep around my periphery – Trello, Google Calendar, Gmail just to name a few. Plus, I consider Stack Overflow an extension of my brain.

So, those are my favorite tools. What are yours?

“Coursera”pathy

I am a huge fan of the MOOC (Massive Online Open Course) movement, particularly Coursera. Coursera’s mission statement says:

Coursera is an education company that partners with the top universities and organizations in the world to offer courses online for anyone to take, for free. Our technology enables our partners to teach millions of students rather than hundreds.

They host hundreds of free courses across many disciplines with an emphasis on technology and computer programming. It’s a treasure trove for working software people like me.

And like a kid with far too much Halloween candy, I gorged myself. Here are the courses that I have signed up for this year:

I have completed exactly NONE of these courses, and that’s the problem. Because they are free and very thorough, and the penalty for not completing the class so low, I haven’t made the effort needed to invest fully in any of the classes. I always let life and work priorities supercede time I should be spending catching up on discrete mathematics or working on programming assignments.

I do think that taking the classes even if I don’t finish is a positive thing. I am constantly learning skills and gaining knowledge that have a direct bearing on my career. But I’m not getting the full benefit that I would receive by fully participating and completing the class.

So, I’m going to take some steps to change that. Perhaps it means involving myself in an online study group. Or I could take some initiative and organize a local in-person study here in Charlotte. The first step will be finding people who want to participate.

So if you are interested in taking a Coursera course and feel the same disappointment with never completing a class, reach out to me. I’m going to start an informal group.

JBoss Forge REST Example

This is an ongoing blog post. I’m going to attempt to build a sample REST API after setting up the project using JBoss Forge.

The app will simply expose a REST API to post workout data. It will use Hibernate to talk to an in-memory database.

Entities:

User
Workout

Steps (so far)

These steps are modified from the JBoss Forge Samples.

Start the New Project

  • forge
  • new-project --named workout-api --topLevelPackage org.dnorton.workouts

Set up Arquillian tests

  • forge install-plugin arquillian
  • arquillian setup --containerType EMBEDDED --containerName JBOSS_AS_EMBEDDED_6.X

Determine the JPA persistence framework

  • persistence setup --provider HIBERNATE --container JBOSS_AS7

Next, we need to decide what we want in the entities. I’m not implementing authentication just yet, so lets create a dead simple User.

  • entity --named User
  • field string --name name

The Workout is slightly more complex. We need to record a title, distance, time, description, and type. Plus, we need to create a relationship with User (a Workout belongs to a single User.)

  • entity --named Workout
  • field string --named title
  • field long --named distance
  • field long --named duration
  • field string --named description

Since the manyToOne relationship is User –> * Workouts, we need to switch back to User and add the relationship. In order to edit an existing file, you need to “pick it up”

  • pick-up src/main/java/org/dnorton/workouts/model/User
  • field manyToOne --named workouts --fieldType com.coachcaleb.model.Workout.java --inverseFieldName user

Now, we’re ready to set up the REST endpoints

  • pick-up ../Workout.java
  • rest endpoint-from-entity --contentType application/json

(next up: deploy the app on OpenShift)

G-E-O-R-G-I-A

Here’s a taste of the atmosphere in Sanford Stadium before Georgia’s 41-30 win over South Carolina.

It also happens to be a good way to try out embedding Google+ pages

On Not Being a Very Good Blogger

I just want to mention that I have worked on several posts recently that I decided for one reason or another not to publish.

I have a post about my thoughts on Hurricane Sandy, but I decided it’s just a little too personal to publish

I have a post about why I blog, but I feel like it’s a topic that’s been played to death. I blog because I feel like it. I blog when I want and about what I want, and there really isn’t a strong rhyme or reason.

I have a blog post about the Ohio State half time band video, but that’s really more appropriate for Google+.

But I will publish this post to at least prove that I’m still alive. Hope everyone had a nice Thanksgiving.

Forming New Habits

habit: a settled or regular tendency or practice, esp. one that is hard to give up.

what are my habits?

Like lots of you, I have bad habits (almost too many to count.) These bad habit have bad consequences: lack of focus, reduced productivity, stress — even health and relationship problems. And these habits are really entrenched. I realized that what I need to do is replace my existing bad habits with new good ones. However, I wasn’t exactly sure how to get started.

Then I read this Lifehacker article and decided to begin developing some new habits.

I started by making a list of the habits that I want to develop.

  1. do something thoughtful for my wife
  2. be a better communicator/organizer
  3. get enough sleep
  4. read for at least 30 minutes a day
  5. write something at least once a day
  6. work on personal development

Then I attempted to identify a couple of keystone habits I could develop.

First for the last week, I take a few minutes in the morning to put review my calendar and put together a “Game Plan” – just a single Google Doc that has a list of things that I need to keep in mind today and what’s upcoming. The goal is to get away from my usual routine of not having a clue and just coasting through each day. If I start the day with a little organization and planning, I’m more focused and less stressed (seriously.)

Second, I ask myself if there is anything I can do for my wife. I draw a blank more often than not, but sometimes I’ll get an idea for a simple thing I can do: buy her a lemonade at lunch and deliver it to her office, call someone in her family just to say hi – because she really appreciates when I do that, or just do some chores without being asked. These are things that I tend to overlook, and over years, the little bits of my inattentiveness accumulates. My hope is that making a daily effort to actively think about my wife will reverse that trend.

Third, I take time to write something. This is usually at the end of the day, and it can be anything: a document for a side project or a new blog post. It can also be something as small as a new note about something that I’m learning.

I have my list of habits. I have my keystone habits that I’m focusing on. I think it’s a good start.

By the way, if you like the article, Charles Duhigg wrote a book The Power of Habit that I’ve also bought.

Ankle Mobility Exercises

Like a lot of runners, I have dealt with some nagging injuries. In particular, I battle plantar fasciitis and posterior tibial tendonitis. I have tried a number of options to deal with this pain including ART, physical therapy, yoga, and single-leg balancing exercises (my balance is now excellent.) They all help, but nothing has made a significant change.

Then I discovered this video on Coach Jay Johnson’s blog. I’ve started doing the routine on a regular basis, and it has made a major difference.

My 2012 Late Season Races

I’m not a fan of running during the summer, so I tend to have training cycles that fluctuate over the year. During late spring, I transition from mostly running to triathlon training because cycling in 95 degree weather is far more tolerable than running in it. Plus, I can do lots of cross-training and swimming indoors. I like to end my triathlon season with a fall triathlon.

I begin to run in earnest again in the early fall and usually plan a late fall race — it’s been the NYC Marathon for the last 3 years. But I live in Charlotte now, so my guaranteed NYC entry is over. Because I have been battling some ankle soreness and mild plantar fasciitis (PF), I decided to limit my mileage to a half marathon this year so I don’t re-aggravate it.

Then if all goes well and the injury fairy stays away, I’ll bump up my mileage over the winter — the best running season in North Carolina — and attempt a fast, flat spring marathon. So, here is my schedule:

  1. Rev3 Olympic Tri – Anderson, SC – October 14, 2012
  2. Thunder Road Half Marathon – Charlotte, NC – November 17, 2012
  3. Myrtle Beach Marathon – Myrtle Beach, SC – February 16, 2013

If you’re going to be at any of these races, let me know. I would love to meet up for a pre-race beer (or post-race… doesn’t matter.)

Play Nice, OS X

installing Octopress on OS X Lion, oy vey

My initial attempt to get ruby 1.9.3 on OS X Lion ended in frustration. I followed the Octopress install instructions and attempted to install rbenv. This lead to a series of errors that had me installing an old version of gcc, clang, etc. I’m not a sysadmin, so I eventually just gave it up as a lost cause.

So, I moved on to installing octopress on my Windows 7 laptop – done – and a virtualbox guest Ubuntu using rvm – done.

Then, I discovered JewelryBox and decided to give the OS X install another shot.

OS X Mountain Lion Install Log

You can just skip this part if sysadmin details make you go cross-eyed.

  • first attempt – install ruby-1.9.3-p125 failed because of readline
  • second attempt – after installing homebrew, I ran brew install readline. It barfed because I didn’t have Xcode 4.4.1.
    • Cleaned up harddrive because I didn’t have enough space to upgrade XCode
    • Opened the Mac Appstore and attempted to upgrade XCode
    • ran brew doctor and followed recommendations to remove macports/fink, old library files, and upgrade my compiler
    • after lots of wasted time, I was able to install readline. Now, to try installing ruby again…
  • third attempt – failed again trying to install readline
1
2
$ rvm pkg install readline
$ rvm reinstall 1.9.3-p125 --with-readline-dir=$rvm_path/usr

Lessons Learned

  • ruby is for hackers
  • Apple makes doing non-Apple things hard
  • stackoverflow is an amazing asset for a developer