Java

1363 readers
4 users here now

For discussing Java, the JVM, languages that run on the JVM, and other related technologies.

founded 1 year ago
MODERATORS
26
27
28
29
30
31
 
 

In this blog post, we will explore how to detect and prevent these anti-patterns using pair programming, code reviews, and observability.

32
33
 
 

cross-posted from: https://programming.dev/post/11703178

In this article, we’ll examine cache misses and, in general, learn about the caching concept and how to implement it in Spring Boot.

34
35
 
 

“An issue introduced by macOS 14.4, which causes Java process to terminate unexpectedly, is affecting all Java versions from Java 8 to the early access builds of JDK 22. There is no workaround available, and since there is no easy way to revert a macOS update, affected users might be unable to return to a stable configuration unless they have a complete backup of their systems prior to the OS update.”

36
37
38
39
5
Async File IO (concurrencydeepdives.com)
submitted 7 months ago by [email protected] to c/[email protected]
40
 
 

Let's write a GitHub Crawler and let's throw in everything Java (21) has to offer:

virtual threads and structured concurrency,
pattern matching and data-oriented programming,
type inference, records, and sealed types,
text blocks and template strings,
a modern HTTP client and improved collections,
modules and OS-specific binaries.

The end result will look very different from just a few years ago, let alone 10. This is not your dad's Java!

41
 
 

cross-posted from: https://programming.dev/post/10707322

cross-posted from: https://programming.dev/post/10707319

In this article, we want to share our experience with fellow developers and offer insights using real-life examples on how to identify and optimize slow SQL queries, especially when working with relational database management systems like PostgreSQL, MySQL, MSSQL, Oracle, etc.

42
 
 

I find Maven sites look incredibly dated and I couldn't find a nice way to integrate other auto documentation tools such as MKDocs.

So I've written a series of Apache Velocity templates which integrate Bootstrap, I've tried to respect Bootstrap components and the layout/structure of Apache projects (you'll find various configurations under 'layouts').

You can apply various bootstrap themes to it to improve it dramatically.

43
44
 
 

Things you can do right now to learn new and valuable things that can improve your code.

45
 
 

cross-posted from: https://programming.dev/post/9846201

Project CRaC, Correlation IDs, SSL Bundle Reloading and more.

46
4
Continuous Feedback (empatheticdeveloper.wordpress.com)
submitted 9 months ago by [email protected] to c/[email protected]
 
 

cross-posted from: https://programming.dev/post/9578171

Fixing performance problems can be tricky. I joined a new team last spring, and my first assignment was to investigate and fix some performance problems they were having. The post discusses the experience of fixing performance problems.

47
48
 
 

Hey all,

Another update/release of urChat (Java IRC Client). This release had a lot of focus on general usability and backend cleaning up. Performance for updating the styles has been improved and i've also moved some of the major panels into their own classes to make it easier to add more options/panels at a future date. In doing this, there is less effort needed when adding more options as the this is all handled when using addToPanel() method:

For Instance, i've added an option to toggle the tab icons, after creating the new JCheckBox showTabIcons, all that's needed to have it save to the preferences correctly is:

URPanels.addToPanel(this, showTabIcons, null, Placement.DEFAULT, null, Constants.KEY_SHOW_TAB_ICON);

This adds it to the current JPanel (In this case the InterfacePanel), places it after the previous Component and then associates that with the KEY_SHOW_TAB_ICON Preference key. Much easier than before.

Support for HTTP proxies has also been added, so we've now got both SOCKS and HTTP proxies as an option. There is now better disconnection handling, it will automatically reconnect if it disconnects unexpectedly (after some time), and it will also rejoin all of the previously connected channels.

I've also added in LOG4J2 for logging. At the moment there is a log4j2.xml config file included in the release JAR, but eventually i'll allow custom config files. I'm not 100% sure how I feel about it yet as it increased my release JAR file size from 247 KB to 2.47 MB which is quite a significant jump.

Anyway, thanks everybody for your support and interest. Feel free to join the #urchat channel at irc.libera.chat to discuss improvements etc. :) Onwards and upwards to version 0.7.0!

GitHub Link

49
50
view more: ‹ prev next ›