Six years ago, I was taught my first lesson of C++. Soon after learning about loops, came a subsidiary lesson about the goto statement. The teacher made it clear that using goto was a horrible practice because of unconditional-jumps mess it creates and should always be avoided. A bit of googling followed and I ended up with a well known essay of E. Djikstra’s ‘Goto is considered harmful’ and I committed myself to never use the statement even if it meant creating a frivolous flag variable.
When I didn’t had much exprience with web development, the only worthwhile thing I was able to sell as a freelancer was web scraping. After all, it was just a lousy combination of cURL and
preg_* functions. Twiddling around Stackoverflow I got to know about the most upvoted answer on the site – a hyperbolic poetry on how you should never parse HTML with regular expressions and half a dozen more answers parroting the same message with their own flavour of the joke.
This moved me to abandon my way of using regexes and try a using a DOM Parser instead. Note that, at that time, the DOM libraries in PHP were really bad and
DOMDocument API was far too weak to do anything moderately complex but anyway, I bore with them for any web scraping that I did.