Skip to content
DevMeme
2059 of 7435
This Code Explains Nothing
Languages Post #2297, on Nov 13, 2020 in TG

This Code Explains Nothing

Why is this Languages meme funny?

Level 1: Same Name For Everything

This is like labeling every person, room, door, and key in a building “this,” then asking someone to explain where “this” is and which “this” opens “this.” The joke is funny because the word that should help identify one thing is used for everything, so the whole program becomes nonsense.

Level 2: This Means This

In many object-oriented languages, this refers to the current object. If you have an object representing a user, this.email means “the email field on this user object.” It is useful when a local variable has the same name as a field, or when a method needs to pass the current object somewhere else.

The code in the image abuses that idea by trying to make this the package, class, type, field, constructor parameter, method name, and value. That is why it looks ridiculous. Instead of one clear keyword pointing to the current object, the entire file becomes the same word repeated in every possible role.

For newer developers, the practical lesson is that naming is not decoration. Names are how other people understand your code. Even if the computer could theoretically follow a confusing program, your teammates still have to debug it, review it, extend it, and trust it in production. Code that looks clever for ten seconds can become a maintenance tax for years.

Level 3: Existential Complexity

The image is funny because it weaponizes a keyword that is supposed to clarify ownership. In object-oriented programming, this normally means “the current object.” It lets a method distinguish an instance field from a local variable, as in this.name = name;. Here, every visible meaningful word is this, so the keyword stops being a pointer to context and becomes the entire context. It is code as a hall of mirrors.

The screenshot also mocks a real maintainability problem: names are part of the program's design. A compiler may care about tokens and scopes, but humans care about intent. Good names compress meaning: customer, invoiceTotal, retryCount, parseConfig, connectionPool. Bad names force the reader to simulate the code manually. This meme takes that failure to its logical endpoint: a program whose cyclomatic complexity might be low, but whose existential complexity is absolutely through the floor.

There is an extra joke in the syntax highlighting. The editor dutifully colors every this like it is helping, but highlighting cannot rescue a program that has erased its own vocabulary. Tooling can flag style issues, autocomplete identifiers, and navigate definitions, yet it cannot make this.this().this.this a humane thing to review. Somewhere a senior engineer is asking for “just one small rename” and the author is preparing a philosophical defense.

The code is also a neat reminder that language rules and readability rules are separate. If this were strict Java, several lines are invalid because this cannot be used as those identifiers. But even in a hypothetical language that accepted it, the result would still be hostile. A program can satisfy a grammar and still fail the more important test: can another person understand what it is trying to say before lunch?

Level 4: Lexer Says No

The visible code begins with:

package this;

public class this {

and keeps escalating into public this this = this;, public this(this this), and a chain like this.this = this.this.this().this.this.this().this.this.this.this;. The compiler joke starts before object-oriented semantics even get a chance to be confused. In Java, this is a reserved keyword, not a legal identifier, so a real Java compiler's lexer classifies it as a special token rather than a package name, class name, field name, method name, or parameter name.

That distinction is a compiler front-end issue. Source text is first tokenized: character sequences become tokens such as identifiers, keywords, punctuation, literals, and operators. The parser then tries to match those tokens against the language grammar and build an abstract syntax tree. A declaration expects an identifier in positions like class Identifier or Type Identifier; this image feeds it a keyword token instead. The AST never becomes the beautiful monument to self-reference promised by the screenshot. It dies at the velvet rope because this is on the reserved list.

If a language allowed this as a contextual keyword or identifier in some positions, then name resolution would become the next layer of comedy. The compiler would need to decide whether each occurrence means the current object reference, a type named this, a field named this, a method named this, or a parameter named this. That is why the code feels cursed: it deliberately collapses the human-readable namespace separation that makes object-oriented code navigable.

Description

A dark-theme code editor screenshot shows a short Java-like file with line numbers and syntax highlighting. The visible code includes `package this;`, `public class this {`, a field `public this this = this;`, a constructor `public this(this this) { ... }`, a long chained assignment full of `this.this().this.this()...`, and a method `public this this() { return this.this; }`. The humor comes from abusing the object-oriented keyword `this` as every possible identifier, producing code that is both semantically absurd and hostile to compiler, reviewer, and maintainer alike.

Comments

64
Anonymous ★ Top Pick The cyclomatic complexity is low, but the existential complexity is O(this).
  1. Anonymous ★ Top Pick

    The cyclomatic complexity is low, but the existential complexity is O(this).

  2. @GLXBX 5y

    Why black

    1. @fakeshluck 5y

      murder in Belarus

      1. @GLXBX 5y

        Oh, crap missed it

      2. @redacted_text 5y

        Stop this shit! Belarus is ok except small group of extrimists that producing fake news

        1. @fakeshluck 5y

          what? :/

          1. @redacted_text 5y

            There less that 10 murdered people. During monthes of protests! Where there are 100k+ plus people joined this protests! Its just an accidents cause protests are dangerous and always followed up with dead bodies.

            1. dev_meme 5y

              What about thousands of people who leaves country? Hundreds or even thousands of injured people?

              1. @redacted_text 5y

                Biden or Trump?)

                1. dev_meme 5y

                  Any, whateva

            2. @fakeshluck 5y

              So u think that we should pretend everything is fine? When everyone see fake elections or dead economics?

              1. @redacted_text 5y

                Check Europe. Check Poland

                1. @fakeshluck 5y

                  whats wrong?

                  1. @redacted_text 5y

                    Protests. Dead bodies

              2. dev_meme 5y

                And lies from officials about HOW these people die

                1. @fakeshluck 5y

                  coronavirus stats is my favorite

          2. @redacted_text 5y

            So shut your stupid extrimistic mouth and go fucking work!

        2. @Agent1378 5y

          Александр Грыгорьевыч, перелогинтесь

    2. Deleted Account 5y

      This is not black. This is an african american.

      1. @ognotme 5y

        My name is Derel

    3. @Black_Yuzia 5y

      You hate black?

      1. @GLXBX 5y

        No, I like white

        1. @metal_Dash 5y

          Переиграл и уничтожил дешевку

  3. @solwayfirth8956 5y

    This

  4. @feskow 5y

    Wait, is this Java?

  5. @alexeeffff 5y

    Fuck this

    1. @doorhinge 5y

      All my homies use that

    2. @nenten 5y

      yes, Golang lives matter

  6. @obemenko 5y

    this was never an option

  7. @me_noname 5y

    Long live Belarus

  8. @NazChaykin 5y

    мда

  9. @ProstTovelly 5y

    а нахуя?

    1. @determ1n3d 5y

      а это когда делать нехуй

  10. @zherud 5y

    Does it even work?

  11. @Roman_Millen 5y

    this

  12. @redacted_text 5y

    And protests are much smaller!

  13. @redacted_text 5y

    But saw how many yellow vests died?

    1. dev_meme 5y

      In France Anarchism is kinda allowed

      1. @redacted_text 5y

        Killing hundreds of people by police in France is ok, and less then 10 bodies during most huge protest in Europe is not ok?

        1. @fakeshluck 5y

          who did tell u that its less then 10 bodies?

          1. @redacted_text 5y

            Please, count reported by opposition cases, if not believe to government. Check TUT.BY.

            1. @fakeshluck 5y

              from what time tut.by is an opposition media...

              1. @redacted_text 5y

                Since this election started.

  14. @redacted_text 5y

    They are fully supporting opposition

  15. @redacted_text 5y

    That's why they lost their accreditation btw

  16. @redacted_text 5y

    No difference at all. They only pretending to be peacefull

  17. @redacted_text 5y

    You can check their main media source, if you knows Russian

  18. @redacted_text 5y

    Nexta

  19. @redacted_text 5y

    Are you sure? Their movement coordinated by nexta. Check what he writes

  20. @redacted_text 5y

    They only peaceful for European camera

  21. @redacted_text 5y

    That's all

  22. @redacted_text 5y

    C'mon, thay are biting police officers!

  23. @redacted_text 5y

    Please, check any media. Harmed police officers during protests are normal for Belarus

    1. @fakeshluck 5y

      HAHA, WHAT?

  24. @redacted_text 5y

    Ok. 9th, 10th of August. 200 harmed police officers according to government. Photos and videos included on their ministry of protection channel

  25. @redacted_text 5y

    They are throwing molotov cocktails at the police, throwing rocks

  26. @redacted_text 5y

    Photos! Videos! C'mon

  27. @redacted_text 5y

    I believe my eyes. Just it

  28. @redacted_text 5y

    You people are crazy. During pandemy and world economic fall you fighting with your government and blocking economy of your country. You selected that stupid girl as your leader - c'mon, she can't say even bunch of words. She is totally dumb.

    1. @fakeshluck 5y

      economy of our country was blocked 26 years ago. bruh.

      1. @redacted_text 5y

        I'll watch you dying from starvation in a while if you beat Lukashenko. That's all.

        1. @fakeshluck 5y

          thanks gods, i work for irish company while my groupmates works for belarussian factory and gets about 200$. best college of belarus, hah...

  29. @redacted_text 5y

    No, she is dumb just because she is, but not because she is a girl.

  30. @qtsmolcat 5y

    I'd say this is crap But I can't remember what 'this' refers to

Use J and K for navigation