|
I once got burned by a ASP/ access database site that would create utter crap when move from an english development to a german production server. (Or the other way round? I forget).
|
|
|
|
|
Ick. The obvious solution is
return date.Substring(0,4) + "-" + date.Substring(4,2) + "-" + date.Substring(6,2); Goes nowhere near the risk of DateTime.Parse doing something different in a different locale.
|
|
|
|
|
Even ignoring the language, there are too many things wrong. The most important being that the characters are not being gathered based on their value.
while( date[i] == ‘y’ )
Concat += date[i++];
Or something similar.
I have know idea why the new String is even present, other than to waste time and memory.
The given code is just asking for the call to pass the wrong format, so that it can throw an exception.
In general, this code would receive a ‘D’ at best and an ‘F’ in any production code.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I'm guessing using the .ToString([inserted quoted format here]) was too difficult. What a shame.
Phil
|
|
|
|
|
Superb HORROR
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
hi all,
can we declare a class without constructor in c++... is it a good way of coding..
thanks,
Vimal
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
Repeat yourself here instead :
http://www.codeproject.com/script/comments/forums.asp?forumid=3785
Kochise
In Code we trust !
|
|
|
|
|
More people might follow the links that you post if you make them clickable which is very easy to do.
|
|
|
|
|
If he can't copy/paste, I think he shouldn't even bother coding. I'm not here to wipe his nose (or other ends) when it's messy, or prechew his meat to feed him like a young bird...
Kochise
In Code we trust !
|
|
|
|
|
Kochise wrote: If he can't copy/paste, I think he shouldn't even bother coding.
lol, i hear that . I probably copy/paste more than i type. Why, right now i just copy/pasted the text "copy/paste".
But this is getting too far off topic
Customer in computer shop: "Can you copy the Internet onto this disk for me?"
|
|
|
|
|
If you can't highlight the few letters of a URL and click 'link' I think you shouldn't bother posting a URL. It's not wiping anyone's nose. It's being a responsible poster and I am astounded that someone has to "wipe your nose" and inform you of that. I wouldn't have bothered but I have noticed it more than once from you. Do you need someone to post an article here to show you how to do this ?
|
|
|
|
|
Rick York wrote: If you can't highlight the few letters of a URL and click 'link' I think you shouldn't bother posting a URL.
I ditto that. Posting a clickety isn't all that tough to do
|
|
|
|
|
In good forums I'm used to log in, when you post a URL, it is automatically parsed and made clickable. Perhaps a matter of forum settings, I don't know...
Kochise
In Code we trust !
|
|
|
|
|
Not long ago my company hired another software company to develop a tool for us, because we didn't have the resources to do it ourselves at that time. After they delivered several versions that were all buggy and did not work properly we took the code and I had to finish it. Some endless loops and horrible try { ... } catch { // do nothing here } later I discovered the following beauty in the code:
<br />
<br />
public bool AskForSureBox(string Message, string Title)<br />
{<br />
MessageBox.Show(Message, Title, MessageBoxButtons.YesNo);<br />
if (DialogResult.Yes.ToString() == "Yes")<br />
return true;<br />
else<br />
return false;<br />
}<br />
<br />
I afterwards took the liberty to write to the CEO of that company, asking him how long the programmer who wrote the code was already coding for his company...
Until today I didn't get an answer.
Have fun coding!
|
|
|
|
|
Thanks for sharing this beauty.
It has give me hope to crawl to the rest of my day
codito ergo sum
|
|
|
|
|
Optimus Chaos wrote: I afterwards took the liberty to write to the CEO of that company, asking him how long the programmer who wrote the code was already coding for his company...
Until today I didn't get an answer.
and let me guess, the person responsible is the ceo's favorite child.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
It was probably the CEO who wrote it!
|
|
|
|
|
Nah - CEO's only code in Excel.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Here is another good one
int a = 5;
if (a == a) {
a = a + 1;
}
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Thanks for sharing that..I got one hell of a laugh outta it. Even my 16 y.o. non-programming son knew it was screwed.
Mike
Light travels faster than sound. That's why some people appear right until you hear them speak.
|
|
|
|
|
See http://www.codeproject.com/lounge.asp?msg=2029905#xx2029905xx !
Answer : because there is even more inefficient architects/managers that hire them...
Kochise
In Code we trust !
|
|
|
|
|
Well at least it wasn't simply copied and pasted from a disc that came with a book.
|
|
|
|
|
Yet another Gem to prove that there are some people out there that should choose another career!
Mike
Light travels faster than sound. That's why some people appear right until you hear them speak.
|
|
|
|
|
Simple Ans to the Q? ,
May be u r company paying them on the basis of , line count ( i hope u people have better code line count tool which skip spaces;) )
Warm Regards
BAIJUMAX
"Its Hard To Find Right & Wrong In This World , Simply Everything Is Relative."
|
|
|
|
|
Read it again - the return value is *always* going to be true.
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|