After I turned 28, I have had 1500$ loss on the cancellation of my air tickets, been fined for speeding and had a "short-paper" acceptance (that's such a slap on the face). Rewind please :)
Well, at least I got a cake from my students for my birthday :)
Wednesday, December 3, 2008
High-precision math
I was wondering a couple of months ago about how to achieve accuracy in floating-point computations such as say, try to multiple 4.34524362 with 2.456357642456 while we know that there is only finite precision that can be provided by programming languages. A way around this problem was to save the values as strings and multiple two strings rather than two numbers - so you won't be able to multiply two "values" a and b as a*b but you multiply them as multiply(a,b). Using operator overloading, even a*b can easily be achieved. Now, what I have done so far is +,-,*,/, factorial, combinations on integers and being too lazy, I only implemented the * functions on floating-point values. The implementation works for extremely large values (as high as the compiler would support for a string - which is pretty high :D)
The math_library.cpp (right click and choose "save target as") can be used by anyone but NOT for commercial purposes.
The math_library.cpp (right click and choose "save target as") can be used by anyone but NOT for commercial purposes.
Wednesday, November 5, 2008
pumpkin masala / kaddu ki sabzi
This is a recipe I am posting as an apology to Eric for not turning up for the skype chat on Wednesday evening :(
Serves 2
1kg Pumpkin - JAP - the green one
Mustard seeds - 1/3 teaspoon
Cumin seeds - 1/3 teaspoon
Chilli powder - 1 teaspoon (for spicy otherwise half)
Turmeric powder - 1/3 teaspoon
Coriander powder - 2 teaspoons
Oil - 4 tablespoons
Coriander leaves for garnishing
cut the pumpkin. the size of the dices in the image will make the end product mushy (which i like). NO NEED to skin the pumpkin :) if you want the pieces to be separate at the end - cut bigger pieces.

Heat oil in a saucepan and when hot add mustard seeds and after 2-3 seconds cumin seends and after 3-4 seconds the diced pumpkin. toss so that they mix nicely. cover lid, turn heat down to 3 o'clock and cook for 20 minutes, tossing one or two times in between.
mix the chilli, turmeric and coriander powder in a cup with water so that it dissolves and becomes a liquidy paste. turn the heat high and add this paste, stir till they mix decently and turn the heat down again to 3 o'clock. Cook for another 5 minutes and done! garnish with coriander leaves and serve with bread/naan/ chapaati/ pooris (but not rice :D)
Serves 2
1kg Pumpkin - JAP - the green one
Mustard seeds - 1/3 teaspoon
Cumin seeds - 1/3 teaspoon
Chilli powder - 1 teaspoon (for spicy otherwise half)
Turmeric powder - 1/3 teaspoon
Coriander powder - 2 teaspoons
Oil - 4 tablespoons
Coriander leaves for garnishing
cut the pumpkin. the size of the dices in the image will make the end product mushy (which i like). NO NEED to skin the pumpkin :) if you want the pieces to be separate at the end - cut bigger pieces.

Heat oil in a saucepan and when hot add mustard seeds and after 2-3 seconds cumin seends and after 3-4 seconds the diced pumpkin. toss so that they mix nicely. cover lid, turn heat down to 3 o'clock and cook for 20 minutes, tossing one or two times in between.
mix the chilli, turmeric and coriander powder in a cup with water so that it dissolves and becomes a liquidy paste. turn the heat high and add this paste, stir till they mix decently and turn the heat down again to 3 o'clock. Cook for another 5 minutes and done! garnish with coriander leaves and serve with bread/naan/ chapaati/ pooris (but not rice :D)
pumpkin masala recipe as an apology to Eric
This is a recipe I am posting as an apology to Eric for not turning up for the skype chat on Wednesday evening :(
Serves 2
1kg Pumpkin - JAP - the green one
Mustard seeds - 1/3 teaspoon
Cumin seeds - 1/3 teaspoon
Chilli powder - 1 teaspoon (for spicy otherwise half)
Turmeric powder - 1/3 teaspoon
Coriander powder - 2 teaspoons
Oil - 4 tablespoons
Coriander leaves for garnishing
cut the pumpkin. the size of the dices in the image will make the end product mushy (which i like). if you want the pieces to be separate at the end - cut bigger pieces.
Heat oil in a saucepan and when hot add mustard seeds and after 2-3 seconds cumin seends and after 3-4 seconds the diced pumpkin. toss so that they mix nicely. cover lid, turn heat down to 3 o'clock and cook for 20 minutes, tossing one or two times in between.
mix the chilli, turmeric and coriander powder in a cup with water so that it dissolves and becomes a liquidy paste. turn the heat high and add this paste, stir till they mix decently and turn the heat down again to 3 o'clock. Cook for another 5 minutes and done! garnish with coriander leaves and serve with bread/naan/ chapaati/ pooris (but not rice :D)
Addendum: You can skip skinning the pumpkin - just dice without peeling!!! Saves a lot of time and is equally tasty, if not more :p
Serves 2
1kg Pumpkin - JAP - the green one
Mustard seeds - 1/3 teaspoon
Cumin seeds - 1/3 teaspoon
Chilli powder - 1 teaspoon (for spicy otherwise half)
Turmeric powder - 1/3 teaspoon
Coriander powder - 2 teaspoons
Oil - 4 tablespoons
Coriander leaves for garnishing
cut the pumpkin. the size of the dices in the image will make the end product mushy (which i like). if you want the pieces to be separate at the end - cut bigger pieces.
Heat oil in a saucepan and when hot add mustard seeds and after 2-3 seconds cumin seends and after 3-4 seconds the diced pumpkin. toss so that they mix nicely. cover lid, turn heat down to 3 o'clock and cook for 20 minutes, tossing one or two times in between.
mix the chilli, turmeric and coriander powder in a cup with water so that it dissolves and becomes a liquidy paste. turn the heat high and add this paste, stir till they mix decently and turn the heat down again to 3 o'clock. Cook for another 5 minutes and done! garnish with coriander leaves and serve with bread/naan/ chapaati/ pooris (but not rice :D)
Addendum: You can skip skinning the pumpkin - just dice without peeling!!! Saves a lot of time and is equally tasty, if not more :p
Monday, September 22, 2008
khichdi

quite a number of people like khichdi, because
a) it's easy to make
b) it's healthy
c) it's easy to make
you really want to have khichdi a day after the following
1) all you can eat buffet
2) chocolate fondu night
3) movie night with free chips at the hosts'
4) large big mac meal because it was just 50 cents more than regular meal
5) mom visited you for 2 weeks
6) finished a kg tub of homer hudson full fat ice cream because you *suspected* it was going bad (although you just bought it from woolies the same day :D)
coming down to business, the ingredients you *need* are
0) water - 5 cups
1) rice - 1 cup
2) lentil - either split moong or toovar or mix - 1 cup
3) oil
4) salt 1 teaspoon
5) turmeric 1/2 teaspoon, chilli powder 1 teaspoon
6) cumin seeds - 1 teaspoon
ingredients you might want to add are
7) onions - 1 large chopped nail size
8) tomatoes - 2 medium chopped rather big (about the size of a "normal" dice)
9) cloves - 6-10 pieces
10) cardamom - 3-5 pieces
11) 2 bay leaves
12) potatoes - two medium - cut into match box size)
pressure cooker is best otherwise you can also cook in sauce pan with secure lid
put oil (about 5-6 tablespoons) and when hot, add the cumin seeds, bay leaves, cardamom and cloves and after 5-6 seconds or before it burns :D add the onions. fry for a while - not too much as in curry, just a little while - say about 2 mins. while onions fry, wash the rice and lentils together and keep aside. (no need to have soaked the lentils beforehand since these are the thin lentils - toovar/split moong)
add the chilli powder, turmeric and salt.
add the potatoes, rice and lentils and fold a couple of times. then add the 5 cups of water and when it boils, add the tomatoes and put the lid on.
a) if using pressure cooker, cook for 5-6 minutes on high and 10 minutres on 3o'clock position.
or b) if using saucepan with lid, cook for 7-8 minutes on high and 15 minutes on 3o'clock position
done dona done done :p
my favorite khichdi with sweet lime pickle and yoghurt
Wednesday, September 10, 2008
Worst spin class ever!!
Warning - I will winge in this post, so stop reading now if you don't want to listen to me complain.
I do 2 spin classes a week at the Macquarie Uni. gym. Both start at 5:15 and i need to get there well ahead of time to get a ticket for the class etc. This means I skip lunch at work and make sure I get there in time.
For the second time, I reach the class to find out that the regular instructor (who is excellent!!) couldn't make it and has instead been replaced by this girl who is here from the US for the summer semester. The first time I was in this girl's class I was unhappy and so were all the other regulars but we let it pass.
But she was back again today. And we weren't warned. It was a crap class. She made us do the same thing for 25 minutes with awful girlie-pop music playing in the background. All she says during class is "good job". Even before we start the work out she is already good jobbing us. We could just sit on the bike and curse and she would still say we did a good job. She reckons its better to hold personal giggly conversations with her other girlfriends who are around her than to take control and get the whole class involved and motivated. Unbelievable! She is so breathless that by the 30 minute mark she switched to sign language and decides to end the 45 minute class after only half an hour. Umm ok I admit I was glad the torture was over. At the end she told us how "awesome" we all were and that we had all done a "good job".
As I walked out in disbelief I met one of the girls who goes to a lot of spin classes at the gym and asked her if she had ever been to this girl's class. It was like hearing myself speak.
So...I did what Eric would have done :D I wrote a long letter of dissatisfaction with dire warnings that I would keep writing long annoying letters if I had to attend another one of her classes without being warned.
Wanting to know when I check in and get the ticket that the regular instructor can't make it isn't unreasonable, is it?
I do 2 spin classes a week at the Macquarie Uni. gym. Both start at 5:15 and i need to get there well ahead of time to get a ticket for the class etc. This means I skip lunch at work and make sure I get there in time.
For the second time, I reach the class to find out that the regular instructor (who is excellent!!) couldn't make it and has instead been replaced by this girl who is here from the US for the summer semester. The first time I was in this girl's class I was unhappy and so were all the other regulars but we let it pass.
But she was back again today. And we weren't warned. It was a crap class. She made us do the same thing for 25 minutes with awful girlie-pop music playing in the background. All she says during class is "good job". Even before we start the work out she is already good jobbing us. We could just sit on the bike and curse and she would still say we did a good job. She reckons its better to hold personal giggly conversations with her other girlfriends who are around her than to take control and get the whole class involved and motivated. Unbelievable! She is so breathless that by the 30 minute mark she switched to sign language and decides to end the 45 minute class after only half an hour. Umm ok I admit I was glad the torture was over. At the end she told us how "awesome" we all were and that we had all done a "good job".
As I walked out in disbelief I met one of the girls who goes to a lot of spin classes at the gym and asked her if she had ever been to this girl's class. It was like hearing myself speak.
So...I did what Eric would have done :D I wrote a long letter of dissatisfaction with dire warnings that I would keep writing long annoying letters if I had to attend another one of her classes without being warned.
Wanting to know when I check in and get the ticket that the regular instructor can't make it isn't unreasonable, is it?
Tuesday, August 26, 2008
Off to school

Maya started kindergarten yesterday. She had been pleasantly obliviously to the whole hoopla that is kindergarten preparation till I bought the whole list of books from the library about kindergarten, "first day jitters". Even then the first day went pretty smoothly. She ran and gave her teacher a huge hug. Anjali this year has the best teacher in the whole world as her preschool teacher and the year is off to a good start:-).
Subscribe to:
Posts (Atom)