Author image

DLL & Linking Tutorial

A DLL (.dll) or dynamic link library (or shared library for *nix connoisseurs - .so for Linux and .dylib for MAC) is a library containing code and data that can be used by multiple programs at the same time. Dlls reduce the size of the executable and the memory usage of the operating system in general, since all applications just need to refer to a single place in memory to use a function in the library (instead of each application having its own copy of it).

Dlls help with separating concerns and reasoning about your code. It also serves for separate compilation, if we change the dll then we need to compile only the dll; the application code remains unaffected and unaware of the change (in this context it resembles the PIMPL idiom). It's worth noting that dll's are a little slower compared to static libraries (which are included in the executable/process), but that speed...

Author image

English Greek Dictionary C++ Program - Serialization

C++ console implementation of an English Greek Dictionary.

Depends on Boost serialization module which is included.

There is no Gui - everything is done in the console, for the time being.

Incomplete. There's a fatal bug currently I've yet to correct.

The tricky aspect of this program is proper support of UTF-8 and Unicode, which is a pain beyond imagination in Windows. Despite that I've managed to succeed (check this SO post -made by me- for this issue ), but I'm also victim of another obscure serialization error which I haven't had much time to dedicate to fixing it.

This is what it looks like. I provide a demo with some sample words.

Author image

Function Reference

My implementation of a functionRef/functionView variant. Why? I was desperate to find out just how std::function<> works. So I scoured the tutorials, books what have you, in order to find more information and ended up creating a sort of lightweight variant of it.

The keywords you need to know for this tutorial are:

  1. Type erasure.
  2. callable objects
  3. std::invoke
  4. higher order functions
  5. lambda calculus

We'll make references about everything.

Based on std::function, functionRef is a non-owning wrapper for an arbitrary callable object.

Implementation notes:

  • A primary template is used to match the complete type of a callable, say void( int, int ) or int. The primary template remains an empty struct.
  • We want to differentiate the function type Callable to its return type and argument...

Author image

The Game of Life

Here we've designed and implemented Conway's Game of Life, game algorithm; invented by John Conway in 1970. The rules of this 0-player game (a video game playing without user input) are:

  1. Any live cell with fewer than two live neighbors dies, as if by under-population.
  2. Any live cell with two or three live neighbors lives on to the next generation.
  3. Any live cell with more than three live neighbors dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.

The motivation for this project was to become familiar with parallel computing primarily on the CPU, but also on the GPU which utilizes the stream processing paradigm.


There are 6 different implementations:

  1. Serial
  2. Serial with OpenMP
  3. MPI
  4. MPI with OpenMP (aka Hybrid)
  5. NVidia CUDA...

Author image

Process Hacking (COD4) Tutorial

Generic Windows process hacking application. This time the victim being Call of Duty 4 (the original).

What do we mean by hacking? Hacking is gaining access to a system in a manner that was not intended by its developer.

Here we do something really really simple and easy. We will change some on screen visual values in our program.

A. We find the process' HANDLE. There are 2 ways to do this.

I. By getting the window Handle (HWND)

  1. HWND windowHandle = FindWindowW( nullptr, processName ) to get the window handle
  2. GetWindowThreadProcessId( windowHandle, &pid ) to get the pid
  3. and finally OpenProcess( PROCESS_ALL_ACCESS, false, *pid ); to get the process Handle

This is the method I use in this example.

II. By taking a...

Author image

Hibernate Object Relational Mapping (ORM) Tutorial

Hibernate is a Java open source, lightweight & performant ORM framework that simplifies the development of Java server applications when interacting with a database. ORM stands object relational mapping. It maps between an Object oriented language (Java here) and a Relational language (SQL), to execute database queries in an OOP way rather than using SQL.

This demo provides all you need to get setup in Java with your database queries. The main pieces of code are 4 .java files in src\main\java\ directory. The queries are database independent though and they can work no matter the database backend. I've tested this to be true on MySQL and SQLAlchemy. This is accomplished by HQL (Hibernate Query Language) the object-oriented version of SQL which Hibernate converts to SQL under the hood.

Author image

Hooking Tutorial

Here you will learn about this ancient miracle cure called Hooking. Our ancestors used hooking to catch fish! No just kidding, lets get to it..

Before we head straight into it, I'll provide a little introduction to the Portable Executable (PE) and explain its various memory sections. Don't skip it; its understanding is crucial to get to the next part.

The Portable Executable (PE) format is a file format for executables, object code, DLLs, FON Font files, and others used in 32-bit and 64-bit versions of Windows operating systems. It is a data structure format that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code. This includes dynamic library references for linking, API export and import tables, resource management data and thread-local storage (TLS) data.

The Extensible Firmware Interface (EFI) specification states that PE is the standard executable format in EFI environments. On NT...

Author image

Install Python Packages script

Merely a handy run-and-forget script that installs all python packages specified in a text file “packages.txt”. I've used it countless times. Press a button and let the console ASCII text flow!

You will more than likely need to run the script (or Visual Studio if you're using that to run it) with administrator privileges, otherwise you'll be denied permission to install packages.


  • Python 3.x version installed (only tested with 3.5 and 3.6.6)
  • Latest pip version for the specified python version installed

I've used Windows 8.1 x86_64, Visual Studio 2017 IDE with Python tools and Python 3.6.6 interpreter.


Github repository link.

Author image

Chat Room in Java

A basic Server Client application written in Java 8 with JavaFX (for a change).

You have to first fire up the server and then launch as many clients as you desire.

Then chat between the client and server through their respective windows.

Everything is modular, the code is bare-to-the-metal, short and documented.

Author image

Key Audio Player

Minimal audio player made using QT.

I made this while learning about the QT framework.

That's about all.

1 2 3 4 5 ... 7