So, welcome to the next edition of developer news. Sorry there wasn’t one last week. It was a case of a lot of client facing work last week combined with the fact that out of the items I had been monitoring, nothing really stood out as worth pointing out.
Here are the top items from this week that I think are worth taking a look at.
1 : Why GET requests should be idempotent
First up is a tweet that has gained a lot of coverage illustrating why GET requests should be idempotent. I’ll let you read it for yourself, but it involves browser tabs automatically opening and closing your garage door! There’s a lot of follow up discussion both on Twitter itself as well as on Reddit.
I spend a lot of my time working with developers, and pretty frequently get involved in helping teams define a sensible API structure. It’s something that can be so easy to wrong if you don’t approach it from the right perspective.
I recently encountered an API where every single endpoint was a POST request, and rather than being designed around application behaviour and data, it was a direct representation of the screens within each mobile application. Needless to say, that is a massively difficult API to maintain!
2 : TSB issues caused by poor testing and scoping
Next, is an Reuters article on the recent TSB bank outage here in the UK. The article goes into detail following comments from some contractors familiar with the issues and codebase. From the sound of it, it comes down to poor testing, poor scoping, and rushing features out the door.
3 : On Long Variable Names
Finally for this week is a stack exchange post asking for research on benefits of more expressive variable names in a codebase, something they found has helped them read existing code. (I really love the fact that the URL for this is truncated..)
Again, there’s also a pretty sizeable discussion around that post on reddit too.
It’s something I have always been a fan of. Not to make variables needlessly long for the sake of it, but to make them the right length to convey their meaning.
I have worked with so many developers that seem afraid of anything other than really short variable, function, or class names. When questioned on why they went for a short name, the typical response is well, that would make it longer. yes! it would, but it would be far more readable if it was not truncated unnecessarily.
I think the whole short variable name thing is another one of those things that has just become common practice, without most people really stopping to question readability of code after the fact.
So, that’s it for this week.
If you have any articles, announcements, tutorials, or anything else you think should be included next week, then just drop me an email.