Fucking C Programmers

author Posted by: whaledawg on date Sep 25th, 2008 | filed Filed under: general

So I’ve been working on my project for about a month now. Maybe 5 weeks. That’s 5 weeks at 40 hours a week, a pretty hard core time investment. And I’ve spent the last week, 20% of it, trying to parse a god damned .OBJ file. Fuck me.

And you might think that after investing this much time in understanding one file format I’d stick with it. I could get my engine to use the same files and just add a few new lines to represent my stuff(physical properties and the like). But writing something to parse this crap once tells me how poorly designed a file format it is.

A good system, game engine, file format, database or whatever, keeps you thinking as high up as possible for as long as possible. That’s why XML is so popular, you define everything by the rules of the shcema. I don’t have to think about the rules, they’re allready defined. That lets me concentrate on my data, the ‘high minded’ part.

With these old file formats I’m constantly thinking about the rules. When can you use a negative index? Is there a default material? Do I have to look at the material before I look at the .OBJ file, and how do I do that if the material file is listed inside the .OBJ. There’s too many valid ways to do the same thing and they involve too many unrelated sections of the file.

And why would they make a file format like that you ask? C programmers. Those mesozoic mother fuckers. See, to guys who wrote programs that parsed FAT12 any ASCII file seems simple.  And if the format updated or added new features they just spent days wading through code to find out where/what needed to be changed. As long as they had a human readable file they were happy to do it.

So now I have to deal with their poor design choices. Fuck me.

Programmers vs System Engineers

author Posted by: whaledawg on date Sep 5th, 2008 | filed Filed under: general

Code MonkeyAn important part of my project(any project) is documentation. Toward this I looked at quite a few documentation systems and decided to go with Doxys. It’s an extension of the open source Doxegen, but they fixed the HTML output. Doxegen tended to make massive, hard to read pages.

The problem is the guy who wrote Doxys is a programmer. Programmers see a problem and work from the ground up to fix it. Since Doxegen is open source the author was able to get right into the code and make the output exactly what he wanted. Which is good, right?

Except that Doxegen can also output in XML. A system engineer would have looked at that and seen how much easier it would have been to write a program that parses the XML and outputs the HTML from that. Let Doxegen do the heavy lifting and your program can work on the actual problem, hard to read HTML pages.

I admire programmers(I obviously consider myself one) but this mini-asperger thing is probably the biggest problem in software engineering today. Guys with incredible knowledge build programs to do a job and then when the job shifts slightly or there’s a problem with it the team has an impossible time fixing it.  A little forethought would have made Doxys a force to be reckoned with. Put a web interface on an XML parser and you have the greatest documentation tool out there.

Instead you have a slightly less annoying auto documentation system. Which would you rather have your name on?

Note: I’m not mentioning the author by name because I really do appreciate his tool and am thankful for his work, but it just could have been so much more