4 ms·
Twhoops - Rails app built in 5 hours
- cschneid 18y agoWhat took 5 hours there? I assume it is mostly the design part and css tweaking, since the functionality is pretty damn simple (and a few lines out of a gem). I'm not being snarky, I'm curious where the time went on that project. Also, a small plug for Sinatra, that app is perfect for it (or any other microframework).
- mechanical_fish 18y agoBased on my own experience: 1 hour: rough version of the app 1-2 hours: design and css tweaking 60 seconds: testing in IE 1 hour: sobbing, taking to drink 2-6 hours: working around IE's quirks So, yeah, that adds up to a minimum of 5 hours for just about anything.
- charlesju 18y agolol you say it like a joke, but i just did that exact cycle last week when I found out about IE's improper HTTP Headers (even in IE 7!!!)
- apgwoz 18y ago> Also, a small plug for Sinatra, that app is perfect for it (or any other microframework). Why even use a framework at all? There's no interaction. Serving a page generated from a cron job would be the best way to do it.
- cschneid 18y agoTwitter moves fast enough that you probably want to re-fetch every time and display. But you're right, this is a very simple problem, just felt like rails was taking a sledge hammer to it. Not to say it isn't a cool idea, it is.
- apgwoz 18y agoWith a high traffic site, Twitter won't appreciate that sort of polling. Once every 45-60 seconds is probably suitable, wouldn't you think. Especially if you use a count=200 and a since_id. How often do people twhoops?
- elliottkember 18y agoSurprisingly often - a couple of times a minute. It polls every minute and that seems to be more than enough.
- ahoyhere 18y agoAgreed. My little project, Twistori (http://twistori.com/ http://twistori.com/), is served up as a static file, which is periodically compiled from a SQLite database of scraped tweets (which is in turn created by a Ruby cronjob). It took about 14 man-hours (1 working day x 2 people) from initial concept -> completion.
- elliottkember 18y agoOh, hey - I remember Twistori from when it first came out :) Great app, really like it. Twhoops works the same way - it's just that using Rails made a couple of things easier for me. It's not really an app at all - but if I did ever want to add serious functionality to it, all the fiddly bits are in place thanks to Rails.
- ahoyhere 18y agoGlad you like Twistori. But how can it act the same way? There's no web framework in our pipeline at all. It is literally a static HTML file on the server.
- elliottkember 18y agoOh, I meant in general, it works in the same way. A cron job handles the pulling, and putting the tweets into the SQLite file - but with Rails, instead of just Ruby. I was trying to say that Rails just sits on the cron job and made it easier to parse the API. Hope that makes a bit more sense.
- elliottkember 18y agoyeah, the design and CSS tweaking took a lot of the time. I hadn't done any Twitter / search.twitter API stuff in Rails before either so it took some time to find the best way of doing things. Plus, I was watching a couple of movies - that didn't help.
- Steve-UK 18y agoReally need to get in on coding in Rails, not tried it as of yet. How does working with Twitter API differ much from other languages in Rails though? Still based all around parsing the atom feed from Twitter surely. http://search.twitter.com/search.atom?q=oops http://search.twitter.com/search.atom?q=oops
- cschneid 18y agoDidn't look close, but this gem might do it: http://twitter.rubyforge.org/ http://twitter.rubyforge.org/ In addition, there are more generic atom parsing gems that make coding quick. The great thing about ruby is the ease of making mini-dsls that make things like this trivial.
- elliottkember 18y agoYeah, that's one - there's actually two APIs going on here. One's the search.twitter.com API, and one's the official Twitter API. The search API is used for finding them, and the Twitter API is used to fetch profile images and follower counts.
- pxlpshr 18y agoI guess I'm going to be the cynic here and ask, how is this an "app"? Unless I'm missing something here, where is the utility that constitutes the label of 'application'? Like "cloud", I think a lot of people are misusing the word "app". In my opinion, an app suggests a meaningful purpose... otherwise it's very much akin to "art" in relation to design. Sure, art is beautiful and often conceptual... but design is form AND function. A widget - maybe - but calling it an app seems a little overkill.
- cschneid 18y agoCode that runs with a purpose. Why is this not an application? I get what you're saying, but a widget is a subset of application. Widget has all attributes of application (code that runs), and then has additional attributes (limited size & scope). I don't think the word application has any semantics that limit it to "useful".
- pxlpshr 18y agoI made a web-app yesterday, it printed Hello World except in l33t text. And I think that's the problem with SOME developers mentality about software. Just because it runs and compiles, does not make it an application consumers will use for lots of obvious reasons. If you want to be successful in software development, I would toss out the textbook semantic definitions, and focus more on 'applications of' technology that solves problems.
- mbreese 18y agoIn my mind, a web-app requires interaction... otherwise it is just a website. Now, the website can be backed by a rails-app, but to call this an app bit much. In my mind, it's a dynamically generated website.
- elliottkember 18y agoYeah, that's fair enough - I wouldn't call it an app either, and I made it. There's a rails app in there, but it's only generating a page. Rails made the generation process much easier, though :)
- nir 18y agoShameless plug: I thought it was a neat idea so I built a similar app in with FeedVolley: http://feedvolley.com/oops http://feedvolley.com/oops - no code required :) If anyone's interested, you can clone this with the "Create a page like this" link on the top right and use your own HTML and search terms...
- elliottkember 18y agonice work! Can you get it to load in avatars, too?
- nir 18y agoThanks :) The avatars are in the Atom feed, so theoretically yes, but I currently don't have a tag that accesses this particular item. I guess I should some generic 'parse XML' tag..
- nihilocrat 18y agoI think this would be more useful if we also got a statistic of total tweets per hour vs. total oops-related tweets per hour in order to chart some sort of unscientific likelihood that someone on the Internet will make a mistake.
- nirmal 18y agoAnd once you know that the mistake happens ... http://xkcd.com/386/ http://xkcd.com/386/
- elliottkember 18y agoHey, I built this :) - thanks danw. Edit: moved @replies around.
- ivankirigin 18y agoFun. But this isn't even a rails app. Make a static HTML page with some javascript that parses http://search.twitter.com/search.json?q=oops http://search.twitter.com/search.json?q=oops You should put a tipjoy twitter widget on your page though :) http://tipjoy.com/twittertools http://tipjoy.com/twittertools
- wallflower 18y agoThe Rails App built by Dave Troy that I believe set the standard for 'he/she coded it in how much time?!' is http://twittervision.com http://twittervision.com "He wrote it in four hours using Ruby on Rails." http://scobleizer.com/2007/03/22/meeting-the-geek-behind-twittervision/ http://scobleizer.com/2007/03/22/meeting-the-geek-behind-twi...
- resetpassword 18y agoI'd give Tumblr a shout-out in your about page for design inspiration.