Transilvania JUG

Sponsors

Category Archives: Transylvania JUG

20
Mar
2011
0

Navigating (Searching) Collections

The Java collections framework includes the concept of NavigableSets / NavigableMaps. The principle behind these interfaces is that taking a SortedSet/SortedMap you can use a subset of it. Some examples: Given the following set: 1 2 3 4 5 @Before … Continue reading

20
Mar
2011
0

Testing randomly

Some times it is useful to throw “random” data at your algorithm to see if it produces the correct result (see fuzz testing). This is especially true if you are writing some fundamental piece of code like a sort algorithm, … Continue reading

06
Mar
2011
2

Microbenchmarking and you

Microbenchmarking is the practice of measuring the performance characteristics (like CPU, memory or I/O) of a small piece of code to determine which would be better suited for a particular scenario. If I could offer but one advice on this, … Continue reading

06
Mar
2011
1

How to test for the implementation of toString()

Problem statement: you have some value objects for which you implemented toString() (for debugging purposes) and now you would like to test using a unit test that these implementations exist. Possible solutions: – Use reflection to detect the existence of … Continue reading

05
Mar
2011
2

Checking out the samples

Before starting to post more code, I would like to to take a minute and show how the actual sample code can be accessed easily. Of course you can always browse it using a web browser, but there are better … Continue reading

24
Feb
2011
0

Java SE 7 Developer Preview Release Now Available

The long awaited java 7 developer preview release (build 130) can now be downloaded here. The final release is scheduled for July. For sending feedback you can use the forums and the bug-reporting channel. For more details, make sure you … Continue reading

22
Feb
2011
8

Reasons to call .isEmpty on collections

I’ve seen many times code like the one below: 1 if (collection.size() > 0) { … }if (collection.size() > 0) { … } There is just something which inherently “clicks” with most programmers minds when they think “non-empty”. There is … Continue reading

20
Oct
2010
2

Transylvania Java User Group!

Under construction!

df