Click here to Skip to main content
15,888,454 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: It's horrible Pin
snorkie10-Jul-08 4:54
professionalsnorkie10-Jul-08 4:54 
GeneralRe: It's horrible Pin
jamie55010-Jul-08 4:57
jamie55010-Jul-08 4:57 
GeneralRe: It's horrible Pin
BillW332-Sep-08 11:22
professionalBillW332-Sep-08 11:22 
GeneralRe: It's horrible Pin
Dan Neely10-Jul-08 5:43
Dan Neely10-Jul-08 5:43 
GeneralRe: It's horrible Pin
BadKarma10-Jul-08 21:20
BadKarma10-Jul-08 21:20 
GeneralRe: It's horrible Pin
Dan Neely11-Jul-08 4:22
Dan Neely11-Jul-08 4:22 
GeneralRe: It's horrible Pin
Rage11-Jul-08 4:59
professionalRage11-Jul-08 4:59 
GeneralRe: It's horrible Pin
Philippe Lhoste11-Jul-08 11:08
Philippe Lhoste11-Jul-08 11:08 
who decided that tags like <br> didn't have to be closed
Well, that's named HTML, and it have been around for many years. Way before XML was invented...

Now parsers have to waste their time checking for a closing tag
You just have to use an HTML parser, using the right DTD, indicating which tags must be closed and which might be left "open", and what is their scope (closed by another kind of tag), instead of an XML parser...

Incorrect HTML: that's another story, that's why browsers are so tolerant (more or less: a browser might close a div by itself, another will take the div ends at the bottom of the document...).

I don't understand the rant about JS...

Anyway, should I have to parse HTML pages, I would use a good library like TagSoup to handle all these peculiarities.

Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://phi.lho.free.fr

QuestionC++ wrappers for C struct api Pin
Kishore Jonnalagadda9-Jul-08 6:22
Kishore Jonnalagadda9-Jul-08 6:22 
AnswerRe: C++ wrappers for C struct api PinPopular
MidwestLimey9-Jul-08 6:26
professionalMidwestLimey9-Jul-08 6:26 
AnswerRe: C++ wrappers for C struct api Pin
Dave Kreskowiak9-Jul-08 7:09
mveDave Kreskowiak9-Jul-08 7:09 
JokeRe: C++ wrappers for C struct api Pin
jayart10-Jul-08 0:24
jayart10-Jul-08 0:24 
AnswerRe: C++ wrappers for C struct api Pin
Paul Conrad9-Jul-08 18:56
professionalPaul Conrad9-Jul-08 18:56 
AnswerRe: C++ wrappers for C struct api Pin
Kishore Jonnalagadda9-Jul-08 19:05
Kishore Jonnalagadda9-Jul-08 19:05 
GeneralA Coding Horror from a subcontracted project... Pin
CARPETBURNER3-Jul-08 22:47
CARPETBURNER3-Jul-08 22:47 
GeneralRe: A Coding Horror from a subcontracted project... Pin
Rob Grainger4-Jul-08 1:34
Rob Grainger4-Jul-08 1:34 
GeneralRe: A Coding Horror from a subcontracted project... [modified] PinPopular
CPallini4-Jul-08 1:55
mveCPallini4-Jul-08 1:55 
GeneralRe: A Coding Horror from a subcontracted project... PinPopular
PIEBALDconsult4-Jul-08 4:03
mvePIEBALDconsult4-Jul-08 4:03 
GeneralRe: A Coding Horror from a subcontracted project... PinPopular
CARPETBURNER4-Jul-08 10:17
CARPETBURNER4-Jul-08 10:17 
GeneralRe: A Coding Horror from a subcontracted project... PinPopular
PIEBALDconsult5-Jul-08 6:13
mvePIEBALDconsult5-Jul-08 6:13 
GeneralRe: A Coding Horror from a subcontracted project... Pin
Stephen Hewitt6-Jul-08 16:12
Stephen Hewitt6-Jul-08 16:12 
GeneralRe: A Coding Horror from a subcontracted project... Pin
PIEBALDconsult7-Jul-08 13:38
mvePIEBALDconsult7-Jul-08 13:38 
GeneralRe: A Coding Horror from a subcontracted project... Pin
GuyThiebaut8-Jul-08 9:12
professionalGuyThiebaut8-Jul-08 9:12 
GeneralRe: A Coding Horror from a subcontracted project... Pin
Rob Grainger9-Jul-08 23:48
Rob Grainger9-Jul-08 23:48 
GeneralRe: A Coding Horror from a subcontracted project... Pin
GuyThiebaut10-Jul-08 0:17
professionalGuyThiebaut10-Jul-08 0:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.