everyone codes faster when they stop using their mouse

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
developers are extremely lazy and I am no exception in today's video I'm going to show you how to write the most amount of code as fast as possible while doing the least amount of work today we're talking about window managers shells and text editors let's get into it I've been getting a lot of questions in the YouTube comments about the setup that I use when I'm working and I want to kind of show you guys how I set up my environment to be as efficient as possible my setup is designed around three core principles it's speed Simplicity of use and simplicity of installation the speed is that I'm giving myself a lot of micro saves in time in terms of me not having to move my hands off the keyboard I like I said am extremely lazy and The Sensation of moving my mouse from this window to code to this window to Cargo build or whatever and then to this window to have to go read and address I feel like I'm burning so much time moving my hand on and off the keyboard that I wanted to get away from that if you if you're looking at this environment this is the default build environment or the default environment for coding uh it comes with you know Ubuntu you have your default color scheme here for your terminal and you have your your default text editor we're talking about how to make this faster for a developer that wants to get away from moving their hand on and off the keyboard to go between their editor their Builder and their maybe their data sheet right this first step in doing this is to use what is called a tiling window manager that window manager is going to be I3 so we're going to install that with sudo apt install I3 I3 is a beautiful window manager that allows the user to not take their hand off the keyboard that is the primary takeaway from I3 so we're gonna go ahead and install that I already have it installed and then we're going to restart the VM with the I3 with a manager spun up when you restart your environment here what you're able to do is choose from the window managers that were installed so by default you have the Ubuntu default Window Manager uh we're gonna go down here and choose the I3 window manager and log into our VM you get I3 to start up what's going to happen is you have this pop-up window here a little city you want to generate a config you'll hit enter if you're going to choose a modifier key we'll talk about what the modifier key does but essentially the entire I3 ecosystem is designed around you using this modifier key to move windows with your keyboard instead of your mouse where going to use alt as our modifier key so now that we are in an I3 tiling window session well it's already beautiful so to create a window we do either one of two things we use our modifier key we hit alt and enter to make a terminal pop-up we'll zoom in on that with Ctrl shift plus and if we want to run another command that is not a terminal we'll use alt D which gets this prompt up here at the top and then we can type the command that we want so I'll say alt D and then Firefox for example this is a tiling window manager which means that the windows here are next to each other they automatically get put into these maximized boxes using our ALT key which is our modifier key again we can hold alt down and then move with our arrow keys left and right so over here I'm in user I could say I am typing some code and then I can go over here to Firefox my datasheet another big piece that's important with the tiling window manager is that down here at the bottom left I have these numbers right you see the number one is kind of small those are called our workspaces in my head when I'm coding I essentially use multiple workspaces where each workspace number denotes a different thing that I'm using so for example if I have Firefox here I want to put the data sheet we'll put the broadcom data sheet in a different workspace because I want that window to not only be full screen but I don't want it to clutter my thoughts when I'm doing some when I'm coding right so we're gonna move this to another workspace you do that with using your modifier key you hold down alt while you're holding alt you press shift and then you move that to another workspace by pressing the number so we do our modifier shift two for example you'll see now down here that a new workspace opened up and we can go and go to that workspace by doing modifier two so now we can go between the two of these just by like touching a few Keys also if we had two terminals let's say for example I'm coding in the one on the left in Vim so I'll go to my rusty Pi my project so over here I have my code and then I can now go over here to my right and go between the two of them with literally no time and time lost at all so that makes me extremely fast I don't have to worry about every time I do a new thing I move my hand on and off the keyboard just such a waste of time you may be wondering how do we make I3 pretty right now we have basically this kind of gross bar down here with a few pieces of information and we have the default Ubuntu background uh we can do that with two primary tools so the thing I like about I3 is that I3 is extremely extensible right uh we are able to write a config for the I3 that tells I3 what to do when it starts you can modify the keystrokes we can add a lot of our own personal customizations that we figure out over time to make I3 more personal so if you want to have your own custom background what I did is I made a config file before I started this video this is my actual config file when I'm working uh and at the bottom of the file I have two commands that run that get started that make my I3 a little prettier so I start two primary commands the first is Faye or fat feh you can see your app install that and all you did with this is you say no bet no startup ID you can use fed to display your custom background right so here I have a path to a file which is a picture of a bridge I like that and then the second one is Compton Compton makes it so that your I3 windows can be different opacities and colors depending on which window is active so I'm going to show you that real quick we're going to write that file that we're going to move config.back to config to overwrite it and then I'm going to go show you my Compton configs we'll go to Vim config Compton Dot comf and all we do here is we say that the inactive opacity actually I turned these off but if you wanted to you can make an active opacity 80 for example so that you showed which window you were currently in it makes it a little more obvious so after you've edited all of those uh config files we're going to do our modifier shift R to reset I3 and then boom now our stuff pops up so we make two windows with alt enter enter you can see the one on the right and the left they're switching and one of them is a little darker than the other which means that it's the one that we're actively in also for the love of God can we please get away from the default color scheme I have solarized dark as my go-to for for color schemes I just find the glue and the green to be a lot more pleasing to the eye as opposed to the you know horrific purple that a bunch of comes with by default I feel like again just doing all this stuff allows me to save so much time not having to move my hand on and off the keyboard it just makes me more efficient of a programmer so now we're talking about shells by default in the Linux environment you are put into the regular normal Linux shell bin bash I prefer to use a shell that is known as Z shell seashell is a shell that is designed with interactivity in mind that has cool things like tab completion that shows you the available options you can do things like you know LS tab put a letter in and it kind of shows you the list of all the commands that are available to you what I like about Z shell the most is the community of extensions that exist for Z shell the big one that I use called ohm zush or oh my zsh and my CSH is cool because there is an entire community of people that are developing themes to make zsh more interactive so you can go to this website here on my CSH put that in the description down below install omicsh and it's literally just a shell script that you download and run and we'll install oh my zsh by putting that script into our Command Prompt hit enter it's going to clone the repo so you want to change your shell to CSH yes of course put in your password for sudo to run that and then boom we are in oh my zsh inside of seashell if you want to make modifications to your running instance of Z shell you're going to edit your zsh RC as for a lot of your options for themes and stuff are going to pop up for Z shell the big one if you want to make your Z shell look like one of the available themes on the Oma zsh website you're going to go into your zsh RC and you saw that line there zsh theme Robbie Russell so that's one that I like to use by default uh again talking about Simplicity and simplicity of installation Robbie Russell has the bare minimum features that I like in my shell the big one being the ability to see what branch I'm on in git and if my git Uh current state has untracked commits or uncommitted changes or uncommitted changes uh the reason I like to have that is because I've had so many instances where I've made changes to a project I'm deep in the weeds coding and then I realized oh I'm on the wrong branch and I suddenly get into myself into a a merge conflict hellscape so having the ability to see constantly where you're at and the status of your get of your git repo is super useful all right next we're talking about text editors so I know that this is a pretty controversial issue I think the world of text editors becomes a pretty big whole new war between kind of the OG text editors like Nano emacs or Vim up to the more modern ones like Sublime and vs code and so on I've used them all and I have to say that my favorite text editor is them the reason being first of all Vim is basically anywhere so if you run Vim boom you have Vim you have all of the major features in terms of the Motions the modes of visual editing of instrument editing and command line stuff that Vim is known for without any extensions you can extend Vim I choose not to because I don't like the sensation of having one environment somewhere where I get used to a way that a text editor feels and looks and then I move to a new computer I move to a new VM and suddenly it's all different but the big thing here is we don't take our hands off the keyboard you may be thinking oh well Vim doesn't allow you to edit multiple files it's kind of a pain in the ass to use you actually have a lot of really cool features that are like a Windows system built into them the big one going into the command mode you can do tab e for edit and hit Tab and you're able to open files in Vim in a tab text editor format so we can go ahead and open a file like it's a tab in vim and then using the using the motion GT you can go between the tabs like it's a regular text editor and again being an I3 we can make a window over here to the right and now we have another window where we can use our cargo commands to build our project I know that Vim has a pretty high skill curve learning all the different motion stuff being able to use visual mode to like select to text and then copy it or delete it that takes a while but combining all these things combining I3 not taking your hand off the keyboard using Vim or you're using all the features available and not and efficiently moving around while you're writing code I think will make you more efficient programmer where over time you may not realize it but these little saves in time add up and just make you overall able to do more complicated tasks in less time compared to maybe your peers or maybe yourself in the past anyway if you enjoyed this video hit like it subscribe let me know what you use for your environment down in the comments and then go watch the this video or this video
Info
Channel: Low Level Learning
Views: 148,971
Rating: undefined out of 5
Keywords: cpu vs gpu, gpu cores, nvidia cores, cuda cores, cuda programming, c programming, c programming tutorial, malware, reverse engineer, reverse engineering, reverseing, arm division, fixed point multiplication, hackers, security, binary, hexidecimal, raspberry pi, pico, rpi, microcontroller, arduino, maker, craft, hobby, electronics, wires, temperature, safety, project, board, electric, leds, led, thonny, os, ide, probe
Id: WkT8ZC4ncX8
Channel Id: undefined
Length: 10min 31sec (631 seconds)
Published: Tue Jan 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.