I hereby claim:
- I am andypalmer on github.
- I am andypalmer (https://keybase.io/andypalmer) on keybase.
- I have a public key whose fingerprint is DB19 FBB6 D48C 9868 C6DE 70A4 D4D8 4755 FEBA 3DD9
To claim this, I am signing this object:
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import static org.hamcrest.CoreMatchers.*; | |
public class SomethingOrNothingTest { | |
@Test | |
public void shouldGiveMeSomething() throws Exception { |
class Safe | |
def next_move_for(player) | |
return Attack.new if player.is_under_attack? | |
self | |
end | |
def act(warrior) | |
return warrior.rest! if warrior.health < 15 | |
return warrior.attack! if warrior.feel.enemy? | |
return warrior.rescue! if warrior.feel.captive? |
Rubywarriors hierarchy of needs | |
* Stay alive | |
* Free all the prisoners | |
* Kill all the enemies | |
* Explore all the level | |
* Progress to the next level |
module MethodLogging | |
def self.logger=(logger) | |
@@logger = logger | |
end | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
def log(method, something) |
I hereby claim:
To claim this, I am signing this object:
public class AnEbayUserCan { | |
@Test | |
public void searchForAnItem() { | |
EbayUser andy = new EbayUser().with(WebBrowsing.capability()); | |
andy.doesTheFollowing( | |
Go.to(EBay.homepage), | |
Search.for("fire poi"), | |
Count.the(Results) |
public Result someMethod() { | |
Result result = someMethodIDontControl(); | |
if(null == result) {return null;} | |
// Actually, this is really crap because in reality, I’d just return result, but bear with me! | |
return result; | |
} |
public Result someMethod() throws IUsedToReturnNullPleaseFixMe { | |
Result result = someMethodIDontControl(); | |
if(null == result) {throw new IUsedToReturnNullPleaseFixMe();} | |
// This is temporary. The right thing _might_ be an exception, but we’ll work that out later | |
return result; | |
} |
<meta content='summary_large_image' name='twitter:card'> | |
<meta content='@RiverGlide' name='twitter:site'> | |
<meta content='Working Effectively with Legacy Code' name='twitter:title'> | |
<meta content='Working effectively with Legacy Code is one of those books that should be on every development team’s bookshelf. Many teams are working with code that has been around for quite some time, created before the team valued (or needed) practices like Test-Driven Development and SOLID principles.' name='twitter:description'> | |
<meta content='http://images.amazon.com/images/P/0131177052.01._SS1094_SCLZZZZZZZ_.jpg' name='twitter:image'> | |
<meta content='Working Effectively with Legacy Code' name='twitter:image:alt'> |