Sorry about the lack of 2.6 support. I looked into it and I could probably do it but I just don't care enough about 2.6 to put in the work and make everything uglier. :-)
495 karma · joined July 4, 2009
Sorry about the lack of 2.6 support. I looked into it and I could probably do it but I just don't care enough about 2.6 to put in the work and make everything uglier. :-)
I have in fact had to deal with exactly this problem in Hypothesis internals. The example saving code didn't work correctly with floats in the first edition, because it was serializing them as JSON, which loses some information encoded in the actual float. In the end I serialize floats (which are actually doubles) by converting them to a 64-bit integer with the same bitwise representation first.
The bug aryx is talking about though actually illustrates an amusing feature of Hypothesis, which is that the code in it is just weird enough that it tends to do unexpected things that trigger bugs which have nothing to do with the properties being tested. :-) In this case it was putting unicode objects onto sys.path, which is 100% allowed but causes problems for certain code running on python 2.7 on windows that previously appeared to work.
Concolic testing is quite hard in Python because of its extremely flexible semantics. I will probably look into doing something with z3 at some point when I need an interesting problem to entertain me, but I don't hold out a massive amount of hope for it being useful.
The best part of this message is that if you were someone I knew and thus could trust to only say nice things about me you would offer to buy me gin instead of beer. ;-)
If you haven't seen it, http://hypothesis.readthedocs.org/en/latest/internals.html#p... describes the current algorithm for generation. It's smarter than is typical for quickcheck, but could definitely be improved.
The CLA is for a mix of weird personal reasons around open source and cynically practical ones. Hypothesis is 100% always going to remain free, but I'm trying to figure out ways that I can make money out of working on it (I've put a ton of work into it, so it would be a shame not to) and that's a lot easier if I retain the copyright. I may decide it's not useful and drop it later, but it's a lot easier to have it now and drop it later than it is to try and retroactively get one if it turns out I need it.
It's a lot more fully featured than the alternatives. It still lacks a few features of quickcheck (coarbitrary for function generation, labelling of examples), but it does example minimization and a whole bunch of things even quickcheck doesn't.
I've mostly got away with it in the past - it's survived much heavier hackernewsings - but I think I installed a plugin recently that was rather more costly than it should have been, and then the fact that I hadn't previously looked under the hood bit me.
Edit: It's also worth noting I don't think principle 1 is always a good idea. This advice is very specifically optimised for the case of joining an existing company with an existing product and an existing team. If you're starting from scratch you should do more up front investigation and thinking things through. though maybe not orders of magnitude more.
Personally, I quite like to be doing useful work, and normal ramp-up times for people seem to be about 3-6 months, which if you work at a company for < 3 years can be as much as 10-20% of your time. More if you're switching between projects within a company. It's pleasant to not have to waste that large a percentage of your time getting up to speed.
Instead I flailed around blindly in the usual manner of trying to get PHP applications to work and seem to have fixed the problem. :-)
I should really move my blog to an environment I actually understand and have control over.
The reasoning for the naming is essentially that an explicit mental model is one where you can write down all the steps, whileas an implicit model is one that just arises naturally from the things already in your brain and you can't really point to it and say what it is. I'm not sure that behavioural model quite captures that, but I'm definitely up for a better naming convention.
On the HTTP is slow thing: I think I was pretty clear in the write up that we had failed to performance test and it wasn't at all clear that our replacement was faster. I think these are sufficient disclaimers that I was pretty obviously labelling it "HEY DON'T DO IT THIS WAY" :-)
But I was probably not trying to suggest you should regularly do this (certainly I wouldn't suggest that now), only that if you find you have a good reason to do it you shouldn't be afraid of it.