May 29, 2008

Digital pictures and probes

Lead in toothpaste, poisoned food. What next you ask ? Your identity.
Some digital picture frames contain a Trojan that disables poplular anti-virus software, scans the computer for sensitive information and then regularly emails the information to a remote host.The code is hardwired into the digital frames flash drive and activates upon USB connection. Heres's the original story and Richard Clarke on NPR about his book "Government Failed You on Security".

May 14, 2008

Open-source software economics revisted

A few years back Bryan Cantrill tried applying micro-economic theory to open source software. When I read this in 2004,it seemed simplistically plausible in Sun's strategy to open source its software stack (Java application server et al). Based on Brian's reasoning, one could infer (all else being equal) that given the supply side reduction in cost, the demand from customers should increase along the curve (e.g from P0 to P1 or P2), decrease for competitors offerings, or force competitors to lower price and eventually give away their software as well.
And since theoretically there is no change in the fixed costs, the supply curve simply shifts to the right for the "disruptive" drivers. In essence there are more enterprise customers flocking to Sun's free software and paying costs P1 or P2 for hardware or annuities like subscriptions or support.
Skip forward to 2008 and the theory doesn't seem to pan out. Why ? Well, revenue from supposedly complementary products like hardware, support, services and education to all this free/open source software don't seem to be reflected in earnings reports here and here.
The numbers all seems to vary around a flat line (before adjusting for inflation) like the graph on the right ('08 till Q3). Perhaps the demand curve has shifted to accommodate the lower price ?Meaning customers that were using the software before, are still using it but only playing less, and potentially not buying any complimentary services and no disruption has occured in the marketplace. Or alternatively the software stack being distributed for free, is a part of a competitive marketplace in which price is not really as big a differentiate as it is made out to be, i.e a somewhat inelastic (with what Brian called the FYO being waay up there). Customers are already entrenched with competitors who offer other marginal benefits, complimentary products or innovation driven by the revenue stream. Or perhaps lowered costs have led to lower perceived quality, thus reducing demand. Or perhaps competitor brands are stronger. Or perhaps by lowering the price floor shifted the competitor marketplace to one already dominated by other established brands (eg JBoss, Apache, Linux et al). Or perhaps everything else is not really equal -like organizational inability to tie and cross-sell product offerings in a unified portfolio. Or perhaps the very premise of using a loss leader to drive revenue in an Enterprise environment is fundamentally flawed. It may work for shaving blades and video games, but it doesn't work for servers and middleware in the long run.

Apr 27, 2008

It is what it is

The recent "It is what it is" Dilbert stip echo'ed what I often hear . What does it mean ? Urban dictionary to the rescue one again ...

  • A phrase that seems to simply state the obvious but actually implies helplessness.
  • A phrase that seems to simply state the obvious but actually means "it will be what it is," as in "it ain't gonna change, so deal with it or don't."
  • A cliche.."It's happened. 'I'm going to forget about it. I'm going to move on. There is nothing that can be done about it."
  • Used often in the business world, this incredibly versatile phrase can be literally translated as "fuck it."
  • What incredibly vapid, stupid and unoriginal people say when they cannot construct a proper thought, retort or sentence
  • "this is the way its going right now, and thats how it is." kind of a way to say: dont overthink the situation. a reminder to keep things simple, dont overanalyze things, or a way to put a definition on something thats hard to explain.
  • Describes something that can not and does not need to be changed or will not be changed, but is generally not important enough to fight over and can be overcome
  • Used primarily to cause confusion to the listener.
  • A term popularized by the people of Los Angeles. It connotes that the truth is simply that... the truth. Deception of the truth will only piss people off down the line, and you don't want to piss people off, who knows you might get shot.

Apr 26, 2008

Sub-prime primer

This sub-prime primer explains the sub-prime mortgage situation. Funny and to to the point. Perhaps someone should post another preso on why mortgage rates are rising amidst Fed cuts.
And here is a Ira's show on This American Life. I like the part where the guy says "I wouldn't give me a loan, let alone $540K"

Apr 5, 2008

Drive-by Google

Google's street level mapping initiative has expanded beyond its initial CA launch last year.. That van driving by slowly may well be a Google contractor. Here's a street view of Boston.
And people have already found reasons to sue .

Mar 9, 2008

Ringing corneas

It was bound to happen sooner or later. A contact lens that will project images to signal a phone call, email and maps. Businessweek says researchers at University of Washington are testing the lens on rabbits. Two questions - How do rabbits read the optometrists chart and when can I expect to drive with these on ?

Mar 6, 2008

High water

"A vast array of pharmaceuticals — including antibiotics, anti-convulsants, mood stabilizers and sex hormones — have been found in the drinking water supplies of at least 41 million Americans, an Associated Press investigation shows". Now I know why I'm constantly thirsty.

Feb 29, 2008

Groceries & technology

The local Stop&Shop has introduced an interesting twist to the self check-out line. Handheld scanners for customers. You pick up the items, scan them, hit done on the way out and scan your credit card. Nifty ! The Motorola scanners run Windows mobile (specs here) and are hooked up to the checkout kiosk via a wireless network. Would be cool if was also hooked upto their Peapod system . That would allow customers to go in, scan items and have them automatically home delivered. A lot more palpable business process optimization than Webvan of yesteryear's.

Feb 28, 2008

Submarine cables

The recent news about undersea cables getting severed by ships prompted someone to ask -"what cables" ? Contrary to popular belief, the majority of Internet connectivity is achieved through cables, not satellites. A submarine map of the current global cable network can be found here. As shown, India is connected to the Internet via a submarine backbone through the Suez.

Feb 2, 2008

Calvin & Hobbes - simple answers to complex questions

Click to enlarge Click to enlarge Click to enlarge Click to enlarge

Jan 20, 2008

Valley boy

In this semi-autobiographical book Tom Perkins talks about his boardroom experiences (some controversial momemts) and parts of his personal life. Its a really slow read at times. If you're someone like me who wanted to know more about his experiences and his part in the HP story then its worth the read, otherwise its really just another paper weight.

Jan 2, 2008

Chimps vs. grads

"Chimps performed about as well as college students at mental addition, U.S. researchers said on Monday"..."Her study pitted the ape math team of Boxer and Feinstein .....with 14 Duke University students." I m not sure what this means for my friends who are about to graduate from Duke :)

Dec 17, 2007

China Road

Rob Gifford's presents a unique perspective on life in modern day China with China Road. The book is not about the usual economic propaganda, but it takes a deeply humanist and compelling look at the realities on the ground, from entrepreneurs to the AIDS epidemic and spawning churches. Its one of those rare non-fictional books where the writing and vivid descriptions transport the reader there, with the author, on the six week, 3000 mile journey from Shanghai to Kazakhstan across Route 312. The analysis of the interplay between the political system and economic growth seems spot on as well. I really liked the last few lines which represented the tone of the book "Hope cannot be said to exist,nor can it be said not to exist.It is just like the roads across the earth.For actually there were no roads to begin with,but when many people pass one way a road is made" (Lu Hsun, 1921).

Nov 11, 2007

Global warming lesson

What We Know About Climate Change is the pocketbook version of a history/science lesson in non-scientific terms and simple language. I found a copy in WBUR's studios and this is going to be my holiday gift for a few friends who still dont seem to get it.

Nov 8, 2007

Rate fluctuations

I first encountred the term "Fed" in a conversation with James and Don back in '98 and didn’t really understand or particularly care about rate fluctuations.
This week I managed to go through Age of Turbulence in one long read on a train ride to NY. As per the introduction, the first half of the book is a recap of Greenspans life. While intersting, it was of no particular interest to me. The second half is where the real meat lies. It provides a holistic overview and insight into some of the decisions and the role of the Fed, the economy and the intricacies of global markets, natural resources, terrorism.... the list goes on. In particular the analysis of the Indian economy and its associated problems like the "license-raj" and corruption are noteworthy (and quite accurate). He manages to carefully decompose the issue and explain why in four decades India’s per-capita GDP went from being equal to China's to less than half and still declining. There were three discussions that immediately resonated with me. First was the notion of happiness being relative (rather than absolute) and often judged in reference to a peer group, associated conspicuous consumption and its place in capitalism. This reminded me of Allain De Bottoms philosophical discussion of "Theory of Leisure class" in Status Anxiety. The second was the discussion on capital shift and the example of GM and Google. He described how in the bigger picture, GM was laying-off employees to direct cash flow to pension funds which in turn were investing in Google -ie "creative destructionism" (dismantling defunct businesses and reapply resources elsewhere), this reminded me of Thomas Friedmans description of how US jobs were being lost to outsourcing, but the money earned by outsourcee's was spent consuming products from the US. And the third was a discussion on IP protection of ideas by states, and circumstances in which such protection violates another’s right (e.g. to live!) then they can’t be protected, this reminded me of a conversation I recently had with an lawyer friend about pharmaceuticals... Overall, the second half of the book is really worth reading. Given the breadth of the coverage and sometimes obscure language, I might need to re-parse it again someday.

Nov 2, 2007

Versioning enterprise services

The Nov issue of the SOA jounal includes my paper on Versioning web services in the enterprise.
Online here and the digital edition of the printed journal is here.

Nov 1, 2007

Whats behind your Gap?

Its a sad fact that child labor is prevalent in India. When you're surviving on less than $1/day with a corrupt and apathetic government, then you're naturally susceptible to exploitation. But US corporations should know better. They talk of social morality and corporate responsibility, but will cut corners or turn a blind eye to make a quick buck or boost quarterly numbers, and respond with "plausible deniability" when caught. This time, its Gap: they got busted using child labor in Delhi, ironically, to manufacture clothing for sale in "Baby Gap". The clip on the left is from Boston Globe's 10/30/07 report. Heres the original post from Observer. Gap has an official response on their website here.
So the question is - knowing what you know now, are YOU going to think twice about shopping at the Gap, or will you conveniently forget and trade morality for the comfort of $59 jeans ?

Oct 27, 2007

Whats in a name

Sameer समीर... Noun(1)
हवा, वायु, पवन, अनिल, मरुत्, पौन, बयार, समीर, बयारि, पवमान, अजिर, अध्यर्ध - प्रायः सर्वत्र चलता रहनेवाला वह तत्व जो सारी पृथ्वी पर व्याप्त है और जिसमें प्राणी साँस लेते हैं "हवा के अभाव में जीवन की कल्पना नहीं की जा सकती"

Oct 21, 2007

Gandhis sons

Everyone knows Gandhi, but not everyone knows that he had four sons and what would be considered a dysfunctional relationship by modern standards with them, especially the eldest. Heres some information from Peter Ruhe about his them and a book about his first son (Harilal Gandhi-A life) and another book by his second son Manilal (Gandhi's prisoner). RecentlyHarilal rather sad life has been explored in this (artistically embellished) movie.

Oct 4, 2007

Mashups

My respected friend and past colleague John, has written about SOA and mashups in "Implementing SOA Without Enterprise Mashups? You Might As Well Kiss Your Job Goodbye!". I m not sure I agree with him because first, this seems like the IT version of Fox News fear mongering to subliminally push a product, and second, theres no baseline definition of "mashup".

If you dont believe me, walk around the office and ask five of the smartest guys you can find, and "mashup" will mean different things to each of them. Wikipedia defines mashups here and heres a ZDnet mashup 101 whiteboard session. "SOA mashup" is a new twist.

Call me jaded, but this seems like old wine in new bottles. You could take any article or writeup about mashups and replace the term mashup with "xyz remoting", "Web Services", your favourite "WS-*" standard, "xyz services", "SOA" or "SOA mashup" and an eerie timeline will emerge.
It's vendor marketing like this which leads to "Info-management".

Oct 2, 2007

Rethinking work

Picked this up at NPR's fund raiser last month. The book does a decent job of getting the reader to be more introspective. The diccussion about inner and outter economy made sense, but I tuned out somewhere in the middle. I couldnt identify with his approach (eg the way he encourages clients to cold-call peers etc). His other book "We Are All Self-Employed ", was referenced multiple times and seemed worth scanning through.

Sep 27, 2007

iPod and its Indian chip

Some friends didnt believe me when I told them that their iPod was based on a chip designed in India. So here is the link to the original story and another one. The company was Pinexe Systems India, outsourced from PortalPlayer, which was later acquired by Nvidia. Here are the technical details on the inside of the first iPod line. Before you decide to open yours up -the newer(?) Nano internals are here. Same design, different company and lower cost. Thomas Friedman also talks about this in his book

Sep 19, 2007

The No Asshole Rule

Stanford professor Robert Sutton provides insight into the corporate jungle in this humourous and thoughtful book -No Asshole Rule. He differentiates between temperory and “chronic” or “certified,”a-holes, provides identifying traits, strategies for dealing with them and ways of not turning into one yourself. Excerpts can be found on this blog. The book mentioned the MIT's Jerk-O-Meter - wish they sold this gizmo at Circuit City!

Sep 12, 2007

Personal information for $3

I recently purchased a tin of cookies from a local RiteAid, the item was marked as $3.00 off. Come to find out at the register that its a mail in rebate and I have to go online to get the $3 discount. Fine, so I go here and find out that a) you need to register b) enter your information and c) enter information from the receipt which includes the location,transaction number,and time of purchase. Right before I hit send I realize that for a mere $3.00, RiteAid now knows who I am, where I live (and of course has my email), and has my credit card number. In computer security lingo - has formed an identity by associating a principal to a subject via a transaction. Interesting.
Maybe its the consultant in me, but, if the software guys have done their homework, they should now be able to track what I purchase at the point of sale, determine my shopping habits using patterns and track my browsing preferences on their website. If the marketing guys have done their homework, I should expect to see more spam in my email and mail box. If the corporate guys have done their homework, they will recoup and probably turn a profit - by sharing my information with their business partners & agents. If the legal guys have done their homework, I probably consented to all this somewhere in the small print when I selected that "terms of service" check box in the website sign up process.
Suddenly I feel used ! That box of cookies that I paid for, and getting back $3.00 of my money doesn't seem like a fair exchange.
By the way, there are meta-aggregators like ChoicePoint who are in the business of associating multiple transactions, financial or otherwise, and other records to an identity. So even though a no-body like me is a mere drop in the statistical ocean, it seems a lot of people are interested in deep sea diving.

Sep 9, 2007

Integrating services & UI's

A litter over a year back I looked at DWR integration with web services. Things have evolved a bit since then. Version 2.0 of DWR has been released and now JAX-WS supports JSON
This new extension allows you to define a binding annotation on the implementation, which generates something that resembles a JavaScript webservice proxy. The service can be accessed via url?js like the usual url?wsdl. The data type marshalling seems to plug in directly into the jax-ws marshalling layer with Jettison and the switch occurs via a content-type=application/json header.
So I thought of plugging this into my earlier Flex example since Flex has support for JSON via an add-on corelib. It worked after some hit-n-trial but occasionally there were runtime exceptions possibly due to bugs somewhere in the Flex<->JSON<->Java marshalling chain. Still, this should be of interest to those looking for techniques to integrate services directly with UI's.

Sep 4, 2007

Value congruence

Was reading up on value congruence recently. Its an interesting theory that looks at what impacts an individuals level of job sastification. The basis is the notion of P-E alignment - ie how well does the Person and individual values/goals/path mesh with those of the Enviornments. Derivaties are PP (Person-Peer), PJ (Person-Job fit), PO (Person-Organization) and PV (Person to Vocation). "Making Vocational Choices" looks at this and other factors in detail.
As analyzed here, most individuals go through an explicit or implicit loop in early in their career until they find the right fit and a level of comfort. I would argue that is this isnt as static as proposed,but instead, for some individuals the loop shown below is continuous, though tapering with time. For others, there is no loop ~! There is also the notion of individuality as pointed out here and why some seek out heriarchy enhancing (HE) while others are attached too herarchy attenuating (HA) organizations. Other interesting perspectives can be found here

Sep 3, 2007

Truth

On Truth is Harry Frankfurts sequel to Bullshit. His essay examines the value and importance of truth as well as the objective reality of truth vs opinions - one way of essentially bs'ing by falsely interpreting facts. The two parts that struck me were his discussion of Spinoza and that of lying. How people who lie disassociate from reality because they conrstrue one that is invisble to others. "Lies are designed to damage our grasp of reality. So they are intended,in a very real way, to make us crazy". An interview with the author on NPR can be found here.

Aug 31, 2007

Hansen's art

Phil Hansen has a unique style. If this isnt creative genius, then I'm not sure what is. This guy needs to go in a gallery or a road show so that more people can experience it in person. What's interesting is not just the art, but the time elapsed videos and description of how the pieces are created with the macro-micro contrast. My favourite is "Daudi", the rest of his collection, as well as live studio cam is here. This isnt some photoshop generated print, this is real art.

Aug 8, 2007

Businesscards & statements

Hilarious stuff from Hugh's back of the businesscard & Microsofts blue monster series.
Some can actually be ordered online here

Aug 6, 2007

On Bullshit

Bullshit sourrounds us everday and everywhere;its almost like ambient noise . "Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted". What would happen if you got a professor of philosophy to write an essay on "Bullshit". You would land up with a detailed, funny and at times academic, analysis of the topic.

Aug 1, 2007

Hegemony or survival

I picked this book up long time ago but never got to it. It came out in 2002/3 but the text somehow seems more relevant today.MIT professor Noam Chomsky's work is a captivating lesson in political history. At the onset it lays out the concept of two superpowers, the US (state) and the world opinon. The book puts into context an "imperial grand strategy"-in which the former has maintained "its hegemony through the threat or use of military force." He offers a cautionary look at where we may be headed as a nation and the growing threats to world peace and personal freedom. "One can discern two trajectories in current history: one aiming toward hegemony, acting rationally within a lunatic doctrinal framework as it threatens survival; the other dedicated to the belief that another world is possible". A review can be found here and a video of the author found here.

Jul 30, 2007

Flex & Web Services

I remain disappointed with the Web Services support, or lack thereof, in Adobe's recent Flex 3.0 beta release. Dont let this document fool you, that GUI hasnt been available for a long time. It was there in the original Macromedia release only. If youre building a RIA thats consuming web services, and I mean real-world web services - not the hello world or getXXX services that only pull data - Document Based Web Services that send and receive requests, responses and faults based on anything beyond a very simple XML schema, then you're in for a surprise. For example, consider a simple purchase order Web Service (like this one) that send a po, gets a status or a fault, heres whats involved from a high level.
  • Once you have the nice flashy UI up, you include a web service MXML tag which references the web service by mapping WSDL to that tag (detailed IBM doc here)
  • Then figure out what the exact SOAP request looks like (careful with the namespaces etc).
  • Map UI input into above request structure by writing Actionscript.
  • Send the request.
  • Map reponse and fault structures into corresponding UI data elements with Actionscript

If you dont understand the complexity of step 1-3 above, consider the underlying gymnastics , outlined in this link (from Flex documentation), to write MXML which generates a SOAP request like listing 15 with a variable number of LineItems. You have to write a some other client first to get capture the soap request structure, copy-paste it into the script and then code to bind request/reponses/faults to UI element and objects (theres a for-loop involved in adding the various line items)
Does that mean real-world Flex based Web Service RIA are hard ? Without significant architectual foresight, perhaps yes; Harder than the general Architects perception, mostly created by the plethora of hello-world type demos floating around and the tremendous marchitecture leading to info-management. Perhaps with Introspection wizards slated for M3 this will change. Those disagreeing should take a shot at developing an out of the box Flex client for web services based the of the UBL or STAR schemas.

Jul 28, 2007

Life in the woods

Browsing around the shelves I found Henry David Thoreau's book Walden or Life in the Woods (also available online). The book is a detailed account of Thoreau's project of living in semi-seclusion, in his self build cottage at Walden pond (Concord, MA). I found it to be a hard read, like most original authors of the past century. He provides insight into what a simple life is - and makes you think about the contemporary mindset of super-materialism and status-seeking. A great review can be found on the Walden site here.
A few para's from the book stood out -this one in particular -

"The mass of men lead lives of quiet desperation. What is called resignation is confirmed desperation. From the desperate city you go into the desperate country, and have to console yourself with the bravery of minks and muskrats. A stereotyped but unconscious despair is concealed even under what are called the games and amusements of mankind. There is no play in them, for this comes after work. But it is a characteristic of wisdom not to do desperate things"

That phrase; "quiet desperation" - reminded me of a Pink Floyd song - Time !

Jul 22, 2007

Personality testing

Similarminds.com has a few different personality tests online inluding the Jung and Cattell 16PF surveys. What they dont have is the Jenkins Activity Survey which has been used to identify Type-A personalities. Quite a few individuals I have consulted or worked with could clearly be put into this bucket - amped up caffeinated coronaries waiting to happen. So imagine my surprise when I came across this article titled "Personality factors underlying coronary prone behavior patterns among employees ", which is based on the JAS questionairre, in the Journal of Business & Psychology

Jul 10, 2007

Nature vs Nurture

The Nurture Assumption is another interesting and entertaining gem. Authored by Juddith Harris it provides insights into behavioral development. The theory challenges tradional beliefs that parents are the most important factor in development, by postulating that what children experience outside the home, in the company of their peers, matters more than anything else - i.e Parents don't socialize children; children socialize children.

Jul 6, 2007

Lucifer Effect

The Lucifer Effect is Prof Philip Zimbardo's detailed account and analysis of the Stanford Prison Experiment . He deconstructs the experiment and analyzes other social experiments like the Milgram & Asch studies as well as examples of human behavior like the Nazi's, Rwandan, Nanking genocides as well as Abu Ghraib to present a unique insight into the capabilities of the human mind. He reinforces the idea that situations and systems, not individuals, transform behavior and personality. Towards the end the book he provides a a discussion on how individuals can resist temptation in the form of a behavioral paradigm shift. Quite an interesting read !

Jun 28, 2007

Flat worlds

Recently finished reading The World is Flat which has been in my reading pile for a few months now. It explores how business is changing because of reduced friction, boundaries and flattening of the world, and more importantly how people need to think differently in order to remain integrated in this new world. I think people who haven't been to India or exposed to the technology sector there, really do need to read this. For me the book was an affirmation of what I already knew, observed and grew up in rather than a revelation of how the world is changing. Light reading but quite captivating. Would also recommend seeing the 1-800-India documentary.

Jun 9, 2007

Level of Estimate


As an architect, consultant and manager a common question on a project is - "how much and how long". You need this upfront to make investment decisions, manage risk and negotiate trade offs. If you don't have a well defined methodology in place this can be tricky. Especially when you're putting together an initial proposal or statement of work. Generally speaking software cost estimation can be divided into nine key areas and theres an entire shelf of books out there dedicated to each of the items.
  1. Sizing project deliverables
  2. Selecting relevant activities
  3. Estimating staffing levels
  4. Estimating effort in terms of staff hours or staff months
  5. Estimating project costs
  6. Estimating project schedules
  7. Estimating defect potentials
  8. Estimating defect removal efficiency
  9. Estimating maintenance after deployment of the initial release.

Heres what I have personally tried between various projects.
Cocomo: While pursuing my masters at USC I attended Prof. Barry Boehms's courses in software engineering that covered COCOCMO in quite a level of detail. A mathematical model (and tool) can be used in conjunction with iterative development methodologies to come up with educated estimates (that account for things like code reuse, risk, team cohesion, process maturity etc). Check it out !
Use case based: Developed by Gustav Karner (Rational fame). It relies on four crtical inputs - Weighting of actors, use-cases, technical factors and project participants. This paper summarizes the technique quite nicely.
SoP: Ie Seat of Pants. Least accurate but most commonly used. The distilled approach involves something like this . Determine number of use cases and test cases - rate them on complexity and decompose the use case into tangible, estimatable entities.( this of course makes an immense assumption that you know what the architecture is going to look like). Start counting - anything tangible that can be decomposed and correlated to size - in tiers and layers . (Database sizes, EJB's, JSP's, Webservices, Interfaces, external actors and interactions, classes, existing code, frameworks etc... ). Refine and estimate both best case and worst case for each of the estimatable entities. Make sure you differentiate between targets and estimates. Calibrate using historical, industry, group or other data. Average the two cases, add a buffer and voila - you have a number that the boss can use !!
The problem with doing this upfront rather than during early elaboration is - you got it - where/how do you mitigate and factor in architectural risk ? Plus you've baked in some heavy architectural and project assumptions - which may not necessarily be true.

Consulting Lesson#126. Use the McKinsey MECE approach and get multiple groups to come up with estimates wherever possible. The results can be interesting at times.




Jun 3, 2007

Enforcing contracts in Java at runtime

Recently I was particularly interested in class invariants - assertions that must be validated when the class is instantiated and verified when the public methods are invoked (not sure what happens in multi threaded cases). Starting with Java 1.4 there's support for assertions but its rather weak and relies on developer capability to check and throw exceptions for public methods (the guideline is that assertions should not be used in public methods and can be enabled/disabled at runtime). The FAQ answers some questions about why this route was taken a few years back and some techniques on using asserstions. Java still doesn't have full blown Design by Contract support built into the vm or compiler and the age old RFE lists various valuable alternatives and opinions.

Oh well !. There are various techniques and tools for building contract related assertions but to me the cleanest and slickest one is Contract4J. It uses a combination of annotation-based syntax and the use of AspectJ's load time weaving .

Interestingly the folks over at Microsoft seem to have taken notice of this and have come up with Spec# which still seems to be in pre-production.

May 28, 2007

As seen on the "internets"

May 24, 2007

ITunes art work & Amazon Web Services

I found a nice little utility to import graphic artwork directly into mp3 tracks in iTunes using the Amazon Web Services toolkit.
Under the hoods: Essentially its a VB executable that uses the iTunes COM SDK. One selects the tracks in iTunes, and it detects the selected tracks, makes a call Amazon (via the to the Amazon web services interface) and updates the tracks with the artwork.
Nifty indeed !

When good managers turn n'blog

Strip speaks for itself
No comment !

May 20, 2007

Validation with Aspects & design by contract

Recently I ve been exploring some options for doing validation on objects (potentially JAXB classes). I ve done this a few times before over the years with custom frameworks and there are several out there in the public domain including Apache's, Vlad, JGoodies to name a few. All of these really didn't fit what I really wanted to do - which is separate out the concerns from our domain objects and do everything declaratively. After a bit of thought here is what I came up with using AspectJ
  • Define annotations for syntactic validation (annotations that can be overridden by custom XML)
  • Weave the domain objects with point cuts for methods that return state to validate that state.
  • Apply advice in the Aspect
I was starting to roll my own framework (yet again) when I came across Oval - it did everything I wanted to do. Another example of similar solutions to similar and repeatable problems - aka -
"Great minds think alike, fools seldom differ".

From a design perspective it allowed me to apply pre-conditions, post-conditions and use invariants.From a code perspective, I could annotation properties, specify constraints for class fields and getter methods, validate objects based EJB3 JPA annotation, overide annotations with XML files,express constraints using scripting languages such as Groovy, BeanShell, and JavaScript as well as create custom constraints.

May 3, 2007

Alain de Botton on Status Anxiety

Alain de Botton's treatise on Status Anxiety is an interesting read. Status Anxiety discusses the desire of people in many modern societies to "climb the social ladder" and the anxieties that result from a focus on how one is perceived by others.The jist of the causes and solutions presented are as follows
Outlined Causes
  • Lovelessness :Desire to rise in social heirarchy is not rooted in material wealth but in attention and love received as a consequence of high status
  • Expectation : Explores Equality expectation and envy. The reduced levels of deprivation in western society and the correlation with increased sense of deprivation. Concepts of envy amongst peers and William James's Self Esteem =Success/Expectations theory.
    Jean Jacques Rousseau's..."wealth is not an absolute. Every time we yearn for what we cannot afford we grow poorer..." "..two ways to make a man richer. Give him more money or curb his desires.."

  • Meritocracy : How society has changed from " Poor are not responsible...low status has no moral connotations... rich are sinful..." to "Rich are useful... status does have moral connotations... poor are sinful and ow poverty to stupidity". Results of meritocracy is to add shame to the injury of poverty.
  • Snobbery : "...Sine Nobilitate". A focus on "what we do. The historical and emotional penalties imposed on those bereft of importance."
  • Dependence: " On fickle talent, luck, an employer, an employers profitability and the Global economy"
He reasons that the underlying solutions are :
  • Philosophy : Follow internal markers and acknowledge public opinion to discern superficial nature
  • Art: Mathew Arnolds theory on how art is a criticism of life...how Art "does not tell us why moral priorities are important but shows us in the context of a story...". How art inspires awe in simplicity. How if we "imbibed the lessons in Tragic art...the consequence of our failures wouldn’t weigh on us so heavily".Comedy and how it "questions status and makes sense of our anxieties"
  • Politics: How the honor system has changed over time. Discusses wealth and status, adversity and the consumer culture. How Ideology "subtly promotes a bias while appearing neutral".
  • Religion : Discusses the sobering effect of death, reorientation of priorities, community and spiritual growth.
  • Bohemia : An Intense life of the mind.. "lends legitimacy to those unwilling to comply with dominant notions"... Thoreau on "rich in proportion to things you can do without"

Apr 16, 2007

Cruisecontrol

I recently took a shot at setting up CruiseControl . I picked this over Hudson (which I would recommend any day in place of CC) mostly because it had in built support for StarTeam and other projects were using it already. There are a few nuances though.
  • In order to enable star team you need to build it from source. getting the binary distribution is not good enough. Here are the steps.
  • Support for dependent projects, you need to make sure that the log file for the parent is present, and do this
  • The build thread still seems to poll the projects at the schedule (and polls every 5 min if you don't specify the schedule)
  • If your project is a Junit test only project, you have to fail it explicitly in the ant build file using for it to be reported as failed in CC.
    <junit printsummary="withOutAndErr" fork="true" haltonfailure="false" errorproperty="test.failure">
    .......
    <fail message="Failing target as Junit tests failed" if="test.failure"/>
    </junit>
  • Spawning processes before and after a build is a pain. I wanted to start an app server, run the test and stop it. This turned out to be impossible - If the build fails, the next task isn't called.
  • You don't see the ant output real time or in a log anywhere. Eg if I run a build, I want to see or have the ant console output logged for that build. Hudson does this very nicely in realtime.This is actually not really possible in CC. It uses ants logger and overwrites the log every time. Anyhow, I tweaked CC's main.jsp to use Ant supplied XSL on the CC log file since they seem to have a similar format.
    <cruisecontrol:tab name="antoutput" label="Ant output">
    <cruisecontrol:xsl xslfile="/xsl/ant_log.xsl"/>
    </cruisecontrol:tab>
  • CC maintains an XML log file for the build. If your build is a Junit test only run, the only way the UI will diplay the test results is if the results are XML and merged in the log file. If you have a few thousand tests - well you can image the loading time.
  • The other ugly thing was displaying the XML log file itself. When you click the XML log link in CC it just dumps the raw XML. Quite ugly. Some info on this can be found here. I added an XSL to pretty print it again editing main.jsp
    <cruisecontrol:tab name="log" label="XML Log File">
    <cruisecontrol:xsl xslfile="/xsl/logfile.xsl"/>
    </cruisecontrol:tab>
  • CC tries to pulls the username/email mapping from Star Team and fails with a mysterious null pointer. Essentially the workaround is to have manually add this property for each user in the config.xml
  • Theres also a time sync issue. If the StarTeam repository and CC server clocks are not synced modifications are not picked up and a custom Time Sync Bootstrapper had to be written.
  • The JSPs dont show time correctly. As per the config the schedule is specified in seconds, however the reporting JSP reads this value as milliseconds and reports incorrectly. Had to fix that as well.
  • One more thing - Unlike Hudson theres no support for fingerprinting or grid based multi-box support.
In hindsight, time spent getting all this fixed would have been better utilized writing a Hudson plugin for StarTeam. Perhaps next time!

Apr 11, 2007

Questions or answers


Consulting Lesson # 125 : "The question is more important than the answer" . The way you ask a question drives the kind of answer we get. The most common incorrect question is that of an engineering mindset wanting to know "How" something gets done. It inherently assumes the problem is that of what to do, rather than why, where or what do it or if its worth doing to begin with. Common how questions are themed on
  • How long will it take...
  • How do we get them to change..
  • What are the steps needed for...
  • How do we measure...
  • How do we communicate...
  • How are others doing this...
The what is interesting and sometimes necessary but will not take you out of the box. The strategic questions to ask are themed on:
  • What is the point of what we are doing..
  • What has to die/phased out before we can move to something new
  • What is the value of our product/service and in whose eyes...
  • What personal meaning do we find in what we are doing... is it for the sake of doing ?
  • What would happen if we did nothing ? Is change for change's sake ? Maybe we should do what we do better.
  • What capacity & strength are we not using fully ? What do others see as a strengths in us (individuals and institutions) ?
  • What are we leaving for the next phase/version/generation ?

Apr 8, 2007

Pirated Cars


In technology, China is famous for one thing -pirated software and hardware (Eg Cisco routers are sold as Chisco riouters on the pavements). They've now taken the duplication machinery to a whole new level. The Economist published an article in this months magazine about duplicate BMW's, VW's and Hondas. The copied CR-V is called SR-V, Honda's are called Hongda's. ! Some hitting the market before the originals. Others being exported under legitimate license to east European countries.
The full article can be found here. Some very interesting pictures with side by side comparisons can be found here including duplicate Rolls-Royce & BMW's.

Apr 7, 2007

Curiosity, perfection , doing good & criticism


Matthew Arnold in Culture & Anarchy talked about culture as not being a "smattering of Greek and Latin" but as the study of perfection having its grounds in curiosity as not "primarily the scientific passion for pure knowledge, but also of the moral and social passion for doing good"....The purpose of culture was to enable people to question their 'stock notions and habits'.

Simon Heffers's three part talk uses Arnold's arguments quite effectively BBC. "Once they have got their basic education, the skills that allow them to survive in the world of leisure or work, they have no further intellectual interests. They are without curiosity and, what is more, the system in which they are brought up encourages them to remain militantly so. It is not just that they don't know about art and literature and history, it is that they expressly don't want to know. To Arnold, curiosity wasn't enough. To us, it would be a start....Culture was about the pursuit of perfection: and perfection required intelligence. A lack of intelligence then held similar dangers to a lack of intelligence now: notably a tendency to see the world in the wrong perspective, to place false values on things, and to come to misjudgments about oneself and others. "
A critical review of this book can be found here
Arnold is also known for his view on literature and poetry being a "criticism of life"

Apr 4, 2007

Projects & Resistance


Consulting Lesson # 124 : When you hear the same phrase or find yourself answering the same question repeatedly, thats a sign of resistance ! Resistance can take many forms in a project and often cant be overcome with arguments and data that most software engineers are used to presenting. Peter Block's consulting technique which works most of the time can be summarized in three steps:
  • Identify the resistance (pick up cue's, look for phrases, specific behavior)
  • Name the resistance (state in neutral terms the form that the resistance is taking )
  • Back off (Let the customer/manager respond)

Apr 1, 2007

Milgram Experiment


Stanley Milgrams book from the 1962 Yale study "Obedience to Authority: An Experimental View" is worth a read. The Milgram experiment was a study of social psychology, intended to measure the willingness of a participant to obey an authority who instructs the participant to do something that may conflict with the participant's personal conscience. "For many people, obedience is a deeply ingrained behavioral tendency, indeed a potent impulse overriding training in ethics, sympathy, and moral conduct". What Milgram was investigating is that people will suspend belief and reason, and act extremely in a controlled authoritarian environment. It seems to indicate that there is an element of cruelty that lies dormant within a large prevalence of individuals fitting the average psychological standard in terms of character traits.
A dilemma faces anyone who enters into an agreement to be part of a system. When the system requires them to do something with which they disagree, they must either be loyal to their moral standards or loyal to the system. It seems a majority of the individuals would rather go against their conscience especially when there is an authority figure involved. Some of the variations covered indicate that methods that do work include Reducing legitimacy of the authority figure, Increase distance from authority, Decrease distance from victim and Adding dissenting voices.

The original video can be found here and in use of the study in the classroom is here.

Mar 28, 2007

Beyond Enterprise 2.0


MIT Sloan Management review published this article "Beyond Enterprise 2.0" recently. Its interesting how the old questions relating to Moores Law are now being reapplied in the context of Web 2.0 and Enterprise 2.0. Whats missing is questions on the lines of "Gates law". I have dual core processor - great. But it now also takes a 256MB graphics card and 2GB of memory to get the same tasks done. Computing power may have increased but software and web services performance consistently appears to decrease with developers trying to squeeze more out by throwing in more features and layers.

Mar 22, 2007

Understanding


Came upon an interesting quote by Upton Sinclair. It reminded me of some interesting discussions I've while consulting.

“It is difficult to get a man to understand something when his salary depends upon his not understanding it”

Mar 16, 2007

Theory of Moral Sentiments


Reading up on the early works, I came across the Adam Smith's work Theory Of Moral Sentiments. This excerpt caught my eye -
"For to what purpose is all the toil and bustle of this world? What is the end of avarice and ambition, of the pursuit of wealth, of power, and preheminence? Is it to supply the necessities of nature? The wages of the meanest labourer can supply them.....What are the advantages which we propose by that great purpose of human life which we call bettering our condition? To be observed, to be attended to, to be taken notice of with sympathy, complacency, and approbation, are all the advantages which we can propose to derive from it. It is the vanity, not the ease, or the pleasure,which interests us. "

Mar 14, 2007

Info-Management

"Info-management" - Its a consulting term I use to describe a management technique in which a person flips through Info-World,CIO,Dr Dobbs,JDJ,a summarized analyst report,(even Cosmo mag) - usually in the restroom or while waiting to get a root canal - gets all enthused and subsequently decides to experiment on the immediate team or project with the newly parsed (mis)information.
The results are predictably devastating. The problem that the writeup was trying to solve probably never existed and the proposed solution is almost never actually applied. Not to mention the motives (ulterior in most cases) of the authors that were never considered.
So how does one avoid this - well Scott Adams has a phrase for this. Its called the Dilbert Principle The other option is to listen to your architects & consultants.

Feb 14, 2007

Java and DST changes


Its surprising how lightly a lot of the customers are taking the recent Daylight Savings Time changes. DST is the result of U.S Energy Policy Act of 2005 and requires that changes occur to DST starting on the second Sunday of March 2007 and end on the first Sunday in November 2007. This essentially increases the time that DST is in effect, with the hope of saving energy consumption.
For Java applications this would mean updating the JVM's with the new timezone information and details on that can be found here . Instructions on how to do that can be found here

Jan 9, 2007

Either you know what you’re looking for or you don’t

Meno's paradox essentially questions - "How can one investigate what one does not know? Which of the things you do not know will you propose as the object of your search? Even if you stumble across it, how will you know it is the thing you did not know? "

I was reading up on some of Socrate's theories and came across his attempt at answering it with a theory of recollection . You do not need knowledge about what you are searching for. All you need is true opinion, even if it is mixed up with false opinion. Sufficient conversations about a topic can lead to knowledge! The difference between true opinon and knowledge involves not only understanding why something is true, but also why its alternatives are false.
Socrates compared the two versions of truth to a beautiful statue on a pedestal. True opinon produced by intiution was great but bound to be blown over with the wind of counterarguments. Truth supported by reason and an awareness of the counterarguments was like the same statue, tied down with ropes of reason and confidence.

Jan 1, 2007

Moved

This is a continuation of my older blog which was on the Sun Microsystems employee portal.