Jump to content
  • Advertisement
Bronco78th

Storing Code Snippets for Newbies

Recommended Posts

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

 

 

Share this post


Link to post
Share on other sites
Advertisement
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. :) 

Edited by Rutin

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!