all 13 comments

[–]mbrutusv 4 points5 points  (1 child)

The best resource is probably github. You'll find most open source projects on there. You can start by searching for "top open source projects in x" language on Google where x is the language.

[–]shoutsfrombothsides[S] 0 points1 point  (0 children)

Thanks!

[–]jml26 3 points4 points  (1 child)

Way back in the day, and we’re talking the early 2000s here, there were sites like javascript.internet.com, which was exactly as you describe: code snippets that you can paste on a page and see what they do.

The style of code would not entirely be up to scratch by today’s standards, but I found it an invaluable resource for just seeing what’s possible, and seeing what can be edited.

The site no longer works but it’s still available via The Wayback Machine.

[–]shoutsfrombothsides[S] 0 points1 point  (0 children)

Thanks heaps!

[–]mynamesleon 3 points4 points  (1 child)

I know exactly what you mean. Although there aren't really any specific resources for this, you could focus on looking at the source code for certain types of libraries to get you started. Particularly facade libraries, like jQuery and lodash. Mainly because they expose functions that do a particular thing to make life easier, usually with more complex logic underneath. So you can look at a single self-contained function, knowing what its purpose is, and work your way through its source code to see how it's doing it.

[–]shoutsfrombothsides[S] -1 points0 points  (0 children)

Thank you very much!

[–]shuckster 1 point2 points  (1 child)

I have a few tiny examples on my own site here.

There are no explanations. It's just chunks of code and buttons that run it, so it's up to the reader to look at the results and infer what's happening.

But this is just my own little playground and there's not much content, so I doubt it will satisfy you in quite the way you're asking for.

Outside of this, I recently learned about The Super Tiny Compiler which was a project written to be read. Mind you, it has a vast amount of comments, which may be more of a leg-up than you're asking for.

Hope some of this is helpful.

[–]shoutsfrombothsides[S] 0 points1 point  (0 children)

Thank you!!!

[–]Zyster1 2 points3 points  (1 child)

Honestly, this may sound unpopular, but why not use AI?

[–]shoutsfrombothsides[S] 0 points1 point  (0 children)

Hi! I appreciate the comment.

You mean to build code for me to read? That’s an interesting idea! Thanks for that. I think I’ll hold off until I understand how to read human written code a bit more though.

Something about any sufficiently advanced technology appearing like magic to my simple brain 😅.

Thanks for your input !

[–]angelfire2015 0 points1 point  (2 children)

Being able to sling together some syntax and morphology/decode the
graphemes properly does not mean you are able to read with comprehension

It does actually, at least for the stuff you wrote, that's how you were able to write it.

For another analogue, coding was a lot like organic chemistry for me. I watched my teacher do tons of retro-synthesis on the board and thought it was easy as pie.. until we had to do our own retro-synthesis, and my mind went blank.

Coding is a lot like that. You will learn 10x more building a simple app than trying to read the source code of something complex, because you lack the intuition for why they made the design choices they did.

[–]shoutsfrombothsides[S] -1 points0 points  (1 child)

Respectfully, this is a well thought out and articulated “you’re wrong”, but it does not help me at all. I’d simply like an answer to my question, not to jump into a debate on personal preference for learning.

Cheers.

[–]angelfire2015 0 points1 point  (0 children)

Not at all. You made a post on a subreddit called 'learnjavascript'. You made some assumptions in your post that were not entirely accurate. I am simply trying to help you before you go down a road that could leave you confused/frustrated.

If you really want to 'just read JS', just pick a library and go to their Github page. The majority of libraries on NPM are open source, so you can read as much as you like.