|
Okay! I've updated the article, new source have much more comments!
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
Stroustrup says that macros are a sign of a bad programmer, or a bad design. I agree. At least if you must descend into macro hell, observe the convention that macros are named in all capitals, to serve as a warning to those who view your code.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hello. I know Stroustrup says that. But what can you suggest to implement it in this manner? Or you want to copy each class and function 9 times? Concerning my style - this is up to me to capitalize or not macroses. I choose to write them small there ONLY because of BIG symbols obscure little. In this already hard to read code it would be stupid to capitalize macroses only because somebody doesn't understand that they are. And what is more, I use all that allowed in c++ and I dont care if it's a good style. C++ for me but not me for C++. You better look at this from the other side: try to use it and you will feel as simple they are. And keep in mind, if you wanna be a good person: never blame implementation unless you can suggest a better way.
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
But what can you suggest to implement it in this manner?
Recursion
araud wrote:
Concerning my style - this is up to me to capitalize or not macroses. I choose to write them small there ONLY because of BIG symbols obscure little. In this already hard to read code it would be stupid to capitalize macroses only because somebody doesn't understand that they are.
No, that's wrong. The reason people adopt this standard is because it mames sense. It may not look nice to you, that's to be expected. You're using a language hack, you should advertise the fact.
araud wrote:
I dont care if it's a good style.
I'm glad I don't work with you then.
araud wrote:
You better look at this from the other side: try to use it and you will feel as simple they are.
I know how macros work, I've used them. I've also grown beyond understanding language syntax, to learn how to best use the language.
Are you Jewish ? If not, why are you quoting the 10 commandments ? I thought you were a Christian ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian Graus wrote:
araud wrote:
But what can you suggest to implement it in this manner?
Recursion
sorry, english is not my mother language. I just hope I can explain somehow. I'm working on it, but I am sorry, nobody in russia sreets speaks english. MSDN is my only teacher. But if you understood me, you just flee from strait question. "WHAT CAN YOU SUGGEST INSTEAD?"
Christian Graus wrote:
You're using a language hack, you should advertise the fact.
Sorry my code indeed lacks comments.
Christian Graus wrote:
Are you Jewish ? If not, why are you quoting the 10 commandments ? I thought you were a Christian ?
who told you Jesus Christ didn't like old testament? He was Jewish. Why cristian must omit old testament? Bible doesn't says that. I'm not cristian by religion of my country, I'm indeed follow Jesus.
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
Christian Graus wrote:
Are you Jewish ? If not, why are you quoting the 10 commandments ? I thought you were a Christian ?
who told you Jesus Christ didn't like old testament? He was Jewish. Why cristian must omit old testament? Bible doesn't says that. I'm not cristian by religion of my country, I'm indeed follow Jesus.
Well araud, this is a C community, *NOT* a Christian community. Please resist from quoting the Bible where different religious oriented people met, here in CodeProject. Keep your Godly features for your Church, here we believe in Code !
So MSDN is your 'code Bible' ? Read it better, and quoting it there is allowed, if not encouraged...
Kochise
PS : English is neither my native language, it doesn't forbid myself to make some effort to open another 'Bible', called a dictionary, to master words (sent by your God, see the Babylon chapiter in the Old Testament). To help you : http://www.systranbox.com/systran/box
In Code we trust !
|
|
|
|
|
Kochise wrote:
we believe in Code
Kochise wrote:
In Code we trust
Did Code created you? Or you still break 2nd commandment? Creator believs in his creation?
Here is not a place of faith discussion. If you want, write directly to me. Concerning my signature: am I not allowed to write this? Are there any restrictions when you filling down the form?
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
...I believe in what humankind can do. Coding is creation, thus *WE* coders *ARE* Gods. Building makers *ARE* Gods, cookers *ARE* God... Faith in something or some other Powerfull, mighty, whatever you can call Him is nothing more than wasting your beliefs !
Believe in the Lottery, you have at least *ONE* chance over some millions something happens without any kind of your interaction. Help people here by providing source code, there is better chance something good happens (e.g. saving the ass of an employee coding against a straight deadline).
Oh, and I do not fears some pseudo commandments. I was born free, and thus free from mental 'slavery'. Follow any rules you want, but here are pragmatic coders whose only Guru is theirself You may love and help people without being told so... You are free to do so
And no needs to link currently unknown and/or non-understood things as being Godly. Once a day, people believed in the mighty creation of God to explain the spontaneous generation of... frogs. Then some crazy scientists spend some time to search why and how, and now everyone knows that the lifecycle of frogs include a tadpole cycle.
Such research were done on DNA, atomic physics and so. Tools becames more and more accurate, allowing scientists to discover more and more things that was hidden to the human perception. In January 2005, Huygens discovered Titan's surface to human sight... I also recognize some days people will perhaps see God. But till this day, I have something else to fill my life with
Some light research are now focusing on animal's form of mindset (perhaps some basic intelligence), equal skills of different skin colored people, women experiences orgasm, such thoughts that were forbiden by your kind of beliefs. And if such research are now allowed, that's because the Church have less power than before... But that's plain politic, forget this :/
And to finish, I fully repect your love for someone 'above', but don't display it so much everywhere, first it won't makes you better, and second it's pretty like pornography for people not sharing your point of view. It's not the right place for such Jesus/God/Commandment/whatever picturing
Kochise
PS : My signature 'In Code we trust !' is a funny joke, I don't spare my time in such faiths, not even coding...
PRONE TO BE EDITED, NOT PURPOSED TO HURT ANYBODY
In Code we trust !
|
|
|
|
|
Kochise wrote:
...I believe in what humankind can do. Coding is creation, thus *WE* coders *ARE* Gods. Building makers *ARE* Gods, cookers *ARE* God...
Okay, have you ever seen when code was written down only by the hand of time and random unmanaged processes? And somehow was compiled into beautiful programm that can reproduce and improve itself? We all would be fired. Because nothing meaningful happens without a creator or manager. We and this world is planned and created. This is the end of conversation in this place.
If you wanna say somethig else please choose another place and invite us all there. I like to break unbelief but this is not a proper place.
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
I like to break unbelief but this is not a proper place.
Riiiiiiiight You understood my point !
Kochise
In me *I* trust ! If ever I wait for somebody else to trust in me, I'll wait for long :p Nobody's better serviced than by himself ! So : "I'm good, I'm good, I'm good..."
|
|
|
|
|
Kochise wrote:
Please resist from quoting the Bible where different religious oriented people met, here in CodeProject. Keep your Godly features for your Church, here we believe in Code !
I disagree. This forum is not the right place, but there have been plenty of religious discussions in the soapbox, and no-one has suggested they are out of place there.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
araud wrote:
But if you understood me, you just flee from strait question. "WHAT CAN YOU SUGGEST INSTEAD?"
No, I answered it. Recursion is the method you can use to impliment what you're doing in a single method instead of 10 macros. A recursive function calls itself. Look it up in the MSDN
araud wrote:
Sorry my code indeed lacks comments.
But if you followed the convention the rest of the C/C++ world follows, it would be self documenting.
araud wrote:
who told you Jesus Christ didn't like old testament?
(Changing the subject) No-one, but the point of Jesus coming is that we don't live by the law. What the commandments say is not the problem, but unless you're Jewish, they were not written for you, and either way, Paul says that no-one was saved by the Law. I'd feel better if you quoted Jesus, who said the law is summed up in loving God with all your heart, soul, mind and strength, and loving your neighbour as yourself. That's the attitude Jesus came to teach us, not a book of rules.
araud wrote:
Why cristian must omit old testament?
We shouldn't. We should, however, understand who it was written to.
Perhaps this is sufficiently off topic that we should discuss it via email ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian Graus wrote:
araud wrote:
But if you understood me, you just flee from strait question. "WHAT CAN YOU SUGGEST INSTEAD?"
No, I answered it. Recursion is the method you can use to impliment what you're doing in a single method instead of 10 macros. A recursive function calls itself. Look it up in the MSDN
recursion? A new sound in my programming life! Now I've found the way to solve my problem! ARE YOU KIDDING? What recursion can do there? Metamacroses are used to copy overloaded template classes and functions with changing argument count. Rewrite a bit of code in the way you advising!
I really thought you said "recursion" about my phrase "But what can you suggest to implement it in this manner". That why I've been falling in excuses of my english.
Christian Graus wrote:
araud wrote:
Sorry my code indeed lacks comments.
But if you followed the convention the rest of the C/C++ world follows, it would be self documenting.
Yes, that's a point I have to work on. I will really try.
//my lovely topic!
Christian Graus wrote:
unless you're Jewish, they were not written for you, and either way, Paul says that no-one was saved by the Law
Jesus said "I come not to break the law but to fulfill" and He made the law only tougher - remember "Neither shall you commit adultery" - was said to ancients - "but I tell if you are looking to woman with lust you have already commited this to her" and so on. And Paul said that Law was the child-guider to Christ. That why each cristian must know the Law first and then receive the salvation by bloody and fierce sacrifice of Lord Jesus. Read please book "the hell's best kept secret" and you will understand why you and me should insist on preaching Law first, and ONLY when people say "What shall we do, men and brethren?" we can introduce them our Lord and saviour. In other way Jesus will be useless and devaluated for them.
sincerely yours, bro in Christ, Alexander
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
Jesus said "I come not to break the law but to fulfill"
Yes, that's right. But, He was still talking to the people it was written to.
araud wrote:
and He made the law only tougher
Yes, He did. Because instead of an external law where only actions matter, He told us to look at our attitudes. And once again, this is reason to not be quoting the external law, as if it was a Christian concept. It's not, but it's not in part because it falls short.
araud wrote:
And Paul said that Law was the child-guider to Christ.
For those who did not have Christ, yes. He wasn't saying we need to follow the Law for a while, then find Christ, but rather that the law was a signpost to the coming of Christ. He said this to preach Christ to those who were following the Law.
araud wrote:
That why each cristian must know the Law first and then receive the salvation by bloody and fierce sacrifice of Lord Jesus
Rubbish.
araud wrote:
Read please book "the hell's best kept secret"
I don't have it, and I don't want it. I prefer to read the Bible
araud wrote:
you will understand why you and me should insist on preaching Law first, and ONLY when people say "What shall we do, men and brethren?" we can introduce them our Lord and saviour. In other way Jesus will be useless and devaluated for them.
Read Galatians. They tried to attach the law to Christianity, and Paul called them foolish for it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I wonder what the church are you going to? This is my first meeting with such a "cristianity" that don't honor the old testament.
P.S. and what about the recursion?
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
This is my first meeting with such a "cristianity" that don't honor the old testament.
I'm sorry that you chose to completely misinterpret what I said instead of answering it. Not honouring the Old Testament is different to completely misunderstanding it, which is what you appear to be doing.
araud wrote:
P.S. and what about the recursion?
I admit I didn't look at your code that closely, I just saw a bunch of macros that call one another, which is usually a really bad idea. I'll take your word for it that it's a good idea in this case, although I maintain that it's a terrible idea to throw away convention and not name them in all caps.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian Graus wrote:
I'm sorry that you chose to completely misinterpret what I said instead of answering it. Not honouring the Old Testament is different to completely misunderstanding it, which is what you appear to be doing.
Yeah? Strange... I thought I'm in one boat with Marthin Luther, Charles Spurgeon and all others fathers of faith of our days (as we looking to interpretation of bible). Tell me please the denomination your church belongs to.
Christian Graus wrote:
I admit I didn't look at your code that closely
How dear you to set a mark to things you haven't familiarized with?! Don't you know the judge must first investigate and only then pronounce sentence? You really upset me.
Concerning convention - there are several. Which one should I adhere to? And the most straight question: is there a convention about metamacroses? So if there's no why can't I determine it? My style is to keep plain macros definitions capitalized like this
#define WM_MY_MESSAGE WM_USER+1
but functioning macroses are all lower.
#define foreach(T, cont, it) for(T::iterator it=(cont).begin(); it!=(cont).end(); ++it)
And metamacroses that define functions
#define DefIFunctor ... follow function naming convention.
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
Tell me please the denomination your church belongs to.
To reiterate - I have no intention of hiding behind denominations, or 'great men of faith', I'm just standing on what the Bible says. Are you willing to discuss that ?
araud wrote:
you haven't familiarized with
I saw what looked like an overuse of macros. I saw you didn't capitalise their names, therefore you're inexperienced. The macros looked to me like they could be replaced with a function that took a number to say how often they were called. You assure me I am wrong, fine.
araud wrote:
Concerning convention - there are several.
Then adhere to the ones recommended by Bjarne Stroustroup. I've never known any standard for macros except all capitals for the names
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian Graus wrote:
To reiterate - I have no intention of hiding behind denominations, or 'great men of faith', I'm just standing on what the Bible says
ok, you're doing quite right staying on your own point of view to bible, someone else's faith is not your own, this is good. You are saved since your hope is on Jesus Christ. But Jesus built the Church for all cristians. And it would be better to choose a good one(that stays on bible, teaches bible and acts like bible says) and start visiting it. It's easy to find this church - they're preaching on streets. Remember what you're saying about convention! Without following a good church faith convention you will be looking as I do with no convention in my code .
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
And it would be better to choose a good one(that stays on bible, teaches bible and acts like bible says) and start visiting it.
I'm a regular member of the same church for 14 years. I know all this. I just meant that what the Bible says is what matters. I don't get why you want to discuss everything but what the Bible says ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Do you dislike comments???
When you use so many macros, as you've done in functor.h, as a bare minimum you need a comment for each of the major ones.
And I really freaked out when I saw this completely undocumented code:
template<int bugfix>
void SetOnCall_BugFix(POnCall pOnCall){
OnCall=pOnCall;
OnCall->AddRef();
}
It looks as though you've done some clever stuff, but I never trust code that is so poorly documented.
|
|
|
|
|
Hello, than you for this admonition. You are quite right, comments must be there. This is realy problem. I will try to correct this. Don't you know can I resend content of my article? For now, SetOnCall_BugFix - is a Bug Fix for compilator. This code was moved to template function because compiler didn't like it in plain way. It told me "error C2039: 'AddRef' : is not a member of 'IFunctor<t>". Thank you! I'm waiting for your new recensions!
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
araud wrote:
Don't you know can I resend content of my article?
Click on [Modify this article] in the upper right corner
|
|
|
|
|
thank you! sometimes I am so concentrated on something difficult that I don't notice simple things. My wife already has resigned to this.
"7 You shall have no other gods before me. 8 You shall not make an images in order to bow down to them or serve them. 11 You shall not take the name of the LORD your God in vain. 12 Observe the sabbath day 16 Honor your father and your mother, that your days may be prolonged. 17 You shall not kill. 18 Neither shall you commit adultery. 19 Neither shall you steal. 20 Neither shall you bear false witness against your neighbor. 21 Neither shall you covet anything that's your neighbor's." Your God
|
|
|
|
|
I like your idea of extending functors across thread/process boundaries.
You might gain portability if you use Don Clugston's delegates to implement the plain functors.
Wolfgang Reichl
|
|
|
|
|