What went wrong?

What went wrong?

Attached: Linus_quote.png (1567x649, 743K)

Other urls found in this thread:

github.com/Subsurface-divelog/
twitter.com/AnonBabble

Full quote:
>If you need more than 3 levels of indentation, you're screwed anyway, and should fix your program

there's a difference between required indentation and formatting indentation to break up a long function call into readable lines

And Linus is talking about function indentation, particularly nesting conditions and loops. The build function in your example has just one level of real indentation

To elaborate, this is an example of the code Linus is warning you about
bool operator

Isn't that quote from the linux kernal style guide, which is written in C?
It doesn't apply to shittier languages.

What is this abomination? Variables exist for a reason.

to waste memory?

Why would anyone use nested ifs instead of a switch there?

Flutter is shit but it is unavoidable in nested UI.

For systems programming I agree.

> CS_undergrad_meme.jpg

You cannot use a switch statement for that, do you even understand what the code is doing? Also, it's obviously an example of bad code. Of course it's going to be bad. You're not smart for pointing that out

>class
that's where you went wrong

Linus probably never coded anything since the initial hobby version of Linux

>what is git

How should it be done?

Remind me to check the Linux mailing list.

>How should it be done?
kek he thinks people actually aren't just larping

Nothing

//TODO

Attached: 1515290358971.png (828x801, 102K)

In C++

#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))

bool operator

A=somedumbshit.getsomething
B=a+3

And

B=somedumbshit.getsomehing+3

Use the same amount of memory. Where do you think the computer holds the variable at anyway? The only difference is one is kept there and the other one is thrown away and you cant access it any more. If you are accessing it more than once then definitely store it somewhere.

Some shit Langs have no switch
Looking at you snek

Unity ppl are shitty noobs anyway, if they were good they'll be using unreal or something.

what is pass by value

so, how would you write that instead?

Hemorrhoids?

are you.... joking?

C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.

C++ leads to really really bad design choices. You invariably start using
the "nice" library features of the language like STL and Boost and other
total and utter crap, that may "help" you program, but causes:

- infinite amounts of pain when they don't work (and anybody who tells me
that STL and especially Boost are stable and portable is just so full
of BS that it's not even funny)

- inefficient abstracted programming models where two years down the road
you notice that some abstraction wasn't very efficient, but now all
your code depends on all the nice object models around it, and you
cannot fix it without rewriting your app.

In other words, the only way to do good, efficient, and system-level and
portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people
don't screw that up, and also means that you get a lot of programmers that
do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.

So I'm sorry, but for something like git, where efficiency was a primary
objective, the "advantages" of C++ is just a huge mistake. The fact that
we also piss off people who cannot see that is just a big additional
advantage.

>If you need more than 3 levels of indentation, you're screwed anyway, and yourself
You should post it right dude... Don't alter people's words

How could this be better written?

never write code

don't think it's better but you could use a table

good answer jeet

Missing the point

bool operator

Pretty sure an switch without breaks and
switch(true) {
case lhs.a == rhs.a:
..........

could work.

bool operator

If any of the cases are true it's just going to jmp/fallthrough to the same point. The original has a faster path.

>code smell
Even when used ironically, I hate hearing/reading this.

what's wrong with it?

>In other words, the only way to do good, efficient, and system-level and portable C++ ends up to limit yourself to all the things that are basically available in C.
(except classes)

>If you need more than 3 levels of indentation, you should kill yourself, you are just a living failure and a waste of breath
Please stop posting that false quote

github.com/Subsurface-divelog/

>goto
OOF

>comparing systems (kernel) code with application code

Quotes are no silver bullets.

>&::*
Horrible language.

our job Interview ends here.
We will call you, have a nice day.

Calm down falcon, i'm just saying is possible.

I'd really consider moving to Flutter if their widget syntax wasn't so awful.

Already made a small quiz app trying it out and had times where I don't know what line to put the rounded bracket.

nope, I think he is talking about everything, cause the issue is about the screen width.

Why not just say "bad practice" like we've done forever. Where does "code smell" even come from, chef's turned programmers? It seems like yet another revision of jargon to make people not feel bad.

y-your code isn't bad, it just smells a little ha ha