Talk:C plus plus version

From WikiManual
Revision as of 20:09, 8 May 2006 by Numsgil (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

That should mean as well avoiding macros, avoiding globals, avoiding to split classes over many files and using a consistent naming scheme, but judging by the current state of the code, it doesn't. -Sprotiel

First of all, I find it incredibly irratating that you don't bring gripes about my style (which is inevitable because everyone's style is different. I don't think I've ever found a coder call someone else's code pretty) to me face to face, and instead post passive aggressive comments in various places. If you don't like something I do talk to me about it. Please cite and show me areas you find to be obtuse and suggest an alternate way that I should have done it. I'm an expert in C++, expert enough to know there are still things I can learn.
That said: My beginning use of macros is still somewhat experimental. They are primarily used in areas where they help increase maintainability (if not readability), especially in the GUI code (a million function calls all but identical). They are also used in areas (such as the new Vector setup) where templates are just going to make things messy (MSVC doesn't handle advanced templating very well, especially in the form of inlining classes. MSVC came out before they ANSIed the language.)
As to naming scheme, I think it's quite consistant except in areas that are what I would call "grandfather" code. IE: that's how the code was set up in the VB system, so that's how all the coders are familiar with it. In general ThisIsMyNamingSchemeAndIThinkItWorksQuiteWell. I have seen worse.
I have recently begun moving some various class functions away from being grouped in the same file and instead group them on common purpose. IE: Robot functions dealing with ties in ties.cpp. This was after months of flipping between two different .cpp files while I was working on a certain system. They make it easier on me, the principal coder. Or maybe you mean splitting the robots class across different .cpps. Have you seen the size of the Robot class? Robots.cpp is already the longest file in the whole project!
Globals are not bad. They are only bad if you're after an object oriented design. It should be pretty obvious I'm not. I have no idea what my programming style is called, but it's the style I've found myself to be the most productive in. I find it also to be the style that makes the most sense to me years later when I go back and look at my code. Having worked on the C++ version since October, I still feel that the code is reasonably well organized and maintainable. The globals in the code are only those objects which are indeed global in nature. Or that's the idea.
It's 12000 lines of code, there might very well be some areas that aren't pretty. I admit it. But I know what all those 12000 lines of code do. It's written in the way my mind thinks. I could come back to it in 10 years and still probably figure out what's going on in most of the code. I can't say the same for the vast majority of code I've seen others write.
Perhaps if you wrote some of the code it would reflect the way your mind works.
--Numsgil 18:09, 8 May 2006 (MST)