Thursday, September 25, 2008

Google Chrome Scrolling Issue

Google chrome is interesting; however one of its weird scrolling bugs has been pushing it back from being a primary browser in my case (in spite of all those one-process-per-tab, fast javascript engine,... features).

Scrolling works fine on a dell laptop where i tested this. However, on a HP laptop, scrolling-up using the touchpad doesn't work. Thankfully, there is a patch available for this issue, albeit not from google itself.

Couple of searches on google groups showed up this url

An independent user has provided a quick fix for the chrome.dll file. I tried it, and so far it works fine. Just thought of sharing this info for the rest of users who've not been able to actively use chrome due to this bug.

Here's what I did to patch this up.
1. Download chrome_patch.zip from the above url.
2. Extract chrome_patch.exe into the same directory where chrome.dll resides.
3. Run chrome_patch.exe

PS:
1. AFAIK this is not an official patch from the chrome team. That said, use at your own risk!
2. The patch website mentions that latest development builds of chrome have fixed this issue; but it is not yet available on official builds.

Wednesday, August 6, 2008

Installing GIT on Windows (msysGit)

GIT is fast evolving revision control software created by Linus Torvalds, the initial developer of Linux. GIT was written to be a replacement to BitKeeper, a proprietary version management system that was initially used during the development of Linux.

Although GIT was originally meant for the Linux platform, ever since it became popular, there have been GIT versions for Windows and OS X as well. This post describes a GIT installation on windows.

The recommended installation on windows(called msysGit) requires Cygwin to be installed on your windows machine. GIT over Cygwin could be slower than GIT on Linux; nevertheless its good enough for those who would like to get a feel of GIT on their windows machines.

Below are the installation and configuration steps
1. Install Cygwin -
http://www.cygwin.com/setup.exe has a setup file of around 500KB which will in turn direct you to mirror sites for the rest of cygwin libraries.

2. Download and Install GIT for windows
http://code.google.com/p/msysgit/downloads/list
The installation asks whether GIT needs to be tightly coupled with your windows machine. I chose the loosely coupled GIT-bash option(this option does not support explorer integration).

3. To start experimenting, you could clone an existing GIT repository (similar to making a new module in CVS). I chose to experiment using a clone of script.aculo.us from github
Here's how you would create a clone
git clone git://github.com/madrobby/scriptaculous.git

The above clone created a directory called "scriptaculous" with a local copy of script.aculo.us code. There's also this special folder .git which has GIT metadata/history for the project.

Saved modifications in the GIT repository are called "commits".
"git show" displays information about the latest commit.
Commits are uniquely identified using a SHA1 hashed value of the file's contents (In the above example - a71412...bf94a4)

"git branch" lists all branches in the project. In the below example there's just one master branch.

4. Creating a test GIT project
a. Configure GIT using the .gitconfig file
b. Create and initialize a GIT repository
c. Add files and commit
For an in-depth reference on using GIT see http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

Thursday, July 31, 2008

Stock Charting/Technical Analysis Tool



Its been a long time since I've made a post, and so I decided to put up something different from a usual post. This post is about a stock charting tool that I developed during my "stock-market days" (the meaning of that might require another post ;-). 5 years back, the stock market suddenly started appearing quite attractive to me. After studying the subject for some time, I decided to explore the path of Technical Analysis. Reading books like Edwards and Magee's Technical Analysis of Stock Trends was a great motivator at that time.

Having chosen the path of technical analysis, one of the important missing factors was a tool which would help in plotting price charts and technical indicators/overlays. Yahoo! finance was a good tool, but then, I felt it would be more convenient to use a desktop chart plotter (maybe I need to thank my erstwhile slow-internet-connection for that!). There were other commercial softwares available in the market; however I didn't want to miss the thrill of developing it. So I wrote this little program that would fetch price/volume data from NSE's website and plot charts/technical indicators.

In this post I'm attaching the source code for this little program. Its written in Perl and uses the Tk module for graphics stuff and LWP for fetching data from NSE.

The program supports features like
1. Creating your own portfolio of stocks (although it just supports one portfolio currently :)
2. Sync-ing with latest price data from NSE. Although this is currently tied to NSE, it wouldn't be too difficult to map to it to another data source. (in fact my first data source was a different website; but after they stopped providing data feeds, I had to switch to NSE)
3. Price and Volume charts
4. MACD chart (MACD variables are currently fixed at 4,6,12)



5. Simple Moving Average - 5,10,20 days averaging (probably my short-term trading influenced these numbers :)
6. Exponential Moving Average - 6, 12 days
7. CandleStick charting
8. Support/Resistance Lines
9. Adjustment for Stock Splits


The source code for this program is available here under the GPL license. Hopefully someone starting to build a similar tool will find this useful!

Update Sep 18: A friend of mine reported that NSE has apparently changed the data feed format. So, for those of you who'd like to get a preview of Elevetrica.pl before the formats are sync'd up, here's a sample zip file for the data that would be fetched in with the older format.

Sunday, March 2, 2008

The Pursuit of Happ(y)ness

Just finished watching The Pursuit of Happynessfor the N-th time today (N would probably be between 10-15). After having watched the movie I just went into the wikipedia article which talks about the main character - Chistopher Gardner - the person who's real life story inspired this movie. In the movie, Will Smith plays the role of Christopher Gardner, an aspiring stock broker, who wants to make it to the top despite all of those factors which try to push him down.

Its a wonderful movie and Id' really recommend it; and if you've already watched it, the rest of this post will make more sense...

The wikipedia article briefly mentions that at the end of the movie, the "real" Chris Gardner appears in a cameo role. This is during the last scene, when Chris(the actor) just secures his dream job at Dean Witter and is walking down the street with his son. Just then, the real Christopher Gardner passes by them, just as another stranger walking through the streets. In this beautiful shot, the real Chris and the actor Chris(read as Will Smith) look at each other and acknowledge their presence and move on. Here are the actual screenshots from the movie (images reproduced here just for informational purposes! All copyrights vested with the original owners)



















The stranger who walks past Will Smith and the boy is the real Christopher Gardner whose story inspired the The Pursuit of Happyness!

Sunday, December 23, 2007

Review - The Dip by Seth Godin

I just completed reading Seth Godin's "The Dip". This short and sweet book has a unique message in it and here's a little post about this small-yet-beautiful book.

The book talks about 3 kinds of lifecycle patterns that can be found in almost everything we experience/do. These three patterns - The Dip, Cul-De-Sac and Cliff - are key to understanding and evaluating the effectiveness of what we do. Successful projects are characterized by the "Dip" pattern, whereas the rest go with the "Cul-De-Sac"/"Cliff" patterns.

So what is the "Dip"? The author defines Dip as "the long slog between starting something and mastering it". The Dip curve looks somewhat like the graph below. The initial part of the curve shoots up pretty quick; but after that comes a downtrend which lasts for a longer duration compared to the initial upward movement. Once the Dip is over, the curve resumes its uptrend.


The initial part of the curve reminds me of what Paulo Coeho refers to as as "Beginner's Luck" in his book "The Alchemist". When you start out with something thats really in alignment with what destiny wants you to be doing, there is an initial push and encouragement from the rest of the world. Its as though the universe wants you to get there - so when you start out in search of your destiny, the rest of the world (knowingly/unknowingly) tries to help you out. But then, soon you realize that the initial uptrend is over, and a stage comes where everything seems to be going against your progress. Now thats the "Dip" - the stage where the strong and persevering hold-on while the rest quit. Those who stick on, finally move onto a stage where their patience gets rewarded.

This Dip pattern actually works in favor of persevering people - because while they hang on, the rest of their competition is waning away - thereby making way for the final winner.

The other two curves - Cul-De-Sac and Cliff are essentially long-term-failure curves. In the case of Cul-De-Sac (French for 'Dead-End'), the curve is a flat line. Thats as though it has hit a dead-end and cannot move upward. People who stick around with this curve generally fail to make any progress and remain where they are. The third curve - Cliff - is a more dangerous kind. This curve looks more like the Cul-De-Sac - the only difference being that, after a certain stage, the curve falls down all of a sudden.

Both the Cul-De-Sac and Cliff are curves which don't really hold any long term prospects, and hence the author suggests that the best strategy in these cases is to quit. He dispels the popular Vince Lombardi quote - "Winners never Quit and Quitters never Win" - and goes on to explain that quitting at the right time is the key to success for people going through a Cul-De-Sac or Cliff. By quitting non-useful pursuits, the time and effort spent on these can be redirected to something better.

The book also talks about the concept underlying whats known as "Zipf's Law". The essence of this concept is that people or companies who occupy the first position are in general much ahead of those behind them. Its like the progression - 1, 1/2, 1/3, ... 1/n. The difference between the first and second is quite high compared to that between the rest of them. Hence, being in the first position has a distinctive advantage over the rest.

This book is about quitting being an averager and rising to the top, by focusing on what you do best. Its not a "How-to-get-there" kind of book - rather its one which makes you think about how important it's to pursue one's ultimate goal without being distracted by temporary failures or maybe even successes!

More information on this book may be found here

Monday, November 12, 2007

Oracle OpenWorld 2007

Yesterday was the kickoff for Oracle OpenWorld 2007. For those not in the know, OpenWorld is an annual conference hosted by Oracle at the Moscone Center in San Francisco (held at few other locations too). Oracle developers, customers, users, analysts, consultants and even competitors - all of them assemble under one roof for this gigantic event to discuss, share and promote their products/ideas.


This being the 30th birthday of Oracle, the opening ceremony had to be special. Sunday Night Live-30, as it was called, started off with a wonderful and somewhat nostalgic speech by none other than Larry Ellison. This wasn't the usual LJE who'd be talking about why you shouldn't invest into IBM DB2 or MS Exchange - rather it was an enthusiastic Larry Ellison reminiscing about the journey of Oracle from its initial days as SDL(Software Development Laboratories) to where it is now - the largest enterprise software maker with around 300,000 customers!




Here are few excerpts from his speech which was accompanied throughout with applause from the thousands gathered at Moscone North.

"...Bob(Robert Miner) had a good job and he had a family in San Francisco... that made risk taking like this a little problematic. But I decided to spend time with Bob trying to persuade him that this is a good idea. So every night, regular at dinner time, when Bob would get home after work, I'd arrive at his house at San Francisco and tell him about this incredible opportunity to start a software company. And Bob's wife Mary would listen to my sales pitch, if you will, (and Mary's sitting right there in the front of me laughing as she did then)... and I went on something like three times a week, and Mary said, 'Dont you have a home to go to? Why do you keep coming by here? I've listened to you guys talk for hours and hours and all you guys keep saying is how great you are'! And she told Bob, 'You do what he wants to do and we'll all starve' "
- About initial resistance while starting the company











Buses carrying posters of DB 11g, AIA and Unbreakable Linux






"We bid 300,000 dollars and we won easily, because the next big bid was 2 million. Bob looked at me and said 'This is not a good start'"
- About winning one of the initial contracts with Precision Instruments and later realizing that they'd bid too low.


"And we had a very modest little office down in Silicon Valley... that was actually rented to us by Precision Instruments... We had 4 little offices right off the computer room.. I think they'd used it for paper storage before they rented it to us ... it wasn't too elegant... we had one window"
- About the first office of Software Development Laboratories


"... the first version of Oracle - Oracle Version-2. We didn't have a Version-1. Who would buy Version-1 of a database from four guys in California?"
- About calling it Oracle Version 2


"We had lots and lots of orders but no money. So we had to cut back on few things - like my salary and Bob's salary. The difference between Bob and me was, Bob had savings; when they cut Bob's salary, Bob simply dipped into his savings. When they cut my salary, I had almost no money to eat. I was building some credit card debt and the bank started foreclosing on my house... (pause)... But you've got to ignore these things are keep your eye on the ball and not let these little things let you down"
- About going close to bankruptcy during the initial days

Posters from yesteryears


"We were trying to get a loan - we needed a credit rating - and they said, 'Well, send in your financial statements'... (pause) I looked at Stuart, 'Whats a financial statement?'. Stuart said 'I dont know what's a financial statement'... there's this P&L - they're easy to understand - money comes in, money goes out, and the difference is profit, very simple. But there's this thing called the balance sheet - If you're not an accountant, there's no way to know why does a balance sheet balance. There are things like Stockholders Holdings, Retained Earnings and all sorts of stuff that are completely inscrutable on a balance sheet. We finally got the loan but we were kind of guessing by looking at other people's financial statements. Its supposed to balance, but we'd no idea how this balanced. These were interesting times"
- About those days when there wasn't anyone with a proper accounting background.


"None of us knew accounting and we were desperate to hire someone who really understood accounting. We used to work late in the night and as all programmers do, we had pizza for dinner... and there was this delivery boy who used to come in to deliver pizzas. After some ten times or so, we'd become friends and started asking questions like where are you from and what do you do and so on. He said he was studying at Berkeley and we asked him what his major was. He replied 'Accounting' and we asked him 'Why don't you stop being a pizza boy and instead be our Chief Financial Officer'
- About how the first CFO, John Kemp was hired :)

There were many more, but then I guess I wouldn't have enough space to put them down here. Hopefully Oracle's gonna have a recorded version of the speech. Let me know if you find one.

And before I end this post, just want to say -
Happy 30th B'Day to you Oracle!

Wednesday, September 26, 2007

Panning through Black Holes and Baby Universes



"Behold, NASA's eyes up there in the heavens are watching on you. They are seeing everything - planets, moons, stars, galaxies... - name it, and the heavenly eyes have seen it"
-- Book of AJ, Chapter-11, Verses 12-13




Alright, I can hear it -- there isn't a "Book of AJ" yet -- neither in the "Old Testament" nor the "New Testament"! However, what it says is almost true.

Every second (even as I type this), NASA's (or ESA's) giant eyes are watching the sky and transmitting tons of high quality space images to their Ground Stations. From The Crab Nebula to The Andromeda Galaxy, from the Pseudo-Planet Pluto to Blue-Planet Earth -- name it, and those eyes have seen it.

Thanks to the benevolent guys at NASA, a good number of these images (except for those classified UFO images ;-) are available for public viewing at this location. Its a great service that NASA has offered by making these images available for public viewing.

However, if you show these images to someone who has used Google maps/Yahoo maps, the first thing he'll probably try is: Zooming-Into/Panning-Through the aerial image. Unfortunately, NASA's images don't support Panning/Zooming features . i.e you have to be satisfied with whatever you see. This eventually means that you are losing out on that tiny little chance of spotting greenish martian-goblins camouflaging amongst martian-moss.

No worries!!! Here's a new website which offers you the capability of Panning/Zooming into NASA images. Dirisala.net (from one of the IT experts I admire the most) gives you the capability to browse through NASA's public images and Pan/Zoom through them. For example, this page from NASA's website shows a beautiful image of the Bubble Nebula(some 11,000 light years away).

NASA's images gives you the option of either viewing either a medium size image or a large size image(around 300KB). But you don't really have the option of zooming through the image or navigating sideways(panning) through the image. On the contrary, the same image at Dirisala.net, allows you to explore deep into the Bubble Nebula.

The maximum resolution probably still depends on NASA's original image -- but then, this tool lets you dig through NASA's larger image(the 300KB one) at your own convenient depth (1/4x to 4x) without resizing your browser.

PS: If you happen to notice an Alien Creature/Unidentified Flying Object during your exploration at dirisala.net, please let me or the site owner know. You might be the first to spot an alien infiltration!