Tag

BestPractices

0 views collected around this technical thread.

Top Architect
Top Architect
Feb 11, 2025 · Backend Development

Avoiding the Pitfalls of Java Stream and Lambda: Best Practices and Optimizations

The article examines how Java Stream and Lambda, while powerful for concise code, can become cumbersome when overused, and offers practical tips such as proper line breaks, function extraction, predicate reuse, cautious Optional handling, and mindful use of parallel streams to maintain readability and performance.

BestPracticesCodeOptimizationJava
0 likes · 11 min read
Avoiding the Pitfalls of Java Stream and Lambda: Best Practices and Optimizations
Java Architect Essentials
Java Architect Essentials
Jan 3, 2025 · Backend Development

Using Java 8 Optional to Prevent NullPointerException: Methods, Examples, and Best Practices

This article introduces Java 8's Optional class as a robust solution for avoiding NullPointerException, explains its creation methods, demonstrates common operations such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, and provides practical usage scenarios and cautions for developers.

BackendBestPracticesJava
0 likes · 16 min read
Using Java 8 Optional to Prevent NullPointerException: Methods, Examples, and Best Practices
Code Ape Tech Column
Code Ape Tech Column
Jul 19, 2024 · Backend Development

Common Pitfalls and Best Practices for Using Java Thread Pools

This article summarizes the common pitfalls, monitoring techniques, configuration guidelines, naming conventions, and practical code examples for safely using Java ThreadPoolExecutor, helping developers avoid OOM, deadlocks, and performance issues while optimizing thread‑pool usage.

BestPracticesConcurrencyJava
0 likes · 17 min read
Common Pitfalls and Best Practices for Using Java Thread Pools
Code Ape Tech Column
Code Ape Tech Column
Jul 17, 2023 · Backend Development

Best Practices and Common Pitfalls When Using Java Thread Pools

This article summarizes the key pitfalls and recommended practices for creating, configuring, monitoring, and naming Java thread pools, including proper declaration, parameter tuning for CPU‑ and I/O‑bound workloads, avoiding OOM and deadlocks, and leveraging dynamic pool frameworks.

BestPracticesConcurrencyJava
0 likes · 17 min read
Best Practices and Common Pitfalls When Using Java Thread Pools
Top Architect
Top Architect
Oct 20, 2022 · Backend Development

Mastering Java Optional: Preventing NullPointerException with Java 8

This article explains how Java 8's Optional class can be used to avoid NullPointerException by providing a comprehensive guide that covers creation, common methods, practical use‑cases, and recent JDK 9 enhancements, complete with code examples and best‑practice recommendations.

BestPracticesFunctionalProgrammingJava
0 likes · 14 min read
Mastering Java Optional: Preventing NullPointerException with Java 8
Cognitive Technology Team
Cognitive Technology Team
Oct 15, 2022 · Fundamentals

Analysis of Java ThreadLocal Implementation and Usage Pitfalls

This article explains the internal workings of Java's ThreadLocal, including the ThreadLocalMap structure, weak reference handling, lazy initialization, and common pitfalls such as memory leaks in thread pools, and provides best‑practice guidelines for safe usage.

BestPracticesConcurrencyJava
0 likes · 7 min read
Analysis of Java ThreadLocal Implementation and Usage Pitfalls
YunZhu Net Technology Team
YunZhu Net Technology Team
Apr 21, 2022 · Databases

Common MySQL Query Pitfalls and How to Avoid Them

This article outlines several frequent MySQL query pitfalls—including missing table aliases in multi‑table operations, unsupported FULL JOIN syntax, unexpected REPLACE INTO side effects, auto‑increment edge cases, data‑type mismatches, nondeterministic functions, and warning‑driven query behavior—providing examples and best‑practice recommendations to prevent data loss and performance issues.

BestPracticesDataIntegrityDatabase
0 likes · 14 min read
Common MySQL Query Pitfalls and How to Avoid Them
Java Captain
Java Captain
Feb 20, 2018 · Fundamentals

Understanding and Proper Use of Checked Exceptions in Java

This article explains Java's exception hierarchy, distinguishes checked from unchecked exceptions, illustrates common pitfalls of overusing throws, and provides best‑practice guidelines for handling, documenting, and wrapping checked exceptions to improve API design and application robustness.

APIDesignBestPracticesCheckedException
0 likes · 14 min read
Understanding and Proper Use of Checked Exceptions in Java