Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemUtil -> ? #774

Closed
quat1024 opened this issue Jul 1, 2019 · 6 comments · Fixed by #930
Closed

SystemUtil -> ? #774

quat1024 opened this issue Jul 1, 2019 · 6 comments · Fixed by #930

Comments

@quat1024
Copy link
Contributor

quat1024 commented Jul 1, 2019

SystemUtil contains a bunch of static methods. Some of them relate to a "system":

  • fine-grained timers
  • current operating system
  • JVM flags

But many others are completely unrelated:

  • patching miscellaneous holes in the Java standard library (ifPresentOrElse, thenCombine, completeExceptionally, consume, get, toMap, ...)
  • a bit about the server worker
  • reading and writing UUIDs from Dynamics
  • an identity hash strategy
  • something about translation keys? lol

It appears to be less of a system-related class and more just a dumping ground for random functions that are too small to break into their own named helper class but too broadly applicable to keep near one call site.

Should this class be renamed?

Some suggestions being thrown around on Discord:

  • Misc
  • Util
  • Useful
  • Varia
  • Helper
  • Etc
  • Funny comedy suggesions:
    • Junk
    • Stuff
    • MiscellaneousGameSystemUtilities
    • BucketOShi
@kashike
Copy link
Contributor

kashike commented Jul 1, 2019

Util gets my vote. Simple and to the point.

@valoeghese
Copy link
Contributor

Name it ClassThatWeHaveNoIdeaWhatToNamePleaseHelp

@Prospector
Copy link
Contributor

I'd go with MinecraftUtil personally but also kashike is god so Util 👍

@Sollace
Copy link
Contributor

Sollace commented Jul 1, 2019

Util is good, however it does seem like the majority of the functions are system related. System also doesn't necessarily have to mean just the Operating System. Patching Std lib functions, Uuid serialization, and anything with hashing sounds to me as something that technically qualifies as "system utilities". Not the OS system, but the Java system, they're just so low level. Just Sys would work.

There are also other naming strageties I've used such as Objects/Strings/Collections/etc...

@asiekierka
Copy link
Contributor

Generally, kashike has a lot of wisdom here, so I'd go with Util.

@liach
Copy link
Contributor

liach commented Oct 9, 2019

I personally support Misc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants