Planning for Startup Saturday Delhi

March 27th, 2009 Pankaj Jain Comments off

Plans for Startup Saturday Delhi are in full swing.  We will be announcing the the startup showcases and our speaker in the next few days.

 We’d also like to ask for people that are passionate about business and the startup scene to join us in volunteering to help organize, manage, and run Startup Saturday in Delhi/NCR.  Anyone interested in volunteering, please leave a comment on this blog post.

Twitter Opens up OAuth, Where’s Perl?

March 23rd, 2009 Pankaj Comments

Twitter opened up their OAuth implementation last week. It's a much welcome aspect of working with Twitter's API since we're planning on implementing some functionality into Semblr that uses Twitter. Hence, understanding OAuth and prototyping it's use was important for us.

My problem with Twitter's implementation is that the documentation is sparse and there isn't a single example in Perl or Java. Maybe these two languages aren't cool enough to warrant examples but to me, they're important because they're all I know. I spent some time over the last few days trying to implement OAuth for Twitter in my Perl scripts. The example below is a bit messy but it works.

It will create a few temp files, request a token for you, ask you to go to the URL printed to authorize the application. When you've authorized the application, run the script again and it will allow you to submit a status update.

#! /usr/local/bin/perl
# $Author: pankaj $
# $Date: 2009-03-22 23:46:27 +0530 (Sun, 22 Mar 2009) $
# Author: Pankaj Jain
# Copyright: Teknatus Solutions LLC
################################################################################################################################
use Modern::Perl;
use Carp;
use Net::OAuth;
use Data::Random qw(rand_chars);
use LWP::UserAgent;
use Data::Dumper;
use JSON::Any;

main();

sub main{
    my $ua = LWP::UserAgent->new;

    my $consumer_key = 'sdBwlvTkpZr7eiCmB0Evig';
    my $consumer_secret = 'asSINZmwnxwIfLwmdNvVBW7OSVzFOWj4mjJeDDaA';
    my %tokens = getTokens();

    requestToken(consumer_key => $consumer_key,
                 consumer_secret => $consumer_secret,
                 %tokens,
                 ua => $ua);

    my $message = "This is a Perl Net::OAuth test for twitter!";
    my $foo = {status => $message};
    my $url = 'https://twitter.com/statuses/update.json';
    if (defined $message && $message ne "") {
        my $request = Net::OAuth->request("protected resource")->new(
            consumer_key => $consumer_key,
            consumer_secret => $consumer_secret,
            request_url => $url,
            request_method => 'POST',
            signature_method => 'HMAC-SHA1',
            timestamp => time,
            nonce => join('', rand_chars(size=>16, set=>'alphanumeric')),
            token => $tokens{token},
            token_secret => $tokens{secret},
            extra_params => $foo,
        );
        $request->sign;
        say Dumper($request);
        my $response = $ua->post($request->to_url);
        say Dumper($response);
        my $response_code    = $response->code;
        my $response_message = $response->message;
        my $response_error   = $response->content;
        if ($response->is_success) {
            my $retval = eval { JSON::Any->jsonToObj( $response->content ) };
            if ( !defined $retval ) {
                say "TWITTER RETURNED SUCCESS BUT PARSING OF THE RESPONSE FAILED - " . $response->content;
            }
        } else {
            say $response_code;
        }
        exit;
    }
}


sub requestToken {
    my %args = @_;
    if (defined $args{consumer_key} && defined $args{consumer_secret} && 
            !defined $args{access_token} && !defined $args{access_secret} && 
            !defined $args{token} && !defined $args{token_secret}) {
        my $token;
        my $secret;
        my $request = Net::OAuth->request("consumer")->new(
            consumer_key => $args{consumer_key},
            consumer_secret => $args{consumer_secret},
            request_url => 'https://twitter.com/oauth/request_token',
            request_method => 'GET',
            signature_method => 'HMAC-SHA1',
            timestamp => time,
            nonce => join('', rand_chars(size=>16, set=>'alphanumeric'))
        );
        $request->sign;
        my $res = $args{ua}->get($request->to_url); # Post message to the Service Provider
        if ($res->is_success) {
            my $response = Net::OAuth->response('request token')->from_post_body($res->content);
            print "Got Request Token ", $response->token, "\n";
            $token = $response->token;
            print "Got Request Token Secret ", $response->token_secret, "\n";
            $secret = $response->token_secret;
            if (defined $token) {
                my $auth_url = "https://twitter.com/oauth/authorize?oauth_token=" . $token;
                my $message = "Please visit $auth_url and authorize this application to access your twitter account.  You may revoke access at any time you wish.\n";
                say $message . "\n";
                open(TMP,">/tmp/request_token.txt");
                say TMP $token . "|" . $secret;
                close TMP;
                exit;
            }
        } else {
            die "Something went wrong";
        }
    } elsif (defined $args{access_token} && defined $args{access_secret} && 
            defined $args{consumer_key} && defined $args{consumer_secret} && 
            !defined $args{token} && !defined $args{token_secret}) {
        my $auth_req = Net::OAuth->request("access token")->new(
            consumer_key => $args{consumer_key},
            consumer_secret => $args{consumer_secret},
            token => $args{access_token},
            token_secret => $args{access_secret},
            request_url => 'http://twitter.com/oauth/access_token',
            request_method => 'POST',
            signature_method => 'HMAC-SHA1',
            timestamp => time,
            nonce => join('', rand_chars(size=>16, set=>'alphanumeric'))
        );
        $auth_req->sign();
        my $res2 = $args{ua}->post($auth_req->to_url); # Post message to the Service Provider
        if (!$res2->is_success) {
            die 'Could not get an Access Token: ' . $res2->status_line . ' ' . $res2->content;
        } else {
            open(TF, ">$ENV{HOME}/.teknatus/.twitter_token");
            my $response = Net::OAuth->response('access token')->from_post_body($res2->content);
            print STDERR "Got Access Token ", $response->token, "\n";
            my $access_tok = $response->token;
            print STDERR "Got Access Token Secret ", $response->token_secret, "\n";
            my $access_secret = $response->token_secret;
            say TF $access_tok . "|" .$access_secret;
            close TF;
            unlink("/tmp/request_token.txt") if (-e "/tmp/request_token.txt");
        }
        exit;
    }
}

sub getTokens {
    my %args = @_;
    my %tokens;
    my $tokenFile = $ENV{HOME} ."/.teknatus/.twitter_token";
    my $reqTokenFile = "/tmp/request_token.txt";
    if (-e $tokenFile ) {
        open (TF, "<$tokenFile");
        while() {
            chop($_);
            next if ( $_ =~ /^\s?$/);
            my @tmp = split(/\|/, $_);
            $tokens{token} = $tmp[0];
            $tokens{secret} = $tmp[1];
        }
        close TF;
    }
    if (-e $reqTokenFile) {
        open (TF, "<$reqTokenFile");
        while() {
            chop($_);
            next if ( $_ =~ /^\s?$/);
            my @tmp = split(/\|/, $_);
            $tokens{access_token} = $tmp[0];
            $tokens{access_secret} = $tmp[1];

        }
        close TF;
    }
    return %tokens;
}

1;

Startup Saturday Delhi – 3rd Edition – 14th March 2009

March 10th, 2009 Niche Techie Comments off

The 3rd edition of Startup Saturday Delhi is scheduled for the 14th of March, 2009. Venue, as always, is The American Center, Kasturba Gandhi Marg, Connaught Place, New Delhi.

And here is how the agenda looks like :

1) 2:00pm to 2:45pm — Product Demo from VoiceTap. The venture is a platform that connects knowledge seekers to experts using a mix of the internet and phones.

2) 2:45pm to 3:30pm — Wirkle gets talking about their products. Wirkle is a Mobile solutions firm providing services and a product in India and Internationally, based out of Noida.

3) 3:45pm to 4:30pm — A Presentation by Mr. Deepak Shenoy discussing his last venture and lessons learned.

4) 4:45pm to 5:30pm — Networking over some piping hot tea and snacks.

Hoping to see you there. Register yourself through this collaboration platform. Just become a part of the Startup Saturday Delhi project. And you will get all appropriate communication regarding the event.

Calling all Startups!

March 9th, 2009 Pankaj Comments

Startup Saturday Delhi is just around the corner. We’re holding our next event on the 14th of March at the American Center from 2pm to 6pm. The goal of Startup Saturday is to give startups a place where they can showcase their products and their businesses. Our goal is to also allow entrepreneurs and those considering a life as entrepreneurs to share information, learn from each other, and be a part of building the entrepreneurial ecosystem in India.

If you’re a startup or know of any Indian startups that would like to publicize their products/services, please fill out the Demo Nomination form so we can get you on the Startup Saturday Delhi agenda.

Looking forward to seeing you at Startup Saturday Delhi!

2008 Reflections and 2009 Plans

January 1st, 2009 Pankaj Comments

Happy 2009 everyone!

2008 has been a very interesting year by all measures. We saw record drops in global stock market indices - 34% drop for the Dow, the worst since 1931. We saw vast amounts of wealth obliterated. We saw the US moving closer and closer to a socialist economy. We saw the election of the first African-American to the office of the President of the United States. We saw another round of incredibly well planned terrorist attacks across India, culminating in the sixty hour standoff in Mumbai. We saw Indians get up and rebuild quickly from the attacks. We saw a new sense of urgency in the fight against terror by the Indian middle class. And we have seen India and Pakistan, once again, come to the brink of war.

Obviously, we've seen a number of other things that I've missed but these are some of the events that will always remind me of 2008. 2008 is also the year we got Teknatus Solutions Private Limited up and running in India. We did a soft launch of our Bridal network, Brides' View and we're getting ready for a private beta of our next product - Semblr. It's been an interesting and tough year all around. We've seen an incredible amount of interest generating around the Indian startup scene, both with prospective employees and also with the media. Plenty of folks have done a great job in catering to this interest. We've had Proto, Head Start, Startup Saturday and also BarCamps across all major Indian cities to help get startups some visibility and to help those interested in learning/joining/startip a business. With the economic downturn, a good deal of media attention is turning to startups and venture funding. The amount of Indian startups has been increasing steadily and now, with many people getting laid off, the numbers should increase even more. As far as VC/angel funding, well, the picture in India and globally isn't as rosey as it was six months ago. However, there are still quite a bit of deals closing.

For Teknatus, 2009 is going to be an interesting and challenging year. Our major goal for the year will be to launch a few additional products and start generating revenue. It won't be easy but I feel confident that the product we're getting ready for soft launch will be generating revenue by the end of the second quarter of 2009 and by then, we are planning to launch our third product which will be a SaaS product geared toward SMEs. Our next major goal is going to be working on building the team out. We're going to have positions opening up for various roles over the coming months and, hopefully, we'll be able to fill them with some great people.

In 2009, we also plan to continue working on helping the entrepreneurial ecosystem in India, specifically New Delhi. We've found platforms like Startup Saturday to be wonderful areas to connect with like-minded individuals. Hiring and building a team in India is difficult but it's not insurmountable.

Once again, happy 2009!

Categories: Business, Business and Economics Tags:

MySQL 64bit, Perl 32bit and OS X Leopard

December 26th, 2008 Pankaj Comments

This is a little tip on how to get Perl(32bit) working with a 64bit version of MySQL on OS X Leopard.

I was working on a small project today that required MySQL 5.067 and I opted to do it in Perl 5.10. You may remember a post that I put up in August describing how to compile MySQL 64 bit for OS X Leopard. Well, since then I also compiled and installed Perl 5.10 (not replacing Apple’s system install of Perl). I wanted to take advantage of some of the Perl 6 features that have been backported to Perl 5.10 (the first Perl release in two years).

Back to today’s project, I decided to use the awesome Class::DBI Perl module to do my little project. I wrote all my code and began to run it in the perl debugger and realized that I need to install the DBD::mysql module. During the installation process for DBD::mysql, the Perl module is compiled using the mysql libraries and header files. Compilation wasn’t a problem. It’s when we got to the ‘make test’ step that all hell broke loose.

To cut a very long story short, I kept getting the error below:


# Failed test 'use DBD::mysql;'
# at t/00base.t line 21.
# Tried to use 'DBD::mysql'.
# Error: Can't find 'boot_DBD__mysql' symbol in /Users/pankaj/.cpanplus/5.10.0/build/DBD-mysql-4.010/blib/arch/auto/DBD/mysql/mysql.bundle

I dug around a bit and decided to run the installation manually. The problem here has to do with compiler flags that were used for mysql. MySQL was compiled as a 64 bit Leopard binary. However, Perl 5.10 was compiled as a 32bit binary because many Perl modules don’t support 64 bit out of the box.

To solve the problem, I had to recompile the mysql client libraries:


--($:~/src/mysql-5.0.67)-- export ARCHFLAGS="-arch i386"
--($:~/src/mysql-5.0.67)-- CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors \
-fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql.32 --without-server --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-shared
--($:~/src/mysql-5.0.67)-- make
--($:~/src/mysql-5.0.67)-- make test
--($:~/src/mysql-5.0.67)-- sudo make install

Once the mysql client libs were done compiling and installed into /usr/local/mysql.32, I changed my PATH to ensure that the newly compiled mysql libraries and binaries were picked up before anything else.


export PATH=/usr/local/mysql.32/bin:${PATH}

Once that was done, I went back to my DBD::mysql source directory and built it using the following commands:


--($:~/src/DBD-mysql-4.010)-- perl Makefile.PL --libs="-L/usr/local/mysql.32/lib/mysql -lmysqlclient -lz -lm" --cflags="-I/usr/local/mysql.32/include/mysql"
--($:~/src/DBD-mysql-4.010)-- make
--($:~/src/DBD-mysql-4.010)-- make test
--($:~/src/DBD-mysql-4.010)-- sudo make install

This time, make test ran beautifully with a few minor exceptions because I didn’t actually give it a mysql db to connect to.

The mysql 32bit client can easily connect to the 64 bit server. Perl, Class:DBI are now very happy and the application is running as planned.

The Financial Ninja and “Greenspan Sees market Rebound”

December 20th, 2008 Pankaj Comments

Here's a great post over at the Financial Ninja's Blog about how Greenspan sees the market rebounding in six to twelve months. I couldn't agree with the Financial Ninja more when he says, "I too believe we'll bounce significantly... but only to dive into abyss after."

Don’t Believe the Market Hype!

November 26th, 2008 Pankaj Comments

Intro
As all of you who've been keeping up-to-date on the happenings in the financial markets know, there's been a good deal of turmoil and volatility continuing. GM and Chrysler, in the US, are begging for bailouts, small, medium, large and extra large companies are laying off people in droves (Citigroup will be laying off 53,000 people). Things are pretty bad in the US right now. We all know that, we all hear about it, and the US stock market shows us daily.

What about India? Well, if you ask the Prime Minister, the Finance Minister, various financial "analysts" on TV, etc. they will tell you that India is very well insulated and the India growth story continues, with a few minor speed bumps along the way. My personal opinion is that the politicians and media are generally telling us what we want to hear. They're not accurately portraying the severity of the situation in India. The situation is about to get worse in India but, barring any further catastrophic meltdowns, India should see some incredible growth post 2011.

Relative GDP Growth
Let's look at India's economy on a relative basis. Relative to the US and other developed, highly deregulated economies, India's still got a growth story, whereas, the US, the UK, Japan, etc. are all in a recession (negative growth). The talking heads in India tell us that India is still on track for 6.5% to 7% GDP growth in 2009. Assuming that is true and exactly what will happen, it's huge number (in aggregate terms) compared to other developed and many developing countries! However, India still has roughly 450 million people at or below the poverty line. This is one and a half times the population of the whole US. In order for India to decrease the number of poor and continue to provide for the basic necessities of the economically disenfranchised and cater to the increasing consumption of the middle and upper classes, growth needs to accelerate, considerably. GDP growth in India MUST be at least 10% if India is to continue to grow, relative to other economies. In my opinion, 7% GDP growth is akin to a recession in a developed economy. How can India grow at more than 7% in 2009? It's a complicated question that the smartest economists from Harvard, Oxford, LSE, etc. are trying to answer. I won't be pretentious enough to suggest that I know the answer. However, I will say that whatever the answer is, it's very complicated and it will most likely make a vast amount of people very unhappy. Hence, it won't be politically viable, especially, in an election year.

Layoffs
On the 20th of November, there was a nice little piece on Livemint that quoted Cabinet Secretary KM Chandrashekhar, "Most of our productions are based on domestic demand. As long as domestic demand remains reasonably strong, I don't think there would be any large-scale job cuts in India," he said. Domestic demand for many goods and services is growing but is it growing enough to keep up with supply?

The article also went on to describe how Jet Airways was "asked", by the government, to take back all of the 1,900 employees that they had laid off in October 2008. As a business, Jet Airways has every right to hire and fire the people they need to in order to stay competitive, and profitable. However, the Indian government, must also do what they can to avoid mass layoffs across large, high profile, Indian companies. Mass layoffs across Indian industry will have a devastating affect on the economy. However, how many additional companies can the Indian government "ask" NOT to layoff people before companies start feeling intense pain?

Smaller companies are laying people off and some are even shutting Indian offices. Zapak, a mobile games company, recently announced that they would be shutting their Bangalore office. In the Business Section of the Hindustan Times (Saturday, November 22, 2008 Edition), HSBC is predicted to layoff approximately 200 employees across India. Dell has decided to scale back their hiring of new employees. These are just large companies.

About ten days ago, I had spoken to an executive at a premium tissue maker in India. They said sales have fallen dramatically. People have switched from using premium tissues and toilet paper to non-premium essentials. If the current sales numbers continue, not drop, they will probably have to layoff some people.

When I told a family business exporter of garments that he must be happy since the USD has climbed dramatically against the INR, he told me that he's more scared then ever. He told me that orders are being cut by his clients, some of them have begun renegotiating contracts to pay in INR rather than USD because they feel that the Rupee can only depreciate against the US Dollar. I'm not quite in agreement in that statement but it highlights a very important fact - sales are down globally, not just in the West.

Real-Estate
The real-estate sector in India has slowed. There's no questioning that statement even if developers/builders in your neighborhood are still jacking up rates. They generally see the downturn but don't want to make a loss on their investment. Just wait it out and eventually, they will cave in. How can I say that, well, it's simple. They made some profits from other deals. Those profits allowed them to get funding from a bank. They have a mortgage to pay and at some point, probably six months, they will feel the excruciating burden of carrying the property and will realize that they have no choice but to cut their losses and run.

Investments in second and third tier cities have dropped dramatically. Indian and foreign investment firms are finally stating the obvious, "The Indian Real Estate market is slowing". Many projects from large RE developers like DLF and Unitech have been put on hold indefinitely. Indiabulls sees a 15% correction in the real-estate market over the next six months. I'd put the number a bit higher, closer to a national average of 25%. Marriott recently decided to shelve building a 250 room hotel in Pune, by at least two years.

For now, gone are the days when your driver or plumber is quitting his job to become a real-estate broker or a handyman is quitting his job to become a real-estate developer/builder.

Stocks
The BSE Sensex is at a three year low. Confidence is shaky at best. Corporate earnings look ok (on a relative basis) but earnings growth appears to worrying investors. Most companies are no longer expecting 20% or 30% growth rates for 2009. Info Edge (Naukri.com) has said that they see fiscal Q209 revenues to be half of fiscal Q208. Earnings growth is slowing. The question to ask is, "Is the rate of deceleration increasing?".

The BSE has failed to rally after two very big days of gains for the Dow. People in India are still bullish on the market and the Indian growth story so why hasn't the BSE soared like the Dow did on November 21st and November24th? There's still too much uncertainty and the Indian stock market is telling us that cautious optimism is warranted.

Currency
The Rupee is at an all time low against the US Dollar (though a one week high, as of November 25th, 2008). There are a great deal of challenges that India faces in the next two years - much like the whole world. I look at the Rupee relative to the US Dollar and I think that they INR should settle somewhere around INR 49 per USD by the second half of 2009. The US also faces great challenges but the Indian scenario is quite a bit more precarious in many ways. GDP deceleration, inflation (currently at 8.56%), rising import costs, FX reserves are much too low for comfort. Morgan Stanley expects the Rupee to depreciate to 57 before it appreciates. They may be right but the USD is going to be under a great amount of strain considering how much additional debt is going to hit US tax payers in the pockets.

It's hard to say what will happen. All we know is that many many things can change, very drastically, fairly quickly. I believe the next two years are going to be very difficult, globally, and we should be prepared for it - financially and psychologically.

Startup Saturday Volunteer Meetup

November 22nd, 2008 Pankaj Comments

For anyone interested in volunteering for Startup Saturday Delhi, we're meeting today, November 22nd, 2008 at 3pm at the Teknatus office in NSIC. If you're interested in joining us, please drop me a note.

Comment Moderation Enabled

November 20th, 2008 Pankaj Comments

Due to the overwhelming amount of spam comments on the Teknatus blog, we've enabled moderation of all comments. We've also disabled the ability of non-registered, non-verified users to post comments.

Apologies but managing the spam has been too time consuming.

LinOSX TechnoMash is Digg proof thanks to caching by WP Super Cache!