Author image

Builder Design Pattern

An introduction to the important Builder design pattern. There is a nice example to make you go from Zero-to-Hero fast with this pattern!

The Builder pattern is designed to provide a flexible solution to various object creation problems in oop. We intend to separate the construction of a complex object from its representation.


It provides control over the individual steps in the object construction process st we can better customize object representation. The benefits of the builder design pattern really shine when we have big complicated classes.


It requires a separate Builder class for each type of such complex object and it makes dependency injection harder to work with since introducing many dependencies can get things out of hand.

Also it increases code size and almost doubles the amount of memory required since almost all variables (except...

Author image

Factory Design Pattern


Define an interface for creating an object, but let subclasses decide which class to instantiate.


The factory function is used to create an object of any type of subclass of a given class.
Instead of creating objects like this:

ObjectType* o = new ObjectType{args};

we create them like this:

ObjectType* o = newObjectType{args};

Where newObjectType is the factory function. Yes the factory is nothing more than a function for objects, typically a global function (not a method).


  • Create your class hierarchy.
  • The factory function returns one of several possible classes that share a common base class.
  • It's best to make the target class hierarchy constructors protected and make the factory function a friend of...

Author image

Alien Space Battle - Space Invaders lookalike Game

A 2d Space Invaders game clone.

I made this mostly for fun. To get more familiar with Python gaming I used PyGame module which hides all the down and dirty details and heads straight for the good stuff.

Author image

Memory Allocators Galore

I was always fascinated by memory allocation. Allocators are strange creatures in the C++ bestiary, but they are very interesting and understanding them provides you with a deep insight into the language's internals.

This is the culmination of my efforts creating some of the most popular memory allocators:

  • Pre-C++11 default allocator (DefaultAllocator project)
  • C++11 compatible allocator replacement (Allocators project)
  • C++11 compatible aligned allocator (AlignedAllocator project)
  • Tracking allocator (default + tracks allocations) (TrackingAllocator project)
  • Linear (aka Arena) allocator (LinearAllocatorproject)
  • Stack Allocator (StackALlocator & StackAllocatorTS projects)
  • Object Pool allocator (ObjectPool project)

They are designed to be cross platform and modern...

Author image

Archaic Browser

A minimal and barely functional Browser ftw!
Uses Java 8 and java.awt framework for graphics and windows.

There are many websites that don't even work, or they do work but it's too hard to use them.
It's kind of obsolete now. But it served me well when I was learning these things way back. The code is thoroughly commented out. Instead of leaving the project to rot on my dusty old disk maybe it will be helpful to somebody in some way.

Developed with IntelliJ IDEA on Windows 8.1 x86_64.

Author image

Buffer Overflow

This is a Buffer overflow tutorial using linux Ubuntu and C programming. There is full explanation and code in Greek only at the moment in “Nikos_Lazaridis_M1485_Project#2_ΥΣ13_ΕΑΡΙΝΟ_2017.pdf”. I may be motivated to translate this in the near future in English, especially If I get enough requests for it.

! During Buffer Overflow:
The ultimate goal of a Buffer overflow attack is replacing the return address of the vulnerable function with another one of our choosing. The latter function will have ASCII shellcode placed into it which, when executed will change the normal behavior of the program in a way that the attacker sees fit; the sky's the limit here (more like the imagination of the attacker). That moment where a single byte is written in the return address, in which the RIP register points to that is when “Buffer Overflow” occurs (at least in our context). The...

Author image

VHDL Decoder 3to8

This is a pretty old vhdl university project made with. Creating a decode 3 input 8 outputs in vhdl and simulating it in Altera Quartus II software.

I used Windows 8.1 x86_64 and Quartus II 8.1 Web Edition - Student Edition. You need to have Quartus II 8.1 Web Edition or higher to run it.

Author image

Code Injection

Code injection is a technique where you insert/inject a piece of code (your custom code) into a target process and then reroute code execution to traverse through your injected code. In a debugger (eg Ollydbg) we search for “code caves” (DB 00 in Ollydbg) i.e. memory regions big enough to store our code. But we can also allocate more memory in the application to store our code as we will do here.

One of the best ways to inject code is via dlls, because they are meant to be loaded by multiple processes at runtime.

Let me just dll you a story Mr. Process…

Minimally, we need:

  1. injector process - DLLInjector project
  2. the process to inject - ProcessToInject project
  3. the dll to inject - dllToInject project

Now the injector will grab the dll and inject it into the process to call custom code.


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. Boost serialization module is included. Sample words provided. No Gui - all in console atm.

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

It's what it looks like. I provide a demo with some sample words.
Basically messing with C++ Boost serialization.

1 2 3 4 ... 6