Operation: Crappy Sewing Machine commences

This weekend, I went to a bra-making workshop and won a sewing machine in a raffle. It isn’t really crappy, but I spent a couple of hours un-jamming it, so I’m bitter.

The interesting thing about this machine is that it has a built-in camera, so you can take photos and video of exactly what you’re sewing and see them on the app. You can also buy new stitches from your phone and transfer them to your machine, so I started getting curious: what protocol is my sewing machine using? Could I write my own client?

I took a look at the manual, but there was nothing more technical than how to install the app in there. I checked the website, no other documentation there. I debated contacting customer service, but if I liked talking to people I wouldn’t be a programmer, so I fired up Wireshark and took a look at the network. I’m not too proficient with Wireshark, though, so I couldn’t figure out how to make it capture anything useful.

After a couple hours of fighting with it, I gave in and emailed customer support. I figured maybe they’d just forward me to a developer who would be happy to tell me about their protocol. Nope:

As far as the communication from the sewing machine to the app goes, I don’t know all the nuts and bolts but I do know it is proprietary information and is one of the features that makes the Spiegel 60609 so unique!


I realized that it would probably be easier for me to decompile the app, rather than sniffing the network, so I downloaded the APK using a sketchy service (I’m not sure if this is the best one out there, but it’s the least-offensive one I found) and undexed it using dex2jar:

$ chmod +x *.sh
$ ./d2j-dex2jar.sh path/to/Spiegel Social Sewing App_v1.0.4_apkpure.com.apk
dex2jar ../sewing-machine/Spiegel Social Sewing App_v1.0.4_apkpure.com.apk -> ./Spiegel Social Sewing App_v1.0.4_apkpure.com-dex2jar.jar

I opened it up in Intellij and boom, source code. Unfortunately, Intellij’s built-in decompiler choked on the one most interesting class (com.spiegel.android.spiegel.app.ui.settings.SpiegelMachineFacadeImpl). I tried to debug why (it could open every other .class file), but realized it would probably be easier to try another decompiler. I fired up JD-Gui and out popped the source!

Screen Shot 2016-04-12 at 9.13.51 PM

Turned out my sewing machine is running a PHP server, which is easy enough to communicate with. I think there are ~20 of these machines in the wild, so this is unlikely to be of any use to anyone, ever, but I look forward to writing my own client.

Here’s a video from it of it jamming the first time I attempted to use it:

JoCo Cruise 2016: a misanthrope’s perspective

I was on the JoCo cruise last week. I’ve read quite a few pieces on it and everyone is gushing over it, so I figured I’d put up my perspective.

Basically, I’m not a fan. The point of a cruise seems to be to eat and drink as much as possible, pay as much money as possible, and have zero mental stimulation.

The freedom, or lack thereof

They search and X-ray everything you bring on the boat to make sure you’re not bringing more than two bottles of wine. Everything is very tightly controlled to make sure you end up parting with the maximum amount of money during your cruise, so there are a million tiny inconveniences like not being able to get a drink for a friend or leave the boat with a coffee.

The food

Is not very good. I love starch, but it was like a week of eating bread mush with lots of cheese. There’s a “secret” Indian menu I ordered from a lot, which was a slight improvement, but was basically like the worst of Indian Row in NYC.

The coffee was terrible. On of my friends actually brought beans, a grinder, and Aeropress after their experience last year.

The staff

The workers were either cringe-inducingly obsequient (memorizing our names and asking us repeatedly if there was anything else at all they could get us) or sullen and ignored us for as long as possible.

I originally wanted to report how I’d go up to a crewmember to ask a question and they’d ignore me for a few minutes, fiddling with their phone before saying “what?” but then I heard that Royal Caribbean fires people who don’t get 10s on their customer satisfaction surveys (which explains the other type of worker). I don’t really want to get them fired, I just want to be able to find out if I’m in the right place to go kayaking or whatever.

Also, almost all of passengers and almost none of the crew appeared to be white. That felt really weird.

The boat

Have you ever lived in a mall for a week? I have, and let me tell you, it’s depressing. It was like being trapped in an old McDonald’s with creepy injection-molded plastic everything bolted to the floor. It literally gave me nightmares.

The ports of call

Every port where we stopped had a giant fence around the cruise ship area. Want to go out and see what the island is like? No problem, either pay for a taxi or walk for a half-hour through Gucci stores and Ye Olde Touriste bars. I’m not sure whether they have these Area-51-type fences to keep the locals out or the tourists in, but either way, I hate it.

The on-ship entertainment

This is less relevant for next year, but the things the Royal Caribbean offered as “entertainment” were obnoxious. Talks on “how to buy an expensive watch” or “procedures you can have to look younger.” With the casino, the constant greatest-hits karaoke, the the bars every 30 feet, everything was about not thinking.

Minor, but annoying

You had to use hand sanitizer all the time, which was disgusting. Preferable to the alternative, but it always felt like someone drooling on my hands.

In conclusion…

My friends all loved it and are going back next year, but the whole experience made me want to go camping for the rest of my life.

The Joy of Programming

Last weekend I volunteered at Black Girls Code, an organization that encourages black girls to enter STEM fields. I was a teaching assistant for the “Build a Webpage in a Day” workshop, which basically covered some HTML and a tiny bit of CSS.

The problem is, HTML isn’t very interesting. After a few hours some of the girls started complaining about how this was boring and one told me, “I thought we’d be making games.” Nope, you’re formatting documents for six hours, enjoy.

HTML is also a terrible first language because it has all sorts of weird quirks. We were using Thimble so the girls could code on one side and see the results on the other, which is pretty cool. However, imagine that you’ve gone to this site and you’re seeing HTML for the first time:

Mozilla Thimble

Okay, now ignore the first line, that’s way too deep for us to get into. Now everything in the <html> tags is your webpage. Except the <head> isn’t actually displayed on your page. Except for the <title>, which isn’t a title on your page, it’s a title for your page. Then you see how the end tags have this extra, easily-missable, “/” character? That “closes” the tag. Got all that?

There were two groups and I was working with the younger one, 30 kids age 7-10, most of whom had to learn copy/paste and where and how to type the <, >, and / keys. Repeatedly. I didn’t mind, but boy did the kids get frustrated trying to type < and > and looking up a few seconds later to see “,” and “.”.

Most of the girls seemed to be most excited about showing their families what they had done after the event. To actually have a webpage to show, the girls had to log into Thimble and hit the “Publish” button. The head teachers told everyone to use IE, but they hadn’t actually run through the curriculum beforehand and so they didn’t realize that Thimble doesn’t let you log in from IE.

So all of the girls spent hours working on a webpage before I tried logging one in. I let the teacher know about the problem and then she tried to explain to 30 7-10-year-olds that they had to open another browser and cut-and-paste their work into it. Many of them ended up getting really frustrated, confused about which browser they had open, and never ended up logging in at all. At the end of the day, one of the girls on her way out was begging me to add one more thing to her webpage so it would look impressive when she showed her folks later. After she was gone, I went over to her computer and she wasn’t logged in. She had no webpage to show her folks at all.

If it was my workshop…

If I had to redesign this, I would have started with JavaScript. You can get a “web app” started in three lines:

alert("Hello, world")

It’s not actually correct HTML, but it gives you immediate feedback and you can start playing with it. And I got the distinct impression that these girls wanted something to play with.

To create a webpage they could show their folks and use later, I’d have the kids install Dropbox. Then they could save files to the Dropbox folder and Dropbox would serve them.

And I’d run through the curriculum before I taught the course.

How to Succeed in CS Without Really Trying


When I was in college, I was a pretty mediocre student. I knew that my grades weren’t going to get me a great job after graduation, but I had read that doing research with a professor was looked on favorably. I wasn’t particularly interested in research, but it was the lead I had.

I went to my advisor and asked her if I could do a research project with her and she was delighted. A few weeks later, she invited me to a “Women in Science and Engineering” event she was organizing at NYU. It got my brain churning and, as I walked home along the south side of Washington Square Park, I suddenly realized that NYU did not have any sort of club for women interested in CS. I’d love to say how I altruistically thought such a club would encourage more women to pursue CS, but honestly I just thought that would look fantastic on my resume. I quickly sent out an email to the CS students and founded a club. Thus, Women in Computing was born (as a side note, it is still flourishing and doing good in the world, so that’s something).

After that, I saw an advertisement that Google had a scholarship to attend the Grace Hopper Conference. Well, with my research project and being the founder of Women in Computing, I was a shoe-in. The conference was my first tech conference and I was wandered around in a haze of free pens and teeshirts, asking companies about summer internships. At the Goldman Sachs booth, the woman took one look at my resume (research, founding Women in Computing, winning the Grace Hopper Scholarship) and offered me an internship on the spot. I accepted.

When I got back to NYC, I saw a poster for the big fish: Google’s Anita Borg scholarship. I applied for that and, thanks to all of my prior accomplishments, won. This helped me win an award for my research and an NSF grant for grad school, which all contributed to me getting into every PhD program that I applied to.

So, it turned out that doing a research project with a professor was pretty good way to bootstrap success, although perhaps not in the way it usually works.

Mad Art Skillz

With all this free time, I’ve been working on an iOS game. I’m not even close to done yet, but I’ve wrestled Objective C into submission and now and I’m working on some assets. It’s going to be musical, so here’s Beethoven:


And here’s a demon (it plays the piano):


And the player character, Calliope:


If you ever need to make some vector art, Chris Hildenbrand’s blog, 2D Game Art for Programmers, is fantastic. It teaches you how to create awesome vector art using Inkscape (which is free). I had never done vector art before and his instructions are perfect for beginners.

Goodbye 10gen, Hello Google


After five wonderful years, I’ve decided to leave 10gen and join Google. I’m going to miss working with all of my coworkers and the community tons, you guys are awesome.

I will hopefully continue blogging, but Snail in a Turtleneck will probably not be as MongoDB-focused anymore. If you’re looking for some good MongoDB reads, I recommend checking out Planet Mongo, an aggregator of MongoDB-related blogs, and in particular:

If I’ve missed any MongoDB blogs you find helpful, let me know in the comments and I’ll add them to the list!

I will be finishing the second edition of MongoDB: The Definitive Guide in a few weeks and it should be out by the end of the year.  Once I’m done with that, hopefully I’ll have a few weeks to relax.

Introducing Noodlin – A Brainstorming App

Screenshot of Noodlin in action. Create a Noodlin account to add your own ideas to the features board, or create your own boards.

I’ve been working on a web app, Noodlin, for brainstorming online. Basically, Noodlin just lets you create notes and connect them. I’ve been using it for taking notes during meetings, figuring out who gets what for the holidays, and organizing The Definitive Guide. I think it might be handy for people studying for finals this time of year, too.

I find it really difficult to be creative while looking at a text editor: it’s just not a good form factor for organizing thoughts, taking notes, and coming up with new ideas. There’s a whole class of problems where people say, “Let’s go find a whiteboard” or start sticking post-its to a wall. Noodlin is an attempt to make this kind of thinking easier to do on a computer.

Some features that I think are cool:

  • You can collaborate with friends and coworkers: anyone can add their own notes and connections to a board (each collaborator gets their own “layer”).
  • Boards are infinite in size: drag the board itself to move it around.
  • Notes can use Markdown for nice formatting.
  • You can create private boards by clicking on the lock beside the board title. Share with select users by adding a note with @theirUsername to the board and then selecting “Share” from the menu that appears. Everyone else will see a 404.

There are still a few rough edges, too: it doesn’t work very well on IE or mobile devices. I’m looking for a graphic designer to do some freelance work, does anyone know someone good? Looking for someone who can do stuff in with an Edward Gorey/Don Kenn look.

I’ve been working on Noodlin as a side project for a couple of months now and it’s an interesting change from database programming: most of the app is JavaScipt, there are only a few thousand lines of server-side code.

Please give it a try and let me know what you think!

Go Get a Hot Water Bottle

If you don’t own one, go order an old-school hot water bottle. You can get one on Amazon for ~$10 and they feel amazing when you have a fever and your feet are freezing. They are also super-easy to use: just fill it up with hot tap water and they let out a nice even heat for ~8 hours. I am just so impressed with this technology. It’s like the Apple of cozy feet.

Anyway, I recommend getting one before you get sick.

Debugging Sexism

Photo by Steven Fettig, some rights reserved

The word of the day is sexism: Shanley Kane tweeted the CTO of Geekli.st, asking them to take down a video of a woman in a Geekli.st top and underwear dancing around. The subsequent tweets were captured in a long Storify and Geekli.st subsequently issued a public apology.

The interesting thing about this, to me, is how often well-meaning geeks react badly when someone says that they did something sexist, racist, homophobic, etc.

Let’s say someone says to you, in a public forum, “This thing you did is sexist.” What should you do?

First, if your immediate reaction is to say, “No it’s not!” don’t give in to your immediate reaction. That seems to be what most people start off with and it doesn’t help anything.

The reason you’re probably so eager to say it’s not sexist is because you’re not sexist. (Let’s assume, if you’re reading this blog, that you are correct: you are not sexist.)

So, if you aren’t sexist, why can’t you flat-out say “You are wrong”? Well, for starters, just because you’re not sexist doesn’t mean you never do anything sexist. Besides, they’re saying “This thing you did is sexist” but what they mean is “I feel this thing you did is sexist.” And even if you’re Simone de Beauvoir and Margaret Atwood and Buffy the Vampire Slayer rolled into one, you cannot tell them their feelings are wrong (well, you can, but you’ll look like an ass). What should you do, then?

You should try to make them feel better and try to avoid hurting them in the future.

  • Step 1: try to make them feel better. The best way to do this is through an apology. A real one, not an “I’m sorry this offended you”-type apology. A better choice: “I’m sorry that I did that.” Now follow up with, “What can I do to make this better?”
  • Step 2: try to avoid hurting them in the future. Obviously, everyone makes mistakes. You can’t never make one again, even if you and your company were publicly humiliated the first time around. The important thing is to try to learn from it. Google around and read about the issues women and minorities are concerned about in geek culture. Even if you don’t agree with everything everyone writes (I certainly don’t), you will at least know what the issues are.

If someone tells you they’re offended, you should take that seriously. If they’re speaking up, there are probably many others who are silently offended.

Enchiladas of Doom

Damjan Stanković's Eko light design

Andrew and I are visiting San Francisco this week. Last night, I wanted enchiladas from the Mexican place across the street from the hotel. It was still warm out even though the sun had set hours ago, so we decided to walk over.

Our hotel is on a busy road with three lanes in both directions, but there are lights along the road so there are periods when no cars are coming. We waited until a wave of cars had passed and sprinted across the first three lanes. In the darkness, it looked like the median was flush with the pavement and I charged at it. It was actually raised and my foot hit it six inches before I had expected to encounter anything solid. I staggered and lost my balance but I was still running full-steam, so I tripped my way forward ending up in the middle of the road. I lay there on the highway, stunned, looking at three lanes of cars coming at me.

Get up! screamed my brain. It hadn’t even finished shouting when Andrew scooped me up and half-carried me off of the road. He had almost tripped over me as I fell, but managed to leap over and then turn and pick me up. He is my Batman!

My ankle is still pretty sore and I’m a bit banged up down the side I fell on, but other than that I’m fine. And the enchiladas were delicious.

Also: if you’re a subscriber and you’re only interested in MongoDB-related posts, I created a new RSS feed you can subscribe to for just those posts. The old feed will continue to have all MongoDB posts, plus stuff about my life and other technology.