• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle


  • To avoid a type conversion that might not be expected. Integer math in Java differs from floating point math.

    Math.floor(10.6) / Math.floor(4.6) = 2.5 (double)

    If floor returned a long, then

    Math.floor(10.6) / Math.floor(4.6) = 2 (long)

    If your entire code section is working with doubles, you might not like finding Math.floor() unexpectedly creating a condition for integer division and messing up your calculation. (Have fun debugging this if you’re not actively aware of this behavior).


  • You don’t have to use inheritance with Java. In fact, in most cases it’s better that you don’t. Practically all of the Java standard library doesn’t require the use of inheritance, same with most modern libraries.

    On the contrary, I think inheritance is a very natural way to think. However, that doesn’t translate into readable and easy to maintain code in the vast majority of the cases.

    I am not sure what you mean by how it’s stored or manipulated on a computer. A garbage collected language like Java manages the memory for you. It doesn’t really care if your code is using inheritance or not. And unless you’re trying to squeeze the last drops of performance out of your code, the memory layout shouldn’t be on your mind.



  • How do you know anyone is a verified adult? A 17 year old can look like a 22 year old. Should we ban all porn unless its of verified adults? Should one need a license to use their body in pornography?

    Do you verify everyone to be of age in all pornographic material you consume? Unless you do, there is a decent chance you’ve unknowingly seen pornographic content involving someone just not quite of age.

    To answer your question more directly, pornography companies where images usually originate obviously don’t hire underage actors. Sites for posting/selling self pornography also require documents, but that’s pretty prone to forgery.

    When it comes to self posting on social media, all bets are off. Someone not quite of age can post pornography of themselves on twitter or reddit or they can even post it on self hosted blog.

    So you have 2 solutions: Ban all pornography of people who would be asked for a driver’s license when they are buying alcohol. So probably like 30+ years of age. Requires a government license to post pornography of self, which would also require disclosing your legal name and other identifiable information when posting pornography.

    Or we can continue being pragmatic and use our best judgement while understanding that our perception can’t tell who is 17 years and 363 days old and who just turned 18.