Monday, November 30, 2009

vada pav / pao

Share

Vada pav is the indian version of a burger. contains a fried patty of potato and some spices including  chilli, garlic, cumin, salt, etc  coverd in gramflour batter between two bread rolls and a generous quantity of lahsun ki chutney on the patty .

the idea behind such simple foods is to be able to eat them on-the-run - quite literally. when i was in my teens and went to bombay, the sight of labourers having two vada pavs for lunch was everywhere!

the food is high in carbs which is exactly what physically challenging professions need. also since these men and women are mostly running around the city with no fixed job location, bringing food from home is a bit difficult (not to mention, pointless if you can get a lunch for 5 Rs - 10 years back - now maybe 15rs or 30 cents).

i made vada pavs at home but instead of deep frying i just pan fried the patty. was yum!

will post a pic soon that i have on the sd card of my camera.

Friday, November 20, 2009

marathi lahsun ki chutney (the one you get with vada pav)

Share

seriously, there can't be a simpler recipe for anything!

grind together roasted peanuts (200 grams), garlic cloves (10-15), chilli powder (1-2 tablespoon based on how hot you want it), salt (1.5 teaspoon)

THAT'S IT!

Monday, November 2, 2009

rajma recipe (red kidney beans curry)

Share

hey :)

rajma (red kidney beans) was probably one of the first dishes i made completely by myself (after maggi noodles, i.e.). we used to have rajma, chapatis and green coriander chutney on virtually every special occasion at our place or jagrat's. so, after watching mummy and aunty cook it for so many years, i had the recipe pretty much memorized!

there are a couple of ways of making rajma and i like the one where you don't really have so much garam masala in the final product but just the taste of it. you can achieve this by boiling the rajma with a bag containing the different whole spices. squeezing this bag can later to get the most out of it, before throwing it away. not having the cinnamon sticks and bay leaves makes it easier on the stomach too.

ingredients (to serve 6 gluttons or 8 normal people :D) -

for the bag / potli -
3 star aniseed
2 big cinnamon sticks

5 bay leaves
3 black cardamom (badi elaichi)

Friday, October 16, 2009

mango pickle / aam ka achaar (achar)

Share

Hey,

Sydney it all set to witness warmer temperatures of around 28 degrees and the weather's perfect to set mango pickle. I have set chilli, garlic, and lime pickles before but always heard that mango pickles are tricky so never tried them ... until now :)

went to the markets are 06:00 only to find that fridays are wholesale days. so i couldn't pick up a couple of kgs of raw mangoes. So my brain is going "that's it, quit!" but despite all my instincts asking me to drive back home quitely, I go to this HUGE wholesaler and query, "what's the minimum amount i can buy?". "10 kgs", comes the stern and dismissive reply. ok, then, 10 kgs it is...



so - enough small talk. here's the recipe


Thursday, October 8, 2009

lauki ke kofte

Share

holy moly, i was writing the title of this post and as usual, i was about to write its english translation when i realized it is "balls of long gaurd". LMAO! But I hope that it doesn't put you off your appetite since this is a healthy version of one truly delicious dish. "Healthy" because instead of frying the balls (ahm...), you can steam them followed by pan frying to hold the shape when put in the gravy.

Ingredients:

For the Koftas:
Long Guard/ Lauki - 1.5 kgs
Ajwain - 1/2 teaspoon
Salt - 1/2 teaspoon
Finely Chopped Chilli - 6-10
Finely Chopped Garlic - 3-4 cloves
Finely Chopped Ginger - Finger-size
Lemon Juice - 2 tablespoon
(Besan 4 tablespoon and 1/2 tablespoon Baking Powder)
OR
(4 tablespoon self raising flour)
Jeera (Cumin) powder - 1 teaspoon


Wednesday, October 7, 2009

bairagi baadal bairagi (this post might only be of interest for hindi speakers)

i was frantically searching the depths of Internet for this one song from the album "Boodhe Pahadon Par", titled "Bairagi Baadal Bairagi". The album is a work from Vishal (music), Gulzar (lyrics), and Suresh Wadker (singer). The song in discussion is a particularly beautiful poem and the music is fantastic. It touches classical music in a way (though I am by no means, a student of classical music, I enjoy it nevertheless).

Ultimately when I found the song, I started thinking about all the other nice songs that are unfortunately not popular and hence not available readily. Wouldn't it be a great idea to have a platform that contains a repository of these gems.

Few of my favorite rare pieces are -

- yaad piya ki aaye (prahaar)
- aaja ri nindiya (nidaan) even this national-award winning movie - based on HIV infection - is rare to find
- suno re bhaina (godmother)
- phul-gendwa na maaro (dooj ka chaand)
- gham diye mustakil (shaahjahaan) apologies to sajal for pulling his leg on this one during undergrad :D
- o des se aane waale bataa (aap ki abida)
- saanware ai jaiyo (laal salaam) music was given by hridaynath mangeshkar)
- yaar julaahe (boodhe pahadon par) same album as bairagi baadal bairagi
- nikla, neem ke tale se nikla (hu tu tu) marathi themed song
- kaali ghodi dwaar khadi (chashm-e-baddoor)
- kahaan se aaye badra (chashm-e-baddoor)
- thirakti kyun hawa (yeh yaarana by renoo nathan)
- more saiyyan to hein pardes (bandit queen - nusrat)
- jeevan kya hai (is raat ki subah nahin)
- aaina mujhse meri (daddy (?) )

let me know if you have some songs that you have been searching for. maybe I can be of some help

cheers
gaurav

Thursday, October 1, 2009

Decisions decisions

Some decisions can be made with a coin toss. This one ain't one of them :(

sony w290 @ 200USD? super compact (3.9 x 2.4 x 0.9"), super sleek, good enough resolution and ISO sensitivity, zoom but no zooming in while recording video :(
or,

panasonic TZ7/ZS3 @ 300USD? super zoom (12x), and zoom in while recording video :p
but not so compact (4.1 x 2.4 x 1.3" or 50% bigger than w290)
or,

both?

(P.S. I am getting the Canon 500D which also has HD video but not zoomable while recording - ARGH!)

Help me choose! (rationale behind your choice would greatly be appreciated, if not rewarded :D)

Wednesday, September 23, 2009

red sydney


it's the first time that a major city in australia has had dust-storms and we were both lucky and unlucky to witness it :) lucky, because, well... it's the first, and probably the only time in a long time this will happen, and unlucky because there are very tiny dust particles in the air, which means our football game is in jeopardy :( anywho, i was still glad to wake up to an orange sky :)

Thursday, September 10, 2009

living alone

living alone is a tricky business. not only do you try to take care of pending matters like setting up exam papers, finishing a research paper and marking assignments, there is also the small matter of "how clean should i keep the house" coz you don't want your spouse to see a mess when they come back and you really don't want it to be perfect, as it sets an unrealistic standard that can never be matched and thereby leads to a pitfall.

There is one good thing about living alone and that is that you can watch kung fu hustle, when you want, as many times as you want :D.

"How much did you miss me" is a question that should never be taken lightly - for if you do not show enough quantitative and qualitative evidence of "missing", then you better say goodbye to a couple of hundred dollars in the course of fixing it. However, if you say you over-state your "missing-quotient", it means that you will never get the space for yourself where you can watch harold and kumar again, and again, and again. But that said, Gunjan, I can not miss you more than I do, even if I try*. Please, DO read the disclaimer too before you accuse me of being mushy.

Food issues are not an issue as if you have a couple of friends around, you can always pull out a puss-face (don't misinterpret - i mean from puss from "shrek") and get dinner invitations (i hope khushboo doesn't read this else i'll never get invited again)

anyways, gunjan comes back tonight so i better tidy up the house a little bit and get set for a KFH and Harold & Kumar marathon for the last time...

Cheerio,
Gaurav

* You see, the concerned statement doesn't actually give away any information about how much I miss her, even though it gives the appearance of doing that, since it only provides the knowledge that the mising-upper-limit has been reached, but doesn't say whether that upper-limit is actually high, or low.

Sunday, September 6, 2009

sunday blah

gunjan's gone, soccer's over, food's ready, gaurav's bored :)

there is nothing meaningful in this post (so it IS like my any other post).
just wanted to share some events from football this morning. we had a good 5 on 5, 1/3 soccer field game and i was delighted to have saved a lot of goals which eventually led us to a 11-6 win (lots of goals, since no goalie (hands)). i am beginning to have an understanding of where the goal posts are while blocking and am not leaving gap between legs which has made a huge difference and is frustrating the opposition, especially ian, this huge german guy who, if he ever steps on me, will render me just fit to play carrom for the rest of my life. i especially loved it when ian, ralph, and hussain mumbled "oh shit!" when they realized that i was contesting the ball. (i don't feel the same when my students say the same when they see me :D).

here's a picture of another soccer group (this one is a bit more casual - uni people playing during lunch hour). should post the sunday game pics soon.



anyways, off to do some shopping now. will probably come back and have lunch outside in the park, in this beautiful weather.

you guys and girls take care...
gaurav

Monday, August 31, 2009

Baafle

Share

The Malwa region is well known for it's lazy people. Second to only genetics, this is attributed to they widespread consumption of Baafle'.

Ingredients:

Wheat flour (aata): 4 cups
Maize flour (makke ka aata): 1 cup
Yoghurt: 1 cup
Ghee : 1 cup
Salt: 1 teaspoon
Turmeric: 1/2 teaspoon
Ajwaain (Carom seed): 1 teaspoon
Lukewarm water: as needed

Mix the two flours, salt, yoghurt, ghee, turmeric and carom seeds well together. then start adding water and kneading till you get a soft dough. to answer the question how soft is soft, make sure that it's not too wet (when you poke the dough with your finger, it shouldn't stick to your finger) and not too hard/ dry (when you poke the dough with finger, the dough should slowly come back to it's position). *Important* leave the dough for 30 mins to ferment.

boil water with 2 to 3 tablespoon of ghee and when it comes to a boil, add the dough balls (roll round balls and press slightly from top and bottom). don't crowd it otherwise, they'll stick to each other. remove. Boil the baafle for 20 minutes and put them in an oven pre-heated at 200 degrees (you should turn the oven on mid-way through the boiling process to make sure it's hot enough when baafle are boiled). Bake for 30 minutes (turn after 15 minutes) and you are done.

you can dip them in ghee if you are going to burn it off at soccer/ gym/ wherever. otherwise DON'T!

accompanying pics and daal recipe soon...

Tuesday, August 25, 2009

besan mirchi ki chutney (chilli gramflour relish - HOT)

Hola,

My father hails from Hatod, a small village on the outskirts of Indore (where I grew up). While growing up, we used to go to Hatod pretty much every other week to meet my grandmother, cousins and uncle. During festive seasons, we used to stay there for weeks, as Indians celebrate festivals at the eldest surviving member of the clan.

It also reminds me of a hilarious anecdote from uni years. We went to the village on my dad's birthday to get blessings from grandma and it got a bit late while coming back. A physics lecture had started at 2:00pm and I entered the rather small lecture room of capacity 100 at 2:25. The lecturer, Mr. Ghatpande, nice fella, went crazy - "Who the hell do you think you are :@, strutting into the class late while everyone else is on time!!!". I pulled out an innocent face (yes, i have one of those for emergency situations) and replied politely, "sorry sir, i am coming from Hatod and the traffic was real bad".

Now, for that entire semester, Mr. G assumed that I come from Hatod *everyday*, while my house was in front of the uni. In fact, he thought that I bicycled all the way from Hatod as I mostly rode my bike from home. I distinctively remembered him mentioning to me once that Laal Bahadur Shastri (India's 3rd PM) also used to walk some 10 ks and swin across a river to reach school. Needless to say, I did not correct him. A couple of other guys got into trouble because of that; "look at him (pointing to me) and look at yourself - shameful!"(the evil application of comparisons :D).

But like all good things, this too, had to come to an end. I walked into the office of Dr. Saxena, our dean, and Mr. G was there, who started showering praises on me, "look at him, sir, this kid is a model student, riding his bike (he saw me on my bicycle a couple of times) 25 kms from Hatod every single day!". Unfortunately, Dr Saxena knew that it wasn't the case and smirked, "Sir! This rascal doesn't come from Hatod, he lives 600 meters from the uni*" .... Things were never the same for me again :(

* for those of you who understand hindi, what Dr. Saxena actually said was, "Arre sir, yeh kamina hatod se nahin aata, college ke saamne rehta hai!" (he had a weird of showing that he cared :D)

anyways, back to post topic - mirchi besan ki chutney - so what happened in Hatod was that since we didn't have a fridge, we didn't make loads of food, just enough for the meal; optimization algorithms are so freakin' popular in Indian Village - Dijkstra - INDIAN! (See Goodness Gracious Me to make sense of this joke). So what happens if gluttons like yours truly get hungry at midnight. We had pickles and everything but this particular chutney was AWESOME! I used to spread it on a chapati, make a roll and have it as a snack. If you like it hot, try this out - mmmmmm :p

Ingredients (to make enough for a week for 4 people like me :D):

Gram flour - 2 heaped tablespoon
Chillies chopped into rings - 50 grams or 20 in quantity
Lemon - One whole or 6 tablespoon bottled lemon juice
Salt - to taste (1 tablespoon for me)
Mustard seeds - 1/2 teaspoon
Cumin seeds - 1 teaspoon
Turmeric - 1 teaspoon
Oil - 50 ml

Note that for this recipe, heat is kept high throughout the process.

Heat the oil and when hot, add the mustard seeds, followed by cumin seeds. add the chopped chilli and turmeric. After 15 seconds add the gram flour and stir continuously to avoid formation of lumps. After 1 minute, add salt, stir, add lemon juice, stir and take off the heat immediately...... Great, now I am hungry!

Friday, August 14, 2009

kheer recipe - happy birthday jagrat!

Today is 14th August - Pakistan's Independence Day and my friend, Jagrat's Bday. I wish all my Pakistani friends a very happy independence day and wish that the current times will soon pass to bring back prosperity in the culturally diverse region :)

Jagrat, I wish you a very happy birthday and even though we haven't seen each other in person in 7 years, I just want you to know that you are very much missed every single day.

Now *Jagrat* was a glutton (or a "gourmand", depending on how you wanna put it :D) One of his favorite desserts (not that he discriminated when it came to sweets) was kheer. Jagrat's mum, my second mum, Rekha makes the best kheer I have had ever. Her kheer with Pooris - mmmmmmm!

Here is a lame effort to fit into her shoes. Hope it is 10% as tasty as hers!

Ingredients (for 8 people):

Milk, full fat - 2 ltrs
Sugar - 150 grams (you can increase/ decrease to your liking)
Crushed cashews, pistachos, almonds 100 grams
Saffron - about this much
Rice, basmati - 100 grams
Sultanas - 50 grams (I don't like them, some people do)

On high heat, bring milk to a boil and reduce heat to medium and stir occasionally to avoid milk sticking to bottom. Wash the rice and soak it (keep aside).

after 30 mins milk should reduce to 1.2 ltrs. remove a little milk (20 ml) and mix saffron in it. after a minute, put the saffron mix back into the milk.

now remove water from rice and crush the rice a bit with your hands. add to milk along with dry fruits, sultanas, sugar and after 30 minutes, you have a beautiful batch of kheer. You may sprinkle shaved pistachos and almonds as garnish :)

Best served with pooris :p

Image coming soon ...

Take care all,
Gaurav

Tuesday, August 4, 2009

Alu pyaaz ki rase waali sabzi (potatoes and onion curry)

Contrary to popular belief, Indian villages don't usually have naan, tikkas, biryani at dinners. In central India, from where I am, family meals are composed of quite plain and thin daal, slow-cooked vegetables (spinach, fenugreek, pumpkin, long gourd are quite popular), plain chapatis and rice. Pickle is sometimes provided with the food but if you are visiting someone for lunch/ dinner, it might be rude to take pickle/ add salt to your food since it implies that the food they prepared is not good enough and you have to modify it (yes, it can be a pain sometimes!)

on the weekends, a richer and spicier curry is cooked, ofter for lunch since a post-lunch nap is often in order. this is a recipe for one such HOT dish:

Ingredients (to serve 4-5)

Potatoes 400 grams
Onions 600 grams
Garlic 10 cloves (optional)
Ginger 30 grams (optional)
Oil 100ml
Cumin seeds 1 tablespoon
Fennel seeds 1 teaspoon
asafoetida (Heeng) 1/5 teaspoon (really optional)
Chilli Powder 1 heaped teaspoon
Coriander Powder 3 heaped teaspoons
Turmeric Power 1 level teaspoon
Garam Masala (I think "MDH" brand is good) 1 teaspoon (optional)
Salt to taste

* some items are marked optional since not everyone likes garlic in their food and not everyone's got garam masala ready at a moment's notice. The elimination of these doesn't have a tragic effect. It reduces the overall taste, but it's still pretty good.

** Adding asafoetida or not really has no effect on taste (Not sure, why we put it in then!)
(I later got this message on messenger from my wife Gunjan -

   Gunjan says:
      and asafoetida is used as an anti flatulent
      read prevents gas
      and i have proof too - http://en.wikipedia.org/wiki/Asafoetida
)

Making the spice paste: add the chilli, coriander, turmeric and garam masala to about 100 ml water to form a thin paste. keep aside for later

Heat the oil and add cumin seeds and fennel seeds. When they are brown (about 30 secs), add asafoetida and onions. Stir occasionally to avoid onions sticking to base and after 2 mins when water starts coming out of onions, add chopped ginger and garlic. Stir occasionally till onions turn golden brown and oil starts re-surfacing. Add diced potatoes (i like them diced smaller - about 2cm^3) and salt and stir well. add 50 ml water to have that initial steam that will cool the potatoes. Cover with lid, turn to low and cook for 5 mins. Remove lid, turn the heat up and add the spice paste, cook while stirring regularly for 2 mins. Add 500 ml water (more if you want the curry thinner, less if you want it thicker). Turn to medium-low and cook for 10-15 more mins (10 if potatoes cut into 2cm^3 pieces, 15 if cut into larger pieces)

Garnish with chopped coriander leaves and enjoy with chapati, parathas, naan, rice, bread....

P.S. You can put peas (250gms) and diced ripe tomatoes (200 grams) as well after you add the spice paste. This would give you a bit "sweeter" curry.

Monday, August 3, 2009

Baked Vegetable in White Sauce and Cheese, lotsa cheese!


You go to any general restaurant in India and amongst the tikkas and kormas and jalfrezis, you'd have a dish called "baked vegetable". now when you try this dish, it's got nothing Indian about it, why it doesn't even have no chilli powder in it :D It's my guess that the dish was put on the menus to cater for people who are not that into Indian cuisine.

anyways, my friends say, and being the humble guy I am, I agree, that it's as good as the ones you get at the restaurants, if not better :)

so let's get on with it :)

ingredients to serve 6 (in order of importance)

tasty/ cheddar cheese - 400 grams
cream cheese - 300 grams
butter - 50 grams
plain flour - 6 tablespoons
cream - 250 grams
milk - 150 ml
diced pineapple - 150 grams
pineapple juice - 100 ml
(you can get the two combined as diced pineapple in juice cans)
mushrooms - 100 grams
carrots - 1 large
corn kernel - 50 grams
cauliflower - 100 grams
(ok, these ingredients might serve 8 in fact :D)
other veggies that you can throw in - pumpkin, beans, potatoes
black pepper - 1/2 tablespoon (or as much as you like)
salt
rosemary, oregano are optional


grate the cheese and mix the flour with milk and cream. preheat oven to 190 degrees Celsius.

melt the butter in a deep base 3 ltr oven proof dish on gas. turn the gas to medium and add the flour mix and whisk continuously to avoid lump formation. add the cream cheese after 2 mins and whisk whisk whisk for 3 more mins. add the veggies and after 2 more mins, add the pineapple pieces, juice, pepper, salt, herbs and 100 out of the 400 grams grated cheese and mix well. bake in oven with open lid for 30 mins. if you put potatoes, use the small chat potatoes (just discovered that's a global term!) or if using the bigger ones dice them about 2 cm^3 otherwise they might be a bit tough. take it out of the owen and put the remaining grated cheese on top and place it back in the oven so that the heating element is above the dish. bake for 10 mins and the cheese should be browned by now.

have it by itself or better still, serve with garlic bread, or lachcha paratha



please do me a favor and don't eat it with rice! hope you like it as much as i love it :p

cheers
gaurav

Wednesday, July 29, 2009

Making pumpkin masala recipe even easier

If you thought that the pumpkin masala / kaddu ki sabzi recipe couldn't get any easier, you're wrong - you can skip skinning the pumpkin - just dice without peeling!!! Saves a lot of time and is equally tasty, if not more :p

Tuesday, July 21, 2009

Search results in this day and age

This is what I got when I searched for a "food processor" at Dick Smith's website. Unbelievable

Indian recipes / Indian cooking

Over the last couple of days, it was pretty hard to avoid Masterchef (a reality cooking competition on Australian TV).

It got me thinking about what is the history behind Indian cooking, what influenced Indian cooking to develop and come out the way it is, and how in the world are there so many different cuisines within India. I think it would be a fascinated topic for research and I am sure there have been many gluttons like me who have already studied this area quite keenly.

One potential topic would be to study the correlation between cooking style and crime since intuitively elaborate and spicy cooking styles would lead to demanding lifestyles, and at some point of time if I am unable to live that life, it may drive me to commit a crime. On the other hand, simple lifestyle brought about by simple cooking would result in being content with what you have and thereby lower criminal tendencies.

That is also the essence of Indian philosophy in which food is categorized as "Taamsic" (inducing desire) or "Saatvic" (leading to simplicity). As generally seen, most of the vegetables like pumpkin, carrots, peas are categorized as Saatvic while the high-heat and high-taste containing items such as Garlic, Onions, Meat are categorized as Taamsic.

Monday, July 20, 2009

mirchi aur lahsun/ lahsan ka achar/ achaar (chilli garlic pickle)

This is a chilli pickle recipe that Michelle's mum gave me and I love it because it's hot and full of flavor. It's a bit too hot so if you can't handle chilli, you might wanna sit this one out :D

Ingredients

Chilli - 500 grams
Garlic - 200 grams
Curry leaves - 1 packet (about 10 branches or 20 grams)
Salt - 100 grams
Mustard oil - 200 ml
Olive oil - 50 ml
Mustard seeds - 1 tablespoon
Fennel seeds - 3 tablespoons
Turmeric - 2 tablespoons
Chilli Flakes (for extra kick only) 4 tablespoons
pickle masala mix from indian store (Brands: MDH/ Mangal/ etc) - 100 grams

Grind the Chilli and Garlic in the food processor, keep fairly coarse.
Heat mustard oil in a big pan and when hot, add the mustard and fennel seeds. After half a minute, add the turmeric and curry leaves, closely followed by the chilli garlic mix. Cook for 2 mins and take off. Add the chilli flakes if you want extra hot, salt, and pickle mix and put in a dry and clean jar and put the olive oil on top to cover the pickle. It's ready to eat immediately but I give it at least 2 weeks to soften up.

Sunday, July 19, 2009

Hare dhaniye / dhanie ki chutney (green coriander chutney)


At dinner gatherings, most of the homes in India will get the party started with samosa and other home made savoury starters (chicken tikka is very popular amongst north Indians). The best dip for these (democratically selected) is green coriander chutney or "hare dhaniye ki chutney". Every region has a variation of the same. In Maharashtra, adding roasted peanuts/ groundnuts is popular while in central India, where I grew up, mint is the prefered addition. I am posting a very simple recipe of this delightfully refreshing dip as I like it :)

Ingredients (to make about 200 - 250grams)

Coriander leaves - 150grams
mint (optional) 30 grams
Garlic - 8 cloves (you can even eliminate it if you have post-dinner plans ^-^)
Ginger - about 30 grams
green chillis - I like about 8 hot ones (but you can reduce them to 3-4 if you don't like it too hot)
lemon/ lime - 1
sugar - 3 teaspoons
salt - 1.5 teaspoon
olive oil (optional) - 3 tablespoons

Chop up the coriander roughly (makes blending it easier). In a blender, add the garlic cloves, green chillis, sliced ginger (since it's harder to blend ginger), 20 ml water, mint, olive oil, and one third of the coriander. Blend till it's a smooth paste, and repeat the process with other parts of coriander. Add the other two thirds of the coriander and also the salt and sugar. Take out in the storage container and squeeze in the lemon, mix well. Enjoy on sandwiches, with samosas, cheese and crackers, mathris (yummm - will try to post it's recipe soon). Hope you like it as much as I do (but not as much as Menno does who eats it like a normal veggie and we have to stop him :D)

Take care and stay healthy,
Gaurav

Wednesday, July 15, 2009

Learn to read, (wo)man!

I opened my teacher's evaluation forms today with the same feeling of enthusiasm+fear+hope and was going through the comments in a ridiculous hope to see something on the lines of

"gaurav is so great that he should be rewarded by giving him 20 million dollars and 3 years leave"

or maybe

"gaurav is so bad that he should be gotten rid of by giving him 20 million dollars and 3 years leave"

anyways, I came to this student who gave me a bad rating (not that i am not used to negative feedback :D) Let's call this student "Pat" (I got greeted with a vase by Gunjan, and not in a good way, when I named this character "Harry")

So smarty-pants Pat ticks "strongly disagree" on my teaching evaluation form thinking it's "strongly agree" column. I know that Pat didn't really mean to tick SD since before ticking the dreaded column, Pat commented,

"great lecturer - made it really interesting"

I would have received a 5/5 class feedback if not for Pat.

Pat, before learning C++ and Java, learn to read mate!

sigh...

Monday, July 13, 2009

Milan-Singapore Trip

I had a conference trip to Milan this July and luckily the sun was out from 6 in the morning to 10 at night, which meant I could attend most of the talks from 10am to 5pm and still have enough time to go around. Here's a brief travelogue of my trip...

First things first, DO NOT get money converted at travelex Sydney - A**h****. They charge a big commission and give you a poor exchange rate. get it converted from singapore airport - zero commission and much better rate; or any global bank such as HSBC. also, in general, get it converted at destination airport rather than from where you leave.

I was staying in Hotel Atahotel FieraMilano (translated to "Fair market of Milan") next to Domodossola station, just one stop away from the city's central station of Cadorna (from where you also get the train to the airport). There were two problems with the hotel - costly internet and unfriendly staff (not explicitly rude, but kind of inhospitable); but if you are on your vacation and don't want to check the mail, and also don't give two dimes over the hotel staff, it's a good hotel to stay at, since it's reasonably priced (around 110AUD at current exchange rate for a double room), and is very close to central station.


As you walk out of the Cadorna station, you can see the dome of a castle nearby which is Castello Sforzesco. This was my favorite place on day one of the trip and remained that way at the end of it. The sheer enormity, design from a defensive perspective and solid construction is breath-taking. I especially loved the side towards built with huge cubical black stone that gave it strength. The strategic look-out points gave an early warning of potential attacks to the army. The central courtyard is huge! Perhaps it's the same as the combined area of two soccer fields.


At (Actually, 'on') Castello Sforzesco


Just outside you've got a newly constructed fountain area where you can cool down in summer as temperature there was 35 degree Celsius, a nice change from Sydney's winter. But sometimes it was too hot and the fountain in front of the castle and numerous taps around the city were always appreciated.

The best way to explore the city is by bus and trams. The tram was my preference between the two and you can take unlimited rides each day for a price of 3 euros (around 5 auds). This is much better than a daytripper in sydney. In fact, it's cheaper than a single one-way ticket from my place to the city in sydney! Unfortunately, this did not include the outer suburbs tickets which was 1.55 euro, still cheap from Australian perspective. The trains come every 3 mins during peak hours and 15 minutes during off peak hour. From my hotel to Cadorna, to Famgosta, to Assgao where the conference was held, it took me 40 minutes (including the two change overs) so I would say the transportation is very well connected. The food in Milan is awesome! The conference lunches were really nice with beautiful desserts.




From Cadorna, you can go to Duomo station which is the shopping center and also the location of "Duomo" cathedral itself. From the inside, it's pretty much like any other cathedral with glass paintings and other stuff, but from the outside it's spectacular with numerous "spikes" that are in fact 10-feet high statues of relevant people from history including kings, saints, priests, Jesus, and also Napolean Bonaparte, who ordered the completion of the Duomo around 1805. He was later crowned the King of Italy at Duomo. The art-work and attention to details on each pillar is unbelievable. Duomo also shows that say what you may, symmetry rules when it comes to architecture.



Next to Duomo is Galleria Vittorio Emmanuelle II - an eye-popping shopping center with a dazzling mosaic floor and statue engravings on the walls. And again, it is symmetric with four lanes going out of the shopping center. The aerial view will do better justice than my description. P.S. I hate the McD's there since it kind of diminishes the beauty of the place :(



Gunjan's brother, Mohit joined me on the fourth day of trip and we had a real good time watching "It's always sunny in philadelphia" in the morning at the hotel (the things you do when in Milan!) . We went to the castle once more and then to Sansiro stadium - the home of A C and Inter Milan. Visiting their gallery was a wonderful experience but the ground was disappointingly covered since U2 had a concert the night before. We took the tram around the city and headed off to Galleria where we bought ferrari stuff for Mohit and Gunjan.

From Milan, I headed off for Singapore and watched "Sunshine cleaning" in the flight, which I thought, was an excellent movie. Of course, Amy Adams and Emily Blunt are both easy on the eye but for me the actor who plays their dad and the guy at the sanitation shop stole the show.

Kavita and Rahul generously hosted me in Singapore and they had a lovely house in Hougong. Singapore was still hot and humid with intermittent rains. Shopping is always the central attraction in Singapore in the absence (or lack) of waterfalls, treks, hills, castles, or cultural heritage. Unfortunately, the shopping center containing the shop I most wanted to visit was demolished and I dragged KR to a dozen shops making them walk a cumulative 16 kms in the process - apologies :(

We headed back home to prepare palak paneer and iranian zaafran rice for dinner, which was a success, if I may say so myself :p It was also really nice of Rahul to get me the Henry Jersey from Pattaya/Phuket while they were in Thailand in Dec 2007/ Jan 2008. I love it :)

From Singapore it was back to Sydney and it was pretty normal... except that I had a window sit with two "big" people next to me so I had to hold back on the coke :(

Grazie,
Gaurav

Saturday, July 4, 2009

iranian zaafran rice


for the record, it's 2:40 am and I am watching tennis. don't know whether waking up all night watching tennis on tv and badminton on youtube worth it or not..... oh i know, it's not!

anyways, iranian zaafran rice recipe - (iranians please excuse me if i might have missed something and feel free to comment)

ingredients

long grain rice (basmati preferred) 500grams
salt 1/2 teaspoon
olive oil/ ghee (clarified butter) 30 grams
sultanas 50 grams
cashew 100 grams
potato 1 large
fried onions 100 grams
oh... and saffron 5 grams

1. wash rice in warm water to get rid of excess starch.
2. boil rice in a lot of water (about 3 litres) till it's about 75% done
3. drain water away and mix the oil/ ghee in the rice.
4. separate rice in two parts A and B. boil 20 ml of water and mix saffron to get the flavor in the water and mix this in part A.
5. line the base of a heavy base pot with 1 cm thick potato slices.
6. add water so that it covers the potatoes (50-100 ml should be sufficient).
7. put the rice (i like part A on one side and B on another) over the potatoes and spread the sultanas on top, close the pot with lid so that steam doesn't come out. Try to seal it as much as possible.
8. cook on LOWEST POSSIBLE HEAT for 30 mins.
9. add cashews and cook for another 15 mins.
10. garnish with the fried onions.
11. serve with yogurt and mutton curry - yummmm!

oooooh oooooh garnish with fresh pomegranate seeds if you can get your hands on them. divine!

Wednesday, June 17, 2009

lamb/goat curry recipe (longer cooking time)


Hi all,

I decided to digress from my standard goat/lamb curry recipe and try another recipe I heard about couple of months back instead. It's much easier than the previous recipe of mine and tastier as well, but here's the kicker - it WILL give you a heart attack eventually (man! am *I* good at promoting stuff!). Relax, just don't have it every other day - once a month, with a 10k run or a squash game every week, and you'd be fine.

Recipe:

Ingredients:
Lamb/ Mutton/ Beef curry pieces on the bone (1.5kg)
Oil (100ml)
Ghee (or butter) 50grams
onions 200grams
tomatoes 200grams
garlic paste 1 tablespoon
ginger paste 1 tablespoon
salt to taste
shaan meat masala (other meat masalas would do but I quite like shaan or badshah)
4 tablespoons
thick yoghurt 200grams
cumin 1 tablespoon
1 large cinnamon stick

at least one day before the cooking day, mix the meat, yoghurt, and 1 tablespoon of meat masala and leave in the fridge.

next day...

peel the onions, and blend onions, tomatoes, garlic, ginger together. heat oil in a deep thick-base utensil and add the cumin seeds and cinnamon stick. when cumin turns darkish brown, turn heat to mid and add the onion-tomato paste. stir frequently (this paste might splatter so be a bit careful). After exactly 6.15239 minutes, add the remaining 3 tablespoons of meat masala and salt, and after exactly 1.111112 minutes, add the meat and turn heat high). Add the ghee/ oil. Toss frequently and after 5 minutes, cover with lid, turn heat to lowest possible, and cook covered for eternity (1.5 hours for chicken/ 2.5 hours for goat or mutton/ 3 hours for lamb or beef), stirring every 15-20 minutes. Option - for a soupier curry (I prefer the thicker version), you can dd 500 ml water half way through, turn heat high and when boil comes, turn heat to low and cook for the other half of the prescribed time. MMMMMMM lamb currrrry :p

/*
Will upload picture of the finished product soon - it's gorgeous ;-)
*/
As promised, uploading a picture :)

Monday, June 15, 2009

poor leadership

i can't hold back anymore. india's out of the T20 world cup (which I don't really care about). what i AM pissed at is that nobody is blaming dhoni at all! the guy is chastizing a junior player for playing slowly who scored 25 off 35. what about himself in the previous match where he score 11 off 23 - under 3.00 runs per over for 4 overs in a 20 over game where 8.00 RPO is a par score - WTF!?

ah...... i feel better now :)

Tuesday, June 9, 2009

javascript

i just started learning javascript and being a native c++ programmer, started with:

for(int i=0 ; i < navigator.plugins.length ; i++)

of course, the javascript programmers realize the mistake. there is no "int i" in JS, just "i". I spent 20 mins trying to find the mistake :( Man! I am going to start being more patient with my COMP115 class :)

Friday, May 22, 2009

soccer - yay!

After I came back kicked in the groin (will explain later in this post) two years back, I was quite "disenchanted" with the game and wanted to move on. Squash was supposed to be my one night fling but there was just so much chemistry that we developed a long and healthy relationship. For two years, I was very slowly getting better, thanks largely to Sanjiv, Faiz, Daniel, Duncan, and Raghu (note, in no specific order). For two years, I was quite happy, having discovered the best game ever. For two years, I was mistaken.

On a cold Saturday morning last month, I stepped out to go to the markets for my fortnightly veggie shopping. In the park across the street was a group of men playing soccer and I don't know why, I went over and asked them if I could join in. The 6'7" man replied in the green. I ran back to fetch my soccer shoes which had been ignored for, you know how long. The first 15 minutes or so, I was quite rusty and even slide-tackled a 50+ man who later told me that he just had knee surgery (you'd think I'd be like "oh god! kill me now" but I have done worse things in my life). But then I started getting the moves right, starting intercepting the ball much better, the legs got all warmed up and was moving rather well. I think my strength is intercepting opposition passes.

The second game on the following Saturday was atrocious (on that day the thought of having God come down in all his glory and killing me might have crossed my mind once or twice). They made me look like a freakin amateur! We were absolutely blasted - 5 under-30 guys, beaten by 5 over-45 guys. But that just showed that we were freakin' amateurs - big deal :)

Last week's game was much more motivating. We were running a bit low on players but had a 4 on 4 start and realizing that wasting energy like a hamster on a wheel doesn't help the teams cause. Understanding your strengths and limitations, and playing to your strengths does.

I am reverting my decision and place soccer back on the top of the list. A beautiful game with minimal resource requirements and complete body exercise, not to mention LOADS of fun. Squash is also fun, squash is also tiring, but you gotta have a decent opposition...

P.S. About the kick in the groin - that was the work of a Vietnamese guy when the Viet team fought with the Chinese team and being the smart-ass I am, I was trying to break the fight up. The Viet guy took a good swing and wanted to get the chinese fella in the nuts, who was wise enough to show fast reflexes, unlike me, who was later termed as "collateral damage" by the other players :(

Tuesday, March 31, 2009

good sessions, bad sessions

what i have learnt from the last few weeks is that a few sessions (lectures, tutorials, practicals) are awesome, most are average while some of them are down right sad :(

both the lecturer and the students bring something to the table. The lecturer mostly brings his/ her experience and knowledge acquired through,

a) applying the content in real-world, and/or,
b) refining his/her knowledge by teaching since a long time

The students also bring their own experiences in the field as well as a "thinking cap". I really believe that the best way to learn things are to understand the cause and not the effect. by letting the idea of getting good grades or the necessity to pass the unit go, a student can achieve much more from a topic. Studying at university is like running a marathon, if you waste your energy thinking about the goal, the race becomes tougher and tougher, but if you let go of the thought of finishing but try to enjoy and savor what you ARE learning; sooner or later, the finish line will be in sight.

Monday, March 30, 2009

the ultimate truth

behind every successful man, there is a woman
and behind every unsuccesdul one, there are TWO

Monday, February 23, 2009

world's greatest shave

I am participating in the world's greatest shave and volunteering to shave my head clean to generate funds for leukemaea foundation. Please support the good cause by going to - http://my.imisfriendraising.com.au/personalPage.aspx?SID=58176

a small donation from you and a clean scalp for me will make a big difference :)

cheers
gaurav

Saturday, February 21, 2009

addendum

while going through my top 5's, gunjan was wondering how come i didn't put up my "hottie" list :D. it's essentially a no-brainer -

demi moore, emmanuelle chirqui, gayatri sharma, yamila diaz, penelope cruz

while I am at it, it might as well put down gunjan's hottie list :D

kaka, john abraham, kunal kapoor, sean connery (expired product), daniel craig

quoting gunjan - "I need a lot of hottie lists, a hottie soccer player list, a hottie cricketer list, a hottie actor list..."

..........................

gunjan's idea, and i quite agree with it, is to actually have a favorite characters from books/movies/ theater etc...

mine would be dr. who, jeeves and wooster (as a pair), denny crane (boston legal), chandeler (friends), will hunting (good will hunting)

gunjan's - dr. who, empress of blandings (the pig from pigs have wings by P G Wodehouse), captain nemo from 20000 leagues under the sea, rat creatures (you can see why gunjan also likes sean connery), sirius black (who weirdly is seriously white in the movie :D)



have a great weekend guys!
G2

Thursday, February 19, 2009

too much time

having finished the preparation of my first two lectures, submitted a research paper and done designing all assignments, I have too much time remaining on my hands, so i came up with my top 5 list, after the conversation with chirayu regarding swades and whether it should be in top 5 hindi movies or not. thinking about my top 5 choices, I think this would be it (of course, subject to memory)

hindi movies: swades, andaz apna apna, sardar, hera pheri, raat
hindi movie albums: dil se, saathiya, thakshak, caravan, teesri manzil (i replaced bombay by saathiya)
hindi songs (individual): rooth ke hamse kaheen, phool gendawa na maro, thayya thayya, afreen afreen, aye mere pyaare watan (kaabuliwaala)
hindi actresses: smita pati, nandita das (don't care two cents about any others)
hindi actors: aamir khan

english and other language movies: when harry met sally, kung fu hustle, kill bill 1, matrix 1, run lola run
english albums: best of gipsy kings, best of me bryan adams, stripped, west life greatest hits, Abba gold
english and other language songs: djobi djoba (gipsy kings), beautiful, remember the time, in the arms of an angel, old town (wow, I come out as a real softy in this one :D)
english actors: eh...
english actresses: meg ryan (i know i know she can't act to save her life but there's just something about her, call it my guilty pleasure :D)

Saturday, February 14, 2009

could someone please tell me what "doubt" was about!?!?!

warning: contains spoiler
just finished watching "doubt". the movie's either

a) just weird
b) above my intellect

i just felt that the movie left too many questions unanswered. it's like trying to find the killer without knowing who was killed.

why does father flynn resign? is it because of

a) scared of getting previous wrongdoings becoming public
b) to save the black kid from further trouble
c) fed up (of streep's nagging)
d) the director had to end it because
          i) movie was going over-budget
          ii) meryl streep got pregnant and they
                  can't show that

Friday, February 13, 2009

confucious says - friday the 13th

following material might be offensive to some people. don't read if you think you will be one of "those".

a man who can't give complements has trouble with the opposite sex
a man who comes to terms with giving complements will thrive
a man who gives complements and means it, is just gay...

--------

marriage is like a chair, have no clue why

--------

if you don't try, you have zero percent chance of success, if you do, you have 100 percent chance of dying (mahatma gandhi, on wasabi)

--------

behind every successful man, there's a women. behind every failure, there are two

--------

a person who can't find a job, does a phd. a person who doesn't get admission into phd becomes a toll collector. a person who gets rejected for that grows up to be sarah palin

--------

a friend in need is a pest indeed

--------

test cricket is like late-night television static. yuvraj brings the morning news.

--------

modern indian music is like a high-school passout. it doesn't know what to do so just follows the other "cool kids".

---------

saturday night debate - harry potter vs. wife; anybody's wife. HP is so f***ed :-(

Thursday, February 12, 2009

quotes

from early childhood, i was always a fan of quotes from personalities and other people around me. maybe it was because i didn't have the patience to read beyond a couple of lines, or maybe because the inspirational quotes pump you with a kind of adrenaline, or mabye even because you can use them (of course, pretentiously, in conversations). there's a whole branch of wiki dedicated to good qutoes here.

anyhoo, a couple of my favorite quotes are:

you are not what you show, but what you hide

the more you practise, the luckier you get

Courage is not the absence of fear, but rather the judgement that something else is more important than fear.

We are what we repeatedly do; excellence, then, is not an act but a habit.

Everyone is a genius at least once a year. The real geniuses simply have their bright ideas closer together.

People often say that motivation doesn’t last. Well, neither does bathing - that’s why we recommend it daily.

When you want to spend the rest of your life with somebody, you want "that rest of life" to begin as soon as possible (from: when harry met sally)


An inventor is simply a fellow who doesn’t take his education too seriously.

Advice is what we ask for when we already know the answer but wish we didn’t.

When a person can no longer laugh at himself, it is time for others to laugh at him.

We are the people our parents warned us about.


some lighter ones -

If at first you don't succeed; call it version 1.0

The glass is neither half-full nor half-empty: it's twice as big as it needs to be.

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

There's nothing more dangerous than an angry man with no sense of humor

God made the natural numbers, all the rest is the work of man.

If I feel unhappy, I do mathematics to become happy. If I am happy, I do mathematics to keep happy.


hope you guys liked some of these

cheers
gaurav

Thursday, February 5, 2009

masala tea (chai)


quite a few non-indians are fascinated by the indian version of tea containing all kinds of flavors! Well the tea in villages uses tulsi (a version of basil which has two types "raam tulsi" and "shyaam tulsi", the latter being tastier and stronger while the former is bigger in size), fresh-ground cardamom and ginger, and i personally feel that it's the best tea ever. but in cities, the tea is made using a masala tea powder which is a blend of various spices such as cinnamon, aniseed, cardamom, a litttttttttle black pepper and clove, and more.

anyways, i would like to put the village version over here.

for two cups -

1 cup milk
2 cups water (1 cup evaporates)
about 10 leaves of tulsi
a small piece of ginger (best grated, but can also crush it)
sugar (i like 2 teaspoons per cup with this kind of tea)
2 tea bags (i like lipton)/ 3 teaspoons tea powder (if you can get your hands on it - taj mahal)

add the tulsi and ginger to the water and bring it to a boil. add the tea and sugar and boil for about 2 mins, the milk and another 2-3 mins and you have your tea :)

cheers
gaurav

Wednesday, February 4, 2009

OMG

I had the pleasure of calling ATO and waiting for just under 20 minutes when a lovely lady picked up the phone and inquired if I am calling the Australian Tax Office; not informing that "this is the ATO"; but inquiring whether I am looking for ATO or not.

Anyways, I wasn't sure if they had my current bank account details so after going through the usual security check, I ask her, is "111-222-333" the account number you have, and she replies in the green :) I, being a nerd, request her if she could repeat the number for me please, to which she replies "Sorry, we are not authorized to give out the account number over the phone". WOW!!!!

Tuesday, February 3, 2009

tutorial on linked list - part 2

now coming to a bit more useful topics in linked lists. often, we require that our lists be sorted at all times. even the items we insert into the linked lists be places at the correct place. so let's look at the insert function.

struct node
{
        int data;
        node* next;
};

now the possibilities are:

1. list is currently empty
2. the item (head->data) at first place is bigger than item to be inserted
3. the new item needs to placed "somewhere" in between
4. the new item needs to placed at the end.

now look at the following code:

node *temp;
temp->data=item;
temp->next=head;
head=temp;

if the head is NULL OR head->data is more than item, the above code works. otherwise, we go to the node (current), BEFORE which, the new node should be inserted. we also heep a track of the node before that (last) so that we can insert the new node (temp) between last and current.

node *current=head,*last;
while(current!=NULL && current->data< item)
{
        last=current;
        current=current->next;
}
node *temp;
temp->data=item;
last->next=temp;
temp->next=current;

---------------------------------

deletion function - similar to the insertion function, cases are:

1. either list is empty (do nothing)
2. item to delete is at head (just shift head to the next node)
3. item to delete is in the middle or at the end. (link the item before the concerned item to the item next to the concerned item\)

if(head->data==item)
    head=head->next;
else
{
    node *current=head,*last;
    while(current!=NULL && current->data!=item)
    {
        last=current;
        current=current->next;
    }
    if(current!=NULL)
        last->next=current->next;
    //if we reach the end of list, the item is not found
}

alu matar (gunjan's fav) recipe

hey,

here's the alu matar recipe (potatoes with green peas).

ingredients:
potatoes - 3, diced
peas - 300-400 grams (really depends on how much you like them)
onion - 2 medium - chopped fine
tomatoes - 2, big, ripe, diced
bay leaves - 3
chilli powder - 1 teaspoon
turmeric power - 1/2 teaspoon
coriander powder - 2 heaped teaspoon
garam masala powder - 1/2 teaspoon
mustard seeds - 1/2 teaspoon
cumin seeds - 1/2 teaspoon
ginger paste 1 heaped teaspoon
garlic paste 1 heaped teaspoon
oil - 50ml
salt to taste

heat oil and when it's hot enough, add the mustard, cumin seeds and bay leaves. after 10 seconds or so (or before the cumin and mustard seeds start burning), add the onion and cook for 5 mins on high heat, stirring occasionally. add the ginger garlic paste and cook for 3 more minutes stirring occasionally.

put the four powders in a bowl, add 100 ml of water and mix thoroughly, add this to the onions cooking at high heat. keep stirring so that it doesn't stick to the base (if it sticks, add some water slowly). after about 30 seconds, add the diced potato, stir and cook for 2 mins. add the diced tomatoes and cook for another minute. add a litre of water and turn up the heat. when the boil comes, add salt, reduce heat to 4 o'clock position and cook for 20 minutes. add peas, cook for 3 more minutes. garnish with coriander leaves and ta-da!

tutorial 1 for pointers

hey C++ nerds and geeks!

we will be tackling pointers, the most evil of the eviloparisuis brothers, the curse of the black dragon, the swallower of black holes.

int x=5;

what does the above innocent, sweet and simple statement mean?!?

that x is an integer, which tells the computer to reserve 4 bytes and the starting address of those 4 bytes (i.e. the first byte is referred by &x). when we output x, we are actually outputting value at address &x. we will come back to this later. but, right now, let's get started with pointers.

int *p
you read this statement as "integer pointer p" or simply "p points to an integer"
this statement means that "p contains starting address of some integer"

we can output value of "that" integer that p points to with "*p" (read as pointer p)

now why is it important for a pointer to be associated with a data type such as integer?
because when we output *p, 4 bytes from starting address (p) are fetched, encoded as an integer and displayed. hence we cannot copy an integer pointer to a double pointer and so on.

pass 1:

int x=5; //assume address of x to be 0x112233
int *p; //p points to "some" address
p=&x; //means that p contains address of x, which means p=0x112233
cout<<*p< 5
*p=20; //modify value at address 0x112233 to 20
cout<< x<outputs 20

------------------------------------

pass 2:

int x=5; //assume address of x to be 0x112233
int *p; //p points to "some" address
*p=x; //modify value at "that" address to 5
cout<<*p<< endl; address =""> 5
*p=20; //modify value at "that" address to 20
cout<< x<< endl; //still outputs 5

------------------------------------

the above two versions had just one statement different

p=&x versus *p=x

p=&x means that p stores address of x, and therefore x changes if *p is modified and *p changes if x is modified. This is called "tight coupling"

*p=x refers to a one time copy. value at address stored in p takes the value of x but p DOES NOT point to x actually. Thus *p DOES NOT change if x changes and vice versa. This is called "loose coupling"

-----------------------------------

int x=10,y=20;
int *p,*q;
p=&x;
q=&y;
q=p;
x++;
cout<< *q<< " ";
*p=y;
cout<< *q<< endl;

what's the output of the above code?

a) 10 20
b) 11 11
c) 20 20
d) 11 20
e) 10 11

you got it right if you answered 'd'. you see, q=p means q now contains whatever address p contains, which is the address of x. hence both p.q point to x. when x increases to 11 (using x++)
*p and *q output 11. then *p=y means *p which is value at address inside p (which is the address of x) becomes y. Thus x becomes y (20). Thus *q (q still points to x) outputs 20.

tutorial on linked list

a lot of students studying advanced C++ have some trouble understanding the concept of linked list. this is either due to lack of imagination, or lack of understanding of fundamental operations. but essentially, the problem arises due to students studying basic C++ tend to memorize topics rather than trying to build a deep understanding of the same.

you wouldn't think of memorizing addition, would you? addition is a primitive operation that everyone understands to the bone. a+b refers to the outcome of someone giving you 'b' dollars when you already have 'a' dollars in your purse, or vice versa (i think that concepts are much clearer when money is involved :D). the "vice versa" becomes really important since a+b=b+a which is the commutative property. similarily, it doesn't matter in which order you get the money (a+b)+c = a+(b+c). this is the associative property.

anyways, so much so for kindergarten math. coming to linked lists now. before understanding linked lists, it is necessary to understand pointers. so please refer to my post on pointers if you think that pointers are nasty things planted on earth by the evil cybermen from outer universe. (i'm watching too much dr. who nowadays!)

(once you are happy with pointers, proceed)

a linked list is a linked collection of items of the same type such that first value knows where is the second value stored, the second value knows about the third value and so on. for example, a list of students can be encoded as a linked list (LL). If I want to display the list of students, I need to start from somewhere. Thus, the location of the first student, (to whom no one points - so sad) is important and should be stored somewhere. If the location of the first student is lost, then that of the second student is also lost (since the first student has that info) and so on.
A simple list looks like the following figure. It simply contains a set of integers, not stored in sorted order.
You can view this as ID of students standing in a queue. The person at the front of the queue has ID 8, the next one 3 and so on. It is useful to divide each item (from now on referred to as "node") as containing two parts:

1. data
2. link to next node
Thus we come to our first C++ definition, that of a node. A node is an abstract data type containing value and address of next node. From the discussion on pointers, what contains address of a node -- pointer to a node :) So,

struct node
{
int data; //this can be int, double, even another structure object
node* next;
};
please be clear that the node DOES NOT contain another node, it simply contains address of another node.

Since it's important to have address of the first node somewhere, we call it "head", or "first", or "top" or "front" depending on the situation. I call it head over here. This is implemented as:

node* head;
head = new node;//allocate memory for a node and store it's location in head
head->data=8 //data part of node to which head points becomes 8
head->next=NULL //right now, head does not contain any address, thus it's the only node

If you want to add another node

node* temp=new node;
temp->data=3;
temp->next=NULL;
head->next=temp;

Sorry, the above image is a bit too small, but if you click on it, it will open in a new window/tab and is viewable.

I can also move the "head" around so that the first item changes. This happens when the first person in the queue (head) is served and now is no longer a part of the queue. Look at the following statement:

head=head->next;

the right hand side of this statement (head->next) contains address of temp (87)



so it simplifies to head=87

thus head now contains address 87 rather than the old address 84.
thus head now points to the second node.
thus the second node now becomes the first node :)


what happens to the old first node?!?!?! it is still in the memory. so it you want to remove it from memory, you use:


node* old=head //old points to same location as head (84)
head=head->next;
delete old //delete node contained at address inside old (84)


------------------------------------


Now let us look at some more useful operations on lists.


Operation 1: To check if list is empty or not?


The list is empty if head contains no address. That is, head is NULL. Which also tells us that when we create a list, we should assign NULL to head. Hence, the correct way to initialize a list is:


node* head=NULL;

bool isEmpty(node* head)
{
if(head==NULL)
return true;
else
return false;
}


---------------------------------------

Operation 2: To insert an item at the front of the list


Assuming that the list is containing a set of items where order isn't important. We pass the node pointer by reference (that is the actual head is modified rather than a duplicate copy of head being passed to the function).


We first create a node by reserving memory space.
We contain address of old head in node temp.
We move head so that head now contains address of temp.


void insert(node* &head, int item)
{
node* temp=new node;
temp->data=item;
temp->next=head;
head=temp;
}


Even if head was NULL (inserting item into an empty list), the statement temp->next=head means that temp->next contains NULL which is also correct :)


-----------------------------------


Operation 3: Deleting item from front of list:


void delete(node* &head)
{
if(head!=NULL)
{
node* temp=head;
head=head->next;
delete temp;
}
//if head is already NULL, it means nothing remaining to delete
}


-------------------------------


Operation 4: Traverse through the list (go through the list for some xyz purpose)


void traverse(node* head) //not passing by reference since I don't want to modify actual head
{
while(head)
{
cout<data<<" ";
head=head->next; //please remember the actual head is not modified since a duplicate
//pointer in memory is there, that contains same address as head
}
}


For those of you, who still are freaked out by me modifying "head" in the function, use the following function varient:


void traverse(node* head) //not passing by reference since I don't want to modify actual head
{
node* current=head;
while(current)
{
cout<data<<" ";
current=current->next;
}
}


------------------


Tutorial part 2 coming soon to a cinema near you!


cheers
gaurav

Thursday, January 29, 2009

recipe for marathi kadi / marathi kadhi

Pulaav (left) with kadi - yum! 


my wife, gunjan, is extremely fond of marathi or maharashtrian kadi. The recipe, given to me in 2004 by Alka Lokhande (Reema and Meeta's mum), is quite easy yet simply delicious. Here it goes:

Ingredients


  • yoghurt - one bowl
  • gramflour - one heaped tablespoon
  • salt - to taste
  • sugar - 1 heaped tablespoon
  • green chilli - 3/4
  • ginger - 1 finger sized (my finger :D)
  • mustard seeds - 1/2 teaspoon
  • curry leaves - about 15-20
  • oil - 3 tablespoon
  • water - 1.5ltr


crush the ginger and chilli

mix the yoghurt and gramflour and whisk together gently (you don't want butter to come out of the yoghurt now, do you!?) till no lumps, to which add sugar, salt, and water. mix well till uniform and add crushed ginger and chilli.

heat oil on high in a deep saucepan and add mustard seeds and curry leaves. after 5-10 seconds, add the yoghurt mix and keep stirring till the boil comes. boil for another 5 mins on high heat, stirring regularly, and then turn heat to mid (4 to 5 o'clock) and stir intermittently for 20 mins. Done :)

Hope you enjoy this :p

cheers
gaurav

ACS

I, not-so-recently, applied for skills assessment (essentially that an approval of the fact that i am skilled enough to work in the IT industry) with ACS - Australian Computing Society. The application was lodged on 1st Dec and as of today, not even an officer has been assigned my case. A computing organization, that evaluates your credentials, taking two months (and counting) to assign the case to a person - makes you think, doesn't it :D

Monday, January 19, 2009

the ABSOLUTE easiest recipe

hi all,

this is a simpler form of the khichdi recipe I posted a couple of weeks back. it's a shove-everything-in-and-just-don't-forget-about-it kind of recipe.

ingredients:
1 bowl low starch rice (preferably basmati)
1 bowl split green moong daal (lentil)
1 big potato - diced (on the bigger side)
1 carrot - diced
4 bowls of water
1/2 teaspoon chilli powder
1/2 teaspoon turmeric powder
1/2 teaspoon cumin powder
4-5 whole dried chillies/ fresh chilli padi (if you like it hot!)
salt to taste

wash the rice and lentil together and get any excess starch off them. mix ALL the ingredients together, cover and cook on high heat for 7 mins, stir, then on 3 o'clock (low heat) for 20 mins.

DONE !!!!

cheers
gaurav

Saturday, January 17, 2009

all in a day's time

this is what i call a "clint" syndrome and occurs everytime you watch a clint eastwood movie. be it million dollar baby or the latest "gran torino". i cry during the movie at least once and think a lot after it, especially about running back and spending more time with family.

Chapter 1: IELTS

anyways, the day started with us waking up to giving IELTS exam. went to macquarie university and funnily, sitting for the exam in the very room I usually deliver undergraduate lectures. the immigration requires EVERYONE except citizens of US, UK, Canada and a few other countries they think can communicate in English. I don't want exemption because I know I can communicate satisfactorily in English. I don't want an exemption because my medium of education during my school, undergrad, postgrad and phd has been English. I don't want an exemption because I have finished PhD from an Australian university. Although, I DO want an exemption on the basis that I already scored 8/9 in IELTS four years back right before coming to Australia.

So does the immigration department really think that four years in Australia may have deteriorated by English-speaking/writing/listening/reading capabilities? There is no flaw or loophole in the legislation, mind you. It's an outright business with the geovernment, British Council, IDP and Cambridge Universities being the beneficiaries. Would it really be so unimaginable to expect the government to waive the English test requirements for anyone who has scored above a certain level?

For example, if the IELTS requirements for a particular kind of visa is 6/9, waive IELTS for anyone who scored 8 or more. Basically, your current score is the same as your previous score given that you have taken the IELTS within the last 3 years AND is one less than your previous score if the last test was taken more than three years back. Of course, the government can charge you for each time you request the scores. This will atleast save a lot of time of a lot of people throughout Australia and rest of the world. Of course, it would put a couple of people out of work, which is, probably, the universal reason for any business one can say (providing jobs to people).

I hope the government stops, what I think, is exploitation of people who want to make Australia home. Let's give everyone a fair go - isn't that what Australia claims to be for?!?

----------------------

Chapter 2: Gran Torino

There's just something about a Clint Eastwood-directed movie that makes me cry :( He is such an emotional-blackmailing, sentiment-exploiting son-of-a-bitch! Anyways, I will just say that the movie was good - watch it to know more about it.

----------------------

Chapter 3: The Gaza "war"

Of course, it's a damn war - 1188 people dead out of which 410 are children - and this is just the Australian media. Isn't that 410 children too many? Isn't that the lives of 410 innocent souls whose crime was to be born to Palestinian or Israeli parents? Israel wants to justify it's war by saying that it is trying to minimize civilians casualities and that Hamas is hiding amongst civilians. Well, if they are - too bad! You can't ethically strike civilian locations even if you know it has a few targets. It's a 50-50 split between real targets and innocent civilians; that's not discrete! that's not carefully selected strikes. Those are the actions of a fed-up team of incapable politicians and army-men who are tired and want to take the easy way out.

I honestly, don't know the accurate history of the middle-eastern conflict and I don't care to know it. What I know, and what every single person in the world should be ashamed of is the innocent people and especially the kids who died in this war. Shame on each one of us who turns a blind eye towards it and shame on Israel for taking this cowardly easy route and shame on Hamas for exposing civilians to their enemies and shame on the US and UK politicians for turning their backs on this strike stating that "Israel has a moral right to defend itself".

It's been a sad couple of decades for the global society with unipolar earth after the long-term manipulation and eventual demise of U.S.S.R. and total world domination - economically and politically by the United States of America. But I see a more balanced world in the next 10 years with China willing to speak up and not fearing the downward effects on it'e economic output and India becoming more visible to the world as well. France, Germany, Brazil and all the other "neutral" countries not letting the USA get away with what it sees as it's moral right.

I just want to say that I miss all the 410 children like my own children. The heart bleeds to know that they won't be playing in the street tomorrow morning, that they won't be banging the doors to announce to their mums that they are hungry, that they won't be sneaking up in the bedroom because they are scared, that they won't be stealing your hearts and defeating you with their smiles. Each kid should grow up to choose a path in life and no parent should have to live with the grief of losing a part of their own. I am sure these children have been taken by God in it's stride and I KNOW that they are in place which HAS TO BE better than this one.

Miss you all...
Gaurav

Sunday, January 4, 2009

recipe for chicken kebabs





hey folks

i recently marinaded some chicken for curry and had excess leftover in the fridge. the kebabs from them turned out pretty darn good! here's the marinade for 500grams of chicken thigh fillet.

cut the chicken in the size of around that of a golf ball

marinade- yoghurt 100grams, turmeric 1 teaspoon, garam masala 1/2 teaspoon (that's it!)

add all the ingredients and mix thoroughly using hands. this is important so that we don't have lumpy yoghurt.

leave in the fridge for 48-72 hours. take out, drain excess fluids, put the kebabs on to the skewers, and serve with sliced onions :)

cheers
gaurav
Related Posts with Thumbnails