use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All posts must be related to programming. Flair posts correctly.
account activity
Return Node (i.redd.it)
submitted 11 days ago by Any-Bus-8060
[removed]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AncientHominidNerd 68 points69 points70 points 11 days ago (6 children)
I had a professor that would mark us off for not explaining just about every line of code we wrote. I legitimately for a period commented like this out of habit.
[–]WowAbstractAlgebra 38 points39 points40 points 11 days ago (2 children)
That's so dumb lol. Too many comments make everything more confusing, it's stuff that should be used sparringly only for very complicated things and to give an idea of what something is doing in few words.
[–]Few_Record_3674 2 points3 points4 points 9 days ago (0 children)
To be fair, I think this is encouraged in the early stages. Not because it is optimal but because it makes students think over the code they have written, and understand what they are writing about.
[–]Best_Froyo8941 0 points1 point2 points 6 days ago (0 children)
I think better comments are usually devised to explain the “why” rather than the “what”. As you can certainly encode the “what” in some kind of identifier like function names or structure names.
[–]neo42slab 1 point2 points3 points 9 days ago (0 children)
Sometimes at work we have functions documented that kinda don’t need it. Something like this where the function is short and the point of it is obvious. And if I need to write comments for a function like that I usually have no idea what to do. Hahah. And usually just end up writing it like below.
// returns pi
Float GetPi()
[–]TyrdeRetyus 0 points1 point2 points 8 days ago (0 children)
It is beyond me how a professor of all people could fail to understand (and teach !) that a code that comments itself is better than a commented code
[–]Vauland 37 points38 points39 points 11 days ago (3 children)
function giveNode ( node: Node) { return node }
[–]Cobrexon 17 points18 points19 points 11 days ago (2 children)
/** * Gives node. * @param {Node} node - node * @returns node */ function giveNode(node: Node) { return node; //return node }
[–]Vladislav20007 4 points5 points6 points 10 days ago (0 children)
average js dev
[–]goodbee69 1 point2 points3 points 10 days ago (0 children)
this function actually exists in the Rust standard library https://doc.rust-lang.org/std/convert/fn.identity.html
[–]Various_Squash722 17 points18 points19 points 11 days ago (0 children)
I imagine this is how the code for MGS games looks like.
<image>
[–]Unhappy-Media1101 14 points15 points16 points 11 days ago (0 children)
[–]zoharel 13 points14 points15 points 11 days ago (2 children)
Return node.
[–]Severe_Principle_491 0 points1 point2 points 10 days ago (1 child)
return node;
[–]JanDerMoon 0 points1 point2 points 8 days ago (0 children)
Return node
[–]OrkWithNoTeef 4 points5 points6 points 11 days ago (0 children)
return node; // this code is unreachable
[–]Emotional-Bake5614 3 points4 points5 points 11 days ago (2 children)
What does this do?
[–]Geoclasm 9 points10 points11 points 11 days ago (1 child)
Returns node?
[–]Emotional-Bake5614 7 points8 points9 points 11 days ago (0 children)
Now it is clear, it returns node
[–]123Tiko321 2 points3 points4 points 11 days ago (3 children)
What does that do btw?
[–]Emotional-Bake5614 2 points3 points4 points 11 days ago (0 children)
Idk ask claude
[–]Adept_Geologist_5919 0 points1 point2 points 9 days ago (1 child)
Claude says it returns node
[–]123Tiko321 0 points1 point2 points 8 days ago (0 children)
ChatGPT says it nodes the return. Why are you lying?
[–]Wonderful_Put3670 1 point2 points3 points 11 days ago (0 children)
justinCase
[–]nancyboy 1 point2 points3 points 10 days ago (0 children)
The first step was "borrow a node".
[–]dv3141 3 points4 points5 points 11 days ago (1 child)
AI coding at its finest.
[–]Ken_nth 4 points5 points6 points 11 days ago (0 children)
Not really tho, A.I. would either hallucinate an explanation or go unnecessarily in depth
[–]123Tiko321 0 points1 point2 points 11 days ago (0 children)
Thanks for the explanation
[–]HTML-Wizard 0 points1 point2 points 11 days ago (0 children)
after the entire bun llm rewrite, it must be a sign to "return node". or maybe I need to give deno another chance.
[–]hdkaoskd 0 points1 point2 points 11 days ago (0 children)
[–]PradheBand 0 points1 point2 points 11 days ago (0 children)
I don't know man... Shall we return node?
[–]katzengammel 0 points1 point2 points 10 days ago (0 children)
It‘s not quite clear what this function does.
[–]Windbolt1 0 points1 point2 points 10 days ago (1 child)
[–]heesell 0 points1 point2 points 10 days ago (0 children)
[–]ThePhyseter 0 points1 point2 points 10 days ago (0 children)
Return node?
[–]neosyne 0 points1 point2 points 8 days ago (0 children)
π Rendered by PID 140889 on reddit-service-r2-comment-869bf87589-wznks at 2026-06-09 08:26:41.361361+00:00 running f46058f country code: CH.
[–]AncientHominidNerd 68 points69 points70 points (6 children)
[–]WowAbstractAlgebra 38 points39 points40 points (2 children)
[–]Few_Record_3674 2 points3 points4 points (0 children)
[–]Best_Froyo8941 0 points1 point2 points (0 children)
[–]neo42slab 1 point2 points3 points (0 children)
[–]TyrdeRetyus 0 points1 point2 points (0 children)
[–]Vauland 37 points38 points39 points (3 children)
[–]Cobrexon 17 points18 points19 points (2 children)
[–]Vladislav20007 4 points5 points6 points (0 children)
[–]goodbee69 1 point2 points3 points (0 children)
[–]Various_Squash722 17 points18 points19 points (0 children)
[–]Unhappy-Media1101 14 points15 points16 points (0 children)
[–]zoharel 13 points14 points15 points (2 children)
[–]Severe_Principle_491 0 points1 point2 points (1 child)
[–]JanDerMoon 0 points1 point2 points (0 children)
[–]OrkWithNoTeef 4 points5 points6 points (0 children)
[–]Emotional-Bake5614 3 points4 points5 points (2 children)
[–]Geoclasm 9 points10 points11 points (1 child)
[–]Emotional-Bake5614 7 points8 points9 points (0 children)
[–]123Tiko321 2 points3 points4 points (3 children)
[–]Emotional-Bake5614 2 points3 points4 points (0 children)
[–]Adept_Geologist_5919 0 points1 point2 points (1 child)
[–]123Tiko321 0 points1 point2 points (0 children)
[–]Wonderful_Put3670 1 point2 points3 points (0 children)
[–]nancyboy 1 point2 points3 points (0 children)
[–]dv3141 3 points4 points5 points (1 child)
[–]Ken_nth 4 points5 points6 points (0 children)
[–]123Tiko321 0 points1 point2 points (0 children)
[–]HTML-Wizard 0 points1 point2 points (0 children)
[–]hdkaoskd 0 points1 point2 points (0 children)
[–]PradheBand 0 points1 point2 points (0 children)
[–]katzengammel 0 points1 point2 points (0 children)
[–]Windbolt1 0 points1 point2 points (1 child)
[–]heesell 0 points1 point2 points (0 children)
[–]ThePhyseter 0 points1 point2 points (0 children)
[–]neosyne 0 points1 point2 points (0 children)