• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

OMG! This was a *difficult* bug to find

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
This DOES belong in off topic, because it is a RANT.

I was formatting a date in the form "yyyy/mm/dd".

I started using my app and making it select work orders for certain dates (formatted as above).

The strangest things started happening... sometimes I'd get what I wanted, other times it would just start picking word orders randomly, and then I got nothing.

This happened betwen 4:00 and 4:13 pm when I finally got an exception: "Cannot convert 2004/13/22 to a timestamp"

13? WTF?

Turns out as my clock was ticking through 4:00, 4:01, 4:02, I was getting January, February, March...

For anyone who cares, C# format strings use CAPITAL Ms for MONTH! Small m is MINUTES!!!
 

Gibson486

Lifer
Aug 9, 2000
18,378
2
0
I am working on a debugger w/ C. Debugger would not connect to chip. Days it took for it to connect to chip: 15.
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: Alphathree33
This DOES belong in off topic, because it is a RANT.

I was formatting a date in the form "yyyy/mm/dd".

I started using my app and making it select work orders for certain dates (formatted as above).

The strangest things started happening... sometimes I'd get what I wanted, other times it would just start picking word orders randomly, and then I got nothing.

This happened betwen 4:00 and 4:13 pm when I finally got an exception: "Cannot convert 2004/13/22 to a timestamp"

13? WTF?

Turns out as my clock was ticking through 4:00, 4:01, 4:02, I was getting January, February, March...

For anyone who cares, C# format strings use CAPITAL Ms for MONTH! Small m is MINUTES!!!

java does the same
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Thats not bad. No one has fully explianed to me why you can crash a Java program if you get the input stream from a socket before you get the output stream
 

Gibson486

Lifer
Aug 9, 2000
18,378
2
0
Originally posted by: johnjbruin
Originally posted by: Alphathree33
This DOES belong in off topic, because it is a RANT.

I was formatting a date in the form "yyyy/mm/dd".

I started using my app and making it select work orders for certain dates (formatted as above).

The strangest things started happening... sometimes I'd get what I wanted, other times it would just start picking word orders randomly, and then I got nothing.

This happened betwen 4:00 and 4:13 pm when I finally got an exception: "Cannot convert 2004/13/22 to a timestamp"

13? WTF?

Turns out as my clock was ticking through 4:00, 4:01, 4:02, I was getting January, February, March...

For anyone who cares, C# format strings use CAPITAL Ms for MONTH! Small m is MINUTES!!!

java does the same


Doesn't C# have traces of Java in it?
 

Beattie

Golden Member
Sep 6, 2001
1,774
0
0
Originally posted by: purbeast0
why would you put your date in that order? usually its month/day/year


because then you can compare dates directly. Year is the highest priority, then month, then day. Just like you can compare numbers... hundreds comes before tens before ones.


 

dullard

Elite Member
May 21, 2001
26,056
4,708
126
Originally posted by: purbeast0
why would you put your date in that order? usually its month/day/year
Everyone has their reasons.
[*]Most of the US is day/month/year. That makes sense (small, medium, large) in many cases for example if you are thinking short term and you need to know what happened on the 13th vs what happened on the 14th.
[*]Most of Europe is month/day/year. This makes sense if you don't care about the year all you need is to sort the month and days apart.
[*]A year/month/day is great when the day doesn't matter. Suppose you know you got something in March of 2002, but don't have a clue which day it was. A sort will put all of March 2002 records together in one nice place and you can then look at the day now that it is narrowed down.

All have good reasons.
 

Krk3561

Diamond Member
Jun 12, 2002
3,242
0
0
What do you guys think about C#? If I already know java would it be hard for me to pick up? Is it an easy language to learn?
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: dullard
Originally posted by: purbeast0
why would you put your date in that order? usually its month/day/year
Everyone has their reasons.
[*]Most of the US is day/month/year. That makes sense (small, medium, large) in many cases for example if you are thinking short term and you need to know what happened on the 13th vs what happened on the 14th.
[*]Most of Europe is month/day/year. This makes sense if you don't care about the year all you need is to sort the month and days apart.
[*]A year/month/day is great when the day doesn't matter. Suppose you know you got something in March of 2002, but don't have a clue which day it was. A sort will put all of March 2002 records together in one nice place and you can then look at the day now that it is narrowed down.

All have good reasons.

Don't you have the US/EU formats reversed? I know I do mm/dd/yyyy and I'm from good ol' US of A.
 

trmiv

Lifer
Oct 10, 1999
14,670
18
81
Originally posted by: dullard
Originally posted by: purbeast0
why would you put your date in that order? usually its month/day/year
Everyone has their reasons.
[*]Most of the US is day/month/year. That makes sense (small, medium, large) in many cases for example if you are thinking short term and you need to know what happened on the 13th vs what happened on the 14th.
[*]Most of Europe is month/day/year. This makes sense if you don't care about the year all you need is to sort the month and days apart.
[*]A year/month/day is great when the day doesn't matter. Suppose you know you got something in March of 2002, but don't have a clue which day it was. A sort will put all of March 2002 records together in one nice place and you can then look at the day now that it is narrowed down.

All have good reasons.

Yea, I think you have Europe and US backwards. US uses Month/Day/Year.
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
c# has some java in it, yes. more importantly, the .net framework was built with a lot of java syntax and ideas. a large number of objects and their syntax is similar.

c# is a pretty easy language to grasp. i'd suspect you would not have too much trouble making the plunge.

What do you guys think about C#? If I already know java would it be hard for me to pick up? Is it an easy language to learn?
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: Kyteland
Originally posted by: dullard
Originally posted by: purbeast0
why would you put your date in that order? usually its month/day/year
Everyone has their reasons.
[*]Most of the US is day/month/year. That makes sense (small, medium, large) in many cases for example if you are thinking short term and you need to know what happened on the 13th vs what happened on the 14th.
[*]Most of Europe is month/day/year. This makes sense if you don't care about the year all you need is to sort the month and days apart.
[*]A year/month/day is great when the day doesn't matter. Suppose you know you got something in March of 2002, but don't have a clue which day it was. A sort will put all of March 2002 records together in one nice place and you can then look at the day now that it is narrowed down.

All have good reasons.

Don't you have the US/EU formats reversed? I know I do mm/dd/yyyy and I'm from good ol' US of A.

yeah - he has them reversed
 

fs5

Lifer
Jun 10, 2000
11,774
1
0
Originally posted by: purbeast0
why would you put your date in that order? usually its month/day/year

too lazy to convert for SQL? (while running older version of MySQL?)
 

gigapet

Lifer
Aug 9, 2001
10,005
0
76
Debugging oracle trigger errors = worst thing ever


something along the lines of
error message:
you have an invalid parameter

reason:
a parameter is invalid



yeah thanks oracle no fvcking sh1t



Fvck oracle
 

Alphathree33

Platinum Member
Dec 1, 2000
2,419
0
0
Originally posted by: torpid
c# has some java in it, yes. more importantly, the .net framework was built with a lot of java syntax and ideas. a large number of objects and their syntax is similar.

c# is a pretty easy language to grasp. i'd suspect you would not have too much trouble making the plunge.

What do you guys think about C#? If I already know java would it be hard for me to pick up? Is it an easy language to learn?

It always amuses me when people ask if they can learn a language, or how "hard" the language is to learn.

Computer languages are frickin really, really, really, really, really EASY to learn. Any language.

Unless you're making the jump from higher level languages to assembly or low-level C, the concepts are almost all the same.

I can write in VB, C, Java, C# and all sorts of scripted crap like JS, Perl, VBScript, and so on. It's not my knowledge of the SYNTAX of these languages that makes me VALUABLE to my employer. It is my knowledge of ALGORITHMS and DATA STRUCTURES that makes me valuable.

Any old monkey can go onto Google and look up syntax. If I don't remember how the substring function in JS works, I just look up "JavaScript substring" and get my answer. If I don't remember that the same funciton is called "Mid" in VB, I just look up "VB strings" and get the answer.

It's what I *DO* with those functions that makes me a programmer, not my knowledge of them.

Certainly, there are quirks and bugs to every language that it's helpful to understand, but the design fundamentals rarely change. (Erm, except for Scheme... Scheme is one nasty language... Scheme gives me a headache)
 

Heifetz

Golden Member
Oct 9, 1999
1,398
0
0
Originally posted by: Alphathree33
This DOES belong in off topic, because it is a RANT.

I was formatting a date in the form "yyyy/mm/dd".

I started using my app and making it select work orders for certain dates (formatted as above).

The strangest things started happening... sometimes I'd get what I wanted, other times it would just start picking word orders randomly, and then I got nothing.

This happened betwen 4:00 and 4:13 pm when I finally got an exception: "Cannot convert 2004/13/22 to a timestamp"

13? WTF?

Turns out as my clock was ticking through 4:00, 4:01, 4:02, I was getting January, February, March...

For anyone who cares, C# format strings use CAPITAL Ms for MONTH! Small m is MINUTES!!!

every heard of the debugger...?
 

BigPoppa

Golden Member
Oct 9, 1999
1,930
0
0
Originally posted by: Alphathree33
Originally posted by: torpid
c# has some java in it, yes. more importantly, the .net framework was built with a lot of java syntax and ideas. a large number of objects and their syntax is similar.

c# is a pretty easy language to grasp. i'd suspect you would not have too much trouble making the plunge.

What do you guys think about C#? If I already know java would it be hard for me to pick up? Is it an easy language to learn?

It always amuses me when people ask if they can learn a language, or how "hard" the language is to learn.

Computer languages are frickin really, really, really, really, really EASY to learn. Any language.

Unless you're making the jump from higher level languages to assembly or low-level C, the concepts are almost all the same.

I can write in VB, C, Java, C# and all sorts of scripted crap like JS, Perl, VBScript, and so on. It's not my knowledge of the SYNTAX of these languages that makes me VALUABLE to my employer. It is my knowledge of ALGORITHMS and DATA STRUCTURES that makes me valuable.

Any old monkey can go onto Google and look up syntax. If I don't remember how the substring function in JS works, I just look up "JavaScript substring" and get my answer. If I don't remember that the same funciton is called "Mid" in VB, I just look up "VB strings" and get the answer.

It's what I *DO* with those functions that makes me a programmer, not my knowledge of them.

Certainly, there are quirks and bugs to every language that it's helpful to understand, but the design fundamentals rarely change. (Erm, except for Scheme... Scheme is one nasty language... Scheme gives me a headache)

(+ postcount 1)
DAMN YOU SCHEME!!!!!!!!!!!!

<- Transfered from Georgia Tech back home to Montana. Good move for me.

/end scheme bitching
 

z0mb13

Lifer
May 19, 2002
18,106
1
76
Originally posted by: BigPoppa
Originally posted by: Alphathree33
Originally posted by: torpid
c# has some java in it, yes. more importantly, the .net framework was built with a lot of java syntax and ideas. a large number of objects and their syntax is similar.

c# is a pretty easy language to grasp. i'd suspect you would not have too much trouble making the plunge.

What do you guys think about C#? If I already know java would it be hard for me to pick up? Is it an easy language to learn?

It always amuses me when people ask if they can learn a language, or how "hard" the language is to learn.

Computer languages are frickin really, really, really, really, really EASY to learn. Any language.

Unless you're making the jump from higher level languages to assembly or low-level C, the concepts are almost all the same.

I can write in VB, C, Java, C# and all sorts of scripted crap like JS, Perl, VBScript, and so on. It's not my knowledge of the SYNTAX of these languages that makes me VALUABLE to my employer. It is my knowledge of ALGORITHMS and DATA STRUCTURES that makes me valuable.

Any old monkey can go onto Google and look up syntax. If I don't remember how the substring function in JS works, I just look up "JavaScript substring" and get my answer. If I don't remember that the same funciton is called "Mid" in VB, I just look up "VB strings" and get the answer.

It's what I *DO* with those functions that makes me a programmer, not my knowledge of them.

Certainly, there are quirks and bugs to every language that it's helpful to understand, but the design fundamentals rarely change. (Erm, except for Scheme... Scheme is one nasty language... Scheme gives me a headache)

(+ postcount 1)
DAMN YOU SCHEME!!!!!!!!!!!!

<- Transfered from Georgia Tech back home to Montana. Good move for me.

/end scheme bitching

what r u smoking? scheme is so easyyyyy!!

:D:D

I love lisp and scheme