In 2006 Martin Fowler wrote about Code Ownership. It's a quick read, I'd recommend checking it out if you've never seen it. At the time I was working at ThoughtWorks; I remember thinking "Clearly Strong makes no sense and I have no idea what scenario would make Weak reasonable". 8 years later, I find myself advocating for Weak Code Ownership within my team.
Collective Code Ownership (CCO) served me well between 2005 and 2009. Given the make-up of the teams that I was a part of I found it to be the most effective way to deliver software. Around 2009 I joined a team that eventually grew to around 9 people, all very senior developers. The team practiced Collective Code Ownership. Everyone on the team was very talented, but that didn't translate to constant agreement. In fact, we disagreed far more often than I thought we should. That experience drove me to write about the importance of
This file contains hidden or 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
assertEquals( | |
"2,3", | |
a.order.w( | |
stub(Product.class, s -> s.getId(), Product.id(2)), | |
stub(Product.class, s -> s.getId(), Product.id(3))) | |
.getProductIds()); |
This file contains hidden or 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
I'm just a guy, who wrote a book. I have no legal department | |
or official "privacy policy". It's likely that I hate spam | |
more than you do, and you may receive a total of 2 emails from | |
me in your life - both of which will offer my book at a discount. | |
I would neither sell nor give away your email under any | |
circumstances. | |
If you need a more official policy, I can't help you there. | |
Instead, I offer the free sample without requiring your email | |
address. The following links will take you directly to the |
This file contains hidden or 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
;; top level, used only once | |
(defn only-used-once [r {:keys [foo]}] | |
(if (even? foo) | |
(+ r foo) | |
r)) | |
(defn sum-my-stuff1 [coll] | |
(reduce only-used-once 0 coll)) | |
;; anonymous fn, inline |
This file contains hidden or 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
user=> ('a 1 2) | |
2 |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am jaycfields on github. | |
* I am jayfields (https://keybase.io/jayfields) on keybase. | |
* I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); | |
} | |
To claim this, I am signing this object: |
This file contains hidden or 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
;; move everything to runtime | |
(expect | |
(let [user (create-user args) | |
result (pred (some-function user))] | |
(delete user) | |
result)) |
This file contains hidden or 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
;; could work | |
(expect | |
(more-of tree | |
SUCCESS (tick {:foo 41} tree {}) | |
SUCCESS (tick {:foo 41} tree {})) | |
(aidoc/compile [:test? {:key :foo :val 42}])) | |
;; but I strongly dislike putting fn calls in more. I'd probably use from-each | |
(expect SUCCESS | |
(let [tree (aidoc/compile [:test? {:key :foo :val 42}])] |
OlderNewer