Skip to main content

Posts

Gestalt Diffing algorithm in Java

What we see depends mainly on what we look for. John Lubbock We do not see things as they are, we see things as we are. Anais Nin Gestalt Diffing algorithm in Java Intro When it comes down to diffing or LCS usually story ends with Myers algorithm. It is idea to create BitMatrix (or IntMatrix) of similarities between two strings and then to approach to a problem from graph point, and find the shortest path of changes between two arrays. It sounds as a great solution, and it is, but in reality it has few drawbacks. It is algorithm that gives great results most of the time but it is a slow algorithm for some obvious cases, if strings are equal, or very similar. You create whole matrix but for your solution not all values from matrix are needed. It involves one more algorithm, finding the shortest path in it self. Then improvements of Myers algorithm came, like to check on start are strings are equals, to check for same prefix or suffix, to run snake chase from both...
Recent posts

Sailor turn to Pirate farewell letter

On that fatal night when my faith towards Lord betrays me when finally all curses of my enemies gets me down and my destiny turns its back on me on that night I will walk into a ninth circle of hell so easily like the devil him self is my brother i will descend shining brightly like a shooting falling star little-bit lost like an old worn-out jacket with two false faces that night you will wait for me with your tired soul it is so hard to wait for false promises of crooked man that is fucking hard and it's so easy to forget everything with one bottle of rum and to live just for tomorrow and another bottle and to die all alone, my love on that night when I leave forever, when I say my farewell on that night only two women will wake up one would be my beloved mother and she will cry second would be you, and you will curse me

Is Java the right language for Micro Services?

[work in progress] Micro Server for Micro services Micro services are becoming slowly but steady mainstream programming architecture. People often compare them to web services or rest services witch gives more problems than understanding. And when you look at implementation you'll see that developers are running away from Java to Scala, Nodejs or Python or name it. Is Java old? Is it time to close Java book and learn something new? Learning new things is always good, but I think reason why developers run away from Java is not a language problem, but Java legacy. Biggest problem why developers avoid Java to make micro services is that there are not so many good tools and servers for micro services in Java or put it better there are many old wrong tools and server to start with. If you are old Java developer you will have problems to grasp this. When you start to create micro service your focus should be on micro. Project should compile in less than 10s.Your service should ha...

New Year's card

Today is a new day, a new clean start. I wish you to feel well for what used to hurt you before, and that you are loved by whomever didn't loved you before. I wish you that your children are better than you, and that you brag more with them than your kids brag with you. I wish you healthy and strong (feet) legs and to have more work than time. I wish you to be more needed by others than others are needed to you. I wish you to dream and do more than you need, and share with those that can not. Do not take more than you give. I wish you to acquire, win or get what you dream of and to respect and enjoy what you already have.   I wish you a Happy New Year and little bit more luck than in previous one. by Dusko Radovic http://www.lupiga.com/vijesti/dusko-radovic-novogodisnja-cestitka

My Tilt-Shift exercise

I love photos, much more just to look at enjoy and admire then to be active in taking some. Mainly because, when I look at what I shoot it looks to me that I always snap at wrong moment, that just few mili-seconds before (or after) it was a perfect moment, or that I did it with wrong camera or wrong camera settings. Prices of good cameras are very affordable nowadays but I stay with love to simple idiot cameras that have one or few setting modes. So afterwards I stay longer time in-front of my PC trying to filter them and take best of what I actually did. Key point for me is to take a lot more pictures than needed. Here are few latest work with Tilt shift filter on common image. To make tilt shift effect you do not need support from editing tool you can do it with simple filters, blur+hue+contrast, there a lot of tutorials on the net. Original: Tell me what you think, or share with me your experience.