Hacker News new | past | comments | ask | show | jobs | submit login
There's a coffeeshop called java.update() in GTA V (orcz.com)
148 points by c2prods on Sept 25, 2013 | hide | past | favorite | 77 comments



It doesn't feel like it's enterprise enough to be realistic.

    class TwoBaconRashersInsideTwoSlicesOfBreadFactory {
      
      /* Make a sandwich
       * <p>
       * Construct a foodstuff consisting of two slices 
       * of bread with two slices of bacon.
       * @return TwoBaconRashersInsideTwoSlicesOfBread a sandwich
       */
      Public TwoBaconRashersInsideTwoSlicesOfBread getSandwich () {
       BaconRasherFactory pig = new BaconRasherFactory();

       BaconRasherInstance bacon1 = pig.getBaconRasher();
       BaconRasherInstance bacon2 = pig.getBaconRasher();


       SliceOfBreadFactory loaf = new SliceOfBreadFactory();
       
       SliceOfBread bread1 = loaf.getSliceOfBread();
       SliceOfBread bread2 = loaf.getSliceOfBread();

       return new TwoBaconRashersInsideTwoSlicesOfBread(bread1, bacon1, bacon2, bread2); 
    }
Or something... trying to do Enterprise Java is hard.


You can always use this gem for reference:

https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...


Not enterprise enough, it doesn't implement any interfaces nor extends any generic classes, there also should be some try/catch blocks (what if the bacon isn't fried enough?) and of course several unit tests to guarantee the highest quality sandwich ;)


There isn't even any XML. Not enterprise at all, by definition.


Yeah, we should be able to define types of sandwiches in XML.

What if someone wants a BLT?


Language bashing is what characterizes our industry.

I have the dream that one day we will recognize languages as the tool they are and be mature enough to chose tools by utility and not by hype, hipness or pop culture and see there benefits and limitations.


I have the dream that one day we will recognize languages as the tool they are

We do. They're just terrible tools. Do you think other industries don't criticize their tools? Hell, they have full magazines and reports reviewing and grading them.

The idea that all languages/tools are created equal and just have different use cases is nonsense.


Criticizing tools is excellent. Deciding about their benefits and limitations, learning about when to use them and when not to use them. Sharing experiences so people can make better choices.

Criticism in this way is rare though. Bashing a language to be cool, be part of the hip crowd, make you feel better about your own choices, bashing languages for karma or laughs, bashing languages you have no experience in comparing it with a language you've used for some weeks is not criticism.

Does it help others? If it does, it is criticism. If it doesn't and only makes you feel good after posting, it's not.

[Edit] And the really sad part is that people make language arguments into people arguments, stereotyping people to make themselves feel better.


>learning about when to use them and when not to use them.

Learning never to use them is just as legitimate.

"A place for everything and everything in its place" isn't a law of physics, it's a battle-cry for the obsessive compulsive.


"Learning never to use them is just as legitimate."

Indeed! I would from my experience not use Z80 assembler - though I like it much more than 6502 - and CP/M as an OS for a social media website.

I have the gut feeling though that your comment might be about Java, which might not be warranted. The last company I've worked for makes >$200M in profit a year and will be sold soon for >$1b - based on a Java platform. The next company I worked for was skyrocketing and sold for $200M - based on a Java platform. Both profited from good performance, stability and GC maturity during high periods of growth and load and a good pool of developers during peak hiring times.

But then we might differ in our goals and evaluation criteria, mine is about getting things done to support a business in a sustainable way.


He is not bashing Java per SE but a special kind of Java: Enterprise Java and IMO that deserves a bashing on general principle. Enterprise Java just never seems appropriate.


I don't know if that pun was intentional, but if it was it's absolutely fantastic.

So as to remain on topic: I agree with you but the other side of the coin is that Java the language can't seem to live down Java EE and its culture. It's trying, though. I give particular kudos to the Clojure and Scala communities for helping to rebrand the JVM as something awesome independent of Java. That helped me, at least, to realize that I shouldn't conflate the two in my head.

The only stumbling block I have to get around in my head now when I think JVM is "JVM == long startup times", which is still kinda true but nowhere near as bad as it was.


He was bashing a programming language - you call it Enterprise Java - for laughs and karma, not seeing languages as tools you can use based on your judgement. I hope we once will grow beyond bashing.

[Edit] And this is the highest voted comment on a thread about how cool GTA V is to include programming references and how deep their open world is.


HN youngers of today like to bash Enterprise Java, whereas the old guys already have their share of scares from:

Enterprise Clipper

Enterprise C

Enterprise C++

Enterprise Perl

Enterprise TCL

Enterprise insert language here

You just need to let the enterprise architects loose...


I'm probably young enough to have experienced Enterprise PHP, which by all accounts (at least when Symfony2 was just released) seemed like the love-child of Enterprise C++ and Enterprise Java.


But how will some define their superiority? By not using semi-colons?


Hmm... how about...

@Service public class SandwichFactoryImpl implements SandwichFactory {

	    @Autowired
	    public EmptySandwichFactory emptySandwichFactory;

	    @Autowired
	    public FoodComponentFactoryFactory foodComponentFactoryFactory;

	    @Override
	    public Sandwich makeSandwich(Collection<FoodComponentDescription> foodComponentDescriptions) {

	        Sandwich sandwich = emptySandwichFactory.newSandwich();

	        for (FoodComponentDescription foodComponentDescription : foodComponentDescriptions) {
	            FoodComponentFactory foodFactory = foodComponentFactoryFactory.getFactory(foodComponentDescription.getType());

	            for (int i = 0; i < foodComponentDescription.getQuantity(); i++) {
	            	sandwich.addFood(foodFactory.create());
	            }
	        }
	        
	        return sandwich;
	    }

	    public SandwichDTO makeMyFavoriteSandwich() {
	        Collection<FoodComponentDescription> components = Lists.newArrayList();

	        components.add(new FoodComponentDescription(FoodType.BREAD, 1));
	        components.add(new FoodComponentDescription(FoodType.BACON, 2));
	        components.add(new FoodComponentDescription(FoodType.BREAD, 1));

	        return makeSandwich(components);
	    }

	}


This is much more inspired. I sort of feel sympathetic, because of the potential mental anguish you were likely to have incurred while writing it.


Your use of "new" implies those factories have no interfaces. Normally they would be injected.


Make the comment into Javadoc, add some more modifiers, increase the method names and I think you're well on your way.


Any language has hard time being enterprise.

That what the space station architects are there for.


And a hilariously detailed start-up with a (Dropbox inspired?) play room. There's also a hacker character whose convincingly detailed computer setup shows several VIM sessions (one on a portrait oriented monitor).


The attention to detail in this game is crazy


Know your audience.


Do you have any screenshots of this computer setup with vim?


I think the colors resemble more Sublime Text's default theme. Here, by the way: http://i.imgur.com/FYce2kD.jpg


Yeh, I think it's definitely looking more like Sublime Text.


Wouldn't sublime have that scroller on the side with the preview of the entire file?

Or do real 1337 people turn that off? Can you even turn that off? Yeah, I've used Sublime twice I think.


I've looked and looked for ages about how to turn that preview off... I don't think so.


In your settings file:

     "show_minimap": false
Or, choose Hide Minimap from the View menu.


Shows how I shouldn't just depend on google to solve my problems for me. I searched for something like "turn off preview" but I never made the connection that it was called minimap. It's only slightly annoying. Thanks!


View->Hide Minimap


that's monokai theme, originally used in Textmake back in 2006

http://studiostyl.es/schemes/monokai


A void method that returns a value? How on earth did this coffeeshop compile?


A void method that returns a sandwich, no less.


Requires root user to run


'sudo make me a sandwich'


    -bash: sudo make me a sandwich: command not found


I'm surprised you don't have make installed. That's usually one of the first tools I install on any new system (if it's not included as part of the base install, like Arch does):

    sudo apt-get install build-essential
Incidentally, the make error you'd get is amusing:

    make: *** No rule to make target `me'.  Stop.


    sudo make me a sandwich
will result in sudo running with 'make me a sandwich' as arguments.

    'sudo make me a sandwich'
will result in 'sudo make me a sandwich' running.


Ah, yes. I didn't spot the quotations encapsulating the code in the parent post. That will teach me to skim-read jokes.


I like hilariously meta jokes.


Maybe sudo is not installed?


    sudo pacman -S make
    curl https://put.honkgong.info/ed8e3df8691ec7944a878cea595e00c363079504 > Makefile
    sudo make me a sandwich


Let's run arbitrary code downloaded from somewhere I don't know! As root!


Did you read the linked Makefile?


1. The posted code could change between when you read it and when I read it.

2. If you just cut-and-paste these three lines, then you are obviously not reading it.


That's why you have another line saying something like:

    cat Makefile
before blindly executing it. In general, you shouldn't blindly believe downloaded code, but in this case Makefile is simple enough that you can prove it's non harmful in a few second glance.


ok


Never mind that the function casts (coerces? constructs?) ints to bread and ints to bacon. Let alone how it's got a special "plus" operator that can work on bread/bacon and return a sandwich...


If you look carefully at the screenshot, you'll see that bread and bacon are declared to be ints above the method. =]


Clearly bad practice to be using raw integers here. They should at least be using enums.

public enum Ingredients { BREAD, BACON }

public enum Delicatessen { BACON_SANDWICH }


Hopefully they'll fix this in the next GTA patch.


There's also a garbage collector running around. But if you shoot him, the whole game pauses.


You just made my internet day.


That was clever.


If you're a developer and haven't played this game yet, I wholly encourage you to do so, just to witness the technical feat that this game is. There is a simply baffling level of detail and surely one of the most sophisticated open world engines ever conceived under the hood. It is stunning what the rockstar devs have pulled off here.


Has there been any improvements in the way Rockstar treats employees? If not then no thanks.


Either it was Lester's house computer or one of the Lifeinvader computers, but it was using a text editor that looked strikingly similar to Sublime Text. I had to do a double take.

The whiteboards in one of the Lifeinvader rooms, gave me a chuckle. It read, "Remember! We aren't ripping them off if they don't read the T&C" with word privacy crossed out.


If you look closely, Sublime Text is also in GTA5. It's on one of the screens in Lester's office.


There's also a mission where you go to "LifeInvader" headquarters and kill a character who looks decidedly like Zuck. LifeInvader has many details that make it a great parody of a SV tech company (and the logo even uses the FB font).


I would just name it Java.update() and leave it there. These people are trying too hard. They probably turn off the average geeks (who find it too geeky); and the hard-core geeks just tear them apart with all of the semantic and syntactic errors.


I'm a pretty hard core geek and I thought it was pretty funny.


Yeah, they're not gonna sell any copies if they try too hard with their obscure language parodies on that one street in the game.


You must not understand the GTA series.


I'd heard that there were brutal scenes of torture in GTA V, but I had no idea.


There is one, and it's "brutal" if you have never seen an R-rated movie ...


In the context of a video game the scene has a very different effect than in the context of a movie. The game forces you to graphically torture an innocent man. Because you are selecting which torture methods to use, the player is personally implicated in the torture. I found the scene to be far more emotionally impactful than if I had watched the same scene played out in a movie. It's brutal more for how it makes you feel than for what it depicts.


I believe the simpsons had an internet cafe named The Java Server.


Does it install the Ask.com toolbar?


This reminds me of "Eunux" from GTA IV.

http://gta.wikia.com/Eunux.net


I'm sure it says something about me when I read the title and assumed that GTA stood for Greater Toronto Area. But I was having trouble figuring out what the 'V' stood for.

Now I'm hoping that someone will start up a coffee shop with this name.


There is also a JSP breakfast store in Taiwan http://iwannagothere.com/userfiles/pictures/0005/5397/P10409...


Rockstar's going to get a call from Oracle over use of their trademarks.


The Lifeinvader mission had me rolling around in stitches, really good stuff.


I think that is meant to be return new Sandwich (bread, bacon); !


is it thread-safe ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: