你遇到过的源代码中最好的注释是什么?


当前回答

不是在代码中,而是在相关的bug跟踪系统中:

这不可能是我代码中的bug。我非常小心地编码。

其他回答

//Time log says you've been here for 15 hours GO HOME, your code is hobo
//ALL YOUR BASE ARE BELONG TO US

...这让我的老板以为有人黑进了系统。他不知道这个笑话。

场景一:

return 0; // Happy ending

场景二:

int32_t Interpolate1DSignal(
  Array1D<float64>::Handle hfInputSamples,         // samples to be interpolated
  Array1D<float64>::Handle hfInterpolationFilter,  // polyphase filter coefficients,
  int32_t iFilterInterpolationFactor,              // # of "rows" in polyphase filter
  int32_t iFilterLength,                           // Length of each row in filter
  float64 fInterpolationFactor,                    // Factor to interpolate the
                                                   // signal by
  float64 fTimingOffset,                           // Offset into the signal (units   
                                                   // of samples)
  Array1D<float64>::Handle hfOutputSamples         // left as an exercise for the reader
);
Get This hack!

在一行汇编代码中,在几页未注释的代码之后。

// This code sucks.