Programming the new world

Programming your life and the net, one day at a time

Tags

Commented-out Code is rotting code

Posted in November 30th, 2008
Published in PHP

One of the things I really hate, and programmers should really avoid is commenting-out code. Do NOT do this!

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
//curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
//curl_setopt($ch, CURLOPT_COOKIEFILE, “cookiefile”);
//curl_setopt($ch, CURLOPT_COOKIEJAR, “cookiefile”);
//curl_setopt($ch, CURLOPT_COOKIE, session_name() . ‘=’ . session_id());
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

curl_setopt($ch, CURLOPT_URL, ‘http://www.testingsite.com’);
$result1 = curl_exec($ch);

curl_close($ch);
?>

You all have seen code like this. Commented-out code you do [...]

read more from " Commented-out Code is rotting code "

All time most popular tags