Thursday, April 17, 2025

The Origin Story of Kundli for Windows: A Journey That Changed My Life

How It All Started

My journey with programming began in 1989 at the age of 10. I was always fascinated by technology and eager to get my hands on the latest hardware. In 1993, while exploring options to buy new components, my brother Yen and I visited the Delhi office of a company called Big Apple, which imported cutting-edge hardware from Hyderabad.

As we stepped out, we struck up a conversation with a gentleman named Ashish Jain, who showed interest in some of the software I had built. Impressed, he introduced me to Mr. Kamall Dev, the owner of a company called Computer Zone. Mr. Dev had a DOS-based astrology software called Kundli that was riddled with bugs and lacked proper source code. He wanted a complete rewrite — and just like that, a new chapter in my life began.

The Early Challenges

Astrology always intrigued my father, and he had a treasure trove of books on the subject. With his guidance and a growing stack of my own astrology books, I immersed myself in understanding how planetary positions are calculated using birth date, time, latitude, and longitude. Once I cracked the basics, we accepted the challenge from Mr. Dev.

Back then, I did most of my programming in Clipper, a language known for its text-based GUI. Windows 95 hadn’t arrived yet, and we had to make do with what was available. Using Clipper, along with additional tools that enabled basic graphics and Hindi printing on dot-matrix printers, we cobbled together a working version. By 1994, we had a beta version of Kundli ready.

While Mr. Dev and Mr. Jain had already pre-sold over 50 copies, the first launch was rocky. Inconsistent printer behavior, broken page layouts, and graphical glitches made it a stressful time. The core astrology calculations worked well, but the user experience left a lot to be desired.

Birth of Kundli for Windows

Amid the DOS headaches, we learned about the upcoming Windows 95, a major leap from Windows 3.1 with its GUI and better driver support. Realizing the opportunity, I shifted to Visual Basic, whose RAD (Rapid Application Development) environment was a perfect match for creating a clean, user-friendly UI.

In a few months, Kundli for Windows was born. Mr. Dev and Mr. Jain managed the initial customer frustrations gracefully, offering free upgrades to the Windows version. By the time Windows 95 officially launched, our software was stable and ready — and finally, it started gaining traction.

While most of the monetary gains went to Computer Zone, the pride of building something so impactful was reward enough for me. Seeing my name appear when launching the software was surreal.

Rise in Popularity

For a while, Kundli for Windows grew steadily. But its breakthrough came around 1998, when NOW-India introduced dial-up internet and wanted to offer astrology as a service on their portal. Thanks again to Mr. Jain and Mr. Dev, Kundli was chosen.

To support this partnership, Mr. Dev agreed to release a version without copy protection exclusively for NOW-India users. Unfortunately, this version leaked — and piracy exploded. However, this unintended move skyrocketed Kundli’s popularity. The demo version alone saw over 10 million downloads on platforms like Download.com in just a year. People appreciated the software's accuracy and ease of use, and it became the most popular Vedic astrology tool in India.

Why Updates Dried Up

By 1999, piracy had eroded most of the revenue. Since the core version already covered a wide range of features, the motivation to develop advanced modules faded — especially because the lion’s share of revenue never made its way to me.

In 2001, Mr. Dev asked if he could keep Kundli’s source code as a retirement gift. I agreed. He later worked with third-party firms like Horizon Arc to build enhanced versions. Kundli 4.5 was the last version I worked on extensively. All versions after that were maintained externally.

Legacy of Kundli

Despite its age, Kundli for Windows remains one of the most popular astrology software programs in the world. Even today, people still ask for version 4.5 on Computer Zone’s website, even though dozens of versions have come out since.

While some calculations were precomputed only till around 2009, most features continue to work seamlessly even today.

Gratitude

I owe this journey and its impact on my life to a few key people:

  • Late Sh. Surendra Kumar Jain – My father, who introduced me to computers and astrology

  • Mr. Ashish Jain – The connector, marketer, and a true believer in my potential

  • Late Mr. Kamall Dev – Who trusted a 13-year-old with a commercial product

  • Yen Dutt Jain – My brother and my biggest support through development and customer chaos

  • Our early customers – Who took a leap of faith and stood by the product

Some Interesting Tidbits

  • When you launched Kundli for Windows, it showed my Name, Date/Time of Birth, and Place of Birth.

  • The software also displayed a quote I believed in:

    “As the moon — a non-living celestial body — affects ocean tides through its magnetic field, similarly, the planets influence our lives by shaping our perception and emotional responses.”

  • One of the biggest reasons for my waning interest was not just monetary. It was also the shift from Visual Basic to .NET. In my view, the RAD magic of VB was lost — and there was no clean migration path.

  • Interestingly, many of Kundli’s competitors eventually became friends. We never saw each other as rivals — we grew together.

Closing Thoughts

Direct financial gains from Kundli were limited. But the recognition, visibility, and credibility it gave me were invaluable.
It remains one of the most meaningful and foundational products of my life — and I’m proud to have been a part of its legacy.

Thursday, January 24, 2019

Windows Putty Reverse Tunnel/ OpenSSH Gotchas


OpenSSH Install
  • The configuration is stored in C:\ProgramData\SSH folder
  • Need to comment out #Match Group Administrators section
  • The ".ssh" folder must be validated for each user properly. Sometimes, if you create ".ssh", windows will create ",ssh" (comma instead of dot)
  • .ssh folder should only have permissions for SYSTEM, user and administrators. No other users at all
  • Make sure both SSH service and Authentication Agent services are running
PC behind firewall:

  1. Install Putty on the NUC
  2. In Putty, create a new session
    1. Host:
    2. In category on left, select Connection
      1. Under seconds between keepalives - set to 30
      2. Check Enable TCP Keepalives
    3. In category on left, select Connection > SSH > Auth
      1. Click on browse the select the key file
    4. In category on left, select Connection > SSH > Tunnels
      1. Source Port: 9999 (remember this)
      2. Destination: localhost:3389
      3. Change from Local to Remote
      4. Change from Auto to IPv4
      5. Click on Add
    5. In category on left, select session
    6. Under Save sessions, give a name "home-rdp-reverse"
    7. Click on Open to verify that the SSH session opens
  3. Create a batch file such as remote-link.bat with plink to run in a loop. plink is a putty utility where you can provide putty saved session name to execute. Something like:
    1. plink "home-rdp-reverse"
  4. Run this batch file to ensure that the connection is established properly without any issues
  5. Add batch file to startup so that it runs as soon as machine is started
  6. Restart the machine and verify
  7. Note: The port 9999 above is unique for this particular install. Each install will require its own source port which we can manage separately
Connected remotely:

  1. Open Putty on your machine and create a new session
    1. Repeat step 2.1 from above
    2. Repeat step 2.2 from above
    3. In category on left, select Connections > SSH > Tunnels
      1. Source Port: 5002
      2. Destination: localhost:9999 (this is the port for specific PC we want to RDP)
      3. Keep Local
      4. Change from Auto to IPv4
      5. Click on Add
    4. In category on left, select session
    5. Under Save sessions, give a name such as "college-server-rdp"
    6. Click on Open to verify that the SSH session opens
    7. Open Remote Desktop Connection client
    8. Connect to localhost:5002 (source port from above)
    9. Enter credentials applicable to machine in the college
Reference/ Help: https://vincetocco.com/how-to-setup-a-reverse-tunnel-with-putty/

Tuesday, June 30, 2015

Commit hook on Windows for Git

Configuration must be set in the config file on server. Sample:

        mailinglist = programming@xyz.com
commitlist = programming@xyz.com
mailer = smtp
environment = generic
smtpserver = mail.xyz.com
smtpserverusername = noreply@xyz.com
smtpserverpassword = d
smtpusername = noreply@xyz.com
smtpuser = noreply@xyz
smtppass = d
from = noreply@xyz.com

post-receive may look something like:

#!/bin/sh
echo PWD is $PWD
\\python27\\python hooks/git_multimail.py

Friday, June 07, 2013

TortoiseSVN settings to use DiffMerge

Diff Viewer: C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe /t1=Original /t2=Mine %base %mine

Merge: C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe /t1=Theirs /t2=Base /t3=Mine /r=%merged %theirs %base %mine

Friday, March 01, 2013

Sencha Touch 2: Weird Issue

We were adding some components to Viewport without adding an itemId. In that case, "show" event was firing multiple times (one for each time the component was added - not ignoring the removed components).

Friday, June 24, 2011

SQL Server: Top (variable) vs TOP n

For past week or so, we have been struggling with performance issues in one of our applications using SQL Server. Some of the queries are quite complex and SQL Query Optimizer spends almost 1500-2000 ms in Parse and Compile whereas execution takes about 500ms. We tried our best to reduce compile time but we couldn't so we left it to a later date.

Now, the biggest problem remaining was that the SQL Query Plan wasn't getting re-used. In the application, users can use pagination and on every page change, query was getting compiled repeatedly. What I found was a bit strange. The way our code called was something like:

SELECT TOP 10 * FROM vwCustomerList
SELECT TOP 20 * FROM vwCustomerList
...

So, we were a bit stumped. Just our of curiosity, I changed the queries to:

SELECT TOP (@Top) FROM vwCustomerList

And passed @Top as the parameter. Now, suddenly the query plans were reused and application was back to good speed.

The good thing was almost all the queries from our application are executed through the same set of libraries and hence I was able to modify code at just one place and all the queries benefit from this performance boost!

Friday, October 23, 2009

Setting up Windows 2008 – Some of the steps

  1. SQL Server 2008: Ensure that port is opened in firewall and TCP IP settings are specified in Surface area configuration
  2. Install FTP 7.5 separately
  3. With classic ASP, error reporting is turned off by default. Enable in Web Server
  4. CDO is not installed by default. Download and install and  don’t forget to give permissions to NETWORK SERVICE account.
  5. SMTP/ IMAP/ POP3/ FTP require ports to be opened in firewall
  6. For PHP also, turn on detailed error logs by
    %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpErrors -errorMode:Detailed

Thursday, August 06, 2009

Checking space used by SQL Tables and reorganizing those

SET NOCOUNT ON
/*DATABASE TABLE SPY SCRIPT
Micheal Soelter
1/24/03
DESCRIPTION
Returns TABLE Size Information
SORTING USAGE
@Sort bit VALUES
0 = Alphabetically BY TABLE name
1 = Sorted BY total space used by TABLE
*/
DECLARE @cmdstr varchar(100)
DECLARE @Sort bit
SELECT @Sort = 1 /* Edit this value FOR sorting options */
/* DO NOT EDIT ANY CODE BELOW THIS LINE */
--Create Temporary Table
CREATE TABLE #TempTable
( [Table_Name] varchar(50),
Row_Count int,
Table_Size varchar(50),
Data_Space_Used varchar(50),
Index_Space_Used varchar(50),
Unused_Space varchar(50)
)
--Create Stored Procedure String
SELECT @cmdstr = 'sp_msforeachtable ''sp_spaceused "?"'''
--Populate Tempoary Table
INSERT INTO #TempTable EXEC(@cmdstr)
--Determine sorting method
IF @Sort = 0


BEGIN
--Retrieve Table Data and Sort Alphabet
-- ically
SELECT * FROM #TempTable ORDER BY Table_Name
END

ELSE


BEGIN
/*Retrieve TABLE Data AND Sort BY the size OF the Table*/
SELECT * FROM #TempTable ORDER BY CAST(SUBSTRING(Table_Size,1,CHARINDEX(' ',Table_Size,1)) AS INT) DESC
END

DECLARE @TableName varchar(100)
DECLARE TestCursor CURSOR FOR SELECT Table_Name FROM #TempTable FAST_FORWARD
OPEN TestCursor
FETCH NEXT FROM TestCursor INTO @TableName
WHILE @@FETCH_STATUS = 0 BEGIN
DBCC CLEANTABLE(0, @TableName)
FETCH NEXT FROM TestCursor INTO @TableName
END
CLOSE TestCursor
DEALLOCATE TestCursor

--Delete Temporay Table
DROP TABLE #TempTable

Saturday, August 02, 2008

Updates about me

Recently one of my friend suggested me to split my blog into Hindi and English version. Although his idea was good considering the fact that audience is different but my question is - isn't blog like a personal diary? How many people are really treating it like that? Anyways, regardless of that, I've created a new blog durlabhjain.blogspot.com where I'll be posting my Hindi entries and this blog will continue to be more about my technical/ professional learnings...

Monday, July 28, 2008

वक्त!

अकेला था, अकेला हूँ, अकेला ही जाऊँगा,
करता फ़िर रहा जो इकठ्ठा कहाँ ले जाऊँगा
सब यहीं पर था, यहीं पर है, यहीं रह जायेगा,
शायद ही किसी को मेरा नाम याद रह पायेगा!
मगर फ़िर भी इच्छा यही है की इस को, उस को, और न जाने किस किस को अपना कह सकूं मैं,
इसी इकठ्ठा करने की एक अजीब सी कशिश में, क्यूँ न ख़ुद को खुश रख सकूँ मैं!
पैसे का क्या वोह तो आज अगर मेरी जेब में तो कल किसी और की जेब में जायेगा,
अरे मन इतना समझ ले की यह जो वक्त बीत रहा है ये न फ़िर वापस आयेगा!!

दो पंक्तियाँ

ना पूछो मुझसे की ये मुझको हुआ क्या है
जानना है मुझको की बता ए वक्त तुझमे छुपा क्या है?
क्यों यूँ तिल तिल कर के खोलता है परत दर परत,
क्यों यूँ हमेशा आस देता है तू पल पल, की होगी सुबह जल्दी से
बस इस बदलने की आस में यूँ बिताता हूँ में अब हर एक पल
शायद आज से अच्छा ही होगा जो आने वाला है कल!
समय के इस फेर में मैं भूल सा गया हूँ की आज की भी कितनी महत्ता है
जरा सी देख की मुश्किल यह दिल कुछ ऐसे बहकता है
संभाले नही संभलता, आंसू आ ही जाते हैं बस आँखें साथ नहीं देतीं
कब का छूट गया होता साथ इस जिंदगी का जो उम्मीद मेरा दामन थाम नही लेती!
अब जब थामा है हाथ तो बीच मझधार में मुझे छोड़ ना देना
मेरा जो कल अच्छा होने का सपना है वो तोड़ ना देना

Saturday, July 12, 2008

Hyperlink Column in ASP.NET

By default, hyperlink column doesn't allow using Javascript. For this, I inherited from BoundField to have more control.


Public Class HyperlinkBoundField
Inherits BoundField
Public NavigateUrlFormatString As String
Public NoLinkValue As String

Public Sub New()
MyBase.New()
End Sub

Public Sub New(ByVal field As BoundField, ByVal noLinkValue As String, ByVal urlFormat As String)
Me.DataField = field.DataField
Me.HeaderText = field.HeaderText
Me.HeaderImageUrl = field.HeaderImageUrl
Me.SortExpression = field.SortExpression
Me.NoLinkValue = noLinkValue
Me.NavigateUrlFormatString = urlFormat
End Sub

Protected Overrides Function FormatDataValue(ByVal dataValue As Object, ByVal encode As Boolean) As String
Dim value As String = MyBase.FormatDataValue(dataValue, encode)
If String.IsNullOrEmpty(value) OrElse value = NoLinkValue Then
Return value
Else
Return String.Format(NavigateUrlFormatString, value)
End If
End Function
End Class

Saturday, May 10, 2008

ASP.NET - I'm starting to loose love for it!!

I have been swearing by Microsoft Technologies since CA took over Clipper and then dumped it!!! Clipper used to by a bread and butter language for me until 1995 (2 years after CA dumped it). At that time, I had a terrible time on deciding which way to go. Delphi was quite popular and was quite similar to Pascal and then there was VB! I decided that considering Microsoft's might, Microsoft won't easily dump its product. Anyways, Microsoft left its VB coders way behind after VB 6.0. VB.NET was similar but strikingly different as was. It was a new learning but ok - a gradual change. But then there was a promise of platform independence and I was lured by it! Web was getting more and more popular and developing applications in VB.NET seemed to be much faster/ easier than ASP. At-least it was more structured and much more testable with lots of compile time checks. Initially it looked like that continuously increasing build times even for small changes were a small sacrifice in face of structure. However, as I went deeper and deeper it seems that even trivial tasks are not that easy because of Microsoft's decision to take the web development to event driven applications. Numerous times it has happened that it has become difficult to understand what is happening during which event (in the framework) and without a tool such as reflector, it would have been impossible to resolve lots of issues we had in many of the applications. Some of the recent issues I've faced are:
  • URL Rewriting: Ok. It might not really be a .NET thing and IIS thing but unfortunately .NET doesn't run on Apache. Features that apache's mod_rewrite has been providing for so long are still difficult to achieve in IIS.
  • SetMaxAge for caching: Unfortunately, whatever value I set, it sets it to Zero. Refer to http://msmvps.com/blogs/omar/archive/2006/08/02/cache-control-header-cannot-be-set-properly-in-asp-net-2-0-a-solution.aspx
  • Removing a cookie from Cache: I thought it would be easy enough!!! Just set expiry of the cookie to a past date and you should be fine! In fact, I needed to remove all the cookies starting with "custom". The way I went ahead is...


HttpCookieCollection cookies = Request.Cookies;
for(int i=0; i<cookies.Count; i++) {
HttpCookie cookie = cookies[i];
if(cookie.Name.StartsWith("custom") {
cookie.Expiry = DateTime.Now.AddYears(-1);
}
}

  • seems cool? No. turns out that if you modify cookies in Request, it doesn't help. You have a Response.Cookies collection as well. Unless you add a cookie to Response collection, it won't be sent to client and hence client will not know you changed the cookie. Anyways, I added a couple of statements to add cookies in Response collection. Then, another problem. When you add a cookie to Response collection, it gets added to Request collection as well!!! Another issue. So, as many people suggest, I had to take another variable cookieCount before the loop to avoid an endless loop! What a waste of time for simple Cookie manipulation that was so easy in languages such as PHP, ASP etc. etc.
There are lot more things that I'm discovering on daily basis. However, then my biggest worry is about MVC architecture that's becoming a lot more popular in ASP.NET again leaving me wondering how long will Microsoft continue to support the original ASP.NET Page Model? I doubt it'll take long before Microsoft will have to decide the model it wants to support!!

All this has been forcing me to re-think my strategy and look back at PHP, ASP or Ruby on Rails to get sanity back to development as most of the front-ends have actually moved to HTML and JS and these languages just handle the server side manipulation. Wait for a few more days and you might see me changing my framework to PHP!!!

Saturday, May 03, 2008

दीवाना हमें बताती हैं!

दिखाती हैं नखरे, दिखाती हैं अदाएँ,
लड़कों को अपने पीछे घुमाएँ
मगर आयें पीछे तो दूर भगाती हैं
दीवानी ख़ुद हैं और हमें दीवाना बताती हैं!
पहने कपड़े सेक्सी सेक्सी, फिर स्टाइल में चलती हैं
दिखाने को importance अपनी, हर पल अदाएँ बदलती हैं
देख के अदाएँ सीटी बजायें हम जो, लफंगा हमें बताती हैं
दीवानी ख़ुद हैं और हमें दीवाना बताती हैं!
पहनें sandle हील की ऊँचे, ख़ुद नागिन सी लहरायें,
देख के सेक्सी पतली टांगें लम्बी, जो कोई पीछे आए,
कभी कभी तो पब्लिक में ही, पब्लिक से पिटवाती हैं,
दीवानी ख़ुद हैं और हमें दीवाना बताती हैं!
काले काले नैना इनके, नजरें हैं मतवाली,
लगे इन्ही में है दुनिया सारी, जब तक न बने ये घरवाली,
फिर घरवाली बन के सुबह शाम ये, हमको यूँ सताती हैं,
जान बूझ के फंस जाते हैं हम, ये ऐसा हमें घुमाती हैं,
दीवाना बनाती हैं ख़ुद हमें और दीवाना हमें बताती हैं
और जब लिख दें ये जब ब्लॉग पर तो हम पर खूब चिल्लाती हैं,
दीवानी ख़ुद है और हमें दीवाना बताती हैं!

Tuesday, February 19, 2008

SQLite - A cool database engine

Since last year or so, I've been exploring SQLite as a database engine for couple of small apps for personal use. I must say, I'm impressed by this little engine so much that I sometimes curse myself... why didn't I find it earlier :)