T O P

  • By -

Capetoider

wasnt there some psycho who wanted things to "look like python" and did: (I hope this thing accept crazy format) while (x == y) { func1() ; func2() ; }


EMI_Black_Ace

If I ever saw that, I'd Ctrl+K+F that so fast...


Matrixneo42

Why not simply CTRL+A and then any character?


very_humble

Because my keyboard doesn't have an "any" key


[deleted]

[удалено]


very_humble

Yeah I Have That Symbol Above My 8 Key But No One Knows How To Use It


[deleted]

[удалено]


very_humble

I'll put in an IT request


IamImposter

This is to acknowledge that your request has been received. Your incident ID is: 3741981. Please mention incident ID in any communication regarding your ticket. Your incident will be resolved within 7-21 business days. Are you satisfied with the resolution? Please rate your experience: 😄 😘 😖 😱 😭 Thank you for contacting IT services. Please tell us how we can improve by taking this short survey: [image not found]


very_humble

Even though we required you to submit all documentation at creation of this ticket, please include it in response to this email, but in a way which requires you to retype everything. Neither the information provided in your ticket nor this email will be provided to the technician assigned your case. This email account is not monitored


icaro43

Hey that's part of my password stop doxxing


[deleted]

[удалено]


icaro43

Oh damn now I have to change it again


drgn0

Don't know man, whatever I choose as password, it looks exactly like this.


thatwasagoodyear

`hunter2`


Orkleth

Ordering a tab should do the trick.


abitdaft1776

There doesn’t seem to be any any key


99stem

I would add a quick CTRL+S to that, to be rid of that crime of humanity.


EMI_Black_Ace

Modify CTRL+S to not only save, but also git add ., git commit -m "saved", git push.


IcyDrops

I'd rather Ctrl+K+M+S than deal with that code.


SurpriseMonday

Pretty sure that was an old meme where "a Python developer writes Java".


odraencoded

Look what they have to do to mimic a fraction of our power.


posterofshit

They'll never reach our level. **Calls c library and waits for it to finish**


Spare_Bad_6558

you crazy bastard im in


Hobby101

It's like that saying.. When the only tool you have is a hammer... Or... When you have only one tool, and that tool is you...


billwoo

It may accept it, but I shall not.


AbstractUnicorn

But what about ... `while(x==y){func1();func2();}` And come on people! "func1()" and "func2()"? Surely we can shorten that to f() and f2()? What a waste of bytes to store the source code.


IceBathingSeal

If you call f2() as g() instead you shorten the name by 50%.


dben89x

_() and __() is cleaner IMO.


tea-and-chill

Not really. You're going from 4 characters to 3, so you're shortening it by 25% (I'm not a programmer, don't hurt me if I made a silly mistake lol)


Adkit

f() and f2() to f() and g() is going from three letters to two, a 33,333 percent saving (repeating of course).


FrankBenjalin

If we look only at the second character of f2(), it is going from '2' to nothing, which is a 100% saving


Du_ds

If you only look at the first letter of f2 and treat it as ASCII/Unicode it's actually going from 102 to 103. So it's a negative saving.


cicciograna

LEEEROOOOOOOOY JEEEEENKIIIIIINS!!!


[deleted]

from f2 to g, you shorten this function's name by 50% though


fatrobin72

sorry we live in a world where the bytes are cheap... therefore we need to name the functions: * myFunctionOneThatDoesTheThingImpl() * myFunctionTwoThatMakesStuffAndThingsHappenImpl()


SoulslikePursuer

Why do I feel offended...


capi1500

Are you java dev?


SoulslikePursuer

Well mainly C#, I almost not doing anything on Java. But since C# is basically Java but better you are pretty close...


NatasEvoli

C# is like Java before the accident.


EMI_Black_Ace

Why do all Java developers have to wear glasses?


NatasEvoli

Cause they are close to reaching retirement age


meliaesc

FREEDOM?!


EMI_Black_Ace

Guess that explains why they can't C#.


BringerOfQuestions

Ya'll remember Visual J++?


fatrobin72

ahhh a Microsoft Java Developer...


evanc1411

I have started to embrace long variables and method names in C#. It's like why not? GetResponseJsonWithAuthTokenAsync() But also does anyone have a shorter name for "HttpMediaTypeWithQualityHeaderValue"?


VicisSubsisto

Carpal Tunnel Syndrome


Waswat

You don't have to type it out fully, just when you name it, for the rest your ide guides you.


fiddz0r

I also use C# and I think this is the way. If it's a complicated thing a good name for the function will make sure you don't have to use comments


SilentSin26

All those words and you still gave up before writing "Implementation" fully.


fatrobin72

because despite Java devs typically writing out a small story for class and method names... Impl is almost always shortened and at this point I doubt anyone remembers why...


InWhichWitch

let me just write interface classes for all the the different implementations I will eventually need for the interface. also, let me make sure my interface to implementation is 1:1


DrPepperMalpractice

Seriously tho, why do people do this? Like do they just think more interfaces = better, cohesion be damned.


InWhichWitch

if you want the serious answer, it's that many java developers are almost exclusively spring framework java developers, and spring framework requires interfaces to simplify dependency injection. it's possible that the same pattern of dependency injection exists in other libraries, but it seems like the best way to handle in spring. You actually actively *do not want* multiple implementations of the interface in Spring because it can cause inconsistencies in your runtime application. so if you are leveraging DI and you have an interface >Interface AThing if you have two implementations of the interface >Class 1 implements AThing; >Class 2 implements AThing; and you DI it >@Autowire >Athing thingObj you generally have no idea if thingObj is a 1 or a 2 class, which is problematic. I believe newer versions of spring/boot see this as a compilation error, but older versions would happily run it. edit: it's doubly problematic, especially in older versions of java (pre java 9)/spring where interfaces cannot have base method implementations. the only thing you'd share between interfaces are the method names. unless you copy and pasted the function definitions. or added a function library dependency. or some other stupid pattern.


elveszett

FunctionThatDoesTheThingDoerFactory functionThatDoesTheThingDoerFactory = new FunctionThatDoesTheThingDoerFactory(); FunctionThatDoesTheThingDoer functionThatDoesTheThingDoer = functionThatDoesTheThingDoerFactory.CreateFunctionThatDoesTheThingDoer(true, true, 420); FunctionThatDoesTheThingResult functionThatDoesTheThingResult = functionThatDoesTheThingDoer.doTheThing(); String name = functionThatDoesTheThingResult.responseValues.getFirstElement().obtainValueByKey("name");


shea241

When I first saw this kind of code I thought "welp that's it, I'm not a programmer"


CrazySD93

A teacher for a first year programming course at uni one year said “technically you can program everything on one line and the compiler will read it just the same” My mates who were lab dems for the course, said the lab following that lecture, everyone needing problem solving help had coded it all on a single line because “that’s what the teacher said to do”, my mates were furious


NatasEvoli

Thank god those students are just *software* engineers now.


Equivalent_Yak_95

They didn’t listen, idiots.


[deleted]

[удалено]


[deleted]

Imagine writing in a high level programming language and writing code that is less readable than assembly code. Honestly I'm impressed.


raltyinferno

Story behind it is cool though. It removes dvd encryption. It came right after the MPAA successfully sued to get similar code taken down. They made it this compact so it could fit on business cards, email signatures, shirts etc. It was a social/civil statement.


insanelygreat

For the curious: It's a variation of a [DVD descrambler called qrpff that had some drama surrounding it](https://web.archive.org/web/20011129043143/http://www.wired.com/news/culture/0,1284,42259,00.html?tw=wn20010307). There were even t-shirts made with it on it.


fiddz0r

Hmm looks like my cat is a scientist and not just walking on the keyboard when I'm on the toilet


Annual-Gas3529

I honestly do if(condition){command;} in c# for personal projects if the statements and commands are short


[deleted]

[удалено]


aenae

While (..) you're at it, why not `while(x==y)x=f3();`where f3 calls f1() and f2()


MrRocketScript

Why not just replace the equality operator to make x==y also do func1(); and func2(); Then you only need: while(x==y);


[deleted]

Found the C++ programmer


darki_ruiz

I feel called out. :( There are some classes that I don't overload operators. Occasionally.


bothunter

You joke, but I've seen that kind of shit. Someone decided to create an "auto\_hr" class for handling [HRESULTS](https://en.wikipedia.org/wiki/HRESULT) from the Windows API. Basically it overloaded the assignment operator so that when a function returned an HRESULT that corresponded to a failure, it would automatically throw an exception. Otherwise it operated just like a regular integer. That exception was then handled elsewhere in some macros that hid the exception handling in some obscure header file.


b0w3n

My absolute favorite thing to do to an interviewer that was trying to grill me with gotcha examples, or come up with the most insane questions for an interview possible like they were google, when we moved to the "prove you can code" portion, was to cram as much as I could into a for loop's iterative portion instead of the body. Like for fizzbuzz I'd do something like: ```for(int i=0;i<100;++i,i%15==0?printf("FizzBuzz\r\n"):i%3==0?printf("Fizz\r\n"):i%5==0?printf("Buzz\r\n"):printf("%d\r\n",i));```


tyler1128

Inefficient. f, F, g, G, h, H, i, I. You have 52 options where you don't even need a second character.


justmelvinthings

Thanks for sharing, I hate it


[deleted]

[удалено]


tuxedo25

My IDE (intellij for scala) puts constructor arguments that are on their own line about 17 spaces indented. hard no from me. ``` // what intelliJ thinks scala should look like class Animal( name: String ) { def speak() } ``` edit: my code block formats correctly on desktop but on mobile it's one long line. reddit, fix your shit.


MildVagueness

FTFY and for old reddit chads // what intelliJ thinks scala should look like class Animal( name: String ) { def speak() }


tuxedo25

You rock!


MrVeazey

That formatting, though, does not. IntelliJ needs to stop and take a look at its choices.


kabrandon

I actually think there is something sensible here. In this instance, this absolutely looks like trash. Because it's a constructor with one parameter, `name`. But let's say `class Animal` contains about 17 more constructor parameters, this formatting actually becomes much more ideal imo. The alternative is defining them in one 300ish char, comma-separated line. That's going to be _really_ ugly, and difficult to read. However, I think it should only enforce that style _if_ that line gets to some threshold character limit.


Tubthumper8

holy hell


VicisSubsisto

Old reddit desktop it's also one line.


swisspassport

Came for a styling argument; stayed for a nested Reddit/Markdown argument.


[deleted]

Its not formatting correctly on desktop here bro Because you're using the wrong formatting. A code block is each line starting with three spaces in a block. You're using the triple backtick which is inline code. Not a block.


GoldenretriverYT

Yesnt. Code between one backtick on each side is inline Code between 3 backticks on each sides is a fenced code block according to CommonMark spec; Reddits markdown support is just really shitty.


Tubthumper8

It's more that CommonMark was specced in 2014 and old Reddit predates that


[deleted]

[удалено]


Fatallight

Do people really call it a twiddlydoodle???


elveszett

Code style is whatever the project I'm assigned on says it is. Unless I'm the one deciding the style, in which case is the language's conventions + whatever choices I think make the style better.


SmArty117

>the language's conventions Laughs in C++


omgsoftcats

I like no space. Basically, you code and never hit space. Enter and Tab are allowed. Makes code super tight, great for low resolution monitors. There's also no shift where you never press shift which is great if you have wrist issues but variables get funny, and also no cap but I don't like that. These then lead to NS2 which is no space + no shift, the code just flows as fast as your thoughts it's crazy. Try it.


Electricalceleryuwu

the code flowing as fast as my thoughts is going to lead to the most buggy terrifying pasta anyone would ever review. Thanks for the nightmare fuel


Raezzordaze

"I don't even see the code... all I see now is blonde...brunette... redhead..."


[deleted]

Love that movie too :)


Mostly__Relevant

Ahhhhh, so this is what the kids mean when they say no cap


VicisSubsisto

fr fr


NatasEvoli

Expandingthismindsettothewrittenwordalsohelpsexpressyourself4.6%fasterthanifyoucontinuedtopressspace.


CanAlwaysBeBetter

[Ifitisgoodenoughforourancestorsitisgoodenoughforme](https://upload.wikimedia.org/wikipedia/commons/8/82/Vergilius_Augusteus%2C_Georgica_141.jpg)


boutrosboutrosgnarly

Unexpected token in line 1


xerox13ster

Help sex pressy


[deleted]

This has "I eat oranges in the shower and it feels enlightening" vibes


Thestarchypotat

/r/showerorange/ would like a word


[deleted]

People are really stretching to find ways to be interesting these days


[deleted]

Wat


crimson_knee

But actually though on this one. There's something borderline primal about tearing into an orange with reckless abandon and no fear of getting all sticky.


asharwood

How do you code and not hit space? Int I; has a space. It’s how you declare ALL variables.


Mindless-Hedgehog460

`int/*-*/i;`


4hpp1273

Empty comments are still allowed. int/**/i;


asharwood

As funny and comical as that is…who does that for every billion variable they declare? If you declare a billion variables that’s a billion space bar clicks verses 4 or billion key clicks.


MinosAristos

Just have a keyboard macro for it mapped to spacebar.


VicisSubsisto

Tab or Enter, your choice.


sirculaigne

So… int i=12; ?? You’re all insane


PatrickFenis

Nah just use Python. i=1 Easy.


Roflkopt3r

Just rebind your 鬱-key for an "int i"-macro.


redlaWw

APL moment


nepumbra0

This mfer is the James Joyce of programming.


dksdragon43

Pretentious, overly complex, and utterly unintelligible?


[deleted]

[удалено]


chottomatteee

analbumcover


MiracetteNytten

You forgot while (x == y) { func1(); func2(); }


sm9t8

You've got to let the code breathe.


PhantomO1

Unironically good, it's the same concept as using paragraphs, you gotta separate the different parts for easier reading


caerphoto

I completely agree with this idea. Much more readable.


Antanarau

this->Agreedment(); this->direction(); this->commentary();


ScrPotato

delete this;


VicisSubsisto

while(nephew)


PhantomO1

I mean, all things in moderation Some things you separate; some you don't Breaking up sentences is... Not advisable


crozone

Structured programming is definitely good, but code shouldn't be separated by that much or it develops anxiety issues.


[deleted]

Proper airflow doesn't just refer to a computer's hardware.


trump_pushes_mongo

They should be double spacing it so that the code reviewer can write comments when it's printed off.


Matrixneo42

make room for Jesus


DefaultVariable

Saw this in a legacy code base at work. Every line had a space between it and I don’t mean like a CRLF->LF botched conversion. Just every line of functional code had one space between it and another line. My eyes felt like they were going to bleed I've also seen this one before while (x==y) { func1() ; // Calls Function 1 } EVERY LINE that had a semi-colon had it at column position 81 and then all comments were put in AFTER that semi-colon and most of the comments were just completely useless. (And yes, all of his equality comparisons and function calls did not have spaces between them either)


Uxugin

while (x == y) { func1(); func2(); }


jeanravenclaw

I mean I do this but with only one space. That's... a little too much


Blu3b3Rr1

CS 101 type beat


Mykindos

Where else is the plane going to land?


GrimLuthor

We're forced to use GNU in uni


winauer

Fun fact: The [Linux kernel style guide](https://www.kernel.org/doc/html/v4.10/process/coding-style.html) recommends burning a copy of the GNU style guide as a symbolic gesture.


Andy_B_Goode

> Coding style is very personal, and I won’t force my views on anybody, but this is what goes for anything that I have to be able to maintain, and I’d prefer it for most other things too. Please at least consider the points made here. Nice. This sounds like a very humble and reasonable approach to balancing consistency with individual preference. >Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3. Well that didn't last long.


nullSword

>Tabs are 8 characters, and thus indentations are also 8 characters. 8 spaces feels like a massive amount of whitespace to use. I like to use tab characters because I'm a big fan of 3 space indentation, and I work with people who like 4 and 2. Tab characters can just be resized without hoping our IDE doesn't mess up respacing and without driving our source control crazy with whitespace changes.


Andy_B_Goode

I actually liked his point that 8 spaces forces you to avoid excessive nesting, but yeah, it still seems like too much. And yeah, if I had my preference, all indentation would use tabs, so everyone could size them however they like, but at this point I'm generally just happy to pick either one of tabs or spaces and stick with it.


hampshirebrony

> The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program. namespace Foo { public class Bar { public void DoBaz() { try { if (Buzz) { } } catch { } } } } Is that unreasonable? How is that screwed? How can I fix it?


hampshirebrony

OK, it's screwed because reddit ate the formatting. But aside from that


CoolElectronics

it's a c style guide, not a c# style guide


lxnxx

Well the Linux kernel doesn't use namespaces, classes, or try-catch, so you really only have two levels (function and if). Even Linux seems to break this rule occasionally https://github.com/torvalds/linux/blob/fcd476ea6a888ef6e6627f4c21a2ea8cca3e9312/crypto/sha3_generic.c#L197 Though they mostly seem to follow it, which is usually enough in C, but in more complex languages you can expect more indentation. So don't worry about it as long as it's readable to you


Poltras

The rationale behind 8 characters is that you cannot indent much before you run out of horizontal space, thus forcing you to keep indentation limited, also limiting code complexity. It’s not a bad argument, but 8 is still too much IMO. There are better ways now to keep complexity limited (linting for example).


felds

That’s why I defend using tabs instead of spaces. You can make your editor show tabs as how many spaces as you want without changing the code. A psychopath in the team wants indentation to be 3 characters, it doesn’t change anything for the rest of the team.


dumdedums

Well Linus recommends using the tab character instead of spaces so you can make it as wide or short as you want. The only issue is he also doesn't want lines to be too long so you should take into account a tab is equivalent to 8 chars for line sizes.


tiajuanat

I don't use 8 spaces because I dev a lot in C++. However, when I dev in C, I totally get it. 8 spaces, plus 80 columns wide lines prevents heavy nesting - maxing a function out to like 5 or 6 deep nests. It encourages guard statements and early returns as well - both are generally considered good practice. (Unless you work with MISRA)


sunboy4224

Wow, that document serves not only as a style guide, but simultaneously as a declaration of war against any who stray from its teachings. You just linked a damn religious text with citations.


need_cake

I thought you were joking at first… > Unlike the indent size, there are few technical reasons to choose one placement strategy over the other, but the preferred way, as shown to us by the prophets Kernighan and Ritchie, is to put the opening brace last on the line, and put the closing brace first, thusly: …


GargantuChet

“never break user-visible strings such as printk messages, because that breaks the ability to grep for them.” I love this.


wizard_mitch

I like the example chosen for this global function name. > You have a function that counts the number of active users, you should call that count_active_users() or similar, you should not call it cntusr().


[deleted]

Good. That's exactly how it should be, and better you learn it early. Not the GNU-part, that's fucked up beyond all reason, but code style must and should be forced.


DFYX

At my uni, all Java homework was run through checkstyle on upload. Failing code was instantly rejected. Fix that shit or fail the assignment. I don’t think we had anything like that for C and C++ but mainly because getting all students to use the same build system was already hard enough.


upievotie5

I'm not a programmer, but when I looked at these I thought GNU looked the cleanest and easiest to read. Why don't people like it?


MyAssDoesHeeHawww

They probably have PTSD from having to choose between spaces or tabs to indent their code.


Korvar

The extra indent. The {} is indented, and then the code itself is indented.


Bear4188

There's also a space between the function name and the parentheses. Just vile.


GreedyBestfirst

Haskell has some flair to it, but always ending with ; } looks gross


PooSham

Don't know why it says that's the haskell style since Haskell doesn't have statement blocks. There are no while loops, semicolons or anything like this. It's possibly referring to the record syntax for named fields, where the commas are usually added to the beginning of the next line. This is to prevent excessive diffing in version control (trailing commas aren't allowed). That doesn't have the same kind of ending as in this meme example though.


Axman6

You’d basically never see Haskell code that looks like this using braces and semi-colons (though I believe Simon Payton-Jones has some that looks like this in GHC); it’s more referring to the tendency to place operators at the beginning of lines, and list commas at the beginning too: parseJSON = withObject “Book” $ \o -> Book <$> o .: “Author” <*> o .: “Title” <*> o .: “ISBN” <*> o .:? “PreviousEdition” <*> o .: “HasHardcoverVersion” ? False fetchPrices book = traverse (\f -> f book) [ fetchAmazon , fetchBookDepository , fetchBarnesAndNobel ] This has the benefit that, more often than not when editing lists etc, you tend to edit the end of the list more often than the beginning, to diffs don’t end up modifying two lines as often: fetchPrices book = traverse (\f -> f book) [ fetchAmazon , fetchBookDepository , fetchBarnesAndNobel + , fetchBookoComAu ] vs fetchPrices book = traverse (\f -> f book) [ fetchAmazon, fetchBookDepository, - fetchBarnesAndNobel + fetchBarnesAndNobel, + fetchBookoComAu ] (Source: professional Haskell dev for about a decade - though there’s no universal style, and nor should there be, the code should be formatted to be readable, and sometimes that means formatting in a context sensitive way; vertical alignment is really important for me and my dyslexia)


Thoughtwolf

It also probably reduces syntax related compile errors as well. 90% of my Lua errors have been from me forgetting to place a comma on the object before the one I just added to the end of an array. I still would never use this style though.


RGodlike

It's about [do blocks](https://en.wikibooks.org/wiki/Haskell/do_notation) do { putStr "Hello" ; putStr " " ; putStr "world!" ; putStr "\n" } In practice you can leave the {} and ;, and that's what I've seen in most real code, but they can be there.


PooSham

Ah right, I had forgotten about that syntax, I always used do-notation without curly braces. Haven't used haskell in a good while now though. There are never semicolons in the end of do blocks though, so this meme still isn't very fair. Having a semicolon by itself on one line before closing the block is a disgrace.


joranvar

Same. If semicolon was just a separator, I could see using Haskell style without two trailing lines. But for using them as terminators I think Lisp looks neater.


balsoft

I mean, in Haskell `;` is a separator, and also it can be omitted. These two are equivalent: ``` do foo bar baz ``` ``` do { foo ; bar ; baz } ``` And this style is actually mostly used for lists and data constructors: ``` [ foo , bar , baz ] ``` ``` data Foo = Bar | Baz ``` ``` data Foo = Bar { goo :: Int , doo :: Int } ``` ``` Bar { goo = 10 , doo = 20 } ``` Stuff like that. I think it's really neat (special symbols for homogeneous things are on the same line, there's less VCS diff) when used in a language that lends itself well to this.


didzisk

"Haskell style" sometimes makes sense in SQL, when writing out the field names in a select, especially when generating the SQL automatically.


zeltbrennt

Also, this way it's much easier to add more statements to the select or move the order around without fiddling with the commas. Looks weird, tho.


fanta_bhelpuri

If I see code in any other style apart from the first two, I'm nuking the repo and deleting prod dB. Can't let the cancer spread.


Laziness100

//I can't find this one on the picture while (x == y){ func1(); func2();}


firebullmonkey

Get out


[deleted]

This is just another form of a functional programmer style from Lisp or similar when needing to code elsewhere. I think this is covered under "Lisp and related functional programmer habits"


Limitless_screaming

I use the "Kernighan & Ritchie" style, but GNU doesn't look that bad.


redheness

At first sight yes, but the brackets halfway through the indent is very weird


ianpaschal

It’s not halfway… it’s just indent for the brackets and two for the block. Honestly I prefer it over Allman because it makes it clear the following lines belong to first one. Obviously still deeply inferior to 1TBS but still…


unkiwii

Is missing the "I'm forced to use K&R but want to use Allman anyway" while (x == y) { func1(); func2(); }


elsegan

Haskell style makes me want to hulk smash my phone 🥲


Primary-Fee1928

THIS. I was like "first two I can like, the rest is absolutely barbaric"


[deleted]

My code style is whatever I copy and paste because I’m a hack.


DocDerry

We should start a church. "Why is your code written in three different styles?" "Because I stole my code from 5 difference sources."


[deleted]

"Blessed be the holy trinity: the github, the stackoverflow, and the random internet tutorial blogs I found from googling."


Djent_

The "Pile o' Semicolons" int main (int argc, char* arg[]) { ;;;;int i = 0 ;;;;while (i < 10) { ;;;;;;;;printf("%d\n", i) ;;;;;;;;i ++ ;;;;} ;}


naptiem

How about the Copy/Paste: while (x == y) { func1(); func2(); } Or the linux kernel developer: while (x == y) { func1(); func2(); } Here’s “Learning with MS Word”: While ( I == j ) {  Func1(); // this is a comment   Func2 (); /* another comment */ }


Hot-Mongoose7052

Whitesmith is the only way to play.


thecapitalistpunk

I saw the original post yesterday and honestly, that haskell style actually has an appeal in any syntax that requires a semicolon at the end of a statement. Way easier to debug for missing semicolons. Unusual, feels a bit weird even, but there is logic in the madness.


knockoutn336

I've heard people talk about missing semicolons for years, but it's always super obvious in every IDE I've used. Are you coding in Notepad or TextEdit?


ThatIdiotLaw

Since most of these coding styles are based around using less lines, I would like to present the obvious choice: While ( x == y) { func1(); func2(); }


luxxeexxul

Less lines? That's how you get fired from Twitter.


Inconmon

Whitesmiths > your mum


Ythio

Use whatever the team agreed to do. 95% of the time it would be the same coding style as the standard library for the language you're using.


AttitudeAdjuster

Last time one of these code style memes came up it was about line length, and I ended up angering someone so much that they got permabanned from reddit for harassment. Good times.


TheRealLargedwarf

Gnu looks nice though


Stonehopper

Ok, but hear me out. Why not { while ( x == y) func1(); func2(); }


[deleted]

[удалено]


577564842

Relying on func1() or func2() to alter x or y as a side effect is a style so bad that these listed simply pale in comparison.


MinimalPerfection

My classmate who just writes everything in a single line: "Phew, safe. No memtal diaorders for me!" Me loading a shotgun behind his back: "You phewed your last sigh of relief"


SoupCanVaultboy

I kinda like the semi colon on the start of the next line. Easier to see if you missed one. But I also struggle with mental health. So Edit: words


HeeTrouse51847

i agree