Monday, 19 November 2012

Some simple Windows tools that will make you happy

Currently I'm migrating from one PC to the other, so there are couple of things that I HAVE to take there with me:

Map Any Key to Any Key on Windows 7 / XP / Vista - can be useful if you have page up and page down keys next to arrows, IMO home / end should be placed there.

Ditto - Clipboard Manager - remembers all CTR+C 's :)


Monday, 12 November 2012

Producer-Consumer sample - Listing files

Listing files is reeally slow operation.

That's why I decided that it will be a good use case to have some fun with java's concurrency.

Producer-Consumer pattern seemed to fit my needs.
  1. Producer is listing all files from given directory. 
  2. Consumer is filtering proper files and propagates this data to GUI in real-time. 
  3. Both are connected by BlockingQueue
BlockingQueue<List<File>> myQueue = new LinkedBlockingQueue<List<File>>();

Please find my sources @

... Actually I should write something about my code to justify some of my implementating decisions, but it's being late right now in Poland :) so consider this entry as asking for code review in some free time.