r/java • u/Lordmau5 • Apr 15 '15
Java reference in GTA V - Beautiful.
http://imgur.com/gallery/zQGfUnP/2
u/UnspeakableEvil Apr 15 '15
Double espresso, Breakfast extending Meal, and...what? Can't make out the top two lines on the left hand side! milk.foam perhaps?
6
u/Lordmau5 Apr 15 '15
package java.cappucino;
import java.shot.milk.foam;
:P16
u/jordaniac89 Apr 15 '15
import java.shot.milk.Foam;
Sorry, that bothers me.
0
u/Harha Apr 16 '15
I don't like having capitals as the first letter in my class's names. Am I a bad person now? :(
9
5
1
u/JAVA_USER Apr 18 '15
It's distracting to see two variable names side by side, and wonder why its not throwing an error, then only to realize that one of them was a class without proper naming conventions.
1
u/Harha Apr 18 '15
I use the hungarian notion for variable names so haven't had that happen to me. :P
1
u/JAVA_USER Apr 18 '15
if I saw someone writing String strPerson, I would take their keyboard away from them. Only joking. Do whatever you want.
1
u/Harha Apr 18 '15
Haha, that's not exactly what I do though, there's no sense in that.
String m_person, or s_person or g_person, depending on wheter it's a member, static or global variable, for example. And so on.
1
u/JAVA_USER Apr 19 '15
how do you handle polymorphism with hungarian notation?
1
u/Harha Apr 19 '15
If you mean extending classes into subclasses and so on, I don't really care if a member variable is a member of the superclass or the child class, etc. I still prefix it with m_, it would get ridiculous if I'd prefix subclass member variables with their own prefix and so on. It's fine like that, at least in my head and I mainly code for myself so it doesn't matter so much.
And after all, if you have an abstract class with member variables and make a class that extends it, all the private or public variables in the class you extended are going to be members of your child class even if you don't use them, so in that sense it doesn't really matter, just prefix them with m_.
→ More replies (0)
135
u/seanr8 Apr 15 '15
Awesome find but the return type of sandwich being void makes me so angry...
112
26
u/Foolbird Apr 15 '15
I like how it would return 4 and not a sandwich object.
4
u/caltheon Apr 16 '15
maybe it's the price
8
Apr 16 '15
Classic shitty legacy code, poorly named functions that don't do what you think they'd do
1
31
9
5
1
u/bj_christianson Apr 16 '15
Dang. Didn’t notice that because I was just getting upset at the lack of closing brace on the method.
2
1
1
u/BinaryRockStar Apr 15 '15
Also there's no type specified for the variables.
10
-4
u/ChickenOfDoom Apr 15 '15
This is why I opened the comment thread. So I could upvote this comment that I knew would be here.
0
0
44
u/3pieceSuit Apr 15 '15
void method returning an int...
but other than that, pretty cool
29
u/idanh Apr 15 '15
yeah, those GTA programmers can't program eh?
14
9
u/caltheon Apr 16 '15
besides the MISSING CLOSING BRACE
3
Apr 16 '15
Not missing. Look at the big yellow one below.
3
u/superdemongob Apr 16 '15
false. because that one matches with the other big yellow one on the left.
and even if they did intend that as the closing, there's still one too few.
regardless, i find this a charming and awesome inclusion.
8
24
u/JAVA_USER Apr 15 '15
I don't like that sandwich. Sandwich should be a class, and a builder pattern should be used to make it.
11
u/shadowdude777 Apr 16 '15
Are you kidding? You forgot about the AbstractSandwichFactoryDecoratorVisitorFactory
1
7
6
u/vplatt Apr 15 '15
Anyone see the Smalltalk reference on the radio LCD? Looks like there was some passive aggressive spat going on there between devs.
1
u/the_original_fuckup Apr 16 '15
Nice catch. One of my professors loves small talk. I'll have to show this to him
1
3
5
2
3
u/girichards Apr 16 '15
It would be an accurate Java Update if the staff asked if you wanted to install the Ask Toolbar every time you purchased something.
2
u/outadoc Apr 16 '15
Ah, people taking it so seriously they didn't even notice the java.update() joke.
1
0
2
u/Lordmau5 Apr 16 '15
Just want to point out that /u/FridgeBoyLP found this beautiful store when we were playing Online together :)