Let’s build a simple event-sourced chess application from scratch

Image for post
Image for post
Photo by Felix Mittermeier on Unsplash

Event Sourcing is a really useful concept that can help make your application more predictable, easier to maintain, and more performant. Let’s assume that we have already made the decision to use this technique in our brand new application. In the Event Sourcing, the state of a system is created based on a series of related events that happened in the past. The events are read-only are the only way to alter the state of a system.

The most common use cases of Event Sourcing are accounting and banking systems or shopping carts. Event Sourcing is a natural fit there for legal reasons or to better understand the behavior of customers. But it can be beneficial for much more than these ones. …


Few tricks that can help overcome public speaking fear

Image for post
Image for post
Source: http://wyborcza.pl

Software developers are a very special species. We often tend to avoid communication and when it comes to the public we would rather hide in the darkest corner of a room. I have worked as a developer for several years without having to do many public presentations and was quite happy about it. Everything changes with the foundation of a start-up. We were creating cool products and wanted to tell the world, especially investors, about every new feature. We were very short on people so I often had to do pitches and presentations in front of different audiences on my own. Some of them were really great and friendly, but definitely not every. It was really hard at the beginning. Loads of stress, talking too fast and too much or too little, answering tough questions. …


Decouple your application by extracting reusable business requirements

Image for post
Image for post
Photo by Daniel McCullough on Unsplash

We are running a recruitment process for an internship in an IT department for a startup. We have received a number of applications but not everyone will fit a profile of a perfect candidate we want to hire. He/she should be a young student, or recent graduate and have at least a year of experience. We are working on a governmental project and client requirement is so that candidates have no criminal past. Those rules will differ in time and depending on position and project. Moreover, we want to be able to modify them independently of other parts of our system. …


Let’s build a serverless clone of WeTransfer to share cat pictures

Image for post
Image for post
Photo by Cat Mapper (Max Ogden) on Unsplash

WeTransfer is a really great file sharing service. It’s completely free for files that weigh less than 2 GB and it stores them for seven days without registration. It also offers premium support and functionalities if needed.

Let’s see how we can create a serverless clone of this cool service on top of AWS. We will call it CatTransfer and try to provide similar features in a serverless manner so that everything will scale automatically. Our app is made to share cat pics, hence the name. …


Level up the interfaces of your classes

Image for post
Image for post
Photo by Micah Chaffin on Unsplash.

There are concepts so simple that it is surprising they have a name. This does not mean that they are not useful. Often, the simplest concepts are the best ones for the job. A fluent interface simplifies the way we use an object’s API and promotes method chaining. It is a very useful technique to make an interface of a class more expressive and easier to use for clients.

Let’s consider an example of a simple SQL query builder in PHP. We can create a select query with optional conditions:

Everything is working just fine, but it is not very handy. With a small adjustment, we can make it much more pleasant to use. Right now, each method is only responsible for adding new parts of a query, but it could also return its class instance and allow method chaining. The interface of our query builder would look like…


Subjective reflections on top 3 pros and cons of Domain-Driven Design

Image for post
Image for post
Photo by Christine Roy on Unsplash

There are concepts in programming that can really change the way we think and work. Agile methodologies are relatively new but it is currently hard to imagine working effectively on a big project without sprints and a prioritized backlog. It simply became something natural and makes work more efficient and pleasant. Domain-Driven Design is receiving a lot of hype in recent years and begins to be adopted in some major projects but can it reach similar status?

Pros

Domain-Driven Design has several amazing concepts and techniques that we think give a lot of advantages and might be game-changers in the way we think about a…


Let’s give our database schemas more freedom

Image for post
Image for post
source: mongodb.com

MongoDB is a great choice for a number of applications. In the PHP world, we can also try something more than just a LAMP stack and give our database schemas more freedom. One of the most popular Object Relational Mappers (ORM) for PHP is the Doctrine that also happens to have a very good implementation of Object Document Mapping (ODM) for MongoDB. We will not go into details about the advantages or disadvantages of NoSql and SQL databases but see how we can build a very simple application if we have already decided to use Mongo.

Complete source code is available in the following…


Get to know why your company or team made certain software design decisions

Image for post
Image for post
Photo by Glenn Carstens-Peters on Unsplash

Polish version of the article is available under the following link

Have you ever wondered why the application you’re developing uses a given technology? Why was Java picked over Python? Why do you need microservices or a monolith? There are tons of questions that always come to the mind of a developer. Usually, we’re told that these are the design rules, and we’re stuck with them. Who made these decisions, when were they made, and why were they chosen? Do the guys behind these choices even work here still?

There may be a team of people that make important decisions. They may understand the design principles and rules. Those folks are usually called architects. It’d be great if we weren’t forced to ask them each time about their motivations but to have them explicit and available at hand. Whenever we make an important choice that’ll influence our software design and the work of other people, we should make it traceable and leave something behind. It will make it possible to learn from the decisions and see what the circumstances and alternative solutions are. …


List of subjective tips, activities, and resources to prepare for the exam and learn AWS basics

Image for post
Image for post

Passing of the exam should not be a goal on its own. This does not mean that I discourage taking it. The greatest advantage of most exams is that we can really structure our knowledge on a subject and fill in loopholes while preparing for it. I really had a lot of “aha” moments and fun while doing so. Therefore, with a clear conscience, I strongly recommend taking the AWS Solution Architect Associate exam if you want to broaden your knowledge on a subject.

This article is a subjective guide on how to prepare to pass the exam while not knowing much about AWS at the beginning. If you are not planning to take the exam it might still be a nice walkthrough of the basics of AWS. I will try to keep the story as short as possible but as there is a wide range of services and concepts to cover, it might become a sizeable read. I tried to emphasize subjects that occured most often during my exam and could worth most points. …


Let’s create a simple CI/CD pipeline in no time

Image for post
Image for post

We have recently created a highly available application that shows carefully selected poultry species. It used a load balancer and AWS Autoscaling Groups. The system was using Cloud Formation and was building all dependencies and downloading applications once a new instance was created.

The new challenge is now: “how can we deploy a new version of our application to multiple instances?”. The number of those keeps changing depending on web traffic we receive so manual deployment is not an option. The answer can be services called Code Deploy and Code Pipeline. We will create a sample configuration that will push and install the provided version of our software to all instances. …

About

Jakub Kapuscik

Co-founder of a small startup called Abyss Glass, guineafowl enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store