Home

Programming

During undergrad in electronics some years ago, I used to like writing small programs at home for fun. These are some of those programs. Most of them are in C/C++. Some are also in Java, Perl, PHP, Python, QBASIC, VC++, x86 Assembly, etc. Also included are a couple of programs that I wrote later, and a couple of class assignments for masters course.

Note to the employer: This list includes neither my work experience in industry/lab, nor my class assignments in Masters course in Computer Science. For a summary of that, see my resume.

These programs are copyleft with GNU General Public License (GPL).

Archived Old Rant (when I saw unix for the first time I came to the US): Staying in India and not being in Computer Science in my undergrad, I was not aware of Unix before; therefore, my programming was limited to Microsoft products. But recently I have been sitting quite a lot on Sun Solaris (Unix), and was instantly impressed by its commandline power, stability, security, reliability, performance, power, etc. Unix has a strange charm....its depth and flexibility will enchant anyone who is a bit computer savvy. I have been exclusively using Unix since then. I now feel sort of restricted and suppressed sitting in front of Microsoft Windows. If you have not tried Unix, I advise you try it for some time yourself. If you are the right kind, you will use it forever. It may have a small learning curve, but its just great. There are many free implementations of Unix you can try. The one I use is Redhat Linux 7.3. The Redhat Installation guide will be helpful during installation. To learn about Free Software, read the articles by Richard Stallman and others at this location.)


  1. Gothello - The Othello Player

    This program is to make a computer play Othello, an interesting strategy board game, against a human at a reasonable skill level.

    This project was submitted for a software competition in TechFest 2001 held at Indian Institute of Technology, Bombay.

    I wrote this along with one of my friends Milind Bandekar (manitoumilREMOVE@THISyahoo.com).

    To download and for more information, look at Gothello's page.

    Try defeating it...!

  2. MS-DOS Based VIRUS

    I had made a basic file Virus - it infects EXE and COM files, and is self-encrypted. Written in x86 assembly language on the MSDOS platform.

    Source Code

  3. Plot 4

    This is another AI Game Playing program. The computer plays the game of Plot 4 (Connect 4) against a human. Due to the simplicity of the game, its almost impossible to defeat the computer here.

    Executables: Windows/MSDOS
    Source Code
    (Requires egavga.bgi in the same directory)

  4. Inference Engine

    Here, given some knowledge base about a system, we will build an inference engine which will just use plain simple logic to infer whether any given statement is true, based on what information it already has.

    The information and questions are given as sentences, which are feeded to the program as logical statements. To parse and evaluate the logical statements, the program performs infix-to-postfix conversion using a simple language parser, and then postfix evaluates them.

    (This was for a class homework -- I am putting here so that I can refer to this later. I hope nobody is able to google this through.)

    Executables: Source Code

  5. Motion Segmentation program in Java

    This is a simple motion segmentation program, which uses simple logarithmic macro block search to find motion vectors, then congregates them into groups of macroblocks considering similarity in motion of adjacent ones, in effect roughly trying to identify moving objects in videos. Done as part of class. (hoping future students will not be able to google this through)

    Source tarball

  6. Amazone: A retail store website

    A retail store website, which has two interfaces, one for the end-user, and one administrative. The end-user can create a profile, login, browse and purchase products, checkout a shopping cart. The administrator can add/delete new products, generate sales reports, manage users, etc.

    This is written in perl, was an assignment for a web programming course. The same task was also written completely in PHP.

    Amazone(Live Perl Version)
    Perl Source PHP Source

  7. QBASIC DOS Programs: Menu-driven-resizable-windowing editor, TicTacToe, Graphics programs like Draw (a tiny MSPaint to draw shapes:lines, rect, circles, paint, store, load simple images, etc), BrainVita(with ability to design levels), Mastermind, Solitaire, Tetris, Bricks, etc

    I had written several small/medium sized programs for MS QBASIC (advanced BASIC) on MSDOS when learning how to program during my school days. Explore and enjoy.

    This ZIP file contains my programs as well as QBASIC binary for DOS/Windows. To run on Mac/Linux, use a free compiler like the one from qb64.net

  8. Genetic Algorithms

    This is an implementation of genetic algorithms to ants trying to cross the standard John Muir Trail by evolution. This is not finished yet, but pretty functional.

    A zipped file includes the source code as well as the executable, for Windows/MSDOS.

  9. Compression using Huffman Coding

    This is an implementation of Huffman Coding, used to compress and decompress files.

    Source Code

  10. Solving the 8-puzzle using A* algorithm

    This uses the A* algorithm (an excellent search algorithm) to find the optimal solution of the 8 puzzle. 8 puzzle is a square consisting of 3X3 tiles, and the goal is to find the steps required to reach a custom goal state, where a step is sliding of the tile.

    Executables: Linux/x86, Solaris/Sparc
    Source Code

  11. Expression Evaluator

    This evaluates expressions using a parsing algorithm.

    Executables: Windows/MSDOS
    Source Code

  12. Simultaneous Equation Solver

    This is a tiny utility in C++ to solve a set of simultaneous equations of arbitrary number of variables. Wrote in 20-25 mins.

    Executables: Solaris/Sparc Linux/x86
    Source Code

  13. Binary Tree Search for a node OR its successor

    This is a simple C program which will search for a node in a binary tree, and if it is not present, then will return the successor.

    C Source Linux executable

  14. Tiny BeanBox in Python

    This is a tiny python program to implement a tiny version of Java BeanBox.

    Source: beanbox.py button.py timedisp.py

  15. Tiny Stats Generator in Perl

    This is a tiny perl script which will write simple output to a file listing the times, hostnames, their geographical location, IP addresses, referrer URLs, browsers, etc information of your visitors.

    Source: stats.txt (rename from stats.txt to stats.pl)

  16. Game: Mine Sweeper

    This is a toy replica of the Windows MineSweeper game for MSDOS.

    Executables: Windows/MSDOS
    Source Code
    (Requires egavga.bgi in the same directory)

  17. Game: Brain

    Playing this simple game will sharpen your logical and analytical skills.

    Executables: Windows/MSDOS
    Source Code
    (Requires egavga.bgi in the same directory)

  18. Graphics: Crackers

    This is a small graphics display of exploding firecrackers.

    Executables: Windows/MSDOS
    Source Code
    (Requires egavga.bgi in the same directory)

  19. Graphics: Stars

    Travelling through stars.

    Executable: Windows/MSDOS
    Source Code
    (Requires egavga.bgi in the same directory)

  20. Logic/Mathematical puzzle

    The riddle is this -
    Two integers, m and n, each between 2 and 100 inclusive, have been chosen. The product, mn, is given to mathematician X. The sum, m + n, is given to mathematician Y. Their conversation is as follows:
    X: I don't have the foggiest idea what your sum is, Y.
    Y: That's no news to me, X. I already knew that you didn't know.
    X: Ahah, NOW I know what your sum must be, Y!
    Y: And likewise X, I have surmised your product !!
    Find the integers m and n.

    Executables: Windows/x86 Linux/x86 Solaris/Sparc
    Source Code

  21. Replacer

    This tiny utility can be used to replace text in binary files. Replace the author's name with yours!

    Executables: Windows/MSDOS
    Source Code

  22. Show Header

    To show header of DOS executables in descriptive terms.

    Executables: Windows/MSDOS
    Source Code

  23. Generate multiple files

    Trivial program to generate multiple files - just for record.

    C Source Linux executable

(This page has been visited times)


Last modified: Wednesday, 21-Sep-2011 01:37:27 EDT