Courageous Software
Do Our Best; Make Our Best Better; Help Others
Home Blog Categories Archives About Feed icon

Latest Posts - page 18

  • One Assertion Per Test

    Jun 17, 2014 • Randy Coulman • posted in TDD

    A common piece of advice in the test-driven development (TDD) community is to limit yourself to one assertion per test (OAPT). Others disagree, finding the guideline too restrictive and dogmatic. Still others propose a compromise: you can have more than one assertion in a test, but they must all be checking related aspects of the same outcome.

    Read more →
  • Fully-Constructed Objects

    Jun 10, 2014 • Randy Coulman • posted in Smalltalk constructor design ruby

    As I discussed about a year ago, Smalltalk’s argument-passing syntax is somewhat limited compared to other languages when you want to define a flexible API. By “flexible”, I mean an API where some parameters are optional with reasonable defaults, and the order of the parameters can vary. When it comes to “constructor” methods, there is another option.

    Read more →
  • Constructing a Test

    Jun 3, 2014 • Randy Coulman • posted in TDD

    If you practice Test-Driven Development (TDD) or Behavior-Driven Development (BDD), you may be familiar with the Arrange, Act, Assert pattern.

    Read more →
  • Constants and Assumptions

    May 27, 2014 • Randy Coulman • posted in design refactoring

    As programmers, we’re taught to avoid hard-coded (“magic”) numbers in code. Instead, we replace them with constants or some other kind of named value. This is good advice, and helps with the understanding of our code. Also, if one of these magic numbers needs to change in the future, we can make the change in one place. This is a relatively basic rule.

    Read more →
  • RubyMine

    May 20, 2014 • Randy Coulman • posted in RubyMine Tools I use ruby

    This post is part of a periodic series about The Tools I Use.

    Read more →
  • A Bug Hunting Story

    May 13, 2014 • Randy Coulman • posted in Smalltalk debugging

    A colleague and I recently had to track down a tricky bug in our system, and I thought the story might be interesting.

    Read more →
  • Optimizing Conditionals in Smalltalk

    May 6, 2014 • Randy Coulman • posted in Smalltalk

    I recently released SuffixConditionals for Visualworks Smalltalk. In the release announcement I said:

    Read more →
  • External Enumerators in Smalltalk

    Apr 29, 2014 • Randy Coulman • posted in Smalltalk tools

    Smalltalk collections have a rich protocol for enumerating their elements: simple iteration with do:, mapping with collect:, filtering with select: and reject:, reducing with fold: and inject:into:, and more.

    Read more →
  • MWRC 2014 Video Is Up

    Apr 23, 2014 • Randy Coulman • posted in affordances conference speaking

    The video of my Mountain West Ruby Conference talk, Affordances in Programming Languages, is now up on Confreaks. I hope you enjoy it!

    Read more →
  • Suffix Conditionals in Smalltalk

    Apr 22, 2014 • Randy Coulman • posted in Smalltalk tools

    I’ve always been fascinated with the way conditionals are implemented in Smalltalk. Rather than having built-in if/then/else keywords, Smalltalk uses polymorphism. The Boolean subclasses True and False simply implement #ifTrue:, #ifFalse:, #ifTrue:ifFalse:, #and:, #or:, etc. appropriately for themselves. This is a brilliant design, and understanding it got me closer to really understanding Smalltalk.

    Read more →
« Older Posts Archives Newer Posts »
  • Courageous Software
  • Copyright © 2013 - 2024 Randy Coulman
  • Privacy Policy
  • randycoulman
  • randycoulman
  • randycoulman

Randy Coulman's blog on writing software well, and helping others to do the same.