Overwhelmed with Programming? Here's small things to help - Computer Stuff They Didn't Teach You #14

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey friends in this very special episode of computer things they didn't teach you we'll take some viewer mail and we'll talk about something that maybe is a little less technical but still in my opinion is something that they don't really teach you i got a really nice message on my instagram here i thought it was going to go to junk mail but i found that i dug it out of my instagram from a very nice gentleman in ethiopia named abbas tufak and he says i'm a beginner c-sharp programmer i try to make simple apps like a calculator i start writing the code and i get exhausted i see your videos when you have lots of code lots of classes what's the secret i get distracted i get stuck try to fix it i get more errors i get stressed i stop coding it please give me your advice and i think that that's a really common thing i think that that is generally getting overwhelmed overwhelmed with the solution overwhelmed with all the things that we have to learn in tech this happens to people who are new in their career and people like me who've been doing this for many years what do you do when you're completely overwhelmed well i've got a couple of tips some of them are squishy and some of them are not squishy let's go over them this is a silly tip you might say set up your space why are you telling me this scott what a silly thing to talk about well setting up your space means being intentional being deliberate how are you writing your code this isn't about getting a bunch of fancy stuff or lighting or you know a cool youtube camera this is not about having a great laptop it's about thinking about the space that you're in while you're doing this work it's a laptop are you someone who's going to sit with low posture that's okay but are you doing it because it just happened or did you concentrate and say this feels the best i do my best work when i sit like this are you someone who needs to sit up straight like me i don't just sit like this for no reason i thought about it i thought about my posture thought about my shoulders i thought about where i fit i thought to myself this is where my hand should be and this is where i do my best work because i can do it for long periods of time without hurting myself you only have these hands so setting up your space i call it nesting you can take a look at a blog post that i've written called setting up your nest that's nesting talk about the importance of nesting when you're doing remote working and figuring out how to set up your net your nest can you sit comfortably can you work comfortably when you are stressed out are the things that are around you they feed your spirit i've got just within reach i've got my little nintendo super mario i've got my my link from zelda these are stupid little things that sit on my desk that remind me what i'm what i'm into i can feel them when i'm stressed out i have set up my space around me intentionally it could be a picture of your family it doesn't matter the second thing is your digital space we're going to talk about that in a little bit more detail organizing your windows setting up your hotkeys getting your space organized within you know visual studio code or whatever you're deciding to use setting that up is important and when you are setting up your space you want to think about it in the context of what i'm calling the developer's inner loop at microsoft they talk about the developer's inner loop at all a lot you know you have for loops right they spin well the developer's inner loop is do some code and see it work do some code and see it work so how do you set those things up i'll give you an example now i'll give you an example in dot net which is the language that i like to use but it doesn't really matter you can do this in in any language that you want so let's go and make a directory and we'll just call it uh fancy pants and i'm just going to go and i'm going to make a new website so i'm just going to make a new website so i've typed my my new web and again node.php doesn't matter okay and i could say dotnet run and it's going to go and run this website and now it's running now what do i have to do well now i got to go and open up the browser and i got to go to the browser location and then i've got my stuff there so then i need to think about well how do i make a change to this code right and make a change to the code and then i need to do what stop this run it again go back over here hit refresh and i do that over and over and over again so maybe i'll open up notepad i'll look at my program now i get three different windows on the screen and everything's getting all crazy what's going on here then i say make a change save come over here run it again come over here hit refresh a lot that's obnoxious so what can i do to make this cleaner so i just set up some zones here now i'm going to hold down shift i'm going to drop each of the things that i'm working on into a zone that's called fancy zones that's really called a window manager doesn't matter whether you have windows mac or linux there's a window manager available to you okay so that's interesting so i've got my space organized here i'm going to close this i'm going to say instead of net run i'm going to say net watch run it's called file watcher every language has some kind of file watcher if they don't you can actually find a utility that will do that for you so now when i make a change it's watching i'm going to hit hello friends now i'm going to hit control s watch at the top right here now i can come down here and just hit refresh now the only thing i could do now to make this even simpler would be to come up with a way to have this auto refresh and i could go and put in a meta tag or a little bit of javascript and i could have that refresh you know whenever totally up to you but just by changing that to include a file watcher everything got faster hello this is better control s starts building down here refresh so i'm making that inner loop faster i could remove that refresh it would be even faster that's the kind of thing you want to be thinking about but the problem is we don't think about such things we get stuck being repetitive because you're focused on the problem and not in your space but the trick is once you see yourself doing something twice see if you can maybe automate it once you've done something five times or ten times would it be a script or a batch file could it be something that you could automate there's tools like auto hotkey this one watch example there are others in the same space over here i know that there is called watch exec software development involves running the same commands over and over and over that's boring it watches a path and runs a command whenever it detects modifications that's the thing to think about a thing you can do to improve your developers inner loop so you spend less time with what i call administrivia administrative trivia and more time actually coding the other thing that i think people don't think enough about are editor skills i was using notepad which probably was not awesome i could actually come back over here and let's uh switch this and we'll use visual studio code i've got another video about this as well you should check out i'll have links down here in the show notes if i bring up visual studio code put it over here i'm using windows left arrow to keep it over here while i'm over here on the on the right hand side one of the things that's worth pointing out about a tool like visual studio code that i really like when i get stressed out is i can do two things one i can zoom in and out which allows me to either see all the source code or i can zoom in i can see less i actually make my fonts bigger so i can focus on these 20 lines which i find to be very helpful let's maybe helps me be less stressed out but multi-carrot editing carrot is c-a-r-e-t the carrot is this little thing it's this little eye bar that sits and it tells you flashing where your text is going to go you usually get one carrot right if i click here and i start typing i get some some text right but i can hold down alt with one finger i could say click click click click click now i've got six carats i can control z this is a test i'm actually typing in six different places that can be really really really helpful if you need to do anything repetitive and then you just hit escape to go back to just one carrot additionally i can double click on a word hold down alt double click double click now i've got three carats and a selection and i can change them so it doesn't matter whether you use visual studio code or whether you use emax or vm or whatever makes you happy the point is though think about the three or four or five things that you could memorize put them on a post-it note right in front of you and think about you know i'm finding myself clicking around looking for things a lot or i'm finding myself click type click type click type maybe i could be a little more efficient but then spend a little time streamlining your experience and i think you'll you'll feel better about your your editing skills window management i talked a little bit about power toys there we'll do that again just very briefly i've got a couple of different windows here i can hold down shift you see i've set up multiple regions so rather than spending time doing this see how that's kind of a hassle i can hold down shift and i can go snap that's just one example totally configurable okay some people think you need to learn all the hotkeys you don't you just need to learn the ones that keep you from repeating yourself a lot so hotkeys that are useful to know are ones that allow you to move windows around on your screen like i'm doing here and that's just windows up down left right things like alt tab to bring a window in the front and then alt tab to make it go away or modifiers holding down alt holding down control holding down shift to get different behaviors so you're using one hand on the mouse and one hand on the keyboard that can get you thinking more about your terminals your shells your command line interface your cli and that is that easy to move around so if i bring back my terminal i'll make it fill the left hand side of the screen here i can click in it i'm going to hold down alt with my left thumb and i'm going to click on ubuntu and now i've got two shelves i could then click again and i could open up dos and now i've got three i can use control scroll make my mice make my text larger or smaller and then i can hit ctrl w which is the same hotkey that you use in your browser to close a tab to go close close and now i'm back here that's the windows terminal i only held down alt and clicked and i hit control w so once you get that as a natural feeling in in the martial arts they will call that like a kata if you can get it down to a standard series of moves that you're used to doing you can bring those things up very very quickly and you can make them go away very quickly okay you gotta practice that though you sit down you have to do it intentionally the other thing i think about is are you able to move around your windowing environment as fast as you can move around your command line and can you move between the two so for example i'm here at the command line in the fancy pants folder i can type start dot that'll automatically pop up actually over on this monitor that folder which i can then snap and snap i can get between these two worlds quickly by saying start dot which is the current the current location there it is and then if i wanted to i could go back to the command line i can right click and i can say open in prompt not having to think about it saves you time because then you can really focus on the problem the other thing that i feel really strongly about is having little tools having them be easy be small be everywhere now i use dropbox and in my dropbox i have a folder called utils and in that is a bunch of wait for it he tells the zooming tool that i used to draw and you know wget to get stuff from the web and free clipboard viewer and a batch file to set my resolution to 1080p it's full of little executables and that's cool but it's not really cool unless it's in my path unless it's available in my path which is an environment variable that we set on our machines to make things available to us so i've actually got that set in my path and it is right there now why is that interesting because it's set in my path on every computer that i have if i get a new utility i throw it into utils and it's available to me on a laptop and on my desktop because i have the path set and i have dropbox or onedrive or google drive set up on both of those things that way a little utility that i start using is available everywhere it's accessible which is super useful so what i'm asking you to do what i'm asking my new friend to do when you're overwhelmed is to start nesting be deliberate it's okay to do that you just sit you go okay what what's going on what am i doing i'm overwhelmed are there too many windows open maybe there's too many tabs maybe i need to declare tab bankruptcy close all my tabs i like to sync to paper when i get overwhelmed staring at my screens i pull out my little super mario moleskine notebook and i get away from the screen and i write down what it is i'm trying to do i phrase it differently there's another thing called rubber ducking where you'd get a rubber duck or anything you could get a little uh maybe some people use rubber ducks and some people use a gundam a little robot man um and you'd explain the problem to them okay okay i'm trying to reverse sort a linked list and then you just explain it and in the process of getting it out of your mouth back into your ears into your brain you can solve the problem explaining it to even a non-technical partner spouse or roommate something you can do another thing that you need to do is really set up systems where you can make yourself successful if you've decided that you're going to learn to code except you're going to do it eight hours a day you know 40 hours 50 hours a week it's a really hard thing to do like i like to blog but i don't like to blog every single day because if i miss one i feel bad i try to set up systems where i can succeed not systems where i can i can fail now again i know that about myself you need to know yourself have you set up a space have you set up your your keyboard have you set up your mouse you've set up your windows are you coding at the right time of the day night time morning time do you need to go for a walk you need to have a person with you where you can do pair programming what is it that you need to do to move yourself forward what i'm asking you to do is be intentional and be focused and do things for a reason don't just let things happen okay so there's a lot when we think about being overwhelmed and i would encourage you to sound off in the comments if you've been overwhelmed what is it that you've done whether it be writing some software working on a script deploying something as an i.t professional what has you what have you done to get unoverwhelmed to turn the volume down whether it be uh setting up your environment automating your environment learning about containers learning about virtual machines spending a moment and not thinking about this program and instead learning a new hotkey and your favorite tool maybe watching youtube sound off in the comments tell me what you thought about this video and next week we'll have a video on the cloud and some of the computer things that they didn't teach you when programming things in the cloud thanks so much
Info
Channel: Scott Hanselman
Views: 39,914
Rating: undefined out of 5
Keywords:
Id: 5CmjW_8ief4
Channel Id: undefined
Length: 18min 31sec (1111 seconds)
Published: Tue Nov 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.