Why I Support The Attack On Women

Off late there has been a lot of reports, both via the main stream media as well as blogs, about the increasing number of attacks on women. So i decided to do an RCA (Root Cause Analysis) of the situation myself. Basically i wanted to find answer to these questions -

  1. Why do such attacks happen?
  2. Who are these attackers? Are they teenagers or people well in their late 30s?
  3. Whom did they target? What was so special about the people who were attacked?
  4. What they did, is it wrong? … etc.

Problem Statement:

As far what i read in the news papers and what i heard from others discussing, these attacks were orchestrated by people who say they are supporting the ‘Indian Culture‘. They call them selves as the conservators of Indian Culture. The good Samaritans who resorted to a quick resolution of the problem, attacked the women to save the Indian Culture form getting westernized, the same evil forces from which the Mahatma delivered us (they might argue so)

Hence we have our Problem Statement as : The Attack was to preserve/conserve the Indian Culture.

Analysis:

Now that we have defined the problem statment, lets looks at the analysis. Lets define what happened, what were the public reactions like.

The people who attacked women in Mangalore, Bangalore, Mysore (???), some-other-’ore’ etc. ( lets refer them for the time being as SenaPpl), just couldn’t digest the fact that the bharatiya naari (Indian Woman) dressed in jeans and T-s. Plus the fact that they were dining at a lounge, crossing-the road, waiting for a bus or even minding-their-on-business when they where attacked.

The people who were attacked (we will refer them as Victims), were teenagers and techies. The Victims all had one thing in common, they were wearing western clothes – jeans, t-s, skirts etc. If you might notice the attacks were not on women who were wearing saree/salwar/any authentic Indian dress. The SenaPpl were all men. There were no incidends of women attacking men or women attacking women. It was the XY chromosomes attacking the XX Chromosomes.

Continue reading

Useful Python Snippets

My love for Python has indeed grown with the constant usage. Each day i find something that is really interesting with that. By interesting i mean, C will complain and whine if i do that, PERL say ‘lets give it a try‘ and Python is like, ‘C’mon baby, i’m ready!!!’.

My advice to good C/C++ programmers is that, stay the way you are, picking up PERL / Python will screw up you skill. C is like the wife with whom you have to be loyal, Python is like the liberal girlfriend, who lets you flirt with other girls and wouldn’t mind.

Coming back to the purpose of this post, here are some of the snippets that proved useful to me and could also help you out with in your scripts -

File to List – Move the contents of the file in to an list, line by line

list = ([line for line in open ( "names.txt", "r")])

Pattern Matching – the only thing that i miss in Python is the regexp usability that PERL gave me. Some how i feel that using regexp was a lot more easier with Perl, than with Python

# import the regex pacakge
import re
#create the regex object
pattern = re.compile("error")
# search for pattern
re.search(pattern, sampleString)

re.search return TRUE / FALSE depending on the result, so that it can be used along with if <> : clause

Detecting the OS and creating directories – this helps to solve the variation in the Windows directory navigation (..\\..\\) and the Unix style navigation (../../)

# import OS packages and time package
import os, time, sys, os.path
# create a unique directory name based on the time
dirName="Run-"+time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
# detect the OS
if os.name == "posix":
    logPath = "../../logs/"
    resultsPath = "../../results/"
else:
    logPath = "..\\..\logs\\"
    resultsPath = "..\\..\\results\\"
# create the directories
os.mkdir(logPath+dirName)
os.mkdir(resultsPath+dirName)

String is like a List – the best part of Python

str = "Hello"
# will print H
print str[0]

Happy scripting, and i hope this will be helpful to some … icon smile Useful Python Snippets

How to Start a Blog?

I have been blogging since 2006 and looking back, i’m feeling euphoric that i had picked up this hobby. But time and time again, i come across people who doesn’t have an idea what a blog is or how to start blogging. They are particularly clueless where to start. The fact is that they all know that blogging involves writing, but they don’t know where to start. Today too, i was asked twice by people as to how to start blogging.

So i finally decide that its time for me to do a writing as to – ‘How to Start a Blog?’. Don’t worry, its EASY! Its a 2 step hassle free process -  blogger How to Start a Blog?

Step – 1

Get youself registerd at one of the blogging sites like – WordPress, Blogger, TypePad, LiveJournal, Rediff etc.

Step – 2

(this is from a WordPress perspective) Click on “NewPost”, Enter a title for your post -> write -> Add this under a category -> Publishtypepad How to Start a Blog?

DONE!!!

Couple of things that u need to be aware of -

  1. You are not a star overnight – unless of course you are Aamir Khan / Amitab Bachan – Be patient and keep posting
  2. Don’t worry about the way you write, trust me, no one is a born Shakespeare (please don’t ever ever write like Shakespeare) – Keep writing, you will improve
  3. You wont get comments as soon as you do a post, for that u need to look at point 1 – Be patient and keep writing
  4. Read others blogs and comment and reply – This will lead to point 1 and 3 and help you with 2
  5. Don’t hesitate to write and be prepared for any comments.

The only way to get noticed is to keep writing and commenting, build you network in small steps. If u dont want to get noticed, its ok, still keep writing for what ever reason it may be – Bitching about you boss, writing about your love – to anything…logo How to Start a Blog?

icon smile How to Start a Blog? Happy Blogging.

I had done couple of Blogging sessions at WIPRO and at BIMTECHhere is the link to the slides

Script for Telnetting with PERL and Python

75 logo Script for Telnetting with PERL and PythonLets just say that PERL made me a crazy programmer. Then came Python, it made me an insane one. In my previous job, it was all PERL, PERL and PERL. But this current job has made me pick up Python.

Python was picked up because the STAF/STAX automation work required scripts and Python was the candidate. So one fine day i found myself writing this -

python logo Script for Telnetting with PERL and Python#!/usr/bin/python
print "Hello world"

instead of this -

#!/usr/bin/perl
print "Hello World";

Then i actually looked back and thought, what was the first real purpose for which i wrote a PERL script – telnetting. Even today i find that telnetting to workstations to retrieve stats, is one thing that i do a zillions times day. The usual telnet script with PERL/Python has to be used along with the Expect module. That guarantees that the session time-outs and failure scenarios are properly taken care of.

But there is one place where you can just avoid Expect module all together. Its when you use the script within the same network and you are 70% sure that the pain-in-the-butt scenario rarely happens. So here it is a minimal telnet script that i have made in both PERL and Python.

PERL

#!/usr/bin/perl
use Telnet;
$host = "192.168.1.100";
$port = "2300";
$uid = "jerry";
$pwd = "password";
open $inputLog,  ">in.log";
$box = new Net::Telnet();
$box->open(     Host => $host,
                Port => $port,
        );
$iLog = $box->input_log($inputLog);
$flag = $box->login(    Name => $uid,
                        Password => $pwd,
                );
$box->print("show log");
$box->waitfor('/# $/i');
$box->close;
exit

PYTHON

#!/usr/bin/python
import os, telnetlib
HOST = "192.168.1.100"
PORT = "2300"
user = "jerry"
password = "password"
f = open(sLog, "in.log")
tn = telnetlib.Telnet(HOST, PORT)
tn.read_until("login: ")
tn.write(uid + "\n")
tn.read_until("Password: ")
tn.write(pwd + "\n")
tn.read_until("]#")
tn.write("show log\n")
f.write(tn.read_until("]#"))
f.close()
tn.write("exit\n")
tn.read_until("#")
tn.close()

Happy scripting. icon smile Script for Telnetting with PERL and Python

proto.in – Breeding the New Indian CEOs

logo proto.in   Breeding the New Indian CEOsLast day me and Ujj, a fellow mutineer, was at the Nimhans Convention Center for Proto.in, the startup event. The reach that event had on each of the participants and the people gathered there was quite profound. I have been to quite a lot of conferences and un-conferences, but this one was nothing like the ones i had ever been to. The talent that this event show cased, the ideas that flowed, the success stories that were shared, the new avenues that were opened up for many was quite, let me say it this way, impressive!!!

I vividly recollect telling Ujj, after the event that, i quite didnt know that there were so many smart geniuses in India. Generally when i hear the word start-up the picture that i frame is one of a bunch of people who are sitting in a room and rolling out a service on the internet and minting money(well, if they are lucky). So i wanted to see if there was anyone else who was running a non -IT based, non-internet business. Yes indeed there are, and as it turns out the Healthcare and Wellness sector in India is yet to be tapped to its potential.

I was in for “The Proto.in ShowCase”, where a bunch of start-ups, that were selected on the basis of their trend-setting status, were asked to showcase their product in 6min. Here is a list -

  • Nualgi – Kadambari Consultants.
  • Remindo – an office social-networking site
  • Ooha Kiosk Infrastructure – Ooha Services Pvt. Ltd.
  • InkFruit – Fingerprints Fashions Pvt. Ltd
  • Fachak – Youtube, Flickr, Scribd, Slideshare searches all rolled into one
  • Taroby – Advanced Millennium Technologies – Web 2.0 based Messaging Solution

So if u thought it was all about show casing you company and product, you’re wrong. The day’s keynote address was by Bob Young, and yes it was really interesting to hear him speak and the way he ended up in having the worlds largest collection on bad poems online icon smile proto.in   Breeding the New Indian CEOs . Sandeep Singhal, Nexus Capital, had a very interesting conversation with the audience on – Thinking Beyond Mobile and Internet. It was here that he pointed out that, yes there can be successful startups outside the mobile and internet sphere.

At the end of the day as i was leaving i realized that, what we need is not more and more conferences on diverse topics, but conventions like Proto.in, where the best in everyone, from the organisers, to the speakers, to the participants, to the techies like me (to the good food and the crowd), are exposed.

I’m looking forward for the next Proto.in.