• Home
  • About
    • About The Coder
    • Language List
  • The Rules
    • Rule #1: Clarity Trumps Everything
    • Rule #2: Source Code is for Humans
    • Rule #3: Don’t Ignore Warnings
    • Rule #4: Comment As You Go!
    • Rule #5: Always Use Parentheses
  • CS-101
  • Guestbook

The Hard-Core Coder

~ I just can't stop writing code!

The Hard-Core Coder

Daily Archives: March 5, 2014

Always Use Less-Than

05 Wednesday Mar 2014

Posted by Wyrd Smythe in CS101, Opinion

≈ 4 Comments

Tags

code clarity, computer programming, greater-than, less-than, readable code

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.)

Continue reading →

Follow The Hard-Core Coder on WordPress.com

The Posts

  • Thinking Ahead
  • Brian Kernighan: Successful Language Design
  • My Python App Framework
  • Multiplication Visualized
  • Square Root of 2
  • Life With Class
  • John Conway’s Life
  • Python Decorators, part 2
  • Python Decorators, part 1
  • Function Currying

The Topics

  • Blog (4)
  • CS101 (29)
  • Fun (22)
  • Interesting (1)
  • Opinion (12)
  • Stories (12)
  • Uncategorized (1)

The Month

March 2014
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« Feb   Apr »

The Past

It’s me!

Wyrd Smythe

Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts.

View Full Profile →

The Main Blog

Visit Logos con carne

Lots of wyrds... with meat!

Posts

RSS Feed

Comments

RSS Feed

Enter your email address to follow The Hard-Core Coder and get email when there is a new post.

Blog at WordPress.com.