Definition of Recursion:- see Recursion
tail recursion, n. See tail recursion.
231–240 of 905 posts
Definition of Recursion:- see Recursion
tail recursion, n. See tail recursion.
A Markov chain trained on CS textbooks and the Bible. https://kingjamesprogramming.tumblr.com/
"Come by after work to meet the team and have a few beers".
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.
"Yeah, sorry to be leaving before you officially join the team. I got a great offer I can't pass up. Friends got their A round funding and it is an equity opportunity. You'll do great though. One piece of advice though,"
and he handed me three envelopes.
"Four pieces actually. Piece zero, and I'll tell it to you now. When you run in to trouble blame me. After you've seen my code you'll probably think it is shit. Hell, you're smart, you probably think everybody else's code is shit."
He continued "When you can't blame me anymore open the first envelope for the second piece of advice. You'll know when." and we went off to meet the team and have a beer.
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, "The problem is not with my code, it is all of the old code I am having to rewrite because it is so terrible". I realized I was using the old tech lead's first piece of advice. So I continued, "Man, the previous tech lead's code is absolute garbage. It is amazing the whole thing hasn't fallen apart already." 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.
After a couple of months I was still producing at a good rate but I had now "rewritten" 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 "the customer from hell". 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 "Refactor" and I had my solution.
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.
A couple months later and my "refactor" 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.
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.
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'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. "Indirection".
Meeting with my "customer" on Monday I explained the bandwidth problems I was having meeting all of their team'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.
They got closer to shipping their product and I kept getting bug reports from them that my library wasn't behaving correctly. I was forced to explain that the problems they described hadn'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.
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'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 "Software VP" for their startup. I wasn't sure but it would be a founder position with equity so I couldn'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'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's stars and he should seek me out for mentoring. I politely agreed but had other things on my mind.
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.
Opening the third envelope I discovered the fourth piece of advice. It was brilliant. I called my friend and told him I was "down" 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, "Recursion."
An infinite number of mathematicians walk into a bar. The first mathematician orders a beer. The second orders half a beer. "I don't serve half-beers" the bartender replies. "Excuse me?" Asks mathematician #2. "What kind of bar serves half-beers?" The bartender remarks. "That's ridiculous." "Oh c'mon" says mathematician #1 "do you know how hard it is to collect an infinite number of us? Just play along". "There are v…