This old URL hasn't been updated for a while, but I'm still putting out new stuff! Check out the shiny new domain at

Wednesday, February 11, 2009

Adventures in coding (Part I)

In June of '08, I decided to get myself a MacBook.  As a CS student going into my second year, and most of my assignments requiring UNIX compatibility (well, NetBSD to be totally accurate), I wanted a system that would last a while, have some pretty hot hardware, be somewhat reasonably priced, and have strong support for *NIX OS's.  Granted, the MacBook isn't the cheapest laptop in the market, but for what you get, its a decent value.

One great feature is how there's an awesome terminal built right in.  It runs bash by default, and has a lot of the GNU tools (and I'm a HUGE GNU screen fan) installed either by default or with the dev tools.  Most important is its support for a SSH connection and X forwarding running on top of that.  Previous semesters saw projects that ran entirely in console mode, or were (mostly) cross-platform Java apps, while now I'm writing GLUT apps that need a screen to display on, so I'm moving outside of simple terminal use.

My preference, so far, has been vim in an SSH login.  It's easy enough to learn, and I haven't really had the time or desire to learn emacs to date.  My only issue is having to jump into pico for a Makefile, since I have vim set up to use 2 spaces instead of a tab.  Aside from some of the usual *NIX grumbles (specifically, constant use of the command line), this is a great experience.  Running inside screen, a utility I discovered only a few months ago, has seen my productivity double or triple, and allows me to do work from anywhere for either a few minutes or a few hours.  The only issue is that a wireless connection is a bit much for a SSH session, with the lag ruining the otherwise native speed of access.

As a bonus, here are my .vimrc and .screenrc files:


set background=dark
syntax on
set softtabstop=2
set shiftwidth=2
set tabstop=4
set expandtab
set nowrap
set ruler
set number
set numberwidth=4
set cursorline

hardstatus alwayslastline
hardstatus alwayslastline "%{+b kw}[ %H ] %{yK} (%n). %t  %-=%{kk} %{gk}%c.%s  %{yk}%d.%m.%Y"
startup_message off
screen -t screen1 1
screen -t screen2 2
screen -t screen3 3
screen -t screen4 4

No comments: