26
19

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!

27
4

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.

28
8
Bootstrap Themed Maven Site (stevecrox.github.io)
submitted 4 months ago by stevecrox@kbin.run to c/java@programming.dev

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.

29
-33

For the past 14 years, the only time I really did any work with Java was a course in college. I don't like Java because it's corporate shit. Yeah Guy Steele and dozens of other giants whom I admire and suck cock off on a good day are the spec writers, and the original creators. But remember that it was initially a corporate language, and for this reason, it has ALWAYS been a darling to corporations. It is completely void of joy to do a libre project in Java. I know OpenJDK and several FLOSS implementations Java and JVM exist, for example Cocoa which is crated using Vmgen which I am currently using for an implementation of AWK. In fact I use OpenJDK myself as my primary Java implementation. But why is it that every pissant company has its own Java implementation (like IBM's Jikes, and I have always promised myself not to touch anything IBM touches because it would be 'unclean' then, IBM being source of everything that is dirty in the world


no BIOS does not count).

Plus shit like Maven and Gradle leave nothing to the imagination. Java toolchain is just 'eat shit and code, monkey!'. I am so glad I live faraway from the corporate world ,and the stench of Java.

30
15
31
3

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

32
5

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

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

33
5
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.

34
5
submitted 5 months ago by mac@programming.dev to c/java@programming.dev
35
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

36
5
37
4
38
9
submitted 5 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.

39
3

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.

40
2

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

41
2
submitted 5 months ago by mac@programming.dev to c/java@programming.dev
42
3
43
3
44
3
45
2
submitted 6 months ago by jokro@feddit.de to c/java@programming.dev
46
2

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

47
2
submitted 6 months ago by mac@programming.dev to c/java@programming.dev
48
2

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

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

49
3
50
1
Java highlights of 2023 (www.youtube.com)
submitted 6 months ago by abbadon420@lemm.ee to c/java@programming.dev
view more: ‹ prev next ›

Java

1218 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