ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. Para kcomhnall: I've noticed that structure-by-layers is kind of a brainjam for people who are used to it, and it takes quite a bit of effort to realize that for example the entire database functionality is a feature in itself. So yeah, been stuck with that myself. And it's kinda hard at times.
  2. [twisti] damn, a bug in jackson i reported in 2021 was fixed today, thats crazy
  3. [twisti] actually arguably a bug in the jdk, but i never reported it there, because back then i didnt have the confidence and it is kind of arguable whether it is a bug - `File.listRoots()` is crazy expensive if you use it on a windows system that has network mounts/mappings that are failing - like when you map `\\server\whatevershare` to `X:` and the server is down, the method call takes 10-20 seconds instead of <0.0001s - for EACH failing mount
  4. [twisti] i had 15 mounts at work, same server which was down, so something that used to be instant suddenly took two minutes
  5. Para Windows and network drive slowness has always been a feature.
  6. Para Back in school when we had a course on setting up Windows domains our instructions specifically had marked expected wait times for certain operations :)
  7. Para "The screen won't show anything for about six minutes, just wait" and stuff like that.
  8. [twisti] absolutely, but its crazy that there is no warning in the javadocs nor any way to do that async - and there isnt even any internal caching, so if you call it on two files, thatll be 4 minutes of waiting
  9. [twisti] (we had about 30,000 files at the time)
  10. [twisti] still, i could see someone arguing 'working as intended' and hence didnt bring it up back then
  11. dreamreal Jackson was scanning filesystems?
  12. dreamreal And jackson working as intended (or the JDK working as intended) may have been a thing, but that doesn't mean the intention isn't broken somehow! You shoulda filed the bug - and I mean that to encourage, not say "you dummy, you failed" or anything like that.
  13. [twisti] these days i probably would. jackson did a (shockingly poorly) checking of whether you were on a windows file system by doing File.listRoots (for every deserialized Path) and checking if any of the roots returned looked like `[a-z]:.*`, basically
  14. Para eww
  15. [twisti] i went to see how other people did it, so i looked at commons lang and lol
  16. [twisti] its basically just System.getProperty("os.name").startsWith("Windows")
  17. Para Yeah someone didn't read the docs.
  18. MikeBux and probably that check would have made trouble once the filenames contained spaces or other non a-z letters
  19. [twisti] Para: where in the docs is the problematic aspect mentioned ?
  20. [twisti] MikeBux: nah, the check is fine, jackson has been around for a while actually. other than my issue there seems to be no problem with it
  21. Para [twisti]: No, my point is that if you don't read what's in the system properties before going to "I'll just iterate all the filesystems" you might be consuming too much coffee and/or not getting enough fresh air :)
  22. [twisti] oh, yeah, although i would be wary of just trusting system properties, especially after a career of seeing people copy and paste settings and parameters with literally zero brain power investment
  23. Para That's the kind of hogwash that's ruined most of frontend design.
  24. Para "But what if the user is an idiot?"
  25. APic You cannot make something idiotproof because of the great Geniality of Idiots 😌
  26. [twisti] thats probably true
  27. nimaje everytime you come up with an idiotproof design, the universe invents better idiots
  28. Para The overlap between smartest bear and dumber tourist is considerable, or whatever the park ranger quote was when they were discussing about how to design bear proof trash cans for people to use.
  29. Para dumbest, of course. Although dumberer probably applies, as you pointed out.
  30. [twisti] 'there is a considerable overlap between the smartest bears and the dumbest tourists', i believe
  31. Para Just an eternity of dumbererererer.
  32. Para But then again, people read "don't use Unsafe" and still used it so dunno what's the dumb here.
  33. Para I mean, I literally once read while studying that I shouldn't use it (or any other sun.* classes) and wen't "Okay" and literally never used them.
  34. Para I've long ago learned that me reading instructions is not normal average behavior though :P