3 ms·
I am impressed that he did this in two hours, but at the same time, I am dismayed that I am impressed that he did it in two hours. Why are 'simple' programming
by anonjon 17y ago
I am impressed that he did this in two hours, but at the same time, I am dismayed that I am impressed that he did it in two hours.
Why are 'simple' programming tasks often so hard?
For example: I spent hours trying to figure out what was wrong with my oauth requests to twitter last night. Just kept getting "401 Unauthorized" over and over. Still haven't figured it out. (The worst part has to be that I was using a library and serious debugging ended with me following the instructions on the tutorial step-by-step; I still got the error...).
My question: Why should this app take 2 hours? Why shouldn't this take 2 minutes? All it is is a little form that stores the number of push-ups you did and the week. Why is everything so hard? Why is so much of my life painful library wrangling?
- FreeRadical 17y agoThere was a good twitter oauth script written by jaisen mathai which you many find useful, unless you don't like PHP. :) http://www.jaisenmathai.com/blog/2009/03/31/how-to-quickly-integrate-with-twitters-oauth-api-using-php/ http://www.jaisenmathai.com/blog/2009/03/31/how-to-quickly-i...
- boundlessdreamz 17y agoWhich library ? which language? If it is ruby/rails I can point you in the right direction. mail me at manu@manu-j.com
- anonjon 17y agoIt was clj-oauth and clj-apache-http. I've been working on building a generalized DSL for http-requests (based on a site structure description generate the request-functions). I figured it would be interesting to test it with twitter's oauth. It works quite well for http-get requests, didn't work very well for post requests (ex. status updates). Squinted at it, macro-expanded a few times and fixed a bug... now it seems to be generating the right code. Still not working So I went back to the base case (libraries without my DSL over-top, direct from tutorial), posts still didn't work. Anyway, the interesting thing is that posts will work for very short strings, or strings that are very repetitive (a string full of s's 'ssssssssssssssssssssss...' would post, as would 'wtf' and 'ww'; 'well this is a nice message', would not...). Much hacking and fussing and resetting of keys later, it was 4am and I had to get up and work in a few hours (did I mention I was doing this for fun? sigh). So I'm starting to think that something may have changed in twitter's oauth spec between when I downloaded the libraries and when I got back to using them (it was a few months). Other than that, I suppose my next step would be to look at some other implementations and figure out if there is a bug in the what I am using. I guess my point is, even easy things aren't easy.