Showing posts with label historical context. Show all posts
Showing posts with label historical context. Show all posts

Wednesday, November 26, 2014

Reflections on "One Hacker Way"

"If the sovereign can realize the difficulty of being a sovereign, and the minister realize the difficulty of being a minister, then the government will be well ordered, and the common people will strive diligently after Virtue."

-- The Counsels of the Great Yu
Book of Documents as translated by James Legge

I am interested in anything which gets people's emotions on fire.  When I saw the twitter firestorm around Erik Meijer's presentation "One Hacker Way" I knew I had to see it for myself.


One Hacker Way - Erik Meijer from Reaktor on Vimeo.

It has been a few days since that viewing and overall I have to say he has some good points.

Is this the best presentation I've ever seen?  No.  Is every minute the best possible thing you could do we your time?  No.  Could it make you think about the way you do your work?  Most likely yes.

I got three points from the talk:

  1. We talk too much about code and do not write enough of it.
  2. Code which delivers value to someone is the ultimate goal, everything else is either giving context to the code or noise.
  3. We need to seek real feedback and adjust.
We talk too much about code and do not write enough of it.  Erik starts off the presentation asking his audience at a developer conference how many of them check in code last week?  He then tells those that did not that maybe they should leave.  Harsh but to the point.

There is a lot of talk about code in our industry, there are whole conferences and alliances around how best to get others to write code.  Do not take my word for it, read this blog post titled "Agile is Dead" by Dave Thomas an Agile Manifesto signer.  In his post Dave talks about how the term Agile has become meaningless, instead of following the principles leading to the Agile Manifesto a whole industry has formed to sell Agile.

"When the relationship between superiors and subordinates becomes disordered, at first the subordinates usurp the actuality (i.e. real power), but continue to preserve the name.  Once the usurpation has lasted for some time, though, the name is appropriated and usurped as well."

-- Wang Fuzhi
Commentary on Confucius Analects 13.14
Translated by Edward Slingerland

The term Agile has been usurped and has become meaningless.  At one time it did have a meaning and here is what it was:

Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan


-- Manifesto for Agile Software

Instead of prompting the left side of the manifesto the usurpers are selling the right side.  I believe this is is what Erik calls a disease of our industry.  Instead of talking about how to write code which delivers value and seeks feedback faster we are having people talk about tools, certifications, and overhead.

Code which delivers value to someone is the ultimate goal, everything else is either giving context to the code or noise.  This goes straight to the heart of the Agile Manifesto: "Working software over comprehensive documentation" and "Customer collaboration over contract negotiation".  If we are professionals then we need to focus on what the job is.  What is that job being asked of us?  Delivering working software with the features found through customer collaboration.  

We are not paid to move stickies across a board, we are paid to deliver working software which meets the customers needs.  This is what is meant by "Individuals and interactions over processes and tools" in the Agile Manifesto, tools and processes are to be used to reach the goal of working software which delivers value to the customer.  If you find that having stickies helps you in achieving this goal then use them.

"Our highest priority is to satisfy the customer through early and continuous delivery of valuable software."

-- Principles behind the Agile Manifesto

We need to "Responding to change over following a plan".  We need to seek real feedback and adjust.

"Business people and developers must work together daily throughout the project."

"At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly."


As Heraclitus would say, everything is in motions, everything is becoming, nothing is constant except change itself.  If we cannot change along with our customer's needs then we are dead.

Is "One Hacker Way" the greatest call to action ever?  No.  Do I agree with everything in it?  No.  Do I agree with most of it?  No.  Did I find the three main points valid?  Yes.


Sunday, September 21, 2014

First Look at the Future OR How Seeing the Wolfram Language Reminded Me of Watching ECW

"Arms, and the man I sing, who, forc'd by fate, 
And haughty Juno's unrelenting hate,
Expell'd and exil'd, left the Trojan shore.
Long labors, both by sea and land, he bore,
And in the doubtful war, before he won
The Latian realm, and built the destin'd town;
His banish'd gods restor'd to rites divine,
And settled sure succession in his line,
From whence the race of Alban fathers come,
And the long glories of majestic Rome.
"
-- The Aeneid, Virgil
Translated by John Dryden
Book I, Lines 1-10

"Wow!" that is what I have down as the main take-away in my notes for Strange Loop 2014's session, "Inside the Wolfram Language".  I walked away feeling, as I believe, Hegel felt as he famously saw Napoleon, "I have just seen the world sprit".*



In a time when designers are aiming for yet smaller and smaller frameworks and languages, Stephan Wolfram proudly shows what one can do if they think different.  The Wolfram Language combines language, algorithms, and data into one complete platform (I can assure you I have not nor expect to get anything for these words), giving the user a lot of power in one console.

What would a Hello World look like in such a language?



Yes, that is both code and execution in a tweet!

That is nice and all but how about something more in-depth?

Here is my own "Hello World" Wolfram Language tweet.



I used the build-in text of the Aeneid and computed a histogram on the length of the words used in the english translation.

Histogram[StringLength[ToLowerCase[ExampleData[{"Text","AeneidEnglish"}, "Words"]]]]

Let's break this line down.

First we get the words of the Aeneid in a data structure.

ExampleData[{"Text","AeneidEnglish"}, "Words"]

Next we convert all the words to lower case so we do not have to worry about "The" not matching "the".

ToLowerCase[ExampleData[{"Text","AeneidEnglish"}, "Words"]]

Then we calculate the length of the different words.

StringLength[ToLowerCase[ExampleData[{"Text","AeneidEnglish"}, "Words"]]]

Last, we graph the data as a histogram.

Histogram[StringLength[ToLowerCase[ExampleData[{"Text","AeneidEnglish"}, "Words"]]]]

Deploy.

CloudDeploy[Histogram[StringLength[ToLowerCase[ExampleData[{"Text","AeneidEnglish"}, "Words"]]]]]

https://www.wolframcloud.com/objects/de6c8dd1-d974-491b-91ca-996fc20af4cc

Done.

Not bad for a one-liner.

Just one more thing, if we tweet to the program to @wolframtap it will tweet back the results.




Very nice.


* Actual text from Hegel's correspondence to Niethammer, "I saw the Emperor -this soul of the world- go out from the city to survey his reign; it is a truly wonderful sensation to see such an individual, who, concentrating on one point while seated on a horse, stretches over the world and dominates it." (as quoted here)

Sunday, November 10, 2013

Code is Part of the Programmer and the Programmer is Part of their Code

"My songs cease, I abandon them,
From behind the screen where I hid I advance personally solely
    to you.

Camerado, this is no book,
Who touches this touches a man,
(Is it night? are we here together alone?)
It is I you hold and who holds you,
I spring from the pages into your arms—decease calls me forth.
"
-- Walt Whitman, Leaves of Grass (1891-1892, Deathbed edition)
So Long!, page 382

Being a programmer, a creator of worlds, is both humbling and invigorating at the sametime.  Everytime that I work my craft, I truly have endless potential, I could create something which changes lives or I could write a shitty monkey patch to just get something "done".  Even if it does not seem like it, the choice is always up to me.

Today, more so than any other time in human history, we software developers have created a small part of the world that exist.  Our creations have influenced and altered human civilization.  Don't believe me, post something to your Facebook that you know will get a response from family or friends.

When my first nephew William was born, my wife and I were let to see him only an hours or so after he was born.  I did what anyone else would do of my age group, I took pictures of him and us which I shared on Facebook.  Almost instantly I got a ton of likes and comments attached to these pictures, it then dawned on me that these were most likely the first images of Will that a lot of people would see.


And if you gaze for long into an abyss, the abyss gazes also into you.

-- Friedrich Nietzsche
Beyond Good and Evil, Aphorism 146
(generated from The Nietzsche Family Circus)

We creators of programs become part of our programs, which become part of us.  These programs become part of the user and the user becomes part of the program.  Thus, we programmers much like a poet, become one with our users and they become one with us.  This is really a humbling thing to think of.

Most of us do not work for Facebook or on code which is released to the general public, but our code is hopefully used.  When our code is used by someone or something it becomes a small part of that someone or something.  The point being, we become one with the world we consume and it becomes one with us.  When you stare into the abyss it stares back into you.

So what does this mean?  Which would you rather be associated with?


I have used my share of crappy software and third party vendor add-ons, when I use these "products" I cannot help but feel that the people who created them simply do not care.  I know this is faulty logic, in fact it is the fundamental attribution error, but still, WTF!  I am not alone in this feeling, in fact Uncle Bob recently blogged about his experience with Healthcare.gov and upgrading his Mac (neither of which were good experiences).

Becoming one with the world is not limited to programmer's end products!  This oneness with the world extends to their code they commit to source control!

At SCNA this Saturday, (November 9, 2013), Katrina Owen in her Here be Dragons talk linked the Prisoner's Dilemma to the development of software.  You see everytime you check in code you can either check in something that will be a pleasure for someone in the future (which might be you) or something that will cause a ton of swearing.

The choice is up to you, but the choice is even deeper than simply what you d.  Believe it or not what you check in influences other people.

Humans generally want to be cooperative and helpful to each other, but when crossed, O-boy the claws come out!  This applies to your code in the following way.  

Say that you are generally careful with your code and do all kinds of well thought of things (today that would be BDD, unit testing, "clean code", ...).  Others will see this and will most likely than not follow suit and raise the bar even higher.  The code base will generally become better overtime and general happiness will ensue.  The team will get along and will become happy with their code and the code will become better ...

What happens if someone has a bad day and checks in some crappy code?  One of two things could happen: either people retaliate with crappy code which could cause a downward spiral or they could let it slide, fix it, and continue checking in careful, well thought out code.


This my friends is the Prisoner's Dilemma!

With just one commit we have a simple Prisoner's Dilemma, but most programmers will work with each other for an undetermined number of commits across many days, months, years, and sometimes even decades!  This moves us from a simple single round of the Prisoner's Dilemma to that of an Iterated Prisoner's Dilemma.  In this type of game, the best strategy is what is known as tit-for-tat.

A tit-for-tat strategy:

1) start by being cooperative
2) do what the other player did

Tit-for-tat starts by being cooperative, thus starting things off on the right foot.  After the first cooperate, the tit-for-tat player will do whatever the other player did previously, thus if the player was cooperative the tit-for-tat player will be cooperative, if the other players defects, then the tit-for-tat player will defect. Defecting when the other player defects can lead to hell  A slightly more efficient tit-for-tat strategy will cooperate at random when in a defect spiral, this will allow for one to get out of a defect spiral, if one can.

With code (and everything else) things are not as simple as cooperate and defect, this is for many reasons, the most important one being not everyone agrees on what "Clean" and "Crap" code is, but we are humans and have a sense of being treated fairly and not fairly.  Thus, one can know if they are in a defect spiral or not.  If you find yourself in a defect spiral you can either see if things will change by issuing a corporate or simply leave.


Whoever fights monsters should see to it that in the process he does not become a monster.

-- Friedrich Nietzsche
(generated from The Nietzsche Family Circus)

If you are in a defect spiral, leave before you to become a monster and always start by committing well thought out clean code.  Thus, be what you want the world to be, for your code is more than just code, it is part of you and you are part of it.

Saturday, September 28, 2013

A View on Software "Best Practices"

"He is noble, wise, judicious, and best knows"
-- Shakespeare, Macbeth
Act IV, Scene II, Lines 16

Being in the software industry for a few years now, I've seen my fair share of "Best Practices" come and go: RUP, UML, CMM, Scrum, Agile, Lean, ITIL, ...  What you say, "Sir we have just starting using one of those 'Best Practices' you have said have come and gone and we have never been better!"  Perhaps.

"In his writings, a wise Italian
says that the best is the enemy of the good
"
-- Voltaire, La Bégueule

But sir you say, "What does a dead French man have to do with our newly implemented 'Best Practice'"!  Everything!

The best is the enemy of the good, in fact as Sir Robert Watson-Watts say, "Give them the third best to go on with; the second best comes too late, the best never comes"!  Surely I jest, the third best, why not just the worst or the worst worst, why even brother at all?!?  How could any enterprise live with the third best?!?

Question, do you even know what the third best would be for you?  Do you know yourself well enough to know if something is even the third best for you?
As the Temple of Apollo says, Know thyself!  Know thyself, one of Apollo's most deadly arrows.  I know you do not have time for philosophical crap, but the question is still valid.  If you actually know yourself, as you are now not as you want to be, it would be easy to chose practices that work for you.  Practices that work for you as you are now, as you are as a being in this time, at this place, in this context in history.

I know, no philosophical crap!  The point is that truly knowing, you cannot lose.

"If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle."
-- Sun Tzu, The Art of War, Chapter 3

As Sun Tzu says, knowing yourself is not enough to truly find a best practice (yeah, I just used that term again), you must also know the context in history.  What is the situation, who are the players, what is needed, what do you have, ...  In less words, the context in history.

"A very popular term within the IT community is 'best practice'. It's a wonderful marketing term, how could someone possibly argue about adopting a best practice, but does the concept really make sense? I'm not so sure. There are many examples where a practice that is considered "best" in one context is questionable within another."
--Scott Ambler, Questioning "Best Practices" for Software Development

Scott Ambler is championing context in history and knowing thyself.  There are many different ways to see things.




From one point of view, four 2x4s on the ground next to each other is the number 4, but from another point of view there are 3 open spaces created.  Seeing both points of views at the same time, one is able to chose which point of view is best for them in their current historical context.

Have we gone off the topic at hand?  What about Software "Best Practices"?  Today's "Best Practices" as a colleague of mine, Dave Smith pointed out,  "Today's 'Best Practices' are just the currently generally acceptable practices".



A Software "Best Practice" is often just something that can broadly work and has been attempted to be generalize and sold to different companies.  If you know yourself and know the context in which you exist, then you would be able to pick and chose the best bits of different practices that are applicable to you and your current context.  If you find that one does not work as you thought it would, then do as the old joke goes, "Doctor it hurts when I do this.  Then stop doing that"!