Skip to content
DevMeme
2191 of 7590
CodeQuality Post #2444 · source on Telegram

The junior dev's guide to unreadable Python

Description

A meme designed as a parody of an O'Reilly programming book cover, complete with the characteristic animal illustration (a coiled snake, for Python) and typography. The publisher name is altered to 'O RLY?'. The book's title is 'Upsetting Your Coworkers With Python', with a subtitle '"What the fuck, dude"' and the author listed as 'Junior P'. The topic, mentioned at the very top, is 'Using list, map, lambda, and filter on a single line'. The meme humorously critiques the practice of writing overly complex, 'clever' code that is difficult for others to read and maintain. While Python supports functional programming constructs like map, lambda, and filter, chaining them together on one line is often considered less 'Pythonic' and harder to understand than more readable alternatives like list comprehensions. The joke resonates with senior developers who've had to debug such code, often written by enthusiastic junior programmers who have just discovered these powerful but easily-abused language features

Comments

17
Anonymous ★ Top Pick The road to technical debt is paved with nested `map(lambda...)` expressions. A senior dev knows the most powerful feature of a language is often knowing when *not* to use it
  1. Anonymous ★ Top Pick

    The road to technical debt is paved with nested `map(lambda...)` expressions. A senior dev knows the most powerful feature of a language is often knowing when *not* to use it

  2. Anonymous

    That list(map(lambda x: x[1], filter(lambda kv: kv[0] in cfg, env.items()))) might save 5 ms, but it adds 5 quarters of roadmap entropy - classic résumé-driven obfuscation

  3. Anonymous

    The real snake in your codebase isn't Python - it's the junior dev who just discovered they can chain map(), filter(), and lambda into a single incomprehensible line that does what three readable lines could have done, but now requires a PhD in functional programming and a ouija board to debug six months later

  4. Anonymous

    Ah yes, the classic Python power move: chaining map, filter, and lambda into a single line that would make Haskell developers nod approvingly while your teammates schedule an intervention. It's technically correct - the best kind of correct - until someone needs to debug it at 2 AM and realizes that 'clever' and 'maintainable' are often inversely correlated. The real senior move? Knowing when NOT to flex your functional programming muscles, because code is read far more often than it's written, and your future self (or that junior dev) will thank you for the boring, readable list comprehension instead

  5. Anonymous

    Python’s Zen: “Explicit is better than implicit.” list(map(lambda, filter)) is the implicit resignation letter

  6. Anonymous

    Junior's one-liner: 20 chars of golfed genius. Senior's PR comment: 200 chars explaining why for-loops scale better than riddles

  7. Anonymous

    That list(map(lambda, filter)) saves three keystrokes now and adds a recurring line item to the team’s cognitive budget every time the on-call reads the diff

  8. @blisskiy 5y

    Yes and what

  9. @phpzapecanus 5y

    Meanwhile being php laravel fullstack dev, I'm teachin django python

  10. @NoCountryForOldBuffet 5y

    "using list, map, lambda, and filter on a single line" okay I didn't come here to be called out like this but if it ain't me

    1. Deleted Account 5y

      why wouldnt you though

      1. @NoCountryForOldBuffet 5y

        mostly because it's hard to read, (though I don't think it's wrong). The title of the meme is "how to upset your coworkers with python", not "how to write bad python". When it takes 10+ seconds to figure out what a line of code that isn't even making any external libraries calls is doing people get frustrated.

        1. Deleted Account 5y

          ONE LINE O P E R A T I O N S

        2. @bit69tream 5y

          yo check out my common lisp one-liner (defun number-sequence (from to inc) (labels ((number-seq (frm too i l) (if (eq frm too) (reverse l) (number-seq (+ frm i) too i (cons frm l))))) (number-seq from to inc '()))) (let ((a 100))(if (numberp a) (mapcar (lambda (x) (write-to-string (* x x))) (number-sequence 0 a 1))))

          1. @serghei_k 5y

            you have missed parenthesis here

            1. @bit69tream 5y

              No

  11. @aspq8 5y

    Gold

Use J and K for navigation