BBO Discussion Forums: Computer embarrassment - BBO Discussion Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Computer embarrassment

#1 User is offline   helene_t 

  • The Abbess
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 17,347
  • Joined: 2004-April-22
  • Gender:Female
  • Location:Copenhagen, Denmark
  • Interests:History, languages

Posted 2008-January-10, 10:39

So now I just spent three days looking for an apparent bug in a statistical procedure, and it turned out to be the wellknown.....

Lesson 1 (scientific computing for beginners): Pascal modules store matrices in major row order, while FORTRAN modules store them in major column order. Whenever you build an application of a mixture of Pascal and FORTRAN modules, make sure the matrices are transposed whenever appropriate (and not otherwise!)

Why are the most trivial bugs the most difficult to find? Or is it just that it feels so?
The world would be such a happy place, if only everyone played Acol :) --- TramTicket
0

#2 User is offline   akhare 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 1,261
  • Joined: 2005-September-04
  • Gender:Male

Posted 2008-January-10, 11:45

Interesting -- basically, the poor blokes who can't remember that all languages worth writing about start indexing their matrixes with 0 must have had similar experiences :) (pun fully intended; implied language bigotry for humour only).
foobar on BBO
0

#3 User is offline   matmat 

  • ded
  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,459
  • Joined: 2005-August-11
  • Gender:Not Telling

Posted 2008-January-10, 11:55

funny;

i think the same difference exists between C and fortran... or at least i hope it does. that's the bug I 'found' in some design software when i was working on a not-to-be-named large physics project as an undergrad.
0

#4 User is offline   kfay 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,208
  • Joined: 2007-July-01
  • Gender:Male
  • Location:Michigan
  • Interests:Science, Sports

Posted 2008-January-10, 12:05

Learning one computer language was hard enough for me. This story reaffirms my decision to avoid that sort of thing.

That being said maybe for you finding such a bug is a 'God I'm glad that's over... I'm so dumb' moment but I think it's pretty impressive since such a subtle difference I can only imagine is exceedingly difficult to find.
Kevin Fay
0

#5 User is offline   keylime 

  • PipPipPipPipPipPipPip
  • Group: FD TEAM
  • Posts: 2,735
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Nashville, TN
  • Interests:Motorsports, cricket, disc golf, and of course - bridge. :-)

Posted 2008-January-10, 20:39

Helene,

It's quite analogous to us hardware techs, troubleshooting and working for an hour, only to realize that a cable wasn't snuggly into its port thus causing the issue in the first place.
"Champions aren't made in gyms, champions are made from something they have deep inside them - a desire, a dream, a vision. They have to have last-minute stamina, they have to be a little faster, they have to have the skill and the will. But the will must be stronger than the skill. " - M. Ali
0

#6 User is offline   Al_U_Card 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 6,080
  • Joined: 2005-May-16
  • Gender:Male

Posted 2008-January-10, 20:44

Not nearly as embarassing as not knowing that the web-cam is on...... :)
The Grand Design, reflected in the face of Chaos...it's a fluke!
0

#7 User is offline   P_Marlowe 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 10,478
  • Joined: 2005-March-18
  • Gender:Male

Posted 2008-January-14, 15:23

helene_t, on Jan 10 2008, 11:39 AM, said:

<snip>
Why are the most trivial bugs the most difficult to find? Or is it just that it feels so?

Because if they happen, you are usually tired.
If I encounter such an error, I know, I am 3 hours
overdue.

With kind regards
Marlowe
With kind regards
Uwe Gebhardt (P_Marlowe)
0

#8 User is offline   mycroft 

  • Secretary Bird
  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,902
  • Joined: 2003-July-12
  • Gender:Male
  • Location:Calgary, D18; Chapala, D16

Posted 2008-January-14, 15:56

my favourite was trying to figure out what was going on in an if check that I had written. I checked and doublechecked the logic, no dice. I even went to the trouble of deleting and rewriting the if statement, again, nothing.

I wrote it out on a piece of paper, and took it upstairs to another developer. I put it down in front of him and started explaining what I was doing when I realized that:

if (variableA = variableB) {...} is not the same, and doesn't work the same, as:
if (variableA == variableB) {...}

Now, I'd only been coding in C for 3 years at this point...
Apologized to my colleague for wasting his time (to which he said something I've learned to be true a number of times since: "some errors are only clear when you start explaining it to someone else, don't worry about it"), and went back to my desk.
When I go to sea, don't fear for me, Fear For The Storm -- Birdie and the Swansong (tSCoSI)
0

#9 User is offline   goobers 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 372
  • Joined: 2006-December-04

Posted 2008-January-14, 16:00

I once spent 3 hours trying to fix an error before I realized that arrays are zero indexed.

I felt like I had failed 4 years of college at that point.
0

#10 User is offline   P_Marlowe 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 10,478
  • Joined: 2005-March-18
  • Gender:Male

Posted 2008-January-14, 16:04

mycroft, on Jan 14 2008, 04:56 PM, said:

my favourite was trying to figure out what was going on in an if check that I had written.  I checked and doublechecked the logic, no dice.  I even went to the trouble of deleting and rewriting the if statement, again, nothing.

I wrote it out on a piece of paper, and took it upstairs to another developer.  I put it down in front of him and started explaining what I was doing when I realized that:

if (variableA = variableB)  {...} is not the same, and doesn't work the same, as:
if (variableA == variableB) {...}

Now, I'd only been coding in C for 3 years at this point...
Apologized to my colleague for wasting his time (to which he said something I've learned to be true a number of times since: "some errors are only clear when you start explaining it to someone else, don't worry about it"), and went back to my desk.

It nearly matches my altime favourite:

while(variableA == variableB); {...}

I was wondering, why the compiler did
execute the body only once, although it
was clear, that the statement still did hold.
And I was debbugging the stupid coding
several hours.

With kind regards
Marlowe

PS: Wonderfull language, I miss it a bit, ...
With kind regards
Uwe Gebhardt (P_Marlowe)
0

#11 User is offline   paulg 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 5,131
  • Joined: 2003-April-26
  • Gender:Male
  • Location:Scottish Borders

Posted 2008-January-15, 02:43

Of course it's software engineers who call support to have their faulty monitor replaced ... only to have the repair man turn up the brightness for them.

To my credit I only did this once.

p
The Beer Card

I don't work for BBO and any advice is based on my BBO experience over the decades
0

#12 User is offline   Apollo81 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,162
  • Joined: 2006-July-10
  • Gender:Male
  • Location:Maryland

Posted 2008-January-15, 08:52

mycroft, on Jan 14 2008, 04:56 PM, said:

my favourite was trying to figure out what was going on in an if check that I had written. I checked and doublechecked the logic, no dice. I even went to the trouble of deleting and rewriting the if statement, again, nothing.

I wrote it out on a piece of paper, and took it upstairs to another developer. I put it down in front of him and started explaining what I was doing when I realized that:

if (variableA = variableB) {...} is not the same, and doesn't work the same, as:
if (variableA == variableB) {...}

Now, I'd only been coding in C for 3 years at this point...
Apologized to my colleague for wasting his time (to which he said something I've learned to be true a number of times since: "some errors are only clear when you start explaining it to someone else, don't worry about it"), and went back to my desk.

One place I used to work had a policy that when writing comparison statements involving a variable and a constant, the constant had to go on the left.
0

#13 User is offline   mycroft 

  • Secretary Bird
  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,902
  • Joined: 2003-July-12
  • Gender:Male
  • Location:Calgary, D18; Chapala, D16

Posted 2008-January-15, 10:15

Apollo81, on Jan 15 2008, 08:52 AM, said:

One place I used to work had a policy that when writing comparison statements involving a variable and a constant, the constant had to go on the left.

We didn't have that policy, but as soon as I saw the rationale somewhere, I started doing that.

Wouldn't have helped me that time though.

Michael.
When I go to sea, don't fear for me, Fear For The Storm -- Birdie and the Swansong (tSCoSI)
0

#14 User is offline   jtfanclub 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,937
  • Joined: 2004-June-05

Posted 2008-January-15, 17:08

goobers, on Jan 14 2008, 05:00 PM, said:

I once spent 3 hours trying to fix an error before I realized that arrays are zero indexed.

I felt like I had failed 4 years of college at that point.

Except when they aren't, of course....

Was it PASCAL that used to be the exception there? Or GWBASIC? One of them got me on that.
0

#15 User is offline   helene_t 

  • The Abbess
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 17,347
  • Joined: 2004-April-22
  • Gender:Female
  • Location:Copenhagen, Denmark
  • Interests:History, languages

Posted 2008-January-15, 17:11

jtfanclub, on Jan 16 2008, 01:08 AM, said:

goobers, on Jan 14 2008, 05:00 PM, said:

I once spent 3 hours trying to fix an error before I realized that arrays are zero indexed.

I felt like I had failed 4 years of college at that point.

Except when they aren't, of course....

Was it PASCAL that used to be the exception there? Or GWBASIC? One of them got me on that.

GWBASIC. In Pascal, index origin must be specified explicitly per array. In Basic, default is 1 but you can overwrite it globaly.
The world would be such a happy place, if only everyone played Acol :) --- TramTicket
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users