I recently came across Clayton Christensen's recent article in the Washington Post: A Theist Balance on the Court.
I liked the pun on a-theist.
But, more seriously, I think that the topic of "voluntary obedience to unenforceable laws" is core to the American experiment.
There is a point at which people cannot be governed by law except to their own detriment. I believe that this point is reached when individuals decide to trample each others' rights and attempt to defend themselves, by legal or illegal means, in doing so.
And I very much like Clayton's reframing of the problem: If the "religions of atheism and secularism offer us no institutions whose mission is to inculcate in the next generation of Americans the instinct to obey unenforceable laws," then it is improper to marginalize the contribution of any and all of the institutions that DO inculcate such an instinct.
Thoughts and comments by John Sumsion about life and software.
Alma 34:38 Live in thanksgiving daily, for the many mercies and blessings which he doth bestow upon you.
28 July 2010
12 July 2010
How to rewrite a complex test
An Integrated Test is suboptimal for asserting basic functionality and basic sub-component collaboration behavior.
So if you have a massive Integrated Test, how is it possible to rewrite that test into some number of the following kinds of tests?
In a meeting in Feb. 2010, I wrote the following about problems I've experienced with a test suite at work:
I suggested measuring "costliest tests" using a combination of the following criteria:
So if you have a massive Integrated Test, how is it possible to rewrite that test into some number of the following kinds of tests?
- focused unit test
- focused collaboration test (how one class collaborates with another)
- systems-level integration test (load balancer behavior, queuing system behavior)
- enumerate the different permutations of state
- enumerate the different permutations of flow
- for each permutation of state: create one focused unit test
- for each permutation of flow: decide whether 1) the permutation of flow devolves into a sub-component collaboration test, or 2) into a systems-level integration test
- create the required focused collaboration tests
- create any required systems-level integration tests (usually very rare)
In a meeting in Feb. 2010, I wrote the following about problems I've experienced with a test suite at work:
- Inability to run a test context-free => high re-run costs and downstream delays
- Too much custom test infrastructure => high maintenance costs
- Risk of centralized integration => waiting on central integration before shipping
I suggested measuring "costliest tests" using a combination of the following criteria:
- How many superfluous assertions in this test?
- How many superfluous historical failures has this test generated in the last 6 months?
- How long does it take to run this test?
- How many "permutations of state" is this test trying to cover?
- How many "permutations of flow" is this test trying to cover?
- How far away from the code is this test?
- Is there a place closer to the code where those "permutations of state and flow" can be adequately tested?
- Are there ways to ensure all the "permutations of flow" can be covered without having to mix the test with trying to test all the "permutations of state" at the same time?
Where and how to test what
J.B. Rainsberger wrote in the fall of 2009 about why he thinks typical programmer use of "Integrated Tests" leads to a vicious cycle of denial and suboptimal behavior.
His overall ideas were summarized well by Gabino Roche, Jr.
And there are good uses of integration tests.
I was about to hit the delete button on this post, because I thought all I had to say had already been said. But there was still something to say: How do I personally work in a way that avoids the Vortex of Doom?
The key idea that has me personally is to pause, and ask the following question:
Of course, those are fairly basic OO questions. However, when you're writing tests along with the code, there is a situation that is easy to get stuck in: having so many things in mind at once, that you get confused about the purpose of the test, and even the software you are working to create.
There are at least three things that tend to compete for mind space:
In addition, I find that these new ideas are reorienting in nature. The new stuff I'm working on ends up either modifying an existing concept in a novel way, or introducing a new concept that collaborates with the existing system in a certain way. Then the test I thought I was going to write ends up being a straightforward unit test on a new class, or new methods of an existing class. And a couple of collaboration tests that make sure the new behavior actually gets used.
In the end, there are a few questions that need to get answered:
Hopefully this is a useful addition to the already-posted conversations started in 2009.
His overall ideas were summarized well by Gabino Roche, Jr.
And there are good uses of integration tests.
I was about to hit the delete button on this post, because I thought all I had to say had already been said. But there was still something to say: How do I personally work in a way that avoids the Vortex of Doom?
The key idea that has me personally is to pause, and ask the following question:
What is the responsibility of this test?and then to consider the answer to the related question:
What is the responsibility of the class being tested?
Of course, those are fairly basic OO questions. However, when you're writing tests along with the code, there is a situation that is easy to get stuck in: having so many things in mind at once, that you get confused about the purpose of the test, and even the software you are working to create.
There are at least three things that tend to compete for mind space:
- What observable behavior do you want out of your software?
- How do you think you might implement that?
- How does what you are building interacts with the rest of your system?
In addition, I find that these new ideas are reorienting in nature. The new stuff I'm working on ends up either modifying an existing concept in a novel way, or introducing a new concept that collaborates with the existing system in a certain way. Then the test I thought I was going to write ends up being a straightforward unit test on a new class, or new methods of an existing class. And a couple of collaboration tests that make sure the new behavior actually gets used.
In the end, there are a few questions that need to get answered:
- Does the new behavior work? (unit tests will tell you this, 80% of tests)
- Is the new behavior hooked up? (collaboration tests will tell you this, 15% of tests)
- Does the whole thing hold together? (automated deploy to a production-style test site with system-level smoke tests will tell you this, 5% of tests)
Hopefully this is a useful addition to the already-posted conversations started in 2009.
03 June 2010
Annotated pedigree on a timeline
Here is an idea for a new kind of pedigree display:
I want to show you how this plays out for my family. There are enough steps, that I'd like to show each step, introducing one new display element at a time.
First, here is my family in traditional split tree, generational columns form:

Next, here is my family in splay tree form, still in generational columns:

Now, here is my family in traditional split tree form, but on a timeline:

Now, combine the two -- here is my family in splay tree form *and* on a timeline:

While it is interesting to see the generations grouped together, it would be interesting to see generational hints on the timelines themselves.
One annotation I found useful is something I want to call "generational progression". Ok, so the name is a rough cut, here is the legend:
Here is my family annotated in such a way in split tree form:

And annotated in splay tree form:

What would be nice is to have this graphically displayed, instead of my hokey text attempt. Also, it would be nice to have this be data-driven. But despite the hokey text format, this let me see things about my family that I had not been able to see before. Like how my Grandma was 6 when her mom died. And that I wanted to ask my dad about his memories of his grandpa who was still alive when my dad was 8 or something.
I met Janet Hovorka at the BYU Computerized Genealogy Conference. I saw her chart work, remembered this idea, showed this to her, and promised a writeup. This is my shot at keeping that promise, even if it's a little late. :)
The idea to put stuff on timelines and to annotate things graphically comes straight from listening to, and reading the works of Edward Tufte.
Annotated splay tree on a timelineinstead of the conventional:
Split tree with generational columns
I want to show you how this plays out for my family. There are enough steps, that I'd like to show each step, introducing one new display element at a time.
First, here is my family in traditional split tree, generational columns form:

Next, here is my family in splay tree form, still in generational columns:

Now, here is my family in traditional split tree form, but on a timeline:

Now, combine the two -- here is my family in splay tree form *and* on a timeline:

While it is interesting to see the generations grouped together, it would be interesting to see generational hints on the timelines themselves.
One annotation I found useful is something I want to call "generational progression". Ok, so the name is a rough cut, here is the legend:
- "<<<": time that this person lived before having the child that appears on this pedigree
- "===": time that this person lived *after* having the child that appears on this pedigree, but *before* having the grandchild (if any) that appears on this pedigree
- "---": time that this person lived *after* having any grandchild on this pedigree
Here is my family annotated in such a way in split tree form:

And annotated in splay tree form:

What would be nice is to have this graphically displayed, instead of my hokey text attempt. Also, it would be nice to have this be data-driven. But despite the hokey text format, this let me see things about my family that I had not been able to see before. Like how my Grandma was 6 when her mom died. And that I wanted to ask my dad about his memories of his grandpa who was still alive when my dad was 8 or something.
I met Janet Hovorka at the BYU Computerized Genealogy Conference. I saw her chart work, remembered this idea, showed this to her, and promised a writeup. This is my shot at keeping that promise, even if it's a little late. :)
The idea to put stuff on timelines and to annotate things graphically comes straight from listening to, and reading the works of Edward Tufte.
29 April 2010
Reality Quotient
There is a fairly subjective measure I've only recently been able to give a name to:
This has to do with how deep you allow your stack to be, which if you allow it to get too deep, this affects your net throughput on Cockburn's "unvalidated decisions" or Demarco's "Total Useful Mental Discriminations (TUMD)". If the stack is too deep, you end up wasting a lot of time making useless decisions about things that have ceased having anything to do with the REAL task at hand.
The tendency to accept decisions that pin you into a corner is closely related to lowering the Reality Quotient. There is a whole book about the attitude of Getting Real, and I equate that attitude with a high Reality Quotient.
I did a search to see whether anyone else had published a writeup under the "Reality Quotient" heading. Although I found a lot of stuff on the web, none of it really matched what I wanted to say. The topic of this post is NOT:
The measurement I wanted to talk about is how capable you are of focusing on the problem you set out to solve until 1) it is truly solved and published to the world, or until 2) you have redefined the problem into another solvable one and published that transformation to the world.
In short, a high Reality Quotient requires a short stack, with tight feedback loops, focused on publishing real stuff to real people.
Reality Quotient = ability to keep context while working toward a specific goal
This has to do with how deep you allow your stack to be, which if you allow it to get too deep, this affects your net throughput on Cockburn's "unvalidated decisions" or Demarco's "Total Useful Mental Discriminations (TUMD)". If the stack is too deep, you end up wasting a lot of time making useless decisions about things that have ceased having anything to do with the REAL task at hand.
The tendency to accept decisions that pin you into a corner is closely related to lowering the Reality Quotient. There is a whole book about the attitude of Getting Real, and I equate that attitude with a high Reality Quotient.
I did a search to see whether anyone else had published a writeup under the "Reality Quotient" heading. Although I found a lot of stuff on the web, none of it really matched what I wanted to say. The topic of this post is NOT:
- whether you are an honest person in general, or in a specific social situation
- a manager trying to find out what's REALLY going on in his/her org
- whether the actions of time travelers will have any effect
- some kind of measure of whether a politician is telling the truth or producing spin
- some measure of how "real" a reality show really is
The measurement I wanted to talk about is how capable you are of focusing on the problem you set out to solve until 1) it is truly solved and published to the world, or until 2) you have redefined the problem into another solvable one and published that transformation to the world.
In short, a high Reality Quotient requires a short stack, with tight feedback loops, focused on publishing real stuff to real people.
28 April 2010
Expert genealogy answers
The focus on "expert answers" really helped me to better understand the shift in focus that was recently announced for StackExchange.
The obvious application is to the genealogy domain. There is a huge "long tail" to genealogy. FamilySearch's wiki is opening that space up -- but there may be some room for a Q&A kind of experience.
The obvious application is to the genealogy domain. There is a huge "long tail" to genealogy. FamilySearch's wiki is opening that space up -- but there may be some room for a Q&A kind of experience.
IntelliJ patches don't seem to install
When I started IntelliJ (9.0.1, community edition) today, it popped a dialog up with an option to download a "patch" to install 9.0.2 release.
I've clicked "Download Patch" before, but nothing ever happened, and I ended up resorting to a full install.
But today, I came across a comment that described how to apply the patch:
http://blogs.jetbrains.com/idea/2010/01/intellij-idea-901-released/#comment-128607
And it worked great for me.
Others on my team said their patches installed just fine. To be clear, I'm using the Community Edition, and it may only be an issue with that edition.
I've clicked "Download Patch" before, but nothing ever happened, and I ended up resorting to a full install.
But today, I came across a comment that described how to apply the patch:
http://blogs.jetbrains.com/idea/2010/01/intellij-idea-901-released/#comment-128607
And it worked great for me.
Others on my team said their patches installed just fine. To be clear, I'm using the Community Edition, and it may only be an issue with that edition.
Subscribe to:
Posts (Atom)