What will you call this???
-
It seems to me that your job is really really hard... :omg: I have no words for the code snippet you presented - at least none that I will use in public. It is enough that one has to use the word guess when it comes to source code. This IMHO says it all. Poor you. Regards Thomas
_Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Programmer - an organism that turns coffee into software._
-
Thomas Weller wrote:
It seems to me that your job is really really hard
Programming is never hard ( if it is programming :doh: )
Ahsan Ullah Senior Software Engineer
AhsanS wrote:
Programming is never hard
I fully agree. But psst, don't you tell this to a customer or boss...:cool:
AhsanS wrote:
if it is programming
Is it ? Sounds more like refactoring/code review. Regards Thomas
_Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Programmer - an organism that turns coffee into software._
-
AhsanS wrote:
Programming is never hard
I fully agree. But psst, don't you tell this to a customer or boss...:cool:
AhsanS wrote:
if it is programming
Is it ? Sounds more like refactoring/code review. Regards Thomas
_Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Programmer - an organism that turns coffee into software._
-
Re-factoring is part of programming i guess. isn't it?
Ahsan Ullah Senior Software Engineer MCTS 2.0
Sure, you can see it that way... Regards Thomas
_Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Programmer - an organism that turns coffee into software._
-
You are wrong. It runs the same thing it gets as input. I was getting an error and i had to debug the code when i found it. that after doing all that stuff it was doing no change to original values. Surprised???? ;P
Ahsan Ullah Senior Software Engineer
Did he set Environment.NewLine to a space?
-
Assume that pTimeText is containing 2 dates seperated by space. Like pTimeText = "31/12/2008 15:36 29/12/2008 15:36"
this.txtTime.Text = Convert.ToDateTime(pTimeText.Substring(0, pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime) + Environment.NewLine + Convert.ToDateTime(pTimeText.Substring(pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime);
Guess what will above code return. I found it in a file.
Ahsan Ullah Senior Software Engineer
What will you call this? A mess. Needs to be cleaned up and broken down a bit.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
What will you call this? A mess. Needs to be cleaned up and broken down a bit.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Sure, you can see it that way... Regards Thomas
_Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Programmer - an organism that turns coffee into software._
-
You are wrong. It runs the same thing it gets as input. I was getting an error and i had to debug the code when i found it. that after doing all that stuff it was doing no change to original values. Surprised???? ;P
Ahsan Ullah Senior Software Engineer
Actually, "that" removes the 'seconds [and milliseconds]' part from entered datetime, so "2008-11-10 08:00:30.123" => "2008-11-10 08:00:00". Ugly, I agree.
-
Assume that pTimeText is containing 2 dates seperated by space. Like pTimeText = "31/12/2008 15:36 29/12/2008 15:36"
this.txtTime.Text = Convert.ToDateTime(pTimeText.Substring(0, pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime) + Environment.NewLine + Convert.ToDateTime(pTimeText.Substring(pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime);
Guess what will above code return. I found it in a file.
Ahsan Ullah Senior Software Engineer
A compound-complex sentence.
-
Actually, "that" removes the 'seconds [and milliseconds]' part from entered datetime, so "2008-11-10 08:00:30.123" => "2008-11-10 08:00:00". Ugly, I agree.
Depends on what "Logic.DateConfigurer.DateFormatWithTime" is.
-
Depends on what "Logic.DateConfigurer.DateFormatWithTime" is.
-
Then the format is changed too.
-
Assume that pTimeText is containing 2 dates seperated by space. Like pTimeText = "31/12/2008 15:36 29/12/2008 15:36"
this.txtTime.Text = Convert.ToDateTime(pTimeText.Substring(0, pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime) + Environment.NewLine + Convert.ToDateTime(pTimeText.Substring(pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime);
Guess what will above code return. I found it in a file.
Ahsan Ullah Senior Software Engineer
-
Assume that pTimeText is containing 2 dates seperated by space. Like pTimeText = "31/12/2008 15:36 29/12/2008 15:36"
this.txtTime.Text = Convert.ToDateTime(pTimeText.Substring(0, pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime) + Environment.NewLine + Convert.ToDateTime(pTimeText.Substring(pTimeText.IndexOf(":") + 3)).ToString(Logic.DateConfigurer.DateFormatWithTime);
Guess what will above code return. I found it in a file.
Ahsan Ullah Senior Software Engineer
*points and laughs* Pointless. Really. The DateTime class can can convert a string to date. Separating the both dates must be done manually, but the conversion can be done by the DateTime class.