Come laugh at this code

> Java
> eclipse
> }else {

Attached: faggotsonfit.png (3528x1149, 431K)

Other urls found in this thread:

github.com/Packmanager9/CanYouDefeatStockMania8-11-18/blob/master/MyApplication2/feature2/src/main/java/ditzler/cole/myapplication2/feature2/StockManiaActivityPowerfulAutoplayer.java
youtube.com/watch?v=o00CX4hgVxE
youtube.com/watch?v=7THzO-D0ta4
youtu.be/10hmDB_Wbgo?t=4794
aima.cs.berkeley.edu/code.html
youtube.com/playlist?list=PL7A1B745BB1504D83
norvig.com/sudoku.html
pbr-book.org/
twitter.com/SFWRedditVideos

What's wrong with it?

Did you miss the part where he said he's sefl taught?

I have worse.

Please share. I'm at a club? With my cousin (female) and 2 of her friends. They are having drinks and dancing. I'm the designated driver and I'm bored as fuck.

Ty

oh fuck off who the fuck talks code while out doing nightlife and pretending to be normal

Well I wrote the OP code, so theres that. But its my most recent game, my first few run correctly, but their guts look like pic related. This method goes on from line 584 to line 815.

Attached: part 1.jpg (611x888, 150K)

This method... it does the heavy lifting >.>

Attached: part 2.png (729x833, 126K)

this guy definitely programs better than the majority of fucking Jow Forums

> I totally get laid

I'm not going to bully Jow Forums

This is the front half of a loop

Attached: part 3.png (1229x861, 69K)

Heres how I generate random stock names in my stock market game
private String displayRandomStockNamesPartTwoMethod(int RandNum) {
String PassString = "©@$H";

switch (RandNum){
case 0:
PassString = "B";
break;
case 1:
PassString = "C";
break;
case 2:
PassString = "D";
break;
case 3:
PassString = "F";
break;

case 4:
PassString = "G";
break;
case 5:
PassString = "H";
break;
case 6:
PassString = "Z";
break;
case 7:
PassString = "J";
break;

case 8:
PassString = "K";
break;
case 9:
PassString = "L";
break;
case 10:
PassString = "M";
break;
case 11:
PassString = "N";
break;

// ... (12 through 19 are N through X)

case 20:
PassString = "Y";
break;
case 21:
PassString = "Z";
break;
case 22:
PassString = "ℕ";
break;
case 23:
PassString = "℗";
break;
case 24:
PassString = "℣";
break;
case 25:
PassString = "Ⅎ";
break;
case 26:
PassString = "ℵ";
break;
case 27:
PassString = "⅁";
break;

}
return PassString;
}

And I got a lot of flak for using non english characters in my variable names here when I posted this.

Attached: part 4.png (1479x851, 238K)

The one letter variables are one thing but

>resultingNextDigit
>rezultingNextDigit

If you're going to type a longer variable name out anyway, at least give them more unique names, damn. Its like you're trying to make your code hard to debug.

Attached: 1514908868006.gif (200x270, 1.09M)

You either have a mental illness or you're trolling Jow Forums with dailywtf-tier code.

The thing is, the damn thing doesn't have any bugs left. I checked every edge case. Also, its a base 60 calculator.

Still tho
>resultingNumberOfSixtys
>resultingNumberOfSixds
If I had to go back through this I would probably build a time machine to kill myself before making it.

Attached: calculator base 60.png (1075x1585, 84K)

>mental illness
Its this one.

Attached: part 5.png (485x917, 56K)

Never said I would. They hambest. I had nothing else to do. That's why I volunteer
Java amuses me. Most people try to write the most readable code possible but it looks like an impossible task on Java
I'm literally at the table while they are at the dance floor

I've got an AI that plays my stock market game but its way too fat to either screenshot or put into a code box. I could update my Git if anyone wants to see it.

private static final String[] keyDic = new String[]{"B","C","D","F","G","H","Z","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","ℕ","℗","℣","Ⅎ","ℵ","⅁"};
private String displayRandomStockNamesPartTwoMethod(int rnd)
{
if(rnd < 0 || rnd > keyDic.length)
return "©@$H";

return keyDic[rnd];
}


where's part 1 of this monstrosity, abdul?

Holy shit thats elegant! I just dripped cum reading that.

If you want to see the whole thing its inside this one.

github.com/Packmanager9/CanYouDefeatStockMania8-11-18/blob/master/MyApplication2/feature2/src/main/java/ditzler/cole/myapplication2/feature2/StockManiaActivityPowerfulAutoplayer.java

Oh, but the part one, my bad its:

private int displayRandomStockNamesPartOneMethod() {
return new Random().nextInt(22);
}

youtube.com/watch?v=o00CX4hgVxE

Attached: 3363b34b5b8c0971843b684426074e4976546ed0bb3775ebfd07ea8c6bf1fb7d.jpg (240x320, 17K)

Jesus fucking christ man, read some proper code on github once in a while

protected static final String[] keyDic = new String[]{"B","C","D","F","G","H","Z","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","ℕ","℗","℣","Ⅎ","ℵ","⅁"};
private final Random rnd = new Random();

private String getRandomDisplayName(byte length)
{
if(length < 1 || length > 4)
return "©@$H";

String string = "";
byte x = 0;
int y = 0;

while(x

the y var isn't necessary here, though. I was overthinking things

That's why I give most of this crap a pass. I've written some god awful code before, and it's fine as long as it works and its not something you need to extend or revisit often.

I usually think of myself as a good programmer, but every now and then I run into something that makes me wonder about that.

Attached: 26_variable_names_for_busy_developers.jpg (1170x1600, 259K)

OP is fit for a career in silicon valley. He just needs some estradiol valerate and striped thigh highs.

Cry all you want, but this is how I learn, I learned three things from your example there and I am truly thankful.

>estradiol valerate
too bad I'm 6'4 and 350 pounds. Would be one fugly Tgirl.

Didn't stop 99% of the people you see at GDQ or screaming into the void on twitter

do you get money for being as autistic as you are
imagine how much you could learn FROM A FUCKING BOOK regarding how to code properly

Well I'm also not gender dysphoric. I love having a cock and balls.

It'd improve your odds of getting hired. Sexy trans women make both men and women uncomfortable for various reasons. They are a genuine threat to the natural order.

Fugly tgirls are a safe way to hit diversity quotas without actually hiring women.

youtube.com/watch?v=7THzO-D0ta4

>do you get money for being as autistic as you are
no, but once I got a free hamburger for instantly factoring the primes of the receipt number in my head.

>tfw study hard for technical interviews, have some decent experience and code to show for it
>passed over because the HR lady doesn't know anything about the technologies I specialized in

such as?

>lines with more than 80 characters
that vertical line in the middle of the IDE's window isn't there for nothing, user

what about my 60 image array of images?

Vulkan, CUDA, physically based rendering, and in a pinch I've done some procgen and simulations (discrete event modeling)

have you ever made a simulation like this?

youtu.be/10hmDB_Wbgo?t=4794

you have a long way to go but I believe in you, you'll make it. also, why not c# and unity if you want to program games? c# is microsoft's java

>unity
everyone I know keeps pointing me to unity, but I want to finish my project in Java in case when I try unity I never want to go back.

>>>/twitter/
I bet you would throw a tantrum if a Jow Forums poster was mocking someone who was just starting out in the gym. Stop being such a useless faggot

What the fuck does that have to do with anything I said
You're insane

Man, I don't know what to say. If it works though who cares

sure, up to you but if many people are suggesting you unity you should consider listening. they're pointing you to the right direction, it's the smarter choice
anyway, good luck user. godspeed!

HR is literally told by people who know what they want exactly what to look for. If they needed those skills and you can present yourself as even remotely knowing what you're talking about you should get past HR. Sounds like they just don't need your specializations

It's called busting balls man, it's not meant to discourage.

>You're insane
its your fault for posting in this thread

It is. It really is.
The position literally asked for exactly the technologies I mentioned

Read Code Complete (2004, 2nd edition, still relevant for you) and look at some actually good, elegant code.

aima.cs.berkeley.edu/code.html
youtube.com/playlist?list=PL7A1B745BB1504D83
norvig.com/sudoku.html
pbr-book.org/

I was just curious

that's never stopped any of them before

also as for improvement on coding... try to use containers/make it so you're not doing the same thing 40 gorrillion times...

The array should ideally be char[] instead of String since they're all single characters.
Also the y = 0 initialization is redundant.

Why the fuck is Jow Forums so insecure that everytime you see code you have to show the thread how much better you are?
Imagine /v/ posting their steam achievements every single time they see someone playing a video game

Because that's exactly what makes threads like this interesting, ya silly goose. If other people's knowledge offends you, then unironically kill yourself asap.

I can't figure out what you are saying.

>I can't figure out

That's a recurring theme in your life, isn't it?

Not him but are you retarded ?

Why is java code always so

l o n g

Nah that's just the way I do it

why doesn't this guy put all these in a fucking array and auto generate the monster names and attributes, jesus fucking christ, he's typing out every single fucking detail, I wonder how long it took

Well for starters every single monster has a tuned stat total, instead of being auto generated. They could be in an array I guess. Overall I just added monsters one at a time whenever I came up with one, or if I needed something that would lose to one that was under-powered and beat an overpowered one. In terms of total time taken typing, maybe an hour or two.

Load the monsters from config files. You shouldn't have to mess with the code whenever you make new monsters.

I've never made or seen a config file

>Jow Forumsbros learning to code
Welcome to /comfy/ aniki enthusiasts

Attached: 95e03f296711eaa39fb7fe7ae394feb1fed88eb4b934952b6b1eda4c8aee0845.jpg (200x255, 18K)

> Jow Forums tries to code.

(1) OP is trolling you
(2) this is a time/date formatter. they are single letter because that's how you format the output.

Why not use arrays?

I'm the code author, but I'm not OP

Honestly dude you're getting a ton of shit in this thread but your code is fascinating.
Like you're doing everything backwards it almost looks like it's on purpose, but at the same time, as long as it works for you, why not.
There's definitely some creativity that's only found in beginners who have no idea how to do things.

Its not that bad, you just need to separate concerns (input from game logic). Encapsule more into objects to make it more readable and reusable. It comes with practice, thats all. Dont fill discouraged by retards.

>if((!TextUtils.isEmpty(bant))&&PlayerMonsterStorage[(int)Double.parseDouble(String.valueOf(IDbox.getText()))]!=null)
Thank god I got into embedded programming and not this clusterfuck.

Attached: 1542129199021.png (660x660, 251K)

You should try being consistent with variable naming conventions. Also making them fairly descriptive. Also, google camelCase.

Don't see much problem besides much too long lines.

>using java

Explain what's wrong with it without using memes.

>Don't see much problem
>(int)Double.parseDouble(String.valueOf(IDbox.getText()))

DRY: Don't Repeat Yourself
It's like you missed the whole point of automating away the incredibly monotonous stuff. Your functions are gigantic and there are chunks that really should be their own functions out right. This is 101-level code hygiene here.

I didn't write OP. And I asked what was wrong with Java, not that specific code.

oh shit.
Well in that case there's probably much worse things with his code than it being in Java and honestly Java's faults aren't really relevant to OP's situation as a self-taught newb autist.

Thanks that's good advice, and I have been improving. I make methods a lot more often now, and sometimes I divide them into multiple methods.

By the way, I wrote the code but I am not the OP of this thread.

>yes

You're making a lot of classic noob mistakes that have been endlessly debated and discussed and largely solved and people shouldn't be making them much anymore. Try to find PDFs of these (admittedly old) books and such which are still relevant, but translate little details to 201x

Pragmatic Programmer
Code Complete 2nd edition
The C2 Wiki
Why Programs Fail: A Guide to Systematic Debugging

Look into "mathematical heuristics" because it's a useful style of thinking. Get to know George Polya (RIP).

Java is degenerate

Thanks