[ / / / / / / / / / / / / / ] [ dir / agatha2 / animu / cafechan / doomer / leftpol / mde / tingles / vichan ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): af2a0c7f7783546⋯.png (29.42 KB, 741x568, 741:568, aputhink.png) (h) (u)

[–]

 No.1018535>>1018655 [Watch Thread][Show All Posts]

What should I do to improve my source code reading skills?

What is the sequence of actions should be undertaken if I, i.e., read some ~10k js (or not js) source to grasp its inner workings?

The "purpose part" for me is not that "wrong", I should say - I am able to read the source and in the end do what I wanted to with the source code, but my experience is small and I cannot be sure I do it correctly. Like, I was trying to tweak some js library, I opened Chrome Dev Tools, inspected the element -> event listeners -> click -> aha, this function does this and I have to adjust it accordingly.

But what if that was a C source code? Or way code with way more complicated callback? I honestly don't know how to read stack, or how to use debugger js.

The only book I have found is "Code Reading: The Open Source Perspective", which seems to be shitty.

 No.1018655

>>1018535 (OP)

get someone who wrote the code and ask for a quick walkthrough

set up a breakpoint in a place that interests you and go step by step

most of the time you don't have to know the details behind the code, you just need to have a general idea of what it does


 No.1018669

Find the line where it actually begins. Look at the overall structure of the code. Only read what you absolutely must in order to accomplish whatever it is you want to do.


 No.1018672

Write your own code, debug said code. Programming is not a spectator sport, you'll learn why things work the way they do when you come up with the solutions yourself.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
3 replies | 0 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / agatha2 / animu / cafechan / doomer / leftpol / mde / tingles / vichan ][ watchlist ]