How to Read The Shit-Mountain Code
What does the shit code look like
Bad names for variables and functions. And there are a lot of literals.
Bad data structures and database schema design.
Very long functions. Do a lot of things in one function. The business processing logic is chaotic.
Implementing algorithms are very ugly and low performance.
There are some potential bugs and problems in the code.
What it’s like to read shit code
It’s hard to understand it. You need to read carefully line by line. This is very painful and time consuming.
When I read the code behind, I have forgotten the previous code. It’s hard to figure out the entire processing logic.
Hard to read and understand, ugly code implementation and existing potential bugs drive me crazy.
How should we read the shit code
It’s known reading shit code is very painful. But there are some tips that may relieve your headaches.
- Write a description of the logic of the code in your own words. It helps you understand the code more easily.
- Do some work to modify the code slightly, such as renaming some variables and updating code order. It makes the code easier to read.