Какой наименее полезный комментарий вы когда-либо видели? [закрыто]

Добавьте это в свой global.asax

private void Application_BeginRequest(object sender, EventArgs e)
{
    Context.RewritePath(System.Text.RegularExpressions.Regex.Replace(
               Request.Path, "/rest/(.*)/", "/$1.svc/"));
}

Это заменит / rest / Service1 / arg1 / arg2 на /Service1.svc/arg1/arg2

20
задан 10 revs, 3 users 47% 23 May 2017 в 12:09
поделиться

96 ответов

Недавно я обнаружил это в коде, который написал много лет назад:

// it's a kind of magic (number)
$descr_id = 2;
$url_id = 34;
0
ответ дан 17 October 2019 в 02:38
поделиться

Я увидел потрясающий код внутри части игры, связанной с ИИ:

..."AI code"...
if(something)
   goto MyAwesomeLabel;   //Who's gonna be the first to dump crap on me for this?
..."More Ai code"...

MyAwesomeLabel:
   //It wasn't that hard to get here, right?
   ..."Even more AI code"...
0
ответ дан 17 October 2019 в 02:38
поделиться
[some code]
// [a commented out code line]
// this line added 2004-10-24 by JD.
// removed again 2004-11-05 by JD.
// [another commented out code line]
[some more code]

а) ПОЧЕМУ? б) Какая строка?

0
ответ дан 17 October 2019 в 02:38
поделиться

This comment was actually written in a different language, but I'll try to get the effect across in a translation:

//we trick it, if forbidden, as if it had already existed

What the comment was trying to describe was the way it was dealing with list items that were turned off - the code marked the item as a duplicate which should therefore be skipped. Yes, a very bass-ackwards way of doing things, but it paled in comparison to the nonsensical comment.

0
ответ дан 17 October 2019 в 02:38
поделиться

# Ниже приведена документация-заглушка для вашего модуля. Вам лучше его отредактировать

0
ответ дан 17 October 2019 в 02:38
поделиться

// URGENT TODO: Переделайте это дерьмо, старый код сломан как черт... а мы думали, что решили все проблемы

Только что обнаружил это в одном из своих старых проектов. Сначала я смеялся, но в конце концов я стал ругаться, потому что так и не смог найти ошибку.

0
ответ дан 17 October 2019 в 02:38
поделиться
Другие вопросы по тегам:

Похожие вопросы: