05 March 2014

Why Instead of What

Writing a good commit message is an important collaborative skill on a software project.

See:
- http://who-t.blogspot.de/2009/12/on-commit-messages.html
- http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
- https://github.com/torvalds/linux/pull/17#issuecomment-5661185

While all the formatting advice can seem pretty nitpicky, there are a couple principles that stand out to me:
  1. Above all, clearly and concisely state WHY you are making the change
  2. Also, include all the considerations that went into this change and why you are making THIS change instead of any others you considered
Even if the formatting isn't perfect or wouldn't meet the linux kernel mailing list standards, just having the context later when you are scratching your head wondering "why?" - that is invaluable.

03 March 2014

Code doc: "Responsible for ..."

Instead of writing class documentation like:

/**
 * This class does X.
 */

Instead of that, please start writing class documentation like:

/**
 * Responsible for X.
 */

The difference seems subtle at first, however the latter is better because it sends you down the path of the Single Responsibility Principle as a default way of thinking about things.

If it's hard to write a sentence fragment "responsible for X" because X is really X, Y, and Z, then that is a code smell that can point to a need for more refined subdivision of responsibility.

28 February 2014

Feeling Good with Creative Tension

This blog went dark after last summer because I had to focus on Boy Scout summer camp and moving my family to a new location.  But now those projects are largely taken care of, and I have some mental space to speak here again.

I have been reading two books recently:

In Creating, the author says that it is more important to acknowledge the tension between your creative vision and current reality, despite the pain that comes from realizing how far away from your vision you might currently be.  This has been very hard to internalize for me.  I feel depressed when things that I care about look so impossible.

Well, I gave up on Creating for a while, and one of the books that I hauled to my new house was Feeling Good.  I found the core of the book in the description of the interaction between "feelings" and "thoughts".

Chapter 3 - Understanding Your Moods: You Feel the Way You Think

There, the author lays out a list of common mental errors that present themselves in people who suffer depressive symptoms.  The premise of the book is that cognitive therapy focused on correcting the mental errors is helpful to relieve depressive symptoms.

Reading these books together put the two thoughts in juxtaposition in my mind, and the result was interesting.  I realized that I was making some of the common mental errors in the context of creating my vision of a distributed versioned family tree.

So the principle I want to put into practice now personally is "Feeling Good with Creative Tension" by recognizing the mental errors and correcting them as quickly as is practical.

Despite the hope that these thoughts bring, I have had to refocus my efforts after being assigned to a project at work that deals with innovation on the entire corpus of pedigree data.  The things I have been learning at a whole dataset level are valuable to me in thinking about how to make a distributed tree even work.

26 February 2014

Kent Beck about steering code via tests

I was about to send this to my team, but then I realized this is a blog post.

Here is Kent's article:


And here is a related tweet from him on that topic:

    "selecting the next test is an act of design"

I've always thought about "design" as choosing which classes exist and how they relate to each other, and what methods look like, etc.  Or at a system level, deciding which services exist and what their core of responsibility should be.

However, I never thought about gaming my own mind (like applying genetic algorithms to my own thoughts), and choosing to introduce tests in different orders -- in order to produce a different neurophysical response from myself.

Perhaps "design" is not just about a static system and what to include.  Perhaps "design" is about acknowledging the dynamism of the human/computer programming environment, and leveraging that dynamic nature in order to get a more optimum response.

16 May 2013

Teaching Software

Today, I read "The Science in Computer Science" from Peter J. Denning in CACM (May 2013).  Very interesting article.

The most interesting part to me were the references to how CS ideas are beginning to be taught in high school and elementary school.  Here are some references that I found after looking into this:

Here is one of those videos linked to above:


I need to volunteer to teach at my kids' school, and in a community education setting.

17 April 2013

Google Fiber in Provo, UT

This makes me want to move to Provo:
https://fiber.google.com/cities/provo/
That's something my wife thought she'd never hear! :)

Dystopia - Fallacies Conquered

Dystopia - from NetflixOSS's Adrian Cockcroft:
We have spent years striving to build perfect apps running on perfect kernels on perfect CPUs connected by perfect networks, but this utopia hasn't really arrived.
Instead we live in a dystopian world of buggy apps changing several times a day running on JVMs running on an old version of Linux running on Xen running on something I can't see, that only exists for a few hours, connected by a network of unknown topology and operated by many layers of automation.
Reminds me of Fallacies of Distributed Computing, but from the perspective of people who have actually vanquished the beast with weapons that are usable by others.