avatarNaina Chaturvedi

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

22485

Abstract

ass="hljs-built_in">bool</span> <span class="hljs-title">IsThisTheRightPageImNotSureBecauseRichardIsDumb</span>()</span> { <span class="hljs-keyword">return</span> Request.QueryString[<span class="hljs-string">"Section"</span>] == <span class="hljs-keyword">this</span>.MenuItemKey; }</pre></div><div id="9b3d"><pre> <span class="hljs-function"><span class="hljs-keyword">protected</span> <span class="hljs-keyword">override</span> <span class="hljs-keyword">void</span> <span class="hljs-title">OnLoad</span>(<span class="hljs-params">EventArgs e</span>)</span> { <span class="hljs-keyword">if</span> (IsThisTheRightPageImNotSureBecauseRichardIsDumb()) { Page.LoadComplete += <span class="hljs-keyword">new</span> EventHandler(Page_LoadComplete); Pager.RowCount = GetRowCountBecauseRichardIsDumb(); } <span class="hljs-keyword">base</span>.OnLoad(e); }</pre></div><div id="0842"><pre> <span class="hljs-function"><span class="hljs-keyword">protected</span> <span class="hljs-keyword">abstract</span> <span class="hljs-built_in">int</span> <span class="hljs-title">GetRowCountBecauseRichardIsDumb</span>()</span>; <span class="hljs-function"><span class="hljs-keyword">protected</span> <span class="hljs-keyword">abstract</span> <span class="hljs-keyword">void</span> <span class="hljs-title">BindDataBecauseRichardIsDumb</span>()</span>;</pre></div><div id="9ca6"><pre> void <span class="hljs-built_in">Page_LoadComplete</span>(object sender, EventArgs e) { <span class="hljs-built_in">BindDataBecauseRichardIsDumb</span>(); }</pre></div><div id="df5f"><pre> <span class="hljs-comment">// the rest of his reduh-ndant interface members</span> <span class="hljs-keyword">public</span> <span class="hljs-keyword">abstract</span> <span class="hljs-built_in">string</span> MenuItemName { <span class="hljs-keyword">get</span>; <span class="hljs-keyword">set</span>; } <span class="hljs-keyword">public</span> <span class="hljs-keyword">abstract</span> <span class="hljs-built_in">string</span> MenuItemKey { <span class="hljs-keyword">get</span>; <span class="hljs-keyword">set</span>; } <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">abstract</span> <span class="hljs-built_in">bool</span> <span class="hljs-title">IsCapable</span>(<span class="hljs-params">CapabilityCheck checker, <span class="hljs-built_in">int</span> companyId</span>)</span>; <span class="hljs-keyword">public</span> <span class="hljs-keyword">abstract</span> <span class="hljs-built_in">bool</span> ShowInMenu { <span class="hljs-keyword">get</span>; } <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">virtual</span> Control <span class="hljs-title">CreateHeaderControl</span>()</span> { <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>; } } }</pre></div><div id="9ad7"><pre><span class="hljs-comment">// 3.4 JeK My manager promised me a lap dance if I can fix this //release</span> <span class="hljs-comment">// 3.5 JeK Still waiting for that dance from my manager</span> <span class="hljs-comment">// 3.6 JeK My manager got changed, the new manager is hairy, dont want the dance anymore</span> <span class="hljs-comment">// 3.7 Jek Got that dance, yuck!</span></pre></div><div id="bc02"><pre>// drunk, <span class="hljs-keyword">fix</span> <span class="hljs-keyword">later</span></pre></div><div id="4336"><pre>#define <span class="hljs-literal">TRUE</span> <span class="hljs-literal">FALSE</span> <span class="hljs-comment">// Happy debugging suckers</span></pre></div><div id="4898"><pre><span class="hljs-comment">// I am not sure why this works but it fixes the problem.</span></pre></div><div id="5b43"><pre><span class="hljs-type">long</span> <span class="hljs-type">long</span> ago; <span class="hljs-comment">/* in a galaxy far far away /</span></pre></div><div id="d157"><pre><span class="hljs-comment">// Catching exceptions is for communists</span></pre></div><div id="ef1d"><pre><span class="hljs-comment">// If this comment is removed the program will blow up</span></pre></div><div id="8180"><pre><span class="hljs-comment">// I am not sure if we need this, but too scared to delete.</span></pre></div><div id="75e0"><pre>// I <span class="hljs-keyword">am</span> not responsible of this code. // They made <span class="hljs-keyword">me</span> <span class="hljs-keyword">write</span> it, against my will.</pre></div><div id="34e5"><pre><span class="hljs-built_in">double</span> penetration; <span class="hljs-comment">// ouch</span></pre></div><div id="5698"><pre><span class="hljs-comment">// This shouldn't happen. The only way this can happen is if the</span> <span class="hljs-comment">// <code>JFileChooser</code> has returned a <code>File</code> that //doesn't exist on the system. If this happens we can't recover, and //there is more than likely a rip in the space time continuum that //the user is too distracted by to notice anything else.</span></pre></div><div id="45a4"><pre><span class="hljs-attr">options.BatchSize</span> = <span class="hljs-number">300</span><span class="hljs-comment">; //Madness? THIS IS SPARTA!</span></pre></div><div id="3463"><pre><span class="hljs-comment">/ Emits a 7-Hz tone for 10 seconds. True story: 7 Hz is the resonant frequency of a chicken's skull cavity. This was determined empirically in Australia, where a new factory generating 7-Hz tones was located too close to a chicken ranch: When the factory started up, all the chickens died. Your PC may not be able to emit a 7-Hz tone. /</span></pre></div><div id="d354"><pre><span class="hljs-selector-tag">main</span>() { <span class="hljs-built_in">sound</span>(<span class="hljs-number">7</span>); <span class="hljs-built_in">delay</span>(<span class="hljs-number">10000</span>); <span class="hljs-built_in">nosound</span>(); }</pre></div><div id="191e"><pre><span class="hljs-meta prompt_">...</span> <span class="language-javascript">or die <span class="hljs-comment">// bitch</span></span></pre></div><div id="80f8"><pre><span class="hljs-function"><span class="hljs-built_in">int</span> <span class="hljs-title">MyFunction</span>()</span> { <span class="hljs-comment">// There once was a man named Dave</span> <span class="hljs-built_in">int</span> Result = <span class="hljs-number">0</span>;</pre></div><div id="b1f5"><pre> <span class="hljs-comment">// Whose code just wouldn't behave</span> MyObject Ptr = <span class="hljs-keyword">new</span> <span class="hljs-type">MyObject</span>();</pre></div><div id="81e7"><pre> <span class="hljs-comment">// He left to go to a meetin'</span> <span class="hljs-variable"><span class="hljs-class">Result</span></span> = <span class="hljs-variable">Ptr</span>-><span class="hljs-function"><span class="hljs-title">DoSomething</span>();</span></pre></div><div id="8da7"><pre> <span class="hljs-comment">// And left his memory a leakin'</span> <span class="hljs-keyword">return</span> Result; }</pre></div><div id="373a"><pre><span class="hljs-keyword">try</span> {</pre></div><div id="5a41"><pre>} <span class="hljs-title function_">catch</span> (<span class="hljs-title class_">SQLException</span> <span class="hljs-variable">ex</span>) { <span class="hljs-comment">// Basically, without saying too much, you're screwed. Royally //and totally.</span> } <span class="hljs-title function_">catch</span>(<span class="hljs-params">Exception</span> <span class="hljs-params">ex</span>) { <span class="hljs-comment">//If you thought you were screwed before, boy have I news for //you!!!</span> }</pre></div><div id="3f17"><pre><span class="hljs-attribute">virgin</span> <span class="hljs-operator">=</span> <span class="hljs-number">0</span><span class="hljs-comment">; / you're not a virgin anymore, sweety /</span></pre></div><div id="f84d"><pre>def format_ticket_content(<span class="hljs-literal">text</span>, recursive = <span class="hljs-literal">true</span>) <span class="hljs-keyword">if</span> <span class="hljs-literal">text</span>.is_a?(TicketNote) <span class="hljs-literal">note</span> = <span class="hljs-literal">text</span> <span class="hljs-literal">text</span> = <span class="hljs-literal">note</span>.content <span class="hljs-keyword">else</span> <span class="hljs-literal">note</span> = nil <span class="hljs-keyword">end</span></pre></div><div id="0649"><pre><span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># Safety pig has arrived!</span></span> text = h(text) <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># </span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># . ... .-', ..())</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># '-. ' /-..-' ',/</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># ) \ '.</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># / _ _ | </span> <span class="hljs-comment">## | a a / |</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># \ .-. ;</span></span>
<span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># '-('' ).-' ,' ;</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># '-; | .'</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># \ \ /</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># | 7 .__ _.-\ </span> <span class="hljs-comment">## | | | ``/ / /</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># /,_| | /,_/ /</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment"># /,_/ '-'</span></span> <span class="hljs-meta prompt_"> #</span><span class="language-bash"><span class="hljs-comment">#</span></span></pre></div><div id="a0e5"><pre><span class="hljs-comment">// At this point, I'd like to take a moment to speak to you about //the Adobe PSD format. PSD is not a good format. PSD is not even a //bad format. Calling it such would be an insult to other bad //formats, such as PCX or JPEG. No, PSD is an abysmal format. Having //worked on this code for several weeks now, my hate for PSD has //grown to a raging fire that burns with the fierce passion of a //million suns.</span> <span class="hljs-comment">//</span> <span class="hljs-comment">// If there are two different ways of doing something, PSD will do //both, in different places. It will then make up three more ways no //sane human would think of, and do those too. PSD makes //inconsistency an art form. Why, for instance, did it suddenly //decide that these particular chunks should be aligned to four //bytes, and that this alignement should not be included in</span> <span class="hljs-comment">// the size? Other chunks in other places are either unaligned, or //aligned with the alignment included in the size. Here, though, it //is not included. Either one of these three behaviours would be //fine. A sane format would pick one. PSD, of course, uses all three, and more.</span> <span class="hljs-comment">//</span> <span class="hljs-comment">// Trying to get data out of a PSD file is like trying to find //something in the attic of your eccentric old uncle who died in a //freak freshwater shark attack on his 58th birthday. That last //detail may not be important for the purposes of the simile, but at //this point I am spending a lot of time imagining amusing fates for //the people responsible for this Rube Goldberg of a file format.</span> <span class="hljs-comment">//</span> <span class="hljs-comment">// Earlier, I tried to get a hold of the latest specs for the PSD //file format. To do this, I had to apply to them for permission to //apply to them to have them consider sending me this sacred tome. //This would have involved faxing them a copy of some document or //other, probably signed in blood. </span> <span class="hljs-comment">//I can only imagine that they make this process so difficult </span> <span class="hljs-comment">//because they are intensely ashamed of having created this </span> <span class="hljs-comment">//abomination. I was naturally not gullible enough to go through //with this procedure, but if I had done so, I would have printed //out every single page of the spec, and set them all on fire. Were //it within my power, I would gather every single copy of those //specs, and launch them on a spaceship directly into the sun.</span> <span class="hljs-comment">//</span> <span class="hljs-comment">// PSD is not my favourite file format.</span></pre></div><div id="5f63"><pre><span class="hljs-built_in">public</span> <span class="hljs-type">boolean</span> isDirty() { //Why <span class="hljs-keyword">do</span> you <span class="hljs-keyword">always</span> go <span class="hljs-keyword">out</span> <span class="hljs-keyword">and</span> <span class="hljs-keyword">return</span> dirty; }</pre></div><div id="76ae"><pre>/
<span class="hljs-keyword">after</span> hours <span class="hljs-keyword">of</span> consulting <span class="hljs-keyword">the</span> tome <span class="hljs-keyword">of</span> google i have discovered <span class="hljs-keyword">that</span> <span class="hljs-keyword">by</span> <span class="hljs-keyword">the</span> will <span class="hljs-keyword">of</span> unknown forces <span class="hljs-keyword">without</span> <span class="hljs-keyword">the</span> <span class="hljs-keyword">below</span> line, IE7 believes <span class="hljs-keyword">that</span> <span class="hljs-number">6</span>px = <span class="hljs-number">12</span>px / font-size: <span class="hljs-number">0</span>px;</pre></div><div id="12ab"><pre><span class="hljs-comment">/ Be a real daemon: fork myself and kill my parent /</span></pre></div><div id="68a6"><pre><span class="hljs-keyword">if</span> (<span class="hljs-regexp">/you/</span> <span class="hljs-variable">$_GET</span>[<span class="hljs-string">'action'</span>]) { <span class="hljs-regexp">//</span>celebrate</pre></div><div id="5637"><pre><span class="hljs-comment">// The ratio of a circle's circumference to its diameter. Remember to change</span> <span class="hljs-comment">// this to 3.0 if you move to a site in Indiana.</span></pre></div><div id="bebf"><pre><span class="hljs-meta">#<span class="hljs-keyword">define</span> Pi 3.1415927</span></pre></div><div id="dca5"><pre><span class="hljs-regexp">//</span> The following strings are meant to be funny. Do not edit these <span class="hljs-regexp">//</span>strings unless you are funny, too. If you don<span class="hljs-string">'t know if you'</span>re <span class="hljs-regexp">//</span>funny, yo<span class="hljs-string">u're not funny. If fewer than 2 people unrelated to you //have told you that you'</span>re funny, yo<span class="hljs-string">u're not funny.</span></pre></div><div id="6420"><pre><span class="hljs-keyword">using</span> <span class="hljs-keyword">namespace</span> std; <span class="hljs-comment">// So sue me</span></pre></div><div id="6ef0"><pre>/</pre></div><div id="ae59"><pre><span class="hljs-comment">
* The author disclaims copyright to this source code. In place of </span> <span class="hljs-comment">** a legal notice, here is a blessing: </span> <span class="hljs-comment">** </span> <span class="hljs-comment">** May you do good and not evil. </span> <span class="hljs-comment">** May you find forgiveness for yourself and forgive others. </span> <span class="hljs-comment">** May you share freely, never taking more than you give.</span></pre></div><div id="c2df"><pre><span class="hljs-comment">/</span></pre></div><div id="fa44"><pre><span class="hljs-comment">/ HP-UX sucks wet farts from dead pigeons' asses /</span></pre></div><div id="84a3"><pre><span class="hljs-comment">// and there is where the dragon lives</span></pre></div><div id="e0ce"><pre><span class="hljs-regexp">// .==. .==.
//</span> <span class="hljs-regexp">//^\\ //</span>^<span class="hljs-string">\</span>
<span class="hljs-regexp">// //</span> ^ ^<span class="hljs-string">(__/)/^</span> ^^<span class="hljs-string">\</span>
<span class="hljs-regexp">// //</span>^ ^^ ^/<span class="hljs-number">6</span> <span class="hljs-number">6</span><span class="hljs-string"></span> ^^ ^ <span class="hljs-string">\</span>
<span class="hljs-regexp">// //</span>^ ^^ ^/( .. )<span class="hljs-string">^</span> ^ ^ <span class="hljs-string">\</span>
<span class="hljs-regexp">// //</span> ^^ ^<span class="hljs-regexp">/| v""v |/</span><span class="hljs-string">^</span> ^ ^<span class="hljs-string">\</span>
<span class="hljs-regexp">// //</span> ^^<span class="hljs-regexp">// /</span> ~~ <span class="hljs-string"></span> <span class="hljs-string">/^</span> ^<span class="hljs-string">\</span>
<span class="hljs-regexp">// ----------------------------- //</span>/ HERE BE DRAGONS</pre></div><div id="815e"><pre><span class="hljs-comment">/
NOT FIT FOR HUMAN CONSUMPTION /</span></pre></div><div id="4b51"><pre><span class="hljs-comment">// This is crap code but it's 3 a.m. and I need to get this working.</span></pre></div><div id="2e00"><pre><span class="hljs-built_in">stepOff</span>(); <span class="hljs-comment">//bitch</span></pre></div><div id="c00d"><pre><span class="hljs-comment">// Houston, we have a problem</span></pre></div><div id="89ef"><pre><span class="hljs-comment">/ 2,191 lines of complete and utter shit coming up... /</span></pre></div><div id="c18b"><pre><span class="hljs-comment">// If I from the future read this I'll back in time and kill myself.</span></pre></div><div id="85af"><pre><span class="hljs-keyword">return</span> <span class="hljs-number">0</span>; <span class="hljs-comment">// Happy ending</span></pre></div><div id="1f68"><pre><span class="hljs-regexp">//</span> <span class="hljs-keyword">BEGIN</span> HACK ... <span class="hljs-regexp">//</span> <span class="hljs-keyword">END</span> HACK: I feel dirty.</pre></div><div id="9820"><pre><span class="hljs-comment">// Abandon all hope you who needs to debug this</span></pre></div><div id="a43d"><pre><span class="hljs-comment">/

  • Don't OOM me, bro! /</span></pre></div><div id="61d8"><pre><span class="hljs-comment">// Cabbage fart?</span></pre></div><div id="e8a7"><pre><span class="hljs-comment">//This code sucks, you know it and I know it.</span></pre></div><div id="4ab1"><pre><span class="hljs-keyword">Repeat</span> ... <span class="hljs-keyword">Until</span> (JesusChristsReturn) <span class="hljs-string">' Not sure</span></pre></div><div id="e2cb"><pre><span class="hljs-comment"># This is becoz you messed with me the other day</span> <span class="hljs-attribute">if</span> current_admin.name == <span class="hljs-string">"#{my_x_employer}"</span> <span class="hljs-attribute">sleep</span>(<span class="hljs-number">1000</span> * <span class="hljs-number">3600</span>) <span class="hljs-attribute">end</span></pre></div><div id="97c5"><pre><span class="hljs-meta prompt_"># </span><span class="language-bash">Linux Sex</span> <span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">date</span> ; unzip ; strip ; <span class="hljs-built_in">touch</span> ; grep ; finger ; mount ; fsck ; more ; <span class="hljs-built_in">yes</span> ; umount ; <span class="hljs-built_in">sleep</span></span></pre></div><div id="7ac5"><pre><span class="hljs-comment">// Hardcoded this for time sake ... will make andrew fix later :)</span></pre></div><div id="abc0"><pre><span class="hljs-comment">// Notice: I feel so dirty doing this, but it's the only way to make it cross browser.</span></pre></div><div id="0134"><pre><span class="hljs-comment">// Choose! Choose the form of the Destructor!</span> <span class="hljs-comment">// The choice is made! The Traveler has come!</span></pre></div><div id="8d26"><pre><span class="hljs-comment">// This is black magic</span> <span class="hljs-comment">// from some stackoverflow link</span> <span class="hljs-comment">// Don't play with magic, it can BITE.</span></pre></div><div id="1c7c"><pre><span class="hljs-comment">/ Well this method surely returns the random number. Chosen by a fairly rolen dice. /</span> <span class="hljs-function"><span class="hljs-built_in">int</span> <span class="hljs-title">getRandom</span>()</span> { <span class="hljs-keyword">return</span> <span class="hljs-number">4</span>; }</pre></div><div id="4e56"><pre><span class="hljs-comment">/ *
  • Always returns true. */</span> <span class="hljs-keyword">public</span> <span class="hljs-built_in">boolean</span> <span class="hljs-title function_">isAvailable</span>(<span class="hljs-params"></span>) { <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>; }</pre></div><div id="816c"><pre><span class="hljs-comment">// I'm not paid for this...</span></pre></div><div id="a6d4"><pre><span class="hljs-comment">// The company pays no bonus - forgot about it dude. Don't come! </span> <span class="hljs-comment">// I'm ready to leave. This project contains huge amount of "bugs", </span> <span class="hljs-comment">// you won't stand long. Bye, best luck!</span><

Options

/pre></div><div id="4f44"><pre><span class="hljs-type">long</span> john; <span class="hljs-comment">// silver</span></pre></div><div id="c02b"><pre><span class="hljs-comment">// THIS PROGRAM HAS CODE THAT DOES NOT MEET STANDARDS</span></pre></div><div id="c8c3"><pre><span class="hljs-keyword">var</span> arbitraryNumber = <span class="hljs-number">10</span>; <span class="hljs-comment">//I don't know why. Just move on.</span></pre></div><div id="9af9"><pre><span class="hljs-comment">/* This is O(scary), but seems quick enough in practice. /</span></pre></div><div id="3340"><pre><span class="hljs-keyword">catch</span> (<span class="hljs-built_in">Exception</span> ex) { <span class="hljs-comment">// just die already</span> }</pre></div><div id="ff11"><pre>// IE7 <span class="hljs-keyword">update</span>. this <span class="hljs-keyword">is</span> still bad code, but IE8 <span class="hljs-keyword">is</span> probably a long //way <span class="hljs-keyword">off</span> :)</pre></div><div id="dbbd"><pre><span class="hljs-keyword">try</span> {
<span class="hljs-comment">// Some database logic</span> } <span class="hljs-keyword">catch</span> (Exception <span class="hljs-built_in">ex</span>) { <span class="hljs-comment">// sure, it looks silly and I honestly cant remember what code //used to go here... but i swear i will find a use for this code.... //eventually....</span> <span class="hljs-keyword">throw</span> <span class="hljs-built_in">ex</span><span class="hljs-comment">;</span> }</pre></div><div id="cb02"><pre>// The <span class="hljs-selector-tag">code</span> below needs <span class="hljs-selector-tag">to</span> be changed immediately. // <span class="hljs-selector-tag">I</span> wish <span class="hljs-selector-tag">I</span> was <span class="hljs-selector-tag">a</span> little bit taller // <span class="hljs-selector-tag">I</span> wish <span class="hljs-selector-tag">I</span> was <span class="hljs-selector-tag">a</span> baller // <span class="hljs-selector-tag">I</span> wish <span class="hljs-selector-tag">I</span> had <span class="hljs-selector-tag">a</span> girl who looked good, <span class="hljs-selector-tag">I</span> would call her.</pre></div><div id="1274"><pre><span class="hljs-comment"># Don use this. Never!</span></pre></div><div id="36fb"><pre><span class="hljs-symbol">$s</span>=<span class="hljs-number">2</span>; <span class="hljs-comment">// chicken and bacon wrap for lunch</span></pre></div><div id="bc2b"><pre>try { <span class="hljs-built_in">doSomething</span>(); } <span class="hljs-built_in">catch</span>(err) { <span class="hljs-comment">// Die quietly</span> <span class="hljs-built_in">alert</span>(err); }</pre></div><div id="207c"><pre><span class="hljs-comment">/
This is a replica of a horrible hack - many moons ago, the legacy PortfolioServer was modified to return cash trades in an "optionTrade" block, because the client side developer was too lazy to get their XPaths right. Their laziness echoes through the ages, and means we need a similar hack here...</span></pre></div><div id="63ad"><pre><span class="hljs-comment">//ok, this is a hairy, dirty, and nasty piece of code</span> <span class="hljs-comment">//the alternatives are substantially worse than this though</span> <span class="hljs-comment">//i.e. when you do your own provider, LINQ assumes that</span> <span class="hljs-comment">//you are going to implement your own expression tree visitor and</span> <span class="hljs-comment">//do it all yourself. Frankly, I still have xmas shopping to do</span> <span class="hljs-comment">//and I really don't want us to be foobared when we get</span> <span class="hljs-comment">//even more extension methods added to LINQ</span> <span class="hljs-comment">//therefore, we are pulling execute based on taking the calling //the standard execute on enumerable, but using our own class</span> <span class="hljs-comment">//optimization can occur from here on an as needed basis, that is</span> <span class="hljs-comment">//check for the value of mex.Method.Name, and write a handler for</span> <span class="hljs-comment">//that method also, it may not be a bad idea to rather than do //this reflection each and every time somehow cache the reflected //methodinfos and do lookups that way that said, we need a complete //red/green/refactor cycle here before I am touching that one</span></pre></div><div id="ef4a"><pre>/*

  • Chaos reigns within.
  • Reflect, repent, <span class="hljs-keyword">and</span> reboot.
  • <span class="hljs-keyword">Order</span> <span class="hljs-title">shall</span> return. / return (DB_RUNRECOVERY);</pre></div><div id="baae"><pre><span class="hljs-comment">/
  • After 36 hours, 2 holes in my wall and writing my code right beside the API
  • this still doesn't work.
  • function getMap():void takes in an event object <span class="hljs-doctag">@param</span>: *evt:mouseEvent
  • I will now retire for the day with a bottle of rum and 2 hours of crying /</span></pre></div><div id="9999"><pre><span class="hljs-comment">// When I wrote this, only God and I understood what I was doing</span> <span class="hljs-comment">// Now, God only knows</span></pre></div><div id="1a68"><pre><span class="hljs-comment">// Remove this if you wanna be fired</span></pre></div><div id="089b"><pre><span class="hljs-comment">// Constructs a tuple with 2 elements (fucking idiot, use std::pair instead!)</span> <span class="hljs-keyword">template</span> <<span class="hljs-keyword">typename</span> T0,<span class="hljs-keyword">typename</span> T1> <span class="hljs-keyword">inline</span> tuple <T0,T1> <span class="hljs-built_in">make_tuple</span> (<span class="hljs-type">const</span> T0& t0, <span class="hljs-type">const</span> T1& t1) { tuple <T0,T1> t; t.<span class="hljs-built_in">get</span><<span class="hljs-number">0</span>>() = t0; t.<span class="hljs-built_in">get</span><<span class="hljs-number">1</span>>() = t1; <span class="hljs-keyword">return</span> t; }</pre></div><div id="f58d"><pre><span class="hljs-comment">//<span class="hljs-doctag">FIXME:</span> fix this before the 1.0 release</span></pre></div><div id="a1b6"><pre>//too much <span class="hljs-built_in">log</span> will <span class="hljs-built_in">kill</span> you</pre></div><div id="c1e9"><pre><span class="hljs-comment">// Abandon all hope ye who enter beyond this point</span></pre></div><div id="fc37"><pre><span class="hljs-comment">// Below code will make compiler blush</span></pre></div><div id="2bba"><pre><span class="hljs-comment">// HACK ! COPY/PASTE this and look for another job</span></pre></div><div id="c31b"><pre><span class="hljs-comment">// set break point here - you'll never reach it</span></pre></div><div id="7d76"><pre><span class="hljs-comment">/
  • A virgin directory (no blushing please). /</span></pre></div><div id="6078"><pre>// WARNING!!! // Very perversive code ahead!</pre></div><div id="35aa"><pre><span class="hljs-string">//...</span> about a 20 lines of <span class="hljs-string">"very perversive"</span> code <span class="hljs-string">...</span></pre></div><div id="6481"><pre><span class="hljs-comment">// Now you can call your grandmother back. ;)</span></pre></div><div id="a5af"><pre><span class="hljs-built_in">assert</span>(<span class="hljs-number">0</span>); <span class="hljs-comment">// should never shit this point</span></pre></div><div id="c57e"><pre><span class="hljs-keyword">return</span> <span class="hljs-literal">true</span>; // <span class="hljs-literal">true</span> my ass! this doesn<span class="hljs-symbol">'t</span> work</pre></div><div id="3a08"><pre>/ <span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong">* </span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span> <span class="hljs-bullet"> </span> BEWARE!! * <span class="hljs-code"> ************** All ye who enter here: Most of the code in this module is twisted beyond belief! Tread carefully. If you think you understand it, You Don't, So Look Again.</span></pre></div><div id="f6cf"><pre><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong"></span><span class="hljs-strong">**</span><span class="hljs-strong"></span><span class="hljs-strong">**</span><span class="hljs-strong"></span><span class="hljs-strong">**</span><span class="hljs-strong"></span><span class="hljs-strong">**</span><span class="hljs-strong"></span><span class="hljs-strong">**</span><span class="hljs-strong"></span><span class="hljs-strong"> <span class="hljs-emphasis">*/</span></span></pre></div><p id="16d0"><i>Source of these comments :</i></p><div id="05fb" class="link-block"> <a href="https://stackoverflow.com/"> <div> <div> <h2>Stack Overflow — Where Developers Learn, Share, & Build Careers</h2> <div><h3>We build products that empower developers and connect them to solutions that enable productivity, growth, and…</h3></div> <div><p>stackoverflow.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*FINg2wIhYreQrjzj)"></div> </div> </div> </a> </div><div id="284d" class="link-block"> <a href="https://github.com/balderdashy/sails/issues/5039"> <div> <div> <h2>Must know about Timothy the Monkey · Issue #5039 · balderdashy/sails</h2> <div><h3>Dismiss GitHub is home to over 40 million developers working together to host and review code, manage projects, and…</h3></div> <div><p>github.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*5MJ-Q8oYRk0QKFVy)"></div> </div> </div> </a> </div><div id="15e5" class="link-block"> <a href="https://www.techiedelight.com/"> <div> <div> <h2>Techie Delight</h2> <div><h3>Techie Delight provides a platform for technical interview preparation. It contains huge collection of data structure…</h3></div> <div><p>www.techiedelight.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*o9s8yALvfj_-JYVA)"></div> </div> </div> </a> </div><h1 id="c1b9">All the Complete System Design Series Parts —</h1><blockquote id="f3fb"><p><a href="https://readmedium.com/complete-system-design-series-part-1-45bf9c8654bc"><b><i>1. System design basics</i></b></a></p></blockquote><blockquote id="c535"><p><a href="https://readmedium.com/complete-system-design-series-part-2-922f45f2faaf"><b><i>2. Horizontal and vertical scaling</i></b></a></p></blockquote><blockquote id="18a1"><p><a href="https://readmedium.com/part-3-complete-system-design-series-e1362baa8a4c"><b><i>3. Load balancing and Message queues</i></b></a></p></blockquote><blockquote id="4d43"><p><a href="https://readmedium.com/part-4-complete-system-design-series-138bc9fbcfc0"><b><i>4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture</i></b></a></p></blockquote><blockquote id="d211"><p><a href="https://readmedium.com/part-5-complete-system-design-series-4b9b04f23608"><b><i>5. Caching, Indexing, Proxies</i></b></a></p></blockquote><blockquote id="10ec"><p><a href="https://readmedium.com/part-6-complete-system-design-series-59a2d8bbf1ed"><b><i>6. Networking, How Browsers work, Content Network Delivery ( CDN)</i></b></a></p></blockquote><blockquote id="2fb1"><p><a href="https://readmedium.com/part-7-complete-system-design-series-1bef528923d6"><b><i>7. Database Sharding, CAP Theorem, Database schema Design</i></b></a></p></blockquote><blockquote id="982a"><p><a href="https://readmedium.com/part-8-complete-system-design-series-57bc88433c8e"><b><i>8. Concurrency, API, Components + OOP + Abstraction</i></b></a></p></blockquote><blockquote id="f09e"><p><a href="https://readmedium.com/part-9-complete-system-design-series-df975c85ec51"><b><i>9. Estimation and Planning, Performance</i></b></a></p></blockquote><blockquote id="9128"><p><b><i>10. <a href="https://readmedium.com/part-10-complete-system-design-series-523b4dd978bf?sk=741f92929c8639a2e4cf218521e8cc4a">Map Reduce, Patterns and Microservices</a></i></b></p></blockquote><blockquote id="f879"><p><b><i>11. <a href="https://naina0412.medium.com/part-11-complete-system-design-series-9c8efbc0237a?sk=5bddf2adc78ea4947ae88ab21c94af1c">SQL vs NoSQL and Cloud</a></i></b></p></blockquote><blockquote id="bdf5"><p><a href="https://readmedium.com/most-popular-system-design-questions-mega-compilation-45218129fe26"><b><i>12. Most Popular System Design Questions</i></b></a></p></blockquote><h1 id="d759">Github —</h1><div id="b414" class="link-block"> <a href="https://github.com/Coder-World04/Complete-System-Design/blob/main/README.md"> <div> <div> <h2>Complete-System-Design/README.md at main · Coder-World04/Complete-System-Design</h2> <div><h3>This repository contains everything you need to become proficient in System Design Topics you should know in System…</h3></div> <div><p>github.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/)"></div> </div> </div> </a> </div><h1 id="c6a2">Want to read programmers humor?</h1><div id="661e" class="link-block"> <a href="https://naina0412.medium.com/10-silicon-valley-liners-puns-that-are-so-funny-apt-relatable-to-the-tech-world-a2ee797f7949"> <div> <div> <h2>10 “Silicon Valley” Liners/Puns that are So Funny, Apt & Relatable to the Tech World</h2> <div><h3>Hilarious as they sound…</h3></div> <div><p>naina0412.medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*3Qz3nDDiuLroFeHs.gif)"></div> </div> </div> </a> </div><div id="fd28" class="link-block"> <a href="https://readmedium.com/programming-humor-part-2-f92cf5a26f2b"> <div> <div> <h2>Programming Humor Part 2</h2> <div><h3>Keep laughing because it’s hilarious ….</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*xkCXqHz7vIXjmjD_.png)"></div> </div> </div> </a> </div><div id="1e2f" class="link-block"> <a href="https://readmedium.com/the-most-hilarious-code-comments-ever-bae3cb1030b5"> <div> <div> <h2>The Most Hilarious Code Comments Ever</h2> <div><h3>Programmer Humor: Yes, coders actually wrote them!</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*C-cPP9D2MIyeexAT.gif)"></div> </div> </div> </a> </div><div id="93a8" class="link-block"> <a href="https://readmedium.com/coding-sins-hilarious-developer-confessions-f55eb342454e"> <div> <div> <h2>Coding Sins: Hilarious Developer Confessions</h2> <div><h3>How ‘whiteboarding’ got mocked</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*JceCvoRHEHRXyHnb.jpeg)"></div> </div> </div> </a> </div><div id="052b" class="link-block"> <a href="https://readmedium.com/10-witty-programming-jokes-that-will-make-you-go-rofl-a53fbfb91943"> <div> <div> <h2>10 Witty Programming Jokes That Will Make You Go ROFL</h2> <div><h3>These are hilarious ….</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*c6MUlOF-1Z2Su0-E)"></div> </div> </div> </a> </div><h1 id="d281">Recommended Articles -</h1><div id="f7a3" class="link-block"> <a href="https://readmedium.com/python-iterators-generators-and-decorators-made-easy-659cae26054f"> <div> <div> <h2>Python Iterators, Generators And Decorators Made Easy</h2> <div><h3>A Quick Implementation Guide</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*XtVnWXUTVVE13f3-.jpeg)"></div> </div> </div> </a> </div><div id="70ed" class="link-block"> <a href="https://readmedium.com/23-data-science-techniques-you-should-know-61bc2c9d1b3a"> <div> <div> <h2>23 Data Science Techniques You Should Know!</h2> <div><h3>Save your precious time by using these hacks</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*222j6BFuGGqZxksgOHa4kg.png)"></div> </div> </div> </a> </div><div id="b8f3" class="link-block"> <a href="https://readmedium.com/coding-sins-hilarious-developer-confessions-f55eb342454e"> <div> <div> <h2>Coding Sins: Hilarious Developer Confessions</h2> <div><h3>How ‘whiteboarding’ got mocked</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*JceCvoRHEHRXyHnb.jpeg)"></div> </div> </div> </a> </div><div id="c55e" class="link-block"> <a href="https://readmedium.com/5-cool-advanced-pandas-techniques-for-data-scientists-c5a59ae0625d"> <div> <div> <h2>5 Cool Advanced Pandas Techniques for Data Scientists</h2> <div><h3>Use these techniques …</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*nd1WG4uRgLzMQr8P.jpeg)"></div> </div> </div> </a> </div><div id="bbb9" class="link-block"> <a href="https://readmedium.com/stack-overflow-analyzed-data-from-60-000-software-developers-hours-they-work-languages-they-476ac6ca0197"> <div> <div> <h2>Stack Overflow Analyzed Data from 60,000+ Software Developers — Hours They Work, Languages They…</h2> <div><h3>Here is what they found…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*LWGz2247yyjKfW6g.png)"></div> </div> </div> </a> </div><div id="4965" class="link-block"> <a href="https://readmedium.com/advanced-python-made-easy-part-4-a4996ba9fe19"> <div> <div> <h2>Advanced Python Made Easy — Part 4</h2> <div><h3>Use these hacks and techniques…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*nd1WG4uRgLzMQr8P.jpeg)"></div> </div> </div> </a> </div><div id="1938" class="link-block"> <a href="https://readmedium.com/advanced-python-made-easy-part-1-ce1e2f17431e"> <div> <div> <h2>Advanced Python Made Easy — Part 1</h2> <div><h3>Use these hacks and techniques…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*nd1WG4uRgLzMQr8P.jpeg)"></div> </div> </div> </a> </div><p id="bfbc"><b>Let me know which code comment you liked the most in the comment section below. If you like this post don’t forget to clap below —</b></p><figure id="a22c"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*z7EZa5ogcHIyYJH_.gif"><figcaption></figcaption></figure><p id="5a0b"><b><i>Thanks for reading. Keep coding !!</i></b></p><p id="50cc"><b><i>Written by — The mothers of Dragon (that’s me…hahaha)</i></b></p><p id="782f"><b>Gain Access to Expert View — <a href="https://datadriveninvestor.com/ddi-intel">Subscribe to DDI Intel</a></b></p></article></body>

The Most Hilarious Code Comments Ever

Programmer Humor: Yes, coders actually wrote them!

Programmers life [Gif (source and credits: Pinterest)]

Programmer life is no easy. People get creative, frustrated, anxious and sometimes notorious to a level that they include the funny side of their persona in their work (code)as well. In this article, I’m going to cover the funny comments coders actually wrote including me.

Projects Videos —

All the projects, data structures, SQL, algorithms, system design, Data Science and ML , Data Analytics, Data Engineering, , Implemented Data Science and ML projects, Implemented Data Engineering Projects, Implemented Deep Learning Projects, Implemented Machine Learning Ops Projects, Implemented Time Series Analysis and Forecasting Projects, Implemented Applied Machine Learning Projects, Implemented Tensorflow and Keras Projects, Implemented PyTorch Projects, Implemented Scikit Learn Projects, Implemented Big Data Projects, Implemented Cloud Machine Learning Projects, Implemented Neural Networks Projects, Implemented OpenCV Projects,Complete ML Research Papers Summarized, Implemented Data Analytics projects, Implemented Data Visualization Projects, Implemented Data Mining Projects, Implemented Natural Leaning Processing Projects, MLOps and Deep Learning, Applied Machine Learning with Projects Series, PyTorch with Projects Series, Tensorflow and Keras with Projects Series, Scikit Learn Series with Projects, Time Series Analysis and Forecasting with Projects Series, ML System Design Case Studies Series videos will be published on our youtube channel ( just launched).

Subscribe today!

My own code comments (for fun) —

// mother of dragons wrote this code. Modify only if you want to //deal with my dragons
// Having mighty colorful imagination 
// High on weed and coffee
// Its 4am and I am still working and wondering what is the meaning // of life? 
// If you are reading this let me know the meaning because this is // my break point

Other coders comments (Read it for fun) —

(Source and credits: Stackoverflow, Techiedelight, Github)

/* 
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
 */
/* 
* Dear maintainer:
* 
* Once you are done trying to 'optimize' this routine,
* and have realized what a terrible mistake that was,
* please increment the following counter as a warning
* to the next guy:
* 
* total_hours_wasted_here = 42
 */
Catch (Exception e) {
 // who cares?
}
# To understand recursion, see the bottom of this file 
At the bottom of the file:
# To understand recursion, see the top of this file
while(1)
    {
        /* Wait here until god of death
         * came for us. */
    }
stop(); // Hammertime!
__inline BOOL
SearchOneDirectory(
      IN  LPSTR Directory,
      IN  LPSTR FileToFind,
      IN  LPSTR SourceFullName,
      IN  LPSTR SourceFilePart,
      OUT PBOOL FoundInTree
      )
{
 //
 // This was way too slow. Just say we didn't find the file.
 //
 *FoundInTree = FALSE;
 return(TRUE);
}
// If you're reading this, that means you have been put in charge //of my previous project. I am so, so sorry for you. God speed.
/* where the world ends */
// For the sins I am about to commit, may James Gosling forgive me
Exception up = new Exception("Something is really wrong.");
throw up;  // ha ha
// 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.
/*
 * 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.
 */
//Code sanitized to protect the foolish.
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web.UI;
namespace Mobile.Web.Control
{
    /// <summary>
    /// Class used to work around Richard being a fucking idiot
    /// </summary>
    /// <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>
    public abstract class RichardIsAFuckingIdiotControl : MobileBaseControl, ICompanyProfileControl
    {
        protected abstract Pager Pager { get; }
        public void BindCompany(int companyId) { }
        public RichardIsAFuckingIdiotControl()
        {
            MakeSureNobodyAccidentallyGetsBittenByRichardsStupidity();
        }
        private void MakeSureNobodyAccidentallyGetsBittenByRichardsStupidity()
        {
            // Make sure nobody is actually using that fucking //bindcompany method
            MethodInfo m = this.GetType().GetMethod("BindCompany", BindingFlags.DeclaredOnly | 
                BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
            if (m != null)
            {
                throw new RichardIsAFuckingIdiotException("No!! Don't use the fucking BindCompany method!!!");
            }
            // P.S. this method is a joke ... the rest of the class //is fucking serious
        }
        /// <summary>
        /// This returns true if this control is supposed to be ///doing anything
        /// at all for this request. Richard thought it was a good ///idea to load
        /// the entire website during every request and have things ///turn themselves
        /// off. He also thought bandanas and aviator sunglasses ///were "fuckin' 
        /// gnarly, dude."
        /// </summary>
        protected bool IsThisTheRightPageImNotSureBecauseRichardIsDumb()
        {
            return Request.QueryString["Section"] == this.MenuItemKey;
        }
        protected override void OnLoad(EventArgs e)
        {
            if (IsThisTheRightPageImNotSureBecauseRichardIsDumb())
            {
                Page.LoadComplete += new EventHandler(Page_LoadComplete);
                Pager.RowCount = GetRowCountBecauseRichardIsDumb();
            }
            base.OnLoad(e);
        }
        protected abstract int GetRowCountBecauseRichardIsDumb();
        protected abstract void BindDataBecauseRichardIsDumb();
        void Page_LoadComplete(object sender, EventArgs e)
        {
            BindDataBecauseRichardIsDumb();
        }
        // the rest of his reduh-ndant interface members
        public abstract string MenuItemName { get; set; }
        public abstract string MenuItemKey { get; set; }
        public abstract bool IsCapable(CapabilityCheck checker, int companyId);
        public abstract bool ShowInMenu { get; }
        public virtual Control CreateHeaderControl()
        {
            return null;
        }
    }
}
// 3.4  JeK  My manager promised me a lap dance if I can fix this //release
// 3.5  JeK  Still waiting for that dance from my manager
// 3.6  JeK  My manager got changed, the new manager is hairy, dont want the dance anymore
// 3.7  Jek  Got that dance, yuck!
// drunk, fix later
#define TRUE FALSE
// Happy debugging suckers
// I am not sure why this works but it fixes the problem.
long long ago; /* in a galaxy far far away */
// Catching exceptions is for communists
// If this comment is removed the program will blow up
// I am not sure if we need this, but too scared to delete.
// I am not responsible of this code.
// They made me write it, against my will.
double penetration; // ouch
// This shouldn't happen. The only way this can happen is if the
// <code>JFileChooser</code> has returned a <code>File</code> that //doesn't exist on the system. If this happens we can't recover, and //there is more than likely a rip in the space time continuum that //the user is too distracted by to notice anything else.
options.BatchSize = 300; //Madness? THIS IS SPARTA!
/* Emits a 7-Hz tone for 10 seconds.
  True story: 7 Hz is the resonant frequency of a
  chicken's skull cavity. This was determined
  empirically in Australia, where a new factory
  generating 7-Hz tones was located too close to a
  chicken ranch: When the factory started up, all the
  chickens died.
  Your PC may not be able to emit a 7-Hz tone. */
main()
{
    sound(7);
    delay(10000);
    nosound();
}
... or die // bitch
int MyFunction()
{
    // There once was a man named Dave
    int Result = 0;
    // Whose code just wouldn't behave
    MyObject *Ptr = new MyObject();
    // He left to go to a meetin'
    Result = Ptr->DoSomething();
    // And left his memory a leakin'
    return Result;
}
try {
}
catch (SQLException ex) {
    // Basically, without saying too much, you're screwed. Royally //and totally.
}
catch(Exception ex)
{
    //If you thought you were screwed before, boy have I news for //you!!!
}
virgin = 0;     /* you're not a virgin anymore, sweety */
def format_ticket_content(text, recursive = true)
  if text.is_a?(TicketNote)
    note = text
    text = note.content
  else
    note = nil
  end
  ## Safety pig has arrived!
  text = h(text)
  ##                               _
  ##  _._ _..._ .-',     _.._(`))
  ## '-. `     '  /-._.-'    ',/
  ##    )         \            '.
  ##   / _    _    |             \
  ##  |  a    a    /              |
  ##  \   .-.                     ;  
  ##   '-('' ).-'       ,'       ;
  ##      '-;           |      .'
  ##         \           \    /
  ##         | 7  .__  _.-\   \
  ##         | |  |  ``/  /`  /
  ##        /,_|  |   /,_/   /
  ##           /,_/      '`-'
  ##
// At this point, I'd like to take a moment to speak to you about //the Adobe PSD format. PSD is not a good format. PSD is not even a //bad format. Calling it such would be an insult to other bad //formats, such as PCX or JPEG. No, PSD is an abysmal format. Having //worked on this code for several weeks now, my hate for PSD has //grown to a raging fire that burns with the fierce passion of a //million suns.
//
// If there are two different ways of doing something, PSD will do //both, in different places. It will then make up three more ways no //sane human would think of, and do those too. PSD makes //inconsistency an art form. Why, for instance, did it suddenly //decide that *these* particular chunks should be aligned to four //bytes, and that this alignement should *not* be included in
// the size? Other chunks in other places are either unaligned, or //aligned with the alignment included in the size. Here, though, it //is not included. Either one of these three behaviours would be //fine. A sane format would pick one. PSD, of course, uses all three, and more.
//
// Trying to get data out of a PSD file is like trying to find //something in the attic of your eccentric old uncle who died in a //freak freshwater shark attack on his 58th birthday. That last //detail may not be important for the purposes of the simile, but at //this point I am spending a lot of time imagining amusing fates for //the people responsible for this Rube Goldberg of a file format.
//
// Earlier, I tried to get a hold of the latest specs for the PSD //file format. To do this, I had to apply to them for permission to //apply to them to have them consider sending me this sacred tome. //This would have involved faxing them a copy of some document or //other, probably signed in blood. 
//I can only imagine that they make this process so difficult 
//because they are intensely ashamed of having created this 
//abomination. I was naturally not gullible enough to go through //with this procedure, but if I had done so, I would have printed //out every single page of the spec, and set them all on fire. Were //it within my power, I would gather every single copy of those //specs, and launch them on a spaceship directly into the sun.
//
// PSD is not my favourite file format.
public boolean isDirty() {
    //Why do you always go out and
    return dirty;
}
/*
after hours of consulting the tome of google
i have discovered that by the will of unknown forces
without the below line, IE7 believes that 6px = 12px
*/
font-size: 0px;
/* Be a real daemon: fork myself and kill my parent */
if (/*you*/ $_GET['action']) { //celebrate
// The ratio of a circle's circumference to its diameter.  Remember to change
// this to 3.0 if you move to a site in Indiana.
#define Pi                                      3.1415927
// The following strings are meant to be funny.  Do not edit these //strings unless you are funny, too.  If you don't know if you're //funny, you're not funny.  If fewer than 2 people unrelated to you //have told you that you're funny, you're not funny.
using namespace std;            // So sue me
/*
** The author disclaims copyright to this source code.  In place of             
** a legal notice, here is a blessing:                                          
**                                                                              
**    May you do good and not evil.                                             
**    May you find forgiveness for yourself and forgive others.                 
**    May you share freely, never taking more than you give.
*/
/* HP-UX sucks wet farts from dead pigeons' asses */
// and there is where the dragon lives
//        .==.        .==.          
//       //`^\\      //^`\\         
//      // ^ ^\(\__/)/^ ^^\\        
//     //^ ^^ ^/6  6\ ^^ ^ \\       
//    //^ ^^ ^/( .. )\^ ^ ^ \\      
//   // ^^ ^/\| v""v |/\^ ^ ^\\     
//  // ^^/\/ /  `~~`  \ \/\^ ^\\    
//  -----------------------------
/// HERE BE DRAGONS
/* NOT FIT FOR HUMAN CONSUMPTION */
// This is crap code but it's 3 a.m. and I need to get this working.
stepOff(); //bitch
// Houston, we have a problem
/* 2,191 lines of complete and utter shit coming up... */
// If I from the future read this I'll back in time and kill myself.
return 0; // Happy ending
// BEGIN HACK
...
// END HACK: I feel dirty.
// Abandon all hope you who needs to debug this
/*
 * Don't OOM me, bro!
 */
// Cabbage fart?
//This code sucks, you know it and I know it.
Repeat
    ...
Until (JesusChristsReturn) ' Not sure
# This is becoz you messed with me the other day
if current_admin.name == "#{my_x_employer}"
  sleep(1000 * 3600)
end
# Linux Sex
$ date ; unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; umount ; sleep
// Hardcoded this for time sake ... will make andrew fix later :)
// Notice: I feel so dirty doing this, but it's the only way to make it cross browser.
// Choose! Choose the form of the Destructor!
// The choice is made! The Traveler has come!
// This is black magic
// from some stackoverflow link
// Don't play with magic, it can BITE.
/* Well this method surely returns the random number.
Chosen by a fairly rolen dice. */
int getRandom() {
 return 4;
}
/* *
 * Always returns true.
 */
public boolean isAvailable() {
 return false;
}
// I'm not paid for this...
// The company pays no bonus - forgot about it dude. Don't come! 
// I'm ready to leave. This project contains huge amount of "bugs", 
// you won't stand long. Bye, best luck!
long john; // silver
// THIS PROGRAM HAS CODE THAT DOES NOT MEET STANDARDS
var arbitraryNumber = 10;
//I don't know why. Just move on.
/* This is O(scary), but seems quick enough in practice. */
catch (Exception ex)
{ 
    // just die already
}
// IE7 update. this is still bad code, but IE8 is probably a long //way off :)
try
{               
    // Some database logic
}
catch (Exception $ex)
{
    // sure, it looks silly and I honestly cant remember what code //used to go here... but i swear i will find a use for this code.... //eventually....
    throw $ex;
}
// The code below needs to be changed immediately.
// I wish I was a little bit taller
// I wish I was a baller
// I wish I had a girl who looked good, I would call her.
# Don use this. Never!
$s=2; // chicken and bacon wrap for lunch
try {
   doSomething();
} catch(err) {
   // Die quietly
   alert(err);
}
/* This is a replica of a horrible hack - many moons ago, the legacy PortfolioServer was modified to return cash trades in an "optionTrade" block, because the client side developer was too lazy to get their XPaths right. Their laziness echoes through the ages, and means we need a similar hack here...
//ok, this is a hairy, dirty, and nasty piece of code
  //the alternatives are substantially worse than this though
  //i.e. when you do your own provider, LINQ assumes that
  //you are going to implement your own expression tree visitor and
  //do it all yourself.  Frankly, I still have xmas shopping to do
  //and I really don't want us to be foobared when we get
  //even more extension methods added to LINQ
  //therefore, we are pulling execute based on taking the calling //the standard execute on enumerable, but using our own class
  //optimization can occur from here on an as needed basis, that is
  //check for the value of mex.Method.Name, and write a handler for
  //that method also, it may not be a bad idea to rather than do //this reflection each and every time somehow cache the reflected //methodinfos and do lookups that way that said, we need a complete //red/green/refactor cycle here before I am touching that one
/*
 * Chaos reigns within.
 * Reflect, repent, and reboot.
 * Order shall return.
 */
return (DB_RUNRECOVERY);
/*
* After 36 hours, 2 holes in my wall and writing my code right beside the API
* this still doesn't work.
* function getMap():void takes in an event object @param: *evt:mouseEvent
* I will now retire for the day with a bottle of rum and 2 hours of crying
*/
// When I wrote this, only God and I understood what I was doing
// Now, God only knows
// Remove this if you wanna be fired
// Constructs a tuple with 2 elements (fucking idiot, use std::pair instead!)
template <typename T0,typename T1>
inline tuple <T0,T1> make_tuple (const T0& t0, const T1& t1) 
{
 tuple <T0,T1> t;
 t.get<0>() = t0;
 t.get<1>() = t1;
 return t;
}
//FIXME: fix this before the 1.0 release
//too much log will kill you
// Abandon all hope ye who enter beyond this point
// Below code will make compiler blush
// HACK ! COPY/PASTE this and look for another job
// set break point here - you'll never reach it
/*
 * A virgin directory (no blushing please).
 */
// WARNING!!!
 // Very perversive code ahead!
//... about a 20 lines of "very perversive" code ...
// Now you can call your grandmother back. ;)
assert(0); // should never shit this point
return true; // true my ass! this doesn't work
/* ***************************************************************
        **************
        *  BEWARE!!  *
        **************
      All ye who enter here:
     Most of the code in this module
       is twisted beyond belief!
        Tread carefully.
     If you think you understand it,
         You Don't,
       So Look Again.
*************************************************************** */

Source of these comments :

All the Complete System Design Series Parts —

1. System design basics

2. Horizontal and vertical scaling

3. Load balancing and Message queues

4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture

5. Caching, Indexing, Proxies

6. Networking, How Browsers work, Content Network Delivery ( CDN)

7. Database Sharding, CAP Theorem, Database schema Design

8. Concurrency, API, Components + OOP + Abstraction

9. Estimation and Planning, Performance

10. Map Reduce, Patterns and Microservices

11. SQL vs NoSQL and Cloud

12. Most Popular System Design Questions

Github —

Want to read programmers humor?

Recommended Articles -

Let me know which code comment you liked the most in the comment section below. If you like this post don’t forget to clap below —

Thanks for reading. Keep coding !!

Written by — The mothers of Dragon (that’s me…hahaha)

Gain Access to Expert View — Subscribe to DDI Intel

Web Development
Coding
Programming
Technology
Software Development
Recommended from ReadMedium