|
Pavel Sokolov wrote:
I can't use it, my current project have a 150 classes and unnamed variables is hell for me
It sounds like your code needs to be cleaned up (simplified) if you have 150 classes!
|
|
|
|
|
Anonymous wrote:
It sounds like your code needs to be cleaned up (simplified) if you have 150 classes!
This is a minimum...
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
ps.
VS.NET have a poor interface with a poor speed ( pIII 450/ 768mb RAM ).
and I downgraded to VC6.0
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
Ok, but although it's a bit slow my cranky old f*ck (that's my PC) still runs VS.NET quite good. Viewing the DHTML reference in the MSDN is a real pain in the ass!
|
|
|
|
|
You do not buy new compiler, cause it is faster, but cause it is better (more new functionality, new classes, easier work - I don't say that it is all there, in vc7). If You want fast compiler, get Borland C++ 3.1 for DOS - heh - it is really fast for today.
|
|
|
|
|
where new classes? do you know vc7 ? if I want to add new class in vc7 I should wait 5 -7 seconds before html dialog is loaded. I have pIII-450 with 768 mb of RAM, I think this is not an old computer.
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
Pavel Sokolov wrote:
if I want to add new class in vc7 I should wait 5 -7 seconds before html dialog is loaded. I have pIII-450 with 768 mb of RAM, I think this is not an old computer.
I have used VC7 a lot on my old computer, a PIII-600 with 512 MB Ram, and it worked great. Didn't have to wait much for those dialogs.
A lot of it have to do with your disks though...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
oh c'mon! you "programmers" can afford $1,000+ for VS.NET, but can't spend the same amount on a decent computer? sad sad thing.
|
|
|
|
|
First of all, I've only spent aprox. $350 on a VS.NET upgrade.
I also have a great almost new computer (Dual 1800+), but we were talking about the speed on low/middle range computers...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Ellery,
Some of the people replying to this discussion thread are not professional programmers. Rather, they are students learning how to use the latest and greatest tools. Unfortunately, this means that they never paid for VS.NET. I'm sure you can draw your own conclusions from that statement...
From this point of view, they are paying exactly the same amount for the hardware as the software.
--
Paul
"I drank... WHAT?"
|
|
|
|
|
Ellery Familia wrote:
oh c'mon! you "programmers" can afford $1,000+ for VS.NET, but can't spend the same amount on a decent computer? sad sad thing.
I suspect some of them may have bought on a "promotion" and paid only $2 each CD.
Concussus surgo.
When struck I rise.
|
|
|
|
|
I would think a laptop with a 1GHz Duron (256MB RAM) counts as a "decent computer"...and VS.NET runs like a fly in treacle on it.
IMHO There's no denying that VS.NET requires a lot more power than VS6...though even VS6 is pretty slow on large projects.
Andy Metcalfe - Sonardyne International Ltd
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
"I would be careful in separating your wierdness, a good quirky weirdness, from the disturbed wierdness of people who take pleasure from PVC sheep with fruit repositories."
- Paul Watson
|
|
|
|
|
And if you change the DWORD to a WORD, do you diligently search and replace all references to the variable name with the corrected name? Maybe you do, but I bet a lot of other people don't. Plus, why code the storage method as part of the name? Isn't this why we have getter/setter methods, so we don't need to concern ourselves with internal implementation, and therefore don't care about the storage mechanism?
Marc
|
|
|
|
|
I'm happy with my notation
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
Marc Clifton wrote:
And if you change the DWORD to a WORD, do you diligently search and replace all references to the variable name with the corrected name? Maybe you do, but I bet a lot of other people don't.
Actually, I do that, and have no problem with it. If I'm changing the size of something, it's not a bad idea to go look at all usages of it as part of the change; it usually only takes a few minutes. Might as well change them whild looking.
Marc Clifton wrote:
Isn't this why we have getter/setter methods, so we don't need to concern ourselves with internal implementation, and therefore don't care about the storage mechanism?
As nice as that sounds, frequently we do care about the storage mechanism. For example, in communicating with external devices - whether they be musical instruments as in my work, or files, whatever - the size of storage is frequently hard-coded and must be respected. Sometimes data must be passed through a pipe of fixed size.. in which case data may be truncated and precision or sign lost.
Here's another example: I work in a typical mixed environment, with character strings represent in various APIs as either char*, CString, or STL string. Frequently I have to deal with two or even all three types in the same chunk of code, all referring to the same text. In this case specific prefixes are very helpful.
|
|
|
|
|
In Pavel's defense, I too prepend variable names with their type. I find it generally helps the readability of the code. And yes - if I change a variable type, I do change the variable name accordingly - otherwise doing it in the first place is useless!!
You talk about having get/set functions for data hiding, but what about within the class itself?
I think after using it for a while you can really benefit. My colleague recently named some variables sBlah (CString) instead of saBlah (CStringArray) and it caused no end of confusion!
-Paul
|
|
|
|
|
PaulMdx wrote:
You talk about having get/set functions for data hiding, but what about within the class itself?
I use a strongly C++, object oriented notation with a data hiding and others cool stuff, inside the class too.
Pavel Sokolov,
CEZEO software,
LanTalk Network,
http://www.cezeo.com
http://www.lantalk.net
|
|
|
|
|
|
Marc Clifton wrote:
And if you change the DWORD to a WORD, do you diligently search and replace all references to the variable name with the corrected name? Maybe you do, but I bet a lot of other people don't.
Yes you should. And it is easy to do. Simply change the declaration and the compiler will not compile until you have made all the neccessary changes. This is about as close to forced self documenting code as it gets. Comments in context are far less easier to find and change.
Marc Clifton wrote:
Plus, why code the storage method as part of the name?
OK, so you see the following line of code, what does it mean?
bone = currentBone;
Is bone a string or a number or a class? So now you have to look at it's declaration. OK, so now you say, "Well, I wouldn't have named it bone or currentBone."(Hey, neither would I.)"I would have named it boneIndex or boneName." OK, so is boneIndex an iterator or a number or a key in map template? As for boneName, is it const char * or string? All this information is very important in debugging.
Marc Clifton wrote:
Isn't this why we have getter/setter methods, so we don't need to concern ourselves with internal implementation, and therefore don't care about the storage mechanism?
This helps for setting/getting members of a class, but what if you are just dealing with variables within code.
Also, remember cast conversion operators are inheirent in even basic types so...
const char * currentBone = "leg";
int bone = 0;
bone = currentBone;
This compiles, but it would far less likely to be written if it was:
const char * pszCurrentBone = "leg";
int nBone = 0;
nBone = pszCurrentBone;
Jason King
|
|
|
|
|
Pavel Sokolov wrote:
Bad example
WNDENUMPROC
Good example
LPTHREAD_START_ROUTINE
Yep - I'm with you Pavel. The more verbose a name the better.
cheers,
Chris Maunder
|
|
|
|
|
I agree.
Edward_Francis_Gadziemski
|
|
|
|
|
I also make every effort to make my code as neat as possible. But at the end of the development cycle I always end up wondering who the heck wrote that pile of crap while I wasn't looking. I think that there is some kind of thermodynamic principle governing how this happens. It certainly isn't my fault!
I'm not a real reverend, I just play one on CP.
|
|
|
|
|
You are quite right
I have learned in my software engineering lectures, that there is some "rising entropy" in every software project. Big and long-living projects' code size increases about 10-20% per year - just because of maintaince entropy.
Themoynamics can explain us the whole world
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Reverend Stan wrote:
I always end up wondering who the heck wrote that pile of crap while I wasn't looking.
You too? Man - whoever it is sure gets around.
cheers,
Chris Maunder
|
|
|
|
|
Yeah, I feel physically sick when I look at my old code also.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|