---
title: "Discussion on \"Embrace the Force: Yoda conditions\" | Hashnode"
description: "Discussion on \"Embrace the Force: Yoda conditions\". Many things in programming are not super intuitive. Yet, such small things could be a life saviours.\nOne of such things is Yoda conditions style.\n\nConsider the code bellow:\nif (variable == 3) {\n    // do something\n}\n\nThis would be the way most of us ..."
url: "https://hashnode.com/posts/embrace-the-force-yoda-conditions/6899cb7b20c1484d8e199ab7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Embrace the Force: Yoda conditions](https://testingcoder.hashnode.dev/embrace-the-force-yoda-conditions?utm_source=hashnode&utm_medium=feed)

Many things in programming are not super intuitive. Yet, such small things could be a life saviours. One of such things is Yoda conditions style. Consider the code bellow: if (variable == 3) { // do something } This would be the way most of us ...

Aug 11, 2025 · 1 min read · testingcoder.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#java](https://hashnode.com/tag/java)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)

## Written by

[Alexander Pushkarev](https://hashnode.com/@TestingCoder)

@TestingCoder · Cambridge, UK

  
[View profile](https://hashnode.com/@TestingCoder)

Testing Coder

With more than 10 years in IT, I had a chance to work in different areas, such as development, testing and management. I had a chance to work with PHP, Java, Python and .Net platforms with different application from microservices to monolithic and monstrous desktop UI applications. Currently, I am holding the position of Senior Software Engineer, but I prefer to consider myself a full-stack engineer. My passions are quality and efficiency. Agile fan and XP practitioner.

## Responses 1

Markdown supported · ⌘↵ to post

[Edhar](https://hashnode.com/@avuzia)

[Aug 11, 2025](https://hashnode.com/posts/embrace-the-force-yoda-conditions/6899cb7b20c1484d8e199ab7/comment/6899d245b2dc8dd378bb99f2)

❌ null-points ✅ `NullPointerException (NPE)` s

[Alexander Pushkarev](https://hashnode.com/@TestingCoder)

[Aug 11, 2025](https://hashnode.com/posts/embrace-the-force-yoda-conditions/6899cb7b20c1484d8e199ab7/comment/6899d245b2dc8dd378bb99f2#reply-6899d3c8d29f5a5378cc3100)

nice catch
