CodeSOD: //article title here

This post was originally published on this site

The Daily WTF

Menno was reading through some PHP code and was happy to see that it was thoroughly commented:

function degToRad ($value) { return $value * (pi()/180); // convert excel timestamp to php date }

Today’s code is probably best explained in meme format:

As Menno summarizes: “It’s a function that has the right name, does the right thing, in the right way. But I’m not sure how that comment came to be.”

[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.

To read the full article click on the 'post' link at the top.