Idea 2 app in 1 monthA birds eye view of rails app development to cut corners, save time, save money and have fun
Before
After
An ideaIdeas are worth nothingDevelopment & Marketing take timeOriginal, simple ideas in 1 Month
The problem“Its hard to follow and join inconversation round a given topic with social media. Many people don’t get twitter”
The solution“Use advanced search to curate simple, useful conversationsaround popular topics.”Find the interesting stuff easily
Design firstI’m not a designer
Easy to build
Simple to understand
Min input for max useful outputMock it up
The designAlso radio, confs, news, brands…
Chat room style2 pages, 1 click.
Twitter Search – Poll vs StreamTwitter to do clever stuff
Fast flow of relevant tweets
Quick development
Cheap to hostPolling+ Super simple REST api+ Powerful query language+ No authenticationVariable unpublished rate limits
Result speed can varyPolling CodePowerful Queriesiprug OR from:iprug OR “ipswich ruby” OR ruby near:ipswich -weddingSIMPLE APIhttp://search.twitter.com/search.json?q=QUERY&result_type=recent&rpp=100&lang=en
Streaming+ Near real-time access+ Simple REST api+ Keyword filters+ AND and ORNo phrases or NOT
Hogs workers/processes
Not well suited to Heroku architectureStreaming CodeTracking keywordstrack=iprug, ipswich rubySIMPLE APIhttp://stream.twitter.com/1/statuses/filter.json?track=iprug,ipswichruby-uYOUR_TWITTER_USERNAME:YOUR_PASSWORD
Streaming In RubyThere’s a gem for thatgem install tweetstreamBuilt IN DAEmonizATIONTweetStream::Daemon.new(’usr','pwd')  .track('term1’, 'term2') do |status|    puts "#{status.text}"  end
Lazy Twitter SolutionSimplest: CURB the basic rest apigem install curbstatus = Timeout::timeout(timeout) dor = Curl::Easy.perform(url) do |c| c.headers["User-Agent"] = ”TB/1.1”end    response = r.body_strend
Lots of DB WritesOptimize importgem install ’activerecord-import’ tweets = []raw_tweet = grab_tweets()raw_tweet.times do |t|  tweets << Tweet.new(to_fields(raw_tweet))endTweet.import tweets
Twitter API Quirks- JSON and XML have different data- With Heroku must set a user-agent- Speed Varies- Query Complexity limits- Unpredictable rate limits
Twitter Sentiment AnalysisBayesian Classification with Classifier gem+ Interesting for age, mood, personality type- Not so good for sentiment on objectrequire 'classifier’b = Classifier::Bayes.new ’positive', ’negative’b.train_positive ”I <3 my iPhone”b.train_negative ”iPhone can’t make calls #fail”b.classify ”iPhone is a rip off #fail" # returns ’negative'
Twitter Sentiment AnalysisNatural Language Processing with Ruby LinguisticsFind the direct object of the sentence => “dog”"he is a big dog".en.sentence.object.to_sFind the infinitive verb form of the sentence => “be”"he is a big dog".en.sentence.verb.infinitive
Twitter Sentiment AnalysisCombination of the 2 seems to be successful for some people.
Seems complicated
No I’m too lazy
Cheat: Tweetfeel APIhttp://svc.webservius.com/v1/tweetFeel/tfapi?type=all&wsvKey=mykey&keyword=iprug
Extracting Interesting StuffI <3 rubular & regex
Detect mentions
Detect links
Resolve linksf.match(/@[a-zA-Z0-9_]+/)starts_with?('http:')http://api.longurl.org/v2/expand?url=http%3A%2F%2Fis.gd%2Fw&title=1

Idea2app