A predicate method is tipically one that should return a boolean value (true or false). These methods are useful in a lot of scenarios, like when you have an class with a boolean attribute.

Naming these kind of methods depends on the language you are using, but here are my top priorities.

Question mark

If you are using Ruby you can name it with a question mark at the end, which makes the code really readable. Something like this:

def is_alive?

Question style

In some languages you can’t use a question mark in the name of a method, so I usually name it like this:

public Boolean isAlive {
  return alive;

Simple Getter

The worst name here, in my opinion, is having a get, like any other getter. It’s much better to have something like:


Rather than:



Of course naming is something so opinable that it would be silly to think more about this problem. I think with experience you can see the pros and cons of every option, I could even change my mind in some months about this :)