art with code


And even more testing

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.
Post a Comment

Blog Archive

About Me

My photo

Built art installations, web sites, graphics libraries, web browsers, mobile apps, desktop apps, media player themes, many nutty prototypes, much bad code, much bad art.

Have freelanced for Verizon, Google, Mozilla, Warner Bros, Sony Pictures, Yahoo!, Microsoft, Valve Software, TDK Electronics.

Ex-Chrome Developer Relations.