- brew
- zsh
- prezto (TODO: check out Antigen, ZPlug or other lightweight plugin manager)
- nvim
- fzf
- nerd-fonts
- powerlevel9k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MethodLogging | |
def self.logger=(logger) | |
@@logger = logger | |
end | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
def log(method, something) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rubywarriors hierarchy of needs | |
* Stay alive | |
* Free all the prisoners | |
* Kill all the enemies | |
* Explore all the level | |
* Progress to the next level |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import static org.hamcrest.CoreMatchers.*; | |
public class SomethingOrNothingTest { | |
@Test | |
public void shouldGiveMeSomething() throws Exception { |