-
Notifications
You must be signed in to change notification settings - Fork 14
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
why obfuscated? #3
Comments
Hi Dan, In short, the reason for the shortened syntax is for file size, performance, and consistency across all languages. To quote the question and answer from the FAQ:
So while this appears to be a bit of an annoyance at first, the overall end result of UnitOf is really what took priority. In order to make the code easier to understand I made sure to include as much detailed documentation, comments, and examples in the code as possible. This making the code easier to understand, search, and navigate even if the syntax wasn't shortened. For the most part, the structure of each measurement is consistent throughout the entirety of UnitOf. Other than "UnitOf.java", "A.java", and "B.java" each class is a single measurement of conversion factors. While the unit conversion factor keys are the abbreviations, each one is accompanied by a comment of what the full unit name is. One way to find the proper super class of your desired measurement is to start with UnitOf.java > searching for your desired measurement finding the inner class declaration > observing the extended class being passed in as a generic type. I hope that answered your question/concern and thank you for checking out UnitOf. If you have any other questions or even suggestions I would love to hear them. Thank you |
Hey thanks for the detailed reply Adam - I see where you're coming from and appreciate the detailed response. I only care about the java solution, in which I'd argue its optimization paths are very different than javscript (where download and interpretation speed really do matter), and I've never seen java source code obfuscated, but if it's works for you, then 👍 . |
Hey Dan, Thank you for understanding! |
I'm not a javascript dev, so excuse me if I'm wrong, but, that's why minify tool exist. The source code of a library should never look like that. That's the job of the final dev to apply good minify tool on is code to optimise it. |
You could use Proguard (or potentially other minification tools) to apply minification at compilation time, you don't need to (and in fact: shouldn't) obfuscate the API of a library. 🙄
Technically if your classes are named However, I went through it and fixed that in an hour, so that's a plus. Of course, I didn't modify any behavior. |
I wanted to inspect and validate one of the conversion functions, but noticed at least the java implementation is obfuscated. It's definitely unhelpful for me, and it seems odd to do this for an open source project. Maybe consider not doing that unless there's a good reason.
The text was updated successfully, but these errors were encountered: