New Job, Digs, and Deck

| | Comments (0) | TrackBacks (0)
There have been a few job switches over the last few months, and in continuance of that pattern I started a new job working as the webmaster for Foreign Policy Magazine.  I think I'm going to be there to stay, though.  The environment requires an insane amount of multitasking, which, incidentally, is just the way I like it.  It does mean that I have a three hour commute each day to downtown Washington DC, but two of those three hours are on a train.  I'm generally able to be productive during those times, especially since I have a MiFi device giving me access to the tubes wherever I am.  The

I also moved to a new apartment - this time in Bolton Hill.  It's a little on the small side, but includes an awesome back deck and roof area.  There's also a nice park across the street, making it a bit easier now to walk my dog.  Pics are below:




A SaneR R

| | Comments (1) | TrackBacks (1)
I've been working on a number of projects recently in R and find it fairly frustrating. There's no way to modify a variable in a function (as in the case of languages that support closures). This makes it especially hard for a language like R that has pretty good functional programming support.

I'm currently working on a library to make R act more sanely (called SaneR - I'll post again when I make it available online).  One function that I've found quite useful lately is one I call "closure":

closure <- function(..., frame=3) {
  parent <- parent.frame()
  frame <- ifelse(frame=="sapply", 4, frame)
  grandparent <- sys.frame(sys.nframe()-frame)
  for(name in c(...))
    assign(name, get(name, envir=parent), envir=grandparent)

Using this function you can affect variables outside of a function's scope.  For instance:

x <- 0
lapply(list(1,2,3,4,5), function(y) {
   x <- x + 1
   message("Run number ", x)

By calling closure() the variable x is set in the parent (actually, grandparent's) environment, meaning that by the time you reach the print statement x is 5.  This is great for things like counters within lapply. 

Other things that are going into the SaneR packages are:
  • a doTimes like Ruby's <int>.times { } method that does something some number of times and returns the results (like calling a map function to an integer range)
  • A foreach that can handle lists sanely.  For instance, if you want to do something for every name and value in a list, it takes more lines of code then it should.
  • A propper logging mechanism for long running tasks.  A whole lot of R tasks take a while to run (R is slow).  I'm writing a logging class that can print out the % complete for some task as well as an estimate to time of completion.
  • and more....
If there are any more ideas out there, comment on this post. 

New (Office) Digs

| | Comments (0) | TrackBacks (0)
It now looks like I'll be defending a MS at MUSC on December 10 and hopefully transitioning into a PhD program at JHU (not sure which program yet) starting next fall.  I've currently started working full time right now as a research assistant in the Center for Computational Genomics at Johns Hopkins and am a part time MS student (in a full time program) in the Computer Science department.  I quit my previous job a few months ago, and I've been surprised at what a change of environment can do to morale.  For instance, compare these two pictures:

The first is a picture of the hallway at my most recent job.  The building was old, damp, large, and mostly empty.  It had a chilling effect on the soul (I think in large part due to how empty and fluorescent it was).  Compare that with the second image, from my new office, where I work with an excellent view of downtown Baltimore (including the famous Key Bridge and Fell's Point).  There is a ton of natural light and many collaborative areas with white boards, cock sauce, and free coffee.  The pay is horrible compared to the first place - but the new environment is worth at least the difference.  It is amazing how little I care about the difference in pay compared to how important I consider something simple like sunlight to be.  I don't even mind working late to get this view:

Hurrah for the new digs!

Daily Reminder

| | Comments (0) | TrackBacks (0)
police.jpgCrime is everywhere in this city - even right outside my front door. The police chased this guy down and then tazed him. No idea what he did, or why his pants are down.

It goes to show that even in what is considered to be one of the safest neighborhoods in Baltimore, there is still no escape from the crime that infects every street of this city.

I'm amazed at how I've never seen any sort of police presence until after a crime is committed; then there's no shortage of swarming boys and girls in blue.  I don't think I've ever seen an officer standing on a street corner or sitting at an intersection in their car.  I have no idea what they do before a call goes out, but crime prevention based on a constant police presence does not seem to be something high on their list of things to do.

XMPP in Bioinformatics

| | Comments (1) | TrackBacks (0)
Came across this paper today:

I'm pretty excited that there is anyone else in Bioinformatics that even knows what XMPP is.  As the amount of data that is transfered via networks to servers that run processes (e.g., many methods being released today provide an API) increases, protocols like XMPP will need to take over and leave HTTP based ones (SOAP, REST) in the dust.

Hurrah!  I'm excited.

Also came across this article: http://www.ncbi.nlm.nih.gov/pubmed/10706945 - and all I can say is that I'm speechless.  The trial participants must be quite....interesting...

New pics of Baltimore / the new apt soon....
Last night my girlfriend and I went to the inner harbor area of Baltimore for their weekly Sunday concert series.  The area is primarily frequented by tourists and shoppers; it's generally considered to be the safest area of Baltimore.  Halfway through the concert, the couple right in front of us became engaged during, of all things, a Van Morrison song.  Shortly after the proposal, and resulting general applause from the rest of the small audience, the couple stood in an embrace and left.

Within a few minutes I noticed a young (late teens) male and female running toward the small amphitheater.  As they ran up the steps next to me and directly over the spot where the young couple had solidified their marital intent, I heard the female say "Keep moving - you've got to keep moving - that fucker shot you".  That's the point at which I noticed the spurting blood coming from the male's arm and landing on my pants.  After they ran past, I stood up, and after trying to figure out what it was I just saw, I walked in the direction they were running.  I grabbed some gloves from a police officer and assisted another EMT who had just run up in controlling the bleeding (it was an arterial brachial bleed) and treating for shock.  It took over 10 minutes for an ambulance to get there (we were a few blocks from two hospitals - no idea why it took so long).  After transferring care and a report to the arriving EMTs (and taking a minute to scrub the blood off my body using the cleaning kit from the back of the ambulance) I heard that there was actually another patient that had just been picked up by another EMS unit who was shot by the same assailant. 

There was a police helicopter that was hovering overhead in no time instructing the running crowds to "leave the scene" and threatening to arrest anyone who stayed.  In the report later, the police claim that they couldn't find the shooter "because of the chaos that ensued after the shots were fired" (see story here).  I imagine that has something to do with the police chasing all of the witnesses away with the threat of arrest. 

The officers who were there on scene when I got to the patient were fairly useless.  It took numerous requests to one officer before she would even stand over me with a flashlight so I could see what I was doing.  The other officers simply stood there and refused to assist us in controlling the scene.  The female was encouraging the patient to keep running turned out to be his sister.  She was literally screaming at us that we needed to get him some water and stop holding his feet down.  The officers flatly refused to remove her so that we could work without distraction. 

This city has a homicide rate that is nearly seven times the national rate, six times the rate of New York City, and three times the rate of Los Angeles.  The police commissioner for the city seems to either be oblivious or challenged when it comes to crime statistics.  Two months ago he stated that the Inner Harbor and surrounding neighborhoods were safe.  That was apparently his assessment after a few teens stabbed each other and there was a string of robberies.  Perhaps he'll be a bit slower to make the same statement again.

The mayor has just been charged with 12 counts of felony theft, perjury, fraud and misconduct in office.  The police have no problem shooting a convenience store robber holding nothing but a screwdriver in the head, followed by a pair of paramedics who couldn't tell that he was moving and still alive.  They left and went back to their station; the police apparently weren't as dense and figured out that movement likely indicated life and called the medics back (more here and here).

I'm amazed at how it is normal that on the same square foot of ground in this city a young, loving couple can become engaged and then ten minutes later that same spot be covered with the blood of a teenage boy.  The clips from the news seem to make it sound as though this isn't so much of an unusual occurrence in the "safest" area of the city.  They seem to say that since the shootings were non-fatal it isn't that bad.  I'm not sure I can ever get used to thinking that attempted homicide is somehow better than successful homicide.

This city might take some getting used to.

First week in Baltimore

| | Comments (0) | TrackBacks (0)
So, I'm now all moved in to Baltimore.  Big city.  I won't have inter tubes until Tuesday night, so in the meantime I'm drinking coffee and using tubes at a place a block away from my apartment - http://www.redemmas.org - which is a commie/anarchist "worker-owned and collectively-managed" bookstore/coffee shop.  The conversational topics here are amazing, as I'm sure you can imagine.  They basically go like:

So, dude, like we should, like, totally just stop using money, and, like, start living on farms and like treating animals with respect.  And everybody should have free healthcare, which we won't really need 'cause there won't be any McDonalds, and, like, college should be free.
Totally dude, down with capitalist pigs and up with real pigs, man, like they're smart animals, man.  I mean, like, society is totally screwed up, like fuck it, dude.
Of course, I then can only think of retorting in Mr. Lebowski style:
Sure!  Fuck it!  That's your answer!  Tattoo it on your forehead!  Your answer to everything!  Your "revolution" is over, [smelly hippie]!  Condolences!  The bums lost!  My advice is, do what your parents did!  Get a job, sir!  The bums will always lose-- do you hear me?!

The coffee isn't bad, though, and the tubes are free.

JabTXT: A Jabber to SMS gateway

| | Comments (0) | TrackBacks (0)
Just finished throwing together JabTXT, which is a Jabber to SMS gateway (and vice versa).  It provides a service that gives you the ability to send text (SMS) messages from jabber (XMPP) and vice versa. You can send a SMS text message from any jabber account to any phone number (see the supported gateways page). Also, you can send a Jabber message from any phone to an arbitrary Jabber account.

This type of service is probably 4 years too late - but it doesn't exist yet and was a fun project to throw together.

Baltimore here I come...

| | Comments (0) | TrackBacks (0)
Looks like I will be defending (for my MS in Bioinformatics) sometime in late July or early August, and then moving to Baltimore. I'm looking for a job; there seems to be a lot of government tech work. The problem is that it takes months to get a response back from them in terms of hiring.

In other news, we at Butterfat, LLC just launched CharlestonCulture.com. Our launch party was a lot of fun - see the video below:

CharlestonCulture.com Launch Party from Anthony Spencer on Vimeo.

Pymur 0.0 Released

| | Comments (0) | TrackBacks (0)
Just finished putting together a Python interface to the Lemur Toolkit called pymur.  There were a lot of forum postings by people looking to use Lemur from Python, but up until now no one wanted it badly enough to make an interface.  The Lemur Toolkit is maintained by some folk at CMU, but even so it has a number of issues that make it a real PITA to link against with a new library.  They have made every effort to make it as difficult as possible for anyone to write software that uses their library.  For shame.  Nonetheless, pymur should (for now) work fine on most linux distributions.