-Поиск по дневнику

Поиск сообщений в rss_thedaily_wtf

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 06.04.2008
Записей:
Комментариев:
Написано: 0


CodeSOD: This Hits an Association

Среда, 26 Апреля 2017 г. 13:30 + в цитатник

I recently have needed to write some systems that do analysis on a stream of samples. The target stream of the analysis process was stored in a variable targetOfAnal, because obviously, thats more efficient to type than targetOfAnalysis. I of course needed an analProcess and analComplete flag, and yes, my inner 13-year old was snickering the entire time.

Jamess co-worker decided to demonstrate that immature dirty jokes should only be taken so far. James heard him cursing up a storm, and thus offered to help debug whatever the problem was. You could say this code is hitting the dirty variable names button a bit too hard. I present it here without modification, because honestly, there is no way to censor this code and have it convey its full meaning. Ready your alt-tab before the boss comes by:


for(int ishit = 0; ishit < shit.size(); ++ishit) {
  shitareas.clear();
  shitsubareas.clear();
  if(messed_up_order) {
    messed_up_order = false;
    continue;
  }
  if(shit[ishit].areas != "" || shit[ishit].subareas != "") {
    if(shit[ishit].areas == "" && shit[ishit].subareas != "" && ishit+1code>

Its a bit cheap to say this code is remarkably self-describing, but this is clearly a mishit. Its crass as the dickens. If this developer was paid in cash, it wouldnt surprise me. Imagine the code review- bet it would have been quite the pisser.

Honestly, its variable asdf thats the worst thing here, but maybe thats because I type Dvorak.

[Advertisement] Release! is a light card game about software and the people who make it. Play with 2-5 people, or up to 10 with two copies - only $9.95 shipped!

http://thedailywtf.com/articles/this-hits-an-association

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку