Ten years ago I found a comment in Excel's code base preceding a function over 1000 lines long that seemed to be parsing dates:<p><pre><code> // I just cleaned up the code. I have no idea what this fn does. Here is
// what the comment said earlier for your reference!
// --> BUG!! - this code is a crime against nature and has absolutely no
// --> redeeming value (other than the amazing fact that it works)</code></pre>
Lecturing on keyboard shortcuts when windows media player is the only video player in the world not using the space bar as a shortcut for play/pause.
OT: There's an thread on SO with a collection of awesome comments in code. Well worth a read. If not for the insight, than for the chuckle:<p><a href="https://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered" rel="nofollow">https://stackoverflow.com/questions/184618/what-is-the-best-...</a>
> so we need to add yet more ugliness in the form of assembler to an app which is already hardly a paragon of pulchritude<p>Throwing some serious vocab shade in these comments, love it.
YouTuber Barnacules, use to work for Microsoft and he did tell a story on his live stream about ridiculous comments MS developers use to put in their code, I am sure they still do
One of the ugly hacks you do in SAP to make it work is reading/changing variables and structures inside the SAP standard code because there is no API exposing them.<p>It is blessed officially as doing a "dirty" assign.
At a web startup I worked at years ago, I spent all night tracking down a nasty bug related to user signups.<p>I eventually traced it to one specific line of original founder code, and lo and behold, on that line was the comment: "this is probably buggy".
The bug here is in media player to listen on key-up events.
Mouse-button-up makes sense because the user can move the mouse to
cancel the click. But key events should be on key-down and
that's how it is done most of the time. So if you use key-up you
run into these problems.
That's the good side of working on proprietary closed source codebase - one has so much freedom of expression, be it in the code or in the comments.
What is the best library to use these days for developing in Visual C++? I had to write some VCpp code a few days ago using the Winhttp api and it was a nightmare. I'm not sure if its because I've been spoiled rotten by python where you can do a get/post request with a few lines of code, and that this is just how CPP is, but most of the complications are to do with calling and using the (not very well) documented API itself. Is there usually a easier way to do this? I'm just doing simple post and get requests, and I couldn't even do a file upload post properly by passing the binary data in, had to convert to base64 text in the end for it to work.
My favorite part is<p>> If you add some obscure code such as below, to this or any other app, even if it has only the teeniest chance of being less blindingly obvious to someone else than it is to you at the time of writing, please please please add a fing comment.<p>This rings as true now as it did then and its my favorite comment so far out of this whole leak. I've reached a point where my comments are there to remind <i>myself</i> why I did a thing, because more often than not I'm the poor bastard who's stuck fixing what past me did, and past me was either a sadistic asshole or a blithering idiot.