Monday, September 28, 2015

Emotion is the basis for knowing, not intellect

Society tries to teach us that intellectual pursuits will necessarily make you smarter - that "building your brain" around facts and problem solving tactics is the way to improve your understanding.

That's so wrong, it's a special kind of stupid.

Emotional capacity, not intellectual content, is the carrier wave of intelligence; emotional response is the method by which that carrier is modulated to encode intellectual content. Without the emotional carrier and modulation, intellectual content is indistinguishable from background noise or static.

That's why emotional events can be so disruptive to clear thinking, and why activities both intellectual and athletic that allow one to reach a flow state simultaneously makes one feel "in the groove".

Thursday, September 17, 2015

Comprehensive Sense Making

Trying to comprehend a process consisting of multiple stakeholders in multiple workflows, is akin to a kid watching the guard-rails pass the car window on a long road trip.

When your reference frame is traveling at a different speed and direction than the frame of the thing you're observing, you may get 20-20 vision, but the whole thing is still going to be a blur.

Such is the problem of trusting the viewpoints of individual users reacting to day to day business activities: their view is blurred by the pace of life. And so is yours.

Want to align visions better? Reduce the number of players in the game at any one moment. Allow them to ramp up their speed by communicating exclusively together.  When business needs push them apart, allow them to disengage from the process instead of thrashing against it.

Recognize that until the game is fully underway, what the players see of each other will be blurred, and any tooling created to support the process will necessarily incorporate the blurred understanding.

Sunday, July 19, 2015

Set -o vi FTW!!!

A programming buddy recently reposted some tips on using the OSX Terminal, from Tech Republic.
My terse response was

set -o vi

Which, of course, calls for some explanation. This configuration option to a Posix shell like Bash, sets it up to use the behavior of the ancient and ever popular "VI" editor as a command-line terminal interface.

Transliterating most of the Tech Republic article, here are the roughly equivalent shortcuts:


Escape
Puts the terminal command line into "Command Mode".  Single letter commands from VI will now work, including searches.

I or i or a or A
Puts the terminal command line into "Insert Mode".
Uppercase I puts the cursor at the beginning of the line, lowercase i leaves the cursor where it is.
Uppercase A puts the cursor at the end of the line, lowercase a puts the cursor after the next character.
Hit Escape to leave insert mode.

w and b
Command Mode: These shortcuts allow you to move the cursor between separate words in a command line.
Use 'b' to move back and use 'w' to move forward down the line.

e
Command Mode: This shortcut moves the cursor to the end of the current word on the command line.

d b
Using this key sequence will delete the word immediately before, or to the left of, the cursor.

d b b p
This will the swap two words that appear immediately before the cursor.
So, if "this is" sits before the word the cursor is on, using d b b p will change that to "is this."

/somesuch RETURN
If you need to locate a previously used command in Terminal,
use /somesearch and hit the RETURN key.
It will perform a search on the command history and allow you to find a previously used command
that you may need to access again.
Hit 'n' to find the next match.

?somesuch RETURN
Same as /, except searches history in reverse order.

$
Using '$' will take you to the end, or the far right, of the line where your cursor is.

0
This shortcut is the opposite of '$'. Typing '0' will take you back to the beginning, or the far left,
of the line you are currently working on.

Control + C
If you need to kill what's currently running, us Control and C in Terminal to abort the current application.

d 0
This shortcut clears the entirety of the line before the cursor.
So, if you get to the end of a line and realize the whole thing is wrong, use 0 D to delete it all.

0 D
or
dd
These shortcuts will clear the entire line.

D
Using D will have a similar effect as using 0 D, but will only clear the line that appears after the cursor.
It is helpful if you need to change or delete the latter half of a line.

Comand + Q
This will clear the entire Terminal by killing the underlying process.
Let's face it, you weren't getting anything useful done anyway.

Control + L
This will clear the entire Terminal screen you're working on, deleting everything.
The same thing can be accomplished by typing "clear" into Terminal.

Control + D
This will cause you to exit the current shell in Terminal.
The same thing can be accomplished by typing "exit" into Terminal.

Control + Z
Suspends what you are currently running in the foreground and makes it a sleeping background process.
Type 'bg' and hit Return to awaken what you were running as a background process.
Type 'fg' to awaken what you were running in the foreground.
Type 'kill %1' to send the kill signal to the first suspended job.

!!
This executes the last command entered. If you run into permission issues, try entering sudo before !!.

Control + H
Essentially the same thing as backspace, but it is useful if you want to stay anchored on the home row keys.

Top
Typing "top" into Terminal will display all of your active processes.
Similar to what you'd get from Activity Monitor, but within Terminal. Press "Q" to quit.

history + a number
If you've lost track of a command you typed earlier, you can type "history" into Terminal to retrieve a history of your commands. However, if you want to view a specific number of past commands simply type a space then a number after history. So, "history 5" would show you the last five commands you typed.

bind -p | grep -v '^#\|self-insert\|^$'
This shortcut shows the key bindings that are active in the current editing mode (Command mode and Insert mode have different bindings).

ls -ltr
Show an extended list of files, ordered by time of creation, in reverse order (most recently created last).

find . -name "*.php" -exec grep -l "somesuch" {} \;
Do a deep search for the string "somesuch" in all files ending with ".php", starting from the current "." directory.

Sunday, May 24, 2015

Has the Time Come for Software Cooperative CUs?

As we were departing php[Tek] 2015 last week, I asked my fellow attendees where they were heading. "London," replied Derick Rethans cheerfully, to which I replied with mock seriousness "Ah... that's a long drive." The look of confusion on his face told me that a crucial element was missing from the conversation - he didn't know me well enough to tell that I was joking. Open source is a lot like that. It can be difficult for small businesses in particular, to distinguish between technologies - and technologists - that presented a lasting opportunity, and those that had the potential to fall flat and kill a business model in the process. At php[Tek], as with most of the grass-roots conferences I've attended over the past decade, I recognized an emerging phenomena. It may not be so much a trend as a series of pieces falling into place in the economy and the community at large. Similar to what must have preceded the establishment of Credit Unions in the 1850's, there is an increasingly undercapitalized population relying ever more on applied software technologies. Open Source was a major component falling into place, not merely because it made certain software technologies cheap, but because it democratized access and learning about managing the technologies. Much in the same way, Credit Unions made it possible for individuals and small businesses in impoverished communities not just to self-finance but to learn to oversee and manage their own growth. Regardless of how accountants see software, creating and curating it is a primary factor in the success or failure of modern business operations. Yet even for those that are technologically skilled, the tangible and intangible capital costs can overwhelm the ability of any one business to maintain. Again, Open Source helps by lowering costs and making acquisition of skill levels feasible. Yet even Open Source can present too high a cost of adaptation and configuration management over time. What Open Source does not yet do, and seems to be about to do, is provide a way for neighbors in the technology community - providers and consumers - to secure the future of a software technology together. That is, I think formal cooperatives, or "Software Credit Unions," are about to emerge from the economic primordial soup we call the Market. Many if not most of the core technologies already have found homes in foundations, consortiums, non-profit charities, and public corporations. That's not what I'm pointing out. The applications of these technologies, which provide real value to business process stakeholders, are assets that are frequently constructed with non-trivial personal or business funding. A cooperative form of business would provide pooling of the capital investments, sharing of risks, and amortizing of maintenance costs and risks for members, as well as avoidance of "razing" of small intellectual properties when such small businesses close. If such organizations were formed under the same kinds of fiduciary ethics and practices as a credit union, it would be a boon to the future of technological small business clients and open source contributors alike. It would help define financial and legal standing for popular projects, help quantify the value of contributions, and support necessary but otherwise marginal projects for their members. A cooperative form can also help ensure that peer-review processes (already a part of open source culture) are enforced to members' quality standards and not to requirements of some ill-conceived third party. Software has already irreversibly infiltrated our lives. I don't think it is even possible that cooperatives akin to software credit unions can be avoided. It is happening now. The question is not "if" organizations that hold our software assets will exist. They do now. The question is whether any such organizations will hold a fiduciary role for consumers and producers alike as a membership organization in a credit union model, or leverage us all at a disadvantage like a bank.

Monday, May 4, 2015

Dangerous Domain Vocabularies

A very smart young colleague at work has been introducing us to concepts of CQRS, Event Sourcing, and Domain Driven Design (DDD). One of the more prominent values held by DDD is the pervasive vocabulary used by Domain Experts - ubiquitous language is considered to trump any other technical constructions.

As well it should, at least in established disciplines and where the business actually has resident expertise available. Even where inexperience is greater than the expertise, one still wants the professionals who are tasked with the responsibilities for the business outcomes to have a sense of ownership of the language.

But there are fallacies of belief that can be assumed as well:

  • Belief that a comprehensive domain language exists when it is not even a well formed vocabulary.
  • Belief that the semantics behind nascent language idioms are grounded, when they are cliches or abstractions derived from historical accidents (that is, legacy systems and environmental conditions that no longer exist). 
  • Belief that concepts of a domain model are part of some sort of mathematical reality that objectively exists above our own, unchanging and merely in need of discovery.
  • Belief that the ephemeral quality of language is not a significant factor when individuals move in and out of the domain.
  • Belief that the terrain of the problem space is substantially stable over the expected useful lifetime of the model.
  • Belief that domain experts' language never involves idiosyncratic forms that are self-inconsistent within a single bounded context.
It is the last bullet item that got me to thinking on this topic. A laboratory technician was describing to me a small dispute over a protocol in her lab one day. Two technicians were following two different procedures for diluting liquid samples. The terminology they had adopted was, for instance, to say that they were preparing a "one to three dilution".

It is more commonly expressed as a "dilution ratio of 1:3", and therein lies the problem. One tech said that means mixing one part of a solute to three parts of a solvent, and the other claimed (apparently consistent with the procedures used in the profession) that it means mixing one part solute to two parts solving and giving three parts of an admixture. The vocabulary, having been neglected and forgotten by many of the practitioners, is no longer clear.

Mathematically, the ratio "1:3" is like a fraction 1/3 and most people would think of "one part of something to three parts of something else" at the same moment in time. The lab professionals, meanwhile, have adopted an idiosyncratic interpretation, assigning "1" to the "something" and "3" to "one something plus two something elses" - that is, they compare a variable in a one step to a dependant value resulting from a subsequent step. 

Consider this:
Step 1: take 1 part salt
Step 2: take 2 parts pepper
Step 3: mix salt and pepper

The result of Step 3 is a salt-pepper admixture of roughly three volumes, or a 1:3 dilution of salt in pepper. But mathematically the 1 and the 3 are different units, 1 being a unit of salt and 3 being a unit of (1 salt + 3 pepper). The reality of the process is, further, that the entity described by the 3 doesn't exist until the entity described by the 1 and a derived value for an entity which is not made explicit are combined. That's like telling a cook how to bake a pie with an ingredients list that omits the filling and includes the whole finished pie itself. 

And don't think this is a trivial thing. People have no doubt died over the misunderstanding and confusion brought on by this one shitty little idiosyncrasy.