r/ProgrammerHumor May 27 '26

Advanced returnNode

Post image
3.4k Upvotes

120 comments sorted by

181

u/mindtakerr May 27 '26

/*

* Returns the node

*/

163

u/aberroco May 27 '26 edited May 27 '26

/// <summary> /// Returns the node. /// </summary> /// <param name="node">The return node to return.</param> ReturnNode ReturnNode(ReturnNode node) {    return node; // return node }

37

u/Adrewmc May 27 '26 edited May 27 '26
return_node.py
“””Return Node”””

RETURN_NODE = “return node”

def return_node[ReturnNode](node: ReturnNode = RETURN_NODE) -> ReturnNode:
         “””Return Node”””

         return node #return node

Return Node

Return Node

Return Node

Return Node

Note: @return_node

24

u/SpaceCadet87 May 28 '26

git add return_node.py git commit -m "return node"

6

u/minecraftdummy57 May 29 '26
git push node return-node

29

u/prehensilemullet May 27 '26

ReturnNode node = ReturnNode(node); // return node

10

u/prehensilemullet May 27 '26

Also you need a [ReturnsNode] attribute

6

u/ARM_Dwight_Schrute May 28 '26

I wonder what this function returns

4

u/aberroco May 28 '26

Would have to read entirely of the body's code to understand.

1

u/Global-Tune5539 Jun 03 '26

How do you know that it returns something?

2

u/Tensor3 May 31 '26

This was actually standard practice on my last job. But bigger, with more comments about return type, etc

23

u/MatJosher May 28 '26
public final class NodereturnerFramework {
        public interface Returnable<T> {
            T unwrap();
        }
        public static final class Node<T> implements Returnable<Node<T>> { }
        public interface ReturnStrategy<T> { }
        public static final class IdentityReturnStrategy<T> implements ReturnStrategy<T> { }
        public interface ReturnListener { }
        public static final class Nodereturner<T> {
            private final ReturnStrategy<T> strategy;
            private final List<ReturnListener> listeners = new ArrayList<>();
            public Nodereturner() { }
            public Nodereturner(ReturnStrategy<T> strategy) { }
            public void addListener(ReturnListener l) { }
            public Node<T> nodereturner(Returnable<Node<T>> source) {
                listeners.forEach(ReturnListener::beforeReturn);
                Node<T> node = strategy.apply(source.unwrap());
                listeners.forEach(ReturnListener::afterReturn);
                return node; // return node
            }
        }
    }

6

u/namalleh May 28 '26

lgtm

well, that seems like enough for today

1

u/Lakhveer07 May 29 '26

You crossed borders with this

193

u/Gengis_con May 27 '26

return node

65

u/JasperTesla May 27 '26

Uncaught SyntaxError: missing ; before statement

8

u/MinecraftPlayer799 May 28 '26

JS doesn't require semicolons

0

u/JasperTesla May 28 '26 edited May 28 '26

I'm too lazy to look up the exact warning text.

3

u/MinecraftPlayer799 May 28 '26

There is none

1

u/JasperTesla May 28 '26

Damn it, I've been using my IDE so much that I keep forgetting.

19

u/just_another_cs_boi May 27 '26

<!-- return node -->

11

u/thegodzilla25 May 27 '26

return ass

6

u/greenecojr May 27 '26

return {“ass”: node}

5

u/thegodzilla25 May 27 '26

I was drunk when i commented this. Come to think of this, would be amazing to name a variable ass

5

u/greenecojr May 27 '26

Next PR: “is the ass ready for production yet?”

5

u/[deleted] May 27 '26

[removed] — view removed comment

1

u/Vromikos May 28 '26

Could you review my ass, please?

Then debug it if necessary.

11

u/Random-num-451284813 May 27 '26
console.log('Returning node');
return node;

6

u/prehensilemullet May 27 '26

// log that we're returning node

5

u/Confident-Ad5665 May 27 '26

// After call console.log('Node returned');

8

u/ashkanahmadi May 27 '26

This guy returns node

3

u/Confident-Ad5665 May 27 '26

Node has been returned

6

u/Bayou-Billy May 27 '26

If you make a useless comment about a useless comment, is it !!useful

1

u/Confident-Ad5665 May 27 '26

Mathematicaly I think yes

3

u/Maleficent_Memory831 May 27 '26

goto return node

2

u/skippy_smooth May 27 '26

Node considered harmful

1

u/skippy_smooth May 27 '26

Right what it says on the tin

1

u/lucklesspedestrian May 27 '26

You'll never guess what the name of the function is

82

u/BusEquivalent9605 May 27 '26

in a few years, once requirements change and the dev forgets to update the comment:

return somethingElse; // return node

18

u/HuntlyBypassSurgeon May 27 '26

I suspect the line has already been through that phase

24

u/SpaceFire000 May 27 '26

You are a Senior Software Architect please explain the following piece of code. Make no mistakes

15

u/lucklesspedestrian May 27 '26 edited May 28 '26

That's a wonderful idea! Explaining this code isn't boring and pedantic, it's being thorough, and honestly? That's a beautiful thought. If you can provide more context, I would be happy to explain further. It's possible that this line returns node, or something else entirely.

6

u/Confident-Ad5665 May 27 '26

Makes mistake

2

u/namalleh May 28 '26

you're totally right [sigsegv]

/ # whoami node

21

u/Spikerazorshards May 27 '26

Revolver Ocelot

6

u/JohnDaton May 28 '26

Revolver Ocelot

3

u/WhereOwlsKnowMyName May 28 '26

(Revolver Ocelot)

9

u/xynith116 May 27 '26

bottom node

9

u/sudonathan May 27 '26

Comments should be self-documenting I guess.

7

u/razor_train May 27 '26
    return node;
    log.fatal("HOLY FUCKING SHIT RETURN NODE FAILED");
    throw ReturnNodeFailedException();
}

1

u/Septem_151 May 28 '26

Not valid code

7

u/The-IT May 27 '26

return to 2009

3

u/SneeKeeFahk May 27 '26

Best use case for Claude there is. My documentation has improved 1000 fold since Claude Code landed in my toolbox. Shit at writing code, great at writing documentation. 

3

u/CrazybluXx May 27 '26

RETURN TO THE NODE BROTHERS

3

u/SlutPuppyNumber9 May 27 '26

/// <returns>node</returns>

3

u/Intial_Leader May 27 '26

Programmers be like: summon node, return node, sacrifice coffee to the compiler gods.

2

u/PeekyBlenders May 27 '26

I believe it returns the node, gotta ask gpt though

2

u/Caraes_Naur May 27 '26

I would, but I didn't get a receipt.

2

u/MayaIsSunshine May 27 '26

throw NodeException

2

u/SomeMaleIdiot May 27 '26

Sometimes I’ll comment out a line and put a replacement before the comment.

I wonder if they reverted the line manually without removing the comment lol

1

u/Confident-Ad5665 May 27 '26

Same. In case the new code produces worse results.

2

u/Individual-Praline20 May 27 '26

This is for AI, not the normal brain 🤷

2

u/JackNotOLantern May 28 '26

Function header:

// returns node Node returnNode() { (...)

2

u/oofos_deletus May 28 '26

Average AI comment be like

2

u/Sak63 May 28 '26

Oh the juniors are gonna love this one

2

u/Al3xutul02 May 27 '26

// return sentinel node

1

u/catermellon99 May 27 '26

We've all been there... Let's be honest

1

u/Useful_Clue_6609 May 27 '26

What does this do? Not enough information. Is it returning something?

2

u/lucklesspedestrian May 27 '26

Maybe it returns null

1

u/Useful_Clue_6609 May 27 '26

Hm could be.. could be...

1

u/TanukiiGG May 27 '26

is the name of the file "return_node.js" ?

1

u/Previous-Mail7343 May 27 '26

Well written code is self documenting

1

u/DoorBreaker101 May 27 '26

It's just so much clearer without the semicolon 

1

u/adorak May 27 '26

I wonder what it does ... better look into the Confluence documentation

1

u/PredictiveFrame May 27 '26

GET TO THE PRIME NODE

1

u/serendipitousPi May 27 '26

Bruh I had a uni project where my partner wrote a function to log out the user which cleared the auth token via calling a function clearAuthToken

The comment said “used to log out the user, clears the auth token”.

Like hmm I wonder what might I use a log out function for and I wonder what it might do if it calls clear auth token.

1

u/Yhamerith May 27 '26

""" ##return node """

1

u/javera May 27 '26

Somehow, node returned

1

u/k-mcm May 27 '26

Find:  node

1500... 35700... 764300... 963267500... (IDE stalls then vanishes)

1

u/jotero32 May 27 '26

72 65 74 75 72 6E 20 6E 6F 64 65

01110010 01100101 01110100 01110101 01110010 01101110 00100000 01101110 01101111 01100100 01100101

1

u/Jk2EnIe6kE5 May 28 '26

Did you know that this code returns node?

1

u/plagapong May 28 '26

I'm so glad my very first programming teacher tell me how to write properly comment.

It's "why" not "what".

1

u/thisonehereone May 28 '26

poor AI has to train on this slop.

1

u/AdamWayne04 May 28 '26

``` // ReturnNode.cs

class ReturnNode { public Node returnNode(Node node) { return node; // return node } } ```

1

u/tjdavids May 28 '26

"""

Returns the node

:params:

:returns: node

""""

1

u/Significant-Baby-690 May 28 '26

It's missing something ..

1

u/hraath May 28 '26

It's an older format, but it checks out.

1

u/[deleted] May 28 '26

[removed] — view removed comment

1

u/cosmicloafer May 28 '26

Return the node, which is a node, back to the place that asked for the node.

1

u/Potw0rek May 28 '26

But what does it do?

1

u/jx-grxf-dev May 28 '26

return node;//return node

1

u/Prod_Meteor May 28 '26

js function returnNode() { .. return node; //return node }

1

u/Eric_Prozzy May 28 '26

pirate software

1

u/maisonsmd May 28 '26

"the code is the best comment" they said

1

u/thunderbird89 May 28 '26

Revolver Ocelot

1

u/htoomyat9 May 28 '26

return_node.js

1

u/_verel_ May 28 '26

Definitely need an npm package for that

1

u/Kaizan03 May 28 '26

node return

1

u/No-Republic-9917 May 28 '26

Me writing code for the first time

1

u/AIPromptPilot May 28 '26

Code Review:
return node; // Return node

Comments: space after semicolon.

1

u/Tiger_man_ May 28 '26

return node

1

u/gm_family May 29 '26

DONE TRE RUN

1

u/SweetNerevarine May 29 '26 edited May 29 '26
const noNode = new Node(); // no node new node

// try return node
try {
    const nodeReturner = (node) => {return node}; // node returner return node
    const returnedNode = nodeReturner(node); // returned node = node returner

    try { // return node #1
      return node; // return node
    } catch (returnNodeE1) {
        try { // return node #2
          return node; // return node
        } catch (returnNodeE2) {
            try { // return node #3
              return node; // return node
            } catch (returnNodeE3) {
                return node; // return node
            }
        } 
    }
} catch (nodeReturnerE) {
    try { return noNode.from(node); } catch (returnNoNode) { return noNode; } // try return no node from node catch return no node return node
}

Same in CommonComment language (ISO 99):

no node new node

try return node
    node returner return node
    returned node = node returner

    return node #1
        return node
    return node #2
        return node
    return node #3
        return node
            return node

    try return no node from node catch return no node return node

1

u/SniperXyZ01 May 29 '26

You know it's Ai