I need bad examples of code, now!

I need bad examples of code, now!

Other urls found in this thread:

m.thepiratebay.org/torrent/4149808/Windows NT4 source code
twitter.com/SFWRedditVideos

...

That's not bad code, that is full blown autism.

Go to any Sup Forums archive and search for fizzbuzz threads, or check archives for the daily "what are you working on, Sup Forums?" and check the git repos people post of what they're working on. You'll find tons of terrible code, with the bonus of it being formatted well and excessively commented because of the 'tism demands it.

var getName = prompt('Name: ');
if (getName === 'tom') {
alert('Hi Tom!');
} else if (getName === 'Tom') {
alert('Hi Tom!');
} else if (getName === 'tom') {
alert('Hi Tom!');
} else if (getName === 'TOm') {
alert('Hi Tom!');
} else if (getName === 'TOM') {
alert('Hi Tom!');
} else if (getName === 'tOm') {
alert('Hi Tom!');
} else if (getName === 'toM') {
alert('Hi Tom!');
} else if (getName === 'tOM') {
alert('Hi Tom!');
} else {
alert('Sorry, I didn't understand.');
}

Beat that.

sheeeiitttt

alert('Sorry, I didn\'t understand.');

Is that PHPz?

No, it's JavaScript

Your DNA

Yes, moar plox.
Did you save any more of falcon user's shitty code/resumes?

>javascript
ew

var getName = prompt('Name: ');
if (getName.toLowerCase() === 'tom') {
alert('Hi Tom!');
} else {
alert('Who are you, again?');
}

m.thepiratebay.org/torrent/4149808/Windows NT4 source code

Saved all from last thread :^)

wait this is really legit?
I don't believe it

var name = prompt('Name: ');
if (getName) {
alert(`Hi ${name}`);
}

...

>Sorry, I didn't understand.
user, it's clearly Siri.

...

Don't remember if this was one of falcon's pics.

HELL YESSSSS

Now on to the résumés

at least he's honest

But we need to know if the guy is tom.

...

GO GO GO
I'm saving all of these for future reference.
Trips checked.

...

>outdoor activities
gotta fix the bugs in the wild, ya know?

t. brainlet

>female
>single

Probably more likely to get the job than kysless virgin user

...

what the fuck

DUDE

COMPILER OPTIMIZATION

LMAO

In the words of falcon:
>read this resume and do the EXACT OPPOSITE of EVERYTHING you see

...

I believe this was the last of falcon's images on that thread.

WHOOPS NOPE.
That was some user's résumé.

too late bruh
>warhammer 40k
shit user you got

>CV not made with LaTeX

trash.bat

I can send you the final part of my final exam for visual BASIC.

Nothing has ever been so jury-rigged.

LOL Oh yeah that was the guy who posted his resume.
Thanks for dumping user. Great keks were had this morning.

LaTeX is for academic wankers

Any JS code.

It's dumb but logical, + concats strings as well as adding ints while - just subtracts

Can't you use a regular expression for this?

why not just
>return (x >= y)

because it's an example of bad code

probably. or if you're a brainlet like me you could do .toLowerCase() if it's indeed javascript.

that user's reply is also bad code if you ask the right people

Is he wearing a sports jersey?

>90% of this boards can use regex

These threads are always filled with brainlets maybe one tier above the brainlets they're mocking.

You could, but that isn't a good solution either, regular expressions are relatively expensive and opaque. You should either just pass back the name directly in the message std::cout

Don't forget to return 5, because you're random. Yay!

...

String.Compare(getName, "tom", StringComparison.OrdinalIgnoreCase);

Question semi-related to the thread. I am just learning python and I know OP is looking for examples of bad code but I wanted to try actually doing what OP's pic asked in Python. I came up with.

def function():
for x in range(700 , 200 , -13):
print(x)

function()

Wouldn't that be a decent way to do it? It seems to work. Sorry I'm a newfag on Sup Forums

Daily reminder: do not reply to people omitting to code tag.

Codelet here. Can someone explain why the VB.NET code is bad?

Python. Question was to sort a string of lowercase letters using a selection sort, found this garbage in most submissions.

Why do we care if it's a 'bad' code? As long as it works it should be fine.

its insecure as fuck, passwords should be hashed

but this activated my almonds
I can't see a way to reach 200 from 700 decreasing 13 because you can only reach 206 or
193 this way
int count = 700;
while (count > 200)
{
Console.WriteLine(count);
count -= 13;
}

This resume is mostly in Russian, but the random English parts are already hilarious.

...

>getName.toLowerCase()

what is it doing exactly?

he looks like the kid in slytherin from harry potter.

It's only me or is like reading a Markov chain?

you give it a number and it'll print a cross with x many lines
but this one just says give me 9 or i'll quit

tfw no qt indian nerdy gf to const your code.

Wow, I have reviewed many work tasks at my job but I have yet to see such beautifull code. Envious

Would a
/*if, return, whatever*/ x>=y?x:y;
be considered bad code?

depends on the purpose of the code

yours tests truthiness and returns or x or y, not the truthiness

>qt
>indian
Pick one.

>and returns x or y
I just realized that wasn't the intent of the picture, wtf

>sleep(1000*60*60*24);
>getCurrentDate();

that's a quality post

These are literally all satire.

there is literally nothing wrong with it, though.

justify why these are bad commits

as far as i can tell, it's because she's an indian girl

Or anyone creating a document for print. Using Word/Writer is for fags and brainlets.

>kudos for muh grills in coding
>coding amounts to tweaking variables

I mean at least working on documentation would have been useful.

...

prompt('Name: ').toLowerCase() === 'tom'?
alert('Hi Tom!'):
alert('Who are you, again?');

>kudos for muh grills in coding
I asked why the commits are bad, not for you to out your weird impotent anger towards women.
>coding amounts to tweaking variables
Why is this bad? Do you think variable declarations aren't important? Have you ever debugged a large application?

$power = int(con + (((lust+greed+lux+amb)/4)*(1+((lustexp+greedexp+luxexp+ambexp)/4))))
$luxcost = int(((lux*5)+5+lux)/luxexp)

My own code, not sure if this is bad so much as annoying to read. My logic is that I never have to write it out again and I can cut and paste as needed. The two lines are not related in the overall code, just the most eye watering I could find quickly.

>I asked why the commits are bad,
The commits aren't self-evidently bad; it's just a fucking trivial amount of work that can be held up as "very work much feminist progressive wow".

The sLOC numbers will tell the true tale there.

git ls-tree -r -z --name-only HEAD -- */*.c | xargs -0 -n1 git blame \
--line-porcelain HEAD |grep "^author "|sort|uniq -c|sort -nr


The fact that the story is counting individual commits should tell you something.

D-D-Draco Malfoy?

Is it common practice in other countries to list your nationality, religion, and marital status on your resume?

>2018
>not programming on a quantum computer

You didn't answer his question and at the same time proved his point.

Here's a single line of code I wrote years ago

It's retarded and shouldn't even run, yet idiots who created this piece of shit think otherwise.

How is "they're not bad, just mostly irrelevant and overhyped" not a direct answer?

Chile here.
They'll hire you based on your last name, address, school (and religion is implied here), and marital status. And if woman, then you have to explicitly state that you have NO children.

...

Holy fucking shit Delphi. How is that language nowadays if you can get best Embarcadero's jewry?

I will make a proper thread later (maybe in a couple of days), with all these and more resumes and code examples. I have about a dozen of each.

This is from a face-to-face interview last year. The question is the standard "count down from 700 to 200 in decrements of 13". The black line separates two distinct attempts. IIRC, each took something like 5 minutes.

quality unit testable enterprise code

If it's not bad why did you post it here retard boy

My boss doesn't make candidates write any code during interviews. I keep saying that's a big mistake and things like this prove I'm right.

I'm interviewing interns next week (yay me...). I was thinking Fizz Buzz but I'm afraid that might be too common and get a memorized answer.
I might take that question as one of them.