Python libraries: requests and multithreading.dummy

Today was a two-fer: I found two interesting techniques for working with Python. I needed to test a web server, and wanted to send concurrent HTTP get requests. (The problem was that the web server was failing sporadically when hit by a browser, even though individual requests for pages always worked.) I found two libraries that allowed me to write the test code in well under an hour.

  • requests library: I’ve tried urllib2, and it’s a royal pain to use. My general reaction to that library is, “All I want to do is send an HTTP query, and check the response, and I have to write all this code?” Kenneth Reitz has refactored the API so that simple things are simple, and (I suspect, although I didn’t test it), complex things are possible. Check it out at:
  • multithreading.dummy library: Because I wanted to send multiple, overlapping HTTP requests, I figured I’d have to get into threading the Python program. Yuck… I found a great article on Medium that showed how to use the (little known) multithreading.dummy API of Python’s standard multithreading module to trivially (as in, four lines of code) multi-thread the requests.

Rink Rat – A Great Essay on Hockey (not for the kids)

While chatting with people who play hockey just for the pure fun of it, especially those who are no longer whippersnappers, I am amazed that hardly anyone knows about this essay from the New Yorker magazine. Charles McGrath wrote this gem for the Shouts & Murmurs column of the 4 October 1993 issue.

“Rink Rat” from the 4 Oct 1993 issue of New Yorker magazine

Link to the original article

Winning Team, Boston BlueButton Innovation Challenge

I was a member of the team that won the “Most Likely to Succeed” award at the MedStart Hackathon at Tufts Medical School ( Our four-member team (Bryan Bordeaux, Michelle Qi, Elaine Wu, and I) produced a tool that helps a primary care physician by listing recommended screenings for patients.

This was a great event. It was well organized by the MD/MBA program at Tufts. It pulled together about a hundred people – entrepreneurs, software developers, physicians, designers, mentors – to think about issues of exchanging medical records (securely) so that patients can be more in charge of their care.

There’s more…

Digital Analytics Fundamentals from Google

I just finished Google’s “Digital Analytics Fundamentals” course at I did OK, too 🙂

The course talks about using Google Analytics to show the performance of your website. The course was a series of short (4-10 minute) videos, with a set of questions after each to let you think about what they just said. In total, it probably took me a little under 6 hours to work through all the lessons: that’s about what Google predicts.

Even though I have worked with Google Analytics for a while, I learned a bunch. Some of the info was about new features they’ve introduced since I last looked; some was about getting more information from the existing tools – better filtering, better reporting. It also told about other facilities that I had never had reason to use.

The course is over closed out now, but they’ll probably run it again. It’s well worth it.

Upgrading to OS X 10.9 Mavericks – (No) Trouble with 5 GHz Wifi

Update: Good news! I am now able to get onto the 5GHz SSIDs. What changed? I rebooted my router, and it now seems OK.

So I may have cried Wolf about this problem, and incorrectly blamed Mavericks. The problem seems to have gone away after the router reboot. Whew! I still don’t know why I got the message that the previous connection was “open” not wpa2-personal. But I’ll take it.

Original posting follows:

I upgraded my 2.3GHz MacBook Pro to Mavericks yesterday, and had trouble with Wifi on 5Ghz. I’m using a Netgear WNDR3800 using the CeroWrt firmware. It had previously worked great on both the 2.4 and 5 GHz channels for this computer, and the others in my house.

After the installation, I selected one of the 5GHz SSIDs, and got the message, “‘CEROwrt-guest5’ was previously joined as Open, not WPA2 Personal.”


That’s not correct – up until the upgrade, that SSID had definitely been WPA2-Personal. So after casting about (turning Wifi on/off, etc). I finally went to the System Preferences and removed the SSID by clicking the “-” button from the Wifi-Advanced settings.


But this doesn’t seem to have solved the problem: Now I see a message, “The Wi-Fi network ‘Cerowrt-guest5’ could not be joined.” when I select that SSID from the Wi-Fi menu.


So I’m stuck. 2.4GHz works fine (both on an open SSID, and one with WPA2-Personal), but I have not been able to make 5GHz work. No workarounds yet, and a quick scan of Apple’s forums don’t have any indication of a fix.

See Update above – things are working fine after rebooting my router.

Upgrading to OS X 10.9 Mavericks – Really long install times

Mac OS X 10.9 came out on Tuesday, and I decided to take the plunge and move my 2.3 GHz MacBook Pro to Mavericks. The price (free) is right and there are big claims for its decreased power demands. You can read John Siracusa’s opus describing all the new features over at the OS X 10.9 Mavericks: The Ars Technica Review, but I wanted to detail some of my surprises/impressions.

First impression: Install time was astonishingly long. I ran the ~5 Gigabyte download overnight. It went fine, and when I came to the computer in the morning, it was ready to install. The window said “44 minutes”, and I said OK – I have about 75 minutes before I have to leave. Here’s the timeline:

  • 6:45am – Start the install process.
  • 7:59am – Still shows 4 minutes. OK. I’ll wait.
  • 8:04am – Shows 1 minute left. I gotta leave for work. At least the battery’s fully charged. I put the computer on the floor of the passenger side and let it finish as I drive…
  • 8:22am – I hear the reboot chime. Whew! The Apple appears, with the spinner
  • 8:25am – Finally, I see an OS window – it says that it needs five more minutes to complete installation.
  • 8:33am – I’m almost to work, installation completes, and shows the “Incompatible software” dialog. (The Flip WMV player isn’t compatible.) I close the lid and carry the computer inside.

So it took almost two hours to complete the “44 minute” task. At least most other things worked smoothly. But see my other posts…