Profile cover photo
Profile photo
Piotr Pietrzak
34 followers
34 followers
About
Posts

Post has attachment
Code
I found this puzzle in the internet. It looks quite easy to solve, but if you want to dig deeper into this you can find quite interesting fact. Solution (without spoilers): Let's name those rules with letters as follows: A  206 twoNumbersAreCorrectButWrongP...
Code
Code
pietrzak.me
Add a comment...

Post has attachment
Code
Solution (without spoilers): Let's name those rules with letters as follows: A  206 twoNumbersAreCorrectButWrongPlaced B  682 oneNumberIsCorrectAndWellPlaced  C  614 oneNumberIsCorrectButWrongPlaced  D  780 oneNumberIsCorrectButWrongPlaced  E  738 nothingIs...
Add a comment...

Post has attachment
Global unroll
Spock is a great tool, but my coleague Marcin Zajączkowski invented a way to make it perfect. He published his lib  to unroll all tests by default. This is very nice feature, because this is probably the desired way of working with parametrized tests. Just ...
Add a comment...

Post has attachment
Shadows of BigDecimal
We are using BigDecimal in many places. We are using BigDecimal for modeling currencies, financial measures (interest rates, coefficients), maybe some other domain values that needs precision better than Double provides. BigDecimal is common and straightfor...
Add a comment...

Post has attachment
APR Adventure
APR - part I When you want to compare two things in Java you should implement Comparable<> interface (in math it is called total order). You don't have to compute single value for one object and then second for the other to compare them. Of course in some c...
Add a comment...

Post has attachment
Schedulers in couchbase
Couchbase java diver by default provides threading pools that are quite interesting. Why "are" instead of "is"? Because there are two of them - one for I/O operations and another one for computations. Lets focus first on I/O operations.  There is a special ...
Add a comment...

Post has attachment
How to store passwords
Hash function Let's do some modeling - we will start with storing password problem in our Identity Management System. First of all I want to start with a statement: we don't want to store plaintext user passwords . We want to know that provided password is ...
Add a comment...

Post has attachment
Spring sleuth
Correlation Id When you start with microservices the natural question comes to mind: how to debug all this stuff. Unfortunately some of problems appear only in production environments. How to trace them effectively? Solution is not always so simple, but cor...
Add a comment...

Post has attachment
Observable<Approdorix>
Why you should consider Couchbase as a KV or document database? Tomek Nurkiewicz gave me access to his fresh book: " Reactive Programming with RxJava ". I think that this is my chance to learn "something new".  As you probably know node.js and javascript in...
Add a comment...

Post has attachment
Approdorix
The idea behind the Approdorix.com My blog looks dead for some time, but a lot of other stuff was done under the hood (this is called the life). Finally I found the brilliant idea to write entire cycle of blogposts about creating open source project. My ide...
Add a comment...
Wait while more posts are being loaded