Java Code Geeks » Konrad Garus http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Fri, 27 Feb 2015 05:00:55 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.1 Java 8 Streams API as Friendly ForkJoinPool Facadehttp://www.javacodegeeks.com/2015/01/java-8-streams-api-as-friendly-forkjoinpool-facade.html http://www.javacodegeeks.com/2015/01/java-8-streams-api-as-friendly-forkjoinpool-facade.html#comments Mon, 19 Jan 2015 11:00:45 +0000 http://www.javacodegeeks.com/?p=35874 One of features I love the most about Java 8 is the streams API. It finally eliminates pretty much all loops from the code and lets you write code that is so much more expressive and focused. Today I realized it can be used for something else: As a nice front-end for the ForkJoinPool. Problem: […]

 

]]>
http://www.javacodegeeks.com/2015/01/java-8-streams-api-as-friendly-forkjoinpool-facade.html/feed/ 0
Careful With Native SQL in Hibernatehttp://www.javacodegeeks.com/2014/03/careful-with-native-sql-in-hibernate.html http://www.javacodegeeks.com/2014/03/careful-with-native-sql-in-hibernate.html#comments Mon, 31 Mar 2014 16:00:14 +0000 http://www.javacodegeeks.com/?p=23539 I really like Hibernate, but I also don’t know a tool that would be nearly as powerful and deceptive at the same time. I could write a book on surprises in production and cargo cult programming related to Hibernate alone. It’s more of an issue with the users than with the tool, but let’s not […]

 

]]>
http://www.javacodegeeks.com/2014/03/careful-with-native-sql-in-hibernate.html/feed/ 5
ClojureScript Routing and Templating with Secretary and Enfocushttp://www.javacodegeeks.com/2014/03/clojurescript-routing-and-templating-with-secretary-and-enfocus.html http://www.javacodegeeks.com/2014/03/clojurescript-routing-and-templating-with-secretary-and-enfocus.html#comments Sun, 23 Mar 2014 13:00:15 +0000 http://www.javacodegeeks.com/?p=23032 A good while ago I was looking for good ways to do client-side routing and templating in ClojureScript. I investigated using a bunch of JavaScript frameworks from ClojureScript, of which Angular probably gave the most promising results but still felt a bit dirty and heavy. I even implemented my own routing/templating mechanism based on Pedestal […]

 

]]>
http://www.javacodegeeks.com/2014/03/clojurescript-routing-and-templating-with-secretary-and-enfocus.html/feed/ 0
The future may just as well be RESTfulhttp://www.javacodegeeks.com/2013/11/the-future-may-just-as-well-be-restful.html http://www.javacodegeeks.com/2013/11/the-future-may-just-as-well-be-restful.html#comments Tue, 12 Nov 2013 17:00:48 +0000 http://www.javacodegeeks.com/?p=18855 Chris Zheng has just published an article on “Why the future is NOT RESTful”. It made a bit of a splash, but I think it’s based on false assumptions and quite wrong. Here’s why. Chris observes that client takes more and more responsibilities from the server. He suggests that server is slowly becoming just a […]

 

]]>
http://www.javacodegeeks.com/2013/11/the-future-may-just-as-well-be-restful.html/feed/ 1
Systems that Run Forever Self-heal and Scalehttp://www.javacodegeeks.com/2013/09/systems-that-run-forever-self-heal-and-scale.html http://www.javacodegeeks.com/2013/09/systems-that-run-forever-self-heal-and-scale.html#comments Tue, 03 Sep 2013 19:00:31 +0000 http://www.javacodegeeks.com/?p=16938 I recently saw a great presentation by Joe Armstrong called “Systems that run forever self-heal and scale” . Joe Armstrong is the inventor of Erlang and he does mention Erlang quite a lot, but the principles are very much universal and applicable with other languages and tools. The talk is well worth watching, but here’s […]

 

]]>
http://www.javacodegeeks.com/2013/09/systems-that-run-forever-self-heal-and-scale.html/feed/ 1
JPA/Hibernate: Version-Based Optimistic Concurrency Controlhttp://www.javacodegeeks.com/2012/11/jpahibernate-version-based-optimistic-concurrency-control.html http://www.javacodegeeks.com/2012/11/jpahibernate-version-based-optimistic-concurrency-control.html#comments Tue, 06 Nov 2012 08:00:39 +0000 http://www.javacodegeeks.com/?p=2903 This article is an introduction to version-based optimistic concurrency control in Hibernate and JPA. The concept is fairly old and much has been written on it, but anyway I have seen it reinvented, misunderstood and misused. I’m writing it just to spread knowledge and hopefully spark interest in the subject of concurrency control and locking. […]

 

]]>
http://www.javacodegeeks.com/2012/11/jpahibernate-version-based-optimistic-concurrency-control.html/feed/ 0
Domain Modeling: Naive OO Hurtshttp://www.javacodegeeks.com/2012/09/domain-modeling-naive-oo-hurts.html http://www.javacodegeeks.com/2012/09/domain-modeling-naive-oo-hurts.html#comments Wed, 05 Sep 2012 19:00:00 +0000 http://www.javacodegeeks.com/2012/10/domain-modeling-naive-oo-hurts.html I’ve read a post recently on two ways to model data of business domain. My memory is telling me it was Ayende Rahien, but I can’t find it on his blog. One way is full-blown object-relational mapping. Entities reference each other directly, and the O/R mapper automatically loads data for you as you traverse the […]

 

]]>
http://www.javacodegeeks.com/2012/09/domain-modeling-naive-oo-hurts.html/feed/ 0
Testing Spring & Hibernate Without XMLhttp://www.javacodegeeks.com/2012/08/testing-spring-hibernate-without-xml.html http://www.javacodegeeks.com/2012/08/testing-spring-hibernate-without-xml.html#comments Wed, 08 Aug 2012 01:00:00 +0000 http://www.javacodegeeks.com/2012/10/testing-spring-hibernate-without-xml.html I’m very keen on the improvements in Spring 3 that eventually let you move away from XML into plain Java configuration with proper support from IDE and compiler. It doesn’t change the fact that Spring is a huge suite and it sometimes finding the thing you need can take a while. XML-free unit tests around […]

 

]]>
http://www.javacodegeeks.com/2012/08/testing-spring-hibernate-without-xml.html/feed/ 1
Learning to Failhttp://www.javacodegeeks.com/2012/07/learning-to-fail.html http://www.javacodegeeks.com/2012/07/learning-to-fail.html#comments Fri, 27 Jul 2012 10:00:00 +0000 http://www.javacodegeeks.com/2012/10/learning-to-fail.html Back at university, when I dealt with much low-level problem solving and very basic libraries and constructs, I learned to pay attention to what can possibly go wrong. A lot. Implementing reliable, hang-proof communication over plain sockets? I remember it today, a trivial loop of “core logic” and a ton of guards around it. Now […]

 

]]>
http://www.javacodegeeks.com/2012/07/learning-to-fail.html/feed/ 0
Software for Usehttp://www.javacodegeeks.com/2012/07/software-for-use.html http://www.javacodegeeks.com/2012/07/software-for-use.html#comments Thu, 26 Jul 2012 16:00:00 +0000 http://www.javacodegeeks.com/2012/10/software-for-use.html Here’s confession of a full time software developer: I hate most software. With passion.  Why I Hate Software Software developers and people around the process are often very self-centered and care more about having a good time than designing a useful product. They add a ton of cool but useless and bugged features. They create […]

 

]]>
http://www.javacodegeeks.com/2012/07/software-for-use.html/feed/ 0