Skip to content

Instantly share code, notes, and snippets.

View Kareem-negm's full-sized avatar
🧑‍💻
Open Source Coding

‪Karim Negm‬‏ Kareem-negm

🧑‍💻
Open Source Coding
View GitHub Profile
@hhimanshu
hhimanshu / how to read unfamiliar codebase.md
Last active October 24, 2023 02:11
how to read unfamiliar codebase

Overview

These are in no particular order. I found them by researching what methods other developers use to understand codebases that they have not seen before.

Recommendations

  • If the codebase has tests, read the tests
  • Try to write tests for the part of codebase you are trying to understand. This helps in understanding the behavior and serve as documentation
  • Get overview of project. See the overall picture. How many modules it has? What are the name of the modules? Pick one module and do deep dive into it.
  • Writing documentation for source code. This is a good practice to understand the codebase. I tend to prefer writing tests over documentation since the source code and tests are truth, documentation decays over time, generally.
@wojteklu
wojteklu / clean_code.md
Last active September 21, 2024 05:38
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules