I was looking through some code the other day that generated web based documentation for a framework. They, of course, list everything in a table of contents layout with those being links to the actual files.
In order to achieve this, they break out each section into a file. So the first section is located in the file named “1. Introduction.txt”, and the 126.96.36.199 section is located in the file named “188.8.131.52 Section Name.txt” - simple enough?
They do not use another file to specify how to order these files, there is already a convention. They just execute a directory listing, then sort this list.
As an example, given this as input:
Should result in:
I wouldn’t worry about actually making the files. Just have a list of file names, then sort them to match up with how they are actually suppose to be sorted.
So I’m curious, do you think this is code kata? It is much shorter than other ones I have seen, but I think we do need variations of katas.