Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Hopscotch Stack

The Hopscotch Stack

In this talk, I focused primarily on the problem of surfacing good content in the Hopscotch community.

Event: http://stackuptalks.com/dev/2015/7/10/dev-stackup-ios-august-11-2015

Nina Baculinao

August 11, 2015
Tweet

More Decks by Nina Baculinao

Other Decks in Programming

Transcript

  1. Thomas 1. Started programming a year ago (learned Swift before

    Obj-C) 2. Went through Dev Bootcamp 3. Passions: music, cooking, philosophy 4. Favorite hopscotch character: Bear
  2. Nina 1. Also started programming a year ago (making a

    game with Obj-C & Cocos2D) 2. Returned to Columbia for postbac in CS 3. Favorite Hopscotch project: Challenge: Do Stargirl's Hair! ✂
  3. Our CTO Sam + We’re Hiring 1. This is our

    CTO and Co-Founder Sam John 2. We are hiring! Talk to us afterwards :)
  4. Web • Ruby on Rails • ElasticBeanstalk • Amazon S3

    • ElasticSearch • WebGL • TypeScript • Semaphore iOS • 50/50 Swift/Obj-C • MagicalRecord • AFNetworking • Kiwi • Amplitude • AppSee • Bitrise Our Stack
  5. Hopscotch fun 1. Users are super creative 2. Satisfying to

    work with children 3. Awesome team of people
  6. Technical fun 1. We are both a creative tool and

    a community 2. We are rendering games within games 3. We need to be COPPA compliant 4. Our app is big
  7. P1: Performance limits in UIKit Problem: • Drawing our characters

    and text is intensive and can lead to performance issues Causes: • Users are creating increasingly complex games • Cloning allows for projects to grow in complexity exponentially • We have high quality vector images of our characters Existing code: In our HSStageObjectView: • Override drawRect with our own drawImage function • Call setNeedsDisplay to trigger redrawing
  8. Solutions: • Create a shared ImageCache on UIView • Give

    the stage objects ImageViews • Trigger redraws from the StageObjectViewControler for more precision • Provide hard limits on character size and number of characters • Long term: move to Javascript and GL Takeaways: • It is kind of weird to have a game in UIKit (but cool also) • Giving the view an imageView allowed for faster scaling P1: Performance limits in UIKit
  9. P2: Surfacing Good Content Problem: • As a user, I’m

    not always guaranteed awesome content to play when I’m exploring beyond the “Featured” channel Causes: • Spamming for likes • Using Hopscotch projects to chat • More new users (yay!) experimenting with simple projects Solution: • Extrinsic factors (number of likes, remixes, plays, recency) • Intrinsic factors (projects stored as JSON) • Bayesian classifier to identify high quality projects
  10. P2: Surfacing Good Content Process: • Spend time playing Hopscotch

    and looking at project data to form hypotheses about useful attributes • Read about Bayesian spam filters • Build a tool to classify data for training set • Build classifier that can tell us which projects are great • Optimize and deploy code for production
  11. P2: Surfacing Good Content Advantages: • Save time finding potential

    features • First instinct to write a bunch of boolean checks not as comprehensive • Statistical approach can evolve with trends Disadvantages: • Big time investment labeling • “Greatness” is a subjective measure • High standard deviations • Tradeoff between false positives (spam mistakenly identified as ham) and false negatives (the opposite) • Still requires manual curation
  12. P3: Being Cross-Platform Problem: • Not everyone in the world

    has an iPad Solution: • A hopscotch web player • TypeScript and WebGL
  13. P3: Being Cross-Platform Advantages: • Performance benefits of WebGL •

    Better testing with Jasmine • TypeScript ~= Swift • Javascript Ecosystem Disadvantages: • Time investment • Tooling around TypeScript Takeaways: • Made us want to do more Javascript
  14. What’s next for Hopscotch? 1. Getting “older” 2. Getting onto

    more platforms (iPhone, Android) 3. Increasing the power of the language