|
As opposed to the bottoms up methodology, where all code is written by Nagy?
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Yes, but code written on the bottom of the barstool is rarely usable as is; several pints of debugger are usually required.
Will Rogers never met me.
|
|
|
|
|
Member 10950715 wrote: Can anyone give me a guideline??
Yes; don't post programming questions here: it says so quite clearly above. If you can't read and understand that, what hope do you have?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
Use carrier pigeons
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
|
I love the needle in a trillion-trillion..... haystacks nature of the mission.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
I have a new requirement for a content based routing thing, if a value in an xml message is true then it goes to two places, otherwise it goes to just the one.
Capture a message, find the node, look at the value - false.
So I code for true and false.
It doesn't work.
Capture a message that didn't behave as I thought it should, look at the value - yes.
Look at a few more.
Yep, for reasons that I cannot begin to imagine the value of the node I am trying to route on is false or yes.
yes or no, true or false, 1 or 0, penis or vagina.
What kind of sick mind goes for yes or false?
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.
|
|
|
|
|
This is a good example of DDD - Drug Driven Development.
|
|
|
|
|
Now that's funny, that explains a lot!
As I grow older I've found that pleasing everyone is impossible but pissing everyone off is a piece of cake.
|
|
|
|
|
It's an OO world.
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Yes, your code needs to be more flexible:
if (messageValue.ToLower().MatchesOneOf("1", "yes", "true", "vb sucks"))
{
message.SendToTwoPlaces();
}
else if (messageValue.ToLower().MatchesOneOf("0", "no", "false", "vb rocks"))
{
message.SendToOnePlace();
}
else
{
throw new UserTooUncertainException(messageValue);
}
Probably should really add all the trew/falls options to a couple of dictionaries but I couldn't be bothered; you get the idea!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Quote: 0", "no", "false", "vb rocks
are really sure, really...
|
|
|
|
|
Sounds like a good entry for "Weird and Wonderful"
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
I'll take a whack at it.
I am a Masm developer. I write my own runtime functions. Any API accesses are through my runtime wrappers. In my world, I preserve all used registers (and the flags if I call any system APIs), and this includes the EAX register. If you want a return value from a function, you must supply a pointer to the location to receive the return value. Each function returns a success value in a common cell called dError (use it or loose it), and ends by comparing dError to 0, thus the flags on return from the function reflect whether the function succeeded or failed - 0 or "jz Good" - non-zero or "jnz Bad".
Now, as defined by "C", TRUE is a non zero value and False is zero, just the opposite of my checks.
To get around this annomoly, I never use TRUE or FALSE, just GOOD (0) or BAD (non zero).
It all depends on your point of view. There can only be a single case of GOOD, but there can be multiple cases of BAD.
Dave.
|
|
|
|
|
It was Richard...
|
|
|
|
|
chriselst wrote: penis or vagina What kind of software are you making and is your company currently hiring?
It's an OO world.
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
chriselst wrote: What kind of sick mind goes for yes or false? True.
... I mean... er...
Oh, bugger.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Why is every message in the lounge being marked as SPAM / ABUSIVE?
Just curious. If it is a CPer, then STOP IT!
|
|
|
|
|
newton.saber wrote: If it is a CPer If they're not, they cannot vote.
newton.saber wrote: then STOP IT Why?
Off topic; giving a down-vote does not give one points, it costs a point. Mass-downvoting means that it's just a matter of time before he/she gets to a point where they can only downvote a specific amount.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: giving a down-vote does not give one points, it costs a point.
1. We can't downvote in Lounge anymore, not for a long time. Do you mean mark as SPAM/Abusive?
2. It does not cost a point, or what do you mean? If I mark something as SPAM it does not cost me a point.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Downvoting costs a point. Forgot for a minute that we can't downvote here
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Downvoting costs a point. It sounds like you are saying if you downvote someone it costs you a point. Surely you can't be saying that?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
That's how I once read it in the FAQ.
Seems downvoting is now 2 points worth, but it doesn't "cost" you any point to downvote someone. Strange, I've long been assuming it cost you a point, even checked that once or twice.
..soo, downvoting is free, hrm?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: soo, downvoting is free, hrm? Yes, have at it.
I actually downvoted something in a forum today and I got 0 points. Not sure if that was +0 or -0 but it didn't seem to affect me.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I just check my rep history and I can't see any abuse / spam kicks being applied to me recently.
How are you sure that "every message in the lounge being marked"?
Or is it just yours? Have you annoyed anybody recently?
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|