I can help software engineers become more effective and productive in reaching the ultimate stage of sophistication using the best practices of the open-source world. So they will get top-level tech positions in the most successful companies in the world as an ultimate engineer.
If you're tired of shallow topics around Software architecture and want to learn more beyond the buzzword, you came to the right place.
Parabéns Otavio, estou aprendendo bastante com seus vídeos. Tenho uma pergunta, recentemente na equipe onde trabalho sugeri a nunca mais usar Boolean, em casos de FLAGS por ex um atributo "ativo", sempre será true or false, então porque usar o Boolean ao invés de boolean sendo que o uso do Boolean corre-se o risco de ocasionar nullPointer. você acha correto ?
olá Eduardo tudo bem? Fico muito feliz que gosta do video. Com relação ao primitivo, sim, é uma boa prática. Algo que, inclusive, se encontra no Effective Java. Além de nao lidar com problemas de NPE, vc também ganha na vantagem de uma melhor economia de memória e performance de processamento.
Your example gives us more cohesive classes/method, and eliminates the if, this means improving the performance and readability of the code and helping when doing unit testing, I am studying this in the solid principle and I'm really enjoying it. I knew your chanel via Elder's chanel. Thanks man!
Tem a versão em português também? Muitos brasileiros, principalmente estudantes que estão no ensino técnico de nível médio, podem aproveitar mais rápido essas novidades em português
Olá tudo bem? Infezilmente, não. Porém, tem a editora casa do código que foca no público brasileiro. eu tive o imenso prazer de escrever um livro sobre: www.casadocodigo.com.br/products/livro-apache-cassandra
I had the exact same discussion here. Company/Teams trying to create the first version of a microservice using a hexagon architecture with all ports and adapters (bunch of unnecessary layers) that does make sense to me. Of course , lost the fight with all “experts” in the room.
Whenever I discuss simplicity in the code, it is hard, mainly with the more senior people. Mainly because that means a new trick for learning. It is a challenging discussion.
It is my pleasure, and I am glad that you enjoyed it. The simplicity is still a considerable discussion, mainly with Java developers. But I hope one day we can discuss it more smoothly.
Ótimo vídeo, Otávio! Comentando/Falando da Bahia, Vitória da Conquista. Gosto mais do modelo/estilo do ModelMapper. No entanto, o mapstruct parece ser um projeto mais maduro e com uma comunidade maior.
Sim, o Mapstruct é muito mais maduro e o meu favorito. É um dos que mais uso em produção. Por isso, que eu também tenho um video sobre ele: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oT6AXGpgdGI.html
I'm thrilled to see someone discussing this topic. In one of my interviews, I struggled to explain to my interviewers why I should create an interface (or abstraction) when I'm not certain about the final contract's appearance. If you can imagine multiple ways to implement something while writing a specific class, then introducing an interface makes sense. Otherwise, it just adds complexity, like you mentioned, and can be seen as a delay layer.
I have a question! It makes sense I'm wrote a method "speak" with a String parameter that receive "portguese" or "english" so I can use switch case? And that method call another speakEnglish() or speakPortuguese()? Because in this case, I'm encapsulating the methods and clearing the option of the method speak.
The context will define it; for example, in our case, I had two languages with a super simple sentence. If I have more, I could use an enum that is more valid than a String, once I can put an invalid value in String, such as "Banana". If the logic became more complex, I could use the Strategy pattern, thus, a Language interface with some implementations.
Yes, it is a mix of several amazing books: - A philosophy of software design - Just Enough Software Architecture: A Risk-Driven Approach - Clean Code - Building Evolutionary Architectures: Automated Software Governance
My problem with lombok is that is one more dependency to our project, to maintain and keep up to date, to a new developer learn before being productive. If we used frameworks only when necessary, wouldn't be so dificult to keep up to date our dependencies.
yeap, but in this case it might happen with others dependencies as well. In this case, I enjoy a lot of the Dependabot. It will generate PRs with new version of the dependencies that you have in your project.
Basically I use @Builder annotation, However I've seen several blogs and opinions about avoiding @Data, if It uses Record class, it could be the good choice but in most of the cases you can't use the latest version of java. do you recommend Lombok in production projects?
Not by my decision, but I do have some projects using Lombok. In general, capturing the annotation that should not be used in the project is challenging. In this scenario, I prefer to use IDE templates instead, but it is fine to use in production; the issue is a long-term project.
When you instantiate an `ArrayList` without using it, it does consume memory, and it's better to use `java.util.Collections.emptyList()` if you don't intend to store any elements. However, when you plan to use it, `ArrayList` generally handles memory efficiently. It's crucial to be conscious of initial capacity, automatic resizing, and memory usage per element, particularly when dealing with large datasets or memory constraints. Properly configuring these aspects can help optimize memory usage while benefiting from the flexibility and convenience of `ArrayList`.
You can record as an entity with Spring Data and several NoSQL Java frameworks. The record works only with immutable entities, thus, in rare occasions.
Hey Avelino, thank you for that. It is a huge challenge on short because it is a short resolution, what I can do is a video about that. What do you think?
Nope, there frameworks that read annotations on build time such as Quarkus and Micronaut. another possibility is when you use annotation for documentation proposal.