Пікірлер
@grahaml6072
@grahaml6072 6 күн бұрын
JSON = JavaScript Object Notation not JavaScript Open Notation
@debugagent
@debugagent 6 күн бұрын
Damn, I have no idea how that got into there. Ugh.
@grahaml6072
@grahaml6072 6 күн бұрын
No worries we all make mistakes. Hope your channel gets some more views
@sirhenrystalwart8303
@sirhenrystalwart8303 10 күн бұрын
This is all so silly. Un-needed restrictions begets ridiculous over complication.
@debugagent
@debugagent 10 күн бұрын
Yes. There used to be a website called "do I need Kubernetes" it would always display "No". Kubernetes was designed to solve Google scale problems. This is a real need, but very few of us truly face it. I worked with a few companies who serve as infrastructure for other companies, in such situation downtime would mean a cascading effect that would bring down many sites. In such rare cases Kubernetes restrictions make some sense. Even in the places where it doesn't make sense it became the de-facto standard, and as such we need to know it. For better and worse.
@rommellagera8543
@rommellagera8543 27 күн бұрын
I hope also, one day, Devs doing manual testing makes a comeback, it forces you to system wide thinking and business domain knowledge You cannot properly test what you don't understand
@xorlop
@xorlop 27 күн бұрын
Hello Shai, Thank you for this clear and concise video! Deserves more views for sure :)
@IvanToshkov
@IvanToshkov Ай бұрын
I love this series! I can't believe it's not better known. I am a dev with several decades of experience and I find something useful that I didn't know about in every video so far.
@hmm1778
@hmm1778 Ай бұрын
In useDelimiter() use "System.lineSeparator()" instead of " " (it does not work on windows).
@berneface2622
@berneface2622 Ай бұрын
*promo sm*
@eav1ck
@eav1ck Ай бұрын
Thx for the video. What exactly is the difference of Jhsdb jstack vs old pain jstack?
@debugagent
@debugagent Ай бұрын
It's the same thing. It was all packaged under a single umbrella starting with Java 9.
@jaitramadandijeke6440
@jaitramadandijeke6440 Ай бұрын
Beautiful, thanks for sharing!
@hansgeorgzojer6345
@hansgeorgzojer6345 2 ай бұрын
a big disadvantage of a monolith in big applications still is, that you cannot upgrade individual parts of your application one by one. New hibernate version? All or nothing! New Spring version? All or nothing! Moving from jpa to jakarta persistence? All or nothing! New UI framework version? All or nothing! And you also need a very good test coverage or: all or nothing must be tested manually, unless you can afford production testing by the end user.
@debugagent
@debugagent 2 ай бұрын
I would argue those are advantages. It's a matter of perspective. E.g. on microservices we have a hodgepodge of versions and features with very little standardization. No enforcement or control. A new vulnerability comes out... Our team needs to go through everything and hope that everything is clear and documented. It might be reasonable if we have an army of developers but for a more moderate team just updating the main project pom is so much simpler. It's interesting that you mention testing... Integration tests are FAR simpler with a monolith, I barely need to set stuff up to get amazing coverage. With Microservices it means I need to bring up a cloud of complexity just for a simple integration test. Then there's the test failures which are absolutely unreadable. Unit tests are simpler in Microservices but that's a bit of a misdirection because they don't cover as much.
@higiniofuentes2551
@higiniofuentes2551 3 ай бұрын
Before this video, how to download, install spring? Gradle, Maven, ... What is this and why you selected Maven? Thank you!
@higiniofuentes2551
@higiniofuentes2551 3 ай бұрын
Thank you for this very useful video!
@higiniofuentes2551
@higiniofuentes2551 3 ай бұрын
After the compiling action is not very clear who's the best running, it seems JVM is twice faster? If is the case all others are wrong Graalvm is useless? Thank you!
@debugagent
@debugagent 3 ай бұрын
Not twice. In this particular class the speed was about 40% faster for Hotspot but to be fair, it's an edge case. Typically you won't see such pronounced differences and this was done with the CE version of GraalVM. If you use the full performance version (which is free now but wasn't when I was making this video) performance should be MUCH better. Notice that in my latest startup I wanted to use GraalVM and ended up skipping it after a while. It has amazing benefits but the issues related to longer CI cycles and problematic testing made it less appealing. But I'm keeping my eyes open and hopefully will use it in future projects: debugagent.com/building-gdocweb-with-java-21-spring-boot-3x-and-beyond
@higiniofuentes2551
@higiniofuentes2551 3 ай бұрын
Thank you for this very useful video!
@421sap
@421sap 4 ай бұрын
B''H Amen. God bless you, Shai.
@421sap
@421sap 4 ай бұрын
B''H Amen. God bless you, Shai Almog.
@421sap
@421sap 4 ай бұрын
B''H Amen. God bless you, Shai Almog.
@421sap
@421sap 4 ай бұрын
B''H Amen. God bless you, Shai.
@luciusartoriusdante
@luciusartoriusdante 6 ай бұрын
After working with microservices for almost a year now I was beginning to reconsider monoliths for new projects - moduliths sound like something I definitively want to learn more about!
@luisjavier5224
@luisjavier5224 6 ай бұрын
Thanks for your contribution
@bharathpasham
@bharathpasham 6 ай бұрын
Could you explain what you mean at kzbin.info/www/bejne/pqi0pGBpZZ2Cmrs (So this single line will result in two method calls and two object allocations when we only need to allocate one). You are saying we are creating two objects, but even if we do without operator overloading, we would still create two objects right?
@debugagent
@debugagent 6 ай бұрын
Sure. Lets say I have n = x + y + z; With operator overloading this will be: var temp = x.plus(y); n = temp.plus(z); If the type is BigDecimal or Long then it would include an object allocation. That's two method calls and a redundant temp object. With methods I could just write: n = x.plus(y, z); Which will add all three numbers and allocate one return object. That's more efficient. This becomes more pronounced when working with vectors and complex mathematical constructs that might need significant allocations.
@bharathpasham
@bharathpasham 6 ай бұрын
@@debugagent Thanks a lot for your reply. If we assume we are working we with BigDecimal, I am guessing your plus would like as follows BigDecimal plus(x,y) { var result = this.add(x); return result.add(y); } Are we not creating two new objects as well here? Sorry if I didn't quite follow your comment.
@debugagent
@debugagent 6 ай бұрын
@@bharathpasham BigDecimal is indeed a less ideal example because we can't change it and can't manipulate internal state easily (although manifold does allow that). Let's take the case of Vec which is 3 different values in which case the vec plus method would be implemented as: return new Vec(x + other.x, y + other.y, z + other.z); So we'd save on an allocation and on a method call.
@bharathpasham
@bharathpasham 6 ай бұрын
@@debugagent that makes sense! Thanks :)
@0xhhhhff
@0xhhhhff 6 ай бұрын
Great video!
@probuilderai
@probuilderai 7 ай бұрын
I have been around for just as long - not sure why their is an assumption that monoliths of old were not modular.
@debugagent
@debugagent 7 ай бұрын
Are you referring to things such OSGI or just informal project organization? Famously, monoliths at companies like Ebay, Amazon etc. were just divided based on layers and were difficult to maintain due to that division. OSGI garnered excitement, but I never ran into a project that actually used it for backend in all my years as a consultant. The main thing I'm talking about are standardized approaches for modularity that allow enforcing the module boundaries. These existed before but are only starting to gain awareness/traction recently.
@piyushmishra889
@piyushmishra889 7 ай бұрын
When number of microservices increases its become difficult to know where and in which repo you have the code to work with. A developer start coding in different repo when he sees new microservice
@alexisdamnit9012
@alexisdamnit9012 7 ай бұрын
Everyone who only read the title to Amazon’s article is on the monolith train
@ramireznoy
@ramireznoy 7 ай бұрын
I am failing to see how is any of that "different" this time... He is just describing any modular architecture. The vast majority of web Frameworks are constructed around those concepts from the beginning. Django, Symfony, Ruby on Rails and yes, also Spring. In fact, microservices are just an evolution of that modular architecture, the main difference been the ability to run it in a separated node. In a way, any monolith using a DB and some mailer service, is also a microservice architecture So, what's the new stuff?
@debugagent
@debugagent 7 ай бұрын
Historic monoliths were focused on layered architecture as opposed to standalone modules (similar to microservices). A company could rearchitect their monolith to use modules in the past but there was no way to enforce that efficiently and effectively. Spring Modulith (which recently reached 1.0) is a tool that both enforces that separation and provides a lightweight event bus (instead of MOMs). That's one thing that changed. Another thing is a change in mindshare. I figure that by now we all have enough real world experience with microservices, this has shown both the problems and the advantages of that approach. My second focus here is to show how the advantages can be a part of a monolith as well and are not exclusive to a microservice architecture.
@morgadoapi4431
@morgadoapi4431 8 ай бұрын
Weird that it took you so long to realize this.
@beachbum868
@beachbum868 8 ай бұрын
Microservices have no use case. It's just all baseless claims to adopt tech that increase tech budgets and head counts. People buy into this just don't know how to build servers or manage databases. They just break up all the modules into "microservices" and them blame ops when it obviously won't work or scale.
@debugagent
@debugagent 8 ай бұрын
I worked with a few companies who would disagree with that assertion. I agree that in most/many cases they are the wrong choice.
@beachbum868
@beachbum868 8 ай бұрын
@@debugagent i once fixed a company by turning their microservice architecture to monolith. They became a market leader and was bought out for $500 million. The company that bought them rebuilt the into microservives. It was dead 14 months after launch.
@debugagent
@debugagent 8 ай бұрын
@@beachbum868 that's a great story 🤣 I'm generally with you on the advantages of monolith over microservices, that's a huge part of what this video is about. I think a lot of the "scale" advantages have been overblown and a lot of the disadvantages are barely discussed.
@beachbum868
@beachbum868 8 ай бұрын
@@debugagent I'm not aware of any advantage that methodically breaking all your code up into small chunks of http daemons dispersed randomly through a data center brings.
@debugagent
@debugagent 8 ай бұрын
@@beachbum868 I have this counterpoint post where I discuss this: debugagent.com/when-should-we-move-to-microservices The TL;DR is this: * Microservices work only if you have a huge OPS team. They shift the complexity from developers to OPS and that has some advantages since OPS have some tools they can use for scale. They are more agile when things shift in production and can rearrange complex systems. * Microservices make sense when the natural data is there. E.g. when we have multiple existing systems that we need to interface with. Separating them into fault tolerant systems under our control helps. * They work well for huge teams but not for the case where people just "run off and do what they want". A good example is a stock merchant app. We need to interface with the bank API, the stock exchange etc. We can do this directly from our monolith but that would mean we need to encode a lot of logic about how the various banks and exchanges work. If something changes or breaks we might need to update that logic and redeploy. But having a smaller completely separate project that encapsulates each can mean faster release cycles. It can mean we can use ops tooling to scale up/down the specific APIs and handle shifting dynamics in a way that's seamless to other applications. It can also mean that a future feature such as a securities investment application can reuse some of these services "as-is" without modification. Just to be clear... I'm totally for monolith in 99% of the cases. But that 1% does exist. The problem is that a lot of RDD (Resume Driven Design) pushes towards bad choices to pad said resume...
@genericdeveloper3966
@genericdeveloper3966 8 ай бұрын
Good points. Though I'm learning k8s and terraform right now and will be making money in microservices as long as web apps are using that architecture.
@debugagent
@debugagent 8 ай бұрын
I think Kubernetes some very valid use cases in the very high end.
@kahnfatman
@kahnfatman 8 ай бұрын
Hello renegades! This video deserves a lot of deep thoughts. You struck on the nail regarding religious mindset -- Microservice Architecture is not the silver bullet for every company, but sure is for tech companies and tech agencies. What would they do they companies don't tear down their functional stuff??
@DivineMisterAdVentures
@DivineMisterAdVentures 8 ай бұрын
Has Monular / Modulith neo-architecture been responsible for the infuriating data drop we've been noticing growing in Corp Service Front-ends? Who you are and what you're responding to gets dropped entirely between an email link with full purpose and engagement, and you winding up on just another Home Page with another log-in. Typically. The dirty shell game is hiding the customer support, or the proffered "free" deal, or actual terms of service, or to opt-out of auto-renewal, etc. I would think Architecture plays no role. Maybe security, and for sure bait and switch.
@anjonsarker2374
@anjonsarker2374 8 ай бұрын
wow
@421sap
@421sap 8 ай бұрын
Amen. Thank you Shai!
@ReluctantSpirit
@ReluctantSpirit 8 ай бұрын
An excellent demonstration of git bisect. Small recommendation the audio can be more crisp/clear.
@debugagent
@debugagent 8 ай бұрын
Thanks. I think it's better in newer clips. I filmed this quite a while back.
@NilsonAguiar
@NilsonAguiar 8 ай бұрын
You mentioned a linter that would detect swallowed or unlogged exceptions, could you share which one does that?
@debugagent
@debugagent 8 ай бұрын
I use Sonar (cloud or qube). It's quite a bit more than a "linter" though... Highly recommended.
@blackfield11
@blackfield11 9 ай бұрын
thanks for the all series really informative!
@sudosai
@sudosai 10 ай бұрын
This is a gem of a playlist. Really loved the way you explained the topics with examples. This is something I will revisit multiple times during my career. Thank you for making this. :)
@debugagent
@debugagent 10 ай бұрын
Thank you!
@christianhowe979
@christianhowe979 10 ай бұрын
*Promo sm*
@debugagent
@debugagent 10 ай бұрын
Is that a question?
@ggir9979
@ggir9979 11 ай бұрын
I like the idea of asking candidates to debug an existing project. I guess it makes sense for them to explain the code they are reading? About the `How would you implement XXX?`, would giving it in advance not make you fall in the same pitfall as the `homework` assignment? For all you know they could get some help or spend an insane amount of time on the subject.
@debugagent
@debugagent 11 ай бұрын
Thanks. Yes it would fall to that problem. But when someone explains something don't take it as a lecture, take it as a conversation. Ask them questions back. If they got help that's OK because they would get help at work. If they got help and didn't understand the answer enough to explain it then they won't be able to discuss it. Since this is a very abstract problem I don't think spending a lot of time on it will give them an advantage. I don't want a written report. I think this only matters with take-home exercises where a developer literally codes the solution.
@richarddettinger
@richarddettinger Жыл бұрын
Thanks for this great series of videos. I really appreciate your time in making them and think more people should be watching them. I've used Lombok for a long time but was new to Manifold. It seems it isn't possible to use these both in the same project. When I add Manifold to a project that uses Lombok, the Lombok getters/setters seem to stop getting generated during builds. Is that always true or are there known ways to use the two solutions together? Basically I don't want to proactively remove all the Lombok code from a project but would like to take advantage of JSON processing for new features I'm adding. I'm working on a Spring Boot, Java 20 application is it matters at all. Thanks.
@debugagent
@debugagent Жыл бұрын
I don't have any information from @SM-vg7zl on this but even if it was supported I wouldn't mix Lombok and Manifold. The potential for a midair collision here is too risky. There are so many points where they both manipulate the same data. It's just not practical. What I would like to see is a Lombok compatibility layer. Supporting some of the top annotations from Lombok, maybe even with the Lombok package for ease of porting. This seems like something fun and probably not that hard since Manifold did most of the work already.
@SM-vg7zl
@SM-vg7zl Жыл бұрын
Thanks Shai
@user-ut7md1tz7h
@user-ut7md1tz7h Жыл бұрын
Very clear and solid explanation. It's nice to review my knowledge to better understand basics. Thank you.
@talisa4567
@talisa4567 Жыл бұрын
Awesome! 🙂
@SM-vg7zl
@SM-vg7zl Жыл бұрын
Agree completely with you regarding null. The simple fact is null is a natural state and should be modeled as such. NPE is my favorite exception when writing tests. If we have good test coverage, we shouldn't worry about null, right? ;) NPE is also my favorite exception in production, easy to track down and fix and follow up with tests. I'll take an NPE over corrupt data any time! One thing bad in Java concerning null that is definitely _not_ good is java.util.Optional. It is horribly misused, creates confusing/polluted code, and it itself can still be null! It brings with it much more pain than it displaces. Yet its popularity grows. Quite the trainwreck. In my view if Java were on the right track its designers would have integrated nullability directly into the type system as other languages have. This change is long overdue. Declaring the nullability of a field or parameter empowers the compiler to prevent the NPEs we otherwise write tests for. Absent this, I like how IntelliJ _infers_ nullability where, based on usage, the editor can determine whether a null check is required and warn accordingly. This is priceless. Java would also benefit from the `?.` operator, as you have pointed out in other talks. Perhaps null and nullability are other areas manifold could improve on? Cheers!
@debugagent
@debugagent Жыл бұрын
The subject of Nullability came up in the Manifold slack and it's a bit difficult. Hopefully it can add an operator like the .? which would be great. Nullability hints will probably come to Java as part of Valhalla: mail.openjdk.org/pipermail/valhalla-spec-experts/2023-May/002276.html IntelliJ and SonarQube already detect most cases of potential NullPointerException and also detect cases of redundant null checks (e.g. value is assigned with new operator and then != null is tested).
@continuousable
@continuousable Жыл бұрын
Imho types should be non-null by default, that would already prevent some bugs from being implemented. Other languages have implemented this language feature already, like Dart and also C# 8.0 as an optional setting.
@debugagent
@debugagent Жыл бұрын
@@continuousable Kotlin's feature is problematic. First off, it doesn't map into the VM. Without that you only get the restrictions without the performance benefits.With Valhalla Kotlin might be able to truly leverage this feature, but Java developers would be able to as well... These sorts of features only solve the "low hanging fruit". Null is problematic inside data (e.g. null element in a DB or a Map) at which point it bubbles up until it reaches a variable. Uninitialized variables are the easy things to spot and fix. Sometimes Kotlin will hit this during compilation which is nice. Luckily, IntelliJ is also smart enough to show such bugs in the IDE when we write Java code (so are tools like SonarQube). But it doesn't address the truly hard to fix bugs... With Kolin we have a special notation for nullable variables. But it solves very little in terms of the truly difficult real world bugs.
@user-ut7md1tz7h
@user-ut7md1tz7h Жыл бұрын
@@continuousable Well, author explained that non-nullable reference types are prone to errors that hard to detect. Just because that null state is masked with some probably meaningful value. NPE signals about bug, it is not a bug itself.
@MagnusSmith
@MagnusSmith Жыл бұрын
Might be worth pointing out the transition from switch statement to switch expression
@debugagent
@debugagent Жыл бұрын
I think I discussed it in one of the first videos in the series. But you're right, it's worth repeating.
@nagkumar
@nagkumar Жыл бұрын
Is it another form of AOP Aspect Oriented Programing
@debugagent
@debugagent Жыл бұрын
No. Manifold is a compile time language extension more similar to Lombok but with a cleaner architecture and MUCH wider scope. When you write code it appears that the method was added to the existing class. This is especially cool when you start working with other Manifold capabilities such as operator overloading etc.
@SAMathlete
@SAMathlete Жыл бұрын
This was a great video for me because I was already a bit familiar with exceptions, streams, and IO operations in Java. It helped see someone put them together to solve a problem. But I bet a complete beginner to Java would be in for a wild ride in this video. I don't mean that critically. I can appreciate how much ground you have to cover in a short time. Not an easy situation, but I think you did it well.
@sethbrown570
@sethbrown570 Жыл бұрын
I just stumbled upon this video quite by accident. Loved the content. I ended up watching other Java videos by Shai. The quality of the material is great. I subscribed right away so that it will show up in my feed. This video & channel needs a lot more viewers & subscribers. Java needs an evangelist like Shai. All the best to the creator of this video - Great work! And Thank you for all your work.
@debugagent
@debugagent Жыл бұрын
Thank you!
@rieckpil
@rieckpil Жыл бұрын
Great to see that you also educate about testing 🚀
@SM-vg7zl
@SM-vg7zl Жыл бұрын
Well done! Manifold is indeed multifaceted, but I like that your initial focus is on the type integration aspect such as the JSON module; this is at the core of manifold and what I consider to be revolutionary. It is sometimes difficult to "wake up" those in the vast majority of the dev community who tightly embrace conventional code generation. I appreciate your presentation here! Cheers.
@debugagent
@debugagent Жыл бұрын
Thanks! It's a very ambitious project and as such it's a challenge to explain it. My goal is to find the various "hooks" and explain them instead of explaining the project itself. Focus on the use case rather than on the solution.