Indexing. Indexing is hard. Pretty much every test I wrote for fancy array indexing found a bug. And when you have an indexing bug combined with unsafe gets and sets, you have a segfault bug. High P(you fucked up) and high P(real bad) combine to make a high P(you fucked up real bad.)
Now the tests pass but ... yeah. The seed of insecurity is sown. Fear taking control, etc. Cause of fear: lack of information. The more you know about the code, the less you fear it (specifically: Does it work? Really? Even on a PowerPC? What does "work" mean in this context? Give me the measurements.) Right?
Today I've been writing some simple things in Coq (s/writing/copying examples by hand.) It lets you define statements and prove facts about them. Which brings the question, how do you know that you have proven all the facts that you need to prove about a piece of code (e.g. that "(x + y) / 2" works incorrectly if x + y > max_int (prodding you towards x / 2 + y / 2 + if odd x && odd y then 1 else 0))
Tomorrow, test generation.
art with code
2009-01-06
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(84)
-
▼
January
(15)
- Two things to make Ubuntu 8.10 less nerve-wrecking
- Performance debugging with R
- Programming books that I've liked
- Revised quickcheck.ml syntax
- Low-boilerplate testing in OCaml
- QuickCheck in make_suite.rb
- PreString tests done
- PreArray testing stats
- Prelude.ml: first pass of array tests complete
- Multi-threaded qsort in C
- Test generation / measuring code
- And even more testing
- Current testing stats
- Random thought on automated testing
- Prelude.ml testing
-
▼
January
(15)
No comments:
Post a Comment