Tag Archives: programming

Inserting text in the middle of a line with AWK

Maybe I was not searching for the right terms but I had a bit of hard time to find how to this on the internet. Most of the solutions are about writing either in the line above or below the target line. I wanted to write text on the middle of a JSON object. Bear in mind I ain’t no AWK or SED wizard, I just started using AWK and there is probably far more efficient ways of doing this, I just couldn’t find them.

Continue reading Inserting text in the middle of a line with AWK

#NoEstimates, Programmer Anarchy and Mob Programming

The Agile Manifesto has been written 13 years ago with the intention of changing the way software development projects were executed at the time. It prescribed the following:

Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan

Shortly after a few software development methodologies were fleshed out based on the agile manifesto mantras, probably the most notable are XP and SCRUM. While these two are massively adopted by almost all the software companies in the world (I swear I don’t remember seeing a IT job advertisement without mentioning SCRUM), some new trends that I consider interesting are starting to emerge like #NoEstimates, Programmer Anarchy and Mob Programming.

Continue reading #NoEstimates, Programmer Anarchy and Mob Programming

book review: The Passionate Programmer by Chad Fowler

I first heard of The Passionate Programmer about 1 year ago through Rasmus (@rasmuschristens), my team lead at that time, he recommended the book after hearing Chad Fowler in a conference and described it as highly inspiring. After all this time, I finally found some time to read it, and I must say I was also inspired. 

Continue reading book review: The Passionate Programmer by Chad Fowler

diyes: practical modeling of aggregates

I decided to start working on a simple example, a bank application, that shows how aggregates can be modeled using Diyes.

The aggregate I decided to model is a bank account, it will exemplify some basic concepts of aggregate modeling. First of, we create a class that inherits from AbstractAggregate

public class Account : AbstractAggregate

How we normally go about modeling aggregates is we expose methods which are the commands that can be performed on our aggregates. So in this case I decided to have an Open, a Deposit and a Withdraw method. First thing we do in these methods is checking the preconditions for their execution, if the preconditions are met, we apply an event describing what happened. Continue reading diyes: practical modeling of aggregates

diyes: the event sourcing library

So the other day I was thinking to myself I wanted to know a bit more about event sourcing (ES) and the Command Query Responsibility Segregation pattern (CQRS). I have used ES before in a project before but I used library which was’t made by me. This gave me knowledge on how to model a domain using events but it didn’t give me the “down to the iron” experience of it. So I thought, what better way to learn about ES than by implementing a ES library myself.

Continue reading diyes: the event sourcing library