Hobby and Open Source Projects
Attendance and studying at MSU used to consume plenty of time,
not leaving much for personal projects. Therefore, hobby projects at
that time were usually derived from university projects.
CG: Image Editor
The task was to develop an image editor with a set of
well-known filters and ability to change their settings and limit
their application to a rectangular mask.
The application was written in C++; Qt4 framework was used for
CG: Pedestrian detector
The task was to develop a pedestrian detector. The detection
algorithm was suggested to apply SVM over HOG descriptors to a
one-dimensional sliding window.
The application was written in C++; Qt4 framework is used for
GUI; liblinear was used as an SVM implementation.
CG: Animated OpenGL Clock
The task was to develop an animated 3d clock demo using OpenGL 1
(legacy API; fixed pipeline).
The application was initially written in C, using freeglut
library for os-specific stuff; was later switched to simple C++
(MSVS didn't really support C99 anyway).
CG: Raytracer (CPU&GPU versions)
The task was to develop a raytracer using a ray marching algorithm
to visualize procedural surfaces. Two independent versions were
suggested and implemented:
- GPU version utilizing a custom GLSL fragment shader. A
glus/glew-based launcher was suggested, thus the task was to
straightforwardly implement actual ray tracing and to choose
a nice-looking procedural scene.
- CPU version utilizing OpenMP for parallelism and SSE2 for
single-core performance. Unlike GPU, reflections and
refractions are easy on CPU due to GPU's limited support
Unix: model shell
The task was to implement a subset of Bourne shell features:
command line parsing, subshells, sequential and parallel execution,
Lexing and parsing are performed by two hand-written FSMs, and
assembled into syntax tree. This tree is then executed by a tree of
subprocesses via fork/exec.
Unix: model programming language
The task was to implement an interpreted programming language,
for later use as a scripting language in the following task. My
language design was heavy influenced by Lua, ML, Erlang â the
languages I was trying out at that moment.
- Token types are distinguished lexically, as in Erlang:
keywords and function names are always lowercase, while
variable names are always capitalized.
- Control structures resemble Lua:
if A then B else C end.
- Variables are dynamically typed.
- Tuples are used as language for destructuring assignment and
parameter passing, while not being a valid data type.
- Functions use applicative syntax as in functional
foo x instead of
- All functions only accept a single argument, but a tuple
can be used to encode a multiple-argument function.
- Arrays have fixed size and can be allocated via
array Size syntax. Uncommon syntax with
$ sigil is used to access array items:
Example program (qsort algorithm and testing code):
fun not X
return if X then false else true
fun qsort [A, L, R]
I = L
J = R
X = $A ((L+R)/2)
while not (I>J) do
while ($A I < X) do I = I+1 end
while ($A J > X) do J = J-1 end
if not (I>J) then
[$A I, $A J] = [$A J, $A I]
I = I+1
J = J-1
if J>L then qsort [A, L, J] end
if I<R then qsort [A, I, R] end
fun main 
N = 30
Test = array N
println ["Sizeof Test is", size Test]
T = 7
for I from 1 to N do
$Test I = T
T = (T*383) % 1543 + 1
qsort [Test, 1, N]
Unix: multiplayer economic game
The task was to implement a client-server network multiplayer
economic game. Players would connect to the server via text
protocol, join a game, and perform moves allocating resources to
The first part was to implement an asynchronous game server in C.
Implementation used custom event loop and FSMs for tracking states
of game and players.
The second part was to implement an automated game client in C++
which would play according to algorithm implemented in scripting
language from the previous assignment.
Physics: Lorentz Gas Simulation
The task was to implement a visual real-time simulation of the
Lorentz electron gas model
The GUI is implemented in Qt4, using OpenGL to render the scene
and Qwt to draw plots over time.
Checkers game solver
The task was to implement a solver for a two-player checkers
game on a 8x8 field. The main implementation detail is that an
optimized bit-mask representation is used to encode a field: it is
stored as a set of 64-bit masks. This design allows to efficiently
use 64-bit word size of modern processors and to implement
operations like computing all possible moves with just a few
bitwise instructions. This optimization allowed to continue
alpha-beta pruning process 1-2 levels deeper (within given time
limit), than solutions using naÃ¯ve (array-based) representations.
Miscellaneous Hobby Projects 2009-2010
Raytracer in Standard ML 2010
A great way to learn a new programming language and to have some
fun at the same time is to try to implement a fairly simple (but
not trivial) program in it. This time I decided to implement a
raytracer (something I have never really done before) while reading
"Standard ML for the Working Programmer". It was also interesting
to try MLton compiler's performance.
DSLR as a Webcam 2010
While playing with libghoto2, I noticed that a DSLR is capable
of providing low-resolution preview images at a rate of 20-30
frames per second. This observation gave birth to an idea to send
these images into a v4l2 (video for Linux) loopback device. Even
though it worked (I was able to make a skype call with DSLR-class
video once), the whole idea was insane from the beginning :)
DBus Desktop Notification Daemon 2009-2010
This project grew out of my dissatisfaction with existing
notification daemons. Either their visual design was simply poor,
or they would avoid animations (which I would prefer to have to be
able to notice new notifications), or they would be inconvenient,
like notify-osd which would only show one notification at a time,
with no option to dismiss it.
The daemon was implemented in C++/Qt4, using QStylesheet engine
for visual styling. The notification would appear at the side of
the screen and fall down in a stack before disappearing. The idea
of this animation was borrowed from some Miranda IM plugin.
Motorola modding 2008-2009
Motorola used to make Linux-based smartphones back in 2005-2006.
These devices would run custom "EZX" platform based on MontaVista
Linux and Qt/Embedded 2.3.
Those years, Linux smartphones were really uncommon and
attracted a community of geeks that would seek ways to modify,
improve and replace these phones' software in a guerilla way
(official SDK was hidden behind restricted paid access model which
attracted no developers).
I used to own a Motorola A1200 and was seeking ways to provide
it with better software.
phoneME for Qtopia 2008-2009
is the GPL open source version of Sun J2ME JVM. The goal of this
project was to provide Qtopia 4 environment with a viable J2ME
The project ended up "basically working" by the time I (as well
as other active community members) lost interest in programming for
this outdated platform (Android was hot and brand new).
The project seems to have continued in a way within OpenMoko
SDL for Qtopia 2009
LibSDL port for Qtopia environment that enabled others to port a
few Linux games.
Qtopia for EZX 2008-2009
A big project of replacing the whole EZX software stack with
Qtopia 4.3 over Angstrom distribution, lead by
Some of small things done by me:
- Closed-lid widget.
- Power management system integration.
- SMS sending.
- Small UI and localization fixes & tunings.
- Unicode and visual make-up for PredictiveKeyboard.
- Experimental branch with Qt updated to 4.5 version, with
some features backported from Qt Extended 4.4, WebKit
support and new visual effects fixed to run with 18-bit
A simple mobile client for
MPD network-controlled music
player. Was developed in two flavors: EZX (Qt 2.3) and Qtopia (Qt
The goal was to be able to see "now playing" and control
playback on desktop PC from mobile, and that goal was successfully
EzxEmu Multi-Console Emulator Port 2008
Multi-Console emulator bundle, assembled and ported to
Motorola e680 by the
team, was ported by me to Motorola a1200. It was required to remap
keys and change display function to convert colors to 18-bit format.
EZX DRM Hacker 2008
A reverse-engineered tool to heal installed J2ME midlets broken
by DRM encryption.
Siemens modding 2006-2007
At that time there used to be an active community of hackers built
around modification of Siemens phones' firmware. They would create
and install patches, altering their firmware in place.
Finally, an executable file loader emerged, (referred to as
ELF loader), which skyrocketed development activity.
Compared to desktop, development still was not easy: there were
neither address space isolation, not exception isolation between
processes: any bug would likely crash the whole OS.
HTTP file downloader GUI. Made first version of UI, sketched
architecture and made an early networking prototype, before
development was continued by other community participants.
Jabber client, written in C by
kibab. I was mostly doing
some UI work, e.g. improving appearance, adding support for
different screen resolutions, fixing bugs.
Bootscreen Creator 2007
A Delphi program, allowing to convert arbitrary images into
firmware patches to install as a phone's bootscreen.
Participated in continued efforts to find useful functions and
extract their signatures.