Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'ve tried a few times to look at the source code for various things from githu

ID: 661417 • Letter: I

Question

I've tried a few times to look at the source code for various things from github or other sites, in javascript, C#, PHP, etc. I'm never able to understand the programs as a whole though. I can sort of piece together what a specific snippet of code does, but I quickly lose the context of what I'm looking at and how it fits in.

I want to be able to improve, but everything I've tried learning from so far has been too big. Where can I find well-written, but not very complex source code to look at?

edit: Sorry, to be more specific, I'm hoping for javascript/php/C#.

Explanation / Answer

The issue that you are facing is very real. You are always told to look at real word examples and then you find out that real word is ... not always a good example. You have a lot of code to go through, not all of which is at the same level or is good learning material, for various possible reasons.

Having said that, it depends on the kind of languages/projects you are interested. You could focus on a particular aspect and instead of studying the whole program focus on the single aspect. This is very similar to debugging: you have a large codebase and you are focused on debugging a particular crash in a particular situation: you have to be able to find your way through the layers of code until you reach the bug and (possibly) fix it.

So maybe you could look at a Open Source program that you use everyday and ask yourself "I wonder how they managed to do that"...then go and find out. Try to leave out the details which are not relevant and to isolate the functionality that you care for. If this doesn't work so well, maybe you just need to try again, or maybe the real world example was not so good to start with.

Now, to answer your explicit question one would need to know exactly what languages you know or want to learn. For instance, if C is among these, you should read (or re-read) Kernigan and Ritchie and do the exercise and then study the implementation of the actual unix commands which they have taught. For me, one of the largest body of sw that I studied almost 20 years ago was that of DikuMUD but that is not necessarily the best example I can think of (for sure it was fun!)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote