|
Dear James (gonna take it personally this time ),
I can see you going around and ranting at peoples posts, mostly ending with "Peace". If you have had worked brain before mounth (which is a tip of the life actually, leave a month alone) then such a suffix would not be neccessary, wouldn't it? So, since you are looking for fight, obviously, here you will get one...
As long as posts are containg an information they are not a waste of space. Give you an example. Here is the waste of space example:
>Because there are sites that are dedicated to this kind of thing already. We would be wasting space for no good reason.
To turn it into something more than ranting you could stick the URL to one or two of these sites. That would be useful...
Next, it is YOU not me who is trying to prevent peoples from posting the stuff which is certainly on topic, using an excuse of "My concern was about turning this topic into an obfuscated code competition". It did not happen, did it? It is not a competition anyway, just a samples of code. What is wrong with that?
Next, these "I never said it was not on topic." and "re-read my post". Come on, what was that "Hmmm... Are you sure...? Last I checked (snip)" all about? Yeah, I am sure that my post is on topic, and you are off topic and quite aggressive. The "Not all obfuscated code contains braces" is irrelevant - my code has braces (re-read my post shall I say...).
Next, "tip of the year" - you should re-read your post yourself and also use those tips yourself sometimes. If you have nothing to say on the thread just read the next one. You don't have to flame the posts like that all the time just because of your concerns.
>CodeProject is a site that was designed for Win32 development.
So...? Take a code and build it with VC++ - then you will be happy?
And, finally, peace!
|
|
|
|
|
> Dear James (gonna take it personally this time )
Yes... I have noticed that about certain people... I find that trying to keep it professional seems to be a waste of time, sometimes.
> I can see you going around and ranting at peoples posts,
> mostly ending with "Peace". [...]
> If you have had worked brain before mounth [...] then such a suffix would
> not be neccessary, wouldn't it?
("mounth" --> "mouth") All of my posts (should) end with "Peace!". I do not always rant. I counter when someone reacts in a negative way to, or misses something important that I wrote in, the thread. As an example, look at my first message in this thread. If you try REAL HARD, you will see something it in that should have prevented most sane people from reacting in a negative way.
> So, since you are looking for fight, obviously, here you will get one...
Most humans can see that I am not one to beat around the bush. Hence, if I wanted a fight, I would has *asked* for one. The same logic holds for unsolicited responses/flames/etc. in general.
> As long as posts are containg an information they are not a waste of space.
("an" --> "any") And you are correct... But usually, that information *strongly* relates to the topic at hand.
> To turn it into something more than ranting you could stick the URL to
> one or two of these sites. That would be useful...
Forgive me for overestimating the abilities of others to perform simple searches themselves. (I tend to overestimate the abilities of lots of people, for that I am sorry.) Here is a link (to a search engine) that should provide more than enough links for anyone.
http://search.iwon.com/commerce/multisearch.jsp?searchfor=obfuscated+code+&alias=%2Falias%2Fsearch
> Next, it is YOU not me who is trying to prevent peoples from posting the stuff
> which is certainly on topic, using an excuse of "My concern was about turning
> this topic into an obfuscated code competition". It did not happen, did it?
("peoples" --> "people") I never said that it WOULD turn into an OCC. I said that I was concerned about it. People are free to ignore my concerns, I do not force them on anyone.
I did not say "Thou shall NOT turn this thread into an OCC". Most other people know how to ignore an opinion/thought/idea/concern/etc. that they do not agree with. I would suggest anyone out there that cannot, should learn that skill .
> Yeah, I am sure that my post is on topic, [...rant deleted...]
I am glad you are sure. The Heaven's Gate leader ("Doh"?) was sure that he was taking his followers to a mothership behind a comet. But that does not mean that I should agree with him. In the same way, it also means that noone is required to agree with me.
> The "Not all obfuscated code contains braces" is irrelevant - my code has braces
Again, I never said that it did not have braces.
> (re-read my post shall I say...).
Be original.
> If you have nothing to say on the thread just read the next one.
Hmmm... I can see how others did that, too... ("Do as I say, not as I do", eh?)
> You don't have to flame the posts like that all the time just because
> of your concerns.
And others do not need to view my posts an invitation to fence with me, but they do.
> [...]and also use those tips yourself sometimes
Sage advice...
> Take a code and build it with VC++ - then you will be happy?
Not all of the code snippets in the OCCs that I have come across in the past will build under VC++ without some modification. But a nice thought, though.
>
Really...?
> And, finally, peace!
Peace!
BTW: Just in case some people have not re-read my first post on this subject, as I have suggested, there was a " " at the end of the message. Most people take that as a strong hint as to the content. Others... Well, we can see what others sometimes do...
-=- James.
|
|
|
|
|
Lastly, note that CodeProject is a site that was designed for Win32 development.
---
in that case, chris had better get rid of anything that isn't Win32 - goodbye Lounge, goodbye news stories that don't have the words MFC, Win32 or .NET in them.
and what would be wrong with having a thread turn into something off-topic? if that's what the people here want to talk about, why the hell shouldn't they talk about it? fer chrissakes...
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
>> Lastly, note that CodeProject is a site that was designed for Win32 development.
> --- in that case, chris had better get rid of anything that isn't Win32 [...]
Thank God that I did not say "CodeProject is a site that *is* designed...". Then, it would have indicated that it could not evolve into something else. But, it has yet to evolve into an Ob. Code Competition.
> and what would be wrong with having a thread turn into something off-topic?
Nothing. I said I was concerned about it, not that it should not "turn into something off-topic".
> that's what the people here want to talk about, why the hell shouldn't they
> talk about it? fer chrissakes...
People are free to do what they will. This includes misunderstand other posts, formulate responses wwhile having insufficient data, etc. I never laid down any rules. Nor do I claim to have such power.
If I did, please be so kind as to include pointers to the posts where I did. Thanks.
Peace!
-=- James.
|
|
|
|
|
>Thank God that I did not say "CodeProject is a site that *is* designed...". Then, it
>would have indicated that it could not evolve into something else.
"is", "was", we all know what you were implying.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
> "is", "was", we all know what you were implying
Since *I* am the one that typed it, and *I* was the one that knew, for sure, what *I* was trying to say, let *me* be the one to tell "all" what I was implying, if anything at all. If I would have wanted people to try to read between the lines, I would have instructed them to do so.
I do not remember doing so.
But it is nice to see that we have someone that speaks for "all".
Peace!
-=- James.
|
|
|
|
|
>But it is nice to see that we have someone that speaks for "all".
yes. it is. now get back on topic.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
My first language was Pascal. Ostensibly, Pascal taught good programming habits. Because Pascal uses 'Begin' and 'End' instead of braces, you almost have to put them on separate lines. This was one good habit I picked up and apply to C++.
Also, since AppWizard writes code with Option 2, it must be confusing for you VC++ users to have code with options 1 and 2 mixed.
It is to me a big disappointment that the Java Gods decided to use Option 1 as a standard, but what do I expect from a bunch of Unix Lusers. But it is even more of a disapointment that MS decided on Option 1 for C#. I would love to know how they justified this. VC++ and VB do not follow that style. How do they expect to get their current customers using C#? Do they really expect Java programmers to switch to C#? It will never happen.
You'd think with .NET, MS is doing everything they can to piss off their current customer base of developers.
|
|
|
|
|
Wow - I thought I was the only one who was ticked off by this. Thanks for making me feel less lonely.
BTW, the code formatting macro that Alvero Mendez (I hope I rememberd his name correctly) uploaded will convert Option 1 to Option 2 quite nicely. I always run that macro on new code first thing.
|
|
|
|
|
Hello !
There is a programming language called "Python". It is without braces !
e.g. ("."=space)
for i in range(1,10):
...print i
print "After the loop"
It uses the idention to mark where the blocks end !
Okay, it's not c++ but I could not resist pressing other
Mfg Florian
|
|
|
|
|
thank god, for some reason i'm always afraid my brace style would piss people off =) now it'll only piss a minority
|
|
|
|
|
I would recommend this book to anyone, BUT skip the section on C brace positioning. It is nice to see others feel the same.
|
|
|
|
|
Good afternoon,
Thanks for this poll... this type of poll helps us roooooookies immensly!
Can we get more coding style polls... like this one?
Thanks!
Scott!
Put the big rocks in the glass jar first!
|
|
|
|
|
yeah, maybe like this:
Which whitespace style do you prefer?
if(func())...
or
if (func())...
or
if( func() )...
or
if ( func() )...
|
|
|
|
|
Well, I like option 2, but it don't always do it:
if( func() )
What about if statements with multiple expressions:
option one:
if( one && two && three )
option two:
if( one &&
two &&
three )
option three:
if( one
&& two
&& three )
|
|
|
|
|
2
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
i like this one:
http://www.possibility.com/Cpp/CppCodingStandard.html
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I just looked at some of my old DOS programs, written in the glorious days of the 25 line monitor. The functions look something like this:
void Func(){
if(a == b){
Func1();
Func2();}
Func3();}
|
|
|
|
|
that looks like crap. I bet finding brace bugs were a bitch and a half.
|
|
|
|
|
> I just looked at some of my old DOS programs [...]
Then you must have been a bit inexperienced as well, if you wrote code like that!
I will not even talk about the 2 space-wide intending...!
-=- James.
|
|
|
|
|
1 - Men wear Jeans, Women do too!
2 - Men put ear rings, Women do too!
And then, which one of above is:
1- Wrong!
2- Right!
3- Common! No problem!
Then, so what? Who cares how any one does as long as code compiles?!
|
|
|
|
|
Who cares? everybody in the development team do! yes, you would not have any problem during the compilation but ... don't you care setting simple standards according to your team's taste or preferences in coding? cheers!
|
|
|
|
|
Let me tell you who cares... I DO!!! I recently came to a software team who previously, as many other places, enforced no standard on style. Yeah, the code compiled but what about 1 year or 2 down the road when the original developer is gone and features must be added and bugs must be fixed. Someone else is of course stuck with some obnoxious looking code trying to make heads or tails out of it. If the code was done cleanly, like style 2, and commented well then the problem is severly reduced and everyones life is a little easier. Compiling code is important but Clean Compiling Code is very important. It helps all those who come after manage what you write.
Joseph Dempsey
jdempsey@cox.rr.com
Joseph.Dempsey@thermobio.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
Why not put this in context:
"Who cares about readability, as long as the code compiles?"
This ranks right up there with "We don't have time to write a spec - we have to start coding now becasue we have to show a demo in two months!".
Both of these statements should be grounds for ejection from the profession.
|
|
|
|
|
Its all about readability.
The quicker someone can read and match up logical blocks the better.
I still think that every logical block shoud be preceded with a comment stating the correct logic. Alot of people say why do that thats a waste of 40 seconds. I wrote it and the logic is correct. That is true today but what about next year. Will you still be here. Will you always maintain this code? What about 2 years from now will you still remember it?? This lets other programmers understand the intended logic for that block and aids in preventing the logic from being broken years down the road.
I wish this was a LAW of programming..
|
|
|
|
|