Scoped Values in Java 22

  Рет қаралды 1,144

Will Tollefson

Will Tollefson

Күн бұрын

Пікірлер: 19
@willtollefson
@willtollefson 9 ай бұрын
What do you think of scoped values? Do you foresee using these instead of ThreadLocal?
@NatiShen
@NatiShen 9 ай бұрын
I just found out about this channel. This is PURE GOLD for advanced Java tutorials!!!
@willtollefson
@willtollefson 9 ай бұрын
Thank you, I appreciate the support!
@probiskksiborp
@probiskksiborp 9 ай бұрын
thank you!
@DenaTollefson
@DenaTollefson 9 ай бұрын
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!
@willtollefson
@willtollefson 9 ай бұрын
Thanks! I still have more experimenting with Java 22 to do, so more videos to come on that
@malloryranae8069
@malloryranae8069 9 ай бұрын
Thanks for another great video!
@willtollefson
@willtollefson 9 ай бұрын
My pleasure!
@NatiShen
@NatiShen 9 ай бұрын
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 ?
@willtollefson
@willtollefson 9 ай бұрын
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?
@NatiShen
@NatiShen 9 ай бұрын
@@willtollefson I'm talking about socket programming.
@willtollefson
@willtollefson 9 ай бұрын
Got it - I'll plan to do a video on that in the near future!
@ZeBeaupre
@ZeBeaupre 9 ай бұрын
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.
@willtollefson
@willtollefson 9 ай бұрын
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!
@ZeBeaupre
@ZeBeaupre 9 ай бұрын
@willtollefson what resources did you use to learn Java with this much depth and what, if any, certifications do you have?
@willtollefson
@willtollefson 9 ай бұрын
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.
@arghyamitra3281
@arghyamitra3281 8 ай бұрын
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
@willtollefson
@willtollefson 8 ай бұрын
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
@arghyamitra3281
@arghyamitra3281 8 ай бұрын
@@willtollefson thank you
Java Network Sockets + Virtual Threads = Cool!
26:54
Will Tollefson
Рет қаралды 1,7 М.
Are You Using This NEW Java Feature?
18:01
Will Tollefson
Рет қаралды 614
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Are You Using Java's Parallel Streams Correctly? - Java Programming
13:34
Sealed Classes and Interfaces - Java Programming
11:21
Will Tollefson
Рет қаралды 2,4 М.
Virtual Threads in Java 21
17:22
Will Tollefson
Рет қаралды 6 М.
38. Java VirtualThreads vs Normal Threads || ThreadLocal in Java
22:44
Concept && Coding - by Shrayansh
Рет қаралды 16 М.
The Factory Design Pattern In Java
10:49
Will Tollefson
Рет қаралды 3,2 М.
Deep Dive with Java Records with Jason Young
29:39
SpringDeveloper
Рет қаралды 10 М.
Socket Programming with Java NIO - Channels, Selectors, and Buffers
38:00
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН