Tagged articles

boolean naming

3 articles · Page 1 of 1
samdeepthink
samdeepthink
Jul 22, 2026 · Fundamentals

How Programmers Name Boolean Variables: Common Prefixes, Pitfalls, and Best Practices

Using clear prefixes like is, has, can, and should for boolean variables improves code readability, while pitfalls such as mixed prefixes, negative naming, vague names like flag, and boolean traps in method parameters can cause confusion; the article offers concrete examples and practical refactoring strategies.

Software Engineeringbest practicesboolean naming
0 likes · 8 min read
How Programmers Name Boolean Variables: Common Prefixes, Pitfalls, and Best Practices
macrozheng
macrozheng
Feb 22, 2024 · Backend Development

Why Using isSuccess Can Break JSON Serialization in Java

This article explains how different Java JSON libraries handle boolean getter naming, shows code examples of serialization results with fastjson, Gson, and Jackson, and recommends using a plain "success" field with an isSuccess() getter to avoid runtime bugs.

FastjsonGsonJackson
0 likes · 7 min read
Why Using isSuccess Can Break JSON Serialization in Java
Top Architect
Top Architect
Jul 18, 2023 · Backend Development

Fastjson Boolean Property Naming Issue and How to Resolve It

This article explains why Fastjson incorrectly renames boolean fields prefixed with "is" during serialization, demonstrates the problem with sample Java code, analyzes the underlying reflection logic, and provides two practical solutions: following Alibaba Java guidelines or using @JSONField annotations.

Fastjsonboolean namingjava
0 likes · 9 min read
Fastjson Boolean Property Naming Issue and How to Resolve It