Pramod67's blog

By Pramod67, history, 2 weeks ago, In English

Everyone should learn how to code a computer, it teaches us 'How to Think'

Many individuals possess significant coding experience and frequently participate in coding contests.

However, they often struggle to clear coding rounds during face-to-face interviews. The primary reason for this is their failure to adhere to proper coding standards. **** Preparing for a coding interview involves not only mastering technical skills but also understanding common pitfalls. Here are some mistakes to avoid:

=============================================

1. Avoid using global variable / declaration:

Using global variables or global declarations in coding can lead to several issues that make your code less efficient, harder to maintain, and more prone to errors.

• Confusing Code: Global variables can be modified from anywhere in the program, making it difficult to track where and how they are being changed.

• Harder Debugging: When a bug occurs, it can be challenging to identify which part of the code is causing the issue because the variable’s state can be altered in multiple places.

2. Avoid making changes in original data:

Avoiding changes to original data in your code is a best practice that can help maintain data integrity and prevent unintended side effects.

• Copying Data: When you need to modify data, create a copy and perform changes on the copy instead of the original.

• Reusability: Keeping the original data unchanged allows you to reuse it in its original form for different operations or tests without needing to reload or recompute it.

3. Never deep dive into Brute Force:

Avoiding a deep dive into brute force solutions during coding interviews is essential for several reasons. While brute force solutions can be a starting point, relying on them can lead to inefficiencies & waste of time.

Instead, focus on delivering the higher-order solution by explaining how your code works and its time complexity.

4. Code Quality:

Code quality is a crucial aspect of software development, as it directly impacts the maintainability, readability, and efficiency of the codebase.

Use proper variable and function naming that is directly related to the problem being solved, rather than using arbitrary names.

Code Quality, is more important than, how good you're in problem solving.

5. Don't submit, Hold On:

Avoid submitting your code immediately after writing it. Taking a moment to review and refine your code can help catch errors, improve efficiency, and ensure overall quality.

Once you have completed your code, validate its correctness by performing a dry run with an edge case and explaining the process to the interviewer.

Once verified and confirmed to be functioning correctly, you can proceed to submit your code confidently.

6. Think out Loud:

“Thinking out loud” in coding refers to the practice of verbalising your thought process while solving a problem or writing code.

This approach is valuable during coding interviews or collaborative coding sessions as it allows others to follow your reasoning and understand your approach to solving the problem.

Absolutely! Avoiding common mistakes during coding interviews is crucial for success. It's great to make it a habit to focus on preparation, clear communication, problem-solving approach, and code quality during every coding session.

This ensures you're consistently improving and ready for any coding challenge.

Full text and comments »

  • Vote: I like it
  • -26
  • Vote: I do not like it

By Pramod67, history, 3 years ago, In English

Hey everyone, I'm doing CP since 8 and half months but unable to get the result which I want. I stuck on a problem and unable to click the logic. Is anyone can suggest me any changes if I need to make to improve on certain basis.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it