Treat HTTP status codes as strings

13.05.2017

Web

I usually see HTTP status codes being checked as integer numbers: if ((status >= 200) && (status < 300)) // or `<= 299` This is rather verbose. But if you think about it, it's the first digit in the number that has a special value, and there are only five ...

Versioning REST: another angle

27.07.2015

Web, Software design

I've got an interesting comment on "Versioning REST APIs" that boils down to these points: Sometimes you can't really afford breaking clients (ever, or long enough to make no matter). A global version allows to freeze an old code base and have new implementation to be completely independent. This is ...

Versioning: follow-up

24.07.2015

Web, Software design

After reading a few comments on reddit and by email about my post on versioning of REST APIs I see that I wasn't clear on terminology and have left out some context. That's okay! Overthinking details is the main killer of all my interesting thoughts :-) I'd rather post more ...

Versioning of REST APIs

21.07.2015

Web, Software design

Don't version APIs, version resources. I.e., this is wrong: https://example.com/api/v1/resource Global version number has a few problems: A backwards incompatible change to any one resource invalidates all clients, even those who don't use this particular resource. This is unnecessary maintenance burden on client developers. It constrains development on the server ...

Problem with JSON encoding

22.03.2015

Web, Software design

JSON spec says that a UTF shall be used to encode it as a byte stream (with a strong preference to UTF-8). However it also allows characters to be encoded in the form of \uXXXX. This poses a problem on the parser implementation side: You have to decode a byte ...

Anti popup policy

07.09.2014

Web

I just adopted a new policy. Whenever I come upon an article that I want to read and possibly share, if the site obstructs my reading with a popup telling me to take part in their survey (or some such, I don't really pay attention to them) I respectfully close ...

OAuth is not a protocol

30.07.2012

Web, OAuth

Though this post is obviously triggered by the recent damnation of OAuth 2.0 by the (former) spec editor Eran Hammer, it's not directly related to it. These are my thoughts about the technical role of OAuth that I wanted to blog about a year ago but couldn't force myself to ...

Rainbow.js — a new kid on the highlighters' block

26.03.2012

My software, Web

There was a small spike in my referrers stats that led me to a new JavaScript highlighting library — rainbow.js. And since I love bashing other highlighters I couldn't resist this time too :-). Oh, but be sure that all of this is intended of course as a constructive criticism ...

Difference between OpenID and OAuth

14.07.2011

Web, OAuth, OpenID

Surprisingly there's much confusion between "OpenID" and "OAuth". People tend to use them as interchangeable terms or consider OAuth as a kind of a new and improved version of OpenID. In fact they are quite different things. I decided to write down my explanation to have a place to link ...

Restyling

04.09.2010

Misc, Web

I've made a small restyling of the site involving mostly the blog and the forum. Had to remind myself some of my old rusty CSS skills :-). As usually I welcome criticism though, as usually, it's unlikely to change much :-). Not because I'm stubborn (which I am) but because ...