Sunday, July 26, 2026

The CAS concept for Agentic systems, drawing upon CAP Theorem

The CAS Trilemma: Why No Agentic System Can Be Cheap, Accurate, and Fast

CAP theorem tells distributed systems engineers something uncomfortable: you can't have Consistency, Availability, and Partition tolerance all at once. Pick two. Every database architecture is really just a stance on which one you gave up. CAP earned the word "theorem" — it's a proven result. What's below isn't that rigorous, so call it a trilemma instead: a three-way tension where picking two comes at the visible expense of the third, in the same spirit as CAP but without the formal proof behind it.

Agentic systems are running into a version of the same wall, just with different variables: Cost, Accuracy, Speed — CAS. Push an agent to be more accurate, and it needs more steps, more tool calls, more self-checking — which costs more, takes longer, or both. Push it to be fast, and something has to get skipped: less verification, fewer retries, a smaller model. Push it to be cheap, and you're paying for that in either time (batching, smaller models, less parallelism) or correctness (fewer safety nets).

You can optimize for two. The third pays for it.

The three archetypes

CA — Cost-Accuracy (slow by design). These are systems that sacrifice speed to get correctness on a budget. Think multi-step agents with self-critique loops, verification passes, sequential tool chains with retries, or a research agent that re-checks its own citations before answering. Deep-research assistants and agentic code review pipelines live here. You wait longer, but each dollar buys real correctness.

AS — Accuracy-Speed (buy your way out). Here cost is the release valve. Best-of-N sampling, parallel agent swarms racing to the same answer, running five model calls simultaneously and voting, speculative execution. You get answers that are both fast and accurate — because you paid for ten attempts and kept the best one. This is the "throw compute at it" archetype, and it has a ceiling: past a point, more parallel samples stop buying you more accuracy, they just buy you a bigger bill.

CS — Cost-Speed (accuracy is someone else's problem). Small models, single-shot generation, no verification step, aggressive caching. Autocomplete, intent routers, simple classifiers, chat triage. Cheap and instant, and it's fine — right up until the failure mode matters, at which point you find out what you didn't pay for.

The part CAP doesn't quite map onto

CAP has a forced move: partitions happen whether you like it or not, so the real choice is CP vs. AP. CAS doesn't have an equivalent physical law — nothing forces cost or speed to fail the way a network link does. But it does have a practical one: in most products, cost and speed are set from the outside. Your latency SLA and your unit-economics budget are usually fixed by the business before the agent is designed. That leaves accuracy as the dependent variable — the thing that quietly gets whatever's left over once cost and speed are locked in.

Which is why so many "AI agent underperformed" postmortems are really CAS postmortems: someone fixed the cost ceiling and the speed floor first, and accuracy was never actually a free variable to begin with.

The takeaway

There's no agentic architecture that's cheap, accurate, and fast at the same time — only ones that are honest about which one they gave up, and ones that find that out in production.

Sunday, June 28, 2015

JBL Flip 2 and Yosemite


I recently purchased http://www.amazon.com/gp/product/B00GAJ2OK4 and I must say that I am more than pleased. The product is sturdy (I did drop it once on a carpeted floor and nothing happend :)) and can be easily carried around. Past few weekends I was renting zip-cars for weekends and FLIP 2 was all I needed to have a better sound system than the default ones the car had. The reviews at amazon.com summarize everything you need to know about this product, after all that is how I decided to buy this.

This post is about pairing Flip 2 and Mac Yosemite. I was using Mavericks earlier and pairing up Flip was as easy as toggling a button on the Mac-Menu bar. I upgraded to Yosemite and whoosh the icon disappeared. But a quick spotlight search for "Bluetooth" shows Bluetooth File Exchange app.

How to Connect:

  1. Bluetooth File Exchange -> Pick a random file and hit send
  2. It will ask for device to send
  3. Turn on FLIP 2 and make it discoverable via bluetooth (toggle the bluetooth button on FLIP 2)
  4. Choose JBL Flip 2 in the list of devices
  5. Now the Flip 2 is paired with yosemite. You can cancel the file send now, as all you needed was to pair up your FLIP 2 and Yosemite
  6. Now open Audio MIDI setup client. 
  7. JBL Flip 2 will show up with 2 output channels. Select that.
  8. Right click and select "Use this device for sound output"

Now you are all set. Enjoy the mobility offered by FLIP 2 by streaming music from your Yosemite mac.

Range of FLIP 2 is also good for an apartment. I have used it from 10 metres across even in my apartment and it seems to work uninterrupted.

PS: This is my first post for 2015. Hope to keep myself busy writing at least one post every week from now on. Fingers crossed! :)

Sunday, November 2, 2014

A note on Prepositional phrases

For one of my research projects, I was looking at different components in constituency parser output namely Verbal phrases (henceforth called VP), Noun phrases (henceforth NP) and Prepositional phrases (henceforth PP). It is interesting to note that in both VPs and NPs, the head of the phrases is not so surprisingly Verb and a Noun respectively. However when it comes to prepositional phrases, we have 2 different categories.
  1. PPs that function as adjectives (in other words answer questions such as what/which/how many etc..,)
  2. PPs that function as adverbs (in other words answers questions such as how/when/where/why etc..,)
One other way to look at PPs as adjectives is to realize that they talk about a Noun (like an adjective does). Similarly PPs as adverbs talk about a verb. 

Based on this distinction I started looking at openNLP chunker's output. By looking at the points 1 and 2, I devised a simple heuristic as follows:


Problem: Find whether a PP is adverbial or adjective

Solution: 
Heuristic 1: If the PP is first chunk in a sentence or is immediately preceded by VP, then it is more likely to be an adverbial.

Heuristic 2: If the PP is immediately preceded by a NP, it is more likely to be adjective PP. 

I dont have any metric to report for these 2 heuristics, however. 

References: 


Monday, September 8, 2014

Blocking in-video Ads - Youtube and Live streaming Part 3

You may want to glance through  Part1, Part2 of this series, before proceeding here.

This post was long overdue and I am glad that I have found time and the desire to update my blog. The post is going to be about Editing /etc/hosts file in linux and Mac

Let us raise a question to set the tone for this post -
          Wonder how the ads are getting rendered on your page ?

Like you guessed, it is again a http call to a server.  Now what will happen if we block the calls to that server ?

This idea of blocking the calls to the ad-server is the idea behind common ad-block plugins. They tend to keep a black-list of URLs and which is why updating the plugin once in a while seems to be a good idea; with each plugin update, it is quite likely that the black-list for ad-servers is updated.

Eg: We can use the chrome devtools to identify the element through which the ads are getting displayed. (Please refer [2] on DevTools usage)

Using chrome developer tools, it is easy to find the hostname that is serving the ads.

Like I already pointed out in Part1, Part2 of this series, the Adblock and Adblock plus Chrome extensions will help you in this regards.

Once we identify the ad-server, we can block all http calls to this server through our /etc/hosts file (refer [1]). This is a crude/hacky way of blocking ads, but effective. The ad-blocking plugins typically work within the browser sandbox and block these http calls, without touching the /etc/hosts file.

However, I don't understand completely how these plugins manage to block Youtube's in-video ads still.

Note: It is worth noting that Firefox, Safari and IE also provide such capabilities through their corresponding browser tool namely "Inspector" in Firefox and Safari, and "Developer Tools" in IE. 

Reference:


Monday, April 7, 2014

World Cup T20 14 Final Post Mortem

I am also one of the millions of ardent fans of Indian Men's cricket. And yes it was very disappointing to see India lose the finals. It's not like the team crumbed under pressure (remember WC 2003 Final); but the team was out-witted by some perfect execution of skills by the hungry Sri Lankan side. It doesnt mean that we should question the hunger of the Indian side, I didnt mean that.

Since last 24 hours I have seen a lot of posts, jokes, memes targeting a single player Yuvraj for the team's loss. I understand that the fans get emotional about cricket in our country but I wanted to shed some light on the actual statistics.

Last 4 overs analysis.
Kohli 7 in 8b (S/r 87.50)
Yuvraj 4 in 9b (S/r 44.44)
Dhoni 4 in 7b (S/r 57.14)
Ext 4

True it was disappointing and frustrating to see the Indian team getting strangled; but we should not target Yuvraj. Sri Lankans executed their plans perfectly. Give credit to them.

Also, one other observation is - Sri Lankans added one more left hander to their squad, strengthening their batting and also to mitigate the impact of mishra and jadeja in the game. [both turn the ball into the left-handers making it easy to slog]. I think we missed a trick in our bowling combination. But all credit should go to the Sri Lankan think-tank, again. Stop taking out the frustration on Indian players. 

This team can only spiral upwards. In the form of Kohli we seem to have a strong candidate for heir-apparent of Dhoni. At the same time Rohit sharma also seems to be gaining the confidence to perform consistently at the international level under the shadow of Kohli's performances. These are encouraging signs for Indian cricket. I get a feeling that this defeat will make the Indian team and Yuvraj singh hungrier and give them one more reason to prove the critics wrong at the WC 2015. Fingers crossed!, as always an optimistic Indian cricket fan.




Friday, April 4, 2014

Finding head word in a Noun Phrase

Recently I came across this problem of finding head words in phrases. This problem assumes significance in a coreference resolution setup. (More on coreference resolution in another post). I was trying to do a simple string match on two phrases after stripping each of the phrases off closed-class words (or stopwords) and punctuation marks. Upon analyzing the results I realized that a simple string match may not solve the problem.

For example: matching "a glass bowl" and "glass of milk"

If we follow the heuristic of matching them after stripping them off stopwords and punctuation marks, we would end up saying that both the phrases are a match. (as there is a string match of "glass").

That is when I realized the need for identifying the entity being talked about in a phrase. The head words for the 2 phrases listed above are "bowl" and "milk" respectively.

It turns out that in NLP literature, it is called as the head word. Prof. Michael Collins, around 19992, seems to have come up with some heuristics (rules based on syntax tree path etc..,) to identify these head words. Upon further research, it seems to me that this is the state of the art and the heuristics are implemented in the stanford CoreNLP suite1. 

Here is a sample code below based on Stanford CoreNLP to identify head words for NounPhrases3:

1:  public static void dfs(Tree node, Tree parent, HeadFinder headFinder) {  
2:    if (node == null || node.isLeaf()) {  
3:     return;  
4:    }  
5:    if(node.value().equals("NP") ) {  
6:     System.out.println(" Noun Phrase is ");  
7:     List<Tree> leaves = node.getLeaves();  
8:     for(Tree leaf : leaves) {  
9:      System.out.print(leaf.toString()+" ");  
10:    }  
11:    System.out.println();  
12:    System.out.println(" Head string is ");  
13:    System.out.println(node.headTerminal(headFinder, parent));  
14:   }  
15:   for(Tree child : node.children()) {  
16:    dfs(child, node, headFinder);  
17:   }  
18: }  

References:
[1] http://nlp.stanford.edu/software/corenlp.shtml
[2] Prof Michael Collins' thesis has description about head finding rules here http://www.cs.columbia.edu/~mcollins/publications.html
[3] More details on StanfordCoreNLP HeadFinders here - http://stackoverflow.com/a/22841952/1019673

Tuesday, March 18, 2014

Passers-by classification

Often times we end up thinking, why is this guy wasting my time; when will this conversation get over; how can I escape his gaze, while passing by; and so on. I am pretty sure that we all have had these questions flash across in our minds at some point for one reason or the other. After taking my evening tea, this thought crossed my mind and I sat down to classify different people that one deals with on a day to day basis. 

1. Obnoxious, self-centered, gloating Prick:
I am sure everyone can quickly recall such a person in our environment. For no reason that person will talk to you about how others think how smart the person is, how successful the person has been and so on; and talk to you when you were not even considering talking to him. The person would be least interested in listening to what you have to say or want to say. Easy thing I do to deal with those persons is think of a joke, a PHD comic that I read for the morning, or a nice song and pose a smiling face while that person is yapping away :). I am not talking about the person who is excited about sharing good news with you; this is someone who has kept his/her trust in you; I am talking about someone who always does this, no matter when/where/how you meet the person.

2. I am superior to you:
This group of people have an air about themselves and when you cross their path, they simply turn their gaze away, in a dis-respectful way. I am not even talking about people who turn their gaze away out of shyness, busyness or anything; those people you can easily separate from this group. I am talking about the group who do it purposefully every single time, as if we don't belong to their so called superior world. I wonder what goes through their minds! sigh.

3. Recluse:
Not a lot to say about this lot. This is just the way they are.

4. Random Gibberish:
This lot is sometimes good to talk to; sometimes they can be a real pain in the neck. This is the kind of lot that has no agenda but talk; and so they talk gibberish. Give them any topic, they will be able to yap about that for any length of time. Even it means repeating themselves, they wont stop, until somebody stops them. This lot can be annoying almost always. But once in a while, one would always want to be involved in such a gibberish, I guess. I think this mostly happens with close-friends with mutual participation and involvement from either side. But when somebody else out of your close-friend circle is trying to engage you in such a conversation, then you are in for pain until it lasts. 

5.  Calmer group:
This group just wave and sport a nice smile and show respect to you. People in this group are a confident lot, respect other people and are the best of all the classes given here, according to me. 

Seems like the tea has lost its effect now. I got reminded of the pending research work on my desk. That is all for now. 

Finally I would like to leave you with a few thoughts of George Carlin on people.



If you would like to extend this list. Please add it in the comments.  

Friday, July 26, 2013

On Startup Engineering Courses

Of late I have seen a lot of online courses about Startup Engineering that have the agenda of helping the class-takers bootstrap their business. Also, there are a lot of philosophies about Lean-Startup, tips to run a successful startup and so on. I seem to see a pattern in all pieces of advice given in these courses and articles.

Aside all the common instructions like Start early, Fail early and so on, people tend to be dramatic about this whole idea of start-up and that they don't offer practical realistic advice.

I am starting to wonder if taking all these courses is worth taking them at all ? - Somehow I feel that we are missing the point by giving importance to these courses.

I don't know why, but these days I am beginning to say no to classes and lectures; may be the reason behind this post. 

Wednesday, June 19, 2013

Different ways of setting up a repo on github

Its often the case that we would have worked on different projects and never really uploaded our work to github. There are 2 different scenarios that I often found myself in. 

  1. .git repo present locally that is not yet added to github 
  2. code that is not yet added to github

Effectively I am going to talk about solving 1 only. I will point out a way in which scenario 2 can be reduced to scenario 1 and therefore the solution applies for both the cases. 

Scenario 1: .git repo present locally

Firstly we need the repo to have a github remote. To list the remote destinations for a git repo,
$> git remote -v
[Remember to type this command from within the git repo directory - as git command looks up .git folder in the current directory for its operations]

Secondly, create and initialize an empty repo in github and get the Clone URL for the repo. Here I will talk only about HTTP clone URL, for simplicity. [Note that it is actually https:// URL]

Thirdly, do the following:
$> git remote add <remote name> HTTP clone URL
$> git push <remote name> master  #for pushing master branch on to the remote

We are all set. We have uploaded our git repo onto github. 

Scenario 2: code (without local git repo) that is not yet added to github

To create a git repo locally, we can do the following:

$> git init
$> git add required files
$> git commit -m"sample message"
Now, we have reduced scenario 2 to scenario 1 and we will be able to upload our code to github.

References:


Thursday, June 6, 2013

Formalism in Network Security and a note on WEP's limitations

Initially I had not chosen Network Security as one of my courses; but I had to pick this course because the other course turned out to be uninteresting, to say the least. There I was in the Network Security class and I had to deal with different perspectives given by people about how difficult the course can be and how difficult it is to follow the instructor's lectures.

I thoroughly enjoyed this course and the lectures turned out to be really interesting; true that it was different from the courses instructed in a conventional way - All lectures involved a lot of discussion and the instructor took great care in explaining the required aspects within the scope of the course, very clearly.

One of the interesting topics I liked to read in this course was the Indistinguishability test introduced in formalizing the definition of security. It draws parallel from the Turing test and talks about distinguishability between truly Random world and the real world. The idea behing Shannon's perfect secrecy (One-Time-Pad), transitivity of Indistinguishability, building an Attacker for a given system (Proof by contra-positive argument), Rabin Miller primality test (Randomized algorithms - Monte-carlo algorithm for Primality test), Fermat's little theorem, Modular arithmetic ... the course when I look back looks very impressive and I will highly recommend this course for anyone, just to listen to the instructors lectures. [To give credit and to avoid confusion for those who would read it at a later point of time - the instructor during Spring 13 was Prof. Rob Johnson]

All the topics that I listed in the previous paragraph was merely the first section of the course; the second section was when the course became even more interesting with Protocols, PKI, DNSSEC, Secure-BGP, SSL, XSS, XSRF, HTML 5 POST message, Same Origin Policy - and the icing on the cake was the final exam. It was a short paper and it required us to apply all that we learnt during the semester, aptly, to devise best-possible solutions in a practical scenario. Not to forget the cool project that we got to work on - building an apache module that would add CSP1.1 script-nonce support as part of apache itself. source

And now I move on to the second part of the post:

WEP : I have come across many house-hold routers making use of WEP, still. There is even a documented demo about how aircrack-ng can be used to break a network using WEP.

For those interested in theory behind how WEP is insecure, I referenced a post written here
- Well written, brief and to the point.

The bottom line is we should never configure WEP in our wireless router setup. And I think by default all the routers are using WPA or WPA2 by default to secure the wireless network. I wanted to throw a word of caution about WEP! - RIP to WEP!

GT




Friday, May 3, 2013

One more about Love!!!



What is Love ? 

One moment you tell me to stay strong
One moment you tell me to yield
One moment you tell me to be weak
What exactly is Love, God!

One moment it feels everything is together
One moment seems everything is torn apart
One moment all the memories come back and haunt you
Where exactly is Love, God!

One moment I decide to move on
One moment I feel all alone
One moment I feel the desire to get back
Why is it so confusing, God!

One moment I believe that I can
One moment I feel that I wouldn't 
One moment I think that I shouldn't 
What do I do, God!

After all the questions, I persist
Only to realize that all the persistence 
Is only making me weaker, by the day
Wishing I have shoulders to lean on! 
Aargh! Not again, God!

So many people have written so many times about Love, but yet it is so important to being Human, that people keep writing about it.

This was written in 10 minutes. It is short and sweet, I think; not a kind of work that will make people ponder over the content, but that which people will love to read at times, for its simplicity.

GT

Sunday, February 3, 2013

Blocking in-video Ads - Youtube and Live streaming Part 2

You may want to take a look at the Part 1 of the article before resuming reading here.

Typically  the ad-blocking browser extensions available so far are working as follows:
1. Filter Addresses
2. Hide stylesheet elements

How do they filter addresses ?
Ref:  Ad Block Plus Internals
It seems that we can configure something called as "Content policies" for the browser engines. It can be done  programmatically (by implementing certain interfaces) as explained in the reference provided above.

So, it comes down to the extension providers maintaining a list of addresses which they deem to be sources for in-video ads. [Let us not worry about how they maintain the list, here - It could be a topic for another blogpost]

This means that it is very important to keep our ad-blocking extensions up to date, as and when an update is available.

Why Hiding Style sheet elements is important ?
Its not going to be enough if we simply block the HTTP requests for loading ads, in periodic intervals. It is sometimes necessary to clean the style sheet elements that may appear to be present in-video. Looks like there are APIs available to unregister style sheets (APIs to interact with the browser engine). By doing so, we can do away with the  loosely hanging style sheets from the webpage.

In the next post - I will try to show a demo (video or screenshots) on how to do this ourselves without relying on a browser extension.

References :
[The links listed below all refer to Adblock plus; they appeared first on my G! result set and hence using them here]
Ad Block Plus Internals
Ad Block Plus in Chrome - How it works ?
Ad Block Plus landing page

To be continued...

Wednesday, January 30, 2013

Blocking in-video Ads - Youtube and Live streaming Part 1

Part 1:

Now a days, one seems to be having a torrid time watching videos on Youtube; ever since Youtube started playing in-video ads, Youtube experience has almost become nightmarish for the impatient users.
Solution :
AdBlock Extension

Search for this popular browser extension and get it installed in your browser to get rid of the in-video youtube ads.


Part 2:
In this part I will try to demonstrate how AdBlock may have been built and the hacks we can employ in blocking in-video ads ourselves, without relying on extensions like AdBlock.

2 reasons why we may not want to rely on AdBlock alone :
1. May not work on all sites
2. Knowing what is under the hood is fun.

If any of the above 2 points brought a smile on your face, check the Part 2 of this series here

Cheers!

Wednesday, January 2, 2013

Process (pain) of availing educational loan in India (Specific to MS in the US)

[Please feel free to skip the first 3 paragraphs - I chose to use this space to express my emotions; But the essay after the first 3 paragraphs may prove to be informative for you]

I hate to say this myself. I am a firm believer that there is no point in complaining about a system in place - I believe that if there is anything wrong with a system, one should offer some constructive suggestion to improve the system rather than complaining about it.

But this loan application process totally befuddled me. It's not the statutory underpinnings of an educational loan - I am fine with it - since I got a chance to know about some of the laws, rules, regulations as per the Indian Penal Code; It's the lethargy with which the government organizations (Bank staff, Registrar office Staff, Tamil Nadu Housing Board Staff) are run that is disappointing.

I have seen the attitude of the government employees portrayed in movies and even heard about the same from my parents and friends; but to see and experience it for myself is a different thing. What hurts me the most is the situation has remained the same all these 10-15 years. I have always felt that majority in India believe that working for a government organization is primarily to have a carefree workplace environment and a guaranteed job apart from the numerous benefits that any government employee is entitled to. I don't know how the situation is in government organizations in other countries. There is something that we need to correct in the way we are being introduced to a government job and a government run organization.

Whining for another day. Let me get to the steps involved :

Startling Fact : I got to know that of all the loans, interest rate is the highest for availing educational loans, in India. However, the thing I liked about this is the fact that in State Bank of India and Central Bank of India, a student is exempted from paying any interest on the loan amount up to 6 months after the stipulated course is completed. Typically a student availing loan for a MS program in the US of A, can take 2 years and 6 months before initiating the re-payment process. I don't know if this is the reasoning behind the highest interest rates on educational loans. I am no finance expert - I shall leave it to the experts to comment on that.

1. For availing loan up to 4 Lakh INR, it is enough if we have a guarantor for our loan application. If we are applying for an amount greater than 4 Lakh INR, we need to submit a property as a collateral. What I was told is the fact that the banks are readily accepting only a land with a construction in place as a collateral. The evaluator from the bank will evaluate the worth of the property and will give a report. I was told that the collateral property must be worth at least 150% of the total loan amount sought.

2. Central Bank of India offers  loan up to 20 Lakhs. State Bank of India offers loan up to 30 Lakhs.

3. Regarding the House Property as a Collateral : [This list is specific to Central Bank of India - and may not be exhaustive]

  • Encumbrance Certificate (E.C) - Original copy for the last 30 years. If we apply for E.C, the registrar office will take at least 3 working days to provide you with one. 
  • Property  tax receipts, Water consumption bill receipts, Electricity bill receipts [better to have these receipts for 3 months (water and electricity receipts, I mean) ]
  • Original/Certified Copy of the sale/transfer deed by which your guarantor/co-applicant got rights to the property that you are submitting as collateral for the loan.
  • Photo copies of the historical documents ( From the Mother document of the property to the document mentioned in the above listed point ) - This can be a big list of documents in itself.
Once we have the following documents, we can get the documents scrutinized by a member of the panel of advocates associated with a bank to provide a legal opinion. Only upon getting an affirmative response from one of the panel advocates could the property be accepted as a collateral.

4. It is mandatory to have I20 when we apply for the loan (That is what I am told by the Bank Managers). [What I do not understand is how will people manage to get I20 from the University. AFAIK, the students are using the loan sanction letter only during the Visa interview. Initially upon receiving the admission from the University, the university asks for financial proof documents - they do a initial screening and then only courier the I20 document to the students - This means that the Loan cannot be given as a financial proof to the University while requesting for the I20 document]

I hope you guys get the flavor of the procedures involved in availing an educational loan. This is NOT exhaustive compendium. This is just a post to share my experiences which I believe will aid the souls looking for information. Talking to advocates, Bank officers (who were very helpful in clarifying about the processes involved) will help you cross the bridge. Be warned that the loan application process may take a month's time at least. So PLAN ahead. 

Good Luck!



Tuesday, January 1, 2013

F1 - US Visa Application Process

After a month long hiatus, it feels good to be writing again. I wanted to share with the world, how streamlined the F-1 Visa application process is. The US consulate announcement on Sept 5th    US Consulate's announcement about the streamlined VISA application process has details about the changes in the process.

In short, following are the changes I found most-welcomed:

  • All the fee payments are done online. DS-160 Fees and SEVIS fee - both can be played online. ( Earlier, the DS-160 fee had to be paid in one of the designated bank branches - Although this option is still available, we have an additional option of paying the fee online, which makes the process very convenient ) [It was 160 USD during December 2012]
  • 2 Appointments - 1 for providing biometrics data at the US consulate and the second one for the Visa interview itself. First appointment has to be scheduled at least one day prior to the Visa interview appointment. - more importantly, both the appointments need not be at the same consulate office. This is a convenient option, especially for those people on the move and/or working.

I will summarize the steps involved in applying for F-1 Visa
  1. Complete the DS-160 form - Keep a digital photograph that meets US Visa photograph requirements handy to complete the form. ( Fill and submit DS-160 here )
  2. Fix the appointments - 1 for biometrics and the 2nd for Visa interview
  3. Pay the SEVIS fee here [SEVIS fee was 200 USD during Dec 2012]
SEVIS - Students/Exchange Visitors Information System - SEVIS fee is towards maintenance of the SEVIS. If one gets an I20 from any of the Universities, the SEVIS will be updated. The Visa officer will have access to all the details regarding the I20s issued against one's name. So, during the Visa Interview, you might get occasional questions like 'Why are you applying for Visa for A eventhough you have I20s from A & B &...'. (Just a pointer)

Once the Visa is issued against a University name, if a student changes his/her mind to join a different University, he/she has to submit a fresh application for F-1 Visa.

My first post this new year. Wishing you all a very happy new year. I must say that the application process is much streamlined and it is just about following the steps, one by one. Happy New Year friends! - I hope to be active in this space this year. Fingers crossed. 

Ref: http://www.ustraveldocs.com/in/in-niv-visaapply.asp

Friday, November 9, 2012

How to repeat tracks in SoundCloud.com

Ever since A.R.Rahman performed his new composition for the movie Kadal (a Tamizh movie directed by Maniratnam sir) for the song titled "Nenjukulle" on MTV Unplugged, people, I am sure, have been playing it in loop. For those who want to play the sound track repeatedly in youtube, we have youtube repeater service that is freely available. Details can be found here About Youtube Repeater

But, for those who prefer to use Soundcloud, there was no option to play a sound-track in loop. That is when the idea to create a bookmarklet to get the job done, dawned on me. Also, thanks to my friend Krishnan (a budding musician and a heavy user of SoundCloud) that I felt the need for this repeater functionality. 

Using the luxury of the search engines these days and Github, I could figure out that the problem was already solved. Just that I didnt find that the solution was neatly packaged so that people could use it, easily. I am doing the packaging of the solution here.

Credits:
Bookmarklet sourced from here

Drag and drop the link below to the bookmarks bar, so that the bookmarklet is installed in your browser. 




Youtube Repeater

All the music lovers out there, I am sure many of you would have the habit of listening to a song repeatedly for hours. It is annoying in a way, when you have to keep going back to the youtube tab to play the song again, each and every time the song is over.

I found an elegant solution online for the same. What makes the solution elegant is the ease with which any user can get benefitted from this solution available online. Well thought out, I must say.

How to play songs in loop on Youtube :

1. Let's say the song you are listening to is http://www.youtube.com/ABC
2. Add repeater in between "youtube" and ".com" and you are all set.(and everything else remains the same)
     Eg: http://www.youtuberepeater.com/ABC

Get addicted to the favorite tracks of yours.

Addiction is good!

Update:
I want to point out that if you are streaming youtube via https, merely adding repeater in the URL is not enough. You will have to change the URL so that you use http instead of https as well.

Wednesday, October 31, 2012

Content!!?


Content
 
Long road, pitch black night, walking alone, vulnerable
Not even shadow for company, forlorn
The winding road, every corner raising hopes of reaching the end
The so called fate making you walk to its tune
 
The Euphoria of taking the less-travelled road, long gone
Uncertainty in the mind leading to doubts about the path taken
Only the will and self-belief to guard against giving up
All the profound lessons in life helping you keep calm
 
Fear seeps through the mind, with every passing second
A real test of will, want and desire
With the last surge of energy to see it to culmination
The end comes, slowly, snail pace or so you feel
 
Content that the destination is reached
Feeling the worth of the struggle and pain
All the pieces of the jigsaw in place
We fly away happily having lived a life devoid of crassitude

GT

Saturday, October 13, 2012

LCA - My attempt in deconstructing the recursive solution

Have given enough comments to explain the solution step by step.

/*LCA in a binary tree

Karumanchi Solution : Recursion (Found in http://www.flipkart.com/data-structures-algorithms-made-easy-java-1466304162/p/itmd34fz5jzb599u
Data Structures and Algorithms Made easy in Java
)

*/

//a, b -> parameters - nodes for which LCA is to be found out, they should remain unchanged throughout
BTNode LCA (BTNode root, BTNode a, BTNode b) {
BTNode left, right;

/*
Base Condition 1: if the root pointer is null - do nothing - return null
*/
if ( root == null ) return null;

/*
Base Condition 2: root pointer in this program is searching for a or b;
  so once we reach a or b, no more search is required.
*/
if ( root == a || root == b ) {
//Pointer comparison is enough here
return root;
}

/*
traverse left and right subtrees
*/

left  = LCA(root.getLeftChild(), a, b);
right = LCA(root.getRightChild(), a , b);

/*
Condition 1:

When nodes a and b are on either side (left and right) of a node,
we know that we have arrived at the LCA
*/
if ( !left && !right ) {
return root;
}

/*
Condition 2:

Condition that is required when both a and b are in the same subtree

        eg: 1
        2
        3

Here let a = 2 and b = 3; LCA of a and b in this case will be 1. 2 and 3 are in the same subtree

*/
return ( left ? left : right);

}

OAuth vs OpenId

Last week when I was in my home-town, I was having a conversation with my brother about OAuth and OpenId. When he asked me the difference between the 2 and asked me to give one line for each protocol I was not able to do so. That is when I realized that I was not clear about both the protocols myself.

As usual, went to the drawing board to figure out what each protocol is for.

Found the following presentation extremely helpful :
http://www.slideshare.net/rmetzler/identity-on-the-web-openid-vs-oauth

Summarizing the content here :

OpenId - is meant for identifying the user in the web-world. Only for identification. (as the name says)

OAuth - is required when a 3rd party is looking to access a user's data present in another server.
               Data access.

OpenId - Identification
OAuth  - Data access

Period.