Wednesday, July 24, 2013

Always check your work.

I posted a solution to a problem a few days back but my results weren't being accepted.  It was quite frustrating.  It turned out my posted solution wasn't the routine I was using to generate the results.  I must have submitted my results 10 times.  I was quite sure I had the correct solution.  Finally this evening I reviewed the results I was submitting very closely.  The error stuck out like a sore thumb.

Tag me embarrassed.  There is confidence then over-confidence.  I am humbled by my hubris.
Sorry for posting a working solution to a Rosalind problem and identifying it as such.

I normally produce my results by way of a wrapper routine like this:

def sseqf(filename):
    clearBioDb()
    loadFASTA(filename)
    print ' '.join(map(str,
                        sseq(namedSeq[namedOrder[0]],
                             namedSeq[namedOrder[1]])))

I write the actual routine sseq separately.  If the output will be of substantial size I will write it to a file rather than print it.  I'll discuss join and map in a few days.

No comments:

Post a Comment