Back to Venmo.Com

Two Cents: Episode Two

· by Terri Burns, Developer Evangelist Intern

Welcome to the second episode of Two Cents: NYC... Minus the Smell.

Listen in to hear about what projects Venmo interns are working on, hackathon prep, and Terri and Cassidy's two cents on imposter syndrome. We hope you enjoy!

And if you're just tuning in, Two Cents is a podcast series which follows the intership of Terri Burns, a Venmo developer evangelist intern, and Cassidy Williams, a full-time Venmo software engineer and developer evangelist. If you missed the first episode, Get Gif-y With It, listen here.

Permalink

New Blog Updates!

· by Terri Burns, Developer Evangelist Intern

We're excited to announce some fantastic updates to our blog!

We’ve made it easier to get around the blog with updates to the navigation bar. Now you can view posts by topic: Engineering, Feature Announcements, and Life at Venmo.

Additionally, our subscribe feature will allow you to sign up to receive email updates (which will come at most once a week) letting you know about new blog posts. And, you can also enjoy our archive of posts over the years, or search for a specific post you read in the past.

As always, feel free to leave a comment here on the blog or via some of our social channels to tell us more about what you'd like to read about in future posts!

Permalink

Two Cents: A Venmo Podcast

· by Terri Burns, Developer Evangelist Intern

Welcome to Two Cents.

This summer podcast series will be following the internship of Terri Burns, a developer evangelist intern, and Cassidy Williams, a full-time software engineer and developer evangelist here at Venmo. Stay tuned to hear more about what it's like to work at Venmo, the current state of NYC's technology scene, and hear Terri and Cassidy's two cents on on a given topic in tech and in life each episode. It's a beautiful marriage of payments and podcasts. Catch the first episode, Get Gif-y With It, below:

Permalink

Venmo Paints the Town

· by Katie Mulligan, People Team

A few weeks ago, we sent some Venmo volunteers to help local artist Ellie Balk and the students at Brooklyn’s Green School finish up their annual mural. This isn’t just any old neighborhood beautification project: every year Ellie works together with the staff and students to design a mural based on the school’s math curriculum. This year’s project, Visualize Pi: Perspective, uses blocks of varying height and color to represent Pi.

Visualize Pi is an extraordinary program for Green School. It allows students to understand complex math concepts through design and feel ownership over a project that adds value to their neighborhood.

The Venmo volunteers jumped in towards the end of the painting week to help with some straight lines, ladder climbing, and detail work. We had a blast rolling up our sleeves, getting paint on our faces, and spending time outside in the sun. When we were painting with Ellie and the students, we really felt like we were making a direct impact in the community. People kept walking by to chat with us and thank us for adding a colorful flair to the neighborhood. It was an incredible feeling to step back at the end of the day and check out the beautiful result of everyone’s hard work.

Permalink

Coming Soon: Use your Fingerprint to unlock your Venmo App

· by Tiem Song, Android Engineer

Today, at Google I/O, Google unveiled Android M Developer Preview, which will include new fingerprint capability for Android devices when M rolls out, and we’ve integrated this new capability into the Venmo app.

Soon, consumers using Venmo on their Android device with a fingerprint sensor will be able to unlock their password protected Venmo app with their fingerprint instead of a PIN.

We’re always looking for ways to make Venmo simple and delightful to use, while keeping our high standards of security. Enabling fingerprint authentication on supported Android devices lets us maintain our security standards, yet reduce the friction of entering a PIN.

We’ll be rolling out the new Android-enabled fingerprint technology in the Venmo app later this year. Stay tuned to try it out!

Permalink

Introducing Emoji Autocomplete

· by Dasmer Singh, iOS Engineer

Venmo payment notes are more than just a memo for transaction history. They provide a social way to make and request payments in the news feed, and users often write clever and witty messages to express their reason for payment.

With close to a quarter of all Venmo notes using an emoji, we wanted to take a look at how we could make using an emoji easier and more fun for our users. That's why today, we are releasing the Emoji Autocomplete feature in the Venmo iOS app! Simply tap on the emoji button, type the name of the emoji you’re looking for, and select it from the list. Emoji are also suggested as you type a payment note.

For example if you type “pizza”, you will be given the option to use a:

instead, or if you type “rent”, you will be given the option to use the emoji combination:

Of course, if you ever want to turn emoji suggestions off, you can always flip the switch in Settings.

Emoji Autocomplete is available today in the App Store. We hope that you love the feature as much as we do. As always we love getting user feedback — whether good or bad, so let us know what you think!

Permalink

Keep the fight in the ring this weekend with Venmo

· by Matthew Hamilton, Product Manager

Put away your boxing gloves -- there's no need to fight your friends to get your money back when you order the Mayweather vs. Pacquiao fight on Pay-Per-View this Saturday, May 2nd.

HBO and Showtime, along with Mayweather Promotions and Top Rank, have launched an innovative mobile ad experience with agencies PHD New York and Undertone. All you have to do is tap the ad to open the Venmo app where you can easily add your friends to pay for the event. Check out the mobile ad on Thrillist as well as mobile sites for College Spun and Men’s Fitness.

Instead of getting knocked out with the cost of covering the event for all of your friends, you can easily get paid back with Venmo.

Permalink

Love Pizza? Love Venmo? Papa John’s brings them both together.

· by Matthew Hamilton, Product Manager

People love to use Venmo to split pizza. In fact, the pizza slice is the most often used emoji on Venmo.

That’s why we’re excited to share that Papa John’s has integrated the Venmo API into their online and mobile checkout experience. So now, instead of chasing down your friends for their slice of the pie, it's easy to quickly request money from your friends for their share, as seen in the recent spot with NBA All Star Paul George. Here are the three easy steps:

1. Buy ALL THE PIZZA.

                                                            Gotta get buffalo chicken.

                                      Yeah, I want it ASAP.

2. Allow Papa John's access to your Venmo account, so you can request payments from your friends. 

3. Select your friends you want to share the pizza with.

Boom! The payment requests are out. Now you can enjoy your pizza without having to pester your friends to pay you back.

Go give it a shot and tell us what you think!

Permalink

Updates to Venmo Security

· by Aditya Pasumarty, Product Manager

We’re pleased to announce that multifactor authentication (MFA) is now available for all Venmo users on the web or the latest iOS and Android apps.

Our version of MFA requires an additional verification step when accessing Venmo from a new device. The feature is automatically turned on for all users in the latest version of the app. This is how it works:

  • Anytime we detect a sign-in attempt from a phone or browser you haven’t previously used to access Venmo, we will alert you via email and text a 6-digit code to your mobile phone. Entering this code correctly will let you successfully sign in to your Venmo account. So if someone knows your password, but doesn’t have access to your mobile phone, they won’t be able to get in.
  • After signing in, you may grant Venmo permission to remember that the device belongs to you. You won’t need a verification code when signing in from this device in the future. You will still need to enter your password correctly every time.

This feature is designed to maximize security while continuing to provide a quick and easy sign-in experience on devices you regularly use. As always, if you have questions please reach out to us at support@venmo.com or visit our help center for more information on multifactor authentication.

Permalink

Can Venmo Users Predict the March Madness Winner?

· by Venmo Data Team

March Madness is a time when people share their love for their alma mater or favorite team, and Venmo users are no different.

JT Glaze, one of our Data Scientists, looked at payment notes in the Venmo feed from Selection Sunday to the first game tip off for this year's NCAA tournament to build a Venmo user crowd-sourced bracket. Our methodology to determine the winner of each round looked at the number of times a school name, abbreviation or team mascot was mentioned in the Venmo feed.

Check our Venmo bracket out below - how does yours compare?

So: will our users predict the March Madness winner? Can a crowd-sourced bracket be a slam dunk?

Get out the popcorn and pizza, it's game time!

Permalink

Updates to Venmo Account Notifications

· by Michael Vaughan, Venmo GM

Today, we wanted to share a few updates we’ve made to Venmo account notifications, as well as make you aware of some additional product updates we’ll be releasing soon.

To enhance the security of your Venmo account, any time there is a change to your primary email address, password or phone number, we will send you an email notification.

Here is how it works:

  • If the primary email on your account is changed, you will receive a notification to the old primary email in addition to a verification for the new primary email.
  • If your password is changed, you will receive an email notification.
  • If the phone number on your account is changed, you will receive an email notification in addition to verification of the new phone number.

If we notify you of a change that you didn’t request, please immediately reset your password and contact us at support@venmo.com so we can confirm your account is secure.

Additionally, we're working to be more responsive to your support inquiries. We’ve made significant progress and will continue to improve in this area. We’ll also be rolling out multifactor authentication (MFA) in the coming weeks, among other product features, to further enhance user security and experience.

As always, please reach out to us at support@venmo.com with any questions and check back here for updates.

Permalink

A Note to Our Venmo Community

· by Michael Vaughan, Venmo GM

Recently, there’s been some commentary about the security of Venmo’s service and our responsiveness to our customers. It’s really important to everyone at Venmo that we address this with you directly. Our most important job at Venmo is to protect your money and provide you with a secure and easy way to make and share payments. This involves building an amazing product experience, but it also includes the teams of people behind the scenes who work tirelessly and are dedicated to protecting and supporting you - our fraud prevention, customer support and operations teams. We are all part of the community and we are grateful for those of you who have posed questions and provided feedback.

First things first, I want you to know a lot of what we do to protect you is happening behind the scenes. We focus on your safety and overall experience as a whole. We don’t build for features just for features’ sake. We’re processing billions of dollars of your payments every year and we maintain fraud rates favorable to industry standards and that is why we are comfortable guaranteeing your money if you are the victim of fraud or unauthorized transactions.

So….. here are the things we do to help keep you secure:

• We have fraud protection algorithms and systems that are always on. As much as I’d love to share more here, I don’t want to tip our hand to would-be fraudsters, but we back it up by guaranteeing your money from unauthorized transactions.

• We encrypt your sensitive financial information, including your bank account details. That data is never stored on your device. It’s not even visible to you. Ha. Take that. So, even if your crazy uncle got your password and logged into your account without you knowing, your bank account information is not visible. Unfortunately, I can’t say the same about all those checks you’re writing that have your full routing number and account number at the bottom. But that’s a story for another day.

• We are PCI-compliant and your debit/credit card info is encrypted and secure. You’re probably wondering “What is PCI-compliant?” Answer: it’s a credit card industry standard to make sure we’re doing our job to protect you. It’s kind of like putting on suspenders after you have a belt on, and then having your mom check your belt and snap your suspenders to make sure they’re both working.

• We set payment limits to protect against unauthorized transactions and only verified accounts have higher limits.

• We log you out of a web session after a certain period of inactivity.

And if that’s not enough, here are some things you can do for yourself to make you feel more comfortable when using Venmo:

• Set a passcode lock on the Venmo app (in addition to your phone lock) that’s required each time you open it. If you have an iPhone, you can use TouchID instead of a four-digit PIN to use fingerprint authentication for your Venmo lock.

• Disable any device and remotely log out of a session from your web settings if you have any concerns to prevent unauthorized transactions.

• Set options to receive text messages, push notifications or emails for payment transactions and a wide range of app activities so that you can monitor your account.

And, as with any online service: use a password that is strong and unique to your Venmo account. Venmo can’t guarantee the security of your other apps and services and sharing a password across many services can make your account vulnerable - as with any online service.

I want to assure you we are continuously improving product and security measures. We have a bunch of things we’ve been working on and we’ll share more of those with you soon. While we know that we measure up favorably against the industry standards for fraud prevention, we aren’t sitting back.

Another concern we’ve heard is some frustration in delays in getting help from us when you need it. We never want you to be disappointed and we’re sorry if that’s been the case. Our support team is the lifeblood of Venmo and we aim to be the biggest advocates for you. As we grow rapidly, we are working diligently to keep the level of service you should expect, and we’re hiring more people to work in support (if you are interested in joining us). We’re also looking at other areas where we can offer additional help more quickly including chat support and taking a new approach to support that will enable us to better interact with our users.

Venmo doesn’t exist without you, our users, and our job is to do right by you. We work to earn your trust every day. We take that responsibility seriously and we will do our best to be as transparent as possible with you as we continue on this journey. As part of that relationship, we value your feedback and we welcome it continuously to help make Venmo better. We’re all standing by to listen to your comments – please email us at support@venmo.com and we will answer every single question you have as quickly as we can.

Thanks for being a part of the Venmo family.

Permalink

Venmo Developer Spotlight: Joel Bixby

· by Cassidy Williams

By Cassidy Williams and Joel Bixby

This is the third in a series of Venmo Developer Spotlights, where you can get insights on what life at Venmo is really like. If these posts tickle your fancy, head over to our job board and join us!

Joel is a solid backend engineer at Venmo. Joel grew up in Iowa believing his dream job was on the West Coast. After graduating at Iowa State University with a degree in Computer Science, he went the East Coast. In his free time, he enjoys testing new web frameworks and going outside for some fresh air!

How long have you been with Venmo? What do you work on?

I have worked at Venmo for seven months. I am currently on the Scaling team, which helps Venmo’s code keep working as we grow with our user base. I have worked on projects that setup Celery for queue processing, migrated data from MySQL to Redis for extremely fast reads and writes, and also work in Puppet, our infastructure manager for deploying and managing our services.

What is your favorite programming language?

I enjoy many programming languages, but I can’t seem to pick just one. Python and Javascript would definitely be in my favorite programming languages. Both are very informal and have many ways of doing the same thing. I believe this freedom gives them a personality. A personality made of common practices, clever tricks, and some ugly stuff too.

What do you like to do outside of work?

I try to stay active and go to the gym as much as I can. In the Fall, a group of coworkers and I participated in ZogSports dodgeball, which was extremely fun! I definitely plan to join another season of it soon! When I’m at home, I like to investigate new programming languages, frameworks, and software for my own projects.

Are you working on any side projects right now?

I am currently working on a mobile app for skydivers. Skydivers are required to do a lot of jump logging in order to become licensed and it requires a lot of manual labors. With new technology in cell phones, almost all data can be collected automatically.

What is a fun fact about you that you don’t usually get to talk about?

When I was little I took dance classes with my sisters. I took lead roles in many nursery rhymes as a cowboy, a mouse, and a spider.

What advice do you have for aspiring developers?

Learn as much as you can! There are unlimited applications of software development and you can decide how you want to apply it. Pick something that interests you and learn that front to back. The more you know, the more experience you will have to make an educated decision.

Got more questions? Email us at blog@venmo.com!

Permalink

Awesome Venmo API Hacks

· by Cassidy Williams


By Cassidy Williams

Hi friends!

Venmo loves going to hackathons and seeing awesome projects that developers come up with. I recently talked to a few people who made some great ones, and I'm going to tell you about them!

Via

Michigan State students Caitlin McDonald and Erin Hoffman built this project and won the Venmo prize at MHacks V!

Students and families alike love to take road trips across the country. Road trips are a fun way to experience small town America while getting us to our final destinations with minimal expenses. Despite their advantages, however, road trips can involve tedious financial concerns, ranging from finding the cheapest gas along the route to ordering at a drive-thru window with a car full of people. With Via, these issues evaporate to provide a fun, carefree roadtripping experience.

Via provides some helpful roadtripping features while also tracking all of your expenses along the way, allowing for easy reimbursements between roadtrippers.

The team built Via as a mobile web app, using Ruby on Rails and PostgreSQL for the database. The main API used was Venmo (for user login, friend lists, and payments), but they also used the Google Maps API, Google Places API, and the MyGasFeed API. The icons are Twitter emoji, but the rest of the graphics they made themselves.

Take a look at Via on ChallengePost!

Paybble

Purdue students Vipul Nataraj, Drew Ruberson, Josh Foeh, and Zachary Simpson worked on this fun project for the Pebble watch.

Paybble is an application developed for Boilermake Fall 2014 that allows you to pay people on your contact list directly through your Pebble watch. In order to use the service, the user has to have the companion iPhone application installed and allow application access to their Venmo account. Once these prerequisites are complete, the user can then use the Pebble watch to cycle through their contact list and select a contact to pay as well as an amount. After confirmation, the application carries out the transaction and even sends both the payer and the payee notifications via text message. This application is targeted towards people that want to utilize Venmo but are always too lazy to pull out their phones to do it.

Gotta love those lazy piles. <3 data-preserve-html-node="true"

If you want to see more about the project, check it out on ChallengePost

The team also wanted to share their favorite joke with you.
Q: Why do Aliens always choose functional programming languages as their main development languages?
A: Because they’re both stateless.

SiriKit

University of Michigan students Janum Trivedi and Noah Shutty built this project for iPhone, and they won the Venmo prize at PennAppsX!

We love Siri--Apple's sassy voice assistant has delighted us since day one. But why can't Siri make one-time and recurring payments to your friends? Find your backpack for you? Activate your Jambox? Control your automated home? Interface with all your IoT devices?

Though Apple has not released a public API for its voice interface, the team found a workaround that allows third-party apps to grab data from Siri and take actions in response. Importantly, this proceeds without any traffic proxying, data limitations (eg, wifi only), or browser trickery.

Siri, plain and simple. And now limitless.

Check out SiriKit on ChallengePost!

They also shared a funny with us, a quote from Mitch Hedburg: "My fake plants died because I did not pretend to water them."

RideShare

At the recent HackTheDrive hackathon run by BMW in San Francisco, Gregor Engelmann and his team of 3 built an iOS application that explored a way of identifying energy/fuel costs per passenger based on local fuel/energy rates at the destination.

The application utilized data like GPS location and power consumption, as well as sensor readings like car door status and passenger location within the car from the BMW i3 to identify how many people are sharing the fuel costs for a certain distance driven, and how much it would cost to refuel the car based on local service point rates at the driving destination. The Venmo and PayPal APIs were used to process in-app money requests from passengers.

Want to see more?Check out this list!
Want to make your own?Go for it!

Permalink

Thank you, open-source community

· by Ayaka Nonaka


By Ayaka Nonaka

We open-source a lot of things at Venmo, and we also use a lot of open-source libraries. To show some appreciation to all of the open-source maintainers and contributors out there, we thought it might be cool to share a list of open-source libraries and tools that the Venmo iOS team relies on. Thank you everyone out there who has contributed to these projects and other projects out there. Here’s to a great 2015!

  • 1PasswordExtension adds 1Password support to our login. (Psssst... Look out for it in our next release!)
  • AFNetworking is great for all things networking, but we especially like UIImageView+AFNetworking for async image loading.
  • Alcatraz is the package manager that brings XVim, FuzzyAutocomplete, GitGutter, etc. to Xcode. Such a must have.
  • BZGFormViewController is great for simple forms that require validation. We use it in our app for our sign up and edit profile views.
  • BZGMailgunEmailValidation is perfect if you use Mailgun for email validation.
  • BlocksKit because dismissWithClickedButtonIndex:animated: delegate methods are no fun at all. Besides, who “clicks” on an iOS device?
  • Braintree allows our users to pay via Venmo on apps like YPlan.
  • CMPopTipView has been useful when we want to draw attention to a new feature that we added.
  • CocoaPods is how we manage all of our dependencies, including private pods. Can’t wait for their 0.36 release which supports Swift!
  • DAZABTest provides a super simple API to do basic A/B tests.
  • Expecta is a great matcher framework that makes your tests read like English. expect(myTests).toNot.beEmpty()
  • Facebook-iOS-SDK makes it easier our users to sign up and find friends to start using Venmo with.
  • FLEX is built into all of our debug and dogfood builds, and it makes finding and fixing UI bugs so much fun and so much easier.
  • FuzzyAutocomplete because Cocoa API’s is so verbose.

objc initRecurrenceWithFrequency:interval:daysOfTheWeek:daysOfTheMonth:monthsOfTheYear:weeksOfTheYear:daysOfTheYear:setPositions:end: anyone?

  • FXBlurView makes it super easy to have your own blurred views to match iOS 7 and 8’s frosty look.
  • FrameAccessor is perfect for the lazy programmer who would prefer to type view.width = 50 intead of CGRect newFrame = view.frame; newFrame.size.width = 50; view.frame = newFrame;
  • GBDeviceInfo tells us useful things about the device our app is running on so we can optimize a little for older devices, etc.
  • GitGutter shows you what lines were changed, added, and removed right in Xcode’s gutter!
  • Godzippa has been immensely helpful when uploading large amounts of data to our API.
  • iRate because we love hearing back from our users. <3 data-preserve-html-node="true"
  • JTSImageViewController is what you see when you tap on a picture on a friend’s profile. We love the interaction where you can flick the image off the screen.
  • KGStatusBar is used to show “offline mode” in the status bar for Braintree merchants to test out Venmo integration. Super simple to use!
  • KIF makes writing automated UI tests such a fun experience. It looks like magic!
  • libextobjc provides us with things like @weakify and @strongify, and one of our favorites is EXTKeyPathCoding which lets us avoid @"stringlyTyped". For example, [NSSortDescriptor sortDescriptorWithKey:@keypath([Story new], createdDate) ascending:NO] which gets checked at compile time, as opposed to [NSSortDescriptor sortDescriptorWithKey:@"createdDate" ascending:NO] which is prone to typos and harder to refactor.
  • Mantle makes converting JSON reponses to and from objects a breeze.
  • MCDateExtensions adds some nice additions to NSDate that make it a lot more manageable to do date computations, etc.
  • Mixpanel has a really nice dashboard and handles all of our analytics.
  • MMDrawerController is really easy if you want add drawer navigation to your app. We’re looking to bid farewell to our hamburger button in the near future though.
  • MZFormSheetController brings iPad’s UIModalPresentationFormSheet to iPhone.
  • Nocilla is our favorite HTTP stubbing libary because it has such a simple and elegant API.
  • NSURL+QueryDictionary makes it easy to convert URL query params to a dictionary and vice versa.
  • ObjectiveSugar is exactly as it sounds. Add some sugar to your Objective-C!
  • OCMock because dependencies. Though with Swift and its focus on value types, we might be using fewer mocks!
  • oh-my-zsh because all we can say is, “OH MY ZSHELL!”
  • PSTAlertController provides an API similar to iOS 8’s UIAlertController, and it’s backwards compatible with iOS 7.
  • ReactiveCocoa is a different way of thinking about architecture, and we like it. We’re moving more and more towards FRP.
  • Specta allows our specs to read like English and have better structure. it(@"should allow the user to log in", ^{ ... }); instead of testUserShouldBeAbleToLogIn. We think it’s a lot nicer thanReadingABunchOfCamelCasedSentences.
  • SSKeychain provides an elegant abstraction around Apple’s Keychain Services API.
  • SVProgressHUD is basically every spinning progress loader in our app.
  • TOWebViewController is so nice for the few web views that we have in our app, although we’re slowly but surely moving away from them.
  • TTTAttributedLabel appears over and over in our app. Any stylized, tappable looking sections of UILabel’s in our app is probably a TTTAttributedLabel.
  • Underscore.m is one of my personal favorites. Never write a for-loop again.
  • xcpretty makes our Travis CI build output so much cleaner and prettier.
  • XVim I think I’m the only one who thinks this on my team, but it’s impossible to navigate quickly around Xcode without this.

A huge thank you to everyone who contributes to open-source. It makes development so much more collaborative, faster, and fun.

Giving back

Since we use so many open-source libraries, we wanted to give a little back to the community. We hope you find something that you like!

  • DryDock is basically our internal “App Store” for distributing beta builds to the rest of the team.
  • synx reorganizes your Xcode project folder to match your Xcode groups, because Xcode doesn’t already do that for some reason.
  • slather lets you measure test coverage in your iOS projects and optionally hook it into CI.
  • VENCalculatorInputView is the calculator keyboard for the amount field of a payment flow.
  • VENPromotionsManager is what we use for location / time dependent events, like our SXSW promotion last year.
  • VENSeparatorView is the zig-zaggy line that shows up in your payment feed for cash out events, etc.
  • VENTokenField is the Messages.app style recipients field that we use in our payment and invite flows.
  • VENTouchLock is our Touch ID + pin code integration.
  • VENVersionTracker is what we use to auto-update our dogfood versions. We’re looking to move to using HockeyApp’s equivalent though.
  • Venmo-iOS-SDK lets you build apps that integrate Venmo payments really easily.
Permalink

Venmo Developer Spotlight: Edmund Yan

· by Cassidy Williams

By Cassidy Williams and Edmund Yan

This is the second in a series of Venmo Developer Spotlights, where you can get insights on what life at Venmo is really like. If these posts tickle your fancy, head over to our job board and join us!

Edmund is a great backend engineer at Venmo. A recent Computer Science graduate from UC Davis, he is very excited to put his years of studying to use at Venmo. His life revolves around food, so expect to catch him trying out a new restaurant or cooking his ol' classic of steak and potatoes at home.

How long have you been with Venmo? What do you work on?

Venmo is my first job out of college, and I've been here a little over four months. I'm a platform engineer on the Money team, which owns the systems that deal with handling, you guessed it, money! This includes things like adding and verifying your bank account and the delicate process of actually moving money around Venmo.

What is your favorite programming language?

I'm a big Python fan these days, but I still have a huge place in my heart for C/C++. I did a lot of CUDA in school and although immensely frustrating, I loved the hours spent in the computer lab trying to squeeze out extra FLOPs out of my GPU.

What do you like to do outside of work?

I probably have an unhealthy obsession with Esports, where I log many more hours watching other people play video games than playing the game myself. While some people spend the weekend marathoning Netflix, I'm spending it marathoning a weekend LoL, CS:GO, or SC2 tournament.

Are you working on any side projects right now?

Now that I finally have my own apartment, I've been spending the past month "pimping" it out to be my little tech-oasis I call home. Organizing the miles of wires throughout the room, setting up the HTPC, automatically downloading the latest TV shows/magazines, wirelessly syncing all of it to my phone/tablet, etc. It's been a ton of fun incrementally building the system out and finding places I can write scripts to automate the process.

What is a fun fact about you that you don’t usually get to talk about?

In the 8th grade, I wrote a 70-page report on Jedi in the Stars Wars universe. This went into detail about their history, bios of influential Jedi, descriptions of force powers, lightsaber designs, and even an interview with a random guy I found on a Star Wars forum. I'm cringing but also laughing hysterically remembering it now.

What advice do you have for aspiring developers?

If you're having trouble finding inspiration to do programming on the side, find things in your life (no matter how small) and optimize it! My very first program was an auto-clicking script that pressed two keys over and over again so that I could get a high score in a Flash game on Neopets.
Looking back, some of the most fun and rewarding coding I've done were just small scripts I made to automate and make my mundane life a little easier. Things like auto-clicking video game bots, Excel macros, and web page parsers were just me thinking "hey, a computer can do this way better!"

Got more questions? Email us at blog@venmo.com!

Permalink

Python Logging Traps

· by Simon Weber

By Simon Weber

Python's logging framework is powerful, but gives you plenty of ways to shoot yourself in the foot. To make matters worse, logging mistakes are subtle and slip through code review easily.

In my time at Venmo, I've seen logging mistakes cause everything from unneeded debugging to application crashes. Here are the most common culprits:

Manual Interpolation

Bad:

logger.info("My data: %s" % some_data)
# or, equivalently
logger.info("My data: {}".format(some_data))

Good:

logger.info("My data: %s", some_data)

This pushes the interpolation off to the logging framework:

  • interpolation overhead is skipped if info level is not enabled
  • encoding problems will not raise an exception (they'll be logged instead)
  • tools like Sentry will be able to aggregate log messages intelligently

Pylint will detect this antipattern as W1201 and W1202.

logger.error(...e) in exception handlers

Bad:

try: ... except FooException as e: logger.error("Uh oh! Error: %s", e)

Good:

try: ... except FooException: logger.exception("Uh oh!") 

Formatting an exception throws away the traceback, which you usually want for debugging. logger.exception is a helper that calls logger.error but also logs the traceback.

Implicitly encoding unicode data

Bad:

checkmark = '√'.decode('utf-8') logger.info("My data: %s", checkmark) 

Good:

logger.info("My data: %r", checkmark) 

Using %s with a unicode string will cause it to be encoded, which will cause an EncodingError unless your default encoding is utf-8. Using %r will format the unicode in \u-escaped repr format instead.

Permalink

Making Venmo easier, more secure, and more fun

· by Jesse Bentert

We’re excited to share with you a few new features we’ve been working on to continue to make Venmo an easy, secure, and fun way to pay people.

Easy: Link your bank without your checkbook

We’ve now made it even simpler to link a bank account to Venmo if you use Chase, Wells Fargo, Bank of America, or Citibank. Instead of digging up your bank account and routing information, you can now link your bank using the username and password you use when logging into your bank’s website. As always, we use bank grade security systems to protect your information (learn more about Venmo security).

You can now add a bank anytime, anywhere, without having to first go home to find a check.

Secure: Keep your account secure with Touch ID

Security has always been a top priority for us, which is why we enable you to password protect your Venmo app with a PIN. We’re also now taking advantage of the Touch ID technology for iOS. If you have an Apple device with Touch ID, you can now use your fingerprint instead of a PIN to access the Venmo app.

Fun: Get more people involved in your payments with Mentions

Venmo payments aren’t just monetary transactions - they’re stories that can be commented on, liked, and shared. And we know your story can involve more than just the person you’re paying. With today’s release, you can now mention other people in your payments to get them involved. Go out to dinner with a group of friends? Send a payment on behalf of more than one person? Make them a part of your story by mentioning them in a payment or comment. To get started, tap the @ sign or start typing in a friend’s name.

We’re very excited to roll out these new features. Follow us on Twitter to get more awesome updates.

Permalink

Building a Sample App with the Android App Switch SDK

· by Matthew Gotteiner

By Matthew Gotteiner

The Venmo Android App Switch SDK enables anyone to easily add person-to-person payments to an app. After adding the required sample files to your project, all that's left is to add a few input fields and fire off a request. To demonstrate how simple it is to integrate the App Switch SDK, let's walk through a sample app that allows a user to send a Venmo payment to a contact by searching for a name or phone number. Integrating contacts into your app is not a requirement to use our SDK, but it is a common use case so I decided to go over that process here. Download the source code for the complete app here: https://github.com/mgottein/app-switch-demo

This tutorial uses an AutoCompleteTextView widget to search a user's contact list. AutoCompleteTextView is similar to EditText, except that it provides a list of suggestions to the user based on what they are typing and allows the user to click on one to complete their entry.

In order for AutocompleteTextView to know what suggestions to provide to the user, we must provide it a ListAdapter that implements Filterable. The ListAdapter allows the AutocompleteTextView to access your suggestions, and implementing Filterable filters the list by what the user is currently typing. We'll be using the SimpleCursorAdapter ListAdapter.

First, retrieve a user's contact information by adding the read contacts permission to AndroidManifest.xml. If we don't add this permission, we will be prevented from reading contact info. Add this line under the manifest tag:

<uses-permission android:name="android.permission.READ_CONTACTS" />

Contact information in Android is exposed by a ContentProvider, a class that allows applications to access content. The contact ContentProvider allows us to look up the contact information via a SQLite query. The contact information will be inside a Cursor, a class that encapsulates the query results. Since our data is inside a Cursor, we don't have to implement our own ListAdapter from scratch and can instead use a SimpleCursorAdapter which handles much of the adapter boilerplate code for us. We can access the contact ContentProvider by using a ContentResolver. ContentResolver provides a query method that looks like a SQLite query. Let's take a look at its definition:

ContentResolver.query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
  • uri allows the ContentResolver to identify a ContentProvider that will handle this query. We will be using this parameter to address our query to the contacts ContentProvider
  • projection is a list of columns we want the query to return
  • selection is a list of predicates that allow us to filter out unwanted results
  • selectionArgs is a list of arguments to our WHERE clause. Question marks will be replaced with the selection args in the order they appear (first question mark maps to selectionArgs[0], …)
  • sortOrder specifies how the results should be ordered in the cursor

This generates a SQLite query that will look something like this:

SELECT <projection> FROM <uri> WHERE <selection> ORDER BY <sortOrder>`

Making the Projection Statement

There are many columns in the Android Contact entity, but we only need a few of them here. We care about Contacts.DISPLAY_NAME_PRIMARY, Phone.NUMBER, and Data._ID.

We can now set up our projection:

Java private static final String[] PROJECTION = new String[]{ Data._ID, Contacts.DISPLAY_NAME_PRIMARY, Phone.NUMBER };

Making the SQLite Selection Statement

Building SQLite queries in Java can be confusing, so let's walk through this step-by-step. - Check if either Contact.DISPLAY_NAME_PRIMARY or Phone.NUMBER start with the input text. Since the contact name and phone number are strings, we can use the LIKE operator to see if the input text matches.

private final String SELECTION = '(' + Contacts.DISPLAY_NAME_PRIMARY + " LIKE ? OR " + Phone.NUMBER + " LIKE ?) AND " +

- Compare thePhone.TYPEcolumn to thePhone.TYPE_MOBILE` column to make sure we are only looking at mobile phone numbers.

Phone.TYPE + "='" + Phone.TYPE_MOBILE + "' AND " +`
  • Because there are many different types of information associated with a contact, compare the Data.MIME_TYPE column to Phone.CONTENT_ITEM_TYPE using the equality operator to make sure we are dealing with phone number information.
Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'";

Instantiating the Adapter

In order to instantiate the adapter, we need to provide a valid Context, a layout resource for a single list item, and a mapping between columns and view IDs. This mapping allows the SimpleCursorAdapter to automatically display a list item for us with very little code. We can choose to provide a cursor at instantiation, but for our purposes this is unnecessary. We are using a pre-existing layout resource for simplicity.

SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
    android.R.layout.simple_list_item_2,
    null,
    new String[]{
        Contacts.DISPLAY_NAME_PRIMARY,
        Phone.NUMBER},
    new int[]{
        android.R.id.text1,
        android.R.id.text2
    },
    0
);

Set a FilterQueryProvider so the adapter knows how to get content, given text to filter with. The query is run on a background thread, so we don't have to worry about blocking the main thread.

adapter.setFilterQueryProvider(new FilterQueryProvider() {
    @Override
    public Cursor runQuery(CharSequence constraint) {
        String constraintWithWildcard = constraint + "%";
        return getContentResolver().query(
            Data.CONTENT_URI,
            PROJECTION,
            SELECTION,
            new String[]{
                    constraintWithWildcard,
                    constraintWithWildcard
            },
            Contacts.DISPLAY_NAME_PRIMARY + " DESC"
        );
    }
});

We also need to provide a CursorToStringConverter so the adapter knows how to convert a contact row into a string the AutoCompleteTextView can use to complete a user's entry.

adapter.setCursorToStringConverter(new SimpleCursorAdapter.CursorToStringConverter() {
    @Override
    public CharSequence convertToString(Cursor cursor) {
        int phoneNumberIndex = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);
        return cursor.getString(phoneNumberIndex);
    }
});

All that's left is to set the adapter on the AutoCompleteTextView itself:

mRecipient = (AutoCompleteTextView) findViewById(R.id.recipient);
mRecipient.setAdapter(adapter);

Now that we can get contact info, let's see how we can open the Venmo app and pay a contact. Let's walk through a sample method to open Venmo and make a transaction.

private void doTransaction(String recipient, String amount, String note, String txn) {
    try {
        Intent venmoIntent = VenmoLibrary.openVenmoPayment(APP_ID, APP_NAME, recipient, amount, note, txn);
        startActivityForResult(venmoIntent, 1); //1 is the requestCode we are using for Venmo. Feel free to change this to another number.
    } catch (android.content.ActivityNotFoundException e) //Venmo native app not install on device, so let's instead open a mobile web version of Venmo in a WebView
    {
        Intent venmoIntent = new Intent(MyActivity.this, VenmoWebViewActivity.class);
        String venmo_uri = VenmoLibrary.openVenmoPaymentInWebView(APP_ID, APP_NAME, recipient, amount, note, txn);
        venmoIntent.putExtra("url", venmo_uri);
        startActivityForResult(venmoIntent, VENMO_REQUEST_CODE);
    }
}

We are using an Intent, a class Android provides to launch other components, to launch the Venmo app in order to complete a transaction. Note that if the app is not installed, a WebView will be launched that uses the Venmo website to complete the transaction. To get results from the App Switch SDK, we can define onActivityResult in our Activity, like so:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
    switch(requestCode) {
        case 1: { //1 is the requestCode we picked for Venmo earlier when we called startActivityForResult
            if(resultCode == RESULT_OK) {
                String signedrequest = data.getStringExtra("signedrequest");
                if(signedrequest != null) {
                    VenmoResponse response = (new VenmoLibrary()).validateVenmoPaymentResponse(signedrequest, app_secret);
                    if(response.getSuccess().equals("1")) {
                        //Payment successful.  Use data from response object to display a success message
                        String note = response.getNote();
                        String amount = response.getAmount();
                    }
                }
                else {
                    String error_message = data.getStringExtra("error_message");
                    //An error occurred.  Display the error_message to the user.
                }   
}
            else if(resultCode == RESULT_CANCELED) {
                //The user cancelled the payment
            }
        break;
        }
    }
}

And that's it!

Permalink

Migrating Webviews

· by Julian Connor


By Julian Connor

For the last month, the web team has been diligently working on porting our webview code from one repository to another. Through this long and tedious process we've learned a lot about the code we used to write and the code we now write. The striking contrast reminds us that sustained piecemeal progress gives large code bases the opportunity to bloom.

In this blog post, I will go through two valuable lessons we learned:

  • You can't put toothpaste back in the tube.
  • Do one thing at a time.

You can't put toothpaste back in the tube

Imagine you are a developer who is blazing his or her own trail through the unknown; in this case, an unfamiliar repository. Wouldn't you repurpose patterns and conventions in order to complete your task?

Of course you would. All engineers are guilty of copying code every now and then. Despite being efficient, code copying has the potential to propagate anti-patterns throughout your codebase.

Here's an example of how a Backbone Model anti-pattern got out of the tube:

Backbone exposes a get method on its models. This method accesses an object on the model instance and returns the value if found, e.g., model.get('foo'). Unfortunately, it's also possible to access the attributes directly on the model like so model.attributes.foo. Invoking a get method is ideal because it allows for functionality to be tied into accessing model data. E.g., one may need to increment a counter every time a model attribute is accessed.

The pattern of directly accessing the model attributes was used once and began organically propagating itself. Once anti-patterns are out of the tube they become increasingly difficult to subdue as their footprint greatens over time.

How to avoid needing to put toothpaste back in its tube

Define and document a set of interactions for the code base: - How do we run tests? Create builds? Install dependencies? Start the dev server? - Is there a style guide? How about a linting process? - etc...

Additionally, think long and hard about the foundational aspects of your repository: Are we happy with the overhead of adding new files to the repo? (E.g., boilerplate, dependency management, pathing, etc..) Is the code architecture sustainable? I.e., Do we foresee these patterns scaling well?

Foundations dictate the resilience of their burdens.

Only refactor one thing at a time

It's easy to become distracted when interacting with large amounts of legacy code. In the majority of cases, flaws and anti-patterns will emerge, potentially leading to lengthy spirals of refactoring.

Before getting started, it's important to clearly define the goal of the refactoring and stay within its bounds. Two rounds of well defined refactorings can be completed in a much more steadfast manner than one round of wavering changes and improvements.

Conclusion

Code quality is a function of its development environment. Defining a strong safety net, style guides, and best practices will lead to self-curation and the propagation of code that the team loves.

Permalink