- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
wParam, lParam anyone? It was exactly this phenomenon in a large project that convinced me to finally start the long and painful process of "unlearning" Hungarian Notation.
It's not that Hungarian Notation isn't useful in some cases it's that 90% developers who use it can't function without it and use it as a crutch in place of thoughtful variable naming. If you're naming your variables objCDO you are hopelessly, hopelessly lost, and your only course of action is to give up Hungarian Notation completely.
Admin
OMFG OMFG OMFG OMFG OMFG .... DAMN DAMN FUNNY!!!
Sadly... I have seen the like of it... done by perl guys who are mainly LAMP admins but not really programmers... so they do the web pages the same way that they do their bash scripts.
Admin
cat "hello there" | mail -s "subject" [email protected];
;... no thats too easy. Though you have configure mail of course.
Admin
That's brain-damaged. I recommend upgrading the whole configuration to Linux -- I hear it's the latest thing. Then for legacy compatibility you should run virtualization software -- that's really the latest thing -- so you can run Windows under virtualization, and then run that script under Linux; the script can still generate an ASP file which can be loaded into the virtualized process and....the rest of the exercise is left as an exhausting exercise for the reader.
Admin
Indeed, I was had to pay a visit to HQ for contracting company worked for. They had assigned this old, chubby, deluded chap who thought that instead of sending data(csv,xml,etc) to some service, you send python code which is then execute. I was too polite to assault him there and then, I merely stated that security for such and idea is extremely risky and application internals would need to be exposed. It was pure madness...I started calling him Mince, it was Vince, but Mince sounded appropriate.
Admin
The real WTF here is that anyone still uses Perl.
Admin
Hungarian notation is lame, but it is especially lame when used with unextended objects. 'objWhatever' is hardly more informative than 'whatever'.
Admin
The real WTF is that you're involved with the issue. They wrote it - they support it. I'm sick of incompetent developers handing off their shit to someone else.
Admin
[quote user="GF"] Ah, the old "what if the data type changes" argument. You know, in 15 years of professional programming, I think I've seen that maybe 5 or 10 times. The benefits of Hungarian notation 'as it's used' far outweigh the supposed 'risks', especially when you're trying to scan through unfamiliar code.[quote] What are the benefits of encoding the type in the variable name? In statically typed languages, there are none, plain and simple. The type is stated when the variable is declared, which should never be far from where it's used and is always readily available in any IDE worth using.
And dynamically typed languages? Well, if you need to know the type of each variable at all times, use a statically typed language, that's their point.
[quote]Here's a secret - it doesn't even matter what the prefixes are, as long as they're consistent with each other.[/quote] Wrong. What matters, the ONLY thing that matters, is that the variable names help understanding the program's logic. Type prefixes don't. At best, they're superfluous.
Admin
Admin
Admin
Reminds me of an PHP web application I saw as an intern some years ago. It didn't store the users in a DB or flat file. It saved them to another PHP script as a new case block into an existing switch block. All "secure" PHP scripts of the application had to include said script ...
Admin
Nothing. All input is checked with Javascript in the browser.
<duck>Admin
That's ridiculous...
On a side note I think I'm the idiot that wrote that port of Matt Wright's FormMail script that used BLAT... I hope nobody is still using that abomination.
Admin
Yes, I'd avoid adding ASP into the mix. (Or, more generally, using it at all.) But I'm making no assumptions about the business "logic" in the organisation, which for all I know has a PHB architect insisting that all mail messages go through ASP.
Yes, I'd avoid hard-coding, particularly for the silly temporary file. I assume, since this little script has been sitting around for a while, that this design mis-feature hasn't caused significant problems up to the point where the server is moved. But, yes, it's dumb.
Yes, I'd use Mime::Lite (or something). However, it's not a part of the standard distribution. Extrapolating from the presumption that this is an ASP shop, I suspect the developers would have had exactly the same problems that I've had on Windows systems, trying to get some simple piece of functionality installed.
I agree: you are correct on every point.
However, in the real world, stuff like this seeps into production. Fine, as long as
(a) it works (b) it's intelligible (and therefore maintainable) (c) it's safe (and here I agree with you about the lack of sanitized input -- a WTF that is both common and strangely unremarked in previous posts on this thread) (d) it has a clear enough interface to be replaced in situ when the need arises.
This really isn't a WTF. It's just your ordinary, bog-standard, garden-variety piece of mental compost that can be found in practically any system, anywhere, and is merely the consequence of allowing idiots to specify the design of a system, idiots to implement the details of a system, and idiots to maintain the system for the next ten years.
Admin
Really? I was just working on a driver port from a 32-bit to a 64-bit system. The guy who started it used Hungarian and the names were wrong all through the driver. For example, the old 32-bit code assumed 8-bit IDs, so he used cId as the (char) variable name. The new driver needed 64-bit IDs.
captcha: damnum
Admin
How would using CDONTS teach you anything about socket programming? Especially if you were right of school these types of efforts aren't a total waste of time if they teach you the underpinnings of how a system works. Now you now (roughly) how CDONTS works and will be better at understanding why it sometimes doesn't.
Admin
Seriously, this is one of the worst WTFs I've ever seen.
At least it can delete itself:
http://www.thecompany.com/scripts/onescript.pl?quiz_name=%0Aset+fs%3DServer.CreateObject(%22Scripting.FileSystemObject%22)%0Afs.DeleteFile(%22E%3A%5Cinetpub%5Cwwwroot%5Cscripts%5Conescript.pl%22)
Admin
Ah, the oldest fallacy in the book. Bad programmers can write bad code in any language. If you've never seen good Perl, you've been working with the wrong people.
On the other hand, PHP is training wheels without the bike. Don't taint Perl with that brush.
Admin
ooh, is this that newfangled 'polyglot programming' i've been hearing about?
Admin
I have just one word for you, and it's a DWORD:
wParam.
They aren't.
Admin
You know, I think I can explain how this came about. There's one commented line that provides a vital clue:
I can almost see the missing comment that should have gone there... .. and I can imagine an earlier stage of the script's evolution .. Yep. It's one of those variables where you go and set a new value and it just doesn't stick, no matter what you do. So the coder must have thought "Well, if I can't set it now, I'll try moving the set later and see if it works better then. Later. Much later ....", and you can't get much later than by not even setting it until you're serving up a whole new page....Admin
The oldest fallacy in the book is the statement that "bad programmers can write bad code in any language." Whilst an undeniably sound philosophical concept -- indeed, almost a syllogism -- it breaks down in practice. For instance, I'd love to see a bad programmer's attempt to code in Brainf*ck. Or even in APL. Actually, you could even pick any flavour of Lisp you like, and I doubt you'll find a bad programmer who is good/bad enough to get past the interpreter.
Some languages, and for perfectly understandable reasons, encourage bad programmers to write bad code. PHP is sloppy enough to be one of them (although it has its uses). Perl, I'm afraid, is another one.
As God is my witness, I should know. I'm a part-time Perl programmer. Lord, forgive me, because I can't quite remember where I sinned two weeks ago ...
Admin
Wow... this script isn't Thread Safe o_O
Admin
"It depends on what you're encoding. Encoding the fact that it's a 32-bit wide integer is probably not a good idea as the info is trivial to discover, but saying that that integer represents a packed coordinate (or whatever) is very useful, especially as even the smartest IDE is unlikely to be able to guess the intention of it for you. And guess what? If you actually go and read about it, you'll find that "Apps Hungarian" is sensible and does that sort of thing. ("Systems Hungarian" is the disaster, perpetrated by idiots who just don't get the purpose of what Charles Simonyi invented it for.) "
One thing I like about C++... if you wanted to use an int as a packed coordinate (or whatever) you could define a class with a single int member variable, put in member functions to manipulate it, and then use the class everywhere that special interpretation is called for, and the compiler will generally (a) just put the int member variable itself in storage (and nothing else) for every instance and (b) automatically inline any functions that are small enough for it to make sense to. So at the machine level, you're still just handling plain ints, but at the source level, they're a different kind of value and you can't just willy-nilly accidently intermix them with regular ints.
Admin
I actually use I, J, K because it's Hungarian
Admin
Admin
Holy code injection vulnerability batman.
Admin
Granted, not in a conventional order; and I'm sure there's a better logical phrase for it. However, for the purpose of conversation rather than for the creation of a philosophical treatise, I'd imagine that "almost a syllogism" will do nicely.
Good on you for completely evading the actual point of what I was saying, though. TDWTF would be a sad place if we didn't have at least one cretin a week repeating the mantra that "bad programmers can write bad code in any language," as if that statement had any bearing on the price of fish, the buttering of parsnips, or the WTF in question.
Admin
FX
Admin
無料 オンラインゲーム
Admin
Google
Admin
オンラインゲーム オンラインゲーム オンラインゲーム
Admin
Jenerator Dizel Jenerator Benzinli Jenerator Jenerator Fiyatları İkinci El Jenerator Kiralık Jenerator Satilik Jenerator Jenerator Firmaları
Admin
メンズエステ 名古屋
Admin
www.vgoldseller.com., Ltd. is the class professional RuneScape gold provider, we strive to offer RuneScape gold with the lowest price, the safest sevice and ...
Admin
wwww.adidasshoesstore.com adidas shoes,,abercrombie..nike,,puma ferrari
Admin
I enjoy reading the report, too. It′s easy to understand that a journey like this is the biggest event in ones life. xiaoxiao123 09 09
Admin
watchingfullmovies-online.com offer and download free movies[/url]service.You can come and have a look!Thank you!
Admin
Бесплатный пиар: как попасть в СМИ https://game-learn.ru/speakers102022
для кого: менеджеры по продажам https://game-learn.ru/delovye-igry
Готовые коробочные решения https://game-learn.ru/delovye-igry
Конструктор бизнес-игр 2 дня очного участия в программе для одного человека 6 игровых моделей Шаблоны и стандарты Материалы курса Сертификаты Обеды и кофе-брейки *Количество мест ограничено https://game-learn.ru/korporativnoe-obuchenie
ПРОВЕДЕННЫХ СИМУЛЯЦИЙ от линейного персонала до ТОП-менеджеров https://game-learn.ru/gamification
Таблица 2 Прогнозный отчет о прибылях и убытках https://game-learn.ru/korporativnoe-obuchenie
Admin
Застройщики Иркутска https://allgk.ru
Давайте на чистоту https://allgk.ru Не выполняет обещаний, в лёгкую меняет проект застройки в процессе самой стройки http://allgk.ru Ни обещанной соцсферы, да ещё и по факту, твои окна могут упираться в соседний дом, которого не было в плане на момент заключения договора https://allgk.ru/projects
Другие регионы https://allgk.ru/projects
Отзывы о застройщике : Открытие магазина стройматериалов в Иркутске https://allgk.ru
Загородное строительство / medvedsochi https://allgk.ru ru https://allgk.ru/projects
Admin
Оклейка обоев должна выполняться только на подготовленные стены (выровненные шпатлевкой, зачищенные и т http://www.vorota-garand.ru/services/remont-vorot/remont-sektsionnyh-vorot/ д http://www.vorota-garand.ru/statii/71-komplektuyushchie-k-otkatnym-vorotam-kompanii-comunello/ ) http://www.vorota-garand.ru/statii/70-avtomatika-marantec/ Обойный клей нужно подбирать под тот тип обоев, которые вы приобрели http://www.vorota-garand.ru/statii/92-nepoladki-vorot-dynaco/ Рекомендую вам выбрать обойный клей европейского производства он гарантировано выполнит свои задачи, о вас требуется лишь точно выполнить инструкции по его приготовлению http://www.vorota-garand.ru/services/remont-vorot/
Самый распространенный и далеко не новый вид ворот распашные http://www.vorota-garand.ru/catalog/rolstavni/ Они являются самыми бюджетными и простыми в установке, отличаются долгой работой без существенных поломок и ремонтов, но и у них есть срок износа http://www.vorota-garand.ru/statii/93-komplekt-vorot/
посторонние шумы во время закрывания/открывания (случается при попадании между подвижными частями мусора или посторонних предмето скрип или другой звук может возникать после износа роликов или пазов, а также при недостатке смазки в подшипниках При существенных повреждениях, приходится менять панели ворот http://www.vorota-garand.ru/ Работы по замене панелей ворот, производится чаще всего в течение 1-3 дней http://www.vorota-garand.ru/services/ustanovka-vorot/ Так как это самый часто встречающийся случай поломки ворот и полотна есть в наличии http://www.vorota-garand.ru/price/ Бывает, что ремонт части полотен экономически нецелесообразен, в таких случаях производится замена всего полотна, хотя такие случаи бывают крайне редко http://www.vorota-garand.ru/statii/69-avtomatika-nice/
движение полотна проходит рывками или с остановками (неверно настроенная управляющая плата приводит к такому результат ее надо либо перенастроить, либо заменить, иногда достаточно смазать проблемные узлы, мешающие плавному
Admin
Поиск новых и качественных способов и технологий для очистки резервуаров является актуальной задачей http://vipgaztech.ru/index.php/produktsiya Так как известные методы очистки от отложений не достаточно безупречны и совершены http://vipgaztech.ru/index.php/nasha-rabota/nashi-tekhnologii Применяют различные оборудования, которые потребляют большое количество энергии, а также являются дорогостоящими http://vipgaztech.ru/index.php/nasha-rabota/nashi-tekhnologii Иногда используют моющие средства, которые в свою очередь, тоже имеют ряд недостатков http://vipgaztech.ru/index.php/produktsiya К ним можно отнести плохую регенерацию, вред окружающей среде (вывоз на свалку или слив в водоёмы), медленное окисление на воздухе http://vipgaztech.ru/index.php/nasha-rabota/nashi-tekhnologii
Химико-механизированная очистка резервуаров http://vipgaztech.ru/index.php/my
Больше всего разработок технических средств, устройств и систем для удаления отложений из резервуаров основано на гидромеханическом способе http://vipgaztech.ru/index.php/nasha-rabota/nashi-tekhnologii Оборудованием служит вращающийся трёхструйный брандспойт, закрепленный на конце шланга высокого давления http://vipgaztech.ru/index.php/vorosy-otvety1/2
2 http://vipgaztech.ru/index.php/my 4 http://vipgaztech.ru/index.php/vorosy-otvety1/2 3 http://vipgaztech.ru/index.php/nasha-rabota/obzor-predlagaemykh-tekhnologij 5 http://vipgaztech.ru/index.php/produktsiya/utmg-02m Химико-механизированная очистка резервуаров производится с помощью ОХМЗР http://vipgaztech.ru/index.php/vorosy-otvety1/2
3 http://vipgaztech.ru/index.php/nasha-rabota/nashi-tekhnologii 3 http://vipgaztech.ru/index.php/nasha-rabota/nashi-tekhnologii Удаление невыбранного остатка продукта http://vipgaztech.ru/index.php/vorosy-otvety1/2
Дегазация необходима для приведения состава атмосферы в резервуаре к безопасному для человека состоянию http://vipgaztech.ru/index.php/nasha-rabota/obzor-predlagaemykh-tekhnologij Для определения безопасности газовоздушной
Admin
Алюминиевые окна https://fasadstore.ru/prodiction/okna-i-peregorodki-pvh/
Коэффициент приведенного сопротивления теплопередаче: 0,5-0,7 Класс по показателю сопротивления теплопередаче: Г1 Класс по показателю воздухопроницаемости: A Класс по показателю звукоизоляции класс/ДБ: Г/29 Класс по показателю пропускания света: A Монтажная глубина рамы: 60 мм Монтажная глубина створки: 69 Диапазон толщины заполнения: 14-42 мм Типы открывания: - Поворотно-откидная створка - Штульповое окно - Фрамуга - Скрытая фурнитура - Поворотное верхнеподвесное Безопасность: - Соответствие ГОСТ 23166-99, ГОСТ 21519-2003 - Соответствие ГОСТ 21519-2003 Покрытие и обработка поверхности: - Покраска порошковой краской по RAL - Анодно-окисное покрытие различные цвета - Двуцветность https://fasadstore.ru/osteklenie-fasadov/cistemy-vidnal.html
Почему стоит обратиться в компанию Алюмак https://fasadstore.ru/garazhnye-vorota-alutech.html
Хотите наполнить пространство солнечным светом? Смело расширяйте горизонты при помощи витражных окон из теплого алюминиевого профиля на лоджию, в офисный холл и тем более – в спальню https://fasadstore.ru
От чего зависит цена? Стекло дверных алюминиевых блоков может быть прозрачным, зеркальным, матовым, с декоративными узорами, специальными тонированными защитными пленками https://fasadstore.ru/alyuminievye-vitrazhi.html Матовое стекло защищает от посторонних глаз https://fasadstore.ru/osteklenie-terras-verand-i-balkonov.html Узоры получают в результате пескоструйной обработки или нанесения цветных пленок https://fasadstore.ru/prodiction/aljuminievye-razdvizhnye-aljuteh-v-mosk/ В зависимости от типа остекления подбираются заполнители со стеклом различной толщины https://fasadstore.ru/alyuminievye-okna-i-dveri/tatprof-okna-i-dveri.html Теплые алюминиевые двери оборудуются многокамерными блоками с заполнением с высокой степенью теплоизоляции, оснащаются теплоотражающей фольгой https://fasadstore.ru/sendvich-paneli-trimo.html