If you are using the java.lang.Currency as part of your entity, most likely you are already regretting it now. Most of the time, a currency is a three letter word, and we don’t need the logic to be bundled in there. Keeping things simple and mapping these currencies as a String or own custom class is the way to go. For people who did use java.lang.Currency, the pain will arrive when a country changed its currency or added a new one.
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.
There’s usually no good reason to turn off SSL certificate check. So this is actually wrong in many ways, but maybe we’re still developing in an isolated dev environment and somehow the dev machine of another application you’re depending on only allows SSL connection even though it doesn’t have a valid certificate. The correct solution is actually to self sign a certificate or add it in the system, so that if your application go live, you will still have ssl certificate check turned on.
So lately, a lot of people in my circle is talking about why java application server is dead. The reason why is explained in the slides here. Basically what I get is that because nowdays people only deploy one artifact in one application server, it beats the point of the application server. It’s more like that the application server is already part of the application. So, it would be better to treat the application server as part of the application and ship them together as a package.
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:
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.