Post more of em
Do these have a name?
Who's autistic enough to type out all this shit code just for a crappy meme?
>not realizing someone wrote one line of code to "type out" all of that "code"
>Who's autistic enough to believe you need to type out all this shit code just for a crappy meme?
my favorite
>tralse
lawls
>tralse
Kek
this is why we don't let mathematicians code anymore
Also, what kind of retard sets true as 0 and false as 1?
Bash and most other shells with exit codes?
Exit codes are different. Booleans, on the other hand, are standardized.
>cout
based tralse poster
underrated
kek
e
k
what is the origin of this?
tits or gtfo
What's wrong with that?
Honestly amazing.
Goes to show how much you can do with basic knowledge and ultimate autistic stubborness
virginity
This is beautiful.
no, those denote an error code, 0 means "there was no error", a successful exit depends on the errorlevel being false
This one was the best one... the word "new" was the kicker. Anyone got the original link with the background on it?
>tralse
Muh sides
they're called CS graduate memes
>case 864:
lmao
Game of the year everybody.
What's it matter? Switches match cases in the same amount of time regardless of how many cases there are.
lmao you best be kidding kid
>yfw most of these execute faster
This is horrifying and beautiful at the same time.
Gaze upon this abomination in its totality: daniweb.com
Regardles of validity of this statement if you need thousands of switch cases at least they should be defined in a header file as proprocessor constants to make this code readable:
#define BULLSHIT_DOG 864
...
case BULLSHIT_DOG:
// do something
Do you think anyone would understand wtf is going on here a year after writing this code?
No, a crapton of ifs doesn't execute faster, in fact it's common to perform more computations simply to avoid ifs.
>mac user
lmao no wonder
>tralse
should have been "true, false, nonbinary"
What really niggles me is that 'true' ends up == 0 and 'false' == 1, which given the C's family inability to distinguish booleans from ints is so incredibly error-prone. Using such code is not only stupid, it would be outright dangerous given enough time.
Don't shit on Mac users; they develop FreeBSD.
If you guys thought tralse was bad, check this.
docs.microsoft.com
I can't motivate myself to get back into programming,
I look at codewars problems and I just cant be bothered.
Should i learn a new language, would that help maybe?
wat
underrated
>tri state
>has 5 states
>only 2 are supported
Jeez, I need to take a shower now.
No way, only a cs retard would define the greater than relation with division. A math undergrad would use subtraction.
I use enums
There's a difference between states and booleans.
Fun fact, the pokemon games use an encryption scheme that does essentially this.
What's wrong with one-time pad?
This isn't OTP, it's 1000000 time pad
Look closely, it never utilizes i.
This. It looks completely useless.
Applying xor 1000000 times is the same as applying xor 0 times.
this dude writes horrible code and made a game out of it, oddly inspiring
Thanks, I should have read the code a bit more carefully, I just assumed it was xoring individual bytes.
No worries man, basically it's just xoring the pointers at the beginning of both arrays, this code would run and cause a segment fault AFAIK
en.wikipedia.org
This is actually kind of interesting
Well, it looks useless, but we're not privy to what the xor function actually does.
Try doing something hard, something that makes you adapt your style. That's what helped me. Also, learning emacs made me focus if that's part of the problem
Actual brainlet here, what would be the appropriate alternative to this? I'm guessing it depends on the context, but what would be the standard way to go when you have these many choices?
>not being vim master race
I find mode switching retarded, the emacs system of C-#/M-# just works better with the way modern programs work and it's more efficient to learn.
oh i missed this
you would usually want this broken up into categories from my experience, so cases 1-150 might fall under enemy, while cases 151-250 might be in a different switch statement regarding only NPCs or something. also having just number define these cases is awful, at least have an enum list somewhere that can be referenced.
case DOG: is infinitely better than case 6969: //this is dog
that's my two cents
Obviously doing a bunch of aimless programming assignments like plotting trend lines or finding nodes in trees is going to be boring, no shit.
Decide on something actually tangible and fun you want to do instead, like a website or a web scraper or a game or anything, and commit to it.
Nothing wrong with this one, tbqh.
Bill Gates.
How would you make this better?
By "no", I assume you mean "yes"?
Bash does interpret 0 as true in boolean contexts. All you did was explain why.
Instead of using strings use enums and make a table of functions
t. boolean zenlet
t. uses 4 bytes to store true or false instead of 1 bit
Thanks.
My philosophy has always been to only use strings for user i/o. They're big and unwieldy.
pls be bait
It seems to use the x^=y style so that's what I was going off of
Ah ok
>It seems to use the x^=y style
Does it though?
Oops I looked it up, and usually bools are stored as one byte. That's still 7 bits wasted.
That's actually cool as fuck
In assembly, xor a,b is essentially a = xor(a,b)
It's even more of a waste to make a function for a simple one liner.
>that's assembly
I get what you're doing, but were arguing about hypothetical circumstances that don't exist.
Sorry, I was just trying to guess based on what I knew
i can only motivate myself to program when its something that i am going to actually use. i barely ever complete challenges because i get part way then wonder what im even making the thing for.
pick a piece of software you think is lacking in some regard and make a version that isnt, or simply pick a random piece of software you use often and make your own version then use your version instead so you are motivated to keep working on it.
learning a new language always helps too, i find learning a new language almost as fun as programming itself
>i find learning a new language almost as fun as programming itself
That be gay and useless.