I am Pedantic.

  • Archive
  • RSS
  • Talk to me

Tip-toeing in Code


def maybe_activate_frob
  frob.activate! if x && y && z || a && b || c
end

vs.


def activate_frob_if_possible
  frob.activate! if frob.can_activate?
end

vs.


frob.activate! if frob.can_activate?

I think I prefer the last version.

    • #code
  • 3 months ago
  • 6
  • Permalink
  • Share

6 Notes/ Hide

  1. globalspin liked this
  2. iampedantic posted this
← Previous • Next →

Pedantry, software, freedom, beauty and minimalism.

by Brad Fults

Brad on the Internet

  • h3h on Dribbble
  • @h3h on Twitter
  • Facebook Profile
  • h3h on Flickr
  • h3h on Last.fm
  • h3h on Gowalla
  • h3h on github
  • RSS
  • Random
  • Archive
  • Talk to me
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr