small mind: the code is self documenting medium mind: the documentation documents the code large mind: comments document the code galaxy mind: comments AND REGRESSION TESTS document the code
-
Show this thread
-
2/ related: I wouldn't want to be JUST a QA engineer, but I honestly do love writing regression tests. TDD, ideally, but retroactive coverage is good too
2 replies 0 retweets 8 likesShow this thread -
3/ I recently upgraded a data structure from 32 bit to 64. I turned on compiler warnings for potential casting errors. Every place there's a cast that potentially loses information, I put in code that does a run-time check to make sure no data is actually lost. >>>
1 reply 0 retweets 5 likesShow this thread -
4/ This can be turned on/off with a
#define for speed later. The code boots and does all manner of complex things. The virtual machine that the code defines gets ~ 10,000 opcodes in before one of my run-time cast-checking pieces fires. Huh! What's going on? >>>1 reply 0 retweets 3 likesShow this thread -
5/ There's a comment above "borrow field X to store information Y". INTERESTING. I just changed the type of Y to be 64 bits ... but X is 32 bits. Temptation is to change data structure to have a Y field next to the X field. ...but...
1 reply 0 retweets 4 likesShow this thread -
6/ Memory footprint matters, and adding 64 bits to every foobar is not cool. ...but we DO need to add 32 bits. So, wrap a union around the 32 bit X and the 64 bit Y, so that I expand the struct only by 32 bits. Relatively straight forward ... but not upon boot, we crash.
1 reply 0 retweets 3 likesShow this thread -
7/ Investigation shows that we are scanning a huge bit array and run off the end, not finding what we expect to find, and overflow the counter value. SO...
2 replies 0 retweets 3 likesShow this thread -
8/ it's possible that the huge bit array is now being constructed differently / poorly. ...but it's also possible that the very complicated chromosome-like code that scans the RNA and constructs proteins (in this analogy) doesn't work perfectly. SO. Regression tests.
1 reply 0 retweets 4 likesShow this thread -
9/ But, the good news: I like writing regression tests.
1 reply 0 retweets 5 likesShow this thread -
ⓘ Dogs don't have thumbs Retweeted Prometheus 2.1
10/ well OBVIOUSLY we document the regression tests, Lana!https://twitter.com/wraithburn/status/1141802407250280453 …
ⓘ Dogs don't have thumbs added,
2 replies 0 retweets 8 likesShow this thread
11/ Regression tests written. The "scan the bitstring" code works fine, it seems, even in my new 64 bit edit. ...so perhaps the code that constructs the bitstring got broken? That's what I'll be testing tomorrow, 8am.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.