Skip to main content
View on YouTube to comment and like!

Syntax Video

10 Tech Tapas: Productivity Tips, VS Code Extensions and MORE!

Chapter 1 0:00

Intro

this being my first video here on the syntax Channel I thought I'd cover aorus Board of tools and tips I find useful and use daily I'll be serving up some tasty treats to curve your appetite for productivity tools useful vs code extensions and more here's a preview of what's on the menu for today if you're a picky eater be sure to check the description so you can skip ahead to your favorite dish and without further Ado here are 10 Tech Tapas to tickle your taste buds I'm CJ welcome to syntax first on the menu are Universal keyboard shortcuts so for these keyboard shortcuts I will talk about the Mac shortcuts but I'll also put the equivalent Windows shortcuts on the screen your first set of keyboard shortcuts are for working with words so if I hold down the option key and press the left or right arrow keys you can see that I'm jumping left and right over the words in the text if I hold down the shift key that will select words either to the left or to the right now if I hold down option and press delete that will delete the word in front of the

Chapter 2 0:30

Universal Keyboard Shortcuts

cursor and if I hold down option in backspace that will delete the word behind the cursor now these keyboard shortcuts will work anywhere in my codes here so you can see I can do like option backspace to delete the argument or option backspace to delete the assignment or to delete the variable name or if my cursor's in The Other Place option delete will also delete in that direction as well now your next set of shortcuts are for jumping to the end of the line beginning of the line beginning of the document end of the document or selecting in either of those directions as well so if I hold down command and right arrow that'll go to the end of line command and left Arrow will go to the beginning and this will work no matter where your cursor is you can jump all the way to the end or all the way to the beginning and if you press up that'll jump to the beginning of the document if you press down that will jump to the end of the document now if you combine this with shift you can select the whole document from the bottom or select the whole document from the top or if you're on any given line you can select from where your cursor is to the end of the line or from where your cursor is to the beginning of the line now these keyboard shortcuts will

work absolutely everywhere so take for instance if I am in the URL bar in my web browser I can use command to jump to the end or the beginning of a line I can hold down option and shift to select individual words also if I'm inside of a text editor like notion I can use option to jump over words or option delete to delete the word in front of the cursor or option backspace to delete the word behind the cursor command left Command right to jump to the beginning or the end so these will work anywhere next I'm serving up some apps you can use to remind you to take breaks micro breaks are tiny little breaks you can take throughout your work session that have been shown to reduce your risk of repetitive strain injuries or rsis these are things that can like affect your wrists and your tendons and the idea is every 10 minutes or so you take a 10 to 20 second micro break to take your hands off the keyboard or your mouse or whatever you're doing to prevent those repetitive strain injuries now one of the apps that I like to use for this is called timeout it's by dejal and I have it set for a 10-second micro break every

Chapter 3 2:24

Take Breaks

10 minutes and a 10-minute break every 60 minutes so it runs in the background and it will automatically pop up and remind me to take those micro brakes and regular brakes uh timeout is only for Mac if you're not on a Mac there is an app called stretch Le that is crossplatform it works on both Linux and windows and it works in a very similar way next on the menu are duck ducko bang commands duck Dogo is a search engine and they have these things called bang commands or bang shortcuts and when you're on duck. go you can press exclamation mark and that will show you an example of some of the services that you can search across now one of the ones I use a lot is with Wikipedia so if I do exclamation mark W followed by something I want to search for that will instantly jump me over to Wikipedia for the thing that I searched for now I have duck Dogo set as my default search engine here inside of Firefox so I can use these bang commands inside of the URL bar so one of the things I do pretty often is I search npm to search for a package so I can do this type in a package name and that instantly jumps me over to npm another one I use a lot is

Chapter 4 3:13

DuckDuckGo Bang Commands

mdn so if I do mdn and then something like object. values that'll take me over to the Mozilla developer Network and I can start looking at the search results here to learn more about what I was looking for so these are super useful and um I was about to get mad at my break timer because I'm recording but let's take a quick break we're like in the middle of the video right but yeah this is duck. go Bank commands and uh it's awesome next we're serving up a useful CLI tool called tldr tldr stands for too long didn't read and it's the name of this CLI tool so it allows you to get practical examples of commonly used commands so for instance if I do tldr LS this will show me some practical usage of the ls command um and this is actually much easier to digest than like the Man pages so if I do man man LS uh this there's a lot to parse through to learn how to use LS here so it's super super useful to kind of break down how to use the tool um you could do it for many different kinds of built-in commands so you could do it for like Zip and learn how to use

Chapter 5 4:19

tldr CLI

the zip command uh even non-standard uh CLI commands like FFM Peg so if I do tldr FFM Peg that's going to give me some examples of some common examples of how I would use FFM Peg so if you want to install it on your machine visit tldr Dosh uh you can use mpm if you have it to install it globally but if you don't have mpm they have other ways to install it as well next I'm dishing out a useful tip for markdown on GitHub to make your block quotes stand out a little bit more now when you're working on markdown for a GitHub repo whether it's in the readme or some other file you pretty often want to call attention to some section of your markdown and GitHub has added a feature for that called alerts so you can Mark a block quote as a note as a tip as important as a warning or as caution and the syntax is pretty simple you just include a block quote above your block quote that is uh square brackets followed by exclamation mark followed by the type of alert that you'd like to show and this is super useful especially like if you're writing documentation or onboarding notes and you'll kind of want to call attention to

Chapter 6 5:14

Github Markdown Alerts

a specific section of the docs next on the menu I will show you a way to to create diagrams in markdown on GitHub merjs is a JavaScript library for drawing diagrams using text so we can see here in the live editor on the leftand side I have some text that represents a flowchart on the right hand side we have the actual flowchart and they have a lot of other types of built-in diagram types so they have like sequence diagrams class diagrams State diagrams Ned relationship diagrams lots of other ones mind map is really cool um but you can use this syntax inside of Mark down on GitHub which is awesome so uh in this example repo I have an Ned relationship diagram and you can see that it's actually just a markdown file but when we view this markdown file here on GitHub we can actually uh interact with it and we see the actual rendered diagram and the thing that was committed to this repo was literally just a markdown file so I have a block here

Chapter 7 5:57

Github Markdown Diagrams

that I denote as mermaid syntax I put in my mermaid uh syntax for that specific type of diagram and then when you view that Mark markdown file on GitHub it will actually render out the diagram next on the menu I will show you how to determine if an mpm package includes typescript types or if you'll need to install them separately when you're working in a typescript project and you need to install a new library you very often have to figure out well does that Library include types or do I need to install them separately well you can figure that out on npm so I am here on the react library page on mpm and you'll notice this little icon it says DT if you see that icon that means the types need to be installed separately DT stands for definitely typed if I click on it it'll take me to that types package and this is what I'll need to install if however you see a library that just has the blue TS icon that means the typescript types are already included so you don't have to install anything extra next on the menu I'm serving up a useful vs code extension that allows you to take a Json response

Chapter 8 7:03

npm Types

Chapter 9 7:44

Paste JSON as Code

and paste it as a typescript type this extension is called paste Json as code it's by quick type and it supports a lot of different languages but we're going to use the typescript support so say for instance we wanted to call this poke API and we wanted to call the Pokemon inpoint to get back data about a specific Pokemon there's a lot of data in the response here and it would be very cumbersome to create a typescript interface that describes this type but what we can do is we can go to the URL copy the Json response and then inside of vs code press command shift p search for paste Json as code hit enter give it a top level name in this case the top level interface will be Pokemon because that's what we're describing here with typescript and if you do that you'll see that it will actually take that Json data and generate a type from that data now this is super useful because if I am making a fetch request to that inpoint and I use response. Json you can see that it gives back the any type and I won't get any type completion there with the any type because uh typescript and the editor don't know anything about

that object we just got back but if I add a type assertion here and then use that type that we just generated now the editor knows exactly what that object is and we can get autocomplete when we we are attempting to access properties of that object next up I'll show you a useful extension that allows you to take pictures of your code using your preferred font and theme set inside of vs code this extension is called Cod snap and it's super easy to use so let's say I have some codes here that I want to tweet out or upload to Instagram or something for fancy internet points select your code press command shift p search for COD snap hit enter it'll take the picture now what I really like about this is it has line numbers always starting at one you can also turn these off it's using my favorite font it's using the theme that I have set in VSS code and it doesn't include stuff that wasn't selected when I took the picture click this button save it to your computer now it's extremely customizable so if you go to the extension page you can see all of the options that you can change or turn on or turn off like you can turn these window buttons on or off

Chapter 10 9:02

Take Pictures of Code

you can turn the line numbers on or off um there's a lot of customization that you can do as well and last on the menu I'm serving up a GitHub repo that shows you best practices to use when working in a node.js application this repo is called nodejs best practices and it is jam-packed with tips and guides on how to write production ready node.js code they have things on Project architecture error handling code style testing and quality going to production uh security best practices performance Docker they have it all and what's really nice is every section not only has a description of how you should do things and why you should do things they also have real world examples that you can look at so you can start to apply these best practices in your own coach base and for dessert I'll show you how to make your application production ready by using Sentry when you're running your app in production you want to have some insight into what is actually going on out there are your users running into errors on the client side is your backend throwing errors is the site loading slow Sentry gives you that Insight so we're actually

Chapter 11 9:52

Node.js Best Practices

Chapter 12 10:29

Production Ready with Sentry

using Sentry here on syntax. FM and anytime an error occurs we get notified about it and we can actually see in the Sentry dashboard so you can see here on issues I can see every error that's ever occurred how often it's occurred how many users it's affecting and if I dial into these errors I can get a front- end stack trace a backend stack trace and we also have session replay so we can see exactly what a user was doing when they came across an error on the site and there's a ton of other features too one of the things that I really like is the queries tab under performance and this gives us insight into the backend database queries that are happening on our site we can see average duration queries per minute and this gives me a much better idea of where I should do my performance tuning uh based on how long these queries are taking so Sentry is awesome it gives you a ton of insight so you're not Flying Blind and if you want to try it you can visit sentry.io syntax to get two months free that's it for these 10 Tech Tapas if any of them curbed your appetite let us know down in the comments and if you're hungry for

Chapter 13 11:38

Thanks

more tasty treats check out syntax. FM all right I'll see you in the next [Music] one [Music] he

Quote it with credit and a link. Quoting Syntax