Parameter and Variable Tooltips in Visual Studio In 10 Minutes or Less

  Рет қаралды 23,943

IAmTimCorey

IAmTimCorey

Күн бұрын

Пікірлер: 79
@Coder-ev4xc
@Coder-ev4xc 3 жыл бұрын
Everytime I get notified about a new video I watch it. It's s great way to keep updated as a developer
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Happy to hear that!
@Thinus1986
@Thinus1986 3 жыл бұрын
@@IAmTimCorey a
@TheCameltotem
@TheCameltotem 2 жыл бұрын
amazing.. These are the stuff that are gold nuggets. You can't learn this on the own really, you have to have someone knowledge it for you. Thank you
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@a.porteghali7402
@a.porteghali7402 3 жыл бұрын
I really appreciate your attention to make Visual Studio environment much more comfortable for us. This option is brilliant and so is the CodeStyle-Naming-Underscore (In DI tutorial I think).
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@DanielLiuzzi
@DanielLiuzzi 3 жыл бұрын
Some colleagues using this feature would often write code like this: Greet("Tim Corey”, false); What "false" means might be clear _to them_ but everyone else is clueless. This is especially bad when reviewing PRs, as you're normally not in VS. Named arguments are the real solution IMO; they work both inside VS and out, and add clarity to all, not a select few. Please keep these 10 minute series coming. Love your content!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for sharing.
@roko567
@roko567 3 жыл бұрын
Flag parameters are most of the times a good indicator that a function should really be two different functions
@vincentverweij1053
@vincentverweij1053 3 жыл бұрын
Again, I love these short videos, and by that I don't mean it like an Instagram story kind of way. I took it for granted that this was a ReSharper feature, and look it is baked in into Visual Studio. Thanks for sharing Tim!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad you like them!
@scotolivera8207
@scotolivera8207 3 жыл бұрын
this series are very very very helpful, to be honest and the 10 minutes version make it even better thanks
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@brianviktor8212
@brianviktor8212 3 жыл бұрын
Thinking about it, this is a feature that come in handy for me. It would allow me to easily detect issues with how I provide parameters. For example if I provide "item.NickName" and the parameter name of the constructor is "password", I can easily see there is something wrong going on. It would also put a higher emphasis on properly naming parameters. Great explanation, as always.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@christopherbaldwin1194
@christopherbaldwin1194 3 жыл бұрын
Man I was always wondering how you did that! Great great video! Helps out a lot with large code
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad you liked it!
@Laiteux
@Laiteux 3 жыл бұрын
Hello Tim and thanks for all of your awesome videos, the "10 minutes or less" series has been really pleasuring to watch! I wanted to ask you a question though: Do you plan on covering every new feature in C# 10 & .NET 6 on your channel? Asking because you seem to be more than half way there, and I think it would be really nice to have videos covering every of these changes! Thanks!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Every feature? Probably not. A lot of them, though. Feel free to ask for the ones you want to see.
@SteveFarmerJr
@SteveFarmerJr 3 жыл бұрын
Good stuff! Like the hinting for var! Thanks for pointing that out!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@christianista
@christianista 3 жыл бұрын
Using VS since years and didn't know that, thanks.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
It has only been around for about a year or so.
@cakdham4607
@cakdham4607 3 жыл бұрын
I like your content before, but your xurrent short content is amazing
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@gaurlglmistrz
@gaurlglmistrz 2 жыл бұрын
Thanks, Tim! Just an opinion about the inline type hints - I think it defies the proper convention of using var keyword vs explicit type declaration. Although in other context it may be useful. It's great we have a choice though! Hope it's disablet by default ;).
@harrylyod3402
@harrylyod3402 3 жыл бұрын
Nice one thanks Tim
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@AdityaBodake
@AdityaBodake 3 жыл бұрын
Nice hints. Thanks for sharing.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@tangle5511
@tangle5511 3 жыл бұрын
reallly really heplfull!.. Thank you very much.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@Tsunami14
@Tsunami14 3 жыл бұрын
Nice feature, though I'd still prefer to avoid ambiguity of passing constants to functions (even if that means throwing it into a meaningfully named variable first) for the benefit of those viewing the code outside of Visual Studio. (e.g. Github, file diffs)
@maxpowerxterminator
@maxpowerxterminator 3 жыл бұрын
That's pretty cool! Thanks for this video, that was short and sweet! I'm going to use that tool for sure! ;)
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@robertcahoon5278
@robertcahoon5278 3 жыл бұрын
Isn't the same into available in the method signature help?
@OnlyBESTClub
@OnlyBESTClub 3 жыл бұрын
5:06 "There's only so many ideas out there". Hehehe. I love your sense of humour.
@SaveTheHedgehog
@SaveTheHedgehog 3 жыл бұрын
Thanks Tim 👍🏻
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@allenhalsted4895
@allenhalsted4895 3 жыл бұрын
Both of these are on by default in Rider. I actually didn't know that VS even supported it. I do have to use VS for work so thanks for the tip.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@Ben-nc9qw
@Ben-nc9qw 2 жыл бұрын
I prefer named parameters for use outside of IDE such as diff tools and source control servers, however a neat option with these tool tips is that if you double-click on the tool tip it will insert a named parameter for you: - var result = SayHello(firstName: "Tim", lastName: "Corey");
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks for sharing.
@Md-sx8zo
@Md-sx8zo Жыл бұрын
Can you make a video on how to do this same thing in c++.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Sorry, I don't cover C++. While I know it, I haven't used it in years.
@Md-sx8zo
@Md-sx8zo Жыл бұрын
@@IAmTimCorey Oh ! It's OK sir and thanks for replying.
@BK-19
@BK-19 3 жыл бұрын
Hey nice idea.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
It is nice to have the option.
@davidwhite2011
@davidwhite2011 3 жыл бұрын
2019 and 2022 Visual Studio both have a bug on my machine that has these floating all over the place. On different screens, over WinForms windows. They would be great if they worked with multiple monitor set ups.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Interesting. Make sure to report it. I haven't seen that and I use multiple monitors too.
@mb-ql1gb
@mb-ql1gb 3 жыл бұрын
This is exactly the feature I missed some days ago ... ! Display inline parameters ...
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great!
@davidspencer3726
@davidspencer3726 3 жыл бұрын
Nice feature. I wonder if there's a setting where I can stop Visual Studio typing stuff for me that's wrong, then whingeing at me because the wrong stuff it typed was wrong? e.g. say you've got some text you should have put in quotes. You're at the end of the line, so you go back to the end of the string and type ", then you go to the start of the string and type ". Now Visual Studio is whingeing at you because the first " you typed it went "it looks like you're writing a string" (Yay! Clippy lives!) and wrongly added another ". It's worse than the bad old days of editing code in vi; every time you press a button you have to nervously look back up at the screen to see if you'd accidentally left it in command mode and how it'd trash your code as a result.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Wow, it sounds like you need to be looking for a tool that better fits your style.
@mikebreeden6071
@mikebreeden6071 2 жыл бұрын
Hey, isn't that type thing an argument for Hungarian notation?
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
No, but I’d be interested in your thoughts on why it might be.
@mikebreeden6071
@mikebreeden6071 2 жыл бұрын
@@IAmTimCorey Because setting the type like that shows the value of knowing that type metadata about the variable. (I love metadata.) With Hungarian notation, you are using a symbol or abbreviation instead of using VS to show the same type metadata. (and then you don't even have to "mouse over it for VS to show it to you"). At the risk of some minor embarrassment, I still like using the old class name notation like c_MyClass and wherever possible the instance is then cMyClass (but the embarrassment is starting to get to me). My code is all written for maintainability and is supposed to read like a story. It might look a bit non-standard I guess but it's easy to read and works like gangbusters. PS. I'm doing a quick skills update to .Net 6... This is the place to do it. Thanks!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Ultimately, it comes down to who is using it. If it is just you, go for it. If it works best for how you think and read then that's fine. However, the goal of not having Hungarian notation is that it reads more cleanly and easily. person.FirstName = "Tim" reads more easily than cPerson.strFirstName = "Tim". The tooltips are designed to not be read when scanning (they are grey and smaller) so that the code is still easily readable but when you stop to focus in on a variable, you know more about it. You can also turn them off easily. Neither of those really apply with Hungarian notation.
@mikebreeden6071
@mikebreeden6071 2 жыл бұрын
@@IAmTimCorey I'm going to bow to your expertise but it works well for me and worked very well for the person that took over the system... probably because I do it so consistently that it is easy to use and provides a minimal distraction. I do feel in such a minority at this point that I am moving to the more common notation you show... but the change can be hard after many years of doing it one way.
@agsystems8220
@agsystems8220 3 жыл бұрын
It's nice, but I wish toggling it wasn't buried. I want this to appear when I am specifically querying 'what are my types', or 'what is this type'. I don't want the choice between not telling me the type and always telling me the type, I want to easily be able to ask it to show me the types when I want them because the majority of the time I am confident of them already and it is just visual clutter. When something isn't doing what I think it should be then my first question is whether some type isn't what I think it is. I think I would usually turn it off again after a few minutes, and having to dig to get to the checkbox again seems needlessly longwinded. I guess what I am saying is that the ergonomics of it suggest they expect it to be a static user preference, rather than a dynamic tool for changing the view to make answering specific questions about the code easier, which is how I would want to use it. It is analogous to switching between matcap and material settings in blender. They are good for understanding slightly different aspects of your model, so users are expected to switch between them. In blender it is a one click operation with keyboard hotkey.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for sharing.
@richardkrauss80
@richardkrauss80 3 жыл бұрын
Use the Alt+F1 option?
@JoeLizFamily4
@JoeLizFamily4 3 жыл бұрын
Good for when working with new code. I'll turn it off once I have worked with the code for a while.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Sounds like a good plan.
@yomer355
@yomer355 3 жыл бұрын
The description is from a wrong video
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Fixed it. Thanks!
@ardit9988
@ardit9988 3 жыл бұрын
#KOSOVO 👋
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
👋 from Texas.
@ernest1520
@ernest1520 3 жыл бұрын
This is one of the features that I personally don't like. In my opinion it introduces too much noise in the code. There are other ways of checking what value binds to what parameter, and having this information available at a glance all the time seems unnecessary. If someone has long list of parameters in a single method/constructor then there are refactoring ways of making such code cleaner.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
This doesn't actually change your code, but if you don't like the additional visual, you don't have to turn it on.
@ernest1520
@ernest1520 3 жыл бұрын
@@IAmTimCorey yes of course, I wasn't suggesting that it's changing the code per se. It's more about readability of the code, which can be affected by additional visual features such as this one mentioned here. And yes, I have it disabled since it was shipped with VS 2019, which iirc had this feature enabled by default.
@pedersenlasse
@pedersenlasse 3 жыл бұрын
To each their own, but personally I find these hints extremely annoying. Some of my co-workers use it, and it's nearly impossible to reason about the code when you have these labels obscuring everything.
@poteb
@poteb 3 жыл бұрын
I think they take up too much space on the line. Then some programmers start breaking the lines to see everything, just because they want to see the variable names all the time. I think that's dumb.
@RafeSmith4Life
@RafeSmith4Life 3 жыл бұрын
This feels like cheating 😉 Thanks for the “hint”
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@maheshjustmahesh
@maheshjustmahesh 3 жыл бұрын
Again lengthy video, can be shown as a youtube short. If not short video, the concept explained in this video is a 1 minute content or multiple similar tips can be together made as a 5 minute video. My intent is not to make any negative comments on master, I just want to say a feedback point based on my opinion.
@josda1000
@josda1000 3 жыл бұрын
I rarely watch shorts, i can't stand the auto repeat.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
At this point, I'm not investing in shorts.
Implicit Usings in .NET 6 In 10 Minutes or Less
8:41
IAmTimCorey
Рет қаралды 24 М.
The Dictionary Data Structure in C# in 10 Minutes or Less
10:20
IAmTimCorey
Рет қаралды 41 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
13 Visual Studio 2022 Tips & Tricks
11:13
Claudio Bernasconi
Рет қаралды 52 М.
Is Functional Programming DEAD Already?
21:07
Continuous Delivery
Рет қаралды 74 М.
🔧 Visual Studio 2022 Tutorial | Sneak Peek & What to Expect 🔥
23:44
SkillsBuild Training
Рет қаралды 59 М.
Are events in C# even relevant anymore?
16:19
Nick Chapsas
Рет қаралды 171 М.
Intro to Tuples in C# In 10 Minutes or Less
9:50
IAmTimCorey
Рет қаралды 42 М.
Why Do C# Developers Hate The var Keyword?
11:15
Nick Chapsas
Рет қаралды 62 М.
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 110 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
Global Usings in C# 10 and .NET 6 In 10 Minutes or Less
5:57
IAmTimCorey
Рет қаралды 39 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН