Home arrow static arrow Java Programming [Archive] - Engineers not so cool after all
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Engineers not so cool after all
This topic has 50 replies on 4 pages.    1 | 2 | 3 | 4 | Next »

Posts:123
Registered: 5/24/04
Engineers not so cool after all  
Jul 16, 2004 6:39 AM



 
This must be the funniest thing I've seen here at the company.

NOTE: The following statement was coded by an engineer (who rever themselves as the top notch of the bunch).

Date date = new Date(0000-00-00);


(sic!)

Note that it was cut 'n' pasted so no it's not a typo.

/JVK

 

Posts:18,384
Registered: 21.03.00
Re: Engineers not so cool after all  
Jul 16, 2004 7:07 AM (reply 1 of 50)



 
Hi,

Tell that developer that he should go to his boss and say that he wants to have a lower salary. :)

/Kaj
 

Posts:21,719
Registered: 98-02-20
Re: Engineers not so cool after all  
Jul 16, 2004 7:25 AM (reply 2 of 50)



 
This must be the funniest thing I've seen here at the
company.

NOTE: The following statement was coded by an engineer
(who rever themselves as the top notch of the bunch).

Date date = new Date(0000-00-00);


(sic!)

Note that it was cut 'n' pasted so no it's not a
typo.

/JVK


Congratulations - I guess that makes you today's genius.

By the way - that's "revere". Since you can't spell it's likely that we'd find some gaffes in your code, too.

%
 

Posts:123
Registered: 5/24/04
Re: Engineers not so cool after all  
Jul 16, 2004 7:36 AM (reply 3 of 50)



 
"By the way - that's "revere". Since you can't spell it's likely that we'd find some gaffes in your code, too."

Perhaps it could turn out that English is not my native tongue?

Besides, we didn't discuss typos, we were discussing screwed code.
 

Posts:6,487
Registered: 5/5/04
Re: Engineers not so cool after all  
Jul 16, 2004 7:40 AM (reply 4 of 50)



 
I got confused by something similar recently
        SimpleDateFormat format = new SimpleDateFormat("hh:mm:ss.SSS");        System.out.println(format.format(new Date(123456)));


prints

01:02:03.456
 

Posts:1,632
Registered: 09/06/03
Re: Engineers not so cool after all  
Jul 16, 2004 7:40 AM (reply 5 of 50)



 

By the way - that's "revere". Since you can't spell it's likely that we'd find some gaffes in your code, too.

Not necessarily, he could've meant "refer".
 

Posts:21,719
Registered: 98-02-20
Re: Engineers not so cool after all  
Jul 16, 2004 7:55 AM (reply 6 of 50)



 
Still a typo, still incorrect.

Have you discussed this code with the person that wrote it and pointed out what you think the problem is? Have you asked for their explanation? I think they deserve the benefit of the doubt. After all, you work for the same company.

I will say this: the code compiles and runs on my Windoze machine under JDK 1.4.2. The java.util.Date has a constructor that takes a single long as an argument. Your snippet evaluates to Date(0), which is "Wed Dec 31 19:00:00 EST 1969" on my machine. Is there no situation under which this value could be meaningful? I'd check before I made fun of it.

What I do object to is the smug attitude you're taking to folks who seem to have a qualification that you don't. Degrees and certifications don't guarantee immunity from mistakes or confer all knowledge. But your tone sounds perversely like someone who's saying, "See? I don't claim the title of engineer, and that makes me better." Like I said, post some of your code and we'll start looking for stuff.

Maybe I'm reading this wrong. I'll apologize in advance if I am.

%
 

Posts:123
Registered: 5/24/04
Re: Engineers not so cool after all  
Jul 16, 2004 7:55 AM (reply 7 of 50)



 
Or it might turn out that English is not my native tongue.

Besides, we're not discussing typos here, we're discussing odd code.
 

Posts:21,719
Registered: 98-02-20
Re: Engineers not so cool after all  
Jul 16, 2004 7:58 AM (reply 8 of 50)



 
Don't hide behind the "I don't speak the language" shield. Maybe you just can't spell.

%
 

Posts:123
Registered: 5/24/04
Re: Engineers not so cool after all  
Jul 16, 2004 8:05 AM (reply 9 of 50)



 
No, I've checked the code and:

1) the object created is never used at all, the reference is pointed to another date object later in the method.

2) Obviously the programmer intended to use the 0000-00-00 as some sort of default value, but it wouldn't make sense, because in that case he'd rather written new Date(0). The problem is that to supply 0000-00-00 as a string would probably cause the Date(String) constructor to throw an IllegalArgumentException, which wouldn't be all that nice.

My point is that, in my experience, engineers are all "high and mighty", looking down on non-engineer coders, implying that they somewhat better.
I, myself, have a degree in software development, but I don't claim to be better than others using my degree as my only argument.

Hope my point is clear.

 

Posts:6,487
Registered: 5/5/04
Re: Engineers not so cool after all  
Jul 16, 2004 8:11 AM (reply 10 of 50)



 
I have a degree in Engineering AND a degree in Computer Science.
I work with developers with PhDs and developers with no degree.
I would say it makes a difference on the technical but everyone has different strengths and weakness.
I think having a team with a range of skills is much better than having a team where everone has the same skill set.
 

Posts:21,719
Registered: 98-02-20
Re: Engineers not so cool after all  
Jul 16, 2004 8:12 AM (reply 11 of 50)



 
No, I've checked the code and:

1) the object created is never used at all, the reference is pointed to another date object later in
the method.

Okay. Perhaps a poor and misleading choice of default value. Based on what you're saying, I'd wonder if either the default ctor would be sufficient OR if the scope was unnecessarily wide. If the reference could simply be declared later on in the code when the "another date object" was used to initialize it I'd say that would be a better idea.

2) Obviously the programmer intended to use the
0000-00-00 as some sort of default value, but it
wouldn't make sense, because in that case he'd rather
written new Date(0). The problem is that to supply
0000-00-00 as a string would probably cause the
Date(String) constructor to throw an
IllegalArgumentException, which wouldn't be all that
nice.

Agreed.

I'll ask again - you checked the code, but did you check with the person who wrote it or the team lead? You could easily correct this situation if you wanted to. Your company's code might be better for it.

My point is that, in my experience, engineers are all "high and mighty", looking down on non-engineer
coders, implying that they somewhat better. I, myself, have a degree in software development, but
I don't claim to be better than others using my degree as my only argument.

And my point is that generalizations like "ALL engineers are all high and mighty" is just as wrong, hurtful, dangerous, and objectionable as "folks who don't speak English fluently are stupid". If the person who wrote this code was arrogant and belligerent after you proposed a better solution I'd agree with you that this person was a jerk. But that doesn't mean that everyone who has a qualification is.

Hope my point is clear.

I hope mine is, too.

%
 

Posts:3,258
Registered: 00-08-28
Re: Engineers not so cool after all  
Jul 16, 2004 8:13 AM (reply 12 of 50)



 
No, I've checked the code and:

1) the object created is never used at all, the
reference is pointed to another date object later in
the method.

2) Obviously the programmer intended to use the
0000-00-00 as some sort of default value, but it
wouldn't make sense, because in that case he'd rather
written new Date(0). The problem is that to supply
0000-00-00 as a string would probably cause the
Date(String) constructor to throw an
IllegalArgumentException, which wouldn't be all that
nice.

My point is that, in my experience, engineers are all
"high and mighty", looking down on non-engineer
coders, implying that they somewhat better.
I, myself, have a degree in software development, but
I don't claim to be better than others using my degree
as my only argument.

Hope my point is clear.


"The only man who never makes a mistake is the man who never does anything." - Theodore Roosevelt
 

Posts:21,719
Registered: 98-02-20
Re: Engineers not so cool after all  
Jul 16, 2004 8:14 AM (reply 13 of 50)



 
"The only man who never makes a mistake is the man who never does anything." - Theodore Roosevelt

Indeed. Well said.

%
 

Posts:123
Registered: 5/24/04
Re: Engineers not so cool after all  
Jul 16, 2004 8:19 AM (reply 14 of 50)



 
"I'll ask again - you checked the code, but did you check with the person who wrote it or the team lead? You could easily correct this situation if you wanted to. Your company's code might be better for it."

He's not employed here anymore, and I've been more or less put to rework the applications he's been in charge of.

My point is that, in my experience, engineers are all "high and mighty", looking down on non-engineer
coders, implying that they somewhat better. I, myself, have a degree in software development, but
I don't claim to be better than others using my degree as my only argument.

"And my point is that generalizations like "ALL engineers are all high and mighty" is just as wrong, hurtful, dangerous, and objectionable as "folks who don't speak English fluently are stupid". If the person who wrote this code was arrogant and belligerent after you proposed a better solution I'd agree with you that this person was a jerk. But that doesn't mean that everyone who has a qualification is. "

I did not state that ALL engineers were sons of Satan, I merely stated that "In my experience", they are that way. I'm not in any way claiming not to change my point of view upon encountering one of the "good" engineers.

All I'm saying is that one should never use one's degree as the sole argument why one is more capable than another.

Skill will always be skill, no matter how many years you've spent in school.

Hope my point is clear.

I hope mine is, too.
 
This topic has 50 replies on 4 pages.    1 | 2 | 3 | 4 | Next »