What do you think of scoped values? Do you foresee using these instead of ThreadLocal?
@NatiShen9 ай бұрын
I just found out about this channel. This is PURE GOLD for advanced Java tutorials!!!
@willtollefson9 ай бұрын
Thank you, I appreciate the support!
@probiskksiborp9 ай бұрын
thank you!
@DenaTollefson9 ай бұрын
Great video, Will! It looks like ScopedValue would be very helpful in avoiding some of those ThreadLocal issues which can crop up. I like how you are helping us navigate the new JDK 22 functionality as it comes out and becomes available!
@willtollefson9 ай бұрын
Thanks! I still have more experimenting with Java 22 to do, so more videos to come on that
@malloryranae80699 ай бұрын
Thanks for another great video!
@willtollefson9 ай бұрын
My pleasure!
@NatiShen9 ай бұрын
Could you do any tutorials about networking in Java ? I really feel like there aren't any good ones online. Also, could you explain to me when we should use optionals VS when to use try - catch ?
@willtollefson9 ай бұрын
Good ideas! Quick question on the networking side of things. There is A LOT in the world of networking. Are you looking for something like Java socket programming, or something more specific like evaluation of a particular protocol, framework, or process?
@NatiShen9 ай бұрын
@@willtollefson I'm talking about socket programming.
@willtollefson9 ай бұрын
Got it - I'll plan to do a video on that in the near future!
@ZeBeaupre9 ай бұрын
Hey Will! I've been programming since around 13 years old but have never been in a professional environment. What would you suggest I do to get into the Software Engineering field if I don't have any certifications yet.
@willtollefson9 ай бұрын
Good question! Here are some of my general thoughts: 1. While its possible to get into the field without any degrees or certifications, some formal training at a respected institution does go a long way. A lot of companies require a degree, so when scanning applications for example the recruiters (or the AI) might throw out the app quickly if it doesn't have a degree even if the candidate is an awesome programmer. 2. If a formal degree isn't an option, then I'd recommend effectively "building up" your reptuation. This could include things such as having a personal repository (e.g. github) with projects, or it could be applying your programming ability in your current role. 3. Build your network. If you surround yourself with people who have your best interests in mind and they have connections as well, there might be a referral opportunity, which can carry a lot of weight. 4. Decide whether you want to focus on being an expert in fewer areas or a generalist in many. I personally advocate for becoming an expert first so that you have a deeper understanding of one programming domain rather than knowing a little bit about a lot of things but not enough to bring sufficient value to an organization. This approach isn't without risk though because you could end up gaining expertise in an area that isn't hiring or you might have a harder time differentiating yourself on paper. Hope this helps!
@ZeBeaupre9 ай бұрын
@willtollefson what resources did you use to learn Java with this much depth and what, if any, certifications do you have?
@willtollefson9 ай бұрын
I don't have any formal certifications, though I've thought about getting some. Most of my experience comes from a combination of industry experience and personal projects. A lot of my more in depth exploration of Java came after I spent some time in other programming languages and started questioning why Java did things the way it did. Reading the JDK documentation and associated source code can help a lot. Another thing that helps is being able to look at the generated byte code to see how the compiler is interpreting your source code when performance is a concern.
@arghyamitra32818 ай бұрын
Great video as always 💯 . I do have a question, with this pattern how to use it in say in servlet filters where I want to set a value and based on that I want to use DB or some operations ( maybe pattern used in multi tenant app) . Can we wrap the doFilter method in scoped value not sure
@willtollefson8 ай бұрын
It would depend on the implementation details of the framework. If you’re calling in and out of the framework and you can guarantee you’re doing so with the same thread (or a child thread) then yes you could use this pattern, and I would actually recommend it so that the code is cleaner and you solve any concurrency issues that something like ThreadLocal may have solved in JDK 1.2