Event Driven Architecture

Why do we need it? In the early stages of the development, event driven architecture is not needed since everything is still small and could still be contained in one place. Unfortunately, as the system grows bigger and bigger, putting everything in one place is not a very good way to scale (a.k.a monolith). The logic of the whole system will also keep increasing in complexity, and eventually there will arise the need to separate the giant system into domains.
Read more →

Hibernate Soft Delete and Optimistic Locking Problem

Sometimes, in the database, we will want to not delete stuff because the data might still be needed later. Maybe some other process in the company will have to generate an invoice by the end of the month. That’s also one of the reason in my workplace, why there won’t be any hard delete in the database except when we’re sure it’s really necessary. One solution for this, in hibernate, is to overwrite the sql delete command using the @SqlDelete annotation:
Read more →

AngularJs and VideoJs problem: Video only loaded on hard refresh, not on switching page

So I was working on a private project with angular js and video js, and I am loading videojs dynamically after I got the source of the video, and there’s this very interesting problem where videojs will only be loaded only if you hard-refresh the page (f5-button). If you navigate to the page where it contains the video, or if you were on the page, go somewhere else, then come back again, the video won’t be loaded anymore and you’ll only get your old html5 video from the browser.
Read more →

Factorial function of 10000!

I have a friend who asked me to teach him Java programming. About a few days ago, he told me : Programmers should work fast and efficient. Please give me a task which has a time limit. I’m not used to fast programming. The part about fast and efficient is always universally true. It doesn’t apply to only programming, but I am more in the direction of doing something right instead of fast.
Read more →