Sunday, September 29, 2013

The Day I Blended My Wine

I buy wine for one and only one reason; Sangria. I am not a wine connoisseur (yet) but I'll take wine when I cannot find any hard liqueur...ok..almost never. I don't understand wines and I cannot tell flavors apart. "It is okey", or "I didn't like it" are the two categories I have for wines. Thus, my expectations for this experiment were very low.
I did not expect to notice any difference.

I listened to these guys and blended a glass 337 Cabernet Sauvignon from Noble Vines. The shot glass has contents right out of the bottle while "aerated wine" went from bottle to magic bullet for 15 seconds to wine glass. Both my wife (who is a non-drinker) and I tasted the samples and we could tell the difference between the two.
Well, the difference was significant; even for us. The wine became much smoother and well, more "blended". To me, it tasted like dead wine; like something out of a bottle opened 15 days ago and left open in the pantry.

In my second trial, I blended it for just 5 seconds. But when I opened the mixer, I could hear the wine die out in form of bubbles. It was again, a dead wine.

What a horrible thing to do. Let the two glasses I blended not die in vain. Let this be a lesson to not to blend any wine from this point forward.

Prometheus: Lesson in user experience

Hopefully, by now, everybody has seen Prometheus. I do think it was a good movie.

The one technical thing that stood out for me is how the access keypads were designed and how they were used in "reality". If you've noticed, these were located on every door of the ship. Each keypad was well designed to prevent breach(es) and with a futuristic setting, each one could probably have more functions available to empower users than any given website's security measures in existence as of today and probably a "security management module" to program all at once.

But how were the keypads used in reality?
Just like the picture of a no-brainer garage door opener shown in the picture on the right. This unit is placed in almost all garage doors and it is fairly simple to use it. In short, the two main behaviors expected from slapping that button are:
"Open the damn door" -or- "Close the damn door".
Pretty basic right?



In terms of UX, it's the first two behaviors of the system as "must haves".

Sunday, December 9, 2012

Ottawa Ordeal

As of mid '07:     

     I've heard stories about visa officers at American Consulates getting really nasty with interviewees like rejecting a visa petition based on what type of watch the interviewee wears. But this is my first time going through a similar experience. I'd like to share it with you all.
   
     I wait in cold outside the US Embassy on Sussex for two hours. I am told the computers are down and I understand the delay but can't they do something about the people standing outside in the cold? I really don't know what happens when it would start to snow and I don't want to know either. Like any other immigrant; I want be done with paperwork and therefore, I don't complain. I guess they never anticipated a rush of interviewees at consulates.
   
     Now the ordeal starts. My name is called and I approach the interview window. My interviewer starts explaining other employee what to check in a work visa. I've completed a master's degree and I was there to get a work visa. The gentleman starts: "He is a stereotypical applicant, sorry sir, but you are stereotypical IT guy: he has came to study and now he wants to work in this country". I nod my head in approval; he is right, I am not alone in this race, but then its a little bit disturbing for me to be stereotyped so bluntly. "He can be replaced by 100,000 others and probably the company makes him work like a slave". I nod my head from side to side in disapproval and the co-worker says he is disapproving. The interviewer repeats his sentence again and carries on. He tells his co-worker about prevailing wages and other stuff. I don't have one document because it was not mentioned in the application package. Neither did my lawyer told me to keep it with me. I am told in a harsh tone that I was expected to go to my country for the stamping purpose but then I planned of spending a weekend in Canada and then, I was standing at his window. How dare I spend my money as I like it! I am asked to get the missing document by fax and come the next day or whenever I felt like it but not that day because he didn't want to deal with me anymore. My interview is suspended and to be continued some other day.

     I got my visa the next day but that 12 hours were the worst of my life. I was awake making plans to go to my former home in case I don't get a visa. All the time I've missed my family and friends would be useless. The loans, hardships undergone as a graduate student etc. would be fruitless. There will be a new turn in life and which didn't seem very bright. I was just lying there lamenting on the past and dreading the future; really angry for being picked on.

     Yet, I am happy that all my papers are checked for consistency, i.e. I don't get underpaid and I have equal rights and enjoy similar privileges as my colleagues but again, do you have to mock my American dream like that?
Being in the US for 3 years and not experiencing any first hand racism, this interview was a real shocker for me.
   
     But the incident was an eye-opener too. There are many things which define me and I am proud of like a good job, a decent new car, good friends etc. could be gone just like that! I don't deny the fact that slave-driver companies do exist. But they don't exist for me. Luckily, I've managed to stay away from such companies and I do have an awesome job!
   
     I do understand even that you don't want me being treated unequally and I do appreciate your concern but do you have to put in such harsh terms? It would be great if you tell me in your normal talking tone and not shout it out and sort-of-spell-all-the-words to me.

     I see America as my Karma-bhoomi but now I have doubts about my choice of pursuing an American dream.

As of Dec., '12:

     In five years of hind-sight; Ottawa Ordeal seems a non-issue. It is just feels that I was a receiver of frustration caused by other factors outside my control and the dude had to let it out of his system. As of today, I am living my dream :)

Saving for a house

     We have enjoyed our house for a year now. I am grateful to my family to have acceded in the "struggle" to save up for it and I am specially grateful for all the celestial stars to line up to the day we bought our first house. It was definitely not a piece of cake but a determined, disciplined slow march that ended up with more responsibility on our shoulders than we started with. But now, instead of throwing money away as rent; we pay towards building an equity. I know that a house in the US is not much of an equity but think of all the 30 years of rent you'd pay otherwise. Rent money in such a long time totally equals or beats the price of a home.

     Let me say that operating capital of a home is more than any rental place because now you not only have the monthly expenses but also have charges that recur on a quarter, semi-annual and annual basis. A home will also need TLC to keep it in a running condition structurally and aesthetically. The trick is to anticipate these in advance. Let's get started on how to start owning a home first.
   

Step 1: Set up a goal     

     Research the areas in your city. Get a good feel of what the houses are priced for. The range of these houses can be scattered across the spectrum. In that case, go look around and get a good feel of what type of houses you'd enjoy both in terms of living in one and paying for it. I personally recommend you try to keep these around 30% of your monthly income to be comfortable. If the sum of recurring charges given below is greater then one of your bi-monthly paychecks; you will be penny-pinching pretty soon.

Recurring (monthly) charges = energy bills + mortgage + gas money for commute

     Now calculate the amount of money you need to cough up just to start living there.

Goal money = down payment (7%-20%) + closing costs (3.5%) + move-in costs (moving + necessary fixtures and appliances)

     You have a goal in mind. Congratulations!

Step 2: De-clutter and access your spendings 

     Calculate where your mullah comes from and where it goes. Categorize all your spendings. Get a Mint.com account or any other budgetary tool where you can monitor your expenses at all times. You are not done till each dollar is accounted for.

     Once you've successfully de-cluttered your monetary inputs and outputs, start listing down all frivolous charges and spendings. Magically, you now know where to stop spending.

Step 3: Action

     This is an ongoing and slow process involving rigorous determination, re-assessment and sometimes, change in plans.

     You'll find all sorts of information on the inter-webs on how to save money. Here's a couple of tricks under my sleeve:

  • Prepare your meals at home. Minimize stored food in the pantry and the fridge in order to minimize amount of stale food that you have to throw away every now and then.
  • Never buy drinks: alcohol/coffee/soda at retail price. Either buy them in wholesale and/or make them at home. Explore the art of making cocktails.
  • Don't chase coupons. It is an utter waste of time considering you may buy things because they are cheap and not because you need them. You may be doing something more useful or enjoyable.
  • Always get things you DEFINITELY NEED and not because you MAY need them.
  • Create a budget for anything and everything you WANT. Ignoring your "wants" is not recommended either. Your goal is not to be a miser but to consciously manage your expenses.
  • Always use a credit card to take advantage of rewards program(s) but undo the damage on a daily basis. Essentially; don't spend more than what you have in your checking account. 
  • Perform a weekly audit and revisit step 2 so that nothing takes you by surprise.
     Your overarching goal should be to maximise your savings. Talking of which; you should have at least 2 accounts based on amount of money you want to save:

  1. Minor: For short-term expenses like a trip or fancy boots or electronics or special occasions like birthdays and/or anniversaries. This account can also double up as your emergency fund.   
  2. Major: To fulfill your goal set up in Step 1. You'll need a budget for this account too.
    Whenever you get paid, here's the order of emptying out your pay-check:

  1. Major savings account
  2. Minor savings account
  3. Bills and loans
  4. Living costs

Step 4: Profit

     In fact, whatever you manage to save IS your profit on whatever services you offer to make a living.
 

Friday, November 2, 2012

Congrats Bloomberg!

First of all; my prayers and thoughts are with all the victims of Sandy.
I don't know why it took so long to retaliate against bad press about the marathon. I guess the planning leading upto this point and the popularity of the event kept Bloomberg from making a decision. Also; he's got a city to recuperate. I can give all benefits of doubt to the guy.

This picture basically explains my stance on this year's NYC Marathon:

I congratulate Mike Bloomberg on making another right decision today. What a great leader!

Monday, August 6, 2012

India's got gold!

I've been keeping an eye on a tally of country-wise Olympic medals.
There's dead heat between USA and China. Being Indian by origin, I wondered why Indians don't seem to bother with winning (medals). I found my answer today: 
 

 
Gold is one of the main sources of investment for Indians. 
Disclaimer: I don't!

Tuesday, February 7, 2012

Marklogic: Load filesystem directory to database

(: Load all documents with .xml extension from data directory under modules-root to Marklogic database  :)

for $document in xdmp:filesystem-directory(fn:concat(xdmp:modules-root(), "data"))/node()/dir:pathname[matches(., '\.xml$')]
return
    xdmp:document-load (
        $document,
       
             {fn:concat("", fn:tokenize($document/text(), "/")[last()])}
             none
             {xdmp:default-permissions()}
             xml
       

    )

Tuesday, November 22, 2011

Change XML in-memory in XQuery for Marklogic

$bar = xdmp:unquote(

fn:replace(

xdmp:quote($foo),

"string to be replaced",

"new string value"

)

)

Monday, January 11, 2010

Selenium 1.0.1 with Firefox 3.5.3 on Mac OS X 10.6.2

How to get Selenium Server running on MAC



  1. Enable Web sharing on your mac: System Preferences->Sharing->Web Sharing

  2. Go through this article. Part 1 and Part 2 should be good right now. Don't worry about enabling SSI too.

  3. Download Selenium RC.

  4. Unzip the download and copy contents to /Library/WebServer/Documents/selenium

  5. Install Perl module WWW::Selenium

  6. Start Selenium server: java -jar selenium-server.jar

  7. Check supported browsers.

  8. Stop your server

  9. Perform changes as specified in this document

  10. Start Selenium server: java -jar selenium-server.jar

  11. Run these 2 commands:
    mv /Applications/Firefox.app/Contents/MacOS/libsqlite3.dylib /Applications/Firefox.app/Conten
    ts/MacOS/libsqlite3.dylib.orig
    cp /usr/lib/libsqlite3.dylib /Applications/Firefox.app/Contents/MacOS/libsqlite3.dylib
    Thanks to this forum.

  12. I can now run the example on WWW::Selenium for browser values '*firefox' and '*chrome'. These both
    start a new Firefox instance.

Thursday, June 4, 2009

My first Site

YayMyLife is a brighter version of FMyLife . I wanted to learn Ruby on Rails and wanted some useful product at the end. So, yaymylife was born. It was deployed on June 3rd, 2009. As of June 4th, there is a lot of functionality still missing. Allow me some time to finish it. After that, I wish to blog on how yaymylife was developed.

-Ankur

Sunday, November 2, 2008

Poetry from the past.

Yes, When I was a kid, I wrote some poetry. Now I don't. Maybe because I have become more realistic? Or maybe there is not much ROI? I once got mentioned for having Poetry Writing as a hobby on 15to25.com in their Hobby of the Week section. The site was run by Harbinger Systems in Pune, India. Now I get a 404 Error :-(.

My dear Ma made a soft copy of my poetry and gave it to me as a "surprise gift" when she and Pa visited me for my Graduation Ceremony. Going through my past creations brings me a chuckle.

Here's one of the poems I wrote. It is named Figures of Speech. This is when I discovered about figures of speech used in Poetry. I have made some changes (not much) just to make some things clear(er).

FIGURES OF SPEECH

Just for the sake of emphasis
The poets tilt the language phrases
They employ ANTITHESES
So show they know opposites

Bluffs are similar to PERSONIFICATION
Poets change harsh to mild by EUPHEMISM

It’s awkward what’s APOSTROPHE
& I can’t understand what’s ANASTROPHE

They compare with SIMILE
And mean something else by IRONY

Don’t Mention ANTICLIMAX
As I’m doubtful about CLIMAX

I’m bewildered when employed is ONOMATOPOEIA
Shouldn’t the poets be left in Siberia?
METAPHOR is an element of comparing
How are PARADOX & OXYMORON differing?
SYNECDOCHE seems without neck
METONYMY seems without much head

Poets TRANSER EPITHET from one
Character to another
And by LITOTES mean something other

It is better, best than PARADOX
To be followed by an angry OX

Poets advice by EPIGRAM
And That’s to be sowed in our mental farm

But I like best
And prefer INTERNAL RHYME
More than TAUTOLOGY or PUN
Serving at a poet’s dine.

-Keshav

Tuesday, October 21, 2008

LunchBot

At both work places, current and previous; we mused on a program that tells us where to go for lunch. There is one Wheel of lunch; if you are looking for a quick solution to your misery. Let me explain you what this misery is. Its when you can't find a place good enough for today. Its a decision to be made, and that too, quick; because you are running out of your "lunch time". Your taste buds have gone on a vacation; they don't recommend you anything. Maybe you are not a food loving person like me, but its possible you have other constraints like time, money, <__add your constraint here__>.
So, lets get to business without any further delay.

What we need is a customized wheel of fortune. Something we all (we ~~ all lunch buddies) agree on.

The solution:

1. We need to create user accounts for our lunchbot.
2. The users will add restaurants to the lunchbot.
3. For each restaurant, you can have a simple 5 point rating. However, you can add information about the restaurant inside your application like menu, distance to the place, etc. (Probabely, somebody in your office has menus from nearby restaurants.) But, for a starting point, we can have a simple 5 point rating. However, knock yourself out by enhancing the system according to your tastes; pun intended. I recommend you do so after completing a basic lunchbot. But while designing the bot, make sure to have it future-compatible.

This means that its very easy to change the behavior and/or enhance it. I don't understand why future-compatibility is not one of the core characteristic of acceptable programming. I haven't even encountered anywhere else. It is just what other tasks can be performed by your system.

At this point, we have all the data needed to play the wheel - the players and the machine .. ahm .. the lunchbot.

Selection:
1 simple strategy is to get all restaurants we didn't go to in this cycle and select a random one.

Variants:
1. While getting the restaurants, add the ones that have 5 ratings; 5 times in your selection queue to increase their probability to be chosen. So, the ones having a rank 4 are added 4 times, ones with rank 3 are added 3 times, etc.
2. In addition to above, you can have a "repeatable" flag for favorite favorite restaurant(s). But after selected once, the rank of the restaurant has to be decreased to avoid going there everyday in the week.
3. You can also have "specialty override" flag for restaurants that have special menu on some days -or- u can have a "manual override" and go to the restaurant whatsoever.

Thursday, August 21, 2008

Do you really really need it?

I just shifted about 1200 miles north and it took me a car load (a very small sedan) and 15 boxes to move my life's belongings. We got our stuff in 2 weeks but even 2 weeks later than that, 9 of our boxes lay unopened. Our kitchen can qualify as fully functional for someone who enjoys to cook almost everything from scratch and I have no piece of furniture except a bed for my wife and me. We are searching for a dining table which can also be our study-table, a place to keep our books and some living room furniture.

Even after 2 months; our situation is the same; except for the fact that the boxes are opened.

All this make me wonder...what exactly do we need to live through a day? How much of the stuff we buy do satisfy *Return on Investment* ? How much we buy for our use v/s how much do we buy just for the heck of it?

We threw a lot of stuff in our old home while moving for a reason :- we wanted to travel light & it was not worth it to transport that stuff. Now; in our new home; we had to start from scratch. Not wishing to pile up our new home with stuff that we really don't want; we ask ourselves twice "Do we really need it?" before buying anything. Result: A very low consumer footprint. It has been okey without some things I might use just once in a blue moon.

We have browsed through catalogs from stores and online stores. There were things like orange peeler, onion cutter etc. It would be nice to have them but really? Do you need it? Wouldn't it be nice to develop the skill to perform such tasks with your knife? Do these gadgets really make it easy for you? How much time do they actually save?

I don't say we should go back to stone age; but sure there are things we can avoid to reduce clutter in our house and in our life without hurting our lifestyles.

So, next time you visit a store and you see a fancy gadget, ask yourself...
Do I really really need it?