Architects and Developers
So one of my colleagues reading yesterdays blog shouted out to me across the office “You only like architecture because you are a c**p developer”. I took this as British humour (I hope!) however it is reasonably accurate; I am a poor programmer. The last time I had to do any serious programming was 5 years ago when I had just started at the Office Strategy Group in Microsoft at Redmond. The group was working on the digital dashboard and they needed some sample web parts to ship with the kit. As I was the new boy and everyone else was busy I got detailed off to write them. Given that it had been many years since I had done any programming, I didn’t know anything about web parts or the digital dashboard and I only had a week to do it (all excuses!) the very buggy code I produced wasn’t a great surprise but even so a decent programmer would have done a lot better.
So whilst I am a poor developer I am actually a pretty good architect. Indeed most architects I know are not great programmers and most great developers I have come across are not very good architects. This is of course a generalisation but I think its a reasonably valid one (and please lets not have the “My Aunty Gertrude is a red hot C# programmer working on the Longhorn Kernel and she architected the whole of the Megabank customer processing systems in a day on a napkin” comment, there are always exceptions!)
I think this is because the skills required to be a good architect are subtly different from that of a good developer; typically an architect is working with complex, multidimensional and in many cases conflicting requirements and solutions whilst a developer is working a complicated set of programming constructs and techniques. Typically developer problems are solved by the well known divide and conquer (D&C) approach; however D&C does not work for architectural problems because of their multidimensional nature. Typically good architects work with a simulated annealing approach to problem solving where you expand the problem domain and then use D&C. This means that architects are much more comfortable with multidimensional complexity; it also means they are a lot slower in getting a solution, especially if the problem is simple!
I have done a ton of interviewing of architects and typically look for this simulated annealing in their problem solving approach using a number of architectural problems that I have come across that cannot be solved by D&C (in fact make the problem worse). One of my favourite non technical interview questions is very simple and designed to see how people analyse problems. Their response allows you to categorise them roughly into mathematical, logical or analytical thinkers. Developers tend to be logical, architects tend to be analytical, I not sure what the mathematicians are! Again, these are generalisations so please don’t tell me about your Auntie Gertrude. Here’s the question if you want to see what you are:
I have a cup of coffee and a cup of tea. I take a teaspoon full of coffee and put it in the tea. I then take a teaspoon of the tea and put it in the coffee. Which is the purest, the coffee or the tea? Explain your thinking.
I will put the answer to this in the feedback. Have fun!
Comments
- Anonymous
February 05, 2004
Most people use a logical approach to this problem the first time and that will give you the coffee as the purest. This is the wrong answer. You tell them it is wrong and ask them to do the problem again, again explaining their thinking. There are now two approaches, the mathematical (which is actually quite difficult) and the analytical which is very easy. The key to the analytical approach is to take the limit case, if I put a cup full of coffee in the tea and then a cup full of the tea + coffee in the coffee cup then the answer becomes obvious... they are the same. - Anonymous
February 05, 2004
WHAT?!?!?!?!?!
:) - Anonymous
February 05, 2004
How about physicist, who will ask you to accurately define term 'purity', cofee and tee surface tension and their density to evaluate the 'purity'? Do I have a chance to be a good archtect? :-) - Anonymous
February 05, 2004
Nope, that's a pretty typical dev response actually! :) - Anonymous
February 05, 2004
Hehe - I thought logical (probably why i am still a programmer!) - Anonymous
February 05, 2004
Well I dont want to sound strage or anything, but, even without using the limit I'd have said "the same" after some thinking but not thanks to the limit case. You brought back some coffee with you when you took a spoon of tea+coffee, so you'd intuitivly think you made the coffee more pure by bringing back some coffee into it, but doing so, you removed some coffee from the tea :) And the exact quantity you removed that made the cofee "purer" is also what made the tea "purer", so they're the same... I don't know, just seems more intuitive to me that way, than the limit (which I agree works too) :) - Anonymous
February 05, 2004
To easily quantify the problem, think of ten atoms of coffee in a nano-teaspoon. Put them in the tea.
Then whatever ten atoms you take from the tea will leave the opposite matter behind. If you return 7C and 3T then 3C and 7T will remain in the tea and therefore both retain the same purity.
Now apply to any dimension and quantities and the result will always be the same.
Rule: Assuming that the structure of atoms don't change ;-) - Anonymous
February 05, 2004
I came up with the same answer as Julien Ellie for the exact same reason. It was almost intuitive that they would be the same, but I recognise this as the mathematician's approach and in order to prove Julien's theory is correct you have to prove that the amounts are all equivalent, which is non-trivial. - Anonymous
February 05, 2004
So, I still don't get it.. :) I mean, I get the answer, but I don't get which answer maps to developer versus architect in your original post :)
The person who says the coffee is purer is the developer or the architect? And since that is the "wrong" answer - what does that say about the difference between developers and architects? - Anonymous
February 05, 2004
I sort of get the analytical approach but I find it easier to justify it mathmatically:
C - Cup of coffee
T - Cup of tea
x - Tablespoon
Tc - Final state of cup of tea after a tablespoon of coffee has been added and a tablespoon of tea+coffee has been removed.
Ct - Final state of coffee after a tablespoon of coffee has been removed and a tablespoon of tea+coffee has been added.
Tc = T + xC - xTc ...........1
Ct = C + xTc - xC ...........2
Assume C = T = y
Tc = y + xy - xTc ...........3
Ct = y + xTc - xy ...........4
Solve 3
Tc = y + xy - xTc
Tc + xTc = y + xy
Tc(1 + x) = y(1 + x)
Tc = y
Sub value of Tc into 4
Ct = y + xy - xy
Ct = y
Meaning both are the same. I'm a developer so what does this make me? - Anonymous
February 05, 2004
the easy way is to reduce cup to one teaspoon - Anonymous
February 05, 2004
Ok, so I wasnt very clear on the answer. After someone has got it wrong they can do one of 3 things:
1 Redo the Logic correctly as Julien and Sam did - that is the developer approach
2 Do the Math - I suspect that is an algorithmic person who is happiest doing the structure which the underpin the program - Is that right Confused?
3 Do the Analytic approach which is the architectural way - like Madhatter and Ian
Again milage may vary and so on - Anonymous
February 05, 2004
Dont think so, that was one of the best math solutions I have seen. Of course your assumtion C=T=y may not be true but simplifies things no end. Try without that and it gets much more difficult (which is where I failed when I first did it) - Anonymous
February 05, 2004
Maybe, but I think it could be down to a lack of imagination on my part :-) - Anonymous
February 05, 2004
The comment has been removed - Anonymous
February 06, 2004
The comment has been removed - Anonymous
February 06, 2004
The comment has been removed - Anonymous
February 06, 2004
The comment has been removed - Anonymous
February 06, 2004
I would assume that the cup that contained the most liquid to start with would come out the purest on average.
Look at an extreme example: take a 2 spoonful cup of coffee next to a 999 spoonful cup of tea. In the average case you will end up with a cofee that is almost 50% tea, but the tea wil at most be 0.1% coffee.
(I am probably more leaning towards your "architect" side, but I am also the one people call on when after 2 days they still can't find the problem. Not because I have better dev. knowledge, but I am good at guiding people through the process of discovering what is wrong.) - Anonymous
February 07, 2004
I think coffee is a more dense extract compared to tea. The coffee stays the purist. - Anonymous
February 10, 2004
Whoever mentioned that the cups contained liquids? It could be ground cofee powder, and dry tea leaves. What kind of coffee it is? Mocha, French Arabica, May be there is a tea blend! Now the definition of purity is blurred...
I guess I come under the lateral thinkers...
The truth of the matter is however you slice it and dice it you are working with time sensitive contraints that define the architecture (and validate it for that period)
You have to redesign it based on real world requirements that keep changing and taking new forms. A good architecture in such scenarios lasts longer. Good architectures are never an individual's contribution . It comes from a team whose perspectives differ on the same problem. - Anonymous
February 10, 2004
Because the volumes of Coffee and Tea are supposed equals, the only problem is the "net" quantity of coffee which has been exchanged by tea.
- first extreme : all the coffee is taken back
- 2nd extreme : no coffe is taken back
the result is evident : same purity
I will show that the quantity of coffee taken back is irrelevant :
suppose that you take back x quantity of coffee
Then we can simplify and simulate a spoon which size is "Normal-x"
what happen is that we are back to one of the extremes
Thanks for the sample - Anonymous
February 10, 2004
ok ... we all agree that the purity of the coffy and the tee is the same ...
(even if as noted by jay the coffe has more dense extract compared to tea)
The probleme is that the way "Analytic" guys solved the problem is totaly wrong.
Saying the purity is the same because in the limit case (taking a big spoon)
the purity is the same, is like saying 1/x equal exp(-x) because in the limit case
where x goes to infinity both functions are equal. It's one more time an exemple
where false resoning gives good result.
By the way I am a developper with some concerns with architecture - Anonymous
February 10, 2004
Sorry if I mis-expressed myself
I just wanted to add a "human view" (bon sens) of the problem, that I would consider as an elegant solution
the general case is
100% coffee forth [(100-x)% + x%]
(100-x)% tea back + x% coffee
it is equivalent to
(100-x)% coffee forth
(100-x)% tea back
that is to say 100% of a logical spoon whose size is 100-x - Anonymous
February 10, 2004
I begin to understand the main cause of microsoft product problems ;-) - Anonymous
February 11, 2004
The comment has been removed - Anonymous
February 12, 2004
Just taste it.
But then, it's probably a developper reaction. - Anonymous
February 12, 2004
Well guys, sorry to say you don't have the right answer...
Developer or architect? neither.
You've go to be consultant. Isn't a consultant someone who comes up with questions where there is no real problem, then does not provide solutions (or maybe bad ones)? - Anonymous
February 12, 2004
A cup of tea?
Do architects drink tea?
Programmers seem to only drink coffee.
Both cups were ruined in the expermiment. - Anonymous
February 13, 2004
The comment has been removed - Anonymous
February 13, 2004
Seems a "real" architect would be asking what the original intent was behind merging the coffee and the tea in the first place? Since neither is functionally improved, more efficient, elegant or better documented... smile - Anonymous
February 16, 2004
A real architect would ask for a use-case for both, and depending on the market needs, would propose to provide a modular cup system so that we can ship the two cups and the spoon, with tea and coffee, but by making sure the design is as such that it can be replaed by orange juice and milk for the next iteration (NerdMix v.Next, to be shown in early preview at the next PDC).
:) - Anonymous
February 17, 2004
The comment has been removed - Anonymous
February 18, 2004
You are clearly an out and out mathematician! it's funny how different approaches are completely non intuitive to different people.
Actually even the mathematical approach makes some assumptions so could be called had waving - Anonymous
February 18, 2004
The strange thing is that I never really think of myself as a mathematician. I know some of my friends who are mathematicians would agree strongly. :-)
So what is the false argument that people use to say that coffee is the purest?
(Part of me thinks: I hate tea, so to start with, the teacup is a cup of pure evil. By the end, the tea is still mostly tea, nearly pure evil, whereas the coffee is only marginally sullied, so the tea is therefore the more pure...) - Anonymous
February 18, 2004
Best explanation:
Both cups have the same volume (before and after the transfer). If so, after the transfer, a volume X (teaspoon) of coffee travelled to the teacup and the same volume X of tea travelled the other way. Therefore, both cups will have the same percentage purity. - Anonymous
February 19, 2004
My response to this question "Which is the purest, the coffee or the tea?"
=> What is the "purest" for you and after,maybe, i can answer.
I think, if there are many approach, it's because the question is not define!!
It's not a physic question but metaphysic question! - Anonymous
February 20, 2004
I'd keep it simple : usual coffee is stronger in taste than usual tea, so IMHO at the end, both in taste and colours, the tea appears to be further from its initial state, compared to the coffee.
I'll make a real test and keep you posted!
What's my profile then ;) - Anonymous
February 22, 2004
As I personally preferred the math way, I've been a bit confused by all the "demonstrations". I don't know if I'm a developer (I began by an Excel proof of concept) or an architect (I picked the first wrong answer, checked with the one spoon limit), or an epicurean (I've been chocked by the mix).<br />
Doing the math way isn't that horrible (and you said architects are not in a hurry!) if you take some simple definitions: measure cups in spoons, compare "impurity", valid that the cups contain at least a spoon of tea/coffee and of course that coffee and tea mix well physically (argghhh).<br />
Then you can say you added 1 (spoon of coffee) to the tea and then took back 1/(t+1) (t is the tea quantity in the cup at the beginning). The same way, you added t/(t+1) tea to the coffee.<br />
That way, the "coffee impurity" is (t/(t+1))/c (c is the coffee quantity in the cup at the beginning). "Tea impurity" is (1-(1/(t+1)))/t, which is (((t+1)-1)/(t+1))/t=(t/(t+1))/t. On both sides of the "impurity comparison" we can safely drop t/(t+1) as t>1 and obtain a comparison between 1/c and 1/t which means the bigger cup is the purest and if c=t, 1=1 and purity is equal.<br />
That (not so horrible) math to say a problem, IMHO, can often be seen globally (multidimensional as you say) and some simple and interesting points can be found... and proved. - Anonymous
February 29, 2004
I think the best approach is to submit the problem to the Open Source community and wait for 50 really smart people to figure out the answer. ;) Throw in a free T-shirt to the first person with the right answer and you will get hundreds of developers looking to join in. - Anonymous
February 29, 2004
I think the best approach is to submit the problem to the Open Source community and wait for 50 really smart people to figure out the answer. ;) Throw in a free T-shirt to the first person with the right answer and you will get hundreds of developers looking to join in. - Anonymous
February 29, 2004
I think the best approach is to submit the problem to the Open Source community and wait for 50 really smart people to figure out the answer. ;) Throw in a free T-shirt to the first person with the right answer and you will get hundreds of developers looking to join in. - Anonymous
March 04, 2004
I disagree with Michael Platt analysis of the problem. If I put a teaspoon of coffee into the tea then I've diluted the new content to be 90% tea and 10% coffee (assuming a teaspoon is 10% of the cup). Now if I take 10% of the new content and dilute it with the coffee I get another new content consisting of 90% coffee and 10% of the diluted stuff (which consist of, assuming equal distribution, 90% tea and 10% coffee) so I would have 91% coffee and 9% tea. Now if I compare the two new diluted content A with 90% tea and 10% coffee with content B with 91% coffee and 9% tea the answer to which is the purest would imply that the coffee is the purer.
The boundary condition in this case is when you take the entire cup of coffee and dilute with the cup of tea. So the answer would be that they're the same but this is the only condition.
Are you suggesting that to be a good architect the boundary conditions take precedence over the solution? Then I would say that good architects make poor business person. As for good developers, they would not solve the problem because there aren't enough information :) - Anonymous
March 18, 2004
Why am I wrong...
I see that at best they are equally pure.
But it is also possible that the coffee is ever-so-slightly purer, as it is possible that some percentage of the coffee is returned to the coffee cup from the tea cup so...
...oh wait, lightbulb coming on...
...however much coffee is put back into the coffee cup implies that the tea is equally purer, right?
Darn!
I hate other smart people! (j/k)
So what does this make me? Am I logical or analytical type? - Anonymous
March 18, 2004
...and what does it mean that:
a) I seldom have the patience to work out the numbers like Phan Le over there
b) To solve this type of problem I usually try a simplified model of the problem at one value (1 cup/1 tbsp) then change the numbers and repeat to test in different values to see if I got the same answer (1 cup/ .5 cup) - Anonymous
March 21, 2004
I think this problem seems so complex because we are looking at the wrong way. We should not focus on the content of the cups, but on the CONTENT OF THE SPOON.
Let's say the first spoon pushes 'x' quantity of coffee in the tea cup.
The second spoon pushes back 'y' quantity of coffee and x-y quantity of tea.
So, there is left x-y coffee in the tea (x pushed by the first spoon, y pushed back by the second one), and there is left x-y tea in the coffee (pushed by the second spoon).
The final volumes being the same as initial volumes, and the cup sizes being supposed equal, purity are the same.
This shows also that the result is true whatever the way the tea is mixed between the 2 spoons. - Anonymous
April 13, 2004
I'm sorry but there IS NO spoon. - Anonymous
July 15, 2004
The easy way is to reduce cup to one teaspoon,in my opinion!