JavaRush /Java Blog /Random EN /Coffee break #49. Code examples every developer should se...

Coffee break #49. Code examples every developer should see. How to prepare for an interview

Published in the Random EN group

Code examples every developer should see

Source: Medium Sometimes in my free time I wander around GitHub repositories. When I start learning new programs, tools or utilities, I try to see them in action. To do this, I look into their code: it helps to understand how everything works, what modules and external dependencies are there. Immersion inside the technology gives incredible sensations and allows you to gain new knowledge. Coffee break #49.  Code examples every developer should see.  How to prepare for an interview - 1In my article, I would like to share the most impressive code examples that I came across while wandering through the repositories.

Apollo 11 control program

Apollo 11 is the spacecraft that took people to the moon. The on-board control computer (AGC) controlled the flight operation with only 4 kilobytes of physical memory. The AGC software, written in assembly language, was stored in a special read-only memory (rope memory). Several years ago, scanned paper copies of this source code were posted on the Internet . Then someone wrote several modules into text files and uploaded them to the GitHub repository . Coffee break #49.  Code examples every developer should see.  How to prepare for an interview - 2The Apollo 11 engineering team worked hard to achieve this amazing result. They wrote a lot of lines of code in assembly language, even though programming was much more difficult in the 1960s than it is now. At that time, programming languages ​​had a lower level of abstraction. In addition, due to the low-power hardware, developers had to write highly optimized code.

Quake III Arena

Quake III Arena is a first-person shooter video game created by id Software. The game appeared in the 1990s, when the 3D gaming industry was just beginning. The game engine id Tech 3 was used for its development. As in the case of the Apollo 11 lunar program, due to limitations in hardware resources, the code for rendering graphics was heavily optimized. Many game programming calculations require the concept of vector normalization, which necessitates calculating the inverse square root. Because developers needed to choose the most efficient algorithms for computer graphics, Quake III Arena took a clever approach to quickly calculate the inverse square root using bit-level calculations. Coffee break #49.  Code examples every developer should see.  How to prepare for an interview - 3The level of optimization in some of the code you see, and in fact in all the code that was used to create games in the 1990s, is simply amazing. Today, video game developers typically do not do computation at this level because many functions are performed at the game engine level.

GNU Compiler Collection

The C programming language can be called the father of modern programming because it is very close to hardware, but at the same time offers a good level of abstraction that is understandable to humans. The GNU C compiler is a bootstrapped compiler. That is, it is written in C using the concept of compiler unwinding. In the GNU Compiler Collection code on GitHub, I found the longest C source file I've ever seen (there may be longer files, but this is the one I found).Coffee break #49.  Code examples every developer should see.  How to prepare for an interview - 4

Chromium

Popular browsers such as Google Chrome, Microsoft Edge and Opera are based on the open source Chromium project. This project has two main dependencies: the Blink engine (a fork of the WebCore library from the Webkit team) and the V8 JavaScript engine developed by the Chromium project team. Of course, Chromium's code is quite extensive and contains many third-party modules such as gRPC and Skia . But the Chromium developers managed to structure all these components perfectly. The codebase cleverly separates internal function logic from user interface logic. This ensures good support for the entire project. Coffee break #49.  Code examples every developer should see.  How to prepare for an interview - 5In addition, the project code contains the source code for Chromium Android and iOS applications. Structuring highly scalable cross-platform applications can be challenging. However, Chromium has truly impressive code separation across Linux, Windows and Mac.

Gitk

Nowadays, every team uses Git to manage code versions. This version control system was developed by Linus Torvalds (creator of the GNU/Linux OS kernel). The Git codebase includes the Gitk source code. Gitk is a GUI application that provides visual navigation through commits. To see how two commits differ, you can use the following command:
$ git diff <commit hash> <commit hash>
But since Gitk is a visual tool, we can see the difference much faster with it. Coffee break #49.  Code examples every developer should see.  How to prepare for an interview - 6All Gitk source code fits into one . The code is written in the Tcl scripting language using the Tk UI-toolkit, a Tcl extension. Condensing an entire GUI application into one file is a difficult task.

How can a developer prepare for an interview?

Source: Hackernoon I remember my first interview. I had just finished my degree and was applying for an internship at a financial company in Madrid. I was very nervous because I didn't know how the interview would go and I wasn't aware of current trends in software development. It was after Easter, I was only 21 years old, and it would have been more enjoyable for me to spend time with friends on the beach. But instead of having fun, I had to prepare for an interview. Coffee break #49.  Code examples every developer should see.  How to prepare for an interview - 7The first step before every interview is getting to know each other. They ask you for your name, address, specialty, and so on. After this, you will undergo a personal interview, it can be face-to-face or via video link. In any case, this interview will test your experience, knowledge and skills for the position you are applying for. You will then likely be asked to write code where you will demonstrate your ability to solve problems or problems. Additionally, you may expect an interview with a project manager or company director. This depends on the position you are applying for. The interview process can take a long time. Therefore, you need to be patient and remain calm. I have prepared some tips and tricks for you on this matter.

Research the position to make sure it's a good fit for you.

Sometimes when we are looking for a job, we just show up for an interview without looking at all the information about the position. It’s better to clarify the list of your responsibilities and work schedule in advance. Also check if the company and position matches your requirements

Try to stay up to date with your career trends.

A big mistake is not following trends and new technologies in your work. You're probably a developer or project manager, you have your own way of working in your current role and the same technology for all your projects. But please try to spend a little time every day learning new technologies. This is very important in our career. You need to stay updated with new frameworks, new methodologies, and more. This will make a big difference in your interview.

During an in-person interview or video call: try to look good and relax

Your appearance is just as important as the design of your app. You may have a perfect backend, but if your app has a poor frontend, you'll have a hard time selling your product. The same is true with your appearance: at an interview you should look, if not formal, then at least decent. This will demonstrate your willingness to follow corporate rules. I know some people here will think, “Hey, I'm a genius, why should I care about my appearance?” Well, if you are a genius and look good , then you will definitely make an impression!

Take your time

Before the interview, you need to prepare, study topics, practice algorithms and problem solving, and prepare a speech. Some of these processes are lengthy and take time. So make sure you have an advantage here.

Practice

It depends on your experience, but my recommendation here is that if you have to write code in an interview, please write it correctly. To do this, you need to learn how to clean and review code. This will help you reorganize or improve some of its functions.

Demonstrate your experience in a face-to-face interview or in code

Try to show experience. An interview is the perfect place to explain to the interviewer why the company should hire you. Before your interview, familiarize yourself with basic programming concepts, methodologies, and best practices.

Get enough sleep the day before your interview.

Try to get enough sleep. This will help you stay focused the next day. If you don't know the answers to any interview questions, please don't lie —be honest, it will help avoid many complications in the future. And this will help you see your weaknesses that you need to improve.

Trust your answers

Don't doubt yourself. Never.

During the interview, you must project safety and confidence to everyone.

If you don't have this skill, you probably need to work on it. Confidence is when you answer, “I don’t know the answer, but I can look it up and answer later.” This answer option shows security and confidence.

Analyze the interview

Each interview is different, but they all share some similar traits. Therefore, after the interview, you should reflect on what went well or poorly about it for you. An interview is a good time to look at yourself from the outside, at your strengths and weaknesses.
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION