Marcin Szamotulski

Full stack developer and PhD mathematician.

Curriculum Vitae

Intro

I am an experienced full stack web developer and I have proven myself across a variety of challenges involving designs, implementations, and minimum viable products.

I understand what business needs are and can translate these into prototypes, frameworks and, well, code ;)

code quality

I am as much curious, open, and learn quickly as I am collaborative. I combine all this with an abstract thinking skill worthy of my academic background, which is PhD in maths. This means my code is neat, and therefore scales easily and is easy to maintain. More importantly however, my code is easily comprehensible for others who join the team. This is super important in agile development with teams that (may) rotate quickly.

maintaince, testability and deadlines

When designing code, I think forward and craft my code in a way that others can pick it up easily. This also means other components can be added on at little effort.

Testing code early is paramount. On tight deadlines there’s often not enough time to write thorough tests. If that’s the case, I go back and write the necessary test, resolve compromises done to meet deadlines. In the long run, wise code reviews always pay back.

By using modern property testing techniques and simulations I was able to deliver complex network components which worked flawlessly on various platforms, from the developer loved Linux and MacOs machines to user friendly environments on Windows.

functional programming

I am an advocate for functional programming. It often brings clarity, projects become easier to comprehend and allow for a reasonable way of managing side effects.

Education

PhD: Research in Abstract Algebra and Category Theory, Instituto Superior Técnico, Lisbon.
Master in Mathematics: Collage of Inter-Faculty Individual Studies in Mathematics and Natural Sciences of Warsaw University, where I was studding Mathematics, Physics and Psychology.

Portfolio

Some of the most recent projects I worked for or trainings I took part of:

IOHK

Currently I work at IOHK as the team lead for the Haskell networking team. I also held a teaching assistance position for IOHK / Well-Typed's Haskell course which took place in Barbados.

Majority of my work at IOHK is available as open source. I mostly contributed to ouroboros-network repository. I contributed to the design document and technical documentation Here are some main achievements:

  • I contributed to session type framework typed-protocols. Using type level description of a protocol not only turned protocol errors into type errors but also made it much easier to share and discuss ideas: using typed-protocols protocol state machines become the primiary focus point. It allowed us to reason about protocol behaviour, especially about adversarial behaviour. The novelity of typed-protocols is using protocol pipelining in the context of session types.
  • I authored Win32-network library.

    One of IOHK's products the Deadalus wallet is a primary Windows application, with thousands of users. This library, together with a small abstraction layer allowed us to write platform independent code (which runs primarily on Linux, Windows and MacOs). With Win32-network we ware able to achieve throuput comparable to what Linux does and we never heard back complains from Windows users regarding networking!

    Win32-network is a low level library which solves some outstanding problems when writing Haskell networking code on Windows. The original Haskell IO calls on Windows can block when one tries to kill a thread which executes them, which can lead to leaking resrouces (sockets) or unresponsive behaviour when a user is trying to shut down application. We also discovered that IO calls on Windows can deadlock without making progress when done concurrently. Win32-network library solves both problems.

    Win32-network was designed based on winio library. Unlike the original, it uses very little C code (just a single header file). It implemented an asynchronous IO manager using IO completion ports. Very similar design was picked by GHC team for the GHC implementation of IO manager on Windows which will be available in one of future versions of GHC.

  • I contributed to io-sim a simulator and a drop in replacement for IO monad. IOSim is a pure monad (free monad) which supports:
    • Haskell thread interface
    • Haskell synchronous and asynchronous exceptions
    • async interface
    • stm (software transaction memory) interface
    • time primitives, which are important for writing network simulations
    • and more ...
    It allows us to write production components that can run both in real IO and in simulation. Testing components in simulation using property testing proved to be a very efficient way of checking correctness and discovering possible bugs that could only surface in very specific scenarios. This allows to test internal state changes.
  • I wrote and maintained several protocols using typed-protocols package.
  • I also helpped to mainain CI using github-actions, and an early version of CI using nix.

Haskell network programming nix

Well-Typed Guide to Haskell Performance and Optimization

In October 2018 I took a two day course organised by Well-Type at Skills-Matter in London titled Well-Typed Guide to Haskell Performance and Optimization.

The training covered low level data representation used by Haskell runtime system, lazy evaluation, Haskell intermediate representation, insides into Haskell optimisations strategies (stricktness analysis, inlining). With examples based on real bugs found by Well-Typed engineers while doing Haskell consulting around the world.

Haskell

Functional Correctness Training

In November 2018 I took part in a Functional Correctness Training delivered by prof. John Hughes (one of Haskell founders and the original author of QuickCheck library), Well-Typed and IOHK.

The training covered advanced usage of QuickCheck and property based testing, semi-formal specifications.

Haskell QuickCheck

Gravicus

I worked at Gravicus where we used PureScript and React. I setup various projects using Redox, my PureScript implementation of redux architecture (using free monads paired cofree comonads).

I've been also responsible for implementing pixel perfect designs closely working with our designer. Writing complex ui elements using pseudo-elements and well designed modern css. I've decided to try postcss. It introduces proper scoping of css which avoids problems in the long run. It fits well into functional programming paradigm with its composition of css classes (it tames side effects of globally scoped css and introduces composition of css classes which is obeys the laws of a semigroup).

I setup unittest which runs both in node with purescript-test-unit and in the browser using karma runner. Before taking up this role I wrote a library to run purescript-test-unit using karma runner in a browser environment and bindings for the airbnb's enzyme react testing library. This allows us to properly test react components and write test in PureScript.

Redox architecture which splits the redux interpreter from the DSL allows to plug an interpreter designed for tests which can mock data, pretend request. This will allow us to have a very good testing architecture for our work. This is based on my work published on github: redox, react-redox and my purely functional routing library cofree-react-router.

Progressive Web App PureScript React Redox HTML5/CSS3 CssModules WebPack karma purescript-enzyme purescript-unit-test

Zephyr

This is an open-source project which provides a tree shaking algorithm for PureScript. It outputs a set of CommonJS modules which can be bundled with webpack, rollup or any other tool. zephyr allows to build lazy loaded applications that are also properly minified before shipping. This opens new possibilities in the PureScript ecosystem.

Haskell PureScript

PureScript

I am an active member of the PuresScript community, I have contributed to the PureScript compiler and I authored and maintain various libraries. My noticeable original libraries:

  • purescript-redox
    Redux architecture for PureScript applications, that focuses on correctness and compostability and testability. It is using a pairing between free monad (DSL) and a cofree comonad (interpreter). Interestingly you can compose DSL's (taking a sum) and compose the corresponding interpreters.
  • purescript-react-redox
    React bindings for Redox.
  • purescript-cofree-react-router
    React router modelled using a Cofree Array comonad. This is not surprising if you realise that DOM can be modelled by Cofree Array tree structure. The comonad gives nice api for declaring routes and the library provides combinators for querying mounted components.
  • purescript-react-ix
    PureScript React bindings that provide safe way of dealing with advanced react features like refs, mutations of the react element (storing callback references, DOM references). It has no runtime overhead. The safety is provided by tracking the changes of a ReactThis in an indexed monad.
  • purescript-react-spaces
    A free monad DSL which provides a interface for writing React vDOM tree. It is interpreted during execution time so it has a runtime cost. It is similar to BlazeHTML library. Together with redox this provides an alternative for pux.
  • purescript-karma-test-unit
    This is a small bridge that lets run purescript-test-unit tests in a browser using karma runner.
  • purescript-vim and psc-ide-vim
    I am maintaining the first one, and I rewrote the second one. These are vim plugins that makes Haskell devs cry ;).
I did non trivial contributions to more than a few core purescript libraries, just to mention a few:

Rubble

I have delivered progressive web apps written with ReactJS and Knockout and relied on custom Rubble logic language for the backend as well as Python and NodeJS.

My job as a JavaScript, Python and Rubble engineer was to develop applications based on rubble logic programming platform, documentation proofreading in close cooperation with our CTO.

One of the challenges up front was to tame a legacy code. I have done this by introducing flow - the type system from Facebook for JavaScript, so that we at rubble could reason about the code with confidence. I turned our flag workflow application into single page app which loads instantly, with smooth transitions between page views, 60fps animations and offline support.

Along the way, which was super exciting for me, I have also picked up a new programming paradigm: logic programming utilising programming language Rubble, which was developed fully in-house. It is a fully declarative rule engine and process engine, with forward and backward chaining and syntax inspired by Prolog. I proofread the documentation and helped to debug critical issues; I rebuilt web interface for it using websockets for instant communication using ReactJS.

Flask (Python) Flask-Restful (Python) nodejs Rubble websockets Progressive Web Apps ES6 React Redux Knockout jQuery Crossroads Hasher HTML5/CSS3 LESS SASS Twitter Bootstrap gulp Browserify WebPack

QuantifiedCode

Static code analysis platform for Python.

I worked as a backend and frontend engineer. This was my first real React application, pre flux, or react-redux era...

Flask (Python) Celery MongoDB Ansible Apache Stripe Github API React jQuery Gulp Require.js HTML5/CSS3 SASS Twitter Bootstrap

Neuwagen

Car selling web application.

In my work as back-end dev, I focused on development and maintenance of various parts of the system including reviewing complex logic at the backend. In addition to that I was also busy with the front-end.

Django (Python) Celery MySQL RabbitMQ Vagrant Scrappy HTML5/CSS3 jQuery d3 Twitter Bootstrap

Github Recruiting

Recruiting app for Github developers.

This was an exciting time for me to work on a small Angular application backed by a github data on open source community and using the pygit2 (libgit2) library. For this project I worked as a full stack web developer and delivered a proof of concept in almost no time :)

Flask (Python) MongoDB Flask-Restful (Python) Ansible Apache PyGit2 (libgit2) Github API Google Maps API Angular jQuery Gulp HTML5/CSS3 SASS Twitter Bootstrap

TellTerms

Social platform for sharing enriched hyperlink text connected to LinkedIn .

I worked both as a backend and front-end developer. I implemented pixel perfect designs handed by the design team. There was a big issue with legacy code at the beginning. After initial struggle with a single page app written by the previous team (using just jQuery) I advocated for using angular and I rewrote the application using modern approach. This was a difficult decision for managers but after all they understood the benefits they got - much more reliable code base, well tested - hence more happy workflow for every body in the team and the users.

Django Celery SQL MySQL Nginx (hosted on AWS) RabbitMQ Rest Framework Angular jQuery HTML5/CSS3

Chronch

Chronology app for lawyers.

This project, developed with a team of legal professionals, asked for a tool to collaborate on a knowledge base in legal cases.

It was exciting to closely collaborate with people of different background whose needs had to be addressed. Action from the ground up.

Flask (python) SQLAlchemy PostgreSQL Heroku HTML5/CSS3 Angular jQuery Twitter Bootstrap

Edurino

Email-based micro-learning application

The service targeted busy professionals who wanted to learn new skills. Where I helped was with my expertise in fat back-end and thin front-end applications.

With today's technologies, like service workers - these kind of apps can be heavily optimised as well (here is a link to an interesting issue that was present on github.com, where fresh pages loaded faster than client side routing, and a solution using by streaming the content into browser’s HTML parser).

Flask (python) SQLAlchemy PostgreSQL Heroku HTML5/CSS3 jQuery Twitter Bootstrap

Scientific Publications

Some papers and preprints that I authored or coauthored: