Scoped Values in Java 22

  Рет қаралды 917

Will Tollefson

Will Tollefson

Күн бұрын

Пікірлер: 19
@willtollefson
@willtollefson 6 ай бұрын
What do you think of scoped values? Do you foresee using these instead of ThreadLocal?
@NatiShen
@NatiShen 5 ай бұрын
I just found out about this channel. This is PURE GOLD for advanced Java tutorials!!!
@willtollefson
@willtollefson 5 ай бұрын
Thank you, I appreciate the support!
@DenaTollefson
@DenaTollefson 5 ай бұрын
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 5 ай бұрын
Thanks! I still have more experimenting with Java 22 to do, so more videos to come on that
@malloryranae8069
@malloryranae8069 5 ай бұрын
Thanks for another great video!
@willtollefson
@willtollefson 5 ай бұрын
My pleasure!
@probiskksiborp
@probiskksiborp 5 ай бұрын
thank you!
@ZeBeaupre
@ZeBeaupre 5 ай бұрын
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 5 ай бұрын
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 5 ай бұрын
@willtollefson what resources did you use to learn Java with this much depth and what, if any, certifications do you have?
@willtollefson
@willtollefson 5 ай бұрын
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.
@NatiShen
@NatiShen 5 ай бұрын
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 5 ай бұрын
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 5 ай бұрын
@@willtollefson I'm talking about socket programming.
@willtollefson
@willtollefson 5 ай бұрын
Got it - I'll plan to do a video on that in the near future!
@arghyamitra3281
@arghyamitra3281 4 ай бұрын
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 4 ай бұрын
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 4 ай бұрын
@@willtollefson thank you
Java Network Sockets + Virtual Threads = Cool!
26:54
Will Tollefson
Рет қаралды 1,1 М.
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 2 МЛН
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 16 МЛН
Busting the serverless myth
6:23
AJ Stuyvenberg
Рет қаралды 1,1 М.
Socket Programming with Java NIO - Channels, Selectors, and Buffers
38:00
Java Concurrecy: Volatile vs Atomic - Java Programming
10:50
Will Tollefson
Рет қаралды 2,8 М.
Unlocking Performance: Exploring Java 21 Virtual Threads
9:53
Otavio Santana
Рет қаралды 1,1 М.
The Singleton Design Pattern In Java
15:21
Will Tollefson
Рет қаралды 749
Structured Concurrency in Java 21
14:52
Will Tollefson
Рет қаралды 1,6 М.
Virtual Threads in Java 21
17:22
Will Tollefson
Рет қаралды 4,7 М.
Are You Using Java's Parallel Streams Correctly? - Java Programming
13:34
Java ThreadLocal
14:36
Jakob Jenkov
Рет қаралды 36 М.
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 2 МЛН