Best of JavaDecember 2024

  1. 1
    Article
    Avatar of yegor256Yegor's Blog·1y

    Advice for First-Time Open Source Contributors

    Contributing to open source projects can be challenging, especially for first-timers. Key advice includes studying existing files to match the repository's style, submitting issues instead of asking questions, making small changes, picking easy problems, writing necessary tests, maintaining a human profile, thoroughly explaining changes, aiming for quality, and being polite and persistent. Following these tips can help ensure a smoother and more successful contribution process.

  2. 2
    Article
    Avatar of communityCommunity Picks·1y

    akullpp/awesome-java: A curated list of awesome frameworks, libraries and software for the Java programming language.

    This post provides a comprehensive list of Java frameworks, libraries, and software that supports various functions like architecture, build tools, caching, CLI parsing, code analysis, and more. It includes resources for development, distributed applications, machine learning, microservices, high-performance computing, HTTP clients, and database interactions. Each category presents multiple tools and libraries to help simplify and improve Java development productivity.

  3. 3
    Article
    Avatar of bytebytegoByteByteGo·1y

    EP143: DNS Record Types You Should Know

    This post covers essential DNS record types such as A, CNAME, AAAA, PTR, MX, NS, SRV, and TXT records. It further explains the concepts of polling vs. webhooks, differentiates API from SDK, discusses Netflix's use of Java in their microservices architecture, and provides a guide on Big O notation for writing efficient algorithms. A comprehensive Kubernetes command cheatsheet is also featured.

  4. 4
    Video
    Avatar of continuousdeliveryContinuous Delivery·1y

    What TDD Looks Like In A REAL PROJECT (With Code Examples)

    Test-driven development (TDD) is often seen as tricky to implement in real-world projects. The post discusses the advantages of TDD, such as encouraging simpler and more testable code designs, and provides a practical example from an open-source project. It highlights the differences between teaching TDD using simple exercises and applying it to complex, real-world scenarios. The post also covers the use of internal DSLs for acceptance testing and demonstrates some coding practices for effective TDD.

  5. 5
    Article
    Avatar of watercoolerWatercooler·1y

    Imposter ඞ

  6. 6
    Article
    Avatar of java_libhuntAwesome Java Newsletter·1y

    Top 10 IntelliJ IDEA Plugins to Boost Development Efficiency in 2024

    IntelliJ IDEA developers can boost their efficiency using specific plugins designed for various tasks. Key plugins include Apidog Fast Request for API debugging, JetBrains AI Assistant for intelligent code assistance, Lombok for reducing boilerplate code, SonarLint for code quality assurance, Save Actions for automating file save tasks, Key Promoter X for learning keyboard shortcuts, CodeGlance for quick code navigation, Rainbow Brackets for enhanced readability with colored brackets, Translation for real-time code translation, and JRebel for efficient hot deployment.

  7. 7
    Article
    Avatar of baeldungBaeldung·1y

    Exploring Advanced JVM Options

    The Java Virtual Machine (JVM) offers a range of advanced options to fine-tune its performance, manage memory, and conduct diagnostics. These options include configurations for garbage collection, memory management, Just-in-Time (JIT) compilation, and debugging. Developers can achieve optimal application performance by understanding and appropriately using these advanced settings, while also considering potential changes in future JVM versions.

  8. 8
    Article
    Avatar of java_libhuntAwesome Java Newsletter·1y

    Quick and Easy: How to Test RESTful APIs in Java

    Testing RESTful APIs is crucial for backend development but switching between IDEs and tools like Postman can reduce efficiency. The Apidog Fast Request plugin for IntelliJ IDEA simplifies this process by enabling API testing directly within the development environment. It supports Java and Kotlin projects, automatically generates API documentation, and syncs endpoint info for team collaboration. Install it from IntelliJ's plugin marketplace for streamlined testing with a single click.

  9. 9
    Article
    Avatar of foojayioFoojay.io·1y

    Run a Java Lambda Function From a Docker image

    Learn how to package and deploy a Java Serverless function using Docker and AWS's new container support. The guide includes step-by-step instructions for setting up a Maven project, creating a Docker image, configuring AWS infrastructure (ECR, IAM roles, policies), and deploying the Lambda function. It also covers both local and remote testing of the deployed function.

  10. 10
    Article
    Avatar of colkgirlCode Like A Girl·1y

    Java 8 Optional Class

    Java 8 introduced the Optional class to handle null values gracefully, reducing NullPointerException occurrences. It allows developers to write more expressive and clean code using methods like map() and ifPresent(). Optional should be used when the absence of a value makes sense, but avoided in collections or performance-critical code.

  11. 11
    Article
    Avatar of inside_javaInside Java·1y

    The Foreign Function and Memory API

    The Foreign Function and Memory (FFM) API enables Java applications to invoke code outside the JVM and access memory not managed by the JVM. It provides safer and more efficient alternatives to JNI. Learn to access off-heap memory with MemorySegment, call C library functions, handle native data types, and troubleshoot foreign function calls. Use jextract to generate Java bindings for native libraries.

  12. 12
    Article
    Avatar of java_libhuntAwesome Java Newsletter·1y

    Boundary Check vs Try-Catch

    The post compares the performance of two coding approaches: boundary check and try-catch, with code benchmarks. The boundary check approach outperforms try-catch by 22.6% due to the JVM's optimization capabilities and the overhead associated with exception handling. Key factors influencing the results include explicit conditional checks and runtime overhead of exceptions.

  13. 13
    Article
    Avatar of javarevisitedJavarevisited·1y

    5 Best Udemy Courses to Learn Java in 2025

    This post highlights the top five Udemy courses to learn Java in 2025, chosen for their comprehensive content, up-to-date information, and hands-on learning approach. Each course is designed by experienced instructors and covers key Java concepts, including core Java, multithreading, Spring Boot, and more. Recommendations are based on years of experience as a Java developer and educator, providing links to join each course.

  14. 14
    Article
    Avatar of baeldungBaeldung·1y

    Mocking Private Fields With Mockito

    Learn how to mock private fields using Mockito in this tutorial. Although Mockito doesn't inherently support it, different approaches such as using Java Reflection API or JUnit 5's ReflectionUtils can achieve this goal. Examples are provided to demonstrate how to set values for private fields and test their methods.

  15. 15
    Article
    Avatar of baeldungBaeldung·1y

    Dynamic Spring Data JPA Repository Query With Arbitrary AND Clauses

    This tutorial explores three approaches to creating dynamic queries in Spring Data JPA repositories: Query by Example, Query by Specification, and QueryDSL. The post provides a detailed setup for each method, including code examples for entity classes, repository definitions, and querying logic. It compares these methods based on their complexity and suitability for different types of queries.

  16. 16
    Article
    Avatar of bytebytegoByteByteGo·1y

    EP142: The Fundamental Pillars of Object-Oriented Programming

    Object-oriented programming (OOP) is built on four pillars: abstraction, encapsulation, inheritance, and polymorphism. Abstraction hides the complexity by only showcasing the essential features, encapsulation wraps data and methods in a class with restricted access, inheritance allows new classes to inherit attributes and methods from existing classes to promote code reuse, and polymorphism enables methods to behave differently based on the object they are invoked on.

  17. 17
    Video
    Avatar of ibmtechnologyIBM Technology·1y

    The Battle for Java Supremacy: Spring Boot vs Quarkus #java #javaspringboot #hybridcloud #quarkus

    Spring Boot is an opinionated framework for creating standalone, production-ready Spring applications, known for its ability to reduce boilerplate code and its vast ecosystem. Quarkus, a newer Java framework, is designed for container-optimized and cloud-native applications, offering faster boot times and better resource utilization. It supports both imperative and reactive programming models, with a strong focus on developer productivity.

  18. 18
    Article
    Avatar of java_libhuntAwesome Java Newsletter·1y

    Clean Code: The Good, the Bad and the Ugly

    Clean Code by Robert C. Martin has had a significant impact on the programming world, emphasizing the importance of code quality, readability, and maintainability. While many of its principles are timeless, the book has been criticized for its heavy Java focus and dogmatic presentation. Modern programming practices and languages have evolved, and there are now better alternatives that provide more nuanced advice. The book's examples, particularly the prime generator, are often verbose and not always aligned with its own rules, making them difficult for beginners to understand.

  19. 19
    Article
    Avatar of jrebelJRebel·1y

    Java Documentation

    Java documentation, while essential, can be challenging to write. This post provides tips on creating effective JavaDocs, highlights the importance of documenting code clearly for team collaboration, and introduces JavaDoc best practices including the use of tags like @link, @code, and @since. It also covers tools and AI extensions that can aid in generating JavaDocs, emphasizing the value of well-documented code for maintaining readability and efficiency in Java development.

  20. 20
    Article
    Avatar of ddcDaily Dose of Code·1y

    Java competitive programming setup !!!

    The post provides a simple setup for Java competitive programming, designed to handle multiple test cases efficiently. It includes instructions on creating an input.txt file and output.txt file, and a Java class to manage input and output streams, allowing for streamlined testing of different scenarios without retyping. An example implementation shows how to check for unique characters in a string by reading from the input file and writing results to the output file.

  21. 21
    Article
    Avatar of javarevisitedJavarevisited·1y

    7 Types of Garbage Collectors in Java

    The post provides an overview of garbage collection in Java and details seven garbage collectors: Serial GC, Parallel GC, Concurrent Mark Sweep GC, Z GC, G1 GC, Shenandoah GC, and Epsilon GC. It explains the metrics used to evaluate GC algorithms, such as latency, throughput, and memory footprint. Each garbage collector is described with its use cases and how to enable it in Java.

  22. 22
    Article
    Avatar of baeldungBaeldung·1y

    Difference Between Circuit Breaker and Retry in Spring Boot

    In distributed systems, handling failures is crucial for reliability and performance. Two key resilience patterns are Retry and Circuit Breaker. Retry handles transient failures by re-executing operations, while Circuit Breaker prevents repeated attempts at operations likely to fail, protecting against cascading failures. Implementing these patterns in Spring Boot using Resilience4j enhances system stability via features like exponential backoff in Retry and state management in Circuit Breaker. Integrating with Spring Boot, Spring Cloud Circuit Breaker, and Spring Retry, they provide robust frameworks for creating resilient microservices.

  23. 23
    Article
    Avatar of baeldungBaeldung·1y

    How to Diagnose a Null Exception Message in Java

    Exceptions in Java can help find and fix bugs, but when an exception message is null, it can be confusing. This post examines why null exception messages occur, especially in Java versions prior to JDK 14, and how JDK 14 improves exception handling with detailed messages. It also provides tips on using stack traces and SLF4J for better debugging.

  24. 24
    Article
    Avatar of baeldungBaeldung·1y

    How to Read an External Properties File in Maven

    Learn how to effectively read and integrate external properties files into a Maven build using the properties Maven plugin. The guide covers building a simple Maven project, configuring the maven-resources-plugin to filter properties, and dynamically loading properties files via the Maven command line for flexible build processes.

  25. 25
    Article
    Avatar of devblogsDevBlogs·1y

    Annoucing Javac support in Visual Studio Code Java

    Visual Studio Code has introduced partial support for Javac as the underlying compiler for Java, in collaboration with Red Hat and Microsoft. This change aims to improve developer experience with timely support for new Java features and better alignment with build tools like Maven and Gradle. Although disabled by default, users can enable it through specific settings. The update promises more accurate Java specification compliance, faster feature support, and reduced maintenance overhead. Future improvements will enhance usability, performance, and start-up experience, and the work is being integrated upstream into the JDT project.