Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The World Runs on Bad Software

The World Runs on Bad Software

Brandon Keepers

August 12, 2011
Tweet

More Decks by Brandon Keepers

Other Decks in Programming

Transcript

  1. Brandon Keepers Lone Star Ruby Conference V August 12, 2011

    BAD the world runs on software Ordered List
  2. art

  3. I

  4. :(

  5. What is good software? How does it go bad? How

    do we build better software?
  6. “ Good software meets the present objective at an acceptable

    cost without incurring an unacceptable amount of future risk.
  7. “ Zach Dennis Mutually Human Software People fail to realize

    that quality is merely a property of the code that exists, not the reason for its existence.
  8. “ Scott Berkun We’re frustrated most in life by things

    that come close to our deepest needs, but don’t deliver.
  9. “ Ray Yeargin Virtually all of the cost of software

    development is, directly and indirectly, the cost of design.
  10. $$$

  11. $$

  12. $

  13. What is good software? How does it go bad? How

    do we build better software?
  14. “ The Pragmatic Programmer While software development is immune from

    almost all physical laws, entropy hits us hard.
  15. What is good software? How does it go bad? How

    do we build better software?
  16. DRY

  17. What is good software? How does it go bad? How

    do we build better software?
  18. >> nil.foo.bar => nil >> nil + 5 => nil

    >> 5 + nil TypeError: coerce must return [x, y]
  19. def to_xml(options={}) root_tag = options.fetch(:root, 'game') instruct = options[:skip_instruct] ?

    '' : XML_INSTRUCT # … # gather up a bunch of variables # … <<-EOF #{instruct} <#{root_tag}> <id>#{id}</id> <current-move-user-id>#{current_move_user_id}</ current-move-user-id> <created-by-user-id>#{created_by_user_id}</ created-by-user-id> <chat_session_id>0</chat_session_id> <is-matchmaking>#{is_matchmaking}</is-matchmaking> <was-matchmaking>#{was_matchmaking}</was- matchmaking> <moves-count>#{moves_count}</moves-count> <random-seed>#{random_seed}</random-seed>
  20. #{instruct} <#{root_tag}> <id>#{id}</id> <current-move-user-id>#{current_move_user_id}</ current-move-user-id> <created-by-user-id>#{created_by_user_id}</ created-by-user-id> <chat_session_id>0</chat_session_id> <is-matchmaking>#{is_matchmaking}</is-matchmaking> <was-matchmaking>#{was_matchmaking}</was-

    matchmaking> <moves-count>#{moves_count}</moves-count> <random-seed>#{random_seed}</random-seed> <client-version>#{client_version}</client-version> <created-at>#{created_at.try(:xmlschema)}</ created-at> <users type="array">#{users_xml}</users> #{current_user_xml} #{moves_xml} #{chats_xml} </#{root_tag}> EOF end
  21. commit fa779d9c2d1214e43ff497f386b51ebf3708346e Author: Brandon Keepers <[email protected]> Date: Wed Sep 22

    17:08:38 2010 -0400 First attempt at getting embedded callbacks working
  22. def run_callbacks(callback, &block) embedded_docs = [] embedded_associations.each do |association| embedded_docs

    += association.target end block = embedded_docs.inject(block) do |chain, doc| if doc.class.respond_to?("_#{callback}_callbacks") lambda { doc.run_callbacks(callback, &chain) } else chain end end super callback, &block end
  23. SystemStackError: stack level too deep from mongo_mapper/plugins/embedded_callbacks.rb:23:in `run_callbacks' from activesupport-3.0.9/lib/active_support/callbacks.rb:414:in

    `_run_create_callbacks' from activesupport-3.0.9/lib/active_support/callbacks.rb:94:in `send' from activesupport-3.0.9/lib/active_support/callbacks.rb:94:in `run_callbacks' from mongo_mapper/plugins/embedded_callbacks.rb:28:in `run_callbacks' from mongo_mapper/plugins/embedded_callbacks.rb:23:in `run_callbacks'
  24. “ Glen Vanderburg Sometimes you have to move ahead with

    weak evidence and weak conclusions because you don't have time to prove them.
  25. “ Ed Yourdon You can discipline yourself to write software

    that's good enough—good enough for your users, for future maintainers, for your own peace of mind. You'll find that you are more productive and your users are happier.
  26. Ordered List Thank you! [email protected] Brandon Keepers Lone Star Ruby

    Conference V August 12, 2011 @bkeepers http://spkr8.com/t/7829
  27. Credits Power lines - http://www.flickr.com/photos/viamoi/3339707547/ House of cards - http://www.flickr.com/photos/gibbons/2294374741/

    Dentists office - http://www.flickr.com/photos/cmdrcord/4996672560/ Broken chair - http://www.flickr.com/photos/gorbould/3004789912/ Schematics - http://www.flickr.com/photos/nicklockey/4547935355/ Engineers - http://www.flickr.com/photos/seattlemunicipalarchives/4818952324/ Black box - http://goldberg.berkeley.edu/art/big-images/