This is not going to be an article to start but I was not sure were else to put it.
I was thinking maybe it would be a helpful resource to others if there was a list of down loadable "Plug and Play" type code snippets.
For example, having one for a basic character class in an rpg.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
class Player{
public:
/*here put things like basic accessory methods for below variables
and other commonly found things in what may make up a Player class*/
private:
/* have some very basic member variables such as:
int itsHealth;
int itsMana;
etc
*/
};
| |
Obviously it may look different but the idea is to make up several things like this as sort of a shared resource for others. The would be categorized from simple to advanced (relating to the concept they are based on and how much of it is made). This would also let new coders who don't have any other frame of reference have a database of example code. Another type of article that could be added would be such as the one I wrote on how to make a world map in console (its a few articles down). If we got together and even in people spare time put up a few example consistently I feel a solid reference could be built.
Now, obviously there our tutorials and such, even on this site. However many (most) tutorials you find use very vague examples and even some of the better ones can be too abstract for new coders.
Obviously we currently have an Articles forum, but really it is unorganized and can be hard to find what you want. My idea of this would be much like a game faq site. People can put up different topics/examples/snippets relating to (and labeled as such) specific coding topics. Also, I find that on forums once its written most people don't bother with it again. On Game FAQ sites and such you often see 6 walk troughs on the same game, but with different views and opinions. Obviously some are written better/clearer then others. That's why these sites have a rating system.
Another way to view this is like learning c++ from a book. I don't just use one book when going over/learning a topic, I use several. Even if the 3 books I am reading talk about the same thing there will still be differences (large or small) that may give me incite or make something more obvious.
To make this perhaps a wiki may be a viable form, or it may be necessary to make a whole separate website with custom database/search code.
So in summery:
I propose making a database of sorts of Articles, Code Snippets, and ready to use code examples (just change names around or such) that could be used by the beginner, as well as the intermediate and advanced coding community as a valuable resource for learning.
Thoughts please.
Edit: I realize this site has the /src/ and that looks to be a similar concept, however it is pitifully small and has topics many people learning or trying to get into c++ are nowhere near, plus contains only downloads with no articles.