Yesterday, it occurred to me that my actions could be construed as ‘bad rubber duck.’ Instead of helping to solve a problem by silently listening without judgement, I sparked a problem-finding and solving obsession in our programmer, El Jefe.
I just started a Coursera course on Data Science and one of the first assignments involves coding a python solution to analyzing the mood of tweets. My code, though working, ran very slowly, so I asked our programmer to tell me why. Long and short so I can get back to the duck part, my code was running slowly mainly because I was creating a list out of all the tweets then comparing it to a dictionary of mood-weighted words. – get_tweets(file) – get_mood(file) – match_stuff(tweet, mood)
Get rid of the making a list out of the tweets file and the code went from 35seconds to 3seconds to run. Why? readlines() is faster than list append()
Ok. Back to evil ducks. Because I realized I had created a round of obsession with El Jefe and had therefore been a bad rubber duck, the ‘March of the sinister ducks’ song got stuck in my head. I first heard the song over 25 years ago, when my college roommate put it on a mixed tape for me. Looking it up, I was pleased to find that the song was written and performed by comic book writer, Alan Moore. How cool is that! Translucia Baboons. Excellent. Thank you for posting that Neil Gaiman.