Here’s a simple tip! I can’t begin to count how many potential code bugs this has eliminated. It takes some getting used to but once you make it automatic it’s a real help in keeping code and your thinking correct.
The tip is this: when you write relational expressions, always use less-than, never use greater-than. (Less-than-or-equal is okay, too.)