Best way to save your codes so that you can read them later?

1 points by shivajikobardan ↗ HN
https://imgur.com/a/zhBc0Ue

I was saving it like this, but as you can see this is useless in long run because you can't contextualize the codes. (even if you provide comments). So, what'd be best way? I'm thinking of writing codes and their output in Joplin(along with rest of the context) and printing them(or just read pdfs).

Any better ideas?

I'll save in github as well, but I need other ideas for learning from my past codes with context.

2 comments

[ 2.7 ms ] story [ 25.4 ms ] thread
Check out Git[0]. Using a version control system is a critical skill in modern software development where you can check a "blame" report on a file's contents to see what last touched that place or to check a log for a history of the software. As for the quality of your notes and commit messages, that is alas something that requires a more personal development.

You can also put each project into its own Git repository and throw it up on a site like GitHub to host it.

[0]: https://git-scm.com/

I'll do that as well, but what's the difference between saving in folders like I did vs in git for my purpose(which is to revise the codes later on, look at them and get new insights). Currently the code is so blabbered that IDK why I wrote that, IDK when I wrote, IDK in what context I wrote. That's the worst way to store codes for learning. that's given from my experience. Maybe just me.