Blogs / Virtuous Code ›

View all »

Latest posts

  1. Writing Self-Confident Code

    http://avdi.org/devblog/2008/10/30/self-confident-code/

    Writing Self-Confident Code Thursday, October 30, 2008 A common idiom in ruby is to call a method only if its receiver is not nil: thing.foo if thing or: thing && thing.foo Various libraries exist for making this a little more convenient. You can use andand, or if you are using Facets you can use ergo. …

    23 days ago
  2. Complex Hash Expectations in RSpec

    http://avdi.org/devblog/2008/10/28/complex-hash-expectations-in-rspec/

    Complex Hash Expectations in RSpec Tuesday, October 28, 2008 When spec-ing something that calls method which takes a set of nested hashes (as many Rails methods do), it may be tempting to use #hash_including to test for only the values you care about. However #hash_including won’t work the way we might hope for nested hashes. …

    25 days ago
  3. Testing Private Methods

    http://avdi.org/devblog/2008/10/21/testing-private-methods/

    Testing Private Methods Tuesday, October 21, 2008 Periodically the question of how to test private methods comes up at work or online. My answer is: don’t. It may seem trite, but there is some reasoning behind it. Private methods are, by definition, implementation details. …

    32 days ago
View all »

98 blog reactions

  1. Author unknown

    Gaveen's Blog

    http://gaveen.owain.org

    Virtuous Code

    6 days ago in Gaveen's Blog · Authority: 4
  2. Author unknown

    Self-Confident Code

    http://www.programmersparadox.com/2008/11/09/self-confident-...

    Pervasive null tests are a code smell.

  3. Photo of locknet

    locknet.ro

    http://www.locknet.ro

    : [Ma.gnolia] Links for week 44, 200831 Oct @ 17:30 Aurelian Oancea on : good: http://news.bbc.co.uk/2/hi/europe/7701551.stm31 Oct @ 17:17 Aurelian Oancea on : Writing Self-Confident Code31 Oct @ 17:17 Aurelian Oancea on : Writing Self-Confident Code31 Oct @ 17:17 Aurelian Oancea on : Romanie, te iubesc atat de…

    23 days ago in locknet.ro by locknet · Authority: 3
  4. Author unknown

    LinkRiver.com » LinkRiver Popular's River » Timeline

    http://linkriver.com

    Writing Self-Confident Code

  5. Photo of Remark

    Re.Mark

    http://remark.wordpress.com

    Monkeypatching is the practice of redefining methods in classes at runtime.  According to this Wikipedia article the exact definition varies between the Ruby and Python communities.  Some think it’s a good thing, while others take a different view.  If you want to prevent it from happening, here’s an answer make methods immutable

    53 days ago in Re.Mark by Remark · Authority: 13
  6. Photo of markneedham

    Mark Needham

    http://markhneedham.com/blog

    unnecessary type information and can lead to shorter methods when used well but completely unreadable code when misused. Ruby's open classes which give great flexibility when working effectively with 3rd party libraries for example but can lead to difficult debugging problems if overused. The same probably also applies to C#'s extension methods. I have no doubt there are other features in other languages and probably more in the languages I listed but those are some of the ones that stood out to me when I first saw them.

    58 days ago in Mark Needham by markneedham · Authority: 14
  7. Author unknown

    Giles Bowkett

    http://gilesbowkett.blogspot.com

    software for - so I'm going to bring this up in real life, but just for the record, one thing which makes me question the security of the whole shebang is that Immutable doesn't raise errors if you redefine a method and it blocks your redefinition. Method definition confusion drove the whole discussion in the first place, and here we have a solution which at the same time both prevents the problem, and guarantees that it will happen.

    66 days ago in Giles Bowkett · Authority: 165
  8. Photo of xelipe007

    The Rubyist: August Edition

    http://www.juixe.com/techknow/index.php/2008/09/08/the-rubyi...

    Rails Behind the Firewall What will be Ruby's legacy? Passenger Brings Rails Apps to Apache The Bad Ruby developers don't scale Funny, some Rubyists are stupider than a piece of wood Multiple vulnerabilities in Ruby The Trifecta of FAIL; or, how to patch Rails 2.0 for Ruby 1.8.7 The Informative Ruby Hoedown 2008 Video Ruby at OSCON 2008 Josh Peek officially joins the Rails core Ruby 1.9: What to Expect Interview with David Heinemeier Hansson: Rails Culture, Scaling Basecamp, and Building Successful Companies

  9. Photo of collinchung

    Web-Program-athon

    http://coding.collinchung.com

    previously blogged about here The new Microsoft Live Maps and Virtual Earth is released, with reports of the overhaul coming in that it's fairly impressive. Use your Google account with OpenID, and the reasons why your killer app should already support OpenID.

  10. Photo of SterlingCamden

    Chip’s Quips

    http://www.chipsquips.com

    Two Write Hands (and two left feet)