If you do the right side you're wrong, the left is more readable, more testable, easier to code and easily reusable

If you do the right side you're wrong, the left is more readable, more testable, easier to code and easily reusable.
I want to see a simple, pure function, not a fucking essay.

Attached: 1625224652319.png (1189x669, 140.7K)

I agree you shouldn’t muddy one function with a bunch of lines of logic, definitely put that into a function with a descriptive name.

But having spaces in between each line (including function calls) helps readability. The text stands out more and is clearer.

>2022 and some people still write italian pasta
readability reduces cognitive overhead
its like the first thing i learned, when i was writing mission scripts for arma, before i learned any programming language proper

>the same people that complain about reddit spacing will seethe eternally if your code looks like the left example

Attached: 0e9.jpg (800x450, 39.3K)

Use space to group logic together into related chunks.

You're supposed to use space between paragraphs not between sentences.

>do this in Any Forums posts
>"NOOOOOOOOOOOOOOOOOOO YOOOOOOOOOOOU CAAAAAAAAN'T DOOOOOOO THAAAAAAAAAAAAAAAAAAAAT NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING"
>post code that doesn't do this
>"NOOOOOOOOOOOOOOOOOOO YOOOOOOOOOOOU CAAAAAAAAN'T DOOOOOOO THAAAAAAAAAAAAAAAAAAAAT NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY MUH READABILITY"
retards

Attached: _91408619_55df76d5-2245-41c1-8031-07a4da3f313f.jpg (976x850, 57.91K)

I like empty lines and also a lot of whitespaces in code. But most programmers hate it for some reason.

>use space between paragraphs not between sentences
>"NOOOOOOOOOOOOOOOOOOO YOOOOOOOOOOOU CAAAAAAAAN'T DOOOOOOO THAAAAAAAAAAAAAAAAAAAAT NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING MUH REDDIT SPACING"
retards

Attached: 103978904-The_meme_formerly_known_as_Kuk_1.jpg (1920x1080, 74.29K)

kek. good observation

but i sometimes do reddit spacing tho

every time i have a reason to increase visibility or write multiple paragraphs actually

The best way
myFunc =
let step1 = undefined
step2 = undefined
step3 = undefined
step4 = undefined
in step4 . step3 . step2 . step1

>undefined . undefined . undefined . undefined
So you just want your function to do nothing?
... Why?

That's not how you're supposed to write English, Reddit. Readability is a meme for people with fried brains and limited attention span. It's just not what the founding fathers intended.

Attached: 1638421590223.png (1280x1280, 1.75M)

>READABLE WORDS BAD
>READABLE CODE GOOD

Attached: 082e2f18051b73bdb4541cf4dc8e56db.jpg (1006x1867, 465.92K)

>Readability is a meme for people with fried brains and limited attention span.

kindof.
id replace "meme" with "tool" tho

if you dont communicate your message, why bother typing it?

Because right myFunc() does anything you fucking nigger

function myFunction(){
thenThat(thenThis(doMoreStuff(doStuff())));
}

>right myFunc() does anything
First of all, no it doesn't.
Secondly, it's pretty weird to use the word "anything" in an indicative tone. ESL moment perhaps.

Holy cow guys are like infants, here you little piss babies:
myFunc =
let doStuff = -- do stuff
doMoreStuff = -- do more stuff
thenThis = -- then this
thenThat = -- then that
in thenThat . thenThis . doMoreStuff . doStuff

>I can't get sarcasm
>Time to project insecurities
You lost pajeet
Learn2kode instead of replying

I already know how2kode, if I didn't I wouldn't have been able to tell your kode doesn't do anything, since haskell syntax is unfamiliar to most people. Retard

>If you do the right side you're wrong, the left is more readable, more testable, easier to code and easily reusable.

Everybody with basic knowledge of programming knows that. This is not even a debate. Comments are really only useful for basic file descriptions or for some basic sectioning and tagging if you somehow end up with big multi-thousand line source file (something you should always try to avoid)

Only people I've seen recommending to put comments on everything are college professors with no real life experience, ancient textbooks or ancient code.

>Still doesn't get why it didn't do anything
>I'm a genius I know what undefined means
Why are codelets like this?

Comments everywhere are useful in languages with dogshit syntax that makes no fucking sense, like shell and perl, where you genuinely fucking have to remind casual readers how the language works every 2 seconds because it's really that bad.

>>Still doesn't get why it didn't do anything
Fucking gigatard, it obviously doesn't do anything because you're imitating the example on the right which also doesn't do anything. You already said that, even if you said it wrong. What makes you think I don't "get" this? Just because I still think it's stupid? No, shit for brains, I still think it's stupid because it's fucking stupid. Imitating the right side, which doesn't do anything, but does have comments -- and then omitting the comments from your imitation -- is unnecessarily obtuse when you could have just imitated the left side.

>separates 100 LOC into 5 single-use functions
>either: 1. don't document the functions at all, making the code a mess, or 2. document the functions and turn 100 LOC into a 500 LOC mess

really gets the nogin joggin

the real answer is: it ONLY depends how you intend to test the code. If tests support a single line function, make it a single line function. If tests need to be split up, then split it up. Otherwise it should be a single, large function with linear control flow.

Attached: 1653881381508.jpg (600x777, 64.05K)