[COFF] Code/comment Ratios Style
Mike Markowski
mike.ab3ap at gmail.com
Tue Jul 22 08:21:45 AEST 2025
I work in an RF lab where coding is focused on DSP with radio signals
sampled as I/Q, in-phase/quadrature, streams. I'd guess our source code
is about 50/50 code/comment. It certainly isn't assembly, which I do
remember having trouble reading my own code afterward. But it's similar
to commenting assembly in that complex math (as in real/imag rather than
'complicated') is not very clear to look at as code. It never looks
like the equations on paper, so comments try to bridge the gap -
sometimes gulf.
Because IQ sigs are bundled up as exp(j theta), python with its builtin
support for complex numbers is amazing for quick efforts. When there is
a real need for speed, well, I admit there's still the ol' grand daddy
of formula translation... :-) But C is there as well in our lab!
Mike M
On 7/21/25 11:27 AM, Paul Winalski wrote:
> When writing all but the most trivial bug fixes I always put in a
> comment referring to the bug report number. This helps with what can
> otherwise be a perplexing problem: "why is this bit of code there?"
>
> Good and copius comments were especially important in the days of
> handwritten assembly code.
>
> -Paul W.
More information about the COFF
mailing list