In many ancient writing systems, every word was written right next to each other without spaces and very often with the direction of letters (or pictograms or whatever) running right to left on one line, then left to right on the next.
The two greatest advances in writing were spaces and single direction writing. In that order.
For the love of God and everything electric and holy, use spaces to be able to read and organize your code better. You may save a child's eyes one day.
Why not make it nice to look at? I feel like you reach an 'old age' as a programmer, and it's a grumpy old age but it's one that prefers simplicity, readability and easy maintainability.
Leave the spaces, it's more readable. (An important concept for developing in teams.) In general, I don't worry much about spacing — unless it breaks the code — and let the linter tidy things up.
On the side that uses an IDE with an auto formatter, so I don't have to think about that trivial shit and actually get work done. I'm not surprized ya'll scared to be replaced by GPT4.
I really have no preference on this one.
The array is clearly legible because it is comma delimited, regardless of if there are spaces.
Also, there's always going to be problem with one of the commas regardless of how you format it, if it doesn't allow one on the last line.
I just copy whatever the last person did, or whatever I did last, on this one. As long as things are consistent.
So am I MS-13?
Stop letting meaningless decisions waste your time. Use the IDE to format files and stop thinking about how pretty code looks when a tool would just do it for you in half of a second.
Space. Fuck you non-spacer cringe.
But....but no-space makes my program run fast /s
Forgetting a semicolon makes the program stop even faster
I agree, what is wrong with you non-spacers
Fuckyouspacercringe
If you used camelCase I would’ve upvoted
That wouldn’t be proper grammar now would it
If you think that’s bad formatting wait until you see my Repos
[удалено]
These aren't strings!
Blue. It's the law
No, red. doesn't mean i will have to follow if it happens to be law. I love breaking laws.
I already know people don't like being laws broken. well, that won't stop me from being engaged in illegal activities.
``` [ 1, 2, 3, 4, ] ``` Amateurs🙄
when your manager assesses your contribution based on the number of lines lol
Prettier be killing me with this sometimes
Just add prettier ignore to the top of the file
No because I want it to apply to the rest of the file
[1,_2,_3,_4] I_don’t_know_what_everybody_is_so_upset_about.
I will fuck your skull
s/r skull//
Now, kiss
I like that hoodie
Iwillfuckyourskull
Spaces.
“Red
"Red < blue" *
"Red < Blue" \*\*
&&"Red < Blue"
kRed < kBlue
Red < kkk
"red < blue" ***
Is it just me? I’d say Blue > Red
Old-school-PL/SQL-inspired style: [ 1 ,2 ,3 ,4 ] Need to comment out an entry? No problem! [ 1 ,2 ,3 //,4 ] No need to remove the comma after the 3!
That is something that did python right. You can put a komma after the last element .
A feature passed down from Perl.
Now comment the first element. Either way, you can "no problem" comment 3 of 4.
Then you can't comment the first line. That's why golang enforces that every element which is followed by a newline has to have comma. [ 1, 2, 3, 4, ]
How did this get upvoted? You are just moving the problem from the last line to the first.
Trailing commas are acceptable in Javascript.
This is not the argument you think it is
>No need to remove the comma after the 3! I'm pretty sure it is.
Disgusting, haskellers do this with records
This if the array is longer than 3ish
you want to comment smth out? [1, 2, 3 /*, 4*/] Edit how do I not got it to italicize I want the apostrophes to stay
Wrap it in single back ticks like this `[1, 2, 3 /*, 4*/]`. \`single line text`
In many ancient writing systems, every word was written right next to each other without spaces and very often with the direction of letters (or pictograms or whatever) running right to left on one line, then left to right on the next. The two greatest advances in writing were spaces and single direction writing. In that order. For the love of God and everything electric and holy, use spaces to be able to read and organize your code better. You may save a child's eyes one day.
>.redrotahtnI.gnitirwnoitceridelgnisdnasecapserewgnitirwnisecnavdatsetaergowtehT Fixeditforyou
Even though I know what that says I still have to put in effort to read it.
Its ok, I had to you some python to write it
lol that’s actually funny
Who needs secaps?? !!yugsihtton
Also shell, with its case/esac and if/fi structure.
> The two greatest advances in writing were spaces and single direction writing. スペース?そんな事いらねえぞ。文の中には複雑な文字と簡単の文字を混在したら理解できる。残念ながら日本語がまだへたくそだ。
Whatever the default formatter use
This is the answer.
i can see red being more practical but man, blue has my heart
What is practical about bleeding out from your eyes? 😄
BLUE. Wtf. The Red side shorted my brain.
Spaces, unless I’m writing Minecraft commands
IDontUseSpaces
iDontUseSpaces is what you meant.
Depends, whether it is a variable or an Interface
Why not make it nice to look at? I feel like you reach an 'old age' as a programmer, and it's a grumpy old age but it's one that prefers simplicity, readability and easy maintainability.
[удалено]
Absolutely not. Please do not do this. The code looks like a punched card.
No, you monster.
This is the way
I was looking for this.
Space is more important than anything in code!
[1, 2, 3, 4, ] Just because I can.
Y
[ 1 , 2 , 3 , 4 ]
Leave the spaces, it's more readable. (An important concept for developing in teams.) In general, I don't worry much about spacing — unless it breaks the code — and let the linter tidy things up.
\`black\` side
I have never see non-space code other than from college students. Besides IDEs just do the "right" for you.
[ 1, 2, 3, 4 ] Thank you very much
[ 1, 2, 3, 4 ] Edit: Apparently Reddit collapses new lines
[ 1, 2, 3, 4 ] You need spaces between the brackets and the numbers. Savages.
SPACES PLS.
Same answer to all these questions: Whatever the coding style for the language says or the team agreed on for their codebase.
Randomly type shit. Then let linger fix it.
It seems, we have found a new way.
That's more bytes man. You don't even know what you done, mayn
When people stop using four bytes of spaces for a single byte tab, I'll worry about too many spaces.
Nah the compiler will fix it anyways
Spa pa pa pa paaaaaace bro
r/portal
Half and half
1:4 MatLab
``` [ 1 ,2 ,3 ,4 ]; ``` perfection was achived
Just do whatever you want a shut up!!
*Changes Requested*
I randomly use space, or forgot to use one
Loool
nospacesnocapitalizationnoformating
i became blind
Guess I’ll die *jumps on red team*
I would say that red people should be removed from our society to preserve its integrity and equilibrium
I hate looking at a codebase where the dev didn’t put spaces. What kind of neanderthal writes I=5, it’s I = 5. Much more readable with spaces
Blue, red if I’m lazy
It's the same picture
Depends on context, sometimes red can be more readable
Right
Red all the way, saves you time, less spacebar 🔴🔴🔴
No space should be made syntaxically wrong
Right side. Please.
I type the red one, then do a simple ctrl+k+d and visual studio turns it into the nice blue one
just like im my house, i don't make the decisions. eslint decides for me
```js const troll = [`1`, `2`, `3`, `4`] console.log(troll[1], troll[2], troll[3], troll[4]) ```
selectively inserting spaces so all my tables are aligned.
On the side that uses an IDE with an auto formatter, so I don't have to think about that trivial shit and actually get work done. I'm not surprized ya'll scared to be replaced by GPT4.
Blue is the best
I put whitespace all over my code. I like it to look pretty.
It pisses me off when people do some with spaces and the others without. As in [1, 2,3 ,4,5]. My OCD screams
[1, 2, 3, 4,]
[1,ㅤㅤ2,ㅤㅤ3,ㅤㅤ4,]
Whatever prettier decides it should be.
``` var =range( 1,4) ```
[1 ,2 ,3 ,4 ]
There, are, three, lights!
(1 2 3 4) (SETQ X ‘(1 2 3 4)) In case the context wasn’t clear…
Are you even a programmer if your array doesn't start with 0. So the right answer is [0, 1, 2, 3]
Space
Always whitespace. Always.
Blue
What you should really ask is i++ or i ++
Blue, your code needs to breathe
Spaces keep my eyeballs from melting.
Whatever my linter prefers?
Only spaces after primes???
Blue. Always.
[1 2 3 4]
Blue, spaces make your code far more readable
If you're not on the blue side, you're not a true programmer
I really have no preference on this one. The array is clearly legible because it is comma delimited, regardless of if there are spaces. Also, there's always going to be problem with one of the commas regardless of how you format it, if it doesn't allow one on the last line. I just copy whatever the last person did, or whatever I did last, on this one. As long as things are consistent. So am I MS-13?
Whichever way the IDE automatically formats it. Seriously, why should I care?
[0, 1, 2, 3]
whatever alt+shift+f does.
literally depends on my mood
\[1 2 3 4\] \- Clojure
I don't care. Ask my linter
Whichsideareyouon?
Stop letting meaningless decisions waste your time. Use the IDE to format files and stop thinking about how pretty code looks when a tool would just do it for you in half of a second.
Blue, since Blue gives me a clue that Red is dead.
I use spaces, because chat gpt does 😂
red
Whatever pleases the linter gods.
Give me some space 🙌
Whatever I feel like at the time.
What's the point of arguing over formatting stuff that a keystroke can do.
Blue
[ 1 , 2 , 3 , 4 ]
[ 1 , 2 , 3 , 4 ]
``` List.of(1, 2, 3, 4); ```
Whatever prettify says - and prettify says blue :)
I'm pushing the cart
Whatever `black` tells me to use so my coworkers and I don't quibble over code style during PR review.
I know a colleague who writes `[1 ,2 ,3 ,4]`. It annoys me so much.
Neither, `[1 2 3 4]` in Clojure
No space is the only right answer
Oh, NOW you all love spaces. No tabs between the numbers? Suddenly you're not so concerned about customizing how it looks on your screen?
Red is a blasphemy
The linter says space. The linter gets what it wants (because it will block merge in CI).
\[1, 2, 3, 4\]
I don't use literals, we are not the same.
If it’s ocaml, I prefer no spaces. Everything else should have spaces.
Blue
Blue all the way
[ 1 , 2 , 3 , 4 ]
[1,2,3,4] for numbers ["One", "Two", "Three", "Four"] for strings
I let the D20 decide the white space. [1, 2, 3, 4]
Blue
I like to use { 1, 2, 3, 4, 5, }
West side blue. Gonna do the cwalk to represent. 💪🤓🤙
But the damn spaces in you barbarian
[ 1, 2, 3,4 ,5 ]
[ 1, 2, 3, 4, ]
[1 , 2 , 3 , 4]
[ 1, 2, 3, 4 ]
I use prettier.
Testing in terminal? No space. Code for production? Space.
[ 1, 2, 3, 4 ]
Imma crip and I used [1, 2, 3, 4]
Blue. Blue is the way
\[..."1234"\]
`(function(array,length){while(length){array.unshift(length--)};return array})([], 4).toString()`
auto formatting does it for me🤙🏼
blue side
Space. You savages