Today, Splitwise is launching a major refresh of our popular Android app.

Nosotros've rebuilt all the most important screens in a modern new style. Improvements include:

  • Make clean expect and feel that embraces modernistic Material Design
  • New layout that speeds upward task completion
  • Updated balance presentation, for greater clarity around who owes who and why
  • Improve interface for unequally splitting an expense
  • Enhanced discoverability of important features
  • Modest quality-of-life improvements throughout the app

Our goal for this redesign was to proceed Splitwise easy and unproblematic to use, while refreshing the interface to experience modern, clean, and polished. The Splitwise team felt (and some of yous told the states) that the Android app was starting to show its age. These changes represent a big stride forrard.

Here's a detailed look at what'southward new.

Go on reading Introducing Splitwise for Android version 5.0

blog cover image

Today, Splitwise is launching a major refresh of our entire platform, including our mobile apps, homepage, and logo.

Commencement and foremost, nosotros're releasing Splitwise for iOS Version v.0, which is a total redesign of our flagship iPhone app. We've rebuilt all the virtually of import screens in a modern new manner. Improvements and features include:

  • Updated visual identity: app icon, colors, default avatars
  • Custom encompass photos for groups
  • Worldwide back up for Splitwise Pro
  • Redesigned core screens
  • Faster grouping cosmos flows
  • Enhanced discoverability of pop features
  • Small improvements throughout the app

Our goal for this redesign was to keep Splitwise piece of cake and simple to use, while refreshing the interface to experience modern, clean, and polished. The Splitwise team felt (and some of you lot told us) that the iPhone app was starting to show its age. These changes stand for a huge step forward.

Simultaneously, nosotros are releasing an updated version of our Android app. Splitwise for Android 4.six is a pregnant evolution that includes support for the updated branding and all the same new features as the iOS update: group cover photos, new default user avatars, faster group creation flows, and support for Splitwise Pro. We've likewise redesigned our homepage and web app to contain the new logo, icons, and visual identity.

Here's a detailed look at what's new.

Continue reading Splitwise, redesigned

41.823989
-71.412834

Today we're releasing a new jewel that makes it easy to add caching to whatever Cherry-red code. It's called cacheable!

The cacheable precious stone is an aspect-oriented, unobtrusive approach to caching. It turns this instance lawmaking (taken from the Rails caching documentation):

course Product < ApplicationRecord   def competing_price     Track.enshroud.fetch("#{cache_key}/competing_price") do       Competitor::API.find_price(id)     cease   stop end

Into this:

class Product < ApplicationRecord   cacheable :competing_price    def competing_price     Competitor::API.find_price(id)   stop cease

And to assistance handle more complex caching scenarios, cacheable includes many more powerful features as well: conditional caching, dynamic enshroud cardinal generation, utility methods to skip and clear the cache, and more.

You can read the total story backside cacheable here, and commencement using cacheable by reading our docs on GitHub. Building cacheable enabled us to clean upwardly Splitwise's balance-caching code significantly, and it helped u.s. solve several difficult-to-diagnose bugs in the procedure!

Why cacheable?

At Splitwise, we found ourselves writing the aforementioned crufty caching lawmaking over and over again. Wrapping our code in caching blocks fabricated it harder to read and more difficult to test. And any fourth dimension that we wanted to perform more complex logic in one of our buried methods – for case, conditional caching – it would cause that method to airship in size and complexity.

We decided to footstep back and reexamine our outset principles – specifically, the single responsibility principle. We realized that a method like Product#competing_price shouldn't be responsible for caching at all! We began to call back, "What if we could excerpt the caching logic from our cached methods? What if each method was merely responsible for its own logic, and the caching could be tested and built separately?"

Enter aspect-oriented programming (AOP). Past switching to an aspect-oriented approach, we were able to build a caching framework that was easier to use, easier to test, and MUCH more reliable across the diverse parts of our codebase.

Try information technology yourself!

We've been using cacheable in product on Splitwise for many months, and today nosotros're excited to share information technology with the rest of the earth 🙂 Check out our docs on GitHub for complete instructions on how to start using cacheable in your ain Ruby app. We look forward to making boosted improvements, and we welcome enhancements and pull requests from the Ruby customs!

Splitwise is proud to present Cacheable , a gem designed to facilitate and normalize method caching.

Splitwise is designed to take the stress out of sharing expenses. If people think we're doing a good job, they're going to put more expenses in Splitwise. This is cracking! But somewhen, a Splitwise group has so many expenses that it takes a not-trivial amount of time to calculate the total balance. We don't want a server that is taking time to crunch numbers to increase stress, and then we needed to speed this procedure up. Since balances just modify when at that place is activity in the group, we decided to solve this classic space/time merchandise off by caching the nearly recent balance adding.

While our functioning improved, our lawmaking developed a odor. Caching logic had to be custom added into any method that could do good from it. Not only was our code no longer Dry (Don't Repeat Yourself), nosotros were noticing occasional inconsistencies at runtime, requiring cache recalculation. This was not overly surprising, as nosotros all know that cache invalidation is one of the 2 hard things . But considering correct balances are the core of Splitwise, nosotros need them to work correctly all of the time.

We continued to tweak the caching logic, built workarounds, and fifty-fifty added conditional caching clauses to avoid race atmospheric condition. But we still had issues. As if this wasn't frustrating plenty, the extra caching lawmaking made our tests more and more complicated. We had intended to pay for time (a faster better user feel), with space (memory for cache), but besides received the hidden fee of increased maintenance costs. There simply had to exist a improve mode.

We decided to step back and reexamine our first principles, specifically the single responsibility principle (SRP). While it's primarily for modules and classes, it tin be applied to methods besides. Our method for computing the balance should not be responsible for caching at all — not checking, validating, or populating, conditionally or not. We began to recollect, "What if we could extract the caching logic from the method? What if the method was just responsible for the balance, and the caching could be tested and built separately?"

As an interpreted language, Ruby makes method composition easy to attain with metaprogramming, or lawmaking that writes lawmaking. A good deal of the incredible functionality found in Rail and other gems comes from Ruddy'south cover of metaprogramming. If you lot've used Ruby for whatever corporeality of time, you've likely encountered metaprogramming whether you knew it or not considering it is typically small, unobtrusive, and well encapsulated. In our case, nosotros extracted the caching logic from our methods and moved information technology to a defended module. This module can then be included in other classes and a single directive used to initiate the metaprogramming which will wrap the indicated methods with caching behavior.

Previously, each method, in addition to computing data and caching, would not just create its own fundamental to use in the enshroud, but be responsible for conditionally clearing the cache. How should a unified caching organization handle something as hard and thorny as cache invalidation? As with many things, Runway has an opinion. Rails uses central-based enshroud expiration which ties the generated cache fundamental to the object'due south country. ActiveRecord has a method chosen `cache_key` for this which creates the key from the object's course, id, and updated_at timestamp. Put just, when an object is created or updated in the database, its enshroud central changes. The fresh key has no value in the cache and the erstwhile cached value is associated with a primal that is no longer generated. When combined with many cache systems that remove the least recently used (LRU) values over time or as they run out of space, y'all get an effective way to sidestep the cache invalidation problem.

This was a skilful starting point, as nosotros had decided our caching library should have a general opinion on the format of the fundamental for ease of use and that it should exist easily modified. By default, the key under which a cacheable method stores its value is made up of the upshot of `cache_key` (or the class' proper name if undefined) and the method existence called. This allows an easy point of modification where `cache_key` tin be overwritten to provide any details necessary about the instance existence cached. Finally, a method's result depends on its arguments. However, its enshroud key may not. Since at that place wasn't good default behavior here, we added the ability to specify a `key_format` proc when invoking Cacheable then that the cardinal can be fine tuned using the instance, method proper noun, and method arguments.

We noticed benefits as soon as we began writing the code. The balance calculating methods were DRYing dorsum up, and at present then was the caching logic. In improver, the code was getting more and more maintainable. It became easier to read, test, and modify every bit the disparate responsibilities were pulled apart and isolated. With the caching logic encapsulated, information technology also became trivial to add together caching to additional methods and peer review these changes as often, only a single line of code was required.

It'south no small-scale victory increasing your developers' productivity and happiness, but how does it stack up in production? I'thou happy to say that only untangling the caching code from business organization logic dropped our error rate by an guild of magnitude. Instead of a handful of inconsistent cache hits and necessary recalculations a day, now we saw the aforementioned or fewer a month. Clarity has its benefits.

Nosotros didn't know information technology beforehand, but we learned nosotros had stumbled onto aspect-oriented programming (AOP). I am no expert in AOP, but this foray showed it to exist a useful tool to reduce the toll of code maintenance. It immune us to divide the lawmaking, and thus the responsibilities for aspects, or behaviors such as caching and computing balances, and composing new methods from modules. These aspects are able to be more thoroughly and reliably tested independently of each other. Increasing code reliability saves us maintenance by avoiding it entirely. In addition, the aspects are easier to understand when independent and take less fourth dimension to maintain and augment without risk of regression.

We brand employ of many wonderful open source projects every solar day and strongly believe in giving back to the community. We've found this abstraction to be easy to use and honey how it has increased our code'due south reliability. It'southward ready for out-of-the-box use with Rails and we'd love for you to try it out and let us know what y'all think. The GitHub repository has more data in addition to implementation instructions and examples.

Splitwise is excited to announce that we've upgraded our PayPal integrations on iOS and Android to the latest engineering science from PayPal. We believe the changes made increment the usability, security, and reliability of the integration.

As function of the upgrade process, the PayPal mobile integration was temporarily unavailable on iOS and Android for several weeks starting Friday, June 29th, 2018. (You may have seen an "under construction" message on the PayPal button.) During the upgrade, the PayPal integration on web (splitwise.com) remained live.

Change Log:

Updated 10/17 Tardily updated to reflect that the update has been completed and the changes are alive; Splitwise+PayPal integration is once over again usable on all platforms

Updated eight/20 Updated to reverberate belatedly August roll out
Updated 7/16
Updated to reflect expected launch date (early August 2018)

Last week, Paytm released an Android update (v6.vi.0) that caused a glitch in the Splitwise+Paytm integration. We have alerted Paytm to the issue and both companies volition piece of work quickly towards a resolution. March 2nd Update: This issue is at present resolved. Please update to the newest versions of Paytm and Splitwise.

The integration has been disabled for now and volition exist re-enabled when nosotros're confident everything is working as expected. We will post here with more than data as it becomes available. The integration has now been re-enabled.

A small number of users who settled up with Paytm in the final few days (since upgrading to Paytm v6.vi.0) may not take a matching payment in their Splitwise ledger. Users who were potentially affected have been personally contacted via electronic mail.

Go along reading RESOLVED: Paytm v6.6.0 caused a bug in the Splitwise+Paytm integration

We're excited to announce that Splitwise is at present supported by Zapier. This makes it like shooting fish in a barrel to connect Splitwise to the other services y'all honey, and automate sure workflows.

Splitwise is supported as both a trigger and an activity : New expenses can cause things to happen on other platforms (see Add together Trello tasks for new Splitwise expenses), and new expenses can exist created automatically later on things happen on other platforms (meet Create Splitwise expenses for new Google Sheets rows).

Beneath is an in-depth how-to for my favorite Zap: How to turn e-mail receipts into Splitwise expenses automatically.

Many thank you to our friends over at Zapier, who built this integration using the Splitwise API.

Continue reading Splitwise and Zapier: Plow emails into expenses, and more!

Good news for our Indian users – Splitwise has integrated with Paytm! At present you tin can repay whatever friend on Splitwise in seconds, using your Paytm account.

To access the integration, open a group or friendship where you lot owe coin, tap "Settle Up", then tap Pay with Paytm:

Screen Shot 2017-05-17 at 5.14.27 PM.png
"Pay with Paytm" appears if you owe an Indian Rupee residuum and have the Paytm app installed. Initiate Paytm payments from within Splitwise to take them be automatically recorded.

After you tap "Pay with Paytm", Splitwise will prompt yous to confirm the recipient's phone number and the payment amount. Striking "Next" volition fiftyaunch the Paytm app to consummate the transaction.

Screen Shot 2017-05-17 at 5.16.21 PM.png
You only accept to confirm a phone number once for a given friend, and can use your phone contacts if you've given Splitwise permission to access them. To edit a friend's Paytm phone number in the hereafter, tap on the phone number on the confirmation screen (pictured right).

Once the payment is complete, you'll be pushed back into the Splitwise app. Your Paytm payment will automatically be added to Splitwise and your balance will be updated.

Screen Shot 2017-05-18 at 10.25.35 AM
You can tap on the payment to see your confirmation number and other details.

A few things to note about using the Splitwise Paytm integration:

  • You need to have the Paytm app installed on your telephone. If yous do non take the Paytm app, you won't run across "Pay with Paytm" when you tap "Settle Upward".
  • You tin but settle an Indian Rupee balance (INR). If you go to settle a non-INR balance, you won't see "Pay with Paytm".
  • Only Android users using Splitwise four.1.ix and above will be able to send Paytm payments using this integration for now.

Users on iPhone and web volition exist able to receive and view Paytm payments, simply not send them. With Paytm's help, we hope to bring the integration to iPhone and other platforms when we're able.

We're thrilled to exist launching our first payment integration outside the Usa, and nosotros hope Paytm support makes Splitwise fifty-fifty meliorate for our users in India. To share feedback or ask questions about the integration, please send an email to support@splitwise.com – we'd love to hear from you.

Update ten:57am March 29: The Splitwise Venmo iOS integration has been re-enabled! To utilize it please upgrade to the latest versions of Venmo and Splitwise. If you need any assist, please send a notation to support@splitwise.com.

Update two:55pm March 28: The iPhone integration will be re-enabled tomorrow March 29. Please make sure you've updated to Venmo version 7.0.one and Splitwise version 4.four.7. If you demand to Settle Up today, please log into our website (splitwise.com); the Splitwise Venmo web integration is working at this time. Or yous tin ship your payment via Venmo directly and use our "Tape a cash payment" feature to later on update your residual in Splitwise.

Update 9:30am March 22: Venmo is testing a release that volition set this result.

Update 5:15pm March 21: Android Venmo payments are back to working normally.

Venmo released an iPhone update yesterday (version 7.0) that is preventing the Splitwise integration from working properly with the Venmo iPhone app. We are working with Venmo to resolve the consequence and will post hither with more data soon.

In the meantime, nosotros've temporarily disabled the Venmo button in the Splitwise app until this is resolved (on both iPhone and Android).

Venmo payments fabricated on the Splitwise Android app and website are not affected. Android users should have the Venmo integration re-enabled by the end of the twenty-four hours. If yous need aid with your account, please email the states at support@splitwise.com. Thanks for your patience.

UPDATE: Considering SpotMe shut downwardly on May 27th, unfortunately this importer volition no longer work.

Over the terminal calendar week, nosotros've created a simple importer to make information technology relatively like shooting fish in a barrel to switch from SpotMe to Splitwise.

Continue reading Importing data from SpotMe into Splitwise