Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I currently work on a large OO project in my day job (not in Perl though). It's certainly true that there's no magic answer about how to deal with a huge application. You just have to familiarize yourself with it, and realize the importance of experience.

That said, I like to either draw diagrams or write things down, or both. Programming is much more reality-based than a lot of people realize (because ultimately anything you code turns into either 0's and 1's or "bytecode" which is, like, weird). One question that I'm always asking when thinking about designing an object is:

What does this object know?

From that the methods and attributes become clear. For example, in the app I'm working on, I created a "table service" object (Powerbuilder calls them objects, but you might refer to them as classes as well).

What does the table service know? It knows:

  • How to add a new table (by giving it a name ie. "table_serv.add_table('#TEMP_TABLE')".
  • How to add columns to the table (ie. a prototype for that function might be "table_serv.add_column(string name, string coltype, bool allow_null)"
  • How to create the table in the database.
  • How to drop said table.
  • How to make a modification to the table's definition.
  • How to insert rows of data into itself.

As it turns out, I did write a table service, but it wasn't quite as ambitious as the list above (ie. I hardcoded the INSERT's in my code, it's not yet a capability of the table service). And this list simplifies it somewhat, because the table service is really a wrapper around an array of table objects, each of which has its own array of column objects. But hopefully you get the idea.

In fact I use this question all the time. I use it for debugging apps, configuring apps, understanding my environment and more.

For example, I had a problem with a web site host (for a site I'm developing for a client) where I would go to www.thedomainiregistered.com and it wouldn't go to the /home/username/public_html/ dir that it should have (instead, it went to a system-wide DocumentRoot, because obviously the admin hadn't yet put my homedir's public_html dir as the DocumentRoot). I thought to myself "Apache should know that when I say www.thedomainiregistered.com it should go to my /home/username/public_html/ directory". In other words, the concept of "who knows what" made me realize that it wasn't a programming problem, but an incompetent Apache admin. As it turns out, I'm in the process of dealing with this being fixed right now. :)


In reply to Re: How to think. by mothra
in thread How to think. by little_mistress

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (6)
    As of 2014-07-13 08:29 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      When choosing user names for websites, I prefer to use:








      Results (248 votes), past polls