// Coding Horrors
Home   Submit Random All Snippets Lessons/Resources

"Hideous Locals"

Language: C++

Submitted by Chris, 11.16.2003 17.19.41

int i1,i2,i3,i4,i5,i7; char *wbp,*lbap[colMaxLc+1];
int i6,i8,i9;
View details/comments

"Never True"

Language: Perl

Submitted by Chris, 06.22.2004 16.23.59

if ( $host eq "mktftp" )     # never true
{  
    $xferlog = "/logs/transfer_files.log";
    $pconf   = "/tmp/partners.conf";
    $paconf  = "/tmp/params.conf";
... (more)
View details/comments

"Perl Hideousness"

Language: Perl

Submitted by Chris, 08.25.2004 09.01.30

for (\@arr) {
      s/"/\\\\"/g;
      s/\\\\\\\\"/\\\\\\\\"""/g;
      \$_ = qq["\$_"] if /\\s/;
        }
... (more)
View details/comments

"CSS abortion"

Language: HTML/CSS

Submitted by Chris, 01.07.2005 12.44.44

<font class="BlueCopyrightFont" size="-2">
View details/comments

"Logic Maze"

Language: Foxpro

Submitted by Emmanuel, 08.10.2005 16.04.09

IF   CRSVINH.SHIP=.T.  .AND. CRSVINH.SHIP=.F.

  IF CRSVINH.SHIP=.T.  .AND. CRSVINH.SHIPPING=.T.
    THIS.READONLY=.F.
    REPL CRSVINH.SHIP  WITH .F.
... (more)
View details/comments

"Actionscript 3 Depthsorting Horror"

Language: Actionscript 3

Submitted by Louis, 08.06.2008 15.10.00

(((_worldLayer.getChildAt(0) as Sprite).getChildAt(internal((((_TEST_objectsArray[0] as TileObject).Art.Artwork as Sprite).y + 1000) / TileRules.TILE_DIMENSIONS)) as Sprite).getChildAt(0) as ZSlice).ObjectSprite.addChild((_TEST_objectsArray[0] as TileObject).Art.Artwork as Sprite);
View details/comments

"None"

Language: C++

Submitted by Mike F, 09.18.2008 10.44.20

#define RWFALSE 0
#define RWTRUE (!RWFALSE)
View details/comments

"Shitty Function Name"

Language: C++

Submitted by Chris, 01.23.2009 12.43.07

C++ function name found in code:
quick_Validate_DeviceTag()
View details/comments

"Extra Exception"

Language: C#

Submitted by David Haimson, 03.25.2009 16.49.48

try
{
	if (layerUtility == null)
		throw new Exception();
}
... (more)
View details/comments

"Useless If"

Language: C++

Submitted by Chris, 03.26.2009 08.30.26

if (m_token) {
    return m_token;
}else {
    return NULL;
}
... (more)
View details/comments

"All Your Base are Belong to Us"

Language: C++

Submitted by Chris, 03.26.2009 08.33.26

class Derived : public Base, SomeOtherClass  // multiple inheritance too!
{
public:
  Derived(Base* b) : m_base(b) {}
...
... (more)
View details/comments

"dangerously intoxicated"

Language: Pascal

Submitted by eric, 07.22.2009 16.05.00

If 'TRUE' = 'TRUE' then
begin
   //code snippet here
end
else
... (more)
View details/comments

"None"

Language: js

Submitted by saito`, 03.12.2010 18.24.24

// ==UserScript==
// @name					eMo
// @namespace			eMo
// @description		Nicknames statt eMo-Müll
// @include				http://www.moonsault.de/forum/*
... (more)
View details/comments