Settings

Theme

Commenting Code Properly

github.com

8 points by sailfrog 13 years ago · 9 comments

Reader

sneak 13 years ago

The comments are stupid, the headline is wrong, and you're parsing HTML with regular expressions.

It would be hard to craft a submission worse than this.

  • sailfrogOP 13 years ago

    The submission was meant to be humorous, sorry to disappoint. No matter how you slice it parsing HTML from a 3rd party site is a major hack, though this does however work nicely (itch scratched). Lastly I have some other ideas for submissions so don't judge this as the worst just yet.

    • sneak 13 years ago

      > No matter how you slice it parsing HTML from a 3rd party site is a major hack

      WebKit seems to do just fine. I think you're making excuses.

      • sailfrogOP 13 years ago

        Until the source site changes the URL, or the URL arguments, or the page structure, or the doctype, or the CSS selectors, or the element ids, or whatever it is you key on to ferret out the content you care about. Scraping data embedded in markup not bound to an API spec is fragile regardless of how "properly" you parse it because there is no guarantee of structural consistency.

eccp 13 years ago

Don't use regexes to parse HTML, use BeautifulSoup instead. Also, don't use "brogrammer" style comments, they are not funny enough.

donutdan4114 13 years ago

I thought it was funny. I'd rather see funny comments, than no comments at all.

talleyrand 13 years ago

Love it! Code comments need more adjectives and Culture Club lyrics.

wjgeorge 13 years ago

err, no.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection