JPA, and for that matter Hibernate, depends on identifying entity instances (I'll refer to them as entities for short) by some key. That key can either be a single property (like a numeric ID column in the corresponding table) or a business key (also referred to as natural key). Business keys are entity properties which … Continue reading On JPA identifiers and business keys (or why business keys are a bad idea)
Month: Feb 2014
Automatically regulating volume on a USB headset with Ubuntu
When you connect an external speaker or headset to your computer you normally expect the sound to play over those and you'd also expect the integrated speakers to mute. Windows does that well and you'd expect that Ubuntu can do that as well, unfortunately it doesn't. Not without some scripting. So here we go: The … Continue reading Automatically regulating volume on a USB headset with Ubuntu
On coarse- vs. fine-grained synchronization
Performance related topics seem to constantly attract attention and everyone seems to have strong opinions on the matter. Writing code that can be proved [1] to perform according to a certain pattern is probably not the worst place to start with, although the web is full of counterintuitive [2] examples [3] where hardware details weigh … Continue reading On coarse- vs. fine-grained synchronization