Oct 11, 2006 23:58
Ohhhh yes. Today i deciced to refresh my memory of the wonder that is the binary number system. And strangely I found it a million times more intresting now, than i did at university. Perhaps it's because i was using programming languages at university that really didn't even concern itself with binary. Therefore...whats the point in it if i'm not going to use it?
C++ on the other hand has the ability to do just that, to use an actual area of memory in programming. I initially found this concept quite pointless and wondered what the big deal was. Why point to a memory address when you can just use a regular variable? Having read quite a number of articles and guides on the basics of C++. The simple reason it does this is now apparent. Speed. Languages like visual basic and the language i use at work (Visual FoxPro)access memory at a very high level, memory like your standard RAM. High level memory is slow in comparison to whats inside your CPU. Therefore although i'm getting incredibly frustrated at how long winded and visually complicated writing anything in C++ is, i'm pretty confident that my reasoning behind it would be i want something to work FAST.
This is also backed up by the reality that C++ is the main language used for games. Games consoles always have very little high level memory. I'd always wondered why, when i looked at the hardware specs of a new console, why they looked so pitifully sub-standard in comparison to my PC. Well the answer appears to be that the language the games are written in barely uses that reported 512mb of system RAM. It's all done using the memory inside the processors and in the cache. Which is more or less the same as what i have in my compputer now. The PS3 has a mere 512mb of total RAM and 512kb of cache. But it has 9 processors! 7 standard 1 graphics and 1 sound. My PC has a single processor with 512kb of cache, 1gb of RAM and 256mb of video ram, more than twice the memory of a PS3. Yet i'm damn sure a PS3 would whoop the lilly white naked ass off my PC.
So at least now i can grasp why the emphasis is on C++ over other languages, and i see it's advantages. That of course doesn't make it any easier to translate what i know in FoxPro into C++. One step at a time. I'll get there in the end, it's just going to take a LONG time >.<
Lets split this one up so it doesn't get too large eh ;) All in all, i'm happy with my pgroess so far!