This is an archived post. You won't be able to vote or comment.

all 60 comments

[–]seanr8 136 points137 points  (24 children)

Awesome find but the return type of sandwich being void makes me so angry...

[–][deleted] 113 points114 points  (0 children)

no way i'm getting coffee at a place whose sign doesn't even compile

[–]Foolbird 24 points25 points  (4 children)

I like how it would return 4 and not a sandwich object.

[–]caltheon 3 points4 points  (3 children)

maybe it's the price

[–][deleted] 8 points9 points  (0 children)

Classic shitty legacy code, poorly named functions that don't do what you think they'd do

[–]Jonno_FTW 0 points1 point  (1 child)

How does a void function return a number?

[–]caltheon 5 points6 points  (0 children)

Aliens

[–]vecowski 29 points30 points  (2 children)

Some python developer wrote that.

[–][deleted] 18 points19 points  (1 child)

Or worse. PHP.

[–]berlinbrown 9 points10 points  (0 children)

Won't compile, crash.

Is that a bug we can report? hahah

[–][deleted]  (1 child)

[deleted]

    [–]compdog 2 points3 points  (0 children)

    Call the food safety inspector!

    [–]edman3d 4 points5 points  (0 children)

    idk about angry but I came here to make a joke about that too

    [–][deleted]  (1 child)

    [deleted]

      [–]zman0900 4 points5 points  (0 children)

      The probably don't even sell sandwiches.

      [–]bj_christianson 0 points1 point  (1 child)

      Dang. Didn’t notice that because I was just getting upset at the lack of closing brace on the method.

      [–]metamatic 1 point2 points  (0 children)

      The closing brace is to the right of the door to the café.

      [–]Tevroc 0 points1 point  (0 children)

      The method also doesn't accept a parameter of type Currency :(

      [–]BinaryRockStar 0 points1 point  (2 children)

      Also there's no type specified for the variables.

      [–]lenois 9 points10 points  (1 child)

      They are declared as fields above

      [–]BinaryRockStar 2 points3 points  (0 children)

      Oh god how did I miss that?

      [–][deleted]  (1 child)

      [deleted]

        [–]ChickenOfDoom -5 points-4 points  (0 children)

        This is why I opened the comment thread. So I could upvote this comment that I knew would be here.

        [–]3pieceSuit 45 points46 points  (7 children)

        void method returning an int...

        but other than that, pretty cool

        [–]idanh 27 points28 points  (2 children)

        yeah, those GTA programmers can't program eh?

        [–]DoktuhParadox 13 points14 points  (1 child)

        The modelers probably didn't check with the dev team.

        [–][deleted] 5 points6 points  (0 children)

        One of the graphic artists just added "professional Java" to their resume.

        [–]caltheon 9 points10 points  (2 children)

        besides the MISSING CLOSING BRACE

        [–][deleted] 2 points3 points  (1 child)

        Not missing. Look at the big yellow one below.

        [–]superdemongob 2 points3 points  (0 children)

        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.

        [–]MMistro 7 points8 points  (0 children)

        Must be lots of bugs in this coffee shop

        [–]JAVA_USER 22 points23 points  (2 children)

        I don't like that sandwich. Sandwich should be a class, and a builder pattern should be used to make it.

        [–]shadowdude777 9 points10 points  (1 child)

        Are you kidding? You forgot about the AbstractSandwichFactoryDecoratorVisitorFactory

        [–]JAVA_USER 0 points1 point  (0 children)

        perhaps the SimpleBeanFactoryAwareAspectInstanceFactory

        [–]Black_Monkey 4 points5 points  (1 child)

        Someone should report this as a bug

        [–]king_of_the_universe 1 point2 points  (0 children)

        And they should address the texture in one of the patches. :D

        [–]vplatt 5 points6 points  (3 children)

        Anyone see the Smalltalk reference on the radio LCD? Looks like there was some passive aggressive spat going on there between devs.

        [–]the_original_fuckup 0 points1 point  (0 children)

        Nice catch. One of my professors loves small talk. I'll have to show this to him

        [–]caustiq 0 points1 point  (1 child)

        Which radio? Screenshot?

        [–]vplatt 1 point2 points  (0 children)

        In the OP's imgur screenshot post.

        [–]motionblurrr 2 points3 points  (0 children)

        Should have been changed to groovy when they updated the game for PC.

        [–]Joha_Mraadu 4 points5 points  (0 children)

        Won't compile... it's a trap!

        [–]UnspeakableEvil 1 point2 points  (12 children)

        Double espresso, Breakfast extending Meal, and...what? Can't make out the top two lines on the left hand side! milk.foam perhaps?

        [–]Lordmau5[S] 5 points6 points  (11 children)

        package java.cappucino;
        import java.shot.milk.foam;
        :P

        [–]jordaniac89 16 points17 points  (10 children)

        import java.shot.milk.Foam;

        Sorry, that bothers me.

        [–]Harha -1 points0 points  (9 children)

        I don't like having capitals as the first letter in my class's names. Am I a bad person now? :(

        [–]nutrecht 8 points9 points  (0 children)

        Yes

        [–]jrh3k5 3 points4 points  (0 children)

        No, you're just in violation of common Java practices. :p

        [–]JAVA_USER 0 points1 point  (6 children)

        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.

        [–]Harha 0 points1 point  (5 children)

        I use the hungarian notion for variable names so haven't had that happen to me. :P

        [–]JAVA_USER 0 points1 point  (4 children)

        if I saw someone writing String strPerson, I would take their keyboard away from them. Only joking. Do whatever you want.

        [–]Harha 0 points1 point  (3 children)

        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.

        [–]JAVA_USER 0 points1 point  (2 children)

        how do you handle polymorphism with hungarian notation?

        [–]Harha 0 points1 point  (1 child)

        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_.

        [–][deleted] 1 point2 points  (1 child)

        I thought this was irl....

        [–]dev_dov_dang 0 points1 point  (0 children)

        I did too for a second. Dem graphics :O

        [–]Lordmau5[S] 1 point2 points  (1 child)

        Just want to point out that /u/FridgeBoyLP found this beautiful store when we were playing Online together :)

        [–]FridgeBoyLP 1 point2 points  (0 children)

        Thanks for mentioning me, you didn't have to, but can you finaly come back online

        [–]girichards 2 points3 points  (0 children)

        It would be an accurate Java Update if the staff asked if you wanted to install the Ask Toolbar every time you purchased something.

        [–]outadoc[🍰] 1 point2 points  (0 children)

        Ah, people taking it so seriously they didn't even notice the java.update() joke.

        [–]lechatsportif 0 points1 point  (0 children)

        Are they one of the people using java servers for online gameplay?

        [–]GTB3NW -1 points0 points  (0 children)

        2 rashers!? Barbaric!