I've been writing python the past few days, and the editor I'm using has lynting and whatnot built in. I just hate it when people take SIMPLE tools and demonize them as the most horrible things in coding. I don't have to touch the mouse (heck, I might not even have mouse functionality, I might be in vim for all I know). yeah, I can ctrl+f the same simple statement no matter where I am. Now I need extra information! Where as with a region that I always title 'CONSTRUCTOR'. my brain isn't going to equivocate the fact a method is shaped 'NameOfClass()' as being the constructor unless you scroll by more moderately.įurthermore, it makes it near impossible with ctrl+f. My brain isn't going to pick those things up that quickly. Just look at the Unity library, or my own Spacepuppy Framework (of which I only share a tiny bit), these are huge. But even foregoing that, libraries can grow massive. because bottom line (note, I hate working in these settings). business software isn't designed to be beautiful, its designed to get a job done with as little amount of man hours as possible. Especially since certain types of code reuse is actually shunned because it can cause one part of a program to break when some greenthumb comes in and mucks around in it trying to make something work elsewhere. I've worked in business application development for years. Totally agree.īut what about when I'm scrolling down at 100 rpm. Now yes, if you know the name of the class you're in, and you read the method, you'll know its shaped as a constructor. So now you have a region around 1 thing.īut, that one thing isn't named anything that jumps out as a constructor right away. That link criticizes that a CONSTRUCTOR region is useless, since a lot of classes only have 1 constructor anyways. Nothing's wrong with these tools, but using them and only them, while excluding others just as viable, is stupid.Īlso, I don't know about other people, but I use ctrl+f a LOT. Why? Because that's what they do, and you should do it too. These are the same sorts who think all code should be written in Haskell, in ONLY Debian Linux (or insert some other distribution), while typing upside down in pig latin. pffffff yep, and goto's and singletons are evil, and oop design patterns set back programming 30 years, and so on and so forth. your method might be too big (is that even allowed in C#?), but screw you that the mere use of them is bad. I get saying a region inside a method is bad. why do that? It works! And it's readable for most with any reasonable programming skill. So yeah, I hide them away when I don't need them.Īnd yeah, sure, I could rewrite this damn thing in so many different ways that gets rid of the regions. look at all those attributes? I need them! But they're really distracting to look at. Which that stack-exchange or whatever says should be enough.īut. I'm not going to confuse my fields with my constants with my properties. Sure, they follow naming conventions that make them distinct. My regions follow a standard (it's my standard, but still a standard), I don't shrink the Properties region and go "Ope, I don't have any properties in this class!". I like to get out of my sight for a moment. While at the same time, grouping them into a region does let me close them up and not have to pay attention to them while working with other code in the class.Ĭall me ADD, but I find all the extra code distracting while I happen to be working in one specific area. I have no reason to break this thing out into their own classes. VS Code: Hide/Show the Debug button in package.Note my 'special tpes' region.If you’d like to explore more new and interesting stuff about VS Code, take a look at the following articles: These actions are simple and quick but can keep your code more organized and improve your working experience as well as productibility. You’ve learned how to fold and unfold sections of code in VS Code. Fold all: Ctrl + K then Ctrl + 0 (the zero number key).Unfold all: Command + K, then Command + J.Fold all: Command + K then Command + 0 (the zero number key).In case you want to collapse all code blocks in the current file: Advertisements Use your mouse or trackpad to select a block of code you want to collapse/expand then: If there is a reason that makes you don’t like hitting chevron icons, then you can use shortcuts to get things done. Please use Chrome, Edge, Firefox, or another web browser instead. A quick demo is worth more than a thousand words:Īdvertisements Note: If you’re using Safari, this demo video might not work nicely or not start at all. On the other hand, a chevron right icon is for unfolding the associated region of code. If the folding icon is a chevron down, it’s used to fold the associated region of code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |