3 ms·
I agree 100% with the article. I've just written a script which makes every one of the mistakes listed in the article. I am consuming a JSON based API in a lon
by tony-allan 10y ago
I agree 100% with the article.
I've just written a script which makes every one of the mistakes listed in the article. I am consuming a JSON based API in a long ugly mash of code, exactly as described. It doesn't look pretty.
In my defence, I wrote the code as I was trying to understand the API. I had not read ahead and didn't really know which API's I would need or how fiddly it would be to bring it all together.
I am now exposed to pain if the API changes or if anything breaks. Time to go back and tidy up the code!
- tony-allan 10y agoI went back and fixed the script to turn a portion of the JSON API into a set of useful Python objects. The code looks mostly OK now. It's no surprise that it took about the same amount of time again to tidy it up. Apart from making me feel better, and a promise of less work in the future for updates, it's hard to justify the extra effort.