debugging messy code?

B

Bjoern

I currently have to debug (somebody elses) very messy code, and instead
of bemoaning my fate, I decided I should wonder if there actually are
some common wisdoms as to how to approach such a problem? I've read a
lot about common software engineering tasks (design patterns etc), but
what about this everyday problem? Is there a debugging pattern?

Since it's J2ME projects, I am also very limited in the logging or
debugging capabilities. Often I don't have an emulator for a particular
device, so I can't print many logging statements. The debugger also
crashes many emulators.

So I am curious if there is a proper way to approach this, or is trial
and error all I can do?

Even 'binary search' (my first thought) is difficult to do, since code
doesn't always execute in a linear way.

Many thanks in advance!


Bjoern

--


Let's not weep for their evil deeds,
but for their lack of imagination
(Nick Cave)
 
D

David Postill

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bjoern

| I currently have to debug (somebody elses) very messy code, and instead
| of bemoaning my fate, I decided I should wonder if there actually are
| some common wisdoms as to how to approach such a problem? I've read a
| lot about common software engineering tasks (design patterns etc), but
| what about this everyday problem? Is there a debugging pattern?
|
| Since it's J2ME projects, I am also very limited in the logging or
| debugging capabilities. Often I don't have an emulator for a particular
| device, so I can't print many logging statements. The debugger also
| crashes many emulators.
|
| So I am curious if there is a proper way to approach this, or is trial
| and error all I can do?
|
| Even 'binary search' (my first thought) is difficult to do, since code
| doesn't always execute in a linear way.
|
| Many thanks in advance!

"Java debugging tutorial"
<http://www-106.ibm.com/developerworks/edu/j-dw-javadebug-i.html>

"IBM bug patterns series"
<http://www-106.ibm.com/search/searc...&query=bug+patterns&searchScope=dW&Search.x=0
&Search.y=0&Search=Search>

<davidp />

- --
David Postill

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3 - not licensed for commercial use: www.pgp.com
Comment: Get key from pgpkeys.mit.edu:11370

iQA/AwUBP7v7R3xp7q1nhFwUEQIgIwCfQEoJhtLtlAm/4G6/D4F8aSc85NEAniS1
dzcyFVzayHl1oQXLLIz07b0L
=L9aG
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top