Java Code Geeks http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Mon, 30 Mar 2015 22:00:14 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.1 Shooting yourself in the foot with Random number generatorshttp://www.javacodegeeks.com/2015/03/shooting-yourself-in-the-foot-with-random-number-generators.html http://www.javacodegeeks.com/2015/03/shooting-yourself-in-the-foot-with-random-number-generators.html#comments Mon, 30 Mar 2015 22:00:14 +0000 http://www.javacodegeeks.com/?p=38767 This is not going to be one of the posts explaining how a random number generator is not so random after all. So those of you expecting a guideline for how to hack a slot machine, move along, nothing to see here. Instead, it is a post about one of the not-so-uncommon lock contention issues, ...

 

]]>
http://www.javacodegeeks.com/2015/03/shooting-yourself-in-the-foot-with-random-number-generators.html/feed/ 0
Hot and cold rx-java Observablehttp://www.javacodegeeks.com/2015/03/hot-and-cold-rx-java-observable.html http://www.javacodegeeks.com/2015/03/hot-and-cold-rx-java-observable.html#comments Mon, 30 Mar 2015 19:00:04 +0000 http://www.javacodegeeks.com/?p=38766 My own understanding of Hot and Cold Observable is quite shaky, but here is what I have understood till now! Cold Observable Consider an API which returns an rx-java Observable: import obs.Util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import rx.Observable; import rx.schedulers.Schedulers; public class Service1 { private static final Logger logger = LoggerFactory.getLogger(Service1.class); public Observable<String> operation() { ...

 

]]>
http://www.javacodegeeks.com/2015/03/hot-and-cold-rx-java-observable.html/feed/ 0
A New Idea for Calling Functionshttp://www.javacodegeeks.com/2015/03/a-new-idea-for-calling-functions.html http://www.javacodegeeks.com/2015/03/a-new-idea-for-calling-functions.html#comments Mon, 30 Mar 2015 16:00:27 +0000 http://www.javacodegeeks.com/?p=38765 Disclaimer: This is going to come off a bit ranty. I’m not as frustrated by the “problems” I bring us as it sounds; rather, it is used to emphasize why my thought processes did what it did. I’m not even going to be using header titles, which is weird for me :) I’ve had a ...

 

]]>
http://www.javacodegeeks.com/2015/03/a-new-idea-for-calling-functions.html/feed/ 0
Common Agile objectionshttp://www.javacodegeeks.com/2015/03/common-agile-objections.html http://www.javacodegeeks.com/2015/03/common-agile-objections.html#comments Mon, 30 Mar 2015 13:00:57 +0000 http://www.javacodegeeks.com/?p=38764 Last time (“Waterfall works when…”) I promised to discuss some of those common objections to “Agile.” (Actually, reading back this this post I’m struck by how like my “12 Myths of Agile Development” which was originally a blog post 2 years ago called “11 Agile Myths of 2 Truths”.) (Apologies by the way, “Waterfall works ...

 

]]>
http://www.javacodegeeks.com/2015/03/common-agile-objections.html/feed/ 0
Waterfall works when…http://www.javacodegeeks.com/2015/03/waterfall-works-when.html http://www.javacodegeeks.com/2015/03/waterfall-works-when.html#comments Mon, 30 Mar 2015 10:00:29 +0000 http://www.javacodegeeks.com/?p=38763 I frequently find myself in situations where someone says something like: “Waterfall is appropriate when…” Some people out there think there are occasions when an Agile (mainly iterative) approach is “best’ and other occasions when “Waterfall” is “best”. Most of the time I let this line of argument go because its boring, I can’t be ...

 

]]>
http://www.javacodegeeks.com/2015/03/waterfall-works-when.html/feed/ 1
Neo4j: Generating real time recommendations with Cypherhttp://www.javacodegeeks.com/2015/03/neo4j-generating-real-time-recommendations-with-cypher.html http://www.javacodegeeks.com/2015/03/neo4j-generating-real-time-recommendations-with-cypher.html#comments Mon, 30 Mar 2015 07:00:06 +0000 http://www.javacodegeeks.com/?p=38762 One of the most common uses of Neo4j is for building real time recommendation engines and a common theme is that they make use of lots of different bits of data to come up with an interesting recommendation. For example in this video Amanda shows how dating websites build real time recommendation engines by starting ...

 

]]>
http://www.javacodegeeks.com/2015/03/neo4j-generating-real-time-recommendations-with-cypher.html/feed/ 0
Replanning your project with a time machinehttp://www.javacodegeeks.com/2015/03/replanning-your-project-with-a-time-machine.html http://www.javacodegeeks.com/2015/03/replanning-your-project-with-a-time-machine.html#comments Mon, 30 Mar 2015 04:00:22 +0000 http://www.javacodegeeks.com/?p=38761 I have an amazing time machine that lets me think better about projects. This is part 1 in a series of blog posts exploring the use of a time machine. Let’s say that you have a project that has been running for a couple of months. Looking back at your issue tracker and other artifacts, ...

 

]]>
http://www.javacodegeeks.com/2015/03/replanning-your-project-with-a-time-machine.html/feed/ 0
InetAddressImpl#lookupAllHostAddr slow/hangshttp://www.javacodegeeks.com/2015/03/inetaddressimpllookupallhostaddr-slowhangs.html http://www.javacodegeeks.com/2015/03/inetaddressimpllookupallhostaddr-slowhangs.html#comments Sun, 29 Mar 2015 22:00:26 +0000 http://www.javacodegeeks.com/?p=38760 Since I upgraded to Yosemite I’ve noticed that attempts to resolve localhost on my home network have been taking ages (sometimes over a minute) so I thought I’d try and work out why. This is what my initial /etc/hosts file looked like based on the assumption that my machine’s hostname was teetotal: $ cat /etc/hosts ...

 

]]>
http://www.javacodegeeks.com/2015/03/inetaddressimpllookupallhostaddr-slowhangs.html/feed/ 0
Aggregate Installation Tipshttp://www.javacodegeeks.com/2015/03/aggregate-installation-tips.html http://www.javacodegeeks.com/2015/03/aggregate-installation-tips.html#comments Sun, 29 Mar 2015 12:00:08 +0000 http://www.javacodegeeks.com/?p=38696 Aggregate Installation Tips One of the reasons I am writing this blog, is to keep “log” for myself on how I resolved issues. In this post I will describe how I installed several basic development tools on a Fedora OS. I want this laptop to be my workstation for out-of-work projects. Almost everything in this ...

 

]]>
http://www.javacodegeeks.com/2015/03/aggregate-installation-tips.html/feed/ 0
The Magic Setter Antipatternhttp://www.javacodegeeks.com/2015/03/the-magic-setter-antipattern.html http://www.javacodegeeks.com/2015/03/the-magic-setter-antipattern.html#comments Sat, 28 Mar 2015 13:00:44 +0000 http://www.javacodegeeks.com/?p=38697 Setters and getter are evil. When the JavaBean definition was created it seemed to be a good idea. But they do a lot of harm to the Java community. Not as many as the null pointer generally, but enough. The very first thing is that many juniors believe that implementing setters and getter (hey, it ...

 

]]>
http://www.javacodegeeks.com/2015/03/the-magic-setter-antipattern.html/feed/ 2