Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

what is your definition of clean code?

by g00n (Hermit)
on Apr 23, 2003 at 03:43 UTC ( #252443=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Cleanning HTML - New/better module for that - test please! ;-P
in thread Cleanning HTML - New/better module for that - test please! ;-P

tidy intro - When editing HTML it's easy to make mistakes. Wouldn't it be nice if there was a simple way to fix these mistakes automatically and tidy up sloppy editing into nicely layed out markup?

could you tell me what is your definition of clean the code? could you provide an example?


Comment on what is your definition of clean code?
Re: what is your definition of clean code?
by tachyon (Chancellor) on Apr 23, 2003 at 04:35 UTC

    HTML Tidy is an excellent little widget for checking that HTML conforms to the W3C HTML spec and fixing errors as well a clening up indentation etc. It has nothing to do with Perl per se. As to examples there are many. For example Netscape/Mozilla is very particular about closing table tags. If you forget a </table> or have extra ones then really odd stuff will happen or the page will simply fail to display. To generate your own examples take some HTML, run it through tidy and RTFO where O = Output and the rest has the usual meaning.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: what is your definition of clean code?
by gmpassos (Priest) on Apr 23, 2003 at 05:03 UTC
    As I said, I want to clean the code, make it smaller (this is for the browser, not humans). The idea is to cut everything that not represent any visual thing in the browser and rewrite some parts/tags with less bytes, like cut quotes when is possible, spaces, etc...

    Example? Test the code of the main node with the www.cnn.com.br url and see the result of cleaned code with the original.

    Graciliano M. P.
    "The creativity is the expression of the liberty".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://252443]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-10-22 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (114 votes), past polls