Skip to main content

Posts

Speaking experience

Been a long time since I last blogged. There were many things happening, which were pulling me away from writing. One of those things was an opportunity to share my thoughts with a wider group in public. Recently I gave two talks - one in my company, and a second during JavaCamp #11 . The second one was filmed and you can watch it below (in polish). The topic was "Changing the mindset - more object-oriented view at the business domain modeling" and it was based on my series of previous blog posts (links below). I briefly introduced audience into Domain-Driven Design, Command Query Responsibility Segregation and Event Sourcing concepts. The main thing in my presentation however, was to show how developer's mindset is changing when meets those contemporary techniques. I wanted to emphasize what questions she starts to ask and what things are becoming more important while she goes step by step over this "rope bridge". Both speeches were well recieved, I th...

Should tests influence the production code?

For a very long time I was told that tests should not influence the production code. By this I mean, that we should not change our design only in order to be able to test it. That was quite OK for me, since - you know - test are only tests - the production code is what matters and what drives the design. Tests should just shut up and follow. Right? Lastly I am flipping the bit and diving into TDD and I must say - this is quite an adventure. At the beginning I was like a babe in the woods. It was not easy to start. Everything was harder - writing code, designing, thinking... I had to firstly write a test, and then the code - everything was upside down - I didn't even have the code to test. Damn! I started to think about basics again, and that... was really refreshing! The Example One day I was given a task to figure out changes in history lines of some objects and update the meta-data for each line accordingly - with ids of objects that were changed. For the simp...

5 reasons why we (still) do not like patterns in the heart of software

We like Design Patterns. They make complicated things simpler. Our brains are designed to tackle complexity with them. It is easier to describe something with words "it's like that one thing that you know, but with some differences" than describing it completely from scratch. All frameworks that we use are full of Patterns and we understand them very well. Decorator here... Chain of responsibility there... Oh, and some old, nasty, huge and extremely overloaded Singleton over there - yup, we use it too... Piece of cake. This is our (developers) well known Domain. We are Domain Experts on that territory and we feel confident there. The reality But guess what - this is not the Domain that we are dealing with on daily basis (unless we are working on frameworks of course :P ). Our Domain, which we are struggling with, is about the business that runs our company. We don't need those mentioned Decorators and stuff. At a glance, it looks like we can ju...

7 lessons learned from launching my DDD/CQRS/ES startup

It's been a month and a half since I wrote the last blog post. This time it was not because I am lazy (although in general I am), but quite the opposite. I was very busy with launching my startup application written after hours at home with my brothers. For the couple of last weeks, there was the Euro 2012 Cup in Poland and Ukraine, and everybody around me was crazy about the football those days. On the other side, couple of months ago I started to practice Domain Driven Design with Command Query Responsibility Segregation with Event Sourcing . I combined those two and launched my startup as a Facebook application written in this style: " Typer " (at this moment only in Polish). What were my goals? From the personal perspective , I wanted to give people some opportunity to have fun - to type scores in their own groups, compete with each other and find out who is the best football specialist. From the business perspective , I wanted only to generate s...

Event Sourcing is like Vector Graphics

I want to emphasize at the outset, that I am not an expert in graphics.  I just have some basic knowledge, but based on that I was able to coin this parallel. I assume, that you have some basic knowledge about Event Sourcing and CQRS , but if you don't please refer to this definition or watch Greg Young's mindblowing 6,5h long classes (if you already do have some knowledge, watch this video anyway - it is worth your time). I also assume that you have some very basic knowledge about Vector Graphics and Raster Graphics . What is an Event? Stop for a moment and think. Probably you will come up with an answer, that an Event is an Aggregate's state change which occurred. And this is a very good answer indeed. Guess what. Vectors can depict the state change too! So Events may be treated as Vectors, right? Below I will write down some similarities that Event Sourcing has with Vector Graphics, and 3rd Normal Form databases have with Raster Graphics. 1. Scali...

Convention over implementation with Spring Data

I think that most of us are familiar with the term " Convention over configuration ", but just to remember (from wikipedia): The phrase essentially means a developer only needs to specify unconventional aspects of the application. For example, if there's a class Sale in the model, the corresponding table in the database is called “sales” by default. It is only if one deviates from this convention, such as calling the table “products_sold”, that one needs to write code regarding these names. When the convention implemented by the tool you are using matches your desired behavior, you enjoy the benefits without having to write configuration files. When your desired behavior deviates from the implemented convention, then you configure your desired behavior. For example, the maven project structure uses convention - where our source files, test source files and resources should be placed in order to be compiled, tested and packaged automatically. We save a lot o...