Ask HN: Anyone know any funny programming jokes?
I got a job as a software developer at a startup after several years of working as an IT drone. On my last day of work at my old job I got a text from the tech lead of the team I would be joining.<p>&quot;Come by after work to meet the team and have a few beers&quot;.<p>I arrived around 7pm. There were quite a few people still around but to my surprise the tech lead who had hired me was packing up his desk into a box. I was kind of surprised but he seemed upbeat and glad to see me.<p>&quot;Yeah, sorry to be leaving before you officially join the team. I got a great offer I can&#x27;t pass up. Friends got their A round funding and it is an equity opportunity. You&#x27;ll do great though. One piece of advice though,&quot;<p>and he handed me three envelopes.<p>&quot;Four pieces actually. Piece zero, and I&#x27;ll tell it to you now. When you run in to trouble blame me. After you&#x27;ve seen my code you&#x27;ll probably think it is shit. Hell, you&#x27;re smart, you probably think everybody else&#x27;s code is shit.&quot;<p>He continued &quot;When you can&#x27;t blame me anymore open the first envelope for the second piece of advice. You&#x27;ll know when.&quot; and we went off to meet the team and have a beer.<p>I officially started on Monday and it was going great for the first couple of months. Then a product manager started breathing down my neck why one of my features was late. I had been frustrated with how hard it was to add the feature to the existing code and I found myself blurting, &quot;The problem is not with my code, it is all of the old code I am having to rewrite because it is so terrible&quot;. I realized I was using the old tech lead&#x27;s first piece of advice. So I continued, &quot;Man, the previous tech lead&#x27;s code is absolute garbage. It is amazing the whole thing hasn&#x27;t fallen apart already.&quot; Since everyone looked sympathetic I knew I had made a good move. For quite a long time I made sure I was working hard or at least look like I was working hard and occasionally grumbling about the shit I had to deal with.<p>After a couple of months I was still producing at a good rate but I had now &quot;rewritten&quot; or at least claimed to have rewritten most of the bad code. I could not longer use that excuse. One Monday morning before the weekly sprint meeting I realized I was in a bind. I needed make sure that I had lots of work on my current assignment if I was going to avoid being assigned to a new project with &quot;the customer from hell&quot;. I only had a few minutes before the meeting and after nervous peeing (twice) I still had no solution. I suddenly remember the envelopes. Digging through my messenger bag I found them and grabbed the first. While in the restroom for a third nervous pee I opened the envelope sitting in the stall. There was a card inside with one word &quot;Refactor&quot; and I had my solution.<p>A few minutes later at the sprint meeting I revealed that all my work rewriting the bad code, boy that was a lot of work, had revealed amazing opportunities to refactor the architecture and put us on a lot better footing. It would take a lot of work but I knew what needed to be done and it would really pay off. This proposal got a number of cautious nods and after a short discussion it was decided that I would proceed with a major refactoring of the product architecture.<p>A couple months later and my &quot;refactor&quot; was nearing completion. It did fix a few problems, the new APIs were more aligned with my personal preferences and I had gotten the chance to replace a few libraries with trendy ones that I wanted to get on my resume. Honestly though I felt like a fraud; my refactoring was just rearranging the deck chairs on the Titanic. I played out the ending stages of the refactoring but inevitably the time came when management was eager to use the new code in a product. Having no other option I agreed it was ready and that I was eager (not really) to see it shine in a product.<p>The first product to use it would be with another team. After the first meeting it was clear that they were really sharp and they immediately pointed out some shortcomings of my APIs and design. After a bit more wrangling they agreed that my module could meet their needs as long as I was dedicated to supporting it and them. My management agreed and they were now my customer.<p>Their product design proceeded and as they continued to get more experience with my module they kept finding new flaws in the API and bugs. I tried to fix them as quickly as possible but I was one person working to try to keep an entire team happy. I couldn&#x27;t keep up. After a late night of bug fixing I was headed home exhausted in an Uber and wondering how I was going to be able to keep up. As I nearly drifted into sleep in the back seat I remembered the envelopes. I found the second envelope in my bag and opened it with the third solution, again one word. &quot;Indirection&quot;.<p>Meeting with my &quot;customer&quot; on Monday I explained the bandwidth problems I was having meeting all of their team&#x27;s requirements. I explained that what would work best is if they built a local interface in their project which called my API. That way the interaction between their system and mine would be localized and they would only have to make changes in one place if my API had to change. They had seen that I was tapped out trying to support them and agreed that they could build a local API which meshed better with their system that simply called my module to do the actual work. It took them a while to disentangle their code from my module and build their interface. By the time they came back with a few bug reports against the version of my module they had been using I promised them that I had much improved version to use. Once a few bugs were resolved the systems were again integrated.<p>They got closer to shipping their product and I kept getting bug reports from them that my library wasn&#x27;t behaving correctly. I was forced to explain that the problems they described hadn&#x27;t been there when they had integrated directly against my library--the problem must be in their local interface. Progress was being made towards shipping the product but there were still frequent mysterious problems.<p>Meanwhile my management was pretty happy with how integration of my code was proceeding. My director had talked about it as a collaboration success story at an executive meeting. My team members, who I had little interaction with as I was supporting the other team, were also congratulatory though they didn&#x27;t seem to be as believing that I deserved my apparent success. I was pretty sure it was going to be a disaster actually. So when a college buddy emailed me about a business plan he was writing I offered to help. A few days later they were talking about me being the &quot;Software VP&quot; for their startup. I wasn&#x27;t sure but it would be a founder position with equity so I couldn&#x27;t just say no. I was trying to figure out what to do when I got an email saying that the team building a product with my module was having real problems with their scaling tests. They had done some analysis and were certain the problem was with my module, they didn&#x27;t have proof, but had some pretty compelling analysis and wanted to meet tomorrow. Gulp. Just then my manager came by, apparently not having read the memo yet and introduced me to a fresh young programmer who was joining the team. He introduced me as one of the team&#x27;s stars and he should seek me out for mentoring. I politely agreed but had other things on my mind.<p>Stewing in my cube without much clue how to fix the reported problems before the upcoming meeting I thought back to mentoring I had received and realized I had one more envelope.<p>Opening the third envelope I discovered the fourth piece of advice. It was brilliant. I called my friend and told him I was &quot;down&quot; to be the software VP for their startup, contacted the new kid on our team slack inviting them to come by for an overview on my module. I then sat down wrote my resignation email and completed the fourth piece of advice, &quot;Recursion.&quot;