| Design |
| UML Guide |
| Patterns |
| Coding Guideline |
| Error Code / Handling |
|
|
|
|
|
| Debug |
| VC++ Tips & Tricks |
| WinDbg |
|
| Tools |
| Doxygen |
| CVS Source Control |
| CVS GUIs |
| WinDiff |
|
|
|
|
| Windows/Linux C++ Developer |
Welcome! My name is Rajinder Yadav and I am a Computer Scientist living in Toronto, Canada. I cut my teeth in the discipline in grade 5 with the Pet Commodore and made it official at the University of Toronto where I graduated with a degree in Computer Science. I am currently working at McAfee Inc. as a Sr. Computer Scientist where the work is both challenging and rewarding.
My passion is focused in Software Architecture and seeking out new methodologies to help me in the design, analysis and development of efficient software. To reference some of my previous work and technical writings you can scroll down to the 'Sample Projects & Articles' area.
Here is my PGP Public Key, use it to verify any software downloads from this site! For more information on the GNU Privacy Guard, visit http://www.gnupg.org
Multi-Platform Development
Being a true Windows C++ developer, I've decided it's time to broaden my C++ expertise and focus on becoming a multi-platform developer. Already having a good understanding of Linux and the tools available on this platform I decided to setup a Linux developer's Workstation, was happy to find out I could still have a dual-monitor setup.
I already ported the core engin of my UnitTest Framework project over to Linux, the only thing left to do is code a GUI unit test observer. I am trying to find any material I can get my hands on about cross-platform development while crafting my own notes. I've read, "Write Portable Code: An Introduction to Developing Software for Multiple Platforms" by Brian Hook which does a good job of identifying what to look out for. The best way is just to get your hands dirty and make excellent notes along the way.
To get some credentials I am currently shopping around for an Open Source project as a volunteer, looking for something cool like peer-to-peer networking, anything with distributed networks and databases. It would be taking paralleling processing to a new level. With consideration made for learning about how high availability systems are architected.
Intellectual Property and Rights
You are free to use and modify the source code provided on DevMentor.org. However you are not permitted rights to redistribute any original or modified work without written permission from the author and copyright holder. I will grant permissions to use, modify and distribute the code within an organization or institution for internal use. This is to insure that DevMentor.org will remain the primary source of the information it generates and that others may not profit from what is being provided for free.
Linux on Windows! - My Adventure with coLinux
First off, I am a software developer, not a hacker!!! In my early efforts to make inroads with Linux again, I discovered coLinux(Cooperative Linux) which lets any Linux distro run on Windows as a virtual machine! TopologiLinux puts coLinux + Slackware Linux together to allow you to run Linux on Windows. Once you get the XServer configured, you can use KDE, GNome or the other Window Managers through a VNC client.
Warning! If you plan to try this out, expect a lot of work and reading. The forums are not active so you will need to do most things by yourself, and you know how fun that is, right! Also back up your drive!!
Good News, I had TopologiLinux working with a Window Manager!
Bad News, I decided to reinstall everything and I couldn't get VNC to connect to the coLinux virtual Linux ever again, which I suspect is a bug with coLinux! TopologiLinux is using coLinux v0.6x, the connection problem might be fixed with the latest release, but I gave up on it since you can't simply update coLinux. Also, there is no easy way to install a fresh distro of Linux on coLinux, the wiki help pages are cryptic so you will need to live with a few zipped packages that are supplied by others. I am a (loyal) Slackware kind of guy, if you want to learn more Linux than normal this is the way to go! I just wish the Open-Source community putting in the effort to their projects would write better documents. If I can get any of the project gurus to help me, I will create a document that people can read and follow. I've sent the respective people an email, I'm guessing my emails will most likely get ignored, or get deleted by their spam filter!
I finally ended up installing Slackware 12.0 on VMWare on my Laptop and at home on my desktop I have Slackware 12.0 running on a separate partition. Infact since my desktop is a bit old (running on a AMD 1000 GHz processor with about 384MB of RAM), I opted out to make it a dedicated Linux Workstation. Unfortunately Microsoft is going into the direction of making there OS consume lots of HD space as well as being resource intensive. I'm trying to do my part to stay green and hold off on upgrading to a new system for as long as possibly, there is just too much junk going into the land fill that a lot of people just don't take the time to consider.
Please make a small donation if you find this site useful. Your money goes to help keep this website operating.
|
|
| Rich Error Logging Tools |
I have been working away on a set of tools that development managers, developers and QAs will love to have. It makes creating, logging and diagnosing application error effortless. No more having to comb through reams of cryptic log files, or resorting to the use of the dreaded printf( ).
It begins with the Error Editor that lets developers create rich error codes containing descriptive error information. Error codes can be categorised allowing each project or development team to control their own errors. The error codes are guaranteed to be unique because they are saved to an Error database file. The database file is compact, easy to maintain and resides on a single file making it very portable.
Once the error codes are created, the Error Editor will generate a C++ header file containing all the error codes to be included in your projects. There are a few simple to use error logging macros that take care of error reporting.
The error logs can be obfuscated to protect critical company technical information. Moreover since the error database is separate from the application error log, the error codes in the error log will not mean much to the end user if they should open these files.
The error log will report the following items:
- Proc ID
- Thread ID
- Application Executable Name
- Module Name if error is from a DLL
- Error Priority (Critical, Error, Warning, Debug)
- Error Category
- Error Code
- Application Directoy Location
- Module Directory Location
- Source Filename and Line Number
- Date
- Timestamp
- Custom Message
Finally there is the Error Log Monitor that lets you view the error and all the rich error information required by a developer to quickly diagnose an application error. Any Win32 error code that is logged will have it's descriptive error message displayed so there is no need to duplicate these error codes using the Error Editor. Currently you can execute SQL statements to filter the error log if you wish, but I plan to add support for simpler commands to do this for non-SQL savvy Users.
I plan to make these tools available soon, once I find time to learn how to use a MSI based installer.
|
|
| UnitTest - The C/C++ Source Code Unit Test Framework! |
UnitTest was developed on the principle of keeping things simple as possible.To that point, the source code testing framework was made to allow the developer to easily write black-box unit test cases.
To make life easier, I also created a utility that generates unit test class source code. The entire project is really tiny and is designed to build and run out of the box! You should be able to get going within 5 mins. I have also provided two sample projects for you to play with in the package.
Read the UnitTest Guide and see for youself how easy it is!
If you are not familiar with what Unit Testing is, here is a very short description.
Architectural notes and UML diagram. This information is provided for developers who may want to extend UnitTest, create their own Observer or simply want to see how it works. You don't need to know any of this for writing test cases and testing!
Note: C++ UnitTest was made using Visual Studio 2005 to build in "Unicode". Make sure your project can cleanly build in Unicode, if you're not doing this already it's a good time to do it now. All projects build cleanly at the highest compiler warning level. You will need the 7-Zip utility to unzip the project files.
Download Complete Source (v1.3)
PGP Source Code Signature File
Release (Jan 27, 2008)
Change Log
Project build notes
Update: Jan 27, 2008
UnitTest now supports runtime configuration of unit test inputs using a XML file. More information can be obtained by reading the updated UnitTest Guide.
Update: Dec 12, 2007
There is a new treeview selection dialog that allows individual test case to be selected, this was not possibly with the previous release. Changes to the core have also been made to work with Functors. Once I've tested the new build I will repackage it and make it available for download. After this release my focus will be on cleaning up the architecture and then mock class testing.
C++ UnitTest MockUp Framework
Nov 5,2007 - I have begun to explore mock-testing and ways to code mock-up classes to get beyond the limitation of today's unit testing frameworks that fail miserably at being able to test real-world production code. When it comes to unit testing classes that use encapsulation as well as other complex class structures, most unit testing framework fall short. At least I am not aware of any that do this successfully and painlessly while allowing the developer to re-factor existing production code to a unit-testable one.
Here are my initial design notes. I am trying to think of a way I can use some type of plug-and-play design pattern as well as simple builders to construct various mock-ups. It's difficult when I add the requirements that one must be able to take existing code and not modify it too much and be able to have 2 separate builds, one for production and the other for unit testing all with a simply compiler switch.
I've got something working using auto-pointer and class factory OOP/OOD techniques, but it's just a start. My current design allows the developer to select between a mock-class and the original implementation class when constructing a unit test. I have also extended "UTGen" to generate the Factory class source code to be used both by production code and in unit testing.
Generating Mock Classes
The final stage for me is to find out how to parse a C++ header file and collect all the function signatures so I can generate the mock class framework, or some fancy tool.
Mock Class Generation & Parsing C++
Several people have suggested open-source projects I can look at, but it was Christoph Pesch's reply from the Doxygen-develop mailing list that gave me exactly what I was looking for. I am very grateful for his help! I would like to thanks everyone who took their time to help me with my search, to those on the Code-Project forum and those on the Doxygen-develop mailing list and my best friend Walter, Thank-You!
|
|
| Sample Projects and Articles |
Here are links to some personal projects and articles I have done in the past:
|
|
|
|
|
|
|
 |
|
|
|
|
| Comp. Sci. 101 |
| The Big-O |
| Data Structures |
| Algorithms |
|
| Data Structures |
| Data Structures |
| Stacks |
| Queues |
| Linked-List |
| Binary Tree |
| AVL Tree |
| B-Tree |
| Hash-Table |
|
| Algorithms |
| Sorting |
| Bubble Sort |
| Hast Sort |
| Quick Sort |
| Searching |
| Linear Search |
| Binary Search |
| Hash Search |
|
|