• Derp (unregistered)

    In that case, would it be too much to ask for formatting preservation in comments? Also frist.

  • Quite (unregistered)

    ... and note of course the careful attention to detail that does an existence check on pic9. Not many people can say their code has that level of bulletproofing in it.

  • giammin (unregistered) in reply to Quite

    somethimes pic9 does bad jokes, not like others pic

  • hangy (unregistered)

    I wonder what happens if !(strpos($pic1,'php') === false). Run it through eval?

  • IP-guru (unregistered)
    If you’re not already aware, the Daily WTF is open source. We went the route of building our own CMS mostly because our application needs are pretty light. We don’t need themes, we don’t need WYSIWYG editors, we don’t need asset uploads. Also, with home-grown code, we know what’s in it, what it does, and any problems in the code are our own.

    explains a lot of the insane design concepts, such as why the side bar & all sensible links are not available one you have selected a main article.

    I assume to be satire or Irony , A site purportedly exposing incompetent programming being incompetently programmed.

  • Bert (unregistered) in reply to IP-guru

    Yeah, there's literally no reason top-level navigation should disappear once you've left the top level, except for incompetence. Sad!

  • PHP Developer (unregistered)

    WordPress code is one of the ugliest things I saw in PHP land. It makes other PHP projects look like a work of Martin Fowler. So no surprise that theme developers follow these "best" practices.

  • (nodebb)

    I learned what an array was for in 6th form (late high school for Americans) and why I should use it (answer: to avoid variables named variable1, variable2, variableX, etc).

    I'm brought to conclude that the developer(s) of this theme were self-taught when they first wrote this, and very new to boot.

  • Gene Wirchenko (unregistered)

    Last year, I had a job briefly working on a WordPress-powered Website. The owner wanted someone local to deal with changes in a timely manner. Unfortunately, the code was horribly opaque.

    There were many CSS definitions. The problem with cascading stylesheets is much like any other feature. You can go overboard, and this code certainly did.

    I grant that I am not a JavaScript expert, but I have been programming for many years. However, due to the tangle of CSS and code, I could not simplify things, and I literally could not find some of the code. On top of this, the owner was someone who 1) did not understand that development can take time and 2) did not give standards in advance. I would make a change and get told to take it out.

  • Skylar (unregistered)

    On the subject of CMSes sucking and having too many features, I actually found one (GetSimple) that manages to be lightweight and usable. WYSIWYG is optional, and "themes" are PHP files with snippets to inject page content.

  • I dunno LOL ¯\(°_o)/¯ (unregistered) in reply to Shoreline

    Clearly whoever wrote this had not yet discovered the for-case anti-pattern.

  • FormalWare (unregistered) in reply to I dunno LOL ¯\(°_o)/¯

    Looks like they discovered it independently.

  • PoPSiCLe (unregistered)

    Great. Now, implement a proper spam filter, pretty please?

  • gnasher729 (unregistered)

    Just saying: In many languages (for example JavaScript) "loop unrolling for performance" doesn't work. That's because a good implementation will have a series of just-in-time compilers of varying speed and code quality, so your ten times unrolled code will loop less often and therefore be compiled with a compiler that produces lower quality code, and it is ten times more code so the compilation process itself is a lot slower. Reusing code makes it faster, because there will be less compilation producing higher quality code.

  • Hannes (unregistered)

    Anyone ever heard about the ICC Champions Trophy? I wonder where I can find more infos about it.

  • Harris M (unregistered)

    I have actually seen worse in a sideshow plugin.

    There was basically one Php file that generated another, and then that file made the slideshow.

    The first Php file loaded all of the picture paths into an array, and then created a new file with the same identical code copied the same number of times as there were pictures.

    The way it worked out what picture to load was by the Line Number in the Php file.

    The first time I've ever seen LINE used.

  • Icepick (unregistered)

    How was he cheating on you if he was already your ex-Husband? Also, grammar.

  • Spammmm (unregistered) in reply to Icepick

    ...........you do realize you're replying to a spambot, right?

  • (nodebb)

    Reminiscent of SpectateSwamp Desktop Search. Especially the part about just cutting and pasting sections if you wanted to add a new picture in.

  • Solomon Ucko (google)

    Did anybody noticed this:

    if( file_exists( $pic9 ) ) {

    in just pic 9?

    Addendum 2018-04-01 21:20: Formatting tip: To get the code to work, I surrounded it in

    [ code]
    [ /code]
    (the space is there to avoid the parser getting confused).

    It looks like this uses BBCode.

Leave a comment on “Variation on a Theme”

Log In or post as a guest

Replying to comment #:

« Return to Article