64 karma · joined December 12, 2009
Once that gets a bit too slow, running migrations once before every suite and then deleting all data before each test works really well. It's pretty easy to make the deleting dynamic by querying the names of all tables and constructing one statement to clear the data, which avoids referential integrity issues. Surprisingly, `TRUNCATE` is measurably slower than `DELETE FROM`.
Another nice touch is that turning off `fsync` in postgres makes it noticeably faster, while maintaining all transactional semantics.
It cannot fundamentally be zero impact, the database needs to guarantee that the referred record actually exists at the time the transaction commits. Postgres takes a lock on all referenced foreign keys when inserting/updating rows, this is definitely not completely free.
Found this out when a plain insert statement caused a transaction deadlock under production load, fun times.
It's not too fast and it doesn't go very far, but this hasn't been limiting so far. My legs get tired before the battery runs out.
If you want to try your hand at 3d modelling then you'll probably download Sketchup as a start and noodle around while watching youtube tutorials on the side. In about 8h you'll feel confident enough to actually model something meaningful. After ~40h you'll be able to knock together a model quite proficiently.
After you'll have gotten tired of Skethub producing broken STLs and not allowing you to change your mind after modelling a thing, you'd move on to one of the real CAD software package, like Solidworks or Fusion 360 (which is great for beginners, btw). That rabbithole goes exactly as deep as you've got time for :)
Fiddling with the printing itself will take a bit of setup time before each print and then a lengthy wait (hours to days) to get the result, or see it fail in some new and unfunny way. It's not really all that difficult, to be honest, just takes some time to develop an intuition about what's likely to fail.
It is a very inconvenient system for buying votes though, as the voters can pick up your money and then go vote for whoever they wanted to in the first place.
Collections.synchronizedMap(new HashMap());