Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

New feature for Craft section?

by MrCromeDome (Deacon)
on Jul 15, 2002 at 15:15 UTC ( [id://181808]=monkdiscuss: print w/replies, xml ) Need Help??

I've been sitting on a piece of script that I wrote for a few days wondering what to do with it, or exactly where to post it in the monastery. I imagine it needs to go in Craft, but my indecision drove me to an idea:

Would it be possible to have block of text in Craft in which to discuss the code we post in addition to the line-numbered code format already provided? I'm not familiar with the Everything code, and while I'm sure it's feasible, I'm not sure if the effort would be worth investing in. I see the perks of having the numbered code format, but am not sure if the lack of such a feature as I describe was intentionally omitted. I would welcome other's opinions and insights here.

The code I would like to post is not difficult to understand, but the concepts could use some explanation to those unfamiliar with what it is I am doing. I know I could simply provide long, in-depth comments describing things. . . but somehow that seems a little less elegant. I'm all for good commenting of code, but not for dissertations within my code. Again, discussion is welcome here.

Perhaps another alternative would be to make Craft behave like other nodes, requiring that CODE tags be placed around the code we wish to show off. To get the same nicely-numbered format that we have now, maybe CODE tags can be expanded to number lines, or create a separate set of tags that provide that same format.

Thanks for listening. Looking forward to discussion!

MrCromeDome

Replies are listed 'Best First'.
Re: New feature for Craft section?
by particle (Vicar) on Jul 15, 2002 at 15:39 UTC
    perhaps you post your craft description as a comment on the root node? if that doesn't suit your needs, perhaps you could post to the code catacombs, where descriptions are allowed, and do without line numbers?

    ~Particle *accelerates*

      Had never thought of posting my discussion as a comment to the root node. Thank you for the idea! ++particle.

      I was pondering the catacombs, and I suppose my post will fit nicely in there. It's a script I wrote to keep a game server running, but I'm sure it's somewhat easily adaptable for other applications.

      Thanks again!
      MrCromeDome

Re: New feature for Craft section?
by mojotoad (Monsignor) on Jul 16, 2002 at 05:52 UTC
    You could slap your slices into sections delimited by tables:

    #!/usr/bin/perl # # Quick and dirty Yoda emulator use strict; use warnings; use The::Force;

    ...and comment below each section.

    Don't get fancy and play with your background colors, however -- our fellow brethren tend to get antsy over things that break their CSS color schemes.

    (to said Brethren: is their a generic way to comply to CSS preferences in such a way? Sniping from other classes for TR and TD elements seems to not work. Perhaps we need to add a td.code_example entry to the stylesheets)

    Matt

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://181808]
Approved by claree0
Front-paged by jarich
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-18 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found