Double your Programming Productivity - Develop Software Like a Pro ✅ | Pedro Catré | Skillshare

Double your Programming Productivity - Develop Software Like a Pro ✅

Pedro Catré, Full-Stack Software Engineer

Double your Programming Productivity - Develop Software Like a Pro ✅

Pedro Catré, Full-Stack Software Engineer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
9 Lessons (33m)
    • 1. Introduction

      1:40
    • 2. Prerequisites

      1:18
    • 3. Course Project

      0:45
    • 4. Configure Keyboard Shortcuts

      2:27
    • 5. Dynamic Code Snippets

      7:51
    • 6. Code Navigation

      4:36
    • 7. Debugger

      6:29
    • 8. Aliases and Functions

      6:34
    • 9. Conclusion

      1:12
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

289

Students

1

Project

About This Class

You are wasting time every day! Most developers are missing the techniques to make their job faster and easier everyday. It is no wonder. Universities don't teach this and, more often than not, your more experienced colleagues guide you the wrong way.

Do you navigate your application files with a mouse? Are you using print to debug? Are you not making full use of your IDE's capabilities? Do you find yourself repeatedly writing boilerplate code? Do you type long commands in the terminal? Do you refactor code by hand?
If any of this describes your current state and you would like to learn a better way you've come to the right place.

In this course you will learn skills that will increase your programming productivity.

In this course you will learn to:

  • Efficiently navigate your source code
  • Use debugging tools
  • Navigate code efficiently
  • Create command-line shortcuts with aliases
  • Create reusable snippets

And much more...

This course is most useful for beginners and intermediate developers. But even experienced developers can learn something new.

I would be grateful if you leave a review or feedback. This helps me create better content for you.Thank you!

Credits

Special thanks to all the people who made and released these awesome resources for free:

Meet Your Teacher

Teacher Profile Image

Pedro Catré

Full-Stack Software Engineer

Teacher

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

phone

Transcripts

1. Introduction: Hi. Welcome to the scores on doubling your programming productivity. My name is Peter Katrina, and I will be your instructor for this course. I'm a full stack developer with over six years of work experience. I created this course because you're wasting time every day. Most developers are missing the techniques to make their jobs faster and easier every day. And it's no wonder universities don't teach us this and more often than not are more experienced. Colleagues guide us the wrong way. Let me ask you this. Do you navigate your application files with the mouse? Are you using print to the buck? Are you not making full use of your code Editors capabilities? Do you find yourself repeatedly riding the same coast? Do you type long, hard to remember commands in the terminal? If any of this describes your current state and you would like to learn a better way, you've come to the right place. In this course, you will learn skills that will increase your programming productivity. You'll learn to efficiently navigate code. No more using the mouse to navigate files. You'll learn to use it the bugger instead of friends to debug your coat. you learn to create reusable code snippets tow. Avoid having to type so much you'll learn valuable techniques and shortcuts available in most code editors, and you'll learn to create powerful command line shortcuts with aliases and functions. We won't bother going over the techniques and all code editors. Well, just give a couple of examples most good code at first support these features, so let's get started. 2. Prerequisites: The prerequisites for this course are simply a working understanding of programming. You will also benefit from installing a powerful code editor to try things out at minimum. This you consist of a source code editor, would build automation tools, a D bugger and intelligent code completion. Most modern code editors have this. The examples in this course will be done. An intelligent they and visual studio code. I personally use intelligent for work. It is paid, but there is a free community version and you can also search for early excess versions to try it out. Note that any other i d from the company behind Intel, Ajay will work the same. So I d s such as Ruby Mine Pie Charm, Web Storm in PHP Storm will all behave the same as intelligent so you can get any of those . These will all work the same way when it comes to the techniques described in this course. Also, if you're in Andhra developer, you can use Android studio and it's built on intelligence software. Visual studio code is quite powerful and completely free. The code editor he chooses up to you. In the end, you'll be able to use most of these techniques with any good code editor. The ones I talked about are just good examples 3. Course Project: the project for the scores is to apply one of the techniques who learned and shared the result with the community. For example, you will learn how to create the anaemic code snippets, and you can apply that technique toe a piece of boilerplate code. Then you can share the result with your fellow students. You can also create your own command line shortcuts with aliases or functions. You can investigate your code editor shortcuts and share one that you find useful and that I did not cover share an automatic re factoring technique. Share a debugging feature not covered in discourse. You can also share anything you want that you think could fit this topic. Don't worry. If you don't know what most of this means, it will all become clear as the lessons progress. 4. Configure Keyboard Shortcuts: drop the scores. I'm going to present some keyboard shortcuts. But you should always feel free to change the keyboard shortcuts on your editor to the ones that suits you best. Let's see how you could accomplish this. An intelligent, go to intelligent idea. Click preferences Key map on the left. You have the fold key maps. You can make a copy of one by clicking duplicate. Give it whatever name you like. Then you can search for the command you want to change. For example, never get file. You can also find by shortcut. Click the icon next to the search books and type your shortcut. In this case, it would be command shift. Oh, As you can see, we also found the same command this way to change the shortcut. You can right click on the command and click add keyboard shortcut. If you choose a shortcut that already exists, you're gonna be shown conflict. In this case, shift Command nine is already assigned to version control. Instead, let's choose shift command J No conflicts with this one. Click OK, click apply. And now we try our new shortcut. It works. Now let's see how you can accomplish the same thing and visual studio code. Go to code preferences. Keyboard shortcuts. Here you can also search for the command. For example, quick open file. Click the edit symbol on the command shortcut. You wish to add it and type your new shortcut. For example, let's say we wanted to have the same shortcut. We have an intelligent we could do command shift. Oh, as you can see, visual studio code detected a conflict. We can click on the link they provide to see what the conflict is. As you can see, go to symbol and file has the same shortcut we wanted to give. We can also go to code preferences, key maps and install the key bindings of another code editor were already familiar with. For example, we can install the key bindings for intelligent. This way we have it more consistent and easier to remember without having to override all the shortcuts by hand. 5. Dynamic Code Snippets: we often find ourselves repeating the same code. We can speed this up with dynamic code snippets. You can think of them as templates for your coat. An intelligent, dynamic code Snippets are also called live templates. Let's take a look at some code snippets we have as we create a simple program. Let's say we want to print the day of the week. We have a snippet for function, so I type fun type tab and it expands so we can fill the valleys. We type the name of the function, get day of the week, then click tab to go to method parameters. We will have one parameter called day Index. We click tab. So we go to the function body. We want to create a switch, and we have a snippet for that. So we type switch and then tap. We'll simplify this the days Tuesday and will only fill the values for Tuesday. Now let's look this out. We have a snippet for council log, so we just type log and then tap. Now we run it, and, as expected, we get that the day is Tuesday. Now we're going to save the result of the function in a variable, cold day. We'll create an array with weekend days. Now we'll use a snippet we have for the if statement, we type if in Click Tab, and we will print that it is a weekend. If it is a weekend by running this, we see that the new law is not printed because Tuesday is not a weekend they So we had a nose close to print when it is a day of the week. This, if else, seems useful to me, so let's create a snippet for that. Select the whole if else code double tap shift to search for actions and search for life template, then click Save Life template. Here we have a few user defined life templates, as you can see, for example, the switch that I showed you earlier. We also have some specific ones from intelligent, and as you can see, they're bound to specific file types. So a sequel snip. It will not work in an HTML file. For example, let's create our new snippet. Let's give it an abbreviation i f. G stands for, if else that should be easy to remember. The description is also if else now he had tags toe each place. We want this election to move to when we click tap. So one for the condition, one for the first, then statement and one for the next, then statement. Now let's try out our newly created life templates that I e. In Tab and Mullah. We have our snippet. Now just fill out the condition in the statements. Now let's create a sequel file. As you can see, I can use my JavaScript snippets here, such as the function snippet or the console log. But I can use sequel specific ones that I have created, such as the rollback. You need to be on the lookout for code snippets you can create from your repetitive tasks. I saw I wrote this rollback start transaction commit a lot before running my queries. So I created a snippet for it. I noticed I type the insert query, So I created this neighbored for that. I saw it created you you ideas a lot as well. So I created a yu u I. D snippet. You should have the same habit in order to automate your workflow as much as possible. Now let's see how the dynamic code snippets work in visual studio code. You press command shift, be to search for snippets and you concert a snippet. Let's insert for each loop by the fault in visual studio code. You can't use the prefix for the snippet. You have to enable this. So click command comma to go to preferences type tab completion and said it too. True. Now you can also use the prefix for the snippet. Let's try a four loop and click tab just like an intelligent. Now let's see the user. The fine snippets press command shift be again and click to configure user snippets. Choose JavaScript. We can see their inner user snippets defined, yet we can uncommon this to create one. Now the lock snippet works. We could write our own snippet directly in the file, but this seems like a lot of manual work. To make this easier, we can install an extension called snippet creator when it finishes installing click Reload . Now let's create a dynamic code snippet for functions such as the one we had. An intelligent. We write the function, select the code type command shift B snippet, and we have a new option called creates libit filling. The type is JavaScript. The name is function prefixes. Fun description can be function again, and now we put the placeholder tags for the method. Name, parameters and body. Let's try it out. In this lesson, you learn to create templates that make it easier to write repeating coat patterns. Now this is only useful if you make use of it. Whenever you find yourself repeating code, you should consider creating a snippet. Over time, you'll build a collection of snippets that will make you much faster at your job, and it will make programming a lot more fun. You can also get a package of snippets created by someone else, but odds are you won't remember to use them. I never do. When you create them yourself, you're sure they're useful, and there will be easier to remember. As a course project. You can create your very own dynamic code snippet, and when you're done, you can share it with the community. An intelligent you can export the snippet by going to preferences Search for life templates , and you can copy out a snippet by right clicking on it and clicking Copy. Then you can paste it in a file and in visual studio code, you can simply copy the Jason configuration 6. Code Navigation: a good part of which will do every day will involve writing code. To that end, you want to be as efficient as possible doing this. Let's now go into intelligent to demonstrate how you could navigate code efficiently. When programmers first start learning, they navigate the code with the mouse by clicking a hierarchy of folders like So as you can see, this is not scalable, not even in a small project. So what you want to be doing is to search the file by its name. Let's say I'm looking for a file, and I know it has storing the name. So there is this Windows Store file. As you can see, I don't even have to know the full name of the file to find it. Let's say the file name has demo in it. I can go to them a buttons and them about CSS. Likewise, I can also see the recently viewed files by typing Command E. In searching here for the file. I want one situation. You'll also find yourself in is wanting to go to a previous step in the code where you were . You can do this by clicking command option left arrow and then you go back to the previous point in the code where you were. You can also do command option, right arrow to move forward in the opposite direction. The techniques I talked about before working several code editors, and I'm going to demonstrate this now in visual studio code. As you can see without any open file, they are already telling me I can go to a file by doing command be, Let's say I want to go to the Read me. I can also go to a file with worker in the name. So there is a register service worker or two favorites. Likewise, navigating to recent files is the same shortcut I could do command be. As you can see, I'm in the favorites. I was in Register service worker, and I was in the Read me file. You can also never get back to where you were by doing control minus or you could navigate Ford by doing control Shift minus. So, as you can see, it works exactly like intelligent. The shortcuts are different, but you can always customize the shortcuts to have a consistent experience across code. Editors. We only scratched the tip of the iceberg. If you go to navigation on intelligence, you can also see you can use specific shortcuts to go to a class or symbol or line. Let's try this. Let's do search for symbol and then search for a method named handle section trigger. It's amazingly fast to navigate this way. You can also search for editor actions by doing command shift A. So let's say I want to change the key mapping I type key map. This takes me to preferences key map where I can customize my key bindings In case you don't remember a specific shortcut you need. You can also type shift two times to search everywhere in the editor. This includes symbols, actions, glasses, files and so on. Just remember, though, that this will lead a lot more Search results to your search When searching for files. You can also type a slash to surge for folders Instead, let's search for the folder native your wife, for example. And there you go. These are some of the best ways to navigate your coat. In this video, you'll learn to navigate files by their name instead of navigating with your mouths and believe me. This is a huge time saver. You learn to excess recent files you learned to navigate back and forth in the code. Besides these examples, there are other ways you can navigate your code faster. As a course project you can investigate with other ways your code editor supports and share one with community. 7. Debugger: using print to the buck code is probably one of the most common practices among developers . And this is not just beginners. I know proficient developers who still do it. The problem with using prints to debug the code is not that it does not work. It can work, but it's the wrong tool for the job. Sometimes this is the simplest thing to do, but often it will cost a lot of time and it will pollute your code. When you forget to delete the debug prince by printing, it forces you to decide what you want to see before you know the nature of the problem. You end up executing the code over and over again, adding more prints to get all the context you are missing with the D bugger. However, you get to go through the execution step by step, deciding what you want to see in more detail and what you want to skip all while having full context of all the variables being used and their values, as well as the call stack that got you to this point to try things out, we will again use intelligent, but remember that most of these features are implemented in a very similar way in a lot of code editors. So really, the skill of using a D bugger is largely independent from the code editor you are using. So here you have a piece of code what most developers would do while debugging is to write , console, lock and execute to get the result. Instead, let's use to the bugger. First of all, you want to set one or more break points. These are points where the execution of your code will stop and control is given to you. Then we want to run in debug mode. If I set no break points, execution simply runs is normal. What's at a break point in temperature and Celsius text. So the two main controls you want to keep in mind our step over and step into would step over. You skip to the next line would step into. You're saying you want to go inside the method that is being executed. You're interested in what's going on inside. I noticed that when going inside a function, I could see what got me there in the call stack. Notice that when stepping in the code, you can see the variables. See, this one is undefined, but once I take a step, it has a value. We can also evaluate an expression in the context of the point we're in. We can excess variables, we can call methods, and we can execute statements. Note that I'm using the mountain buttons to make this clearer. In real life, we would always prefer using shortcuts for all these operations as we will use that the bugger every day. We want to be efficient doing it. So I would start to the bugger with Control D and then use have seven to step into the code and F eight to step over it. Let's set another break point and run to the bugger I would use. Command options are to continue the execution until the next break point. You can do all F eight to evaluate an expression to help you remember these shortcuts. You can always hover the button on intelligence to get a hint of what the shortcut is. So let's try similar techniques and visual studio code so that you can see that what you learned is mostly independent from the code editor you're using. Let's start by configuring the debunker for no jazz visual studio code ships with the no GST bugger preinstalled. So enabling it is a simple is going to the debug panel and clicking the gear icon. This creates a new file launched out Jason with the required configuration. Now let's set some break points. As you can see, this is very similar to intelligent. Go back to the debug panel and launched to the bugger we stopped in the first break point. And as you can see, we have access to the variables we have access to the coal Steck. Also, we have a break point section where we can total two break points. Additionally, we have a controls bar it has controls for. Continue step over, step into step out of the method. Colt, restart and stop. Let's try it out and step over and continue to the next break point. Variables and expressions can also be evaluated and watched in the watch section, and they will update as the code gets executed. In this lesson, you learn how to use to the bugger instead of print to debug your code. Specifically, you learn to set break points, step into code and step over lines of code. Also continue executing until the next break point. Finally, you learn to evaluate expressions in the context of the line you are in. Besides these examples there other tools your code editor might provide so you can debug your code as a course project. You can explore the other ways your code editor supports and share one with the community. 8. Aliases and Functions: We've talked a lot about speeding up your programming by saving keystrokes in her code editor. One other place where you might find yourself a lot in is the command line. Often a lot of commands you need to write are long and hard to remember. This is where aliases come in. Aliases are abbreviations you can create to run long commands. There are time consuming to type and hard to remember to do something. We're powerful. You can also use functions. This class example is a very specific for Mac. It is outside the scope of this video to apply these techniques in other operating systems , like windows. But you can do similar things and windows if you look for them. The goal is more to show you how you can use this technique and why it is useful. But try this out. Go into your terminal. I navigate a lot through the terminal, and one thing I find myself doing is going up with directory with the change of that right to recommend, like so I wish this was shorter. So let's create an alias for that by typing alias not not equals CD not dot Change that referee to documents. Now I can do the thought and I will move up one directory. Let's also end an alias for clear alias C equals clear and let's clear this, So just type c enter and this clears everything. I also like to open files in the sublime text editor, but it is quite annoying to always have to type open minus a sublime text so we can create an A list for that as well. Alias Sublime equals open minus a sublime text. Now we can do sublime in the name of the file and this opens the file in sublime. But as I mentioned before, these are temporary aliases that disappear once you close the tap, they exist on Lee for this session. So if I open a new tab, they will not work there. In order to persist aliases, you have to save them in configuration file. You're probably using bash, which is the full shell for my CO s. So you would go to the file dot Bashar See, I personally use dizzy show. This is a UNIX shell that is built on top of bash with additional features. I recommend you install dizzy show as well as Oh my seashell, which is an open source, community driven framework for managing your Z shell configuration. And I turn to which is a better terminal. I will have a link to this document in the class material that will tell you how to install these tools if you choose to. But anyway, you don't need this to create aliases. The only difference here is that the configuration file for Bash and seashell are different . So for bash you open. Like I said before dot Boesch RC And for seashell, you open the file dot z s h r c. As you can see, we already have a lot of aliases and the seashell configuration file. I have some forget, for example, which I use a lot. I like this one a lot. Get status which is quite useful. Let's have the ones we created before Alias for CD Alias for opening sublime and then a lease for clearing. Now, if I go to the terminal, this will not work. This is because the configuration is loaded Onley in the beginning. So if we open a new tab, it will work in that one. We can also have functions which could be a lot more powerful than aliases. For example, I have a server function to start a server. It takes the port where the server should run on as an optional argument. You can see that this saves me a lot of writing and memorizing. So if I go into the terminal, I can run server in the Port 3004. Now let's go for a more complex scenario. So you really understand the power of functions. Sometimes I'm starting a server, and it fails because the port is already in use. So we open a new tab and do server 3004 again. It fails with the dress already in use now, I would want to find out which process is running on that port. There is a command to this else. Off stands for list open files. You can list all the network connections open by using the minus the flag. Now you can list the processes which are listening on a particular port, but it was in colon. In typing the port number from the result, I can take the process I d and kill the process running on that port would kill minus nine . Process i. D. This is a lot of work for something I do so often we can create a function for this. Let's head one I found online. This function will take the port is an argument and kill the process running on that port. We're finding the process I d running on the port with else off. We're piping the output of this and searching it. Then with ex hearts, it converts input from standard input into arguments to the kill minus nine. Command note that I did not create this function. You don't have to reinvent the wheel if you need a function for a purpose that is common enough, like killing a server running on a port. You can go for that, and odds are you'll find something that suits your needs. Now let's use our function. Kill Port 3004. Now we can run else off again, and we can confirm that there is no process running on Port 3004 and I can start the server again. Server 3004. Now that the address is no longer in use in this lesson, you learned how to create an persist, Avis is and functions to streamline your work in the terminal. If you're using Bash Creator aliases in dot Bashar see if you're using Z shell. Create your aliases in adult Zs. HRC. After creating your alias or function, don't forget you need to restart the session before you can try them out. As of course project, you can create your own alias or function and share the result. With your fellow students, you can add a brief description of how this saves you time. 9. Conclusion: In order to become a professional developer, you need to learn techniques such as the ones I talked to in this course. Never getting code needs to be fast. Programming needs to become efficient and you need to be great at debunking. Now you need to practice on your own in order to consolidate your learning. At first you will resist applying these techniques. The important thing is to be persistent and keep practising. Used these techniques whenever you have the opportunity, soon they will become second nature to you. They will come naturally and you won't have to think about them anymore. Don't forget to do the last part. You have a lot of freedom to try things out and share something unique with your fellow students. You can apply one of the techniques to learn and share the results or share something new you found while exploring. I leave you now with this quote from the pragmatic programmer. Book tools amplify your talent, the better your tools and the better you know how to use them, the more productive you could be. I wish you the best of luck on your journey. Reach out to me if you need any help