
For years, Meetup has been available in 6 different languages. These are:
And while these languages all have their own nuances and challenges when it comes to localizing for them, it was poor preparation for some of the issues we would run into when localizing for our next supported language…
Yes, that is right, Meetup is now available in it’s 7th supported language, Japanese! It is our first supported language with a non-latin-based alphabet.
We have run into many issues because of this, but the most interesting presented itself when it came time to implement alphabetical sorting.
On first glance, alphabetically sorting a list of strings seems like a trivial task.
>>> Ordering
.natural()
.sortedCopy(["eagle","cat","dog","bird","falcon","duck"])
[bird, cat, dog, duck, eagle, falcon]
However many things can actually complicate this, such as capitalized letters:
>>> Ordering
.natural()
.sortedCopy(["eagle","cat","dog","bird","falcon","duck","Dog"])
[Dog, bird, cat, dog, duck, eagle, falcon]
A user would expect Dog and dog to be sorted next to each other. However, because these strings are sorted by character code, this is not the case.
To do a more language-friendly sort, you can use something called a collator.
>>> Ordering
.from(Collator.getInstance(Locale.US))
.sortedCopy(["eagle","cat","dog","bird","falcon","duck","Dog"])
[bird, cat, dog, Dog, duck, eagle, falcon]
This performs the sorting based on rules from the American English locale. So how about Japanese?
The first thing to note is that there are multiple alphabets in play here:
Strings in Japanese can be made up of characters in any of these alphabets, and using ‘dumb’ sorting, these alphabets wouldn’t sort together at all. However you can use a collator based on the Japanese locale, and that gets you pretty far already.
Once sorted with the collator, it becomes:
See Below:
x = [u”健康”, u”ダンス”, u”テクノロジー”, u”家族”, u”ゲーム”]
>>> Ordering
.from(Collator.getInstance(Locale.JAPAN))
.sortedCopy(x)
[ゲーム, ダンス, テクノロジー, 家族, 健康]
This will sort words starting with Katakana and Hiragana correctly, but will always put the words starting with a Kanji at the bottom of the list. Why? Because a computer does not know how a Kanji is pronounced, and ordering in Japanese is based on pronunciation, following the strict Gojūon (literally, “fifty sounds”) ordering table for kana alphabets. First should come the words starting with the sound a then with i, u, e, ka, ki, ku, etc.). With Kanji, the characters used do not each correspond to the same sound every time. The pronunciation changes depending on context, and currently computers can not guess that.
Ex.: 今日 can be read as きょう (kyō) or こんにち (konnichi).
Given a large list of arbitrary kanji strings, we would be unable to sort them correctly without human intervention giving us an indication of how it’s pronounced in its context. But luckily for us, we don’t have a large list of arbitrary strings! We have a relatively small list of static, already known strings. So we did in fact have a solution.
The thing we needed to sort was the list of categories that Meetup Groups can belong to. We just needed the phonetic spellings of our categories which had Kanji-based names, as we learned earlier that any Kanji-based name can be converted into a more transparent phonetic version.
We asked our translators to help provide these, and then created a new locale called ‘Japanese Phonetic’ (ja-x-phonetic) and a new translation file containing these phonetic translations. And then, when ordering the list on the backend, we temporarily translated the categories into ja-x-phonetic, sorted them using a Japanese collator, and then re-translated them back into normal Japanese while maintaining the same order. Et Voilà!
So we solved our problem, but this is an issue which continues to exist for things like user generated content. If we had a large list of member names in Kanji that we wanted to sort, this would be impossible to do without either transliterating each of these ourselves (not scalable), or prompting users to provide phonetic spellings of their names in addition to the Kanji one (more scalable).
This issue came up unexpectedly, but taught us a good lesson about not making any assumptions when dealing with language. If you want to develop a global product, you have to deal with your product in a global way, and that means building things that make sense in ALL languages.
Meetup recently made the switch to Slack for our team communication platform and our clearinghouse of puppy gifs. One of my favorite features on Slack is how incredibly easy it is to create integrations. In order to get familiar with how the webhook system works, I decided to write a little ruby app that uses the Meetup API to post the next available Meetup event for a given group. If you are an organizer who is using a Slack team to facilitate conversation outside of your Meetup events, host Meetups in your office, or just want to let your coworkers know when something interesting is happening, this might come in handy. Enjoy!
https://github.com/jeffcampbell/meetup-slack
Jeff is a Senior QA Engineer at Meetup
A configurable sandbox to test auto-renewing Apple IAP subscriptions
TLDR; We made a thing that pretends to be an Apple In-App Purchase service to make it easier for people to test their code. It’s open sourced and can be found here: https://github.com/meetup/apple-of-my-iap
The long story:
As part of Meetup’s iOS offering, we recently launched the ability for our members to use Apple In-App purchases (IAP) when buying Meetup subscriptions.
Implementing this feature was a lot of fun. The same kind of fun as running through a gauntlet full of sharp axes, hot flames, and killer piranhas.

But before we get into that….
An Apple In-App Purchase (IAP) is a purchase of digital goods or services through Apple’s native payment processing platform available on all iOS devices. If you’re an iOS user and you’ve ever been prompted by this screen:

then chances are you’ve made an In-App Purchase before. Typical use cases of include:
Since a customer’s payment information is already stored in their iTunes account, they have the ability to make quick and painless payments without having to pull out their wallet and re-enter credit card number information. One tap and they’re done. This also means that you don’t have to spend time designing, building, and maintaining finicky payment forms.
And if that’s not enough incentive for you, Apple will kick you out of the iTunes store for attempting to sell digital goods/services in any other manner other than through IAP.

Sounds like a deal to me.
Here at Meetup, we elected to use the auto-renewing feature of Apple IAP, which means that Apple will automagically take care of all the nonsense that comes with scheduling and charging subscription payments. Hooray!
All we have to do is ask Apple who paid for what, and then ensure that we are delivering the right service and products to the right people. Since the Meetup platform exists on the web as well as on both iOS and Android, we delegate subscription management to the server in order to ensure a uniform experience across all 3 platforms.
So for any given member with a Meetup subscription bought through IAP, we query Apple’s iTunes endpoint and receive a response similar to this:
{
"status": 0,
"environment": “Sandbox”,
"receipt": {
"receiptType": “ProductionSandbox”,
"adamId": 0,
"appItemId": 0,
"bundleId": “com.meetup.iphone”,
"applicationVersion": “409000”,
"downloadId": 0,
"versionExternalIdentifier": 0,
"requestDate": “2015-04-23 23:33:34 Etc/GMT”,
"requestDateMs": “1429832014510”,
"requestDatePst": “2015-04-23 16:33:34 America/Los_Angeles”,
"originalPurchaseDate": “2013-08-01 07:00:00 Etc/GMT”,
"originalPurchaseDateMs": “1375340400000”,
"originalPurchaseDatePst": “2013-08-01 00:00:00 America/Los_Angeles”,
"originalApplicationVersion": “1.0”,
"inApp": [
{
"quantity": “1”,
"productId": “com.meetup.iphone.test.7days”,
"transactionId": “1000000151887289”,
"originalTransactionId": “1000000151887289”,
"purchaseDate": “2015-04-15 21:46:04 Etc/GMT”,
"purchaseDateMs": “1429134364000”,
"purchaseDatePst": “2015-04-15 14:46:04 America/Los_Angeles”,
"originalPurchaseDate": “2015-04-15 21:46:06 Etc/GMT”,
"originalPurchaseDateMs": “1429134366000”,
"originalPurchaseDatePst": “2015-04-15 14:46:06 America/Los_Angeles”,
"expiresDate": “2015-04-15 21:49:04 Etc/GMT”,
"expiresDateMs": “1429134544000”,
"expiresDatePst": “2015-04-15 14:49:04 America/Los_Angeles”,
"webOrderLineItemId": “1000000029487694”,
"isTrialPeriod": “false”
},
{
"quantity": “1”,
"productId": “com.meetup.iphone.test.7days”,
"transactionId": “1000000151887546”,
"originalTransactionId": “1000000151887289”,
"purchaseDate": “2015-04-15 21:49:04 Etc/GMT”,
"purchaseDateMs": “1429134544000”,
"purchaseDatePst": “2015-04-15 14:49:04 America/Los_Angeles”,
"originalPurchaseDate": “2015-04-15 21:48:06 Etc/GMT”,
"originalPurchaseDateMs": “1429134486000”,
"originalPurchaseDatePst": “2015-04-15 14:48:06 America/Los_Angeles”,
"expiresDate": “2015-04-15 21:52:04 Etc/GMT”,
"expiresDateMs": “1429134724000”,
"expiresDatePst": “2015-04-15 14:52:04 America/Los_Angeles”,
"webOrderLineItemId": “1000000029487695”,
"isTrialPeriod": “false”
}
]
},
"latestReceiptInfo": [
{
"quantity": “1”,
"productId": “com.meetup.iphone.test.7days”,
"transactionId": “1000000151887289”,
"originalTransactionId": “1000000151887289”,
"purchaseDate": “2015-04-15 21:46:04 Etc/GMT”,
"purchaseDateMs": “1429134364000”,
"purchaseDatePst": “2015-04-15 14:46:04 America/Los_Angeles”,
"originalPurchaseDate": “2015-04-15 21:46:06 Etc/GMT”,
"originalPurchaseDateMs": “1429134366000”,
"originalPurchaseDatePst": “2015-04-15 14:46:06 America/Los_Angeles”,
"expiresDate": “2015-04-15 21:49:04 Etc/GMT”,
"expiresDateMs": “1429134544000”,
"expiresDatePst": “2015-04-15 14:49:04 America/Los_Angeles”,
"webOrderLineItemId": “1000000029487694”,
"isTrialPeriod": “false”
},
{
"quantity": “1”,
"productId": “com.meetup.iphone.test.7days”,
"transactionId": “1000000151887546”,
"originalTransactionId": “1000000151887289”,
"purchaseDate": “2015-04-15 21:49:04 Etc/GMT”,
"purchaseDateMs": “1429134544000”,
"purchaseDatePst": “2015-04-15 14:49:04 America/Los_Angeles”,
"originalPurchaseDate": “2015-04-15 21:48:06 Etc/GMT”,
"originalPurchaseDateMs": “1429134486000”,
"originalPurchaseDatePst": “2015-04-15 14:48:06 America/Los_Angeles”,
"expiresDate": “2015-04-15 21:52:04 Etc/GMT”,
"expiresDateMs": “1429134724000”,
"expiresDatePst": “2015-04-15 14:52:04 America/Los_Angeles”,
"webOrderLineItemId": “1000000029487695”,
"isTrialPeriod": “false”
}
],
"latestReceipt": “MIJA5AYJKoZIhvcNAQcCoIJA1TCCQNECAQEx …”
}
Apple provides an iTunes sandbox environment which can be used to test In-App Purchases without spending real money. For auto-renewing subscriptions, the sandbox environment allows you to create a subscription which then automatically renew itself six times before expiring. Since many subscriptions periods last one week at the very least, Apple provides shorter test durations for the sandbox environment which are mapped to production durations in the following manner:
Production -> Sandbox
1 week -> 3 minutes
1 month -> 5 minutes
2 months -> 10 minutes
3 months -> 15 minutes
6 months -> 30 minutes
1 year -> 1 hour
However, there were some serious limitations with the iTunes sandbox which made it difficult to develop and test for, especially for non-iOS engineers like myself.
Points #1 and #2 would have created heavy inter-team dependencies between our iOS engineers and our backend engineers, something which would have slowed down development immensely.
Point #3 is just annoying.
Unable to get what we wanted from Apple’s iTunes sandbox environment, we decided to roll our own mock service which simulates IAP subscriptions. Our requirements were pretty straightforward. We wanted a service that:
So we built it!
The end result is a service that any of our engineers could spin up at a moment’s notice, create mock subscriptions, test weird edge cases, and then shut it all down with a few keystrokes.
If you’re interested in trying out our service, simply grab the code from our github repo: https://github.com/meetup/apple-of-my-iap and take it for a spin!

Senior Machine Learning Engineer Evan Estola recently filed a support ticket… in iambic pentameter. Our systems team promptly upgraded his workstation.
It is in the nature of my job here, that my poor dev box is frequently down,
overloaded as it were by process - whom by their own nature and not of fault,
are very intensive of memory.
I enjoy engaging primarily - in the habit of a linux machine, and because I
sometimes do rely on (e.g. data which I need to spy on) complex data
visualizations, a racked machine would be less than ideal.
Therefore the idyllic setup for me (and lo I know that this demand be bold, and
understand if it unlikely be); a workstation under my desk as now,
but with 64G of memory.
by Anne DeCusatis, Core Engineer on Meetup’s International/Partnerships team
I love working with Unicode. It’s fascinating how we’ve designed complex ways to represent something as simple and fundamental as characters. It also allows us to support the incredible diversity in languages of computer users. It appeals to my engineering brain as an interesting problem and to my more emotional side, since having Unicode support helps people express themselves on our platform.
Recently, I worked on a bug that attempted to change my warm-and-fuzzy Unicode feelings.
At Meetup Engineering, we use a Python script to push our code into review. This script integrates with both Github Enterprise and Bugzilla. Recently, one of our engineers added support to this script to pull the bug title and description from Bugzilla into the Python script. The title and description can then be approved or edited by the developer and sent to Github. This was a great improvement, since copy/pasting the bug description every time was tedious and multi-line descriptions weren’t handled well when pasting.
What’s the problem here?
I’ll give you a hint: Python 2.x has a surprisingly lengthy page in its documentation describing how Unicode string/byte string conversions work. I found it to be a fun read, the first time! The tenth time, not so much.
Specifically, our problem was:
Non-ASCII Unicode characters in Bugzilla titles and descriptions were (1) not displaying properly in the terminal and (2) throwing a UnicodeDecodeError when we tried to dump them into a JSON string to send in an HTTP request to Github Enterprise.
This seemed pretty simple to me, since I knew that Python’s json.dumps has a parameter you can pass in to create a Unicode string instead of a byte string, so I agreed to take this bug on. “Python is fun, and Unicode is interesting,” I thought. “This will probably take about an hour, at most, and then everyone will give me credit for having improved our dev process immeasurably, and I will ride a wave of admiration into the sunset.”
After a day or two of messing with it, frustrated with Unicode, Python, and myself, I worked on other projects until I was again feeling up to the challenge. This brings us to the present day.
The solution
A non-Unicode tip I learned working on this: there are diminishing returns after 6pm on a Friday. Go home and look at it Monday morning – it’s likely you’ll get the same amount of progress as continuing to work several more hours.
I digress. There were two parts to the problem: the incorrect display of characters, and the UnicodeDecodeError when sending them out.
The incorrect display of characters was caused because, as I found, the byte string from our MySQL Bugzilla database was not in the format expected of a byte string by Python. To explain this, let’s go into a little detail about strings in Python, and about how a computer stores characters.
Python 2.x stores two kinds of strings: Unicode strings and byte strings. Byte strings are meant to hold ASCII characters, which always take up one byte, and can be coerced into holding other Unicode characters. Python reads and displays byte strings one byte at a time. This is bad for displaying Unicode because Unicode characters may take up more than one byte per character. Unicode strings, on the other hand, are more suitable for printing Unicode characters, since Python knows that one byte of a Unicode string might not be one character. The conversion between these types of strings is supposed to be relatively seamless. I found that the character I was testing with, » (RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK), was represented in the byte string that came from our Bugzilla database as “\xbb”, whereas a new string created with » would be encoded as “\xc2\xbb”. This meant that I would see a question mark block (�, the computer-universal symbol for “I don’t know what this character is”) when printing the string instead of a right guillemet.
To solve this, I took a round
trip. Character by character, I called unichr(ord( c )).encode(“utf-8”). In Python, ord() returns the
value of a character, and unichr() returns the character from a
value. Since I wanted to print a Unicode string, I also called
.decode(“utf-8”) on it. My code eventually looked like this:
#A workaround for 47510
def bugz_unicode(bugz_output_string):
return u"".join([process_char(c) for c in bugz_output_string])
def process_char(c):
return unichr(ord(c)).encode("utf-8").decode("utf-8")
What can I say? It does the job.
Great, now I can dump a JSON string, right? Well, not exactly. It turns out, urllib2 (with which we were sending the HTTP request to our Github Enterprise instance) only takes byte strings, and I just went through a lot of work to ensure I had a Unicode string.
This
was solved by calling .encode(”utf-8″) again, once I figured out that was what
I needed to do…

One
more note: I could only test this when my working directory was clean
of changes, because the script prevents you from pushing to git if
you haven’t committed yet. This led to some fun commit logs:

Eventually, though, it got merged, and is now launched and propagating its way to all the other developers’ environments.

Note that there were, in the end, 45 commits, but only 20 lines changed. In other words: I wrote over twice as many lines about the problem as I did to fix the problem.
In conclusion…
1. Python 2.x + Unicode = CAUTION
2. We use Jython, so we’ll likely be on Python 2.x for a while.
3. I still love Unicode, and I still love Python. But I no longer feel that they could be two great tastes that taste great together.

via https://twitter.com/honest_update/status/625659846285627392
blog post written by Jose Rodriguez,
Product Engineering Lead at Meetup
We’re making an effort to clean up our core codebase. Most of Meetup’s architecture has been monolithic for a long time with a lot of our core code shared in the same scope of a singular webapp. We established no rules or boundaries for how our codebase should interface with other parts. Like a ball of mixed Play-Doh, our code can be hard to identify with no separation of concern. Pieces call other pieces in ad-hoc fashion, resulting in tightly coupled code that is both difficult to test and difficult to maintain.
Instead, we want our code to be like Legos. We want to build small identifiable components with defined interfaces of interaction. With the implementation of code reviews and some good luck in hiring talented engineers, Meetup’s code quality has improved over the past few years. Now we’re interested in enforcing constraints to keep our codebase modular, decoupled, and testable.
Meetup is older than most people realize. Just a few weeks ago we turned 13. While it’s exciting that we’ve lasted this long, it also means we’ve accumulated a lot of code over the years. The truth is that most of our code isn’t tested in an automated way. Much of it isn’t even testable. We have sustained this long by investing in a manual testing strategy. If we took a holistic view of Meetup’s testing coverage it might look something like this:
We know what a healthy testing population looks like and we’re far from it. Last year we took the first step by transitioning from a giant source tree, all in the same scope, to a hierarchy of modules. We even have goals set around the long term vision of those modules. The transition was a success and now we’re ready for the next step, to bring automated unit testing to Meetup with the help of Docker and Jenkins.
We’ve tried something similar before. Our systems team recognized the importance of testing and attempted to setup a continuous testing infrastructure. So why didn’t it work?
In the ladder to automated testing, the first step is unit tests. Integration tests are useful but harder to do. Unit testing is fast and easy. It gives us a solid foundation to start influencing design and prevent regressions. Once we have a solid unit testing foundation, then we can start moving towards higher forms of automated testing.
We need an automated testing setup that is reliable, reproducible and which prevents future regressions and breakage. In evaluating alternatives, we found that Jenkins with Docker would meet this criteria. Around this time we were introduced to the approaches that eBay had been trying with containerizing Jenkins slaves. You can find more about it here: http://www.ebaytechblog.com/2014/05/12/delivering-ebays-ci-solution-with-apache-mesos-part-ii/
We started with their second approach of mounting a slave container’s Docker sock inside of itself. The slave now has access to run other containers without the overhead of Docker in Docker.
When introducing new infrastructure, reliability influences adoption. If the thing is a piece of junk, no one will want to back it. We needed a method to reproduce builds over and over from scratch with no environmental side effects. By running builds and tests inside of a container, we have detailed control over these side effects. Docker gives us confidence in these environments and an easy interface for working with them.
To increase adoption with the continuous integration (CI) tooling, we wanted the tools and environment to be reproducible. The singular Jenkins instance didn’t work for us in the past. Our engineers should be able to reproduce the same configuration in their own environment, just like any production service.
We took eBay’s approach a step further by turning the Jenkins master into a container as well. We have a base Docker image with shared plugins and Jenkins version. We then extend the base image with detailed configurations for a particular Jenkins master. Now engineers can reproduce any configuration we have available.
In this reproducible environment, we wanted as much decoupling as possible. Configurations should have as little environment specific details as possible. We also wanted to create slave instances without needing configuration changes on the master. Jenkins Swarm allowed us to make starting a new slave as easy as starting a Docker container. (https://wiki.jenkins-ci.org/display/JENKINS/Swarm+Plugin) If we want another Jenkins slave, we just run the slave container pointed at the master. The slave will use JNLP and Jenkins Swarm to register itself.
The final result allows us to reproduce any CI setup or configuration in just a few Docker commands.
Keeping engineers informed of breakage is good, but we also need to prevent it from entering our master branch. At Meetup, we’ve adopted GitHub flow with our core codebase using GitHub Enterprise. One of the features of GitHub we actively use are the Pull Requests (PR) to review code before it’s submitted for release. GitHub also comes with a feature to flag commits with statuses. In this case, we can use Jenkins’ GitHub Pull Request Builder Plugin to build PRs and their updates. (https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin)
Test breakage is now reported to both the submitting and reviewing engineers. A failing commit will alert the PR submitter, and the failed state of the PR alerts the reviewer that a problem exists.
We now have a reliable mechanism for determining failure. Engineers do not have to worry about false negatives due to infrastructure failure. Anyone interested in updating our infrastructure can test changes in their own CI setup. And finally, we have gates in place to prevent test breakage from going unnoticed.
Our next step is to create more isolation in pursuit of testable integration. We’re excited about the capabilities Docker offers us here. We’re hoping that the steps we’ve taken for unit testing will help influence our code design and move us towards a more testable future.
Earlier this month I was fortunate enough to attend the Seattle Interactive Conference, a two-day event “celebrating the convergence of online technology, creativity, and emerging trends in one of the world’s most creative cities.” Traditionally known as home base for two of the world’s tech giants, Seattle now plays host to a multitude of successful online startups, many of whom were represented at this year’s event. I learned a number of concepts I’m excited to bring back to NYC, but one thing I found particularly exhilarating is how tech continues to find new ways to empower those in need of agency or representation, which is something close to our hearts here at Meetup.
The first session I attended at the conference, a talk by Crowd Companies founder Jeremiah Owyang on how new companies are increasingly turning to crowd-based platforms as a basis for their business models, highlighted plenty of instances of the trend. Uber and Airbnb were mentioned (as they were in almost every session of the conference, at one point a speaker asked how many people in the room had taken an Uber to the conference that day and at least half the room indicated they had). But Owyang also highlighted plenty of little-guy-empowering startups that haven’t broken into billion-dollar-valuation visibility. LeftoverSwap helps connect people with extra prepared food with those looking for a bite to eat, helping reduce food waste and making locally-available food more affordable. Boatbound takes the concept of vehicle- and ride-sharing and moves it offshore. Helparound connects diabetics, so that if someone finds they are stuck without a glucose meter or other supplies, they can send a call for help to anyone in the area who might be able to provide them help in a pinch. Here at Meetup, we’re also doing what we can to build the communities of food swappers, boat sharers, and diabetes support.
Janelle Maiocco, CEO of Farmstr also hosted a fantastic session about the work Farmstr does to connect small farmers to sell directly to local produce buyers. This benefits farmers by eliminating a lot of guesswork farmers normally need to do in terms of how to bring to market, and saves them a lot of time because they are delivering to a specific place at a specific time instead of spending all day at market. She also spoke on the unfortunate statistic that only 5% of tech startups are founded by women. Local food and female entrepreneurship are two more topics that we here at Meetup hope to support and help build communities around.
As a side note, one other session at the conference had a bit less to do with tech supporting the little guy, but resonated with me as a Meetup employee nonetheless. It was given by Briar Waterman, the Director of Digital Creative at Starbucks. He touched on the company’s Meet Me At Starbucks, a campaign that sends filmmakers to Starbucks locations around the world to film interactions between communities meeting within, then publishes the footage. One such highlighted community was a Meetup Group, The Long Beach Scrapbooking and Digital Photo Group.
The videos serve to support Starbucks’ assertion that “good things happen when we get together.” Which, to me, sounds just a tad bit familiar.
A big thanks to all the organizers, speakers, and participants at Seattle Interactive for an educational, eye-opening, and supremely enjoyable two days.
Duncan is a QA Engineer at Meetup who thinks the Pacific Northwest is the Pacific Northbest
Each quarter, Meetup holds a two-day internal hackathon. Engineers work on hacks ranging from launchable features, to internal tools, to the downright ridiculous. Meetup Hacks is a new feature focusing on these projects.
Caroline is a Core Software Engineer who recently graduated from Tufts University. When she’s not hacking, she listens to last.fm while working on Meetup notifications.
Being new on the job and wanting to contribute with something practical, I was all set to build something that might actually get pushed to production. I spent the week before the hackathon tossing around a lot of ideas, mostly relating to a big project I’m about to start.
Then, as I was sitting at my desk blasting some tunes and hunkering down on a tough bug, an incredibly random idea for a project came to me: what if I allowed our members to hook up to their last.fm accounts?
I’m the kind of person who loves data, and loves music, so when it comes to a combination of those two things, I swoon, just a little. I put feelers out into our dev hipchat channel to see if there were any other last.fm users around so that I could possibly justify doing this hack, but I only got two responses. Turns out, most people ditched last.fm a few years ago.
But, the more I talked to my friends about it, the more I wanted to do it. It’d be something fun and I’d get to learn about the authentication process.
And come, on what’s better than music?
Answer: nothing.
When we got around to presenting our ideas at the hackathon kickoff, it turned out that two of our Data Team engineers (Brian and Evan) had a similar idea. But, they wanted to use the Facebook “Like” data that we have from some of our members to generate a concept of the music taste profile for a group. At that point, I was pretty set on last.fm, so we decided to get together at the end of day 1 and see what we could do about combining our projects.
The Hack

So, then it was time for me to dig into the last.fm api. I explored a little bit and implemented calls to a few of the artist specific methods just to get comfortable before diving into user auth.
While the api is great on the whole, the one thing that might be frustrating to some developers is that they’ve developed their own authentication system. It’s incredibly similar to OAuth, but not enough so that I could use the framework that Meetup already has for linking to OAuth services like LinkedIn and Facebook. Some would groan, but I know next to nothing about authentication protocols, so I took this as an opportunity to get familiar with them.
There are a few different ways to authenticate with last.fm, but I chose the desktop application route so that I wouldn’t have to allow last.fm to make calls to our development environment. From there, it’s a relatively simple process: you get a token from last.fm, have the user request authorization using that token, and then you can fetch a session (and corresponding key) with last.fm. The somewhat difficult part comes from deciding how to store intermediary data (like the token) and how to proceed through all the stages I mentioned.
Because this was a hackathon, I took the hacky way out, and passed the token through the whole process, and kept track of the user’s state by monitoring the window I had opened for them to authenticate with last.fm (so that I would know when to trigger a request for a session key). Kids, don’t try this in production.
Despite all the hackiness, I got to learn something: for the first time, I got to play with our internal Ajax method library in the process to make the links between what was happening in the browser and storing the account tie in the DB.
Once I had authentication, I could actually start doing fun things with user data. As per Murphy’s law, the api call I was hoping to use was deprecated, and ended doing a bunch of fun set operations to develop a playlist for a meetup group based of the last.fm stylings of anyone authenticated in that group. Everything was fine and dandy, until I realized that I only had two Meetup HQers authenticated, and didn’t have enough data to make good playlists.
Luckily, Brian and Evan, who were working on the facebook side of things, let me dig into some of what they had built and I got to embark on the process of using the echonest api to convert between facebook’s identifier and musicbrainz ids, which is what last.fm uses. So, after all this work, anyone authenticated with last.fm could click a button to create a last.fm playlist for any group they were in.
Combining Forces
Finally, I got together with Brian and Evan to set up the beautiful integration of our projects. They had pulled all the facebook info and associated pairs of meetup groups and music artists with a numeric score. I supplied them with a way to look up the music taste for a member (since last.fm is more detailed than facebook on a per member basis), and Evan adjusted his beautiful group recommendation algorithm to recommend meetup groups to a member based on their music preferences. While the recommended groups were not ones that I might be interested in, it definitely knew me. I got recommended a couple Meetups in Urbana, Illinois (thanks, Elsinore), and though I was unaware that my music taste so heavily reflected my gender, I was recommended a lot of female focused groups.
While I was right in my assessment that this is not going to make it into production, I had a great time, got to know some other MEME teamers a little bit better, and most importantly, I now have a playlist on last.fm reflecting our collective music taste.
Special thanks to the guys for coming up with the ultimate name for the ultimate project: Meetloaf.
Each year, we invite exceptional Computer Science students to intern at Meetup. They work on product teams alongside full time engineers, as well as complete an end-to-end project related to the Meetup platform. This year, our interns tackled a feature our members have been asking for: an attendance tool on mobile web.
The Interns:

Casey Caruso, UI Engineering intern and rising Senior at Lehigh University

Emily Eng, UI Engineering Intern and rising Senior at Tufts University
Selecting a project:
While brainstorming ideas for our summer intern project, it was important to us that we implement a feature that would truly improve members’ experience with Meetup. We looked closer at the role of Meetup organizers and reevaluated the tools we were giving them to manage their Meetups. In doing so, we discussed the reality that many organizers are interested in tracking member attendance. Taking attendance allows them to distinguish loyal members, lets them better anticipate the turnout at future Meetups, and enables them to run a more successful Meetup group overall. Although Meetup had an attendance management tool on desktop, there was no mobile web feature, leaving organizers unable to take attendance on their phones at the most sensible time: as people walk in to their Meetup. We wanted to provide organizers with the ability to take attendance conveniently on-site of a Meetup on their mobile devices. Out of all the ideas that came out of our brainstorm, this was a clear winner since a mobile attendance tool is a feature that organizers have specifically requested in the past.
The Development Process
The initial design of the mobile attendance tool was simple. It had a list of members with corresponding checkboxes, the members being anyone who had RSVP’d yes to the Meetup, and above the list was the current count of how many people were marked as attended. In the nav bar, there was an X button on the left to return to the event page and a magnifying glass icon on the right that revealed a search bar so that organizers could search for a member in their group if he or she showed up to the Meetup without RSVPing.
A technical challenge that we faced while building this tool was making sure that we were coding smartly, reusing existing code where possible. So, for the search portion of the attendance tool, we decided it would be a good idea to reuse some of the code that had already been implemented for the search tool in Messages. This task involved factoring out a generic search view from the existing Messages search plugin and making it able to be used anywhere on the Meetup site. As a result, this generic search tool will also be able to replace a bunch of places where we have been using jQuery UI Autocomplete.
Usability Testing
After finishing the first version of the project, we ran it through usability testing to see what we could improve. Interestingly, we found that some organizers were confused about the permanence of their actions on the page. To make the actions more clear, we decided that it would be a good idea to pivot from our initial design. Instead of updating a member’s attendance in our database on click of a member’s corresponding checkbox, it would be better to include an explicit “Save” button in the nav bar. This way, if organizers were just curious to see what the attendance tool was, they could poke around without the fear of inadvertently changing their Meetup’s attendance. Additionally, we saw that some organizers did not understand what the magnifying glass search icon meant. To address this problem, we moved the search bar out of the nav bar and, instead, placed it right above the attendance count. We also added “Mark All” and “Unmark All” buttons to make taking attendance easier for organizers of larger groups. Some additional features that are currently in the works for version 2 are ways to mark members as “no-shows” and ways to mark members’ payment statuses.
The Final Product

Overall, working on this intern project was great; it was both fun and challenging, and we have definitely learned a lot from it. Many thanks to everyone who helped us along the way, and we hope that Meetup organizers will enjoy this new feature!
Interested in interning at Meetup? Contact recruitment at jobs@meetup.com
Vlad is one of Meetup’s newest makers. After graduating from Trinity College in June, he joined the Core Engineering team.

Did you have any experience with Meetup prior to applying?
My experience with Meetup started during the summer before I applied. I used it a couple of times - once in NYC, where I attended a hackathon at a tech company, and once in San Francisco, where I attended a social event for meeting other international travelers!
You made the decision to work for Meetup in November and didn’t start here until June. What was that waiting process like?
The waiting process was tough, mainly because I wanted to graduate and start my career at Meetup sooner! Throughout this period, my recruiter kept me updated with really useful information and I even got some Meetup swag from her! All of this kept my enthusiasm alive.
You’ve been here for a few weeks now. What’s it like being a new member of the team?
Challenging and exciting. Challenging, because I am trying to get up to speed as fast as I can with all the technologies behind Meetup and exciting, because once I gain more experience, I will be able to make meaningful contributions to the product! Throughout this process, my mentor and manager were really helpful, guiding me with help and support when I need it. My product team was also very warm and welcoming; as a result, I think I integrated myself pretty fast!
An experience that really made me connect with co-workers was the Meetup crawl. We picked several meetups around NYC and visited them, trying to find out more about their background and understand the purpose of those groups. It was a very fun, team-bonding experience through which I got to know more about the people that rely on Meetup to create communities.
What are you working on?
I am on the Communications and Connections (CoCo) team, also known as the Talk Team. I am excited about working on challenging problems and on products that would facilitate the way people communicate and interact with each other. This is mainly what we do on the Talk Team. The results of our work will come to life in the following months and I really hope that it will improve the general user experience within Meetup.
The engineering challenges that I faced so far are related to the big code base of Meetup. It just takes a while to get used and to understand the major parts of the code and also to learn all the technologies being used to implement various features of Meetup. I’ve made a lot of progress on that since I started, but there is so much more to learn! And that’s what makes it exciting for me.
Other engineering challenges that I’ve been drawn to were related to security issues, especially since I am on a team that works on communication products between users. My team is highly concerned about the privacy of our user data and of the user interactions. We want to maintain a very high standard of trust. Sometimes this creates new engineering challenges but I am excited to work on these and come up with solutions that would solve them!
What’s the best part of working at Meetup?
For me, it’s definitely the very tight community within the company. Not only that the product we are developing is empowering communities, but even by working for Meetup I feel that I am part of a strong community. Everyone is helping each other, from technical problems to more office-related ones. I can’t neglect the other parts of the Meetup community that I love: the weekly Eatups, which are our company-wide lunches where I get to eat alongside with those whom I do not work directly with on a daily basis. And the amazing MeatupstairsBBQ, our weekly barbecue, is another great opportunity to get to know co-workers better while enjoying awesome views of the NYC skyline.
Overall, I am really happy and thankful that I am part of the Meetup community and I want to contribute to it at my full potential!
I’ve always enjoyed pair programming. It’s not for everyone but it definitely helps keep me honest about the code I’m writing, and often makes me vastly more productive than I would be on my own. Unfortunately, it can be hard to pair program when your collaborators live in another city (or country).
Erik Osheim, a software engineer on our data team, shares his remote pair-programming rig.
One of the perks of working for Meetup is that we get a reimbursement for fitness related purchases. I recently used this perk to pick up a wristband activity tracker. One of the unexpected features that came with the wristband’s companion app was an extensive API. I had been meaning to become more familiar with our own API, and this set me to wondering if I could leverage them both in a small project.
After thinking about some practical applications for fitness data I decided on a simple scenario: I am a member of a walking meetup group, and I would like to have my daily step count in my profile. I’d accomplish this by writing a simple shell script that utilized the curl command line tool and run it all on a Raspberry Pi.
(Note: I firmly believe that everyone should have a Raspberry Pi on hand for whimsical side projects).
First I had to get the information I wanted from Jawbone. Using curl to access their API’s /moves endpoint I was able to grab all of my daily activity as JSON. I then ran the results through JQ to isolate the object that contained the daily step count. Once I had the number of steps, I used a stream editor to clean up some unnecessary characters and encoded everything to make it URL friendly.
Now that I had the number of steps ready, I needed a place to put it. I created a dummy group (“The New York Walking Meetup Group”) in our developer environment and gave it a profile question (“How many steps have you taken today?”). I then added a second curl command to the shell script which would update the profile question using the Meetup API’s 2/profile endpoint. I included a little flair to go before and after the step count to make it look nice (“I have taken X steps today!”). Finally, to make sure it updated regularly, I set the script to run every night at 11:55pm.
The result: It works! From my wrist to my Meetup profile with only two APIs and a little ingenuity.

Jeff is a QA Engineer at Meetup
The Meetup API enables outside developers to build tools that help Meetup organizers and members stay connected and form stronger communities. Below is a guest post from one of those builders, nuancedmedia.com
With over 7,000 downloads of the WP Meetup plugin, we at Nuanced Media decided that it was time to take a different approach. Up until version 2.0, the WP Meetup plugin had been fairly unchanged, giving users the ability to post their Meetup events on their WordPress site in the form of a single or multi-month calendar or on various widgets.
The Meetup community has grown since the initial launch of our plugin in 2011, now with 15.81 million members in 196 countries, and we feel that the WP Meetup plugin should grow as well. While most of the great features of the old versions still exist, we at Nuanced Media are focusing on establishing a greater relationship with the Meetup community and evolving the plugin to fit the needs of our users. There are over 42,000 Meetup members talking about WordPress daily according to Meetup’s statistics and we want to hear what all of you have to say.
We are striving to build a plugin that each and every one of you will want to use. In order to do this, we need to hear what features you are looking for and want to see in the future. We want you to have more control, more customization, and more power to make your WordPress website exactly what you want it to be. While having multiple groups displayed on one calendar and being able to replicate that calendar as a sidebar widget are both very neat features, we want to push the envelope even more.
Some additions have already been made. Here are just a few of the enhancements made since the 2.0 release this past December:
Having already heard from many groups, varying from businesses to religious groups to social gatherings, we have been able to witness the great diversity that Meetup has and have enjoyed building these relationships thus far. We don’t want it stop. Visit us at Nuanced Media and let us know what you think of the WP Meetup plugin.
We look forward to getting to know the community that has helped our plugin grow to this point and expanding this community in the future.
It’s been about six months since jquery 2.0 was released. Where previous versions of jquery and jquery mobile seemed too bloated to consider for a mobile site, this release removed legacy browser support and added the ability for custom builds - making it a viable alternative to other smaller libraries. Although it may not be fresh news (we adopted it soon after its release and it’s been blogged about by the BBC), jquery 2.0’s use on mobile sites was still being discussed a few weeks ago at Velocity NY, so I thought it would be useful and relevant to go into some details of how we use it at Meetup.
The switch came after a couple years of using xui.js, a micro library with different builds for different mobile browsers. xui.js covered enough of what we needed it to do at the time and was only 4.2k! A small library not only meant fast loading, but also a small learning curve since there wasn’t much to it.
At the time it was a sane decision, giving us a bit of functionality and small footprint. But as the site evolved and mobile traffic more than doubled, more engineers were needed to share in its development, which meant they also had to read up on its api and limitations. We also noticed that the framework wasn’t being as actively developed as it was when we first adopted it, especially in comparison to libraries like zepto.js. We were outgrowing xui.js.
All of these factors made us start searching for a better, healthier framework. There was the possibility of rolling our own, and we do try to have library-agnostic javascript code for a set of basic functions. However a few things brought us back to opting for jquery.
Part of our framework choice was based on easing development, so that anyone that is accustomed to coding for the full site can write code for the mobile site as well. We also have a goal of sharing code between the sites when we can, so having the same javascript framework (or at least one with a similar api like zepto boasts) means we are able to do this.
No sooner than we started looking closer at zepto (and having some doubts), jquery 2.0 was on the horizon and then BOOM! it was released. That’s when we decided to switch …and it’s proved itself to be the right decision for us. As a side note, Mobilism.nl also happened soon after we converted - John Cleveley from the BBC gave an amazing talk that highlighted their use of jquery 2.0. Needless to say we felt more validated in our decision.
But what about the size? jquery 2.0 has indeed dropped some weight from previous 1.* releases. It was about 29k compressed and gzipped at the time of its release (it’s now at 2.1.0). The awesome feature is that it supports custom builds, which are very easy to do from the command line.
This is what our build command looks like:
grunt -sizzle,-wrap,-event-alias,-effects,-dimensions,-deprecated
And it gives us a library that’s 20k gzipped. Of course, it’s not as small as xui.js was. But it’s also not that big. And we ansychronously load it. We think the extra kb is a good tradeoff for ease of development and code sharing.
From the custom build command, you can see that in addition to the no-brainer of leaving off deprecated code, we decided to not include the sizzle, event-alias and effects modules.
Why did we choose those? By looking at our traffic, we know that almost all of the browsers that come to the mobile site implement querySelectorAll, and we also test for that anyways before loading jquery. We removed event binding aliases, so that just means that instead of saying $("#this").click(...), it needs to be written as $("#this").on("click", ...). Not too much of an inconvenience. We also felt it was a good move to not include the effects module since we are increasingly relying on CSS3 keyframes and transitions for animation.
A final detail is that we are loading the jquery custom build as a bower component from our own bower service, that way any updates or changes to the build can be added and deployed somewhat independently from Meetup features.
Any questions or details I didn’t cover? Holler! I’m @ivy_f on twitter.
At Meetup, we often need to search large amounts of geographic data, such as where our members live or where a Meetup is happening. This data is continually being added to as members join and events are scheduled, and also updated as events happen and move into the past.
We wanted a structure that would allow us to quickly search this data, and that would be able to handle the very dense data that we have in major cities (such as New York). After some research we settled on the R-Tree.
Archery is an immutable R-Tree implementation written for Scala. Someone misheard “R-Tree” ('är\ 'trē\) as “archery” ('är-chə-rē\) and the name stuck.
The R-Tree structure was first described by Antonin Guttman in 1984. Since then, it has been widely used in industry and research. There are many different R-Tree variants, including the more complex R+-Tree and R*-Tree variants.
We had previously been using an open-source R-Tree written in Java. It performed adequately but due to mutable state there were problems with concurrent access and updates. Rather than try to fix this with locking strategies, we decided to design our own.
Our implementation had the following requirements:
Efficiency: We wanted the R-Tree to be able to search millions of points efficiently. We also needed to be able to quickly add and remove points as our data changes. It should also not use an “unreasonable” amount of memory (left fuzzy on purpose).
Immutability: Many different threads needed to be able to work with the same R-Tree (and to be able make changes) without problems. Immutability and structural sharing meant that we could take references to the tree without worrying about who would modify it later.
These requirements (particularly immutability) shaped Archery’s development.
Most developers are familiar with using balanced trees to represent ordered data. The R-Tree generalizes this notion to allow searching of an N-dimensional space (although for our purposes we will treat this as a 2D space, i.e. map). As new entries are added to the tree, it will re-balance itself. This means that it is able to handle the fact that some areas will potentially have millions of points per square mile, while other areas may be very sparse.
Since the R-Tree is somewhat different from a standard tree, it’s important to carefully define the terms that we’ll use to describe Archery’s implementation:
(x,
y).(x, y) and its
upper-right point (x2, y2).These definitions should be pretty straightforward, but since “entry”, “leaf”, and “node” are somewhat overloaded terms, it’s good to be clear about what they mean in this context.
The R-Tree can be thought of as having levels. The top node (i.e. the root node) is at level 1. This node has a bounding box that encompasses every point added to the tree. So, if a user searches an area which is completely outside the root node’s bounding box, there will be no matching entries.
Let’s assume that our tree has three levels. This means that our root node is a branch, its children (at level 2) are leaves, and its grandchildren (at level 3) are entries. The following diagram shows how this arrangement might look:
This root node contains six children (which are leaves), and each of the children contains 7-25 points (which are entries). The diagram actually doesn’t make it clear how many points each leaf contains, since points that appear in an overlapping leaves could be contained in either leaf (but not both). This is an important point: the R-Tree does not guarantee that a node’s children do not overlap.
Let’s imagine we want to find all entries existing in a given box (which we’ll call the “search space”). We can informally describe this via the following rules:
For a given node:
For a given entry:
So starting with the root node, we will recursively build up a list of all results. Ideally, our search space will be much smaller than the bounding box of our root node, and so this process will let us ignore most of the nodes (since their bounding boxes will be entirely outside the search space).
From the previous example, its clear that overlapping nodes can have a huge impact on performance. In the worst case, imagine a situation where each child of a node had the same bounding box as its parent. This node would always have to search all its children, defeating the benefits of the tree structure.
Trees that are unbalanced will also hurt the performance of our search algorithm: if a tree is too narrow and deep (i.e. the branching factor is too low) then all searches will take much longer.
To avoid these situations, the R-Tree uses heuristics when adding and removing nodes to minimize overlap, and to keep the tree balanced.
To add entries to the R-Tree, there are two main steps:
The first step can be thought of as traversing down the tree to the leaves. In each case, we want to find the node whose bounding box already contains the new point to be added. If the point is outside all of these boxes, we will determine which box will gain the least amount of area by expanding to contain the point.
(In this diagram, the red node “B” will gain less area than the blue node “A”.)
Once we’ve found the leaf to add to, we checked to make sure the leaf isn’t already “full”. Archery splits nodes that contain more than 50 children. While splitting nodes is an important part of the balancing strategy, in most cases, we won’t need to split leaves.
Splitting a node means assigning its children to new nodes:
Find the two children whose bounding boxes are the “farthest apart”. These will be our seeds. (See “Smarter seeding heuristics” for more information.)
Create two new nodes, inserting a seed into each.
Add the remaining children to one of the two nodes, using the previous rules to determine which.
Once a node is split, it is removed from its parent and its two halves are added. This can cause the parent to split as well, continuing the process up the tree.
If the root node splits, a new, higher-level root is created containing the two halves of the previous root.
Removing entries from the R-Tree also involves two steps:
Finding the entry is easy (we use the same strategy we do for searching). Once the entry is removed, we want to make sure that the parent node is still viable. Archery considers a node that has fewer than two children to be “non-viable” and will shatter that node.
Shattering a node means removing a node from its parent, taking the orphaned children (if any), and later readding them to the tree. Since a shattered node is removed from its parent, it may also cause its parent to shatter (which will shatter any remaining children it has). After all shattered nodes are removed, all the orphaned entries are readded.
(In this diagram, the lower-right point is removed. This shatters its immediate parent (the green node), its grandparent (the yellow node), and its uncle (the blue-ish node). The uncle’s points are readded, stretching the remaining nodes.)
The important thing to note is that we can only add entries to a tree, so shattering can cause a chain reaction that produces a large collection of entries to be readded.
We’ve been talking about modifying the R-Tree as if it was a mutable data structure. But since immutability was one of our main requirements, we are actually going to return a new tree after every operation. We will rely on structural sharing to minimize the amount of copying that actually takes place.
To power our tree, we’re going to use Vector an immutable data structure with (effectively) constant-time access and update.
Here’s the essential structure of our nodes:
sealed trait Node[A]
case class Branch[A](children: Vector[Node[A]], box: Box) extends Node[A]
case class Leaf[A](children: Vector[Entry[A]], box: Box) extends Node[A]
Any method that wants to modify the tree will need to return new node
instances, rather than modifying them. The two main methods for
“modifying” the tree, insert and remove, are described here. In
both cases, the return value encompasses all the changes that were
made to the node in question (and its descendents).
Here’s the signature of the Node.insert method:
def insert(entry: Entry[A]): Either[Vector[Node[A]], Node[A]]
The return type handles two cases:
Right(node) This is the most common case: we have constructed
a new node (containing entry) to replace this node.
Left(nodes) This case handles the situation where the node has
been split. We’re returning a collection of new nodes to replace
this node (one of which will contain entry).
Instead of encoding these cases in Either we could have just
returned a collection in both cases and checked the length. However,
it’s nice to let the type system help us keep these cases separate,
rather than hoping that we remember to check the length correctly.
And here’s the Node.remove signature:
def remove(entry: Entry[A]): Option[(Joined[Entry[A]], Option[Node[A]])]
This method’s return type is also a bit complicated. The return value breaks down into three cases:
None This is the most common case. It means that the entry was
not found withinin this node (or its descendents).
Some((entries, None)) In this case, the entry was found in this
node (or a descendent of this node), and after removing it, the
node was shattered. So, we are returning a sequence of entries to
be re-added, but no node. Remember that entries might be
relatively large, if many of our descendents have shattered.
Some((entries, Some(node))) The entry was found, but after
removing it this node is still viable. Since some of our
descendents may have shattered, we still return a collection of
entries but also a replacement node.
Recall that the entries to be re-added will be passed all the way
back up the tree. They will be inserted after the tree structure has
been updated from the deletions.
You might be wondering what happens if the root node is split (or
shattered). Who handles that case? The answer is that we have an
RTree class that wraps the root node, and provides wrapper methods
for insert, remove, search, and so on.
Its main job is to handle these cases, creating a new root node. Like
the nodes, it is immutable, so it ensures that all modifications
result in a new copy. It can also hide some of the complexity of the
tree structure (users don’t need to worry about Leaf and Branch
instances).
Here’s the basic prototype:
case class RTree[A](root: Node[A], size: Int) {
def insert(entry: Entry[A]): RTree[A]
def remove(entry: Entry[A]): RTree[A]
def search(space: Box): Seq[Entry[A]]
...
}
There’s a lot left for us to do with Archery:
R-Trees can support storing rectangles, not just points. For the initial version of Archery we’ve stuck with just points, but we plan to add this feature very soon.
There are many additional flavors of search result filtering we could
support. Users might want to provide functions to narrow results, such
as A => Boolean or Entry[A] => Boolean.
We could also generalize search, count, and other methods with
some kind of fold method.
Right now users have to use Archery’s Point, Box, and so on. It
would be nice to make these pluggable via type classes, so that users
with existing geometry objects could be used instead.
This could also make it easier to use Archery to support 3D data.
In addition to using bounding boxes, Archery could potentially support searches and entries with arbitrary polygon data. In these cases, Archery would use the R-Tree for fast bounding box tests, and only use more expensive point-in-polygon and polygon-in-polygon tests on entries that could plausibly be a match.
Right now Archery performs very well for the cases we’re interested
in. But it still allocates a lot of Entry and Point instances, and
will also box primitive types like Int.
There are strategies we could use to reduce the number of allocations necessary.
Archery is using a simple (but relatively effective) “linear” seeding
strategy. This strategy looks for the two bounding boxes with the
largest distance in one dimension. This strategy is fast (O(n)) but
doesn’t always produce optimal results.
There are other strategies (including “quadratic” as well as the more involved strategy that R*-Trees use). These are often a bit more expensive but can produce better results. It would be nice if this strategy was pluggable, or at least if some work was done to determine the optimal strategy for Archery.
In many cases users will have a large collection of points. While archery doesn’t use a special loading/clustering strategy in this case, many exist. It would be nice to implement something like a Hilbert R-Tree for this case.
Meetup has released Archery under the MIT license. This means you are free to use and improve Archery in your own projects. If you make any improvements, feel free to open a pull request to send them back upstream. You can also open an issue to report a bug or request a feature.
For many designers and front-end developers, Android has been an enigma: What do we do about all these different screen sizes? What’s up with those weird hardware buttons? Are there even any design conventions at all?
Our Mobile Design Engineer, John, gave a talk this afternoon answering some of these questions. Check out his slides above or on SpeakerDeck.
Want to help us build the next version of Meetup? We’re hiring engineers on Android, as well as iOS and the web.

For the last several years, Meetup has given a few graduate and undergrad students the opportunity to spend their summers working in the tech world as interns at Meetup HQ. They sit with the rest of the dev team, work on the code base, make improvements, fix bugs, and generally have the same opportunities and responsibilities of any other programmer here (and, yes, we pay them). This summer, our interns were Kathleen Lister, a rising senior at Brown University who focused on backend tasks, and Jillian Munson, a graduate student at Stony Brook University who was working on the front end.
In addition to a variety of smaller projects that Kathleen and Jillian finished this summer, they took it upon themselves to build an entirely new area of the site, which they call MeetupQuest. We’re pretty excited about it, and we’re going to let them walk you through the details of the creation process.
-Duncan Ariey, QA Engineer
Kathleen:
Life at Meetup HQ
MeetupHQ is a place with a mission. Many companies have taglines, goals, and “mission statements”. At Meetup, it’s a mantra. Everyone here is very excited about the prospect of having “a Meetup Everywhere about Most Everything”, and actually believes that Meetup has the potential to make the world a better place. This is what I have been lucky enough to be a part of as an intern at Meetup.
This is the main goal around which everything here is focused, but there are many consistent stumbling blocks in the way. One of these major hurdles is convincing someone sitting curled up with their computer to make the leap and venture into the scary outdoors to meetup with strangers. This fear of the unknown, set against the security and comfort of the same old routine, is a very hard mental block to overcome. A second, smaller stumbling block is that of actually letting people know about Meetups that might interest them. In our three months at Meetup my fellow intern and I spent our due time fixing bugs and the like, but we also got a chance to create a fun product to help overcome these stumbling blocks.
The Intern Project
Our plan was to come up with something that would help provide the extra motivation, the extra kick in the bum needed to get people off of their lonely couches and into the warm arms of new friends at a Meetup. What sort of incentive could we provide? We don’t have a ton of cash to bribe people with, or cars to give away in raffles. Instead, we went with a familiar reward system: points and a leader board. Levels and achievements. Bragging rights. What do all of these things add up to? An RPG. And thus “MeetupQuest: An RPG for the Real World” was born.
We came up with character classes that matched the main categories of Meetup Groups (pets/parenting became “Domestic Diva”, tech/hobbies/games became “Nerd”, etc), and got going. The idea was to create “quests” of randomly chosen Meetups for people to go to and incentivise attendance with points and levels. This random selection of Meetups is intended to expose people to Meetup Groups that they otherwise would not have been aware of. The game itself provides a context to help people overcome the hurdle of actually making it out the door. The game acts as an excuse: a reason to be talking to the strangers.
And so this game evolved. After many design meetings, arguments, and compromises, we arrived at this basic format: you begin by generating a quest. You can choose beginner, medium, or difficult (which simply refer to how tightly packed the Meetups will be), and a character class to which the Meetups should relate. A quest is then generated using these parameters (I’ll go into this later), and the you can choose to either accept the proposed quest or generate a different one. Once you have accepted the quest, you are prompted to rsvp for each Meetup (+3 points), and then attend each Meetup and ask the organizer of the group to confirm you as attended (+10 points). After you return, if you upload a photo you get +3 bonus points. These points go into whichever category each Meetup belongs to, and you level up in a category every 50 points. If you successfully attend all Meetups on a quest, you get +20 bonus points, which are applied to your total score. Our plan is to eventually provide incentives for leveling up (added abilities etc), but for now it’s just bragging rights.
Quest Generation
Implementing this was a huge undertaking. Jill will tell you about the frontend challenges, but as I was a backend engineering intern, I had many unique challenges of my own. I’ll cover a few highlights here, but try not to go into too many gory details. The first of these was figuring out how to generate a quest. I’m not going to go into the details here (if you’re interested, leave a comment!), but the main challenge was achieving a balance between randomness and having a fairly even distribution. There was also the problem of figuring out which Meetups to filter out, and which to allow. I eventually settled on filtering out Meetups with hidden locations (they probably don’t want random people showing up unannounced, right?), Meetups from private groups (same), and Meetups that last more than 7 hours (if the idea is to go to a lot of Meetups, we don’t want to be sending you on a week long cruise). The problem with this is that it still lets some bad eggs through. Some Meetups don’t put an end time, so there are still plenty of week long cruises in the mix that claim to last only 3 hours (the default Meetup duration). Some Meetups are kind of spammy and are promoting $50 tango classes. Some don’t specify a location, and default to their home city of NYC when in fact they are in Italy. The problem is that there is no way to tell the good from the bad on the backend, and I didn’t want to leave out perfectly good Meetups while trying to catch the bad. My solution was to leave this up to the member. I built out a feature which allows a member to get a new quest with only one Meetup swapped out. You give me a questId and the id of a Meetup to get rid of, and I create a new quest with all the Meetups but the marked one, and one of the gaps filled in with a brand new Meetup. (I actually use my original quest generation algorithm with length=1 to get this new Meetup. Pretty efficient, right?) From the member’s perspective, this would look like x-ing out an Meetup that was too expensive, too spammy, too long, or in Italy, and having it replaced by a new (hopefully better) one. This allows the member to tweak their quest if some of these bad eggs get through, or if a time doesn’t work for them, or a Meetup costs too much money.
Databases
I also needed to think about what tables I needed to create in the database. This is a delicate balance between not throwing away useful info, having everything you need easily and quickly accessible, and also not duplicating stuff already stored in the vast existing database. I also had to think ahead and anticipate all of my needs as the project unfolded, something that I almost did, although I’ve had to make two schema changes so far. I wound up with 4 tables: quest, member_quest, quest_action, and quest_event. Two of these were just mappings (quest -> events and member -> quests). The quest table stores info about quests, while the quest_action table stores a history of relevant actions taken by each member, used for calculating scores and tracking progress. Four tables is not too bad.
Scoring
Now I had to start worrying about scores. I decided not to store them in the database to give our scoring system more flexibility, so I had to calculate them on the fly. This was simple enough for an individual’s scores – I just calculated them based on a history of actions that had been recorded, but when it came to highscores it got a bit more complicated. I didn’t want to recalculate EVERYONE’s scores every time someone viewed the highscores page. So, I had to cache them somehow, but also make sure that the person viewing the page had their scores up to date in the list, if they made the cut. I solved this by storing top scores in each category in redis, and updating this each time individual scores were calculated in order to show each member completely up to date information about themselves, and almost up to date info about everyone else. The rest of the high scores are recalculated on a nightly basis (I’ll get into this later).
1000 Little Problems
In addition to these big problems, I also had a thousand little problems to deal with. For instance, how can each quest have a snazzy, consistent name if we aren’t storing names in the database? How do we recycle old quests without showing people the same stuff over and over? How should we divide the Meetups up by category? To solve the naming problem, I decided to generate the names on the fly. I came up with a list of nouns and adjectives for each category to be put into the format “The Quest Of The <adjective> <noun>”. I started choosing them at random based on a random number generated using the quest_id as a seed. This means that although they are regenerated each time, the name will remain the same for each individual quest as long as the list of words don’t change, because the same index will be chosen “randomly” each time. I solved the recycling quests problem by reusing quests that match the inputs in the request, and are close enough in dates, but caching quests to exclude from this in memcache, so that in a single session the member does get some pre-generated quests, but never the same one twice, and new quests begin being generated once the old ones run out.
Nightly Job
Now, I had a problem. Because we wanted to have a full quest object, complete with a name (quest_id) and a list of events, on the front end after quest generation, each newly generated quest was actually being stored in the database. This is fine, except that many of the quests are never used, and this creates a lot of clutter. I solved this problem by writing a nightly job to delete quests from the database that are not associated with any member. In this same nightly job I also recalculate all of the high scores (I told you I would get back to this!), mark past quests as past, and figure out whether or not anyone has flaked from an event (if they rsvp’d and have not been confirmed) for scoring purposes.
Thinking Ahead
Throughout all of this I had to learn to think about communicating with the front end. I built several internal objects on the back end strictly for storing data in a way that was accessible on the front end, and that fit that use case well. Also, because of the different pace at which the frontend and backend move, I had to constantly be thinking ahead on features. I had to start thinking about how to build a backend that anticipates the frontend needs. For instance, as the current manner of taking attendance on the site is somewhat lacking, we had talked about building our own attendance tool for organizers to verify that people actually attend the Meetups they are signed up for. When I had a minute, I built out this internal attendance tool on the backend, and attempted to anticipate the format of the data that would make it easiest to build out the front end later. I’m not sure if I succeeded, but thinking in this way is something that I have had to learn to do while working on this project. The attendance tool should be launching hot on the heels of MeetupQuest, to improve the member experience.
Design Decisions
These are just a few of the things that I had to think about, but I am really running out of space, so the rest will have to wait. Aside from these engineering challenges, the other main challenge was making design decisions. This was apparent all along, but really hit us when we went into usability testing. Here it became clear that things that seemed perfectly simple and logical to us didn’t make sense at all to the outside world. For instance, on the quest generation page many of the members who we tested with were very unclear on what was going on. They weren’t sure of what they were seeing, or how to use the quest generation tool, or whether or not they were already signed up for this quest. Some weren’t even clear on what the list of Meetups was a list of, thinking perhaps these would be online events rather than events in the real world. Using this feedback, we have iterated and improved some, but we still have a long way to go.
In Conclusion
Throughout this process, I have learned an awful lot. This internship gave me the chance to work with the Meetup code base, and feel my way around to begin to understand how everything works. The process of building MeetupQuest also taught me very valuable lessons in scalability, teamwork, the role of a back end engineer, planning ahead, and making design decisions, in addition to exposing me to several new technologies.

Jillian:
Previous intern projects I had been a part of were mainly focused on enhancing existing platform features or working on things that interacted solely with the back-end. On this project, I was the sole person responsible for creating a whole new set of pages and user interactions for MeetupQuest using technologies that I had only basic familiarity with from messing around on side projects or small pieces of larger school assignments. The challenge of building the front-end for MeetupQuest was overwhelming in the best case.
Building a simple app for taking attendance and tracking points sounds easy easy enough, but the funny thing I learned about front-end development is that unlike traditional stand-alone applications, your job is to send some data to any number of potential environments, screen resolutions, etc. and hope that everything not only works but looks nice as well (I’m looking at you, IE8 users). Oh, and everything should feel responsive to the end user (because making liberal use of loading graphics is lame).
From Server to Client and Back Again
One of the first things we had to get right before working on MeetupQuest was the interaction between the client and server. This is probably one of the easiest things to get right when you’re building an application from scratch, but when you’re adding on to an existing codebase you want to make sure you’re not adding a line of code in a file that literally breaks the entire thing.
Meetup uses mod_rewrite to convert URL patterns into paths pointing to the appropriate service. Once we created a custom rule using regular expressions that successfully converted meetup.com/quest into the actual path to the application, we had to modify the Struts dispatcher to point the request to the right Servlet, pull objects from the database, convert those to Java objects, and pass those along in a redirect to the appropriate JSP. Luckily for us, the problem of converting raw DB objects into POJOs had been solved a long time ago at Meetup.
We had our ‘hello world’ jsp and relative path that was able to render some back-end data in a response on the client-side. We still had a long way to go.
Javascript, jQuery, and Managing Scope with the Module Pattern
In order to take the idea from static HTML page to full-blown application, we needed event handlers and state. I had some basic familiarity with jQuery, in that I could select DOM elements and write AJAX callbacks but nothing too sophisticated. The first iteration of Javascript files for MeetupQuest were inefficient at best and impossible to maintain at worst. All of the event handlers were declared each time the page was loaded, duplicate selectors everywhere, etc. For the initial prototype that we presented, this would have to suffice but about halfway through the summer I decided to refactor all of the code before making any more progress.
One of the cool things I learned about was the jQuery event delegator function .on(). Instead of adding .click() to elements once they were added to the DOM and testing for them on page ready, I could declare all of my event handlers as $(document).on( event, element, function(){}) on the initial page load instead of doing so on $(document).ready(). The .on() function waits until these elements are added to the DOM and then registers the event handler.
Another major change I made was to rewrite the entire thing as a module. There are some great articles on the module pattern and how it helps you manage variable scope, but the existing codebase was my greatest resource in this regard. The main site already has a global Meetup object initialized, so adding a module that extended the existing prototype was incredibly easy.
The module ended up being a better idea than I had originally anticipated. Among other things, it allowed me to maintain private variables that were accessible to each of my private callback functions but inaccessible outside of the module. This was insanely useful for many things, such as storing cross-request query parameters.
Complex Interactions using JSPs and Custom Tags
A long time ago, JSP libraries probably contained all of the functionality that you could ever want for generating dynamic HTML server-side. At Meetup, I have seen things done with JSP custom tags that I seriously never even imagined possible. I won’t go into all of them (just know that there’s an entire tag library dedicated to populating Mustache templates with Python scripts – I’m just going to assume that they work something like Django templates that render HTML within JSPs and leave it at that ), but it was cool to see just how extensible the JSP tag library is and how it could really reduce code redundancy as well as help you avoid using hideous scriptlets all over the place to do more complex data manipulation.
For MeetupQuest, I made liberal use of the <web:ajax> tag, which allows you to return an HTML fragment to the client by placing the content between <web: ajax> tags and giving it a unique key. By making a request of the form /?__fragment=(key), the server would return you the content as HTML, which was then super easy to render client-side in a success callback. The major benefit of this was that I could render different views based on some complex state (is the user an organizer? Does the user own this quest? etc.) without having to write different JSPs for each one.
Code Review and Usability Testing
It would be one thing if we just had to make MeetupQuest in isolation with no thought to potential end-users outside of Meetup HQ. Half of the learning experience was having to code for a production environment, which meant supporting all of the major browsers and getting user feedback on our project. Towards the end of the summer we were able to experience the ups and downs of code review, a peer-review tool that allows other Meetup devs to look through your code and make comments. The project had to pass this step in order to make it into QA testing, but it was actually less stressful and more just really helpful as well as a great opportunity to identify potential problem areas before QA did.
While the project was in code review, we were also getting feedback from usability testing. It was incredibly entertaining and educational to see how real users of the Meetup platform reacted to our project. I think one user was actually afraid that we were planning to replace the main site feature with our Quest Generating tool (Brenna did an awesome job of reassuring them that this was definitely not the case). This step was also incredibly helpful because it really forced me to re-evaluate design decisions from a usability perspective. Just because something is logical does not mean it is necessarily intuitive (this is something that is going to pain a lot of CS majors, but it is the absolute truth for the majority of users).
As we get ready to unleash MeetupQuest on the world and I look back on all of those weird bugs and technical challenges that we faced (“why is this working in IE8 but not IE9 compatibility mode?!”), I’m also trying to take stock of all of the things I learned along the way but in the end the only thing I feel confident in saying is that I learned how to learn from the incredibly talented team of people that supported us the whole way through this crazy ambitious project.
If you’re interested in what we’re doing at Meetup, join us for our new series of Tech Talks, starting with the NSHispster Pub Quiz on July 30.
Hosted at Meetup’s offices in SoHo, Tech Talks at Meetup will focus on topics of interest for software engineers, mobile developers, QA engineers, or anyone else who writes code. Join us for a talk followed by beers with engineers!
Talks will cover a wide range of topics, but they will be technical. If you’re not an engineer or have limited tech knowledge, this isn’t the group for you.
One of our trusty backend services developed a file descriptor leak a few months back. Every few days it would hit the process’s generous limit and fall over.
We looked and searched and searched for the bug. Part of the difficulty is that we didn’t have the best process monitoring (+ recording!) set up beforehand, so it wasn’t as easy as it should have been to identify exactly when the bug was introduced. So we read and re-read all the code changes to the affected service. And tried changing lots of stuff. None of it helped!
One thing that did happen around the time the problem started is we upgraded to Scala 2.10 – there’s a post about that! The older Scala actors library that we were still using was now deprecated, but we saw no immediate problems and left that migration as a future project.
But lacking any better ideas for fixing the file descriptor leak we decided to go ahead and migrate to the newer actors library – then we realized we didn’t need actors for this service at all. So instead we just removed the deprecated actors library. And then this happened.

Bliss.
This is my third year doing user research at Meetup, and I can now say that usability testing is a way of life here. If I duck into a product meeting at HQ, I’m likely to hear “members didn’t see that in usability” or “that copy confused some of the Organizers we had in this week.” Walking through our office in the afternoon, I’ll spot developers in headphones, leaning in to watch an unseen member interact with their project on a GoToMeeting viewer screen. There is never a question as to whether a product or feature should be tested… the only question is “how soon can we fit this in?”
Here’s how we do it:
Test early and often
If you build something people will see when browsing Meetup, it goes through usability. We’ll test it at any stage - the earlier the better - and after every iteration.
Test anything
We’ll test anything that comes our way from anyone at Meetup HQ. Sketch on a notepad? Yes. Rough mockup? Sure thing. Clickable prototype? You got it. We’ve even asked testers to try out other apps, just to see how they use them.
Drop in anytime…
We schedule sessions every Tuesday through Friday, so projects can be tested whenever they’re ready. We’ll also bring in a variety of testers (members, Organizers and folks new to the site) to simulate a wide range of usability situations.
Broadcast sessions
If you have a laptop and internet connection, you can watch usability sessions at Meetup HQ via GoToMeeting. Observers can IM questions to the moderator anytime during the test.
Discussion and documentation
Our moderator talks with teams between tests and at the end of the day to share observations. Based on these discussions, there may be a new version of the product to test the next time around.
Stay tuned for more posts on how usability works at Meetup!
We upgraded from Scala 2.9.1-1 to 2.10.0 and it made some stuff faster.

@softprops did the 2.10 upgrade in a branch a few weeks back with the minimal code changes it required. We were surprised at the time to see some improvements in our benchmarks. I was eager to see if those translated into measurable gains in actual performance.
The chart shows 24 hours of worst response times for one of Meetup’s backend services that uses Scala. Mostly, it operates on huge immutable collections. Last week’s timings under the Scala 2.9 regime are in purple, and this week’s timings under Scala 2.10 are in green. Week to week the request volume is basically the same.
So we’re seeing some nice improvements in performance from a painless upgrade. (In fact, a very pain-reducing upgrade, for Unfiltered routing.)
Thanks to all involved for the solid Scala 2.10 release.

2105. The number of charts that one of Meetup’s two data analysts generated during the course of 2012.
Of course, volume isn’t everything. Sometimes it takes over a week of work to gather the data for a single chart, and a single chart can change the direction of a company. But it does show the sheer number of questions the Strategy Team gets asked during the day-to-day as we work to understand how people are using Meetup so that we can design and make Meetup better.
The Strategy Team here at Meetup is responsible for providing research and insight about Meetup as a whole to the entire company. From the community team to the dev team, finance/accounting to the board of directors, the small team of 4 strives to provide the information necessary to make smart decisions. When our two user experience (UX) researchers tallied up their work in 2012, they found out they ran hundreds of usability sessions, and a bunch of surveys. (But that’s a blog post for another day.)
For the two data analysts at Meetup, communicating insights is often easier visually, so a huge number of charts are created as insights both large and small are shared. Seeing what the UX team put together, one Meetup analyst decided to count how many charts he created in 2012.
What sort of charts and insights got shared in 2012? Stuff like this:
Monthly status updates, analytical models, board meetings, etc. Making the bulk of the volume, these are semi-automated with little hand-formatting details, and happen regularly - causing the regular jumps in the chart of charts. Here’s the monthly number of Unique RSVPers that go to Meetups every month since 2006.. Dotted lines are backfilled data, which are estimates.

Ad-hoc stuff, for the random questions that come up every day. 497 of these were created in 2012. Here we had recently launched the ability for private groups to display some of their Meetup information, hopefully so that they can get more members to join. We were checking the various adoption levels by group category:

99% of this particular analyst’s charts were finalized in Excel so a script was quickly hacked together in Python to crawl his hard drive, find files that were dated in 2012, open each one in and count the # of chart objects inside. Sadly, sequentially opening ~1.8GB of excel files is a bit slow.
Code
For the curious, the actual python code used to do the chart counting is here.
The Data team here at Meetup is working on some really neat stuff to improve our Meetup Group recommendation engine.
Currently, our algorithm for suggesting you Meetup Groups is rather basic. It looks at all of the Meetups within a certain radius of you that also have the same topics and then takes out the Meetups that don’t match your age or gender. This topic-centric approach really isn’t predicting anything, let alone taking advantage of the numerous other indicative factors that go into a good Meetup suggestion.
We thought it would be fun (and useful) to make our recommendation engine smarter using a model based approach.
Some Background
In machine learning, this type of problem can be classified as one of supervised learning. In other words, we can phrase the problem as the following: given this member X, would some Meetup Y be interesting enough for X to join - yes or no?
While there are many fancy supervised learning algorithms out there, we chose to use the simpler logistic regression to get our feet wet. Logistic regression is really similar to linear regression, but the output is conveniently between 0 and 1 which makes it really useful when you only want binary results. This number can be interpreted as the probability member X joins some Meetup Y. In our case, 1 (or anything close to 1) is yes and 0 (or close to 0) is no - perfect.
Our New Model
For our Alpha Model, we chose to include a very limited set of features (aka quantifiable characteristics we are looking to incorporate into our predictive model). They are:
The numbers in the parentheses are the feature weights computed as a side-effect of training our model using logistic regression. These weight values make intuitive sense because for example, having a high number of topic matches with Meetups will contribute positively (a signal that you are more likely to have an interest in the content of the Meetup). Not being the same gender specification as the Meetup (aka an “unmatch”) correlates negatively to the likelihood of you joining.
While these results look great, the real challenge comes when trying to implement this model in production where results have to be served on the fly and at scale. Take our worse case scenario for example, when serving recommendations for a person in New York City where there are approximately 700,000 members on Meetup and nearly 20,000 Meetup Groups. Since recommendations are calculated on a pairwise per member per Meetup basis, that’s nearly (700,000 x 20,000) 14 million combinations!
Even if we are calculating recommendations for one person in NYC, that’s still 20,000 Meetups to go through. If each Meetup took even 1 millisecond to compute, that’s still 20 seconds. Can you imagine waiting 20 seconds for a web page to load? Our recommendations could be 100% accurate but no one would ever see them because people would simply get impatient and browse away within those 20 seconds.
Obviously, whatever we decided to do, this had to be fast.
Engineering Optimizations
Given the amount of computation, there were several engineering decisions we made to maximize speed. Since many of the feature calculations required going to the database, and database queries are slow, we preloaded most of the data we needed into memory. To avoid calculating a probability for every Meetup in the world, we use an R-Tree (http://en.wikipedia.org/wiki/R-tree) to quickly narrow down the Meetups to those close to the member.
The second optimization we made was to parallelize any and every possible computation possible. This worked out rather well because we are using Scala for some of the backend implementation. Scala makes parallelizing certain collection operations like map and filter ridiculously easy. Simply adding “.par” to a list object will do the trick.
To our pleasant surprise, the mean fetch times are a blazing 70ms!! Not too shabby at all.
Next Steps
We’ll be launching our new recommendations sometime in January. In the meantime, we’ll be looking to improve our model by adding additional features such as Meetup friends, second degree Facebook friends, and other metrics that suggest a Meetup’s quality.
With the augmented infrastructure, we’ve also set ourselves up nicely to tackle other types of recommendations such as events and topics.
Lessons Learned
While the benefits of using data to power decisions and product features are certainly well-appreciated, it is easy to get caught up in the implementation details and engineering challenges that arise. What’s important is taking a step back to verify whether the produced results make sense. The seemingly smaller decisions such as dealing with missing data or uneven number of positive and negative labels can ultimately have a profound impact on how the results turn out. Being able to catch these discrepancies and properly interpret the results requires thorough understanding of not only the algorithm themselves, but also the nature of the data, and how it is used in modelling.
Take a look for yourself here!
Ever wonder how much Meetup members are spending on Meetup-related activity every year? Meetup’s Strategy Team did.
We know that tons of Meetups happen every day in bars, cafes, restaurants, theaters, etc. Then there’s the play dates, running meets, parties, workshops, conferences, and everything in between. How can we get a rough estimate of all that activity for over 2 Million RSVPs and over 330k Meetups a month?
The team took a couple of hours from our day-to-day research projects to tackle this Fermi problem, splitting into 2 teams with different strategies.
Strategy 1: Measure what we have data for, sample the rest and extrapolate.
This team consisted of our lead UX researcher, Anna, and our data analyst, Chris.
Chris ran through the data we had about any actual transactions recorded on Meetup’s systems for recent RSVPs. Meanwhile, Anna sampled a few hundred recent Meetups to try to get a sense of the average amount of money a single attendee would wind up spending. The range was very wide, from free to hundreds of dollars.
In the end, their answer was roughly $14 Million a month overall, and they observed an average of about $9 per RSVP was spent by members across all the events sampled.
Strategy 2: Make some assumptions about our data and see where that takes us. (With a dash of language processing fun)
This team consisted of our data analyst Randy and a big pot of tea.
Let’s assume that when members go to bars, restaurants, and golf courses, the words in the name of a place give us a hint as to what they’re doing and how much they might be spending.
At the same time, some organizers charge fees for their Meetups. Orgs can charge whatever they want for any reason, but let’s assume that most of whatever is charged goes to being spent on making the meetup happen (space rental fees, costs of the activity, etc).
When we associate the words from the name of the meetup location with the median prices charged by various groups going to those places, you get a rough price list that’s surprisingly believable, for example:
In our Android app, we’ve recently launched notifications for new photos and comments in your Meetups, so you can be immediately notified about new activity:

We, of course, want to give our Members control over which notifications they receive and on which devices. In addition to an in-app settings screen, we also let you control your notification settings from our website:

However, there’s a problem: the device names reported by Android can be distinctly unfriendly. Although the documentation for Android’s Build.MODEL field promises an “end-user-visible name for the end product,” many manufacturers use random-looking strings of letters and digits for their model names. When our user experience researcher couldn’t figure out that "ADR6300” referred to her own Droid Incredible, we knew we had to do something.
So, we compiled a list of the 100 most common device models among our users, and researched what actual human beings might call those devices. Then, we wrote a little bit of code (which will launch soon) to use these friendly device names in place of the opaque Build.MODEL values:

However, we don’t want you to have to waste your time googling the same device names, so we’re releasing our data on GitHub for you to use. We’ll try to keep this updated as more devices come out, but of course we can’t make any promises. Feel free to fork the code, send us pull requests if you have any, and otherwise enjoy. Check it out!
At Meetup we stare at a lot of numbers.
There are daily metrics generated that track the number of Meetup scheduled, the number of new members, number of new groups, rsvps, site traffic, etc. etc. etc. In the wee dark hours of every Monday morning, a daemon wakes up and start fetching, sorting, and mashing up numbers and charts about everything our members have been doing the previous week. A few hours later, after I have silenced my iPhone’s annoying wakeup alarm, I am staring at them with bleary eyes, before I even climb out of bed. Sometimes I can be a numbers junkie.
One nice thing about working on our Mobile Apps (iPhone and Android) is we have seen nothing but continued positive growth. So the report is usually a nice emotional boost that it may just be worth it to get out of bed again. People are using what we do!
And the Monday reports are the most important for the iPhone and Android Apps, because the weekend represents our busiest days of the week. There are more App users on Fridays, Saturdays, and Sundays than every other day of the week. This is also when people tend to be away from their computer.
July looks like our first month to pass 400k unique devices in use. This number has also grown 70% in just 6 months.
So most typical Mondays we get the same good news: More devices! More members! More members using apps!
So what really wakes me up - are “bad mondays” - Mondays where mysteriously thousands of members just disappeared from the previous weekend.
Where did they all go?
Our last big “weekend” dip was the 2nd weekend in May. (May 12-13th). We lost about 10% of members from the weekend before. It wasn’t until after breakfast that I realized that most of those people probably went to visit their mother. (Mother’s Day was May 13).
So yesterday, we saw a “smaller” dip for this past weekend. Almost 4-5k Mobile App members disappeared from the previous week.
What could just keep all those people home?
Then I remembered that I had stayed home all weekend, and didn’t venture out to any of the cool Meetups near me either. Why?
I was glued watching this:

And this:

Considering that over 3 billion people are gonna spend some time watching the Olympics, I guess it’s only natural for a few to skip their local Meetups.
Although I find comfort in the fact that while the largest televised sporting event in history has momentarily distracted a few of our members, Mother’s Day kicks the Olympics’ ass.
Developing large scale web applications requires having the right set of tools. As an intern at Meetup, some of my tasks involve building tools to streamline development. For the past few months we’ve been hard at work improving our internal development tools. One particular tool, Meetup’s internal development toolbar, affectionately dubbed the “dev bar” (Can someone say new trendy bar in Williamsburg?), enables developers to view key site details while testing on the site.

The dev bar’s “Attributes” window prior to its redesign
The dev bar was long overdue for some much needed TLC, and boy did it receive it. A much-needed cosmetic overhaul brings the dev bar to design parity with the rest of the site. The new design eschews the “Web 1.0” underpinnings of the original, in favor of a neutral and non-confrontational design.
In addition to streamlining the design of the dev bar, the attributes window received cosmetic and technical overhauls during the redesign. The old “Attributes” window (pictured above) listed many of the site’s important run time attributes. In order to see the value of a particular attribute, developers were required to click a link that would jump to the attribute and its value further down in the window.

A sample jump
With the new design pictured below, the old work flow was completely turned on its head. Now, rather than having to mine through the attributes in the window sequentially, developers can use the newly implemented search bar to search to pinpoint the attributes they need. The search is implemented using the same string ranking algorithm employed by the Mac power-user favorite, Quicksilver (code available here).

The new “Attributes” window

The new “attributes” window with a query and attribute selected.
Ultimately, the revamp of the dev bar means that we can work smarter, faster, and more confidently while maintaining Meetup’s current features and while crafting its great new ones.
Meetup HQ is hosting the the first ever cross-language hackathon tournament in NYC this summer. JavaScript, PHP and Python/Ruby developers and several local tech Meetups are duking it out in the Battle of the Braces to win the title of best developer, and to bring eternal glory to their…
There’s no better office to hack in, we can assure you.
The Android Support Library brings some very useful tools to the Android developer’s toolbox: Loaders allow for easy loading of data, automatically handling notifications of data changes and background threading, and the ViewPager makes an easy way for the user to swipe among views.
It’s logical to want to be able to combine these two tools if you have a large set of data. In the Meetup app, we currently use this combination to allow the user to swipe among photos of a Meetup, and we’ll be using it in other places in the future.

Unfortuately, however, it’s not obvious how to easily bridge these two concepts.
The ideal solution should meet some basic requirements: we want to be able to create our ViewPager and assign a PagerAdapter to it when we create our Activity, but the Cursor containing our data will only be available asynchronously when the Loader completes. The PagerAdapter should also take care of automatically pulling our data out of the Cursor and creating the Fragments for us.
For a ListView, this is an extremely common pattern, and the support library’s CursorAdapter (and its subclasses) take care of everything for us.
Fortunately, however, the solution turns out to be relatively simple to implement:
Using the code is quite straightforward. Perhaps the most complicated part is instantiating the adapter. In addition to the FragmentManager and initial Cursor (which is usually null), the constructor also takes the Class object for the type of Fragment you wish to create, and the projection you passed to your CursorLoader. The projection will be used to automatically fill in your Fragment’s arguments with the data from the Cursor.
Assign an instance of CursorPagerAdapter to your ViewPager, and it will take care of Fragment creation and initialization for you. In your onLoadFinished() method, just call swapCursor() with the newly returned cursor — just like with a ListAdapter! — and everything will be taken care of for you.
We are evolving our Meetup’s user interface aggressively, and there will be an awesome update soon for some product. But today, I’d like to introduce the bi-products of it, the two new jQuery plugins.
The importance of visual design is getting more and more in the web world nowadays, and there is definitely a trend of making same-x/varying-y layout. I have tried some of the existing library on the internet, but I figured that won’t suffice our need. So I built one for us.
It is taking the necessarily information from the applied DOM elements accordingly. So as long as you have a good structure, it works as simple as follows:
$(".PARENT-SELECTOR").paving(OPTIONS);
And for making this jQuery.paving() happened, I also need an image loading function. So I made it too.
Both of the plugins are used in the production Meetup site already. If you have a chance to take a look at it, please give me a feedback on github: jQuery.paving() and jQuery.imageloader()
As you might have noticed, we send a lot of email at Meetup. Currently we’re working on sending fewer, but more relevant emails – and making them look nicer while we’re at it.
Making email templates these days is sort of like making web pages in 1999. Here are some tips to ease the pain.
Chart of Shame
This chart is your friend. New versions of Microsoft Outlook are by far the worst offenders, but even if you accept that things might not look pixel perfect in Outlook, there are still a fair number of quirks to deal with.
Inline Styles
A few email clients don’t support linking to external stylesheets, but GMail doesn’t support adding things in a <style> tag at all. So if you want something to be consistent across clients, you’ll have to add it in an inline style attribute on each element. This is a huge pain.
Meetup has been using Apache’s Velocity templating language to author emails for a while. While velocity has its own set of quirks, it does have macros. We use these to abstract out common styling and email interface elements.
So, every
<a style="color:#06c;text-decoration:none;">
becomes:
<a style="#s_link()">,
and every button (which have a ton of inline styling) becomes:
#button([button text] [link])
CSS Media Queries to the rescue (sort of)
If you want to display information differently depending on the device, CSS Media queries are supported by a lot of the most popular smart phones.
They aren’t supported by GMail for iPhone/Android or blackberry, and support is buggy in older versions of android mail client.
What about floats?
What if we want to have some content in our email display next to each other in larger screens, but move to one column when viewing on a mobile phone?
CSS Media Queries could be a good option, but support is a bit shaky.
We can do something like this (depending on other styling you’ve got going on, you will probably need to adjust width and min-width):
<div style="float:left;width:50%;min-width:320px;">left content</div> <div style="float:left;width:50%;min-width:320px;">right content</div>
Min-width isn’t supported in some webmail clients, but that’s ok since we really only care about that for mobile email clients (which all support it).
This doesn’t work quite right out Outlook 2007/2010 since it doesn’t support floats. Luckily, it doesn’t support widths on <div>’s either… So while the content doesn’t line up next to each other, it still looks decent.
Padding and Margins
I can’t believe we have to talk about this, but we do. Outlook 2007/2010 doesn’t support padding or margin on any element that isn’t a table cell.
So, how can we fix this?
We’re willing to let Outlook look a bit different than other email clients, but padding and margin are essential to separating out content. If we move everything back to tables, we can’t do some of the stuff we talked about above.
Borders to the rescue
We can use borders that are the same background color as the containing box to simulate element padding, like so:
<div style="border-bottom:10px solid #fff;">Hey, I have bottom padding in every email client!</div>
This is definitely a hack, but it works pretty well. A few things to note:
At Meetup, we’ve abstracted this out into a Velocity macro:
#s_box([top] [right] [bottom] [left] [color])
Those are the techniques we use most often. You can’t expect email clients to behave like a modern web browser, but you can trick them.
At Meetup, we use StatsD and Graphite to track, well, almost everything. Critical user interactions like logins and RSVPs, as well as system errors and hits to our API.
We’ve also built our own custom dashboard that tracks aggregate user stats as well as the status of bugs and product stories. In short, we’re tracking all sorts of critical information, and making it easy to view and digest.

I recently realized that we were missing a key metric. During the last internal hackathon, I created curseMetrics, which analyzes our repository for instances of profanity.
The script aggregates curses by name, by person, and by year. From this we can tell what our favorite curse is (“crap”), our most prolific curser (Will Howard), and our most curse-worthy year (2012).

There are some features on Meetup that, while valuable, are enhancements to the core experience. We wouldn’t want these sometimes memory- and processor-intensive features to prevent someone from doing something as important as RSVPing to a Meetup. Because of this, these features have been implemented using internal HTTP services which we query asynchronously. Although we’ve managed to make these services really fast most of the time, an asynchronous query is important to making sure the site stays responsive.
To that end, we’ve been using the AsyncHttpClient to query these services, and it works great. We try to maximize asynchrony in the typical way, by making our requests to the internal service as early as possible and using the results as late as possible. But those results typically require further processing before display; as a simple example, a service may return a list of event id numbers as a JSON string. That string needs to be parsed, the JSON deserialized, and then the actual event records need to be fetched from the database.
We want to make using these services as simple as possible for other engineers, but trying to encapsulate all of that logic for the final result can run contrary to separating the request and processing by as much time as possible. Luckily, we’re also big fans of Google’s Guava library, which provides the perfect solution in the form of Futures.transform() It uses ListenableFutures, and the AsyncHttpClient uses ListenableFutures, so no problem, right?
Not so fast. ListenableFutures aren’t a standard Java class, and so both AsyncHttpClient and Guava have their own implementations of very similar interfaces. As far as Java is concerned, those types just aren’t compatible.
The solution also lies in the Guava library in the form of the ForwardingFuture. This allows us to split the difference between the two ListenableFuture implementations:
static class FutureWrapper<V> extends ForwardingFuture<V> implements ListenableFuture<V> {
private com.ning.http.client.ListenableFuture<V> delegate;
public FutureWrapper( com.ning.http.client.ListenableFuture<V> delegate ) {
this.delegate = delegate;
}
@Override
public void addListener( Runnable listener, Executor executor ) {
delegate.addListener( listener, executor );
}
@Override
protected Future<V> delegate() {
return delegate;
}
}
We already have a MeetupFuture wrapper class that we use in all of these instances to handle things like timeouts in a unified way, so we made that class automatically perform this transformation when wrapping a com.ning.http.client.ListenableFuture. The result is well-performing, highly asynchronous code that’s simple to use.
At Meetup not only are we always improving our products, we are also constantly working to improve our work process. One change we’re experimenting with is having almost all commits reviewed. In the past having your code reviewed was something you did when you felt it was necessary. Unsurprisingly, there were not so many code reviews (CRs) happening. Me writing buggy code? Impossible!
Some of the first questions that come up when you decide to do more code reviews are: Who gets reviewed? Who does the reviewing? Our answer to both questions is “everyone.” Simply put, we could all use a second pair of eyes.
Many people think code reviews are simply about finding bugs, but we think they have a couple of other benefits. First off, we expose people to areas of the code with which they may not be familiar. The other perhaps unintuitive benefit is that code reviews are an organic way of spreading best practices. For instance, while a more junior developer is reviewing the code of a more experienced developer they may or may not find bugs, but they will see how someone with more experience would tackle a problem. I’m of the opinion that reading lots of code helps make you a better developer.
So what does our process look like? Honestly, it’s not that different from before.
Here’s roughly what our old bug fixing process looked like:
Here’s what the “new” process looks like:
As you can see, not much of a difference.
One of our main requirements was that requesting code reviews and doing them be as frictionless as possible. If requesting a code review involved tons of steps or was otherwise a pain developers would grumble. The system we ended up settling on uses an in-house script coupled with the code review software Reviewboard (http://www.reviewboard.org/).
The in-house script was something that we already used called fix.py. It allows a developer to mark their bug fixed from the command line. No trip to Bugzilla, Yay! In your bug branch you run “fix.py” and it does some merging, a couple checks and then marks your bug as fixed. Since people were used to using fix.py already we simply added a “–cr” option which would — in addition to doing all the previous stuff — submit a review request to Reviewboard. Once again, no need to leave the command line.
When a review request is submitted all the reviewers get an email and anyone is free to claim the review request. If things look ok the reviewer marks the bug as “fixed” and the changes are ready to enter QA.
We’ve been using this system for a couple months and are happy to report that it’s working. We’re getting more eyes on code changes without slowing the release process.
We’ve been making awesome meetups happen since the days of the mechanical scroll-wheel iPod, which means that some of our code has also been around for nearly a decade. That’s a long time in code years, and with the rate at which web technology progresses, it can admittedly be a bit difficult to deal with the magic bullets of yesteryear still physically living in our code base. We refactor and rewrite where appropriate, but the core technologies we started with tend to stay firmly in place.
Luckily for us, much of the technology we originally chose remains relevant thanks to the continued popularity of the JVM. Our backend code is written in Java, and we use JSP as our templating engine. Since JSP syntax is easily extendable via tag libraries, and since JSPs just compile to Java classes, this opens up some interesting possibilities to mix the old with the new.
In the web world, one of the biggest changes of the past decade has been the rise of Javascript. Browser-side Javascript now frequently does much of the heavy lifting once reserved for backend langauges. Of course, unless you’re writing your application purely in Javascript, that means you’re now plugging in solutions for the same problems on the front-end that you already solved with various patterns on the back-end - but in a different language. Gross, right?
One place with the most offensive overlap is templating: as mentioned earlier, we use JSP on the backend to render HTML. A couple of years ago, we introduced Mustache to handle templating from within Javascript. Mustache has been great — it solves the problem of dynamically generating markup extremely well, and its “logic-less” philosophy means you really do get an effective separation of concerns. The downside? You probably guessed it: for common UI elements, we found ourselves implementing the template in JSP for the backend to render it, and again in Mustache for the front-end.
This is where the flexibility of a lightweight solution like Mustache saves us, especially when coupled with the fact that the JVM continues to be home to some of the best libraries found anywhere. The question of “I wonder if we can render Mustache templates from within our JSPs” was quickly answered by a Google search yielding the aptly-named mustache.java.
The missing pieces? We don’t want to render entire pages as Mustache — we really just want to be able to reuse the most common UI elements within both JSPs and Javascript. So our requirements were:
So we wrote a taglib that we can place in our JSPs. Here’s an example:
<mustache:interpolate filepath="path/to/some/file.js" key="Meetup.Templates[lma.lma_when.edit]">
<mustache:param name="mustache" value="Mustache logic-less templates" />
<mustache:param name="eventdate" value="${newInputDate}" />
<mustache:param name="isUS" value="${memberLocale == 'en_US'}" />
</mustache:interpolate>
The parent tag, mustache:interpolate, indicates the filepath the template lives in, and the key in the Javascript file that we keep our common templates in. The key’s syntax is admittedly strange, but we decided to stick to a convention for Mustache templates shared between Javascript and JSP: a namespaced javascript variable (in the example, Meetup.Templates) that is assigned a JSON object containing optionally nested key/value objects. So for the example above, it would be something like Meetup.Templates = { lma : { lma_when : { edit : "just having an awesome time on {{eventdate}} with {{mustache}}" } } }. (The Javascript parsing is done with some very basic in-house code that looks for Javascript variable assignments, coupled with Google’s lovely GSON JSON-parsing library.)
The tags, of course, set up the view data needed by the template. In the example above, they are pulling some data from the JSP context. This allows us to easily, but explicitly, take data populated in our backend model and apply it to Mustache.
As for the performance factor, mustache.java produces compiled templates as Java objects, so we are able to easily cache those in app server memory to avoid repeated disk IO and template recompilation (with caching disabled in our dev environment for ease of development).
We are currently testing this approach, and will begin to roll it out in a limited fashion. The ability for front-end and back-end to share the same templates should allow us to repay some technical debt while giving us greater flexibility going forward.
At Meetup, we’re building an application for the long haul, and we’ve been doing it for quite a while. In fact, Meetup launched just 8 short months after the very first ipod, in June of 2002. As our codebase has grown and evolved, it has collected some cruft as well, particularly on the front end; markup patterns of yesteryear, lingering CSS for features that no longer exist, and a style specificity war that has given rise to a base stylesheet of epic proportions.
While it’s easy to blame CSS bloat and design inconsistencies on legacy code, any development team that regularly launches new features and fixes can tell you that design and code fragmentation can happen at any time.
One of the greatest challenges of maintaining overgrown CSS is finding ways to reuse code. The more large and complex your CSS is, the less likely anyone will be to trust or reuse it. From this, the cycle of bloat is set in motion, when it’s easier and faster to write your own CSS than reuse existing code.
Not only does CSS file size rapidly increase, selector matching and rendering performance can suffer, as this process likely introduces duplication, overqualified selectors, or selectors with complex ancestry.
Heavy and complicated CSS begets heavier and more complicated CSS - this is a problem that isn’t easily solved unless you rethink the way styling works on your site from the bottom up. Thankfully, there is a way.
Developing a style guide was our first step toward CSS and code harmony. A style guide helps our process in more ways that I can cover in one post, so for now, I’ll focus on the code benefits.
As someone said at an Agile Experience Design Meetup, “mockups are lies waiting to happen”. A static style guide, or any style guide that doesn’t use live code is essentially a mockup, and it makes no guarantees about implementation or code quality.
We decided to express our style guide in real code; everything from UI widgets down to HTML element defaults. Not only is the guide a visual reference for how things should look, it’s a live reference for how things should be coded as well.
In building a style guide with code, we were basically building a complete CSS framework for the future of Meetup UI. This framework shaped up to become our own custom version of Twitter’s Bootstrap framework, with influences from other great projects and methodologies:
We knew what base elements and typographic flow should look like on Meetup. Instead of resetting everything to 12px without margins, only to clobber those styles later to create our desired design, we started by directly styling base elements to fit the mold of the Meetup design and normalizing this across all supported browsers. We did this with the help of a customized version of Normalize.css, which is a fantastic alternative to older browser resets.
Object Oriented CSS is a methodology that outlines a clear standard for CSS best practices. We relied heavily on the idea of building reusable classes that handle specific tasks, and behave predictably regardless of where they are applied in the DOM.
Not only did we use OOCSS principles, we borrowed a layout system from the framework of the same name, OOCSS Grids.
We’ve used Sass at Meetup for over a year now, and it was a natural fit for authoring a CSS framework. With Sass, we were able to store configuration in one place (colors, font sizes, font stacks, etc), which made the process of building the framework easier and more consistent.
As we begin using our brand new framework and style guide, there’s a lot to look forward to…
Because the framework source and documentation follow the example of Bootstrap, it’s pretty easy to use. Designing and building new features while refactoring old ones will be much easier to manage now that we have a solid CSS foundation and a library of components that are ready to use.
This new foundation also encourages us to use a more simplified DOM than we currently have, with significantly lighter and less complex CSS. Pages should load faster as we rework them, with better accessibility, and all of the SEO benefits that come with cleaner, more semantic markup.
The framework also doubles as a well-documented rapid prototyping tool, allowing us to test ideas in a real browser instead of a mockup. Because the same styles are shared by the prototype and the live site, moving a prototype into production code will be significantly easier as well.
Most of all, the framework will pave the way for other improvements and features. A custom framework is just the beginning of the story for improvements you’ll soon see in Meetup’s interface.
In this edition of Making Meetup, we’ll look at an experimental feature. One area of Meetup which we are improving is our suggestions. If you are a user of the site, you have no doubt seen a suggestion at one time or another. These appear on the logged-in home page, on the home pages of groups, on numerous emails, and elsewhere on the site.
But suggestions are a feature that can never be made perfect. It is very difficult to design a suggestion system that can accurately predict what EVERY member of our site would be interested in seeing.

A particular problem we have run into recently is that we are TOO good at suggesting certain types of events, but not good enough at suggesting others. If you log in to your Meetup account and start subscribing to numerous tech topics, for instance, we do a gangbusters job of telling you about the tech events happening in your area. In many places around the world, there are tons of quality tech events happening every day, and thats a great thing! But while I love a good tech-related event, there are other things that I am interested in as well. More obscure things, perhaps. Maybe I am very interested to learn about pickling, for instance. I can add ‘Pickling and Canning’ as an interest on Meetup, and there might even be an event in the area sometime this week. But, I also have 15 tech interests, and so the suggester is only showing me all the awesome tech events. The pickling event is buried!
So this is the issue. We don’t want to NOT show all the awesome tech events, but we want to float the pickling event higher to increase the variety of what is being seen. Even though the pickling event might only have 5-6 RSVPs, while the tech events all have 50-200, people like variety. It doesn’t matter that a restaurant has 50 amazing styles of pizza, if thats all they have and you’re not in the mood for pizza that night. You aren’t going to eat there.
So how do we solve this? One idea that we’re working with right now is finding events least similar from each other, and using this to put together a set of suggestions which has the maximum variety between items. Essentially, we make a function which compares the similarity of two groups, and returns a number between 0 and 1. We then start with a seed group in our result set (we start with the best overall result), and sort the remaining groups by how dissimilar they are to the seed. We pop the least similar, add it to the result set, and then resort the remainder by how different they are from the amalgamation of the result set. We repeat this until we have a result set which is the size that we want.
This all makes sense, but how do we actually determine the similarity between events on a scale of 0 to 1? The answer is vector cosine-similarity. This involves taking two vectors of numbers, one for each group, and performing some maths on them to get a value back. For vectors U and V, the equation is this:
dotProduct( U, V ) / ( squareRoot( dotProduct(U,U) ) * squareRoot( dotProduct(V,V) ) )
where dotProduct is:
for i in length(U):
sum += U[i] * V[i]
return sum
( with length(U) = length(V) )
So now, all we have to do is come up with vectors for our groups. This was a tricky part, since we don’t have a natural way of doing this. We could compare things like group size, or event frequency, but those don’t really get to the root of how similar/dissimilar they actually are from a topical point of view.
The thing we do have which actually captures this are Topics. Of course. All groups in our system are tagged with between 1 and 15 topics which attempt to describe what the groups are about. Some groups are tagged better than others, but they are all tagged. Comparing topics between groups would work, except that we have over 100,000 topics in our system, and vectors that large become unrealistic to compare with each other on the fly.
So instead, we are using the categories that the topics belong to. Not all of our topics are categorized, but putting aside that caveat, grouping the topics by category and creating a vector out of THAT gives us a much smaller vector. A length of 16, to be exact. So if a group has 4 topics that belong to 'tech’, and one that belongs to 'social’, it could have an array that is something like:
[0,0,0,0,0,0,4,0,0,0,0,0,1,0,0,0]
And if there were another group that had 3 'pets & animals’ topics, a 'sports & recreation’ topic, and maybe a 'cultures & languages’ topic (Ultimate French-Language Pugs Frisbee group anyone?), it’s vector would be:
[0,0,0,1,0,0,0,0,3,0,0,0,0,1,0,0]
A quick check of the similarity between those two vectors give a similarity of 0. However, another tech group, say with vector:
[0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0]
combined with the first group would give a similarity of:
3*4 / (3*sqrt(17)) = 4/4.123 = .97
In other words, they are very similar.
So as we roll through the calculations, taking the least similar group each time, we keep a 'sum’ vector of all the results we’ve chosen so far, and that is the comparison that we use. Of course, the more iterations we do, the harder it is to find dissimilar groups, so after we get a good variety, it tends to just fill in with the most populous of the categories.
That is where we are so far with this – a drawback at the moment is that after the first result, we lose the concept of 'quality’, as we are only choosing based on unsimilar-ness. The next step is to take into account the quality of the group when choosing an unsimilar group, so instead of taking the MOST unsimilar, maybe we take the best combination of unsimilarity and quality, factoring two scores together.
As I mentioned before, this is still in development, so you won’t find this happening on the site at the moment. But if one day you wake up and find your suggestions to be much more diverse, then you’ll know why!
Last week a bunch of us at Meetup HQ hunkered down for a two-day hackathon, which culminated in a presentation and party to celebrate our recent office renovation. Check out what we came up with! Our priorities seem to be friends, food, and beer :


(randy a)

(mike c)

(adam d)
A combination of a breathalyzer shield, an Arduino, and a python script to listen to serial input from the Arduino.

(nate g)

Programmed an Arduino with a Bluetooth shield to track dogs’ movement around the office. Results were displayed on a heatmap.


Uses a text analyzation technique called Hidden Markov model, with IRC chatterbot interface.

We built a stats display for the CS team. It shows who on the team is sending emails out, as well as how many emails we’re getting per hour and a bunch of stats related to emails from our community. We built it using python, tornado, socket.io, jquery & jqBarGraph.

(jake l)

(doug t)

(alex k)

“A stalking horse is a person who tests a concept with someone on behalf of an anonymous third party. If the idea proves viable and/or popular, the anonymous figure can then declare their interest and advance the concept with little risk of failure.”
In the case of our mobile app - your friends are the stalking horses testing Meetups for you without knowing it. The app then surfaces those Meetups as recommendations.
Your Meetup “friends” are simply members with whom you’ve had the most attendance overlap. We thought that there’s a good chance that if you’ve been to a lot of Meetups with someone, you probably know them by now and may have similar interests. A list of these friends is shown on the home screen in order of score (the score here is simply the number of the Meetups you’ve both been too). Pages for each friend show your shared Meetup history in more detail.Recommendations would be displayed in a calendar format that is populated with all the Meetups your friends will be going to in the near future. From there you would be able to find out more and RSVP to an Meetup that you wouldn’t have otherwise known about and may have a good chance of being interested in, or at least someone you know would be there!
The project used RSVP data that we rolled up for each Meetup member and provided via API methods. The frontend UI was a combination of HTML5, Knockout.js, and xui.js.




See here for a video and more photos of Meetup HQ’s Hackathon event and office dogs. And remember, we’re hiring!
We decided to try repackaging an internal service, which was running a servlet container, in a custom built NIO server. Its baseline request load fluctuates with user traffic on the site, but bursts of activity are produced by daemon processes, as shown in this graph of requests per second:

Before we committed to the plan, we benchmarked a prototype. It was an easy conversion, as the work performed by the server is entirely CPU bound, inherently non-blocking. The NIO implementation performed much better than the servlet container.
The next step was to produce a fully functional service to take performance measurements in production. Since it served the same responses for the same requests, we could run it at the same time as the existing service. In fact, in the graph above is broken out by servers running the two implementations.
The purple line shows the original service running in a servlet container; green is the custom-built New I/O server. The load balancer sent the bulk of the traffic to the new server, particularly during bursts, and sometimes all of the traffic.
You can see why in this last graph, the mean response time in ms.

The peaks in the older service are exaggerated by its lower sample sizes, but it consistently averages at more than twice the response time of the newer service.
We’ve now fully switched over to the New I/O version of this service and the load balancer uses them fairly evenly, as you would expect.
What’s next? The worst cases are still pretty ugly and aren’t significantly better with the new implementation, because they’re caused by garbage collection pauses triggered by frequent disposal of objects in the underlying process. When we’ve improved performance on that front, we’ll be back with the charts to prove it.