I think I rather unintentionally hit a milestone.
So I wrote that program to read in the binary files, but for the most part it was skipping over stuff I didn't know what to do with since each data block header told me how much to skip.
I was idly thinking about it rather quickly banged out the code to give me nice and neatly more data (32 numbers in a row).
It's nice when I go from thought to result in less than a minute and it compiles the first time!
EDIT: Do I use too much indentation? I've always like well indented code but it's tough to embed it...
Huzzah!
ReplyDeleteRegarding indentation: I normally set my tab stops to 2-3 spaces and have the editor replace tabs with spaces (to make the code consistent across editors with different tab settings). I also use the following (widely accepted) code formatting style:
if( something ) {
type junk;
for(junk_init;conditions;action) {
type garbage;
}
}
Putting the braces on a line of their own like you did is also acceptable, but I rarely see indented braces.
Well poo, my whitespace was stripped.
ReplyDeleteI'll defer to this:
http://en.wikipedia.org/wiki/Prettyprint
I prefer BSD style, but it looks like you're using GNU style with large tab stops.