best code comments
-
The best code comment seen in source code ...... 1. /// <remarks> /// The point of this is to work around his poor design so that paging will /// work on a mobile control. The main problem is the BindCompany() method, /// which he hoped would be able to do everything. I hope he dies. /// </remarks>; 2. // I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public. 3. // Magic. Do not touch. 4. return 1; # returns 1 5. /* This is O(scary), but seems quick enough in practice. */ 6. /* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ 7. and here comes my favourite...... //When I wrote this, only God and I understood what I was doing //Now, God only knows
-
The best code comment seen in source code ...... 1. /// <remarks> /// The point of this is to work around his poor design so that paging will /// work on a mobile control. The main problem is the BindCompany() method, /// which he hoped would be able to do everything. I hope he dies. /// </remarks>; 2. // I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public. 3. // Magic. Do not touch. 4. return 1; # returns 1 5. /* This is O(scary), but seems quick enough in practice. */ 6. /* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ 7. and here comes my favourite...... //When I wrote this, only God and I understood what I was doing //Now, God only knows
No7 is Universal!
------------------------------------ To eat well in England, you should have a breakfast three times a day. W. Somerset Maugham 1925
-
The best code comment seen in source code ...... 1. /// <remarks> /// The point of this is to work around his poor design so that paging will /// work on a mobile control. The main problem is the BindCompany() method, /// which he hoped would be able to do everything. I hope he dies. /// </remarks>; 2. // I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public. 3. // Magic. Do not touch. 4. return 1; # returns 1 5. /* This is O(scary), but seems quick enough in practice. */ 6. /* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ 7. and here comes my favourite...... //When I wrote this, only God and I understood what I was doing //Now, God only knows
Thanks for sharing :laugh:
-
The best code comment seen in source code ...... 1. /// <remarks> /// The point of this is to work around his poor design so that paging will /// work on a mobile control. The main problem is the BindCompany() method, /// which he hoped would be able to do everything. I hope he dies. /// </remarks>; 2. // I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public. 3. // Magic. Do not touch. 4. return 1; # returns 1 5. /* This is O(scary), but seems quick enough in practice. */ 6. /* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ 7. and here comes my favourite...... //When I wrote this, only God and I understood what I was doing //Now, God only knows
I'm glad to see I'm not alone. I've had to do something to blow off steam some of the things I've put in include: 1.
//I HATE my job, thanks to code like this
2.//This is crap, but at least we obeyed Meskmen's law
3.//This needs refactoring, but frankly I don't have the will to deal with code this shit
4.//Pisspoor code. Pisspoor Architecture.
5.//WTF? No!
And I really hate commenting on other peoples code as you don't know what they had to deal with at the time (and an awareness that code I've written doesn't look so fresh after a couple of weeks). The code base on my current project ius just so bad.CCC solved so far: 2 (including a Hard One!)
-
The best code comment seen in source code ...... 1. /// <remarks> /// The point of this is to work around his poor design so that paging will /// work on a mobile control. The main problem is the BindCompany() method, /// which he hoped would be able to do everything. I hope he dies. /// </remarks>; 2. // I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public. 3. // Magic. Do not touch. 4. return 1; # returns 1 5. /* This is O(scary), but seems quick enough in practice. */ 6. /* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ 7. and here comes my favourite...... //When I wrote this, only God and I understood what I was doing //Now, God only knows
Some "a friend" has put into our codebase include.... // Ere Be Dragons.... // Abandon hope all ye who enter this function // Shhh - you aint seen me...roight (fans of the fast show may get the reference)
C# has already designed away most of the tedium of C++.
-
The best code comment seen in source code ...... 1. /// <remarks> /// The point of this is to work around his poor design so that paging will /// work on a mobile control. The main problem is the BindCompany() method, /// which he hoped would be able to do everything. I hope he dies. /// </remarks>; 2. // I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public. 3. // Magic. Do not touch. 4. return 1; # returns 1 5. /* This is O(scary), but seems quick enough in practice. */ 6. /* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ 7. and here comes my favourite...... //When I wrote this, only God and I understood what I was doing //Now, God only knows
6th, Awesome :thumbsup::thumbsup::thumbsup:
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN% R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
----------------------------------------------- 128 bit encrypted signature, crack if you can
-
The best code comment seen in source code ...... 1. /// <remarks> /// The point of this is to work around his poor design so that paging will /// work on a mobile control. The main problem is the BindCompany() method, /// which he hoped would be able to do everything. I hope he dies. /// </remarks>; 2. // I dedicate all this code, all my work, to my wife, Darlene, who will // have to support me and our three children and the dog once it gets // released into the public. 3. // Magic. Do not touch. 4. return 1; # returns 1 5. /* This is O(scary), but seems quick enough in practice. */ 6. /* * You may think you know what the following code does. * But you dont. Trust me. * Fiddle with it, and youll spend many a sleepless * night cursing the moment you thought youd be clever * enough to "optimize" the code below. * Now close this file and go play with something else. */ 7. and here comes my favourite...... //When I wrote this, only God and I understood what I was doing //Now, God only knows
From an enumeration definition in my code:
//...
Error_WebBreak,
Error_DryerTemperatureTooLow,// NOTE: Insert new error values here, and do not remove the marker value below, // LEST YE ANGER THE ELDER GODS. \_ErrorMarker
};
Software Zen:
delete this;
Fold With Us![^] -
I'm glad to see I'm not alone. I've had to do something to blow off steam some of the things I've put in include: 1.
//I HATE my job, thanks to code like this
2.//This is crap, but at least we obeyed Meskmen's law
3.//This needs refactoring, but frankly I don't have the will to deal with code this shit
4.//Pisspoor code. Pisspoor Architecture.
5.//WTF? No!
And I really hate commenting on other peoples code as you don't know what they had to deal with at the time (and an awareness that code I've written doesn't look so fresh after a couple of weeks). The code base on my current project ius just so bad.CCC solved so far: 2 (including a Hard One!)
That Meskimen's Law (Murphy's Computer Law + others[^])