Friday, March 25, 2011
Wednesday, March 16, 2011
Thoughts Do Not End, and Neither Does Extra Code
Less is more.
It's a quite trite little maxim, but sometimes it really is true.One of the improvements I've made to our codebase over the last few weeks is to remove chunks of it.
We'd written the software following XP tenets, including YAGNI (that is, You Aren't Gonna Need It). Human nature being what it is, we inevitably fell short in a few places.
I observed that the product was taking too long to execute certain tasks — simple tasks that should have been near instantaneous. This was because they were overimplemented; festooned with extra bells and whistles that were not required, but at the time had seemed like a good idea.
So I've simplified the code, improved the product performance, and reduced the level of global code entropy simply by removing the offending features from the codebase. Helpfully, my unit tests tell me that I haven't broken anything else during the operation.
A simple and thoroughly satisfying experience.
So why did the unnecessary code end up there in the first place? Why did one programmer feel the need to write extra code, and how did it get past review or the pairing process? Almost certainly something like:
- It was a fun bit of extra stuff, and the programmer wanted to write it. (Hint: Write code because it adds value, not because it amuses you.)
- Someone thought that it might be needed in the future, so felt it was best to code it now. (Hint: That isn't YAGNI. If you don't need it right now, don't write it right now.)
- It didn't appear to be that big an "extra," so it was easier to implement it rather than go back to the customer to see whether it was really required. (Hint: It always takes longer to write and to maintain extra code. And the customer is actually quite approachable. A small extra bit of code snowballs over time into a large piece of work that needs maintenance.)
- The programmer invented extra requirements that were neither documented nor discussed that justified the extra feature. The requirement was actually bogus. (Hint: Programmers do not set system requirements; the customer does.)
What are you working on right now? Is it all needed?
Monday, March 14, 2011
Time for Sleep Once More
-----
I finished the American Mind audio course while walking at the Chattahoochee river trail after work today. The last couple of lectures were about the dissolution of "The New Left" in the 1960s, and then about Neo-Conservatives. I found it very fascinating that emigres from Europe were heavily involved in both the acculturation of the New Left and the Neo-Conservatives. What was most interesting toward the end was the observation that the left had sort of "missed he boat" when it came to understanding the human condition, at last as it applied to US culture. Its thought leaders, building on their own understanding of Marx, built their own philosophy on "Homo Economicus", or so-to-speak, upon the belief that people were driven, primarily, by economic motivations and that they would want to see a revolution i the social structure that would give them, and society at large, a better deal compared to the power-brokers of industry and capital. However, what the Neo-Conservatives understood, and "capitalized" on when Reagan brought them fresh-faced into his administration was that people are driven more by a larger identification with their "culture". And, part of the American self-identity is a belief in social mobility afforded to them through the existing capitalist system.
At least, that's how I recall what I heard at this moment.
There is much more about the course that fascinated me, but I'm not very skilled at pouring out detailed reviews of facts from things I've just read or listened to. You'd have to listen to it for yourself. But, let's just say that these are some of the highlights popping to mind so far:
- The development of "Pragmatism", out of William James' and John Dewey's life and work, and how this "philosophy of practical utility" continues to this day.
- A number of scientists, including Albert Einstein, who regretted the development of the atomic bomb. Einstein said if he had known Germany would not have succeeded, then he would never have alerted Franklin Roosevelt in 1939.
- Apparently, some American scientists freely gave instructions to Russians after WWII about making atomic bombs, in hopes that the Russians would develop a bomb and thus force the United States to become more balanced. (Cannot remember the names of them)
- I guess that "worked", but thankfully the Cuban Missile Crisis didn't leave the world toast.
- The development of university science labs in the late 1800's following the models of German universities, in which corporations often provided the initial funding, and ultimately became the "breeding ground" for the labor needed to power corporations.
Excerpt:
Karl Paul Reinhold Niebuhr (pronounced /ˈraɪnhoʊld ˈniːbʊər/; June 21, 1892 – June 1, 1971) was an American theologian and commentator on public affairs. Starting as a leftist minister in the 1920s indebted to theological liberalism, he shifted to the new Neo-Orthodox theology in the 1930s, explaining how the sin of pride created evil in the world. He attacked utopianism as useless for dealing with reality, writing in The Children of Light and the Children of Darkness (1944):
- "Man's capacity for justice makes democracy possible; but man's inclination to injustice makes democracy necessary."
His realism deepened after 1945 and led him to support American efforts to confront Soviet communism around the world. A powerful speaker and lucid author,[vague] he was the most influential religious leader of the 1940s and 1950s in American public affairs.[citation needed] Niebuhr battled with the religious liberals over what he called their naïve views of sin and the optimism of the Social Gospel, and battled with the religious conservatives over what he viewed as their naïve view of Scripture and their narrow definition of "true religion."
Some time ago, Speaking of Faith had an episode called "Obama's Theologian", about him. Here it is: http://being.publicradio.org/programs/2009/obamas-theologian/Sunday, March 6, 2011
The Corporeality of Spirit
Wednesday, March 2, 2011
Sleep Comes Late
For me I have the feeling that while I'm not sure how long it's going to take to become successful with it, I know we will become successful. I feel this way because we are flexible and adapting to change very rapidly already.
Sleep!
Sunday, February 27, 2011
PBS God in America
I have to admit, I find it fascinating to think about what causes people to believe the things they believe. Or, maybe I should say, I'm fascinated by listening to people explain the reasons for what they profess to believe.
I grew up respecting the parables and wisdom embodied in many religious texts, from Christianity, to Hinduism, to Buddhism, but not a follower of a creed or dogma. I am growing more and more interested in seeking to understand why individual people believe different things that emanate from their own religious or philosophical vantage point. It's important, I believe, not to look at religion as a "virus", something vile and despicable with an attitude like the so-called "New atheist" writers espouse. It's better to examine religion for what it is, and it is often changing.
I've started to listen to a course called "The Birth of the Modern Mind", which is a brief history of The Enlightenment, but I have not gotten very far yet. There are so many courses and materials I want to take and read.