ITT we post Really Stupid quotes [asbestos req'd] (27)

11 Name: #!/usr/bin/anonymous : 2007-06-03 16:41 ID:vw1IbHvM

Every paragraph of code, huh?

That seems a bit excessive.

I find most of my "paragraphs" (i.e. runs of lines of code without a blank line between; I guess this is what >>10 means) are obvious enough that no comment is needed, and any I did add would just be a silly distraction. (This is in C.)

But I take a few steps toward code readability that I think many people don't. For instance, to convert from dB to a voltage ratio (formula: ratio = exp(dB * ln(10) / 20.0)), I define a constant M_LN10_OVER_20, instead of using the value 0.115129254649702284200899573 directly in my code.

I've found that in a lot of audio code, people will just slap values like that in their code directly, and it drives me up the wall when I'm trying to figure out what's being done.

I guess my standard is, if, while reading other people's code, it drives me up the wall, I won't do it in my code. And I read a lot of other people's code -- as well as rereading my code to make sure it meets this standard. So that really works well for me.

This thread has been closed. You cannot post in this thread any longer.