Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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:

  • Important items such as function prototypes are displayed prominently, whereas caveats are often at the end - or worse - buried at the end of a sentence (btw, don't do X and Y at the same time while using system Z). This makes it necessary to re-read large portions of documentation in search of answers.

  • It isn't always obvious where an error is originating. In my case, I couldn't tell from the logs whether the error was in my code, in the driver, in DBI, or in the database itself.

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-03-29 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found