Life is good...

mAdMaLuDaWg

Platinum Member
Feb 15, 2003
2,437
1
0
I'm working on a very small part of a critical project that is generating a savings of 10 million dollars a year. I was struggling with a stupid bug that I though was a concurrency issue and it turns out that the equalsTo method of the class wasn't updated with the new field that I added to the class. This inturn caused the object to falsely identify itself as not being updated.

Basically oldObject was giving a false equalsTo to a newObject even though the newField's value was modified. I didn't add the newField to the equalsTo method which was why it was showing a false equivalent value.


I hope that made sense...

Anyway, now to respond to the Chief Information Officer about a stupid issue and I'm on my way home. I leave early tommorrow morning to spend thanksgiving with my family. I do have to work on Friday even though I have off because I have a ton of cr@p that is not done yet.

Sorry for the rambling... I'm buzzed after a 3 jack&cokes and 1 kamizake that I had with my co-workers.... I'll delete this post tommorrow.
 

mugs

Lifer
Apr 29, 2003
48,920
46
91
Originally posted by: mAdMaLuDaWg
I'm working on a very small part of a critical project that is generating a savings of 10 million dollars a year. I was struggling with a stupid bug that I though was a concurrency issue and it turns out that the equalsTo method of the class wasn't updated with the new field that I added to the class. This inturn caused the object to falsely identify itself as not being updated.

Basically oldObject was giving a false equalsTo to a newObject even though the newField's value was modified. I didn't add the newField to the equalsTo method which was why it was showing a false equivalent value.


I hope that made sense...

Anyway, now to respond to the Chief Information Officer about a stupid issue and I'm on my way home. I leave early tommorrow morning to spend thanksgiving with my family. I do have to work on Friday even though I have off because I have a ton of cr@p that is not done yet.

Sorry for the rambling... I'm buzzed after a 3 jack&cokes and 1 kamizake that I had with my co-workers.... I'll delete this post tommorrow.

No you won't. :p
 

paulney

Diamond Member
Sep 24, 2003
6,909
1
0
Originally posted by: mAdMaLuDaWg
I'm working on a very small part of a critical project that is generating a savings of 10 million dollars a year. I was struggling with a stupid bug that I though was a concurrency issue and it turns out that the equalsTo method of the class wasn't updated with the new field that I added to the class. This inturn caused the object to falsely identify itself as not being updated.

Unit tests are your friends.
Start writing them now.

 

mAdMaLuDaWg

Platinum Member
Feb 15, 2003
2,437
1
0
Originally posted by: paulney
Originally posted by: mAdMaLuDaWg
I'm working on a very small part of a critical project that is generating a savings of 10 million dollars a year. I was struggling with a stupid bug that I though was a concurrency issue and it turns out that the equalsTo method of the class wasn't updated with the new field that I added to the class. This inturn caused the object to falsely identify itself as not being updated.

Unit tests are your friends.
Start writing them now.

Unit testing is very hard when you are talking about a distributed application that is dependent on real time messaging. I know, I know, you can create mock objects for the real time messages... however, when the deliverable is due in 1 day, you don't have much time to unit test.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: mAdMaLuDaWg
Originally posted by: paulney
Originally posted by: mAdMaLuDaWg
I'm working on a very small part of a critical project that is generating a savings of 10 million dollars a year. I was struggling with a stupid bug that I though was a concurrency issue and it turns out that the equalsTo method of the class wasn't updated with the new field that I added to the class. This inturn caused the object to falsely identify itself as not being updated.

Unit tests are your friends.
Start writing them now.

Unit testing is very hard when you are talking about a distributed application that is dependent on real time messaging. I know, I know, you can create mock objects for the real time messages... however, when the deliverable is due in 1 day, you don't have much time to unit test.

I don't see how that makes a difference, and mock objects aren't really the issue here, imo. Sounds like you need a proper QA environment where the message queue (or whatever you're using) is available for testing. You shouldn't be dependent on the real-time nature of the messages.

Also, sounds like you're doing some POJO-inspired domain architecture and could benefit from a unit of work or something similar. I'm not a fan of objects maintaining the state of their own changes.

Just giving you a hard time man. Enjoy your :beer::wine: