Thursday, March 13, 2008

на досуге читал исходники ogg theora и иже с ними.

декодер

/* never forget that globals are a one-way ticket to Hell */
ogg_sync_state oy;
ogg_page og;
...
#ifdef _WIN32 /* We need to set stdin/stdout to binary mode on windows. */
/* Beware the evil ifdef. We avoid these where we can, but this one we
cannot. Don't add any more, you'll probably go to hell if you do. */
_setmode( _fileno( stdin ), _O_BINARY );
_setmode( _fileno( stdout ), _O_BINARY );
#endif
...
/*Yes, yes, we're going to hell.*/
#if defined(_WIN32)
#include < io.h>
#endif


енкодер
/* You'll go to Hell for using globals. */
...
/* You'll go to Hell for using static variables */
...

3 comments:

DrMouse said...

А комменты типа
/* гавно */
или такие декларации:

int gavno;

тебе ничего не напоминают?

Мой Google Desktop Search жжёт! Я в курсе многих приколов подобного плана в нашем коде.

voodoopeople said...

щас, процитирую то, что меня регулярно радует, когда натыкаюсь.

#define MSG_WHAT_THE_FUCK 0x00000005 // target does not understand host :)

конец цЫтаты

DrMouse said...

Не стоит забывать, что Гугль Блог Спот, возможно, что-то там просматривает у себя в Code Search и сам оценивает то, что ты написал. Вот отсюдв видимо и корни его «проницательности».