Brew on macOS Explained In 1 Post

What is a brew/homebrew?

If you used a Linux before, you had to meet apt-get on Debian/Ubuntu system or yum on Centos/Red Hat. Brew as well as these tools is a package manager that allows you to install (most of) Linux ‘s libs and tools on your Mac! You can also create your own packages to easily install them on other Macs.

Continue reading “Brew on macOS Explained In 1 Post”

[UML][PHP] The game of Life [WIP]

A few days ago John Horton Conway passed away, it inspired me to take a look at his Game of Life. I have it in my mind for years, since I heard about this cellular automaton on conferences. They were talking, it’s as a good challenge for Software Developers. Something like Kata to practice your skills using different approaches, libraries, toolsets.

I wanted to use it, to practice my UML skillset and the PlantUML tool. As an addition, I wrote PHP 7.3 code to demonstrate implantation. It’s far away from perfection. I didn’t use Composer, no Unit Tests, no framework, just vanilla PHP. Today, I wanted to make UML diagrams.

Continue reading “[UML][PHP] The game of Life [WIP]”

Composer – Things you (I) didn’t know

If we try to look at tools that change the PHP environment and community, for sure we will find there the Composer. It’s the tool that allows us to manage dependencies in our projects. We don’t have to download zip files and store vendors in our repositories. We got two files (composer.json and composer.lock), which describe what is needed to run our software and the Composer manages fetching and installing dependencies for us.

When I look at my experience with the Composer, I use it every day. But, my using it usually finish to use composer require or composer update. If you are not familiar with the Composer, the first command allows you to add a (dev)dependency to your project, the second one allows you to update a dependency when maintainers release the newest version of their library.

Continue reading “Composer – Things you (I) didn’t know”

Prooph: CQRS+ES in PHP. How to use.

Pattern CQRS and Event Sourcing become more and more popular every day in PHP community. You can easily find lot libraries to store events, to execute commands, to manage repositories, etc. The leader there doesn’t exist yet, but prooph as the most complex solution is close to that position. They have only one problem, documentation.

Ok, they have two problems. Documentation and many not to updated examples in their GitHub repository. Because of that and because prooph is de facto five not related components running everything out-of-the-box is really a pain. Even if some examples contain Docker on board or especially then because a tree of dependencies grows fast.

Continue reading “Prooph: CQRS+ES in PHP. How to use.”

GraphQL vs. REST vs. SOAP

Ladies and Gentlemen, let me introduce you GraphQL. Dragons’ and gnomes’ slayer. I will be honest, GraphQL is in my opinion much better than REST and SOAP. Usually, I don’t follow trends I’m waiting when a technology grow up and solidify. I won’t be tester the newest solutions, especially when it’s related to JavaScript. As you know, frameworks in JavaScript are published every hour. I have no time for it.

GraphQL was published two years ago, Wikipedia said. I didn’t hear about it until I was looking through the agenda 4Developers, polish conference. Few speakers made presentations about it. I wasn’t on any. Just the organizer published videos on YouTube I had a chance to see them.

Continue reading “GraphQL vs. REST vs. SOAP”

100% Code Coverage with phpspec


Can you imagine a big project that has 100% code coverage? Me neither. It doesn’t mean that we should ignore this measurement. Today, I would like to describe my adventures with code coverage in the Financier project. There will be phpspec, Travis, and bit of dragons. Just kidding, dragons another day.

100% code coverage what does it mean? Well, you have tests for each class, method, and conditions (if, while, for), literally. Everything is testable and tested.

Continue reading “100% Code Coverage with phpspec”

Doctrine Migrations without frameworks

Few hours of each weekend I try to spend on developing my Financier app, which is nothing more than my interactive wallet to invest in market stock. It’s really easy command line app, that has two table in database. I have some plans for this application, that is why I’ve decided to implement library to manage database migrations.

I choose Doctrine Migrations that I usually use when I am working with symfony framework. This time, I wanted to use it on application where I don’t use any framework. First time I had to dive into documentation of this library, and it was terrible like diving into the dark ocean.

Continue reading “Doctrine Migrations without frameworks”

GOLANG/GO: How to start on MacOS and to be an expert in less than 5 minutes.

Let’s start with explaining what go/golang is and why you should look at it if you are programming in any other language.

The most important thing: it is still a young tool. It’s only eight years old (since 2009). But it is used by the biggest brands like Uber, Netflix, Google. Therefore, we can assume that this language won’t be abandoned and learning it has a little more sense if you require something more than being hipster developer.

Continue reading “GOLANG/GO: How to start on MacOS and to be an expert in less than 5 minutes.”

TDD: Test-driven development sucks

Don’t click. The title is nothing more than clickbait.

When I’m starting writing this note is Saturday, and I’ve just come from a cafe. As usually, I went with my MacBook Pro and I’ve tried to create some code.

Today, I wanted to create a tool which helps me with mine investments on the stock market (Warsaw Stock Exchange).

Continue reading “TDD: Test-driven development sucks”

phpspec+behat: The Bowling Game Kata

A week ago, I announced on Twitter new blogpost about CQRS. I’m still writing it but I needed a little break from it and to take something new, something that I wanted to learn, try from a long time. I did my first Kata.

Kata is a Japanese word and could mean “practicing move”. Programmers adapted that word and created a lot of Katas (exercises) to improve their skills. One of the most popular Kata is The Bowling Game described by Robert Cecil Martin (Uncle Bob). The clue is to create an algorithm which shows score using the rules in this sport’s discipline.

On Saturday, I took my MacBook Pro and went to a cafe. I ordered, as usually, a large cappuccino without sugar and with non-fat milk and I’ve started two hours coding session.

Continue reading “phpspec+behat: The Bowling Game Kata”