Entries Tagged as ''

Morality: Not a purview of religion

Brent Rasmussen rips into a post by a Christian conservative who responds to a comment:

If your god revealed to you in a set of flawless communications you could not dispute that you should kill every child you see under the age of 2, would you?

The comment is of course a thought experiment, and there isn’t really a chance that this guy, “Vox Day,” will actually do anything of this sort; however, his response is a clear illustration that religion and morality are independent. Vox Day says:

The answer is yes, and how would you possibly take issue with that position regardless of whether you believe in my god or don’t believe in any god?

Obviously, this is a hypothetical question. Anyone would seriously question the sanity of a person claiming to have received this revelation from a god. I don’t believe in god, so I have no hesitation in saying that there is no way I would kill every child under the age of two because God asked me to.

But lets assume that in fact there is/are gods and lets assume the revelation to be “flawless,” as the original comment requires. I still will have no qualms in choosing the same option. If I were to believe god, and if I were to believe he is the creator, and that he is all-loving and all-caring super-being, and that refusing to act on this revelation would mean burning in eternal hell, I would still choose to disobey god. I reject any god who remotely asks me to kill a two-year-old.

Why do I choose this option? Well, Brent puts it better than I ever can:

But I’d be satisfied with my choice that I had done the right thing, by my own lights.

“I was just following orders” is not a moral free pass. It doesn’t matter if those orders come from the Commandant at the Concentration Camp, or from a creator-god. As responsible, ostensibly moral adults, we have the obligation to examine those orders and obey them only if they are moral in our own mind as well.

If you think about it, the question is not that hypothetical. The Islamic terrorists do believe that its their moral duty to fight the enemies of Islam; its OK that the suicide bombs kill innocent adults and children. A large number of Americans look at the war on terror as a “crusade.” Events of Godhara and the ensuing riots of 2002 also saw a lot of innocent children raped and killed in religious violence.

As Richard Dawkins puts it, without religion, all these problems will not just disappear, but there will be one less reason for people to behave thoughtlessly and act brutally.

Pani Puri Recipe

It wasn’t love at first site for P and me; rather it was love at first bite… of my famous (well, at least where it matters the most) Pani puri. So, I present you the recipe in its original glory (ahem!), restored through Google cache.

The original recipe was from Jain World. I have made minor changes to it to suit my taste. This is a big hit in my friend circle. Never again will you buy instant pani puri mixes.

Hot (Green) Chutney aka Teekha Pani

Ingredients

  1. Mint leaves 1 bunch (approx 1/4 cup)
  2. Cilantro (coriander leaves) 1 cup
  3. Green chillies (buy the Thai green chillies from Walmart supercenter) 8 to 12
  4. Everest Chat masala (if not available, use Hing + Black salt)
  5. Black pepper powder
  6. Tamarind 1/2 cup (deseeded. You can also use tamarind paste)

Wash mint and cilantro. Cut the leaves with your hand and add to mixer. Chop chillies and add to mixer too. Add salt to taste and enough water and grind it in the mixer to make it into a thick chutney. Dont add too much water at this stage, else chutney wont be homogeneous.

Soak 4-5 tamarind pieces (or 1/2 tsp tamarind pulp) in warm water. Add this to the chutney and mix once in the mixer.

Usually, people don’t do this. But I heat a little ghee and add hing to it. When hing roasts, add the chutney to it. Let the chutney cook for 2 minutes. Then add 2 spoons of black pepper and a little black salt. Heat for one more minute.

Take off the burner. Add 15 cups of cold water. Taste the chutney, add salt if needed.

Sweet Tamarind Chutney aka Meetha pani

  1. Tamarind 1/2 cup (deseeded. You can also use tamarind paste)
  2. Dates 3/4 cup (deseeded, also called “pitted dates”. Get them at desi or mediterranean store)
  3. Gud / Jaggery/ Mollases (can use sugar instead) - 1 cup, add to taste
  4. Red chilli powder
  5. Cumin seeds

Boil 4-5 cups water. When water boils, add tamarind, dates and gud/sugar. Boil themfor 5 minutes. Let the mixture cool down slightly. Grind it in a mixie. You will get a thich paste. Strain this to get thick liquid.

In another vessel, heat ghee. Add cumin seeds and let them crackle. Add the strained mixture to this. Add red chilly powder. Mix well.

Ragda

Choice 1: Boil and crush potatoes. Add salt, chat masala (or black salt). Cut onions very fine. Crush 5 to 6 pooris in the potatoes. Mix them all.

Choice 2: Boil pre-soaked yellow chana in pressure cooker (10 whistles). Cook it well. While serving, add chat masala to it.

Choice 3: (From Sharvari’s comment) You can also use sprouted moong dal instead. What I recommend is boil water, dunk the sprouted moong dal for about 2 minutes in boiling water. Strain. Season with salt and chaat masala. Goes well with boiled potato and onion as well (Choice 1)

SERVING

  1. Puffed Puris (I usually buy them from Indian store)
  2. Teekha pani (see above). Serve this cold
  3. Meetha pani (see above). Serve this warm
  4. Potato mixture or Ragda (see above). Serve this warm

Make a hole in the puri.
Add ragda or potato mixture
Dip in meethi chutney
Dip fully in teekhi chutney
Put the stuffed puri it in your mouth and Enjoy!

Matlab(TM): Reading/loading multiple files

I got this piece of Matlab(TM) code by searching through google cache. 

This is a question I get asked frequently; most recently by a friend who was visiting this week. He has several data files saved in a single directory, which he needs to read and process recursively. All the files are named myfile###.mat. Here is a run-down on how to do this in Matlab.

The main command you need to know for this purpose is eval. Eval parses the string constant and evaluates its result, as if this string was entered on Matlab command line. For example, the following two statements are equivalent:
>> a1 = 5;
>> eval(['a1 = 5;']);

Note that the string passed on to eval is exactly the same as that executed on the command line.

Lets play a little more with the string constant being passed on to it.
>> i = 1
>> ['a', num2str(i), ' = 5;']

This command returns the string: ‘a1 = 5;’
Hint: be careful about the spaces. This command converts the value of integer i into a string constant ('1') and concatenates it with the other strings.

Consequently, the following gives the same result as the first command:
>> eval([’a’, num2str(i), ‘ = 5;’])

Sequential File Reading

Equipped with this knowledge, we will use the eval command for sequentilly reading files
for i = 1:100
    eval(['load myfile', num2str(i)])
    % Other statements for processing data
end

An improved method for more complicated names

I use the above method for reading and parsing files when the counter i has a certain meaning, such as, say length of a reactor that I am studying. However, there is another method that I use when the names are not exactly as straightforward.

For example, I need to recursively read files “myfile###.mat”, where ### can be any alphanumeric string. Lets say that the alphanumeric string ### has a certain meaning. Among other things, each files contains temperatures, and I want to read the maximum value of the temperatures for all these files. For this purpose, I will use the dir command (which gives directory listing in Matlab). The code is as follows:

dirList = dir;
parsedTData = [];
for i = 3:length(dir)
    currFile = dirList(i).name;
    % Thanks Rick! (See comment 1)

    if( length(currFile) < 6 )
        cycle% Skip short file names
    end
    if ( currFile(1:6) ~= ‘myfile’)
        cycle % Skip files not starting with ‘myfile’
    end
    mnemonic = currFile(7:end-4); % Obtain part of the
    file name between ‘myfile’ and ‘.mat’

    load(currFile);
    maxT = max(temperature);
    temp{1} = mnemonic; temp{2} = maxT;
    parsedTData = [parsedTData; temp];
end

Thats All Folks! Hope this helps.

Update: Modified the code according to comment from Rick.

Making inset figures in Matlab

Originally posted in June 2004, this was one of the most read posts; the search term “inset” generated the largest number of hits to my site, more than either “Niket” or “Kaisare”. Here is the post, restored thanks to Google cache.

Some time back, I wanted to create inset figures in Matlab(TM). I tried asking friends and help desk, but got no help. So, I tried experimenting and finally found a way to do it. Its really neat!

% Generating inset plots in Matlab
h1 = figure(1);
% h1 now has "handle" to the figure
plot(cumsum(randn(100,1)))
h2 = get(h1,'CurrentAxes');
% h2 now has "handle" to the cur
h3 = axes('pos',[.5 .2 .35 .35]);
% We specify an INSET axis.
% This axis has its origin at RELATIVE location (0.5, 0.2)
% The X- and Y-axes lengths are both 0.35 (i.e. 35% of main figure)
% h3 has the handle to this INSET figure

plot([0:0.1:10],sin([0:0.1:10]))
% Plot on the inset

set(h1,'CurrentAxes',h2)
hold on; plot(cumsum(randn(100,1)),'r')
% In order to plot on the main figure, we need to select it
% This is done using the axis handle h2, which is passed as
% the Current Axis for the figure handle h1
% Next, we plot another plot on main area

set(h1,'CurrentAxes',h3)
hold on; plot([0:0.1:10],cos([0:0.1:10]),'r')
% To plot another figure in inset, we need to select it first.
% Again follow the same procedure as above

plot([0:10],[0:0.1:1],'k')
% Where will this get plotted?
% Remember that currently selected axis is the inset axis
% Hence it will get plotted on the inset plot

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Back after a long haitus

This blog is back in its third avatar. This is perhaps the tenth time I am writing a “I am back” post. But this time, its slightly different.

Sometime last July or August, my previous host (mesopia.com, which got bought by webhostplus.com) claimed that their servers got hacked into and all their data was lost. I had a back-up on my laptop. Unfortunately, that backup was lost a month earlier when my harddisk crashed. So, I had no choice but to start afresh.

I contacted my web hosts, webhostplus.com, informing them that they could go ahead and restore my account if they could not retrieve the lost data. I didn’t hear from them for 5 to 6 weeks. Thats when I decided to take my business elsewhere. I signed up with http://www.godaddy.com and requested for the transfer of my previous domain kaisare.net to my new host. Unfortunately, my requests went unanswered for a while. So, I contacted the registrars of my domain, http://enom.com. They informed me that I wasn’t the only one facing this problem, it looked like a lot of customers had a similar problem. Unfortunately, since my previous hosting company was still in business, they were unable — legally — to transfer the domain to my name. That is how I landed with a new domain, http://kaisare.org/

Thanks to Google cache, I will try to restore some of the more popular posts from my previous blog. While I will try to regularly update my blog, only time will tell whether I actually manage to fullfil my intensions.