JavaRush /Java Blog /Random EN /Coffee break #8: How to quickly learn to read someone els...

Coffee break #8: How to quickly learn to read someone else's code. Errors when creating a profile on GitHub

Published in the Random EN group

How to quickly learn to read someone else's code

Source: Selftaughtcoders Surely many of you are familiar with the situation when you have more or less learned to read your own code, but when you try to look into someone else's, you immediately get lost. There is a proven technique to solve this problem. Believe me, if you understand it, it will seem very simple to you. Coffee break #7: How to quickly learn to read someone else's code.  Errors when creating a profile on GitHub - 1

1. Find one function that you are already familiar with and trace all of its actions in reverse order, starting from the end

For clarity, let's take an example. You know that the code you're reading now ends up creating a file with a list of movie titles. Find where in the code are the lines that generate this file. If found, take a step back and determine how the code puts the information into the file. After that, take another step back and find where this information comes from. And so on. Let's call all these pieces "a chain of actions". Using this method, you will be able to familiarize yourself with different elements of the code, which will allow you to have a good understanding of things such as:
  1. Code structure (where variables are inserted, where different methods are located, etc.).
  2. The style of writing code that the author adhered to.
  3. The mindset of the creator of the code and his approach to solving problems (yes, this is already more difficult, but with experience you begin to understand such things intuitively).
  4. By regularly reading from the end of the code to the beginning, you will gradually improve your understanding of the code as a whole.

2. "Rinse and repeat"

Repeat the whole process several times. This will help you better remember more and more elements of the code structure. Imagine that you are lighting a dark room with a flashlight. This is how, gradually, previously unknown parts of the code will be revealed to you. In the end, you will remember where and what exactly is in this room. The meaning of the method is based on the fact that the code is always created to solve one (or more than one) complex task. Therefore, the regular passage of the "chain of actions" is provided to you. The sooner you understand how different parts of the code are related, the better you will understand its structure as a whole. Accordingly, the easier it will be for you to read someone else's code.

Mistakes to Avoid When Creating a GitHub Profile

Source: Dev.to When creating a profile on GitHub, newbies often make mistakes that could be easily avoided. If you want your GitHub profile to make a good impression on the employer, there are a few important things to consider.

Mistake #1. Including all apps you write in your GitHub profile

Very often, developers thoughtlessly include all the applications they have created in their profile, believing that the more, the better. In reality, this has the opposite effect. The candidate may come across as unreliable and lacking specialization. Therefore, applications for your GitHub profile must be carefully selected according to the following principles: Coffee break #7: How to quickly learn to read someone else's code.  Errors when creating a profile on GitHub - 2Applications must demonstrate your growth as a developer. It is possible to include two iterations of the same application: the first will contain code written at the beginning of your programming career, and the second code will contain all the improvements and refactorings. Also, in the README of the improved version, write what changes you made and why. Show the results of overcoming the difficulties you encountered during the training.Include in your profile the apps that you had a hard time creating and describe in the README the challenges you managed to overcome. Demonstrate the ability to combine multiple functions and make them work together. Beginning developers sometimes make the mistake of showing apps that only have one main feature. I recommend including applications in your GitHub profile that implement multiple functions. Of course, all of them should work without failures. Applications must demonstrate your interest in development. If the app you've created matches your passions and personality, feel free to show it off.

Mistake #2. Half empty README files

When someone visits your GitHub repository, they see the project name and a column of folders. Typically, most people scroll down to the README section of the page. And if they find an empty file there or a default README text from GitHub, then all these people may never know what amazing code was hiding in your folders. And all because your README file made a negative impression. The README file should tell a story that will impress the HR/employer and invite you for a personal interview. Therefore, the README file on GitHub should contain the following items:
  1. Reasons for creating an application.
  2. List of application features.
  3. Problems encountered in the process of writing code and how to solve them.
  4. Instructions for deploying the application locally.

Mistake #3. Enabling Applications Not Deployed Online

In most cases, the employer will not deploy your application locally. But some of them can still test your program and its functionality for bugs. If your application can't be deployed, you're missing out on a great opportunity to showcase your great programming skills. And even your app touches the backend, that's not a problem! Implement the bare minimum frontend, deploy the app, and explain in the README that in this app you are focusing solely on the backend, and its frontend is not meant to showcase your skills and only serves to access backend functionality.

Do I need to list incomplete or abandoned apps on my profile?

Yes, but with the obligatory mark "In Progress". This will give you the opportunity to show what applications you are working on, correcting for their incompleteness.

Results

The choice of applications for a GitHub profile should reflect your development history, show the skills you would like to demonstrate. Your goal is to convince the employer that you are a valuable asset to his team. Therefore, choose those applications that can prove your ability to independently and effectively solve technical problems of various levels of complexity.
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION