これまでに出会ったソースコード内の最高のコメントは何ですか?
ベストアンサー1
私は特にこの点で罪を犯しており、非建設的なコメント、コード詩、ちょっとしたジョークをほとんどのプロジェクトに埋め込んでいます (ただし、コードをリリースする前に直接的に不快なものはすべて削除するだけの十分な判断力は持っています)。私が特に気に入っているのは、設計の悪い「神のオブジェクト」のずっと下の方に配置されたものです。
/**
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
*/
ごめんなさい!!!!どうしても我慢できなかったんです……!
そしてもう一つは、私があまり直感的ではない授業の 1 つで実際に公開したいという強い誘惑に駆られたにもかかわらず、実際に公開していないことを認めます。
//
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 42
//