ByteCode.News
Submit RSS Atom Podcast Sign in

Back to the channels

#java

  1. enoq trying to step through spring security and its abysmal docs again, looks like the blogosphere has been completely taken over by AI crap
  2. enoq I'm trying to figure out if adding your custom AuthenticationProvider with @Component injects it into all security filter chains which I don't want
  3. enoq at least looking at ProviderManager it seems like it should inject a list of providers from the global scope
  4. hassoon meh
  5. enoq that coupled with the decline of SO is kinda bad
  6. hassoon SO ?
  7. nimaje stackoverflow.com
  8. hassoon ah
  9. hassoon al lthe blame on the damn AI
  10. hassoon all the *
  11. hassoon SO is still useful though, to some extent
  12. hassoon i think a google search now is more useful than a SO, because it generates an AI response for you from SO and other sources combined
  13. deebo brewing a cup of tea and reading the tea leaves is more useful than google
  14. jreicher I've actually found gemini summaries quite useful because they provide sources. Most of the time I click on those.
  15. deebo they're usually ok, just have to verify everything
  16. hassoon deebo: good.. idea
  17. hassoon i only use deepseek when i try to toy with AI
  18. hassoon or try to brainstorm something
  19. jreicher deebo: but that's acceptable, no? I wouldn't expect AI to be much better than a junior RA.
  20. deebo well it's the best available since google itself is complete ass now
  21. deebo tried using duck duck go for some time, but they were really bad with local language synonyms etc, so it was impossible to find what i wanted
  22. deebo google is good at that, but then pushes ad based results or seo bullshit
  23. jreicher deebo: while I'm not interested in defending google, if you describe it as "ass" that implies something better? What would that be?
  24. deebo i don't think there really is, which is the sad part
  25. jreicher My hope is that AI will kill SEO.
  26. dreamreal It's just going to change it
  27. jreicher I agree, but I don't think there's any "just" aboutit.
  28. dreamreal well, there never was, SEO was always a moving target
  29. jreicher I've always thought it was a fool's errand.
  30. dreamreal I've never been able to do it well, myself.
  31. jreicher And the nice thing about that - if I'm right - is that it becomes really easy to identify the fools.
  32. dreamreal I read stuff that I wrote that's had SEO applied and it's... just.. kinda gross
  33. dreamreal As an author you have to decide what's more important: rent or your precious words
  34. jreicher dreamreal: just make up some shit about Miley Cyrus.
  35. deebo need coding articles written like recipe articles
  36. dreamreal Will pass on that, know very little about her
  37. deebo i still remember the darkening days and my grand mothers stories about virtual threads around the fireplace
  38. dreamreal I've been actually happy with the stuff I've been writing lately, although I don't know that there's a lot of new ground I can cover on the topics
  39. deebo every morning i take my coffee in my office at my desk and open hackernews and realize it's just AI news now
  40. LaSombra Such is life nowadays
  41. dreamreal News FROM AI or ABOUT AI?
  42. deebo probably both
  43. dreamreal There's certainly some aspect of that, but HN tends to downvote anything AI-related reflexively
  44. deebo it's like articles about the latest shovels and peoples comparing shovels to previous models, but then never digging any holes
  45. dreamreal I posted a human-written article and the AI summary of the article to show teh difference and teh summary got flagged as AI
  46. dreamreal just imagine: an AI summary, prefixed with "this is the AI summary of the article," got flagged as AI!
  47. LaSombra Can never be too sure :)
  48. jreicher deebo: I have a paid subscription to a paper newspaper that is delivered to my house daily, and I pick up the free local newspaper weekly (again, paper).
  49. dreamreal well, whn it's attributed directly to an AI it's probably a safe bet
  50. ne555 good morning, `list.stream().map(x -> x.get()).filter(x -> Objects.nonNull(x)).forEach(x -> { ... })`, say that `list` holds `WeakReference`, ¿is that map-filter correct or may bite me later?
  51. dreamreal does it work
  52. nimaje what problems are you expecting there?
  53. fizzie On a completely unrelated note, isn't the whole point of Objects.nonNull that you can use it to write just `.filter(Objects::nonNull)` instead of a lambda?
  54. cheeser fizzie: the whole point? probably not, but you can do that, yes.
  55. fizzie Can't really think why you'd write `Objects.nonNull(x)` over `x != null` if not using it for a method reference. Well, I guess you could be allergic to punctuation.
  56. fizzie (The JavaDoc does mention that "This method exists to be used as a Predicate, filter(Objects::nonNull)".)
  57. dreamreal $work uses it as a simple validation all the time since it's a method call instead of a statement.
  58. dreamreal So if you can't think of why, well, I get it, but that's a limited imagination.
  59. dgregory I think it's fine - the `.get()` converts the `WeakReference` to a strong reference or null, and `nonNull` ensures that the `forEach` only runs if the `WeakReference` wasn't already cleared
  60. Para It produces an NPE with better trace as it nowadays includes the symbol name. Or so I've told.
  61. Para I have never bothered to actually check :P
  62. fizzie It doesn't throw an NPE.
  63. Para Well AssertionError or whatever :D I'm just doing the motions.
  64. fizzie It doesn't throw anything.
  65. fizzie Objects.requireNonNull would, and I have no beef with that.
  66. cheeser requireNotNull() throws.
  67. Para well that.
  68. fizzie `Objects.nonNull(x)` just returns the boolean value of `x != null`.
  69. fizzie I'm a little curious about what sort of context requires (or at least prefers) a method call rather than a different kind of expression.
  70. Para I guess it prevents people from flipping the args and having stupid errors that way but ehhhh.
  71. waz important issue of the day!
  72. cheeser i can see people putting in to a list of validations. that's honestly not far off from how a predicate would be used in many ways but not entirely.
  73. fizzie I admit I've written `x != null` where I actually (atypically) meant `x == null`, I guess it might have been harder to accidentally mix up `Objects.nonNull(x)` and `Objects.isNull(x)`.
  74. jbosmans i still always write .filter(o -> o != null)
  75. jbosmans and very often same for other method refs
  76. jbosmans subjective an opinion as ever
  77. dreamreal not sure it matters if it works
  78. dmlloyd if you use Objects::isNull instead of o -> o != null, it theoretically could create fewer lambda instances