Remix.run Logo
lukaslalinsky 3 days ago

Read code, read code, read code. You will get better.

When looking at a piece of code, keep asking questions like: what does this return, what are the side effects, what can go wrong, what happens if this goes wrong, where do we exit, can this get stuck, where do we close/save/commit this, what's the input, what if the input is wrong/missing, where are we checking if the input is OK, can this number underflow/overflow, etc

All these questions are there to complete the picture, so that instead of function calls and loops, you are looking at the graph of interconnected "things". It will become natural after some time.

It helps if you read the code with some interest, e.g. if you want to find a bug in an open source project that you have never seen the code for.