Reminds me of Tweet MVC, a PHP model-view-controller framework a former co-worker created for fun. Each component (like “model”) is 140 or fewer characters. It definitely doesn’t follow many best practices ;)
"And yes, I’m aware that using a pre-existing library to interface with the Twitter API might be considered “cheating”, but it would be downright impossible to fit the script into the size constraints without it. The API endpoint URLs alone would probably be long enough to push the script over the limit."
Edit: Before this turns into a gauntlet[1], I'm simply quoting the article so that people don't think the author is oblivious to this fact.
Just because he's aware of it doesn't mean it's any less silly. Want to see me write a fully functional optimizing c compiler in a tweet? "/usr/bin/gcc" :/
I'm fairly sure at least the posting tweets part of this won't work anymore since basic auth was turned off a few months ago. It looks like this was posted not too long before basic auth was turned off though.
well, you wouldn't really, or it would be the same code as presented here without the login information. oauth credentials are pulled from constants, a security file, or the environment, so it is just a different paradigm, but the code is actually just a little simpler, it is devoid of most login logic other than passing the keys.
The long API URL alone makes it pretty much impossible to make something useful, this "client" simply gets the latest tweet and can't post updates. Not much of a client, I know.
14 comments
[ 5.1 ms ] story [ 44.7 ms ] threadhttps://github.com/tweetmvc/tweetmvc-core
(But hey, `import twitter as t`? Abstract things enough and any super-simple program can be 140 characters)
"And yes, I’m aware that using a pre-existing library to interface with the Twitter API might be considered “cheating”, but it would be downright impossible to fit the script into the size constraints without it. The API endpoint URLs alone would probably be long enough to push the script over the limit."
Edit: Before this turns into a gauntlet[1], I'm simply quoting the article so that people don't think the author is oblivious to this fact.
[1] http://wordnetweb.princeton.edu/perl/webwn?o2=&o0=1&...
1. declare some consts and vars
2. import owl; print owl.new()
[1]: http://news.ycombinator.com/item?id=1952712