Live data from Hacker News

Minecraft removing obfuscation in Java Edition

minecraft.net

311–320 of 478 posts

Re: Minecraft removing obfuscation in Java Edition

#311

Earlier quoted context omitted.

I am currently being radicalised against OOP because of one specific senior in my team that uses it relentlessly, no matter the problem domain. I recognise there are problems where OOP is a good abstraction, but there are so many places where it isn't. I suspect many OOP haters have experienced what I'm currently experiencing, stateful objects for handing calculations that should be stateless, a confusing bag of meth…

Separation of data and algorithm is so useful. I can't really comment on how your senior is doing it, but in the area of numeric calculations, making numbers know anything about their calcs is a Bad Idea. Even associations with their units or other metadata should be loose. Functional programming provides such a useful intellectual toolkit even if you program in Java. Sorry to learn, hope you don't get scar tissue fr…

Not sure how many people are writing programs with lots of numeric calculations.

Most programs in my experience are about manipulating records: retrieve something from a database, manipulate it a bit (change values), update it back.

Over here OOP do a good job - you create the data structures that you need to manipulate, but create the exact interface to effect the changes in a way that respect the domain rules.

I do get that this isn't every domain out there and _no size fits all_, but I don't get the OP complaints.

I currently think that most of the anger about OOP is either related to bad practices (overusing) or to lack of knowledge from newcomers. OOP is a tool like any other and can be used wrong.

Re: Minecraft removing obfuscation in Java Edition

#312
post #137

Earlier quoted context omitted.

First time I have heard of object-oriented obfuscation. I get it, but in general I don't get the OO hate. It's all about the problem domain imo. I can't imagine building something like a graphics framework without some subtyping. Unfortunately, people often use crap examples for OO. The worst is probably employee, where employee and contractor are subtypes of worker, or some other chicanery like that. Of course in th…

It’s all about the data model and the architecture. I think people focus a lot on inheritance but the core idea of OO is more the grouping of values and functions. Conceptually, you think about how methods transforms the data you are manipulating and that’s a useful way to think about programs. This complexity doesn’t really disappear when you leave OO language actually. The way most complex Ocaml programs are struct…

> grouping of values and functions

Encapsulation.

Which I think is misunderstood a lot, both by practitioners and critics.

Re: Minecraft removing obfuscation in Java Edition

#313
post #116
post #75

Earlier quoted context omitted.

The sounds maybe, but the music? If there's one game whose music I always turn off instantly it's Minecraft. Touhou Youyoumu Minecraft ain't.

I like Minecraft’s music. If there was a way to have it not play when the game is paused or on the title screen, I would probably keep it on.

A quick search nets this: https://modrinth.com/mod/pause-music-on-pause

Re: Minecraft removing obfuscation in Java Edition

#314
post #259
post #226

Earlier quoted context omitted.

It's very useful in C++, funnily enough. This is because I can have a non-templated interface base class, then a templated impl class. Then my templated impl header can be very heavy without killing my build times since only the interface base class is #included. Not sure if this is as common in Java.

Java uses type erasure which are very cheap in compile time but you cannot do things like t = new T(); // T is a template parameter class C++ uses reified generics which are heavy on compile time but allows the above.

That's why they're called generic parameters, not template parameters; the code is generic over all possible parameters, not templated for every possible parameter.

Re: Minecraft removing obfuscation in Java Edition

#315

Earlier quoted context omitted.

>You cannot have quality software without these basic testing techniques Of course you can, wtf? Mock are often the reason of tests being green and app not working :)

> Of course you can, wtf? Explain then what is your alternative to unit and integration tests. > Mock are often the reason of tests being green and app not working :) I don't think that's a valid assumption. Tests just verify the system under test, and test doubles are there only to provide inputs in a way that isolates your system under test. If your tests either leave out invariants that are behind bugs and regress…

It's not necessary to have mocks for unit tests. They can be a useful tool, but they aren't required.

I am fine with having fake implementations and so forth, but the whole "when function X is called with Y arguments, return Z" thing is bad. It leads to very tight coupling of the test code with the implementation, and often means the tests are only testing against the engineer's understanding of what's happening - which is the same thing they coded against in the first place. I've seen GP's example of tests being green but the code not working correctly a number of times because of that.

Re: Minecraft removing obfuscation in Java Edition

#316
post #137

Earlier quoted context omitted.

First time I have heard of object-oriented obfuscation. I get it, but in general I don't get the OO hate. It's all about the problem domain imo. I can't imagine building something like a graphics framework without some subtyping. Unfortunately, people often use crap examples for OO. The worst is probably employee, where employee and contractor are subtypes of worker, or some other chicanery like that. Of course in th…

If everyone does it wrong, then that alone means it itself is wrong.

Everyone? Really, that's your take? Most code out there is OOP and I find it hard to believe that everything is wrong.

Re: Minecraft removing obfuscation in Java Edition

#317

> But we encourage people to get creative both in Minecraft and with Minecraft – so in 2019 we tried to make this tedious process a little easier by releasing “obfuscation mappings”. These mappings were essentially a long list that allowed people to match the obfuscated terms to un-obfuscated terms. This alleviated the issue a little, as modders didn’t need to puzzle out what everything did, or what it should be call…

If my memory serves, the stated justification for not going open source was copyright and trademark protection. Apparently, that is no longer a concern, if it ever really was. Now I'm bracing for them to drop support for Java Edition entirely and go strictly Bedrock in a couple of years. Perhaps Minecraft 2.0 is finally nearing release.

Actually, there was technically a Minecraft 2.0 release, but it was an april fools prank in 2013.

Relevant wiki link: https://minecraft.wiki/w/Java_Edition_2.0

Re: Minecraft removing obfuscation in Java Edition

#318
post #137

Earlier quoted context omitted.

First time I have heard of object-oriented obfuscation. I get it, but in general I don't get the OO hate. It's all about the problem domain imo. I can't imagine building something like a graphics framework without some subtyping. Unfortunately, people often use crap examples for OO. The worst is probably employee, where employee and contractor are subtypes of worker, or some other chicanery like that. Of course in th…

If everyone does it wrong, then that alone means it itself is wrong.

Indeed. "The purpose of a system is what it does."

Re: Minecraft removing obfuscation in Java Edition

#319
post #261

Earlier quoted context omitted.

For me, it's the fact that the mess of DAOs and Factories that constituted "enterprise" Java in the 00s was a special kind of hellscape that was actively encouraged by the design of the language. Most code bases don't need dynamically loaded objects designed with interfaces that can be swapped out. In fact, that functionality is nearly never useful. But that's how most people wrote Java code. It was terrible and taug…

As someone coding since 1986 it is always kind of interesting how Java gets the hate for something that it never started, and was already common in the industry even before Oak became an idea. To the point that there are people that will assert the GoF book, published before Java was invented, actually contains Java in it.

It is probably because Java took this design philosophy (or I should say dogma) to heart as its very syntax and structure encourages to write code like that. One example: It does not have proper modules. Modules, the one thing that most people can agree upon that are a good thing, enabling modularity, literally. Another one: You cannot have simply a function in a module. Shit needs to be inside classes or mixed up with other unrelated concepts. Java the language encourages this kind of madness.

Re: Minecraft removing obfuscation in Java Edition

#320

Earlier quoted context omitted.

But the whole point is there are no more mappings. I’m not sure what the trap is supposed to be?

Your mod uses variable name FooBar in ways Microsoft don't like, Microsoft sues you for copyright before the judge would have to admit it was just coincident.

Wouldn’t the structure of the code be be more copyrightable than the names?
Post reply on HN