Bad IO/IR Case That I Found

I have recently developed a ruby wrapper for the API of one of the largest internet portals in Korea. Most of their RESTful API were well organized in a form of RSS or XML, but there was one very interestingly bad case.

http://dev.naver.com/openapi/sample/rank.xml

If you open the link above (please ignore Korean part of it), you will see an XML file. The file describes the real-time hot keywords searched by people, and items are ordered by its rank. When you see the tags embracing each keyword, the names of elements are “R1″, “R2″, “R3″ and so on. In the perspective of a 202er, it should be corrected to something like that below.

<result>
<items>
<item>
<rank>1</rank>
<keyword>ischool</keyword>
<change>+32</change>
</item>
…..
</items>
</result>

Or, at least, they should use attribute to describe the rank instead using element name for doing so.

Comments are closed.