Friday, December 24, 2004

MazeSolver

It was a difficult problem to find a shortest path in a 2D Maze. During my second year exams, I got a mail in which I was asked to write a program for this. I started to think but first no solution could come into my mind, but soon I thought that this could be done using graphs. The maze is similar to a graph, with every element of the maze (node) adjacent to its left, right, top and bottom nodes. After this I applied simple breadth first search to find the shortest path.

Matrix and Fraction classes

I always get confused when performing row operations in a Matrix. But matrices were a great portion of our Maths-III course, as well as our Economics’ Linear programming section. Hence I needed a program which could tell me at when I was doing mistakes. The solution was simple, just to download any matrix application. But the problem was that all matrix programs I got, worked on floating point numbers and in our class problems we have to consider the exact values using fractions. I therefore needed a matrix application which could show results in a fraction format, but I didn’t found any. At that time we learned how to represent real world objects in a programming language and we did the example of a fraction class in our OOP course. I further enhanced that idea and was able to develop a fraction class and later on, a matrix using the fraction class. I incorporated all my needs and it worked fine. Then I uploaded the classes on GotDotNet<www.gotdotnet.com> and other similar sites and yes, I was able to further improve my classes with the help of user responses. I finally posted two articles on CodeProject<www.codeproject.com> and user responses were wonderful. I finally thank all of those who were helpful starting from Sir Saqib Ilyas to Jeffrey, Marc and other fellows.

Second year in the university

There were two subjects related to programming in Second year: Data Structures and Object Oriented Programming using C#. Object oriented programming was taught by Sir Saqib Ilyas. He was a skilled teacher and told us the ups and downs of .Net framework and C#, from inheritance to polymorphism, from delegates to events, from Abstract classes to interfaces, from persistence(FileIO) to serialization, from Exception throwing to Exception handling, and many more. As a practice, I wrote my Fraction and Matrix classes to aid in mathematics problems. My final project was to develop an Address Book in C# which I did along with other group members.Data Structures was taught by Sir Zaffar Qasim. He was an experienced teacher and taught us useful stuff to enhance our programming skills, from Arrays to linked lists, from stacks to queues, from trees to graphs, from searching to sorting, and much more. I, after my exams, put Data Structures in practice by making a MazeSolver which finds the shortest path between two nodes in a 2D Maze.

First year in the university

In the first year of engineering, we were taught C by Madam Humera Noor. She was a nice teacher and introduced us about every element of C, from basics to advanced, from Text mode to Graphics, from structures to unions, from File IO to port addressing, from Pointers to variables to pointers to functions, and many more. I was able to make some logic games in C. As the final project of C, I made a Graph Plotter which was very appreciated by teachers and class fellows. The program inputs an expression from user and plots its graph in rectangular as well as polar mode. I further transformed the same program in VB also.

Some words about my programming in early stages

I started to do programming when I was 12. At that time, I used to program in BASIC. Then, I learned some COBOL by seeing my brother programming in COBOL and a little VB as well. When I was 16, I participated in the National Software Competition held by CSP(Computer Society of Pakistan) in collaboration with Phillips. Alhamdulillah, I got 1st prize in it. Then I was sent to Singapore by CSP along with two other fellows, Zeeshan Zia and Ashar Akhtar. We participated in the ISSC(International Schools Software Competition). That was a nice trip, although we could not get any good ranking there.

Thursday, December 16, 2004

My first message

Welcome to my blog. Here I will be posting my activities related to programming. Please check back soon.