News

 
  • 07 May

    RubyMotion Success Story: Countable

    Countable Banner image

    After Bart Myers and Peter Arzhintar sold SideReel in 2007, they decided to apply their experience and knowledge towards an app that enables a powerfully direct and immediate form of democracy. Countable is an app that gives U.S. Citizens a way to learn about what issues are being discussed in Congress, and enables them to take immediate action.



    We endeavor to make Countable the most important app you use. It does something that has never been done before: give people an easy and portable way to see what is happening in government, get your voice heard and, in near real time, make sure your Representatives are listening. Nearly every attempt that has been made to do this was attempted with a politically savvy insider in mind as their audience. We endeavor to take the politics out of it and make it about governing - moving us closer to a direct democracy - where our representatives become an extension of our will.

    What background did you come from when you started to build Countable?

    The Countable team includes folks from both consumer internet and journalistic backgrounds. We’re not political insiders by any means and were largely trying to build a product that the average American could use to understand what’s happening in Congress and give us a way to effectively evaluate our Representatives.

    What can users accomplish with your app?

    Countable screen shot

    We built a simple iPhone app that presents key legislation before Congress in an easy to understand manner - with big pictures, a clear, concise description, a pro and con argument, and resources to learn more. We give you a single action to take - vote YEA or NAY on the bill. Once you vote you can send your vote to your representative with one click and then you can share that you voted easily to FB or Twitter.

    From there you can look at how your Representatives have voted on legislation, browse legislation by topics or issues that you care about, and generally stay informed. Users dig it.

    Why did you choose RubyMotion?

    The team is very comfortable with Ruby, we are using it extensively, and RubyMotion was really a no brainer as it solved a few key problems for us: rapid development, little retraining, and a native experience with access to key iOS functionality like notifications.

    How did RubyMotion help accelerate your development?

    First and foremost, being able to use the editor of my choice rather than Xcode while developing this app was HUGE. We did lose autocomplete, but being able to manipulate text programmatically in Vim sped up development by quite a bit. The other major win that we got from RubyMotion was to be able to write legible simple code. Objective-C code always seems to look just like a ridiculous garble of square brackets. Converting copied Objective-C into Ruby just felt happy. I would frequently go from a half dozen of complicated nested data manipulations to 5 clearly labeled simple methods.

    What parts of RubyMotion development would you like to see improved?

    We had a couple of issues with memory management. The way Objective-C determines whether or not it can remove an object is based on how many objects are attached to it not based on whether is even accessible to the current thread. Leaving any instance variable set on an object would just keep that object around in memory. We ended up writing a solution that nils out all instance variables when destroying an object. It would be great if RubyMotion acted a little more like Ruby here. The other thing we felt needed some work was the logging. If a method unintentionally called itself, the process would fail silently. It would be excellent if the process could actually throw a SystemStackError: stack level too deep exception. We can run the process with debug=1, and get trapped in a debugger where the fail exists, but even that debugger has a lot of garbage in its stack trace. Exceptions in general are not actually handled very well. We tried to send google analytics exception backtraces - locally calling exception.backtrace worked fine, but on the actual device, it returned nil. It would be fantastic if the Ruby file backtraces could be returned from a device.

    How did you get help when you ran into a stumbling block?

    For the most part, Stack Overflow was our friend. The debugger was occasionally helpful for finding line numbers, but we used a lot of print statements.

    Did you take advantage of any third party gems or CocoaPods?

    We did, we used ProMotion as our main framework, which did give us a few helper methods that we liked, but largely felt like it was not entirely well thought through. Once we pulled in SugarCube, everything came together really well. SugarCube is awesome. The animations, colors, gestures, and notifications helped us write code that felt good. I would still like to spend some time setting up a framework for our app with a proper event driven system using sugar cube's events.

    Countable App Icon

 
 

Want to stay in touch?

Follow us on Twitter