Are You Down With PHP?

by Dan J. in CodeSOD on 2015-03-25

Who’s Down With PHP?

PHP often gets a bad rap. A lot of the time, that’s because it’s used by developers that don’t know what they’re doing, just like there’s nothing inherently wrong with spandex, but there are times, places and people where it is inappropriate. And don’t get me wrong, the language has made big strides in recent years (good luck finding a web server hosting one of those versions, though). But there are just uses of PHP that reinforce that reputation. Robert Osswald provides this example from the contact-form editing code of a domain registrar database.

Let’s say you have some JSON data from an AJAX request, and it looks like this:

66 Comments - Last Comment @ 20:46

Regularly Expressing Hate

by Remy Porter in CodeSOD on 2015-03-23

Perl is jokingly referred to as a “write-only language”. This is because Perl’s primary solution to any problem is to throw a regular expression at it. Regexes are powerful, but cryptic.

Metamucil

Imagine RJ’s joy at starting a new contract for an OCR/document-management system that makes heavy use of regexes. Even better, the system doesn’t use widely implemented “Perl-compatible regular expressions” syntax, but instead, uses its own, slightly tweaked version.

79 Comments - Last Comment @ 2015-03-25

Pretty Please?

by Mark Bowytz in Error'd on 2015-03-20

"Hey, may I get your permission...quickly? I'm about to leave for a world tour and I have a LOT of ground to cover," writes John

0 Comments - Last Comment @ 19:46

The Daily WTF: LIVE!

by Remy Porter in Announcements on 2015-03-18

You’ve read the posts. You’ve submitted your own WTFs. Now it’s time to take it to the next level: The Daily WTF: Live is coming to Pittsburgh, PA.

In the style of The Moth or Risk! podcasts, we’re getting our fellow IT drones up on stage, to share their tales of their worst WTFs, their successes, and true tales of life in the IT trenches.

4 Comments - Last Comment @ 2015-03-18

A Deeply Nested Mystery

by Maciej Stachowski in CodeSOD on 2015-03-18

As any competent developer knows, not all Web browsers were created equal. In a stew of standards, drafts, vendor extensions, and JavaScript engine quirks, each of them can behave a little differently under various circumstances. Many people tried to resolve this situation, but "creative" coders are always one step ahead, finding new and amusing ways to mandate the dreaded "runs only under Internet Explorer 6" popup on their webpages.

This time, our submitter found out that his bus timetable was working just fine on Safari:

43 Comments - Last Comment @ 2015-03-23
View Article Archives »