Friday, August 3, 2012

Coding like a Nerd

So I realize that it has been a LONG time since I posted something.  Suffice it to say that the glamorous grad school life has been busy and once I fell off the bandwagon, it got hard to get started again and easier to just not write.  I'm still debating if I should do this regularly, as I am getting close to defending my PhD and getting a job in the real world (i.e. real employers).

Running has been going as well as one might expect, given the intense heat of a TX summer.  I think I might finally be catching on to the TX lifestyle after 4 years because I have actually been pretty consistent the last month.  Here is the week so far:

Monday: swim 2km
Tuesday: 8.69 mile run
Wednesday: 8.19 mile run, including 3 miles of track work
Thursday: 8.15 mile run
Friday: swim 2km after work (planned)

I'm planning on running Sat and Sun too, for roughly 45 miles for the week.

I think I'll write more about running in upcoming posts, but for right now, I want to address my recent adventures in the land of programming.

Most of my time at work is devoted to maintaining the health and happiness of many cell lines, setting up and running experiments, analyzing very simple data about those experiments, reading research papers and responding to mass quantities of email.  In the world of science PhDs, I am known as an "Experimentalist".  This means the data I produce comes from experimental measurements.  Contrast that with the "Computationalist" who uses sophisticated computer software or their own code to model in silico (that means in the computer) how something works in real life.

I recently took on a side project at work that involves a lot of computational work.  I decided to work on this because I felt it would compliment and expand my skill set, which is heavily experiment based.  Also, Bioinformatics is a hot area in Biotechnology and I want to be competitive for the job market.  At first, it was a little daunting because I haven't programmed in a long time (about 4 years).

Guess what?  I am totally enjoying this!  I actually forgot how much I love writing code, it is like a puzzle and so logical and these are things that I love.  Of course, this shouldn't surprise me because I did got to MIT and I am a nerd (I totally embrace this).  As a freshman at MIT, I had to learn my first programming platform, which was MATLAB.  MATLAB is really popular for engineers and I had to use it all throughout my chemical engineering core courses.  I remember being totally lost at first, but by the end of that first class, I really enjoyed it.

A few years later, I was hired by a small company in Cambridge to design a database for their cell culture data, so I taught myself VisualBasic, which is the programming language built into Excel and allows you to write your own functions that run over Excel.  Pretty useful if you do a lot of stuff with Microsoft Office.  After learning VisualBasic, I made my dad a database to keep track of his wine inventory in Excel.

In my senior year at MIT, I took an intro to programming class through the Computer Science Department (i.e. people who really know how to code) and learned Python.  This class was a lot of fun because all of the assignments were building complicated games that utilized the programming skills.  It was also really well taught and covered a lot of concepts that I had not previously learned on my own.

So, when I had to write some code to analyze long sets of DNA sequence for my work project, I busted out my Python skills and am super proud of my script!  It elegantly does all of the analysis I want and then saves it nicely formatted in Excel spreadsheets for me.  I was dragging my feet getting started on this because I hadn't used Python in so long, but really enjoyed doing it.  Everyone who uses it LOVES Python.

Sadly, I also had to use another computer language for this project, the dreaded R.  Yup, that is the name, just 'R'.  This language was written by statisticians and I hate it.  The reason I hate it is that the syntax  Pretty much all the other languages I know (MATLAB, VBA, Python) and languages I don't know but hear are useful (C, C++, Perl) use very similar syntax, so it is really easy to learn them once you know at least one.

R does not follow this pattern and I have tried three times to really learn it and I keep failing.  It doesn't help that the documentation is really poor.  Everyone I know who uses R HATES it.  Sadly, I needed to use R to analyze publicly available microarray data and was forced to figure it out.  Fortunately, I have an amazing friend on campus who is pretty proficient with R and he gave me some scripts he wrote and taught me how to modify them.  So, now I am confidently using a tiny portion of R, but I still hate it.  Anytime something goes wrong, it takes me 243571x longer than it should to correct, because I only have the vaguest idea how the language works.

So now I have probably left you without a doubt that I am one of the nerdiest runners out there.  But, maybe some of you like coding?  Do you?  Please share!

In other news, today is Bailey's 2nd birthday and 1 year mark of living with us!  She is so great and makes me very happy.  And now some pictures of her, because she is way cuter than me :)

I'm super spoiled, but my M&D wouldn't have it any other way

I love my cousin Ike

I like window gazing, pillows and my personal couch.


  1. I wish I had computering/math/science skills. Instead, most of this went over my head. Nice mileage with a such a challenging grad school program!

  2. As another nerd Chem E I can completely relate! I learned FORTRAN at UIUC, and took to it quickly, but found the structured programming language built into dBASE (an unfortunately long dead program in which I built a number of applications) and Turbo PASCAL to to intuitive as I also understand MATLAB is. So, glad you've brushed-up your programming skills while demonstrating some good bioinformatics skills.

    The Texas heat has been brutal in Houston too, though better than last year thanks to our comparatively wet summer. I've been able to keep my fitness thanks to pre-dawn runs and the companionship and cold fluids provided by the Kenyan Way training group.