Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 17, 2022 11:30 am GMT

4 non-coding tips on how to improve coding skills

What do you do in your job? Simple question, but usually the answer is not that simple. We write code, but is the knowledge of your languages of choice the only thing that you should learn? Are there other things that you can learn and utilize to make you work faster and enjoy your job more?

I admit, this article will be a bit of a fluff piece. I wanted to list and take note of some very simple things we do in our work all the time but rarely think about improving.

Touch typing

Alt Text

There are some skills that are very basic building blocks of a profession. Chefs cook, but there are very few recipes that will not include cutting something. Because of that most chefs are masters at using a knife.

Builders will construct complex things, but to do that, they must be proficient at using a simple hammer.

Similarly, even the most complex application is represented in code, therefore programmers type. A lot! Code is written, then refactored, then refactored some more. Similarly to chefs, we should be masters of the keyboard. In our current day and age, people use keyboards from a very early age and most can use them relatively well. But to use something and be efficient at it is a different thing.

There are multiple typing techniques. A common and ineffective one is hunt and peck, where a person looks at the keyboard to find and press the right button. There is also a hybrid technique, where a person has the layout of the keyboard memorized, so there is no need to look at it, but still uses just a few fingers. This is a very fast technique once a person finds his style but the problem is that your hand is moving while doing it and this can lead to some painful problems like carpal tunnel syndrome.

The most effective technique is touch typing. It is the skill of inputting characters without looking at the keyboard and also by using all your fingers. With a lot of practice, it allows for ridiculously fast typing with a minimal error rate. Also, at least for me, it makes typing fun!

So if you are going to spend your life typing, why not have some fun doing it? There are multiple resources on the internet that will help you practice this vital skill. I can personally recommend this tool for practice. Just make sure that you know and understand the correct way of typing, because getting rid of bad habits can be very hard.

Googling

Alt Text

Yes, googling. Every programmers bread and butter. I cant even imagine how annoying it would be if we had no way to quickly find documentation of the library we are using, or even worse the solution to the same problem were having that has been discussed and answered some time ago by someone much smarter. Being forced to use books that are usually outdated shortly after publishing, or even more bizarrely asking questions in mailing lists, is unthinkable!

The internet is the source of knowledge for every programmer and finding stuff you need is usually just a matter of entering the phrase into the search box. Search engine algorithms are currently so good that usually, you dont even need to be very specific in order to get the answer you are looking for. Google however also provides you with some tools to refine your query!

Lets be honest, when you search for the solution to a problem, you expect that someone has had this problem before and asked about it on Stack Overflow. So if you know where you want to find your answer, why dont you tell that to Google up-front? To do that just put site: in front of the query like so: site:stackoverflow.com django. (In case you actually want to search for the movie called Django, the phrase site:imdb.com django can help you.)

Want to find something with a weird name without Google showing you the results of something it thinks you need? Just place it in quotes to look for exactly that.

Does Google keep showing you results with a phrase that you already know is not related to your problem? Using - can exclude results with this phrase.
There are multiple such operators that will allow you to

  • search `for a number in given range
  • use OR
  • exclude words
  • and many more!

These are described on the Google Search Help site

Using your IDE

Alt Text

There are some who are determined to be as close to nature as possible and refuse to use any overly complicated software like Integrated Development Environments. I for one cannot imagine working without an IDE. It is a great help and makes working with code so much more pleasant.

However, I must agree that it is complicated. There are plenty of options that you most likely still dont know about even after working with the application for several years. So, why not find out about them?

People tend to just use what they know and only search for new things when they are strictly required for something. An IDE does provide some solutions that may not be required, but once you start using them, you start to understand their usefulness.

One such thing is shortcuts. You dont need them. You can do just fine without them. But you really should learn to use them. You are going to do some things often when navigating a project quickly jumping to a file, opening the terminal, going to the next tab in the editor. Doing such things once or twice doesnt take much time when using a mouse, but it really stacks up in the long run. Doing it with a keyboard is faster and the flow of your work feels so much better.

Other useful features that most IDEs provide are refactoring options and code generation. Ever had this feeling after the refactor that the function name no longer clearly conveys what it actually does? But you already used it in so many places that changing its name now would just not be worth it, right? That inevitably leads to ugly code. But with a modern IDE that should never be a problem. It can track usages and automatically change the names for you.

There are plenty of other features like column selection, cursor duplication, smart code completion, intentions, template generation, debugging, navigation, code analysis, and many more that are just waiting for you to discover and use them. I will provide just a short list for IDE I use Pycharm. These will also work for most of the JetBrains products.

Ctrl + Alt + M Extract Method. This is great for splitting your code into small, single-purpose functions. Makes your refactoring so much easier.

Shift + F6 Rename. This is one of the most often used. Sometimes the name is no longer correct and the difficulty related to changing it used to stop programmers from refactoring. IDE can track all uses and refactor names everywhere.

F6 Move module member. I often like to prototype in a single file. Once classes are ready I use the move feature to split code into separate files.

Alt + Shift + Insert Toggle column selection mode. This is useful when you want to add / change something in multiple lines.

Ctrl + O Override method. When used inside the class you will be presented with the list of inherited methods. Selecting one will quickly generate the code needed for overriding it.

Ctrl + I Implement methods of an interface / abstract class. This saves you a ton of boilerplate typing.

There are much, MUCH more of these and you can check them out in the documentation of your IDE. I strongly encourage you to search for it next time you must do any refactoring in your code. Most likely the function you need exists in some form.

Time management

Alt Text

It is hard to focus on things. It is even harder to prioritize them. When you have a lot of things to do, everything seems to be important enough to do them right away. Doing everything at the same time is unfortunately not possible and you will end up completing nothing.

For time management there is no universal solution. Every human is different and our brains work differently. What you can do is try different methods and see what is the most effective.

Find the ones that are recommended the most often and try them. Maybe you will click with the Pareto Analysis, or maybe the Time Blocking method will be your thing. Maybe something as simple as creating a daily TODO list or using a Pomodoro timer will be enough. Maybe you need to mix and match some elements from different methods to create something that works best for you.

Your thoughts?

These are four things I thought about when I asked myself the question based on the title of this article. Maybe you have some other ideas about non-coding skills that we should all learn? If so, let me know in the comments below!


Original Link: https://dev.to/profilsoftware/4-non-coding-tips-on-how-to-improve-coding-skills-5gm8

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To