I'm not trying to defend Hibernate, but if used correctly it can be a good tool for a good number of scenarios.
381 karma · joined April 4, 2017
I'm not trying to defend Hibernate, but if used correctly it can be a good tool for a good number of scenarios.
The author forgot to say that teenage otters set `acks=0` when producing messages :D.
The performance looks outstanding!
From my exprience there are multiple reasons - The main one: I've learned tons from reading code. The ability to jump into code that does X to see how it's implemented is worth a lot to me. This is something I love about the jvm ecosystem which is unfortunately not present in many other languages. - Many libraries/frameworks (Spring Data comes to mind) provide very leaky abstractions. Understanding how the underlying technology is used can make a big difference. - Address questions when the documentation is not clear enough. - And last: to discover bugs in libraries. This is not common, but it happens.
Using spring as a toxic example, many things have to be tested using @SpringBootTest which is incredibly slow to start. On top of that because of the use/abuse of @MockBean tests stop being thread safe. So one ends up with slow test that need to be run sequencially. I'm working in a 'start up' that went the spring boot way and quite simple services take 15+ minutes to run all their tests, which is insane.
On top of that, annotations make it impossible/very dificcult to know what code is actually executed (and also it not possible to navigate to the code in an IDE). As I rule of thumb, I'm always happy to swap one annotation for one or two lines code.
They discuss how the ideas of XP and Agile have been diluted and how a good number of organisations now follow a waterfall approach with a different name (I happen to work for one of those orgs unfortunately).
If anyone is interested in this topic, Anthony Marcano (creator of the Screenplay Pattern) published a video on the same topic a few months ago with some examples of how Agile has been diluted: https://www.youtube.com/watch?v=fzqEHwXVpKQ .
Maybe I'm a bit of a Romantic, but I believe that given 2 orgs on equalt terms, on doing XP or Kanban and another one doing SaFE or whatever, the one doing XP/Kanban will be a far better place to work. And from experience I'll say that an XP/Kanban org will be able to deliver, get feedback and learn faster.
I love ruby and find it and I know Rails also has some magic, but I love my types. I'm glad I'm going back to do something sensible in a few months. Probably Kotlin + http4k.
Out of curiosity, is there a scenario you can share in which using a binary blob as a PK/FK would be the best solution?
For me, the main thing is that using the keys by default make my accounts more secure and I would only use the phishable methods in case of emergency (if my house goes up in flames with my keys, computer, mobile, etc). One important thing for me was to remove my mobile number for SMS OTP or password reset, as sim cloning is a posibility.
And a password manager is still indispensable as most sites don't accept hardware keys at all.
Disclaimer, I've avoided using reactive approaches as much as I can on the server side as it increases the complexity (and cognitive load) and makes diagnosing issues harder. This is my experience in the JVM world, I'm not sure how it is in other languages/platforms.
[This article](https://netflixtechblog.com/zuul-2-the-netflix-journey-to-as...) from Netflix mentions the tradeoffs they experienced when they re-engineered their API gateway to be reactive. I wonder if this is still valid as the article was written 6 years ago.
Testing becomes so much easier too, as one can instantiate a the whole web routing aspect, without having to bind it to a port and having to send real http requests.
If strongly suggest people to take a look at it. It's not perfect, but it's a lot simpler than other frameworks and libraries. And it's a shift in some of the current mentality of using heavy frameworks (such as spring boot) which blow up anyone's cognitive load.
My rule of thumb is:
* Prefer code vs a library if what I want to do is simple and/or if the complexity of the library overshadows whatever benefit I get from using it. * Prefer a library vs a framework if the library provides what I need.
A couple of examples when using:
* The use of the Spring Framework in the Java world to do DI, web apps and many other things. I think java is the only language where a framework has such a bad influence on developers (maybe Ruby and Rails follows it, after all Spring tried hard to copy Rails ease of use). In this example the framework makes a few things easier, by ading a metric ton of complexity. * The npm left-pad library (debacle).
This doesn't mean that one shouldn't use libraries or frameworks, just that they need to be justified. Development is boring and most developers just see shiny stuff and have to use it in production just to get some entretainment.