Ruining /r/programmerhumor memes[
Hi everyone, today I’ll be ruthlessly destroying some /r/programmerhumor memes for those who are new to programming.
Gru Tries Recursion
Recursion is an elementary operation in logic, maths, and computer science where an operation is partially defined in terms of itself. While the most common example is the Fibonnaci function, the best example is perhaps addition of two integers:
Recursion in various languages
While the concept seems simple as presented here, a special type of recursion should be mentioned (as it's mentioned in nearly every other ignorant hipster treatment of recursion these days): tail recursion. Tail recursion is a special type of recursive treatment that results in a constant memory requirement as the recursion progresses, instead of the linear memory requirements afforded by poorly formed recursive functions. The differences can be seen in the 'Python' and 'Ruby' panels above.
Next, no discussion is complete in 2018 without mentioning OOP, by and far the dominant programming paradigm in industry. Too simplify, we'll assume basic knowledge of computer programs and describe a few classes of software. In the gif above is the actual source code of Zucc's internal programming. The .gif alludes to event-driven programming, where the 'state' of Mark's thirst is stored in a boolean attribute/instance-variable, accessed from
zucc.isQuenched(). Mark responds to thirst with the following instance methods, some of which receive a hand instance:
zucc.sip(). The joke is obvious due to the high-level abstractions of the tasks, as well as appropriate method/instance names. Looking for more reading on objects, classes, instances and OOP? Here is an excellent review from Salman Khan.
FrontEnd vs. BackEnd
I debated whether this meme deserved to make the cut and decided to include it for those who don’t have much experience making different kinds of applications. Not every developer will want to make different kinds of applications but I think this can still help everyone understand the perspective we give towards applications. There’s also a dual nature to discuss here and I’ll start with UI. User interfaces always need to be simplistic and intuitive to reach the most users. In my opinion, it is sad but true that utility doesn’t always win when it comes to the ‘value’ of an application and software developers that neglect their UIs are often punished.
That said, the image above the surface is calm, tranquil, and simple. The user is given a pretty, simplistic picture of the state of the creature, without any distraction or clutter. Of course this is the way things look to the user, but that does not at all mean that the code for the UI is in any way simple. In fact the above-the-surface depiction of simplicity and aesthetic is in stark contrast to the complexity of UI design. It takes a true love for artistic principles and design concepts to understand how the user thinks and what they value.
In contrast, the image shows beneath the ‘surface’ of the communication layer (HTTP/TCP) is an ugly creature, with different appendages, and a gruesome mechanical and technical feel. I’m sure that the abstract content of back-end source code might seem ‘ugly’ to front-end developers or even the user, but the functionality is anything but ugly. The aesthetic is in the structure of the app but also in convenient frameworks used by back server-side developers (e.g. Rails, Flask, Django, Express).
That’s it for this post! I’ll be doing this often I hope, ruining the punchline…