Aug 20 2012

Jiggery-pokery

Christoph

# all this f*cking around with unicode and the document
# header is to get lxml to STFU. Yeah, this is probably
# The Wrong Way(TM), once again, but that’s how I roll,
# y0: ghetto-tastic shitball code. If you want
# to understand why each of these changes was made, remove
# this jiggery pokery and you’ll see what I mean. ;-P

Source: Direct link to the source code
Software: Fluidity
Programming language: Python

1 Star2 Stars3 Stars4 Stars5 Stars (1 Bewertungen, Durchschnitt: 5,00 von 5)
Loading ... Loading ...

Aug 20 2012

2-dimensional array

Christoph

Thanks to liskel for this code candy

// I have absolutely no idea, why it becomes a
// 2-dimensional array … so working around instead
// of solving
$css = $css[0];

Programming language: PHP

1 Star2 Stars3 Stars4 Stars5 Stars (3 Bewertungen, Durchschnitt: 5,00 von 5)
Loading ... Loading ...

Aug 7 2012

Longest. Comments. Evar.

Christoph

# FIXME: and this is just plain /wrong/. Naughty naughty
# this is why I have to learn some kind of signal creation
# techinque. OOOOH OH OH OH , ORRRRRR, I can just pass
# in a single callback…? pull in one particular method
# from the caller for the called object to refer back to
# as a conduit back into that caller. Is that crack?
# ….orrrrrrrrrr….. the data manager is the one that
# knows this shit and can take care of the “your shit
# changed, so update it motherf*cker” kinds of tasks.
#
# Longest. Comments. Evar.

Source: Direct link to the source code
Software: Fluidity
Programming language: Python

1 Star2 Stars3 Stars4 Stars5 Stars (2 Bewertungen, Durchschnitt: 4,00 von 5)
Loading ... Loading ...

Jun 11 2012

Vim comments

Christoph

“vim comments are so f*ckin stupid!! Why the hell do they
“have comment delimiters that are used elsewhere in the
“syntax?!?! We need to check some conditions especially
“for vim

Source: Direct link to the source code
Software: Vim IDE
Programming language: Vim Script

1 Star2 Stars3 Stars4 Stars5 Stars (1 Bewertungen, Durchschnitt: 4,00 von 5)
Loading ... Loading ...

Mai 30 2012

No exceptions

Christoph

Thanks to Tobias for this code candy

return verify_iban($this->iban);
# we could throw exceptions of various types, but why -
# does it really add anything? possibly some slightly
# better user feedback potential. however, this can be
# written by hand by performing individual checks ala
# the code in verify_iban() itself where required, which
# is likely almost never. for the increased complexity
# and maintenance / documentation cost, i say,
# therefore: no. no exceptions.

Source: Direct link to the source code
Software: php-iban
Programming language: PHP

1 Star2 Stars3 Stars4 Stars5 Stars (3 Bewertungen, Durchschnitt: 4,67 von 5)
Loading ... Loading ...