Sunday, September 29, 2013

Tools I use today

I found an old blog post that I forgot to publish.  I'll post it now, because it's better late than never.

It's July, 2013.

When I have kids, and they grow up, I bet they will have all kinds of gadgets that would seem like science fiction to me.  Hopefully, I will also be playing with new gadgets as well.  In any case, I wanted to give a state of affairs of my belongings today.

In the future, I can compare what I have and use today with what my kids find commonplace for them.  I may nostalgically reminisce about the archaic tools of my past.  Or, I may find that the tools of yesteryear were really good enough.

Computing devices:
Phone - Samsung Galaxy Nexus 16GB
This phone runs the Android operating system.  I bought it about 1 year ago.  The thing that I am most likely to do on this phone is to read.  If I just read news articles, the battery will run out by the end of the day.  So, I often charge my phone wherever I go.

Computer - Apple MacBook Air 13.3-Inch Laptop
I bought this a few months ago. It is my first apple/Mac computer.  Previously I used a dual booted Windows/Linux laptop for well over 5 years.  This thing is comfortably light, and the battery life seems to be more than sufficient for my day to day use.

Tablet - ASUS Nexus 7 (7-Inch, 32GB) Tablet
My wife gave me this for Christmas last year.  I haven't really found much usage for it.
If there is ever a choice, I tend to go with either my phone or computer.
In my world of somewhat redundant technology, this tablet gets the least of my attention.

Travelling - Bike - Dahon Speed Uno Folding Bike
I am lucky enough to commute to work by walking.  On the rare occasion that I want to move faster, I may travel by subway or ride my bike, a Dahon Speed Uno.  This is a fold-able, single speed bike.  I got it almost 2 years ago.  My wife bought it for me for my birthday.

Monday, September 16, 2013

Always improving

As a programmer, most of my day is spent programming.  While programming is fun, it can be tiring.   Unsurprisingly, some days I don't have the energy to code.

In those times, it's good to have something else to do that is productive.  Here are a few things that I've been doing to stay busy.

Coursera

When I am tired of coding, it's nice to just sit and watch something.  I am taking a databases class.  It doesn't have a strict timeline, so I can watch a course or two whenever I get a chance.  I am familiar with databases, but I have never taken a structured course on them.  Therefore, I learn something in each lecture, but it isn't too mentally taxing.

Practice typing

I read a rant about the importance of typing fast.  From that reading, I realized that I am not good at typing numbers.  I didn't even know which fingers I was supposed to use when typing numbers.  So whenever I want something truly mindless to do, I go to a site that helps you practice typing.

VIM plugins

I heard of vim plugins before, but I didn't really ever use them much.  I imagine that once I begin using them, I will realize how useful they are.  I started by installing pathogen.  I then installed NERDTree, syntastic, easymotion, and sensible. Some of these (pathogen, syntastic and sensible) are really simple to use and work right out of the box.  NERDTree and easymotion are also easy to use, but the more you practice using them the better you will be at using them.  Playing with vim plugins is fun and hopefully makes you more productive - whenever you do decide to start coding again.

Tuesday, September 3, 2013

First time using coursera

A few days ago, I registered for my first class using coursera.  Coursera provides free online courses from top-notch educators.  The first class I am taking is https://class.coursera.org/db/class, by Jennifer Widom from Stanford University.

I use databases pretty often, so I expect to be familiar with a lot of the material.  Nevertheless, I hope the course will help me fill in gaps of knowledge that I might have missed and organize my understanding of databases in general.

So far, I have only watched the first lecture, which was just introductory material on databases.  Here are my some things that I liked.
  • The quality of the video and audio is good.  It is clear and clean.
  • The video has subtitles, which I turn on even when I have audio on.  
  • The video also lets you change the playback speed. I set it to 1.25x speed.  When I come to a lecture where the material is more unfamiliar or a bit difficult to understand, I can reduce it back to normal speed. 
  • Each lecture is relatively short. The longest one goes for 30 minutes, but many are around 15 minutes.
  • The ability to pause and rewind is great and much better than live lectures.  If I missed something I can rewind and try again.  Or, I can go on the internet and search for a different explanation.  I can then move on with the lecture when I feel ready. 
Overall, I think coursera is a pretty great service, and I hope that I persevere long enough to benefit from it.  

Monday, September 2, 2013

Mac Apps

Here are some general purpose apps that I use on my Mac.

Spectaclehttp://spectacleapp.com/
This is an essential app for me. It lets you use the keyboard to rearrange windows. Apple should build something into the OS to handle this. Until then, this works pretty darn well.

CheatSheethttp://www.cheatsheetapp.com/CheatSheet/
This app that makes learning Mac keyboard shortcuts much easier.  When you want to look up a keyboard shortcut for the app you have open, hold down the "Command" button.  After a few seconds, a popup appears with a menu of keyboard shortcuts available for a given application.

It is basically a keyboard shortcut to the keyboard shortcuts menu for a given application.

This is a great idea for any operating system.  Give the user one way to quickly see available keyboard shortcuts for any application. Over time, I have been using this app less and less, probably because you don't need the app once you've learned them.

git cheat sheet

Here's my personal cheat sheet for using git.  Use at your own risk.

Change the name of a local branch.

  • git checkout "name_of_old_branch"
  • git branch -m "new_branch_name"

Merge Branches

  • git checkout -b "new_branch_to_work_on"
  • make changes ...
  • git commit -a
  • git checkout "master"
  • git merge "new_branch_to_work_on"
  • change from "new_branch_to_work_on" should be merged into master

What is the status (what files have changed)

  • git status

Setting up which program to use for diff'ing files:

  • git config --global diff.tool vimdiff
    • This makes vimdiff your difftool.
  • git config --global difftool.prompt false
    • This stops git from asking you if this difftool should be used

What changes have I made to a file (since last commit)?

  • git diff filename
  • git difftool filename

How has my file changed?

  • git log <filename>
    • This gets revision #'s and log notes.
  • git diff <revision#> <filename>
    • This compares latest revision with the specified version.
  • git diff <oldrevision#> <newrevision#> <filename

How to make a new repository?

  • git init
  • git add .
    • This will add all files to a repository.
  • git commit -a 
    • Commit file additions to repository.

Sunday, September 1, 2013

Vim - never leave home without it

I have been using Eclipse on and off for about a year.  I've gotten slightly more comfortable with it over time, but it still feels a bit clunky for me.

To make things easier, I decided to add a vim plugin to Eclipse.  I first tried something called vimplugin, but I settled on using vrapper.  The setup instructions are here.

I predict it will make coding in Eclipse a much better experience.