51
5

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

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

52
4
Continuous Feedback (empatheticdeveloper.wordpress.com)

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.

53
5
submitted 10 months ago by mac@programming.dev to c/java@programming.dev
54
2

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

55
5
56
4
57
33
submitted 10 months ago by Blaze@discuss.online to c/java@programming.dev

Link to the thread: https://programming.dev/post/8969747

Hello everyone, I've followed this thread yesterday and noticed a few very negative reactions towards the choice of Java. I follow Java evolution from far away, but it seemed like it was evolving in a good direction since the last few years, and that performance-wise it would make sense for the back-end of a Lemmy-like platform.

Is it indeed the case? I was just curious to see that much negativity towards one of the most popular languages.

58
6

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

The article discusses the key improvements and changes in observability for Spring Boot 3.2, including enhanced tracing options, testing observability, new annotations in Micrometer, and other relevant changes.

59
0

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

Tips for resolving common Java performance problems, including preventing memory leaks, avoiding thread deadlocks, and optimizing garbage collection. Article Added by: LeeS // digma.ai

60
17
submitted 10 months ago by mac@programming.dev to c/java@programming.dev
61
5
62
14
63
27
submitted 10 months ago by agilob@programming.dev to c/java@programming.dev
64
3
submitted 10 months ago by jokro@feddit.de to c/java@programming.dev
65
6

Version 0.5.1 of my IRC Client has been released. This time around it was mostly focussed around bug fixes largely to do with updating the styles. But I also added a couple of features. This was a shorter release from 0.4.0 as the changes weren't as significant.

Profile Handling

I wanted a way to easily manage profiles, especially during development. With this release i've added a Profiles page, which allows you to Create new profiles, clone an existing profile, rename, and delete profiles. You can also set a profile as the default to be used when loading the app.

A majority of the effort went into keeping the Profile Picker (the combobox that changes the active profile) and the profiles page in sync which was done using listeners. New listeners were created for DELETE,CREATE, and CHANGE events as other components needed to add their own listeners to the queue to make sure they were also kept in sync, but also to update styles etc when the profile changes.


public static void fireListeners (EventType eventType)
{
    if(!listenerLists.containsKey(eventType))
        listenerLists.put(eventType, new EventListenerList());

    Object[] listeners = listenerLists.get(eventType).getListenerList();

    // Reverse order
    for (int i = listeners.length - 2; i >= 0; i -= 2)
    {
        if (listeners[i] == ActionListener.class)
        {
            if (actionEvent == null)
            {
                actionEvent = new ActionEvent(listeners, i, null);
            }

            ((ActionListener) listeners[i + 1]).actionPerformed(actionEvent);
        }
    }
}

All of this profile work was also used to centralise the loading and saving of profile information through the URProfileUtil helper class. This should hopefully help down the track.

Profiles Page

Custom Nick Format

This was similarly difficult to when I implemented the custom Date formatting. At least this time around I had an idea of how it might be implemented. However the difference was that I couldn't treat the resultant String as a whole, for example setting the Date format to [HHmm] i'd just return [0652] then insert that into the document, I had to contend with nick styles as well.

In the end I settled with splitting whatever was placed into the Nick format field into three parts (Prefix, nick, Suffix). If you want something just on the right side of the nick, you put nick in the Nick format field, then whatever you want next to that. When placing the nick in the document, I set the attributes according to which part and then use this when updating the styles etc.

Custom Nick format

66
7
submitted 10 months ago by mac@programming.dev to c/java@programming.dev
67
3

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

Explore different Java frameworks such as Java 21, Quarkus, Spring Boot, Maven, JUnit 5, and Testcontainers.

68
6
69
1
Java highlights of 2023 (www.youtube.com)
submitted 11 months ago by abbadon420@lemm.ee to c/java@programming.dev
70
1

Does anyone else ever feel overwhelmed by Spring Boot? With a rich set of options and eco-system libraries on the one hand, and a very opinionated framework on the other, I often spend considerable time deciphering the “Spring Way” of doing things. I’ve got 9 tips to boost your Spring Boot skills!

71
20

Just before Christmas, Spring Boot 3.2.1 is available with 81 bug fixes

72
12
submitted 11 months ago* (last edited 11 months ago) by Matty_r@programming.dev to c/java@programming.dev

Hello all,

I'm here with an update to my IRC Client, now at version 0.4.0 (urChat Github Link). I decided to revive this project a few months ago because there was a few things that I wanted to finish, as well as wanting to get back into Java. All my previous posts are on Reddit (My IRC Client.. 9 years later.).

This version was mostly concerned with customising the colours used for the various styles in the chat windows. The most difficult part was trying to find a balance with the defaults, but also making sure it wasn't a huge pain to try and get the colours and fonts just the way you want them.

My first hurdle, really, was not having a gigantic list of Styles and I wanted something a bit more intuitive. What I landed on was a little preview window where you can right-click on each of the Styles, and customise it from there:

  • Font Preview

Font Preview

The next feature, I wanted to be able to customise the displayed time format. This was particularly challenging because I needed a way to track the date/time of all previous sent messages, update the style which could be shorter or longer than the previous style, then put it all back inline without breaking the other formatting.

  • Custom timestamp format

Custom timestamp format

This is using the Java DateTimeFormatter to display the timestamp.

Another challenge was updating the styles smoothly. (There is a bug at the moment where it's not updating in all of the connected channels). This meant tracking what styles are used throughout your channels, then updating the style in-place. I wanted to make sure that you could customise, say, just the foreground without it also saving the background, because if you change the foreground to yellow on a dark theme it would save the dark background, then subsequently changing the theme would also keep dark background.

  • Changing the urlStyle to yellow

Changing the urlStyle to yellow

  • then changing to a light theme

changing to a dark theme

Obviously, yellow on a light background isn't great. So there is a reset button you can press which will set it back to the defaults.

If you'd like to try it out, there is a jar you can download from the GitHub releases page. Thanks for reading. I've still got a lot of work to do on it, i'm currently working towards the next release which will mostly focus around the usability side of things as well as the usual bug fixes.

73
7
74
3
submitted 1 year ago* (last edited 1 year ago) by pohart@programming.dev to c/java@programming.dev

I was skeptical of gatherers ergonomics based on the jep, but this devoxx talk really makes them seem more approachable.

75
6

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

Collecting important data about your code in dev and test has become trivial, it’s now also getting easier to put that data to use.

view more: ‹ prev next ›

Java

1395 readers
1 users here now

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

founded 1 year ago
MODERATORS