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


当前回答

回顾类中的旧代码很有趣……

    cardDeck.push_back(*(new card((rank)r, (suit)s)));  // Push each card onto the deck
                                                        // Temp. objects are overrated

在经历一些事情的时候,它让我希望我在凌晨4点随机编码的时候留下更多的评论……

其他回答

catch (Ex as Exception)
{
     // oh crap, we should do something.
}

没有什么比一个空的catch块更能让人觉得代码是健壮的....

#define FUCK_VS6_CANT_COMPILE_TEMPLATES_WITHOUT_HANDHOLDING ((float*)0)

... 

SetPinsFromChannels`<float`>(&pinbuf, streambuf, &inmapper, FUCK_VS6_CANT_COMPILE_TEMPLATES_WITHOUT_HANDHOLDING);

我看到一些旧的fortran代码:

     integer *4 one,two,three;

c    asssign one to 100 before entering the loop
     one=100;
i++; // increment variable i
//this is a crap way to do this but I ran out of patience

DelButton.click();