How to use my album script on your website

I assume you have very basic knowledge of HTML. There are quite a few steps to be followed:


1] Download the zip archive from this location and unzip it to a folder.

2] Get all your images into the ‘hh’ folder. You will have to resize all images to 640*480 for displaying. Also thumbnails of 100*75 are required. Put the thumbnails into same directory with a different name. You can use GIMP to do the job of creating thumbnails and Picassa to resize images to 640*480.

3] Once you have thumbnails and images, the fun begins. Now you need to get a Google Map key. Visit this site and register to get your 86 charactor Google Map Key. Edit the photoalbum.html page and replace the #######… in first <script> tag with your google map id.

4] Open the images.xml file in notepad or any XML Editor. It is this file that contains all important information. To find latitude and longitude you can search for the place in wikimapia. Move the desired location to the center of the screen for maximum accuracy. On the address bar you should be able to see something like http://wikimapia.org/#y=17991438&x=73027003&z=17&l=0&m=a . You can get the coordinates from this query string. Here latitude of place is 17.991438 and longitude =73.027003 . If you see closely you can even get the zoom !(z=17). Enter one tag for each image . Make sure that you entered the right paths for images and thumbnails. An example file is given here:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="images.xsl"?>
<images>
<image>
<path>hh/IMG\_3099.jpg</path>
<tmbnail>hh/IMG\_3099\_t.jpg</tmbnail>
<lat>17.991846</lat>
<long>73.027411</long>
<caption>Nice big mushrooms in the garden.</caption>
<tooltip>Somewhere here (I think!)</tooltip>
<zoom>17</zoom>
</image>
</images>

5] Do not enter any special charactors or line breaks into the text inside <caption> and <tooltip> tags. Right now the script is unable to handle it and produces errors.

6] Now upload all the files to your website , simple access the photoalbum.html file and your album should be working ! You can comment on this using email address specified in the FAQ section of the website or drop a comment.

No shortcuts for mastering OOP and GUI programming !

One of my prized possessions.

In my prior post, I described my daring quest of gaining admission to the Electronics Engineering program. We had to stay at my father’s friend’s house because the admissions procedure had been postponed until the next day. There, I discovered an excellent C++ book called C++ Program Design by Cohoon and Davidson.

There were several C++ books available on the market. What set it apart was that it came with a CD containing a library called EzWindows that included object oriented APIs for creating simple GUI programs for Windows. After my unsuccessful attempts at learning VC++ , I had been looking for literature to learn OOP and GUI programming. This book provided both. I didn’t waste any time in buying this book.

The authors did an excellent job of introducing newcomers to OOP. The EzWindows library aided me in comprehending real-world applications of OOP and creating some enjoyable projects. I wish I had discovered this book sooner.

The library itself was rather small. You could draw simple shapes and text. Some mouse events were supported, and later in the book there was a bug squashing game. The only thing it lacked was the ability to accept user input via a graphical user interface. Using the examples in the book, I constructed a maze traversal program that looked like this.

A simple maze traversal program written by me using EzWindows Library

It was basically invoked from the command line. It read data from a text file and navigated a graphical maze. It was a lot of fun!! The book helped me comprehend OOP and enhanced my knowledge of C++; it was one of the greatest books I’ve ever read!

Results, rain and a half hearted decision !

Engineering

My 12th grade results were announced. I had always wanted to pursue computer engineering, but my PCM (Physics-Chemistry-Maths) scores were not up to par (though they weren’t horrible). There was a lot of doubt and anxiety. My father was an optimist , h e always believed that I will make it to Computer Engineering. If I had applied to colleges outside Mumbai, I would have had a better chance of getting into Computer Engineering. My parents were concerned, we kept discussing every possibility, calling relatives and asking for advice from people.

The big day arrived, when the engineering entrance forms were made available. The form packet included a booklet with general information on various colleges at Mumbai University, and also prior cutoff dates for various courses. The most sought-after course was computers engineering, and the competition was intense. I had very little chance of getting into Computer Engineering, at least at Mumbai University. But then there was a twist, for some reason, the University had a 20-80 format. For Round 1, 20% of all college seats were available. If you applied and were allotted a seat, you could not apply for Round 2. This appeared to be a decent bet. We decided to be realistic, and instead of applying for the best courses at the top colleges, we applied for those that were somewhat lower on the list. After much consideration, I chose to maintain ‘Electronics Engineer’ as my secondary choice. So the forms for Round 1 were filled and submitted.

When the results of the allocation were released, I was offered the choice of enrolling in the ‘Electronics Engineering’ program at Datta Meghe College of Engineering. The best thing was that the college was close to my home, I could walk. The not so good part was that I did not get into ‘Computer Engineering.’ I decided to seize the opportunity.

I recall well the day me and my dad went to VJTI to complete my admissions procedure. Most graduates from the 2004 class will never forget that day. That day it rained like crazy. People had to walk through waist-high water to get to the admission office. Many people were unable to reach. Due to severe rains, the authorities postponed the process until the next day. Everyone’s issue was that they couldn’t go home due of the flooding. The fortunate ones had a friend or relative in the neighborhood. My father and I went to his friend’s house. We brought clothing and food before checking in.

The next day was considerably better after a rough night. The weather had cleared, and everyone was greeted by bright sunshine. We went to the center, I reconfirmed that I was option for Electronics Engineering. I was reminded that I wont be able to participate in second round. We paid the demand draft, got some sweets, and went back home.

The decision I made that day was one of the best I’d ever made in my life. I was drawn to Electronics Engineering since the course covered computer principles like no other, from transistors to gates to programmable ICs and devices. I can confidently state that my knowledge of electronics has aided me in developing a solid grasp of computer hardware and software. This was the start of a new adventure in which I learnt a lot and met a lot of amazing mentors!

The good old days of dial-up !!

Ever since my father got me a computer, I’ve been nagging him to get me an internet connection. Back then, the internet was considered a ‘luxury item’ rather than a need. The only internet service available was dial-up. This entailed paying for internet and phone bills, which were not insignificant expenses for a middle-class Indian family in 1999. But I managed to relate the internet access to my studies and persuade my parents to get it for me.

It was the 1999 monsoon season. I was in my first year of junior college at the time (11th grade). I recall my father and I riding on our scooter to Thane to get a modem. We had opted for an external model, simply because it had more LEDs, looked cooler and was easy to play around with. We went to a shop and bought the Dlink’s DFM-560E modem. I was so delighted and happy that I wanted to start browsing right away. But there were two critical actions I needed to do before I could use the modem:

  • Run a telephone cable from the hall to the room where my PC was kept.
  • Purchase an internet plan/dial-up kit.

I suppose it took a week to obtain the kit and complete the wiring. I was up till 2 a.m. getting everything set up. My uncle, who used to live next door, had also shown up for assistance. As things were being set up, there was a lot of excitement in our home. VSNL (now known as Tata Communications) was our Internet Service Provider . After many trials and errors, we were able to see the ‘connected’ status on our monitor. I believe the first website I viewed was www.indiatimes.com. There was a sense of accomplishment and joy all around. Our family had finally entered the ‘Internet Age’.

The next stage was for my parents to develop a ‘Internet Access Policy.’ Back then the internet was notorious among parents for reasons such as:

  • You can catch viruses through the internet
  • The risk of children getting engaged with bad company.
  • Horror stories about people receiving absurdly high landline bills.
  • Hackers breaking into your system
  • ..and many more

After a lot of debate and discussion, our ‘Internet Access Policy’ was formulated. This is how it looked like:

  • I was only permitted to use the internet for 1-2 hours on Fridays.
  • If my use surpassed our monthly budget, I had to stop using the internet.
  • I could only use the internet after 10 p.m.
  • No interaction with strangers or creating online friends was allowed.

I used to build a list of fascinating websites I wanted to visit each week. On Fridays, I used to spend one hour downloading these sites for offline reading. Disabling photos and media helped webpages load much faster, which was great for many sites. Emails were something I had to read for 10-15 minutes because they were not available offline. The two most popular browsers at the time were Internet Explorer and Netscape Navigator. It was still amazing how much data you could download with a 56Kbps connection. After Friday’s session, I had enough material to read for the rest of the week. Apart from educational purposes, there wasn’t much you could do with the internet back then. If I needed to talk to a buddy, I would call them on my landline because it was the cheaper and faster method to connect. Back then, social networking was only a developing concept.

For me, the internet was a knowledge multiplier. Finally, I didn’t have to restrict my extracurricular learnings to expensive books and magazines. There always was more stuff than I could read !

Height of overconfidence, I thought I could learn VC++ 5 in a month !!


I have a emotional connect with this CD. It came with the book Using Visual C++ 5 (Special Edition). I still remember the day when I walked into a bookstore in Dadar(Mumbai) with my father and asked him to buy this book for me. I had recently become comfortable with Foxpro 2.5, and my next target was Visual C++ 5, because I had heard that VC++ programers get paid like crazy. I still remember the surprised look the bookstore owner gave me when I enquired for this book (I was in 11th grade then). I don’t think he knew anything about programing, but he had definitely sensed the over-confidence in me. My dad just brought the book and we came home.

The next day, I started reading the book hoping to learn few things about VC++ quickly. But I was thoroughly disappointed. The book was loaded with reference to Win32 API ,MFC ,ATL ,ActiveX etc. , of which I knew nothing. I tried to read the book over and over again, but could not go past first few pages. It was very clear that I had made a huge mistake. There were no shortcuts here. I was missing some important background. I was thinking of returning the book. Before returning the book I thought I should open the CD that came with book. It had some five ebooks in it. One of them was Greg M. Perry’s C++ By Example. I skimmed through some of the code examples in the book, with hope that I will catch some VC++ syntax from the book, but VC++ was very hard to understand and still felt like a different programing language.

It took some more reading for me to conclude:

  • You can’t skip C++ and learn VC++. VC++ is not an advance version of C++ .
  • There is something called as Win32 API which is written in C. You simply won’t understand a word of VC++ without having some knowledge of Win32 API
  • OOP (Object Oriented Programing) is a big deal and a must have skill if I had to learn VC++
  • MFC, ATL and COM are still higher level constructs, which could take years to learn.

This was a big setback for a impatient guy like me. I started learning C++ from Greg M. Perry’s book. It only taught basic C++ and had one last chapter on OOP. I wasn’t enjoying writing console based applications, but I put lot of effort in learning C++.

Once I completed reading the book, I started searching for easy ways of creating GUI programs. I was even willing to learn a new programing language. This was when I got introduced to some very interesting technologies - HTML/CSS, JScript , TCL/Tk , FLTK , Ezwindows and .NET . I will discuss each one in detail in subsequent posts.

The summer of 1997 !!


It was summer of 1997, I was in the 9th grade. My father had promised to buy me a computer after the exams. This PC arrived when I was away at a summer camp. I was so excited to get back home and check it out. It was a Pentium machine, with 256 MB RAM, SoundBlaster card, SVGA display and a 80 GB HDD (I think!). They keyboard and mouse were top notch. So were the speakers, these were original Creative speakers. The CD-ROM had a slim remote which I loved. Initially we had a stabilizer attached to the system. After my first HDD went down we opted for a UPS. The printer was a Canon device, which my father was reluctant to purchase initially. I think we brought it after an year of purchasing the PC.

We did not have internet access for a couple of years. The best source of software were CDs that shipped with magazines like Chip and Digit. Back then I used to clean my PC every week. Everyone used to come to our house to see it. We (me and my brother) mostly played games on it for first few months. Then slowly I started learning programming on it. I couldn’t use it much during my 10th grade, as I had promised my parents I would concentrate on my studies. I made most of it after 10th board exams and all through the first year of my junior college (11th grade).