SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

UTIL PACKAGE / NOTES</>↗
Util Package02 May 2025

How do I avoid Optional performance pitfalls in high-frequency code paths?

When working with Java’s Optional in high-frequency code paths, it’s essential to understand and avoid the performance pitfalls associated with its usage. Although Optional provides functional-style coding benefits and helps prevent NullPointerException, it introduces additional overhead due to extra object creation and functional programming constructs. Here are some recommendations to ensure optimal performance: 1. Avoid […]

Wayan · 4 min read
JSCH / NOTES</>↗
JSch01 May 2025

How do I download a file from an SSH server using JSch SFTP?

To download a file from an SSH server using JSch SFTP, you can use the ChannelSftp class from the JSch library. Below is an example of how to achieve this: Code Example: Downloading a file using JSch SFTP The JSch library is used to establish an SSH connection to an SFTP server and transfer files. […]

Wayan · 3 min read
UTIL PACKAGE / NOTES</>↗
Util Package01 May 2025

How do I write Optional-aware utility methods?

Writing Optional-aware utility methods in Java involves keeping in mind the design of the Optional class, which is meant to represent potentially absent values in a neat, declarative way. Good utility methods avoid nulls and integrate smoothly with the existing Optional API. Here are a few practices and examples to guide you: 1. Use Optional […]

Wayan · 5 min read
UTIL PACKAGE / NOTES</>↗
Util Package01 May 2025

How do I use Optional with custom monads or functional libraries?

Using Optional with custom monads or functional programming libraries can enhance code readability and handle null-like scenarios effectively. Here’s how you can integrate Optional with custom monads or functional programming libraries: 1. Understanding Optional in Functional Context Optional is essentially a simplified monad used to represent the presence or absence of a value. Custom monads […]

Wayan · 4 min read
JAVA 10 / NOTES</>↗
Java 1030 Apr 2025

How to inspect and use the enhanced Optional.orElseThrow() in Java 10

In Java 10, the Optional.orElseThrow() method was enhanced to become the preferred method for retrieving a value from an Optional when the value is present, and throwing an exception otherwise. Let’s explore how this works. Enhanced Optional.orElseThrow() Prior to Java 10, the Optional class provided: orElse() – Retrieves the value if present or returns a […]

Wayan · 3 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.