3 comments:

Well the first is actually a pretty normal thing to do in languages that have no block comments (like ASP web pages). You might think that it would be nicer to write "if false then" in that case, but it's far easier to turn the block of code on and off by changing just one number than by deleting "false" and typing "true" ;)

And the second can be found a lot in shell scripts where actual textual substitution of variables might be done before the code is parsed, so if nameString was empty the code would be turned into something like:

if ( != '')

which would be a syntax error. So it's normal to write something ugly as:

if (nameString 'x' != 'x')

because in most shell scripts you don't need the + for joining strings this is actually valid regardless if nameString is empty or not.

It might be that this is a shell programmer that went on to Java or C# but still has to unlearn some of his old habits ;)