Rob...
Lifetime Supporting Member
I was always taught to make my software easy to understand and fault find on by anyone reading it. Good practice right?
Now I know set and reset bits are useful and I use them often in code for a specific purpose.
However I've just spent 9 hours today trying to work my way through someones code on a machine. I kid you not there are 13 bits in this software set and reset in over 50 places each. Everything is done with toggling.
(A lot more of what I would consider bad practice, but that was an easy example, another, using timers to avoid scan time issues)
To makes matters more interesting a lot of it runs through indirect addressing and pointers. So cross referencing is a pig!
It seems like whoever has written the code has made it, even for the most basic of functionality, as difficult as possible for anyone to ever work on.
Doing it sat in a control room with no AC at 42 degC (107deg F) didn't help my patience.
Whoever wrote this software, your name has been mud today. Rant over, time for a cold beer!
Now I know set and reset bits are useful and I use them often in code for a specific purpose.
However I've just spent 9 hours today trying to work my way through someones code on a machine. I kid you not there are 13 bits in this software set and reset in over 50 places each. Everything is done with toggling.
(A lot more of what I would consider bad practice, but that was an easy example, another, using timers to avoid scan time issues)
To makes matters more interesting a lot of it runs through indirect addressing and pointers. So cross referencing is a pig!
It seems like whoever has written the code has made it, even for the most basic of functionality, as difficult as possible for anyone to ever work on.
Doing it sat in a control room with no AC at 42 degC (107deg F) didn't help my patience.
Whoever wrote this software, your name has been mud today. Rant over, time for a cold beer!