News

bottom corner

Home

The purpose of this site it to document projects that I work on in my spare time.
It is a collection of diverse projects undertaken to explore concepts and techniques in an effort to continuously learn about emerging technologies.

Windows Development

Checkers Lite 2 (get link)

Description

Part of my employment application process at Blizzard Entertainment was a programming test:
 I was tasked with creating a game called "Checkers Lite" within 4 hours using C++.

In order to complete the project on time I chose to interact with the game in a DOS window.
The game worked, but it could have been better... much better !

Subsequently I challenged myself with "how much time do I need for an awesome version?"
What you see here is the result of exactly 20 hours of work :

  • 1) I started a new C++ application project utilizing MFC
  • 2) Re-used most of the code, i.e. AI, move checking, win checking, end-of-game checking
  • 3) added graphic resources, drawing routines, and events

Requirements

Windows XP or newer

Programmed in

C++

Technology used

MFC, Windows GDI

Screenshots


Game rules are shown


A new game is started


Human played first (white), Computer played second (red)


Example of agressive AI: the computer captured two pieces


Example of defensive AI: it moved a piece from the back


Example of agressive AI: the computer captured three pieces

Download

[Executable_Win32(167KB)] [Source_Code_VS2008(87KB)]



Remote Diagnostics Framework (get link)

Description

Remote Diagnostics are incredibly useful ! To be able to diagnose a failing system from a remote location can save a vendor's reputation as well as thousands of Dollars of traveling costs.

This is my implementation of a fully encrypted, multi-threaded, event-driven remote diagnostics server.
It can serve multiple users at once and due to the use of multiple message queues can execute tests simultaneously i.e. one test per message queue.
Therefore, a technician who wants to test "Hardware A" doesn't need to wait on the technician currently running a memory test on "Hardware B".

My core requirements: high efficiency, high performance, easy to add additional diagnostics modules, encrypted communications.

Since this is production-quality code, and due to the strong likelihood of this code being used without credit, I am not releasing the source code.

Requirements

.Net Framework 3.5

Programmed in

C#

Technology used

TCP, WPF, Threading, Queues

Technical Details

When the client establishes a connection with the server, a "SYNC" token followed by the first half of the random password is transmitted to the server.
The server then responds with a "SYNC" token followed by the second half of the random password. The two password halves are transmitted unencrypted and can be captured (my screenshots show that I used CommView).
Once the client and server have established a complete password all communications is encrypted using Rijndael encryption.

Note that security is not compromised if the entire password is captured because a hard-coded salt is used in the encryption process and the salt remains unknown.

Security could be further boosted by generating a random salt and additional random passwords, in an iterative process, each time the client and server successfully sync.

Screenshots


Three clients have established a connection and have done tests


Process Explorer showing the TCP connections


The server detects when clients disconnect


Connection step 1: client sends SYNC request


Connection step 2: server responds with SYNC


Password is established; all client requests are encrypted


Password is established; all server responses are encrypted


Server backbone: the message queue design

Download

[Executable_Win32(16KB)]



The Bank (get link)

Description

Mention the word "Bank" and the first thought might be "Database". This project demonstrates the use of SQL Server Compact Edition to implement a simplistic database.
SQL Server Compact runs on mobile devices as well as desktops; since I enjoy working with mobile devices, the prospect of porting my app motivated me to develop this project.

Note: Working with SQL Server Compact is a snap because it's not even necessary to set up a server.

Requirements

.Net Framework 3.5
SQL Server Compact 3.5

Programmed in

C#

Technology used

SQL Server Compact, WPF

Technical Details

Basic requirement for this project: implement the project in such a way that as much code could be re-used as possible
Therefore, the project is implemented in three layers:

  • 1) topmost layer: UI and associated events
  • 2) middle layer: data access implementation specific to this project
  • 3) lowest layer: generalized low-level data access routines for SQLce databases

As a result of the requirement above, the lowest layer can be completely re-used for any SQLce project

Screenshots


Application is launched


The manager creates an account


The teller searches for the account


The teller is about to withdraw from the account


The teller generates a statement


The teller made a deposit and generates another statement

Download

[Executable_Win32(13KB)] [Source_Code_VS2008(31KB)]



Inter-Process Communication of WPF Applications (get link)

Description

Developers have utilized the WM_COPYDATA message to perform IPC between Windows Forms for many years now - but WPF is new and tweaks receiving the WndProc.

If you're going to update your existing Windows Forms applications to make the switch to WPF but retain the use of WM_COPYDATA and the SendMessage API then your code will require some updating as demonstrated in my example solution

Requirements

.Net Framework 3.5

Programmed in

C# and VB

Technology used

WPF, Windows API

Technical Details

Basic requirement for this project: implement IPC in such a way that any size message, String or Binary data, can be sent and received.

There are many IPC code-examples online but they typically show how to send fixed-length or string-only data.
I considered string-only or fixed-length data far too limiting for IPC and solved the problem by using the wParam to transmit the data type

My demo solution contains three projects: an IPC DLL (C#), a sample C# WPF application, and a sample VB WPF application
The two WPF applications use the DLL to send and receive WM_COPYDATA messages.
My intention of implementing a DLL was to eliminate duplicate code.

Since IPC is generally insecure, the DLL could be expanded to encrypt and decrypt messages. This would make intercepted data useless and the receiver would not be susceptible to false messages.

Screenshots


IPC in action

Download

[Executable_Win32(13KB)] [Source_Code_VS2008(40KB)]



Embedded Development

Texas Instruments TI89 Calculator (get link)

I've developed programs that make Engineering easier (such as graph signals of a LTI system !).
Ticalc.org shows screenshots of each program by clicking the icon to the left of the ZIP archive.

Windows Mobile (get link)

If you use Math Tablet and work with Matrices, you'll love my add-on functions. They are also available here.

Inversion (get link)

Description

After I bought an iPaq in 2004 I was amazed at the power of the device; it had wireless internet access, enough RAM to store MP3's and could port documents between PC's. From that point on I knew that mobile devices had a future as more than a phone.

I was determined to make a game for my new toy and I was pleased to discover that Microsoft made development easy with the "eVC" IDE.

PocketHAL was used for the graphics engine, and Hekkus for the sound engine.

To make the animation I used 3D Studio Max (major overkill), and to arrange the UI I used Adobe Photoshop. Additionally, I created a couple of development tools to speed-up development.

It is a puzzle game, and the purpose of the game is to remove the black marbles through the process of iterative inversion. Two modes are available: strategy and timed.

Requirements

Pocket PC with an ARM processor and Windows Mobile 2003

Programmed in

C++

Technology used

PocketHAL, Hekkus

Screenshots


The Title Screen


Starting a new game; the player decides on game settings


Player is about to perform the first inversion of the game


The second inversion of the game is about to happen


Third inversion


Last inversion of level 1

Download

[Executable_WM2003_ARM_PPC(1.5MB)]



Ultimate Inversion (get link)

Description

After purchasing an HTC Evo, I proceeded to convert Inversion to the Android platform. I had never used Eclipse or Java, so this was an interesting project.

To facilitate the game, I made use of AndEngine for the (openGL) 2D graphics.

I re-used the ball/marble animation (enlarged due to the higher resolution) of the original Inversion but added a lot of new content that I generated with Adobe Photoshop.

Gameplay remains exactly the same as in the original Inversion

Requirements

Android 2.1 or 2.2 smartphone with an 800x480 display

Programmed in

Java

Technology used

AndEngine

Screenshots


The Title Screen, Gameplay, Options


Tutorial, Highscore

Video

Download


Link of Demo version on AppBrain (PC), QR-code for Google's Market (Android)


Link of Paid version on AppBrain (PC), QR-code for Google's Market (Android)



Miscellaneous

Samsung SyncMaster 2232BW: fixing flickering video / flashing blue power button (get link)

Description

For a few months my Samsung SyncMaster 2232BW had exhibited the following symptoms:

  • 1) Initially: after turning it on, the video / picture flickered for a few minutes and then operated as usual
  • 2) Followed by: the power LED turned on but without video, after a couple of minutes the power LED turned off. Afterwards, if the power button was pushed soon then step #1 was exhibited
  • 3) Finally: once the power button was pushed, the blue LED just blinked. The monitor would no longer show any video

After step #3, the monitor would have been replaced by most people, instead, I fixed mine with the following method ...

Tools required

Flat-head screwdriver (or a blunt butter knife)
Philips-head screwdriver
Soldering Iron
Flux
Solder
Solder Wick

Parts required

up to five 820uF, 25V, electrolytic capacitors
one 330uF, 25V, electrolytic capacitor

Disclaimer

By following this tutorial you are taking complete responsibility for anything that happens.
This tutorial is aimed at people who are experienced with electronics.

Tutorial


1) Monitor with the back cover removed


2) Disconnecting wires


3) Disconnected module containing the power supply


4) Getting to the power supply circuit board


5) Top view of broken power supply


6) Side view of broken power supply


7) Top view of fixed power supply


8) Side view of fixed power supply



bottom corner


Free web hostingWeb hosting