Skip to main content

Posts

Showing posts from 2009

Object Events

Lately I have been doing some thinking on the 'action' part of Objects. Objects have properties. But how do you describe an action or an occurrence? When the accelerator is pressed, the car moves. One way I thought is that there could be an Observer object. The Accelerator is subscribed to the Observer. Upon Creation, Update or Delete of the target object, say A, a sequence of actions have to take place. I was trying to find a structure for this. Also CRUD events of A can be initiated by itself or another object B So to start off, there has to be a table Id -> unique eg= 7 Action -> Create/update/delete TargetObj-> A CallerObj-> A for event id 7, properties of [A], say A1,A2,A3.. have to be populated with values. The structure for this operation needed a lot of thought and was quite frustrating. (Yes I know exact same thing has been done before by someone, but I cannot find that information, nor is there anyone to guide) Ok, getting back. The key conclusions I deri

Something to look forward to..

Lucky chap can get a newer car. ..Not that he can complain about the Corsa Bit on the expensive side, low on practicality with the 2 doors and stuff.. but then its only one life that you got and might as well turn some heads during the time you are around ;) I hope the blue eyed blondes in kindergarten take notice of the little naughty coming in the red car. Have booked the Alfa 3 weeks or so ago. Red as in the pic, leather seats with some camel shade, 17'' alloys, Alfa DNA were included in the Distinctive version. 1.3 diesel engine as im not much into speed. 3-4 month wait for delivery!

Quotable quote - Review of "Gone with the wind"

This was one funny review..and I fully agree with the person who wrote it. Made me think of the similar pattern in Indian films where the protagonists are invariably of the upper class with appropriate surname - If NOT; then the character necessarily has to have certain undignified mannerisms that point to where he/she came from. -- How can anyone seriously criticize this film? Well, some people can, but that’s not my point. The point is that this is the greatest American film since “Birth of a Nation.” Watch in awe as Scarlett and Ashley pine for the bygone days when the soft high sound of Negro laughter rises like the Louisiana marsh mist from the decrepit, rat-infested slave quarters swimming in lice and feces. Chortle with Rhett as he sprays misogyny across Georgia like an alley cat with a urinary tract infection. Pray with the Confederacy as it bravely attempts to defend time-honored traditions of patriarchal subjugation, racist contempt for human life and belligerent arrogance b

Finding obsolete DLL and OCX files

Today I had to make an ancient application developed in VB6 work. This was to demonstrate to third parties that this app was once functional and used actively for business. The code was provided in some backup CD. The programmer behind the project had long dissappeared. Also most of the components used in the project were made by companies that have ceased to exist. Result was that the code would not compile in my machine. Errors were thrown up like "component xyz not registered" "Invalid Reference" and so on. Only way was to find these dlls somehow and register them manually using regsvr32 But how?? and where to find them! It was interesting to search for companies that made products such as SSINPUT1.ocx and sold them for $500+ Needless to say, then went either bust or got acquired. Those who acquired them got acquired and they in turn..... funny. I made some discoveries which could be useful for people in a similar scenario SSInput1 is an OCX control for data en

Yet Another Biryani Recipe - YaBii?

This is one extremely frustrating dish to make. A tiny mistake and 3 hours of work tastes forgettable. I used to make really good ones.. that too the 'kacchi' type. Then suddenly I found that the touch was lost.. a bit like the form of Vinod Kambli. Whatever you do, the triple centuries never come back. I dont have a knack to keep things in memory, especially recipes. Always prefer to look up on my scribblings saved txt with Notepad. The losing of 'touch' was mostly due to a lapse of not writing down what I was doing. Anyways.. what is gone is gone and I still dont remember what I used to do to make it smell, look and taste decent. Many attempts (disasters) followed which were based on one or the other of hundreds of Biryani recipes floating around waiting to be BINGed. Today I was too tired to refer to yet another recipe, and needed to do something quickly & get back to work. Had to rely on instincts.. although I admit I did refer to the list of spices. (Please not

Preserving uniqueness without changing table structure

This one took me a year to realise. Yes a bit thick! It is so simple, one wonders why it was not visible before. I had to design a database table for charges against a service. The charge depends on various parameters. The usual way of representing would be to put the parameter values and the results in single unique record Eg: Z= f(x,y,z) Z= 40.9 when x=1 y=2 z= 3 Record Z x y z 40.9 1 2 3 Blow up the same methodology for cases like 3<=x<=9.5 For this, you would need columns such as GEx GTx EQx LEx LTx Populate with values and you can define a condition Repeat for each variable. You will end up having a table with fairly large number of columns. I did not want this. Also I was wondering about cases where say Y is a string and not a number. This was posed as a question to ether space via this blog in an post made in Apr09 Z = 80.345 when x=1,z=3 and Y contains string "Singh" Say it defines a taxi rate to the airport when your name is same as the driver

Quick Review : Blindness of Insight - Dilip Menon

Whom do they address in the books they write? Is the primary aim to convey the insight received during thought Or to use tedious vocabulary that appeals to peers but obfuscates the message to laymen Maybe I am a bit thick, or I picked up a book not intended for me. I wanted insights but ended up spending more of my time trying to decode the language and understanding what the author is trying to convey. *Essay 1 - Why communalism is about caste* I did not get the answer. The analysis was not convincing enough. One problem I found in most of the book is the over emphasis on static analysis. That economics, technology, Time, changes the way people think does not seem to be considered. The views of 1920 is extrapolated to 2000. What drove the actors a century ago drives another set today. Reforms, Internet, Industrialisation, English.. what effect does these have? I want answers for Tomorrow based on insights derived from events of yesterday. Analysis of yesterday based on yesterday does

TOP n of Each -- SQL

Suppose you have a table like this and want to know say the Latest 5 [INPUT] values for all [INST] ie; you have to sort a given INST by date (descending), take the 5 top most from the result. Repeat for each INST and merge all results together. Pretty easy if you have a FOR EACH or some other type of LOOP. [DW_X] ID PROP INST INPUT UPDATEDATE USERID DOMAIN 12 4 1 KUJU 7/14/2009 11:27 1 1 13 4 1 KUJU2 7/14/2009 11:28 1 1 14 4 1 Kuju 7/14/2009 13:41 1 1 15 4 1 kuju2 7/15/2009 9:48 1 1 16 4 1 Kuju3 7/15/2009 13:47 1 1 17 4 6 litlOne 7/15/2009 15:11 1 1 21 4 7 Kuju no 7/16/2009 9:59 1 1 22 4 7 Test1 7/16/2009 13:08 1 1 23 4 7 test2 7/16/2009 13:09 1 1 24 4 1 B 5/16/2009 13:09 NULL 0 25 4 1 C 5/16/2009 13:09 1 0 26 4 1 AA 5/16/2009 13:09 1 0 27 4 1 WW 5/16/2009 13:09 1 0 28 4 1 RR 3/16/2009 13:09 1 0 Instead of loops, you can achieve this by a single SQL statement. Was trying and it works out like this (MS SQL syntax) SELECT * FROM DW_X T1 WHERE T1.ID IN (SELECT TOP 5 T2.ID FROM DW_X T2 WH

Gayathri Mantras

I have been repeating this since age 5 in the order specified. Thanks to my parents! Upto me to teach it to Nandan OM ekadantAya vidmahe vakratuNDAya dhImahi , tanno dantiH prachodayAth .. OM tatpuruShAya vidmahe mahAdevAya dhImahi , tanno rudraH prachodayAth .. OM dAsharathAya vidmahe sItAvallabhAya dhImahi , tanno rAmaH prachodayAth .. OM devakInandanAya vidmahe vAsudevAya dhImahi , tanno kRiShNa prachodayAth .. OM kAtyAyanyai vidmahe kanyAkumAryai dhImahi , tanno durgA prachodayAth .. OM mahAdevyai cha vidmahe viShNupatnyai cha dhImahi , tanno lakShmIH prachodayAth .. OM vAgdevyai cha vidmahe kAmarAjai cha dhImahi , tanno devI prachodayAth .. OM sarvasaMmohinyai vidmahe vishvajananyai dhImahi , tanno shaktiH prachodayAth .. OM gurudevAya vidmahe parabrahmaNe dhImahi , tanno guruH prachodayAth .. OM bhAskarAya vidmahe mahadyutikarAya dhImahi , tanno AdityaH prachodayAth .. OM bhUrbhuvaH svaH tatsaviturvareNyaM bhargo devasya dhImahi , dhiyo yo naH prachodayAth .. Om Tryambakam Yajama

Shipment Rates Object

A shipment carried by a haulier has a quoted rate that depends on the value of different variables. I have been scratching my head for considerable time over this .. I do have some ideas, maybe it will work. Would appreciate if someone can put give their inputs Shipment = S1 Source = L1 Destination = L2 Rate = $1.7532 / kg if Gross wt > 1000kg AND <= 3000 kg Rate = $1.2365 / kg if Gross wt > 3000kg AND <= 9000 kg Sender = "Phutt Air Ltd" ... Shipment = S2 Source = L1 Destination = L2 Rate = 0.00 if Sender = "Singh is Kingg Ltd" ----------------- Object structure?

Everybody loves a good Whine

I have a problem with Whines published in mass media which are predominantly based on prejudice. http://www.hindu.com/2009/03/18/stories/2009031855770800.htm It doesnt appeal to me at all when the author portrays rural India , column after column, as a joyless, hopeless place that cannot change from within. Some can be very good at listing problems. I believe though that true ingenuity and courage, lies in proposing concrete solutions. Courage, because what one proposes might fail and he/she has to be brave enough to own up the failure. Individuals with a self perception of being weak will usually try align with the winning side. They do not take risks by having clear cut positions. Instead, the preffered low risk approach is blaming current systems and leaving the proposed alternate system with specs vague enough to be disowned. This ensures that you always fall on the correct side of history. Mr.S seems to imply that the only economy that can be 'just' is a communist-socialis

The best pen in the world

If you still write instead of typing, then this is the pen I would recommend. The writing is near perfect & my handwriting never appears better. The engineers who spent days and nights solving viscosity problems, barely get the recognition they absolutely deserve. (Funny, when i read about certain creators of a "search" algorithm) Here is HariOm saying THANK YOU ! Arigatou gozaimasu! The pen being mentioned is a relatively cheap ball point with a refill called SA-7 It is a 0.7mm dia.tungsten carbide ball It is manufactured by Mitsubishi Pencils/ UNI The pens that contain this refill are UNI-SAS FINE (0.7mm) I have also found that UNI Lakubo has the same refill. More info here http://www.uniball.com/catalog/show/product.php?no=26

Good ringtone, Fun advert

Although how it relates to chocolate is not very evident http://www.youtube.com/watch?v=TVblWq3tDwY

HMV

The Truth, nothing but the Truth !! http://www.hindu.com/2009/03/28/stories/2009032854911000.htm Celebrating social emancipation in Tibet N. Ram History shows that resistance to anti-feudal reform was deeply entrenched in the Dalai Lama’s theocratic regime — fusing the causes of separatism and the preservation of feudal serfdom. The events of 1959 brought forward China’s project of freeing a million serfs. Today the Tibet Autonomous Region (TAR) of the People’s Republic of China celebrates its first Serfs Emancipation Day, an official annual holiday. The commemoration has come half a century after the Democratic Reform did away with feudal serfdom and slavery and the theocratic system in Tibet, emancipated a million serfs, and laid the basis for the autonomous modern development of the region as part of the Chinese socialist system. It was on March 28, 1959 that the central government announced it would dissolve Tibet’s local government and replace it with a Preparatory Committee for