Thursday, June 30, 2005

The art of making "Filter Coffee"

This is a tech blog and what is more important to a techie than to have a proper supply of caffeine. This can't be any any coffee, it cant be a wanna-be oh-am-so-stylish frappe or latte. As far as I am concerned there are very few coffees in the world which can lay a stake to the name "coffee". A genuine South Indian Coffee is one of them.

Of course it needs special but simple equipment, lot of patience (ideally 12 hours that it takes for the decoction to mature) and lots of dedication to prepare filter coffee.

The flavor comes from the time spent by the decoction in the filter gaining the coffee steam while the taste comes from the dilution with milk. One might ask how to judge these characteristics. As a South Indian who enjoys , naah, worships a good cuppa I will describe the procedure to you. Bring the steel tumbler (because a southie worth his salt would serve coffee no other way) just below your lips and inhale deeply. If you get a heady feeling of falling into a abyss uncontrollably the flavor is perfect. Then take a sip, twirl it in your mouth and gulp it down. If it burns its way down your throat to your stomach and if you can actually feel this sensation both the taste and temperature of serving is correct. That's the way a south indian filter coffee is supposed to be.

Tuesday, June 28, 2005

Simple securing of webservices

in work today i had to implement a really simple way of securing webservices. Actually of a particular webservice which plays a messaging role inside my product. Only client side authentication and encryption of message was needed.

Initially i tried to use HTTPS and security roles (and users) in Jetty. I was not able to go ahead. Dont know why. Jetty was allowing even barred users to go ahead with webservice calls even though https was working fine. Then I found out that axis has a built handler which can do the required funbctionality SimpleAuthenticationHandler. I had known about about HTTPAuthHandler which took the login and password from the SOAP message and put it in MessageContext but never knew about SimpleAuthenticationHandler. it simply made my day.

Monday, June 27, 2005

My First Love

No you perverts, its not that!!!!! its books. Since I was a child I have always beenreading books, allthough my liking, intensity, frequency and taste varies greatly. maybe thats what they call maturity. I plan to post regular entries on books whcih I love and some which i hate. they may be technical, sci-fi, philosophical whatever. But I plan to make the posts as honest as possible. SO may the creative juices flow......

Friday, June 24, 2005

Mocking

i have started exploring the world of Mock Objects. I am working on an web services based application where I need to write unit tests for only the consumer part of the webservices, i.e., the client side of things. I started out by reading the seminal "Mock Roles, Not Objects".

As I started understanding tha paper the thing which struck me the most was the idea of "Tell, Don't Ask". I guess this one key thinking very neatly summarises the basis of Mock Objects. The idea here is instead of doing something like
dog.getBody().getTail().wag();
one should do
dog.expressHappiness();
and let the dog decide what this means.

I quote verbatim from the paper: "If we concentrate on an object’s external interactions, we can test it by calling one of its services and tracking the resulting interactions with its neighbours. To summarise, we test an object by replacing its neighbours with objects that test that they are called as expected and stub any behaviour that the caller requires. These replacements are called mock objects. We call the technique of TDD with mock objects, Mock Objects."
This is the essencce of the paper as far as I could tell.

I will write more as I dig deeper into this. And Thanks Rohan, I am "keeping the spirit up."

Thursday, June 23, 2005

shamed into writing a blog entry

i have been away from this blog so long that I am now shamed into posting here.