51
3

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!

52
19

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

53
10
submitted 6 months ago* (last edited 6 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.

54
7
submitted 7 months ago by mac@programming.dev to c/java@programming.dev
55
3
submitted 7 months ago* (last edited 7 months 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.

56
7

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.

57
6
58
21
59
12
60
5

This proposal aims to as the name implies bring more structure to concurrent programming. This will be done by treating related tasks that are running in different threads as a single unit. Thus making it easier for us to manage the state, and also keep an eye on what’s happening.

Note: we won’t be diving into the synchronized keyword, or the Lock interfaces which offer additional capabilities compared to synchronized. But they’re certainly also worth looking into, but which flavour of lock fits best depends on your thread safety & performance requirements.

61
21
62
15
63
1

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

I came across this semi-randomly by using Search Marginalia to find information on functional programming courses.

I also very much enjoyed the two articles referenced in the footnotes.

64
2
65
1
66
1
submitted 7 months ago* (last edited 7 months ago) by LadyLeeLoosh@programming.dev to c/java@programming.dev

In this blog, I’ll outline why learning and mastering Spring Boot in 2023 is a worthwhile endeavor, even though there may be a few differing opinions. I’ll also explore how Spring Boot compares to other backend technologies and alternative Java frameworks.

67
1

Will Amper kill Maven and Gradle?

68
1
69
1
70
1

Tests can run assertions on your code but also reveal important insights about how your application really works.

Automated testing will assuredly go down in the annals of software development history as one of these industry-changing trends. Although few actually fully adhere to TDD discipline (I am in awe of those that do, just to be clear), most developers make sure to prioritize and include testing in their dev cycle. It took some time, but once the benefits of tests finally sunk into the collective developer psyche, tests successfully evolved from a chore, an inevitable victim of procrastination, to an important area of investment in your personal dev cycle.

Deceptively, the phrase ‘automated testing’ includes a wide gamut of testing techniques and methodologies. From unit tests, often just an echo of your coding assumptions, to integration tests, user-acceptable end-to-end testing, load testing, and more. In fact, early on developers were plagued by hard questions with no definitive answers around exactly that topic: ‘how much’ and ‘what’ exactly should be tested. How do you know you’ve tested enough?

71
1
submitted 8 months ago* (last edited 8 months ago) by LadyLeeLoosh@programming.dev to c/java@programming.dev

An easy non-obtrusive way to collect data about your dockerized app without changing your existing docker-compose.yml or docker files.

72
1
73
1
74
1
75
1
submitted 8 months ago* (last edited 8 months ago) by lysdexic@programming.dev to c/java@programming.dev

Saved you a click:

  • JaCoCo for test coverage,
  • PMD for static code analysis
  • SpotBugs (successor of FindBugs) for linting and enforce coding style/best practices,
  • japicmp to check semantic versioning
  • codecov and checkstyle.
view more: ‹ prev next ›

Java

1218 readers
3 users here now

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

founded 1 year ago
MODERATORS