I've been doing a lot of database programming recently. In my most recent project I've run into two major problems. Each has led to at least an hour of lost time while I scratch my head at my seemingly flawless code failing on a simple, harmless operation. The first was an error in the DBD::mysql package that was reporting an error for the wrong statement and the second was a result of not closing statement handles and running out. Neither of these were obvious to me, and neither of them were giving any clear indication of where the error was.

I'm sure everyone here has had problems like this - but once the solution is found, where does it go? Aside from lurking in newsgroups - hoping for the question to pop up - how do you go about informing other people of your trials, errors, and eventual solutions?

Tutorials, FAQs, and man pages go a long way in teaching one to use a package, library, etc. But they are near useless when trying to debug a mystifying error:

My proposed solution? A global "WTF" database, where all of the situations which cause you to shout out loud "WTF!" may be addressed. Anytime you have a problem, you can go to the database and type in search terms - or even just the error message you're receiving. Within seconds you have solutions from a hundred other people at your fingertips.

The biggest problem I see with this system is getting overcrowded - especially with issues that newer programmers may have but older ones take as a matter of course. Dividing the site into "beginner, novice, expert" would certainly help.

I dream of a future where you can simply type in error 329: unknown variable - resources gone and receive the helpful response Try calling cleanup() before using $PackageName::crazy_var.

Who knows - maybe, just maybe in the distant future, I'll think about implementation rather than just complaining here at PM.


In reply to Proposed WTF Database by jbeninger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.