Saturday, January 1, 2011

On learning C++, Spagheti code, and Hostile Forum Goers

So, time to talk about my little pet project. I'm in the process ot trying to learn C++. As you can imagine, this means alot of trial and error, and quite a bit more book reading. The fun part of learning C++ is the multitude of ways something can be done, and how none of them are apparently correct. It's "fun" to watch groups of people battle over the specific way a segment of code should be carried out, and as a complete newbie, it gives me a real feeling of being in the center of a war zone.

Everything, apparently, I code is incorrect. I use goto statements and lead them to loops. I nest if/elseif/else statements into one another, and I really don't comment my code much. I misuse functions, abuse pointers in ways that shouldn't happen, and generally mash things together until they work exactly the way that I want them to... which at times is not really that good from a technical aspect. To the user, it looks just fine.


I can understand to a point the level of Ass-hatery that happens from some of these people... I mean, these are guys who do this professional. The truth of it is, however, most of the material out there is really intimidating to the newbie.

I personally found this worst when I was learning about pointers and references. I had built a script that could load in a reference value, and then set it as the pointer. In theory, it worked. In practice, it didn't(it turned out to be a conflict from something else in my little program.) I posted on one of the many forums that I frequent the code, and got this snotty comment as a reply:

Never use cout. use printf. learn to program.
Now, beside my personal displeasure at this obvious trolling, it completely derailed the thread. It became about using cout to printf, the reasons why, and with a few(two) people actually commenting on the problem at hand.(one of these gentlemen actually explained the way the * and & symbols work, and I'd be completely lost without the help)

It's defeating as a newbie, to get this slung at you. If I wasn't so driven to learn, I really would have dropped the process right there. I don't know, I just feel like the community needs to shape up, and really define what standards ARE the standards. Possibly a project to look into in the future...

No comments:

Post a Comment