www.digitalmars.com         C & C++   DMDScript  

c++.chat - ...have to maintain stability

In article <e17kk3$13d0$1 digitaldaemon.com>, Nic Tiger says...
Nicholas Jordan wrote:
 I don't understand why the approach of totally rewriting the entire project
 under the new (compilation model) does not immediately come to mind.

I *AM* rewriting most important parts of it, but I have to maintain stability (as it is stable now and is used by many people) for transitional period and have to support older files.

****************Lengthy Post**************** Are we talking about several thousand -types- of structres, or a large quantity of structures which can be typedef'ed for having the same number of members, types of members and names of members.... ? Most problem (types or domains) can be found to have common tasks or modes of thinking, these end up as a typedef. You write a small loop. Each record is read into the struct indvidually, the program operations are done on each record individually using the same var, no ? - Even STL with all it's proponents and accomplished authors uses this style, if you read the source. You are a working programmer in a real environment, I just have the real environment to claim as ballywick (area of expertise or work). Even though I am still concepting my first non-trivial program, I am approaching a quarter million keystrokes of source code, and it is obvious to me I have to write all this by myself...I run a two million dollar project, I am the project manager's personal assistant, and we crack jokes using shading of vocal intonation while discussing routine matters - the jokes are rare, if at all,... there is no joking on something that is used by many people. Some of the people, somewhere, someday - will not be subject to this pressure and may fail in a manner that is not detectable by you under inquiriy by persons not formally trained in cs. I *always* [no exceptions] get the expanded version of the macro from the pre-processor, convert it to cpp style, *then* begin the code-compile-test mode of converting file layout or whatever coding challenges are central to the operation of the completed program/project. Examples: in stddef.h #define offsetof(t,i) ((size_t)((char *)&((t *)0)->i - (char *)0)) In my project, that (obviously and with vigor) immediately becomes: size_t offsetof_ = static_cast<size_t>(static_cast<char*>..... Since I have lost track of the () operator, I quit trying to convert it and will find some other way to do it, some way I can understand. One of my stubbs, about 400 lines, has the opening comment: /* programmer written temporaries may reduce instances * of the compiler optimizing away programmer intent */ I am assuming, because of lack of formal cs training, that when I do it with windows.h, there will be minor and subtle differences in the way files are treated by the os and will <em> rewrite </em> the *entire* project ~ testing the two side by side extensively. The only time you write data/info directly to disk is when the program has done it's work - no ? If you have a different brand of machine with a different alignment/padding arrangement, there are details in the physical implementation of the electronics that can be 'optimized' by an E.E. and are beyond the scope of the programmer to detect with coding alone. Basically, you're in a good position to write some maintainable code. There's really no other good way of doing what you need, I think the poster from embedded control coding environment has the say on this as in that coding challenge, one would not - even in a nightmare - allow the thought of coding to standards used in routine business-grade code. You may be swamped by the project, but be aware of the "lost weekend syndrome" - in the days of gigabyte drives and gigabyte clocks, there is not any ground for claiming recovery cannot be done.... When my program gets used by other people, there will be recovery and trace tools available to sysops that are protected by passwords like: "cce75942d9035a42400c85255754080d2a8da9e9398e21a03ba6a5f69ca99ae" That's just the password for my demonstrator version. If you wonder why, I wish you could meet this E.E. candidate I met recently who goes by the internet alias: 'Red-Black Dragon' He was eating a Tiger that was making Panama-Hash out of TwoFish. I didn't have to explain it to that internet citizen that given the capability of some legitimate wrapper software to render a machine useless for it's intended purpose, recovery should be your approach from beginnning. class RatTrap : std::exception { public: bool RoutineMistake(void);// } Why would you need or want to use offset of ? //eof
Apr 16 2006