Advertisement

Storing Code Snippets for Newbies

Started by January 29, 2018 01:05 PM
4 comments, last by Bronco78th 6 years, 10 months ago

Hi All,

Im running through some video tutorials in C# as im newbie. One thing im doing is adding lots of comments to the code so I can go back and revisit the code later and know exacly what is going on.

What id also like to do is store the code snippets in an easy to find place so I can reuse/analyse them later. 

I kind of just want a long scrolling page with all my code and commented snippets on that I can use as reference later which also maintains the snippet  format and is of course searchable.

There seems to be a few apps as well as Git Hub etc to store code snippets but im just wondering which one from a newbie perspective works best for you and why?

Kind Regards,

John

 

 

5 hours ago, Bronco78th said:

Hi All,

Im running through some video tutorials in C# as im newbie. One thing im doing is adding lots of comments to the code so I can go back and revisit the code later and know exacly what is going on.

What id also like to do is store the code snippets in an easy to find place so I can reuse/analyse them later. 

I kind of just want a long scrolling page with all my code and commented snippets on that I can use as reference later which also maintains the snippet  format and is of course searchable.

There seems to be a few apps as well as Git Hub etc to store code snippets but im just wondering which one from a newbie perspective works best for you and why?

Kind Regards,

John

 

 

I've heard lots of a good things about GitHub, however I personally just create a blank source code file in Visual Studio, and just paste all my code in there. You can format everything as needed.

As someone that has been programming for a very long time, I tend to have folders with a lot of class files for various things that I can include into new projects, or make copies, then modify. I don't store code online.

In your case, you can use either GitHub, or create and file in Visual Studio (or whatever IDE you use), then add comment lines above the code and paste it in. No need to get too fancy for just review code. :) 

Programmer and 3D Artist

Advertisement

I second on what @Rutin said, however, I myself use GitHub because I tend to program in different computers (work, home, college), and it is easier for me to access the code online. Do what is more accessible to you. Of course, there are more options other than GitHub, I guess you can take a look at different options here.

Good luck!

GitHub's Gists, specifically, tend to be the most convenient way to do this. Saves needing to actually have git on the computers you are working on (very handy if some of them are shared/lab computers).

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Excellent, thanks everyone will try out GitHub/Gists and see what suits!

Regards,

John

This topic is closed to new replies.

Advertisement