The bld Power User
1:08:03
Ай бұрын
How Kotlin Happened
1:17:31
2 ай бұрын
How Azul Happened
1:26:47
3 ай бұрын
Pure Java AI
51:16
3 ай бұрын
How OpenRewrite Happened
1:02:05
3 ай бұрын
Пікірлер
@slartidan
@slartidan 20 сағат бұрын
Documented is documented?
@pmorah
@pmorah 22 сағат бұрын
Hi. Why would anyone annotate a class with same annotatio twice? Do you have any use case? Thanks Adam
@slartidan
@slartidan 20 сағат бұрын
If you want to bind the same java method to two HTTP URL patterns you might want to annotate it twice. Just as an example - I don't even know if it would work 😁 So basically it often makes sense, if the annotation has fields. The exact same annotation twice (as in the video) is indeed questionable.
@bienadam
@bienadam 19 сағат бұрын
I wanted to annotate a class with multiple references to a spec: @SpecReference(document = Documents.JAVA_ROCKS,chapter = "13") @SpecReference(document = Documents.DUKES_ADVENTURES,chapter = "42") This is how the idea for this short was born.
@pmorah
@pmorah 4 сағат бұрын
@@bienadam got it. Thank you
@TheEliteGentleman
@TheEliteGentleman 22 сағат бұрын
Makes perfect sense now.
@TampaPirate
@TampaPirate Күн бұрын
Awesome
@vivekravi827
@vivekravi827 Күн бұрын
Is this feature available in JDK21?
@bienadam
@bienadam Күн бұрын
Annotations were introduced with Java 5 / 1.5: docs.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/Documented.html ...in 2004. Thank you for watching!
@memyselfandi3202
@memyselfandi3202 2 күн бұрын
Fully agree on the 'professional code'. Should be easy to read, easy to debug and easy to write tests for.
@user-ed1nw6vr8n
@user-ed1nw6vr8n 2 күн бұрын
I don't even do java but i learned alot from you, this will help me alot when i actually learn java. Thanks for great content
@dylangrijalva944
@dylangrijalva944 2 күн бұрын
What font are u sing?
@markusschmidt9425
@markusschmidt9425 2 күн бұрын
from an old man to other old mans :-) i think you are searching for the thrustmaster joysticks :-) the best sticks in the prehistoric time
@bienadam
@bienadam 19 сағат бұрын
Old? You confused the podcasts :-) Thrustmaster! Exactly! It was decades before I was born, my grandmother told me stories about it... :-)
@TBRoT-zo4kh
@TBRoT-zo4kh 2 күн бұрын
long time no see😊
@sergeyshvyrev969
@sergeyshvyrev969 3 күн бұрын
O_o!!! ))))
@satyarthtiwari7750
@satyarthtiwari7750 4 күн бұрын
Mine too fav language, can you please guide us and create one tutorial on how to become a skilled developer like you Adam!!! Plzzz I am a beginner and want to pursue a career in Java development.
@bienadam
@bienadam Күн бұрын
Attend airhacks.tv (Q&A livestream) and ask questions: kzfaq.infolive Also: join: discord.gg/airhacks and ask questions.
@selvakumart6219
@selvakumart6219 5 күн бұрын
Your explanation was neat!!! Do you have any playlist explaining all features of Streams?
@ievgenmajor3301
@ievgenmajor3301 6 күн бұрын
We saw bulshit. Use JMH for benchmark
@slartidan
@slartidan 7 күн бұрын
One of the few situations, that (indeed) are better without var.
@bienadam
@bienadam 7 күн бұрын
+1 It is indeed an exception from the rule in my project. Thanks for watching and commenting!
@kennedymbogo542
@kennedymbogo542 7 күн бұрын
I think its time I also minimize its usage. my code precicely variables declared inside methods are all using it.
@thoaikieu5707
@thoaikieu5707 7 күн бұрын
Should I always use Api Files which is available since version 1.7?
@saila456
@saila456 7 күн бұрын
Call me a Boomer but I think in most cases non-var is better
@MarkJaeger
@MarkJaeger 7 күн бұрын
It's a bit of "this is what I am used to doing." Using var does remind us that the type of a variable is determined on the right side of the declaration, not by the type that we declare on the left, which can be a superclass or interface.
@MarkJaeger
@MarkJaeger 7 күн бұрын
Full disclosure, I was born in 1951, so I am pretty much the definition of a Boomer.
@slartidan
@slartidan 7 күн бұрын
Do you have another example, where non-var is better than var?
@atha2
@atha2 7 күн бұрын
@@slartidaneverywhere you store the result of a function
@TheBigLou13
@TheBigLou13 6 күн бұрын
I also prefer to *always* use the actual type instead of var, because it makes it easy and clear to see what you're dealing with. If you look at the code at a later point in time you sometimes have no idea what kind of class you're dealing with and what options/methods you have available with it. If you see the Type you immidiately know how the thing works.
@pawanprasoonmishra1140
@pawanprasoonmishra1140 8 күн бұрын
Where ‘world’ went ?
@mm3200
@mm3200 8 күн бұрын
Line after it added "hello" after "world", and next line after it added "duke" before "world". So "world" wasn't first or last element in collection.
@daripher
@daripher 8 күн бұрын
He didn't print all the elements of the array, only first and last.
@blankbox33
@blankbox33 8 күн бұрын
mind blowing and very inspiring podcast..
@devdavkup
@devdavkup 9 күн бұрын
Fix the location of the camera video, on mobile devices it is overlapped by the KZfaq interface
@abdushakoor0099
@abdushakoor0099 9 күн бұрын
Nice
@hammadhassan167
@hammadhassan167 9 күн бұрын
How can interface contain a main function? Is it a new update?
@stocothedude
@stocothedude 10 күн бұрын
I recently used the sdk http client as well and its great! I want to try the apache httpclient one day
@bienadam
@bienadam 9 күн бұрын
The built-in Java HttpClient is a good place to start. I would only use 3rd party libraries for very specific use cases. "No dependencies, no problems. " Thank you for watching!
@memyselfandi3202
@memyselfandi3202 10 күн бұрын
Also started out with Java and J2ME developing games for Mobile devices back in the Mid 2000s. Also can remember when Bluetooth came up and trying to write the first multiplayer game for Siemens. A the wonder years of craming a game into a 64kb/200kb jar file with all the assets and not way to patch them.
@jimishukurow2286
@jimishukurow2286 11 күн бұрын
Nice!
@rydmerlin
@rydmerlin 11 күн бұрын
Please separate the educational content and non-education context in your playlists ;-)
@MarkJaeger
@MarkJaeger 11 күн бұрын
What isn't educational about learning how Instant works? Using Calendar was a pain.
@rydmerlin
@rydmerlin 11 күн бұрын
@@MarkJaeger Apologies for the confusion but I'm just commenting here in general not specifically to this video. Just a video associated with his playlist. The "meet and greet" videos are what I would call non-educational and I'd prefer those were separated from this playlist.
@prasoonmishra3959
@prasoonmishra3959 12 күн бұрын
Thank you 🙏
@jack9171
@jack9171 12 күн бұрын
is there any reason why of factory method is not taking varargs
@MarkJaeger
@MarkJaeger 11 күн бұрын
Map.of has just eleven overloaded methods. You just enter key/value pairs. With Masp.ofEntries, you have to instantiate entries.
@ShinMugenNoKabe
@ShinMugenNoKabe 12 күн бұрын
Very nice to have specially when you have so many key-value pairs that you want to add that you start to lose track of what you put...
@karthikrajasangaiah1168
@karthikrajasangaiah1168 14 күн бұрын
You can make use of Externalizable instead
@happydev512
@happydev512 15 күн бұрын
Thank you the video!
@khalilelemam1349
@khalilelemam1349 15 күн бұрын
Is it useful. I can't think of a use case for this. Also i have another question..when you are customizing the obj at the read or write. Is it the same object or it just returning a new object?
@walterwatz-vy2re
@walterwatz-vy2re 15 күн бұрын
Unfortunately is not a concurrent run... And the double use of runnable is at least misleading... And what will you do if you runable implements more than one line without yielding in unreadable code?
@shankyboiman
@shankyboiman 16 күн бұрын
How can we write main in an interface?
@tharteon1866
@tharteon1866 17 күн бұрын
Try more complex scenarios, branch predictions in a loop so tight might optimize all the branches, or almost all of them. If you made a more complex program the compiler might not predict it so well. Try adding some other branches inside the loop and other stuff, stimulating a real scenario, and most probably it won't be so efficient.
@MarkJaeger
@MarkJaeger 16 күн бұрын
OK, but complexity is not a desirable design
@tharteon1866
@tharteon1866 16 күн бұрын
@@MarkJaeger its not about "complex design" is about complex branching. In a real program, when dealing with loops, usually there are several branches inside a loop. Either normal ifs, switches, vtables, etc. This branching complexity might considerably reduce the prediction of branches, therefore using these operations will notably reduce performance. STILL this is bullcrap in a real application, only relevant for extremely hot code. This seems fine overall. I just program real time applications and I know I wouldn't use these for hot code.
@MarkJaeger
@MarkJaeger 16 күн бұрын
@@tharteon1866 your branching within loops sounds like a direct violation of the Single Responsibility Principle. Hence my reference to design issues.
@tharteon1866
@tharteon1866 16 күн бұрын
@@MarkJaeger Don't be mistaken, dynamic dispatch is also a type of branch. What you call single responsibility is basically an application of OOP inheritance or interfacing. When dealing with multiple implementations of a method, then we are also dealing with dynamic dispatch, which is a type of branching, which will lead to failed branch predictions anyways.
@bienadam
@bienadam 16 күн бұрын
I suggest the following: write simple and clear code, measure performance, improve if necessary. Is this a good strategy? Good discussion by the way. Thanks for watching and commenting!
@IgorYegorkin
@IgorYegorkin 17 күн бұрын
Nice result. Maybe because x86 architecture is great and CPU already checks integer overflow.
@bienadam
@bienadam 17 күн бұрын
ARM seems also to do well. I recorded this video on an “Apple Sillicon” (ARM). Thanks for watching!
@IgorYegorkin
@IgorYegorkin 17 күн бұрын
Actually in my case difference is random and sometimes is equal to 100 ms on x86 CPU
@madcabbage3535
@madcabbage3535 17 күн бұрын
Is there any difference between data types. Does one perform better than the other fpr certain data types or maybe addExact is worse for floating point double and float
@walterwatz-vy2re
@walterwatz-vy2re 17 күн бұрын
Strasse ist keine Alternative, sondern einfach falsch, Antwort hatte sein müssen: false
@bienadam
@bienadam 17 күн бұрын
…now we have to patch the JDK… Seriously: I recorded this short with the weakest “strength” (docs.oracle.com/javase/8/docs/api/java/text/Collator.html#setStrength-int-). A test with the other strengths (e.g. SECONDARY) is failing. Thanks for watching!
@WalrusWarrior
@WalrusWarrior 17 күн бұрын
List.of returns unmodify list. Nice trick!
@bienadam
@bienadam 17 күн бұрын
Thank you!
@daripher
@daripher 18 күн бұрын
I'm just never using `var`. It makes code unreadable in most cases, especially outside of IDE.
@bienadam
@bienadam 17 күн бұрын
+1 If you cannot always rely on IDE - then you have to be more careful with the “var”. I’m using VSC all the time.
@reeeeel2858
@reeeeel2858 18 күн бұрын
Wow that's great , I'll try it
@bienadam
@bienadam 17 күн бұрын
It’s interesting, right? Thanks for watching!
@mkrgl
@mkrgl 19 күн бұрын
You can use: print(Map.<String, Integer>of());
@bienadam
@bienadam 17 күн бұрын
+1 you are right, but I would prefer to declare a variable without the "var" in this case. Thanks for watching!
@slartidan
@slartidan 19 күн бұрын
"this." for field access does not improve the readability in this case, in my opinion.
@petraubrecht7762
@petraubrecht7762 19 күн бұрын
Introduced as "this will be used only in complex types in streams", but really used to make Java more similar to JavaScript - pretending, that you don't need to care about types 😔 It gave up the clarity of Java code.
@axoloth
@axoloth 19 күн бұрын
Wow that's nice
@booyesum1730
@booyesum1730 20 күн бұрын
I’m currently learning l10n and i18n in Java, and I’m also studying A1 German so this is a perfect short! Danke!
@bienadam
@bienadam 17 күн бұрын
Thank you for watching and commenting!
@walterwatz-vy2re
@walterwatz-vy2re 13 күн бұрын
@@booyesum1730 if you learn German, that just take in mind, Strasse is simply wrong!
@booyesum1730
@booyesum1730 13 күн бұрын
@@walterwatz-vy2re Ich weiß 🙂
@zahidahmed7043
@zahidahmed7043 20 күн бұрын
Nice. Keep up the good work.
@bienadam
@bienadam 17 күн бұрын
Thank you for watching. Recording Java shorts is fun :-)
@stocothedude
@stocothedude 20 күн бұрын
very cool feature! thank you for showing
@bienadam
@bienadam 20 күн бұрын
Thank you for watching!
@pauldaly1yt
@pauldaly1yt 20 күн бұрын
Files is a great class!
@bienadam
@bienadam 17 күн бұрын
The best for file handling :-) Thanks for watching!