by kornel@synkre.com | Jul 25, 2019 | Programming Tips
What are the benefits of lock free non-blocking code? Traditional Java programming uses mutex locks to give mutually exclusive access to resources. How can immutables and snapshots be used to write code without these locks. What libraries exist that provide algorithms...
by kornel@synkre.com | Jul 25, 2019 | Programming Tips
The Java Virtual Machine (JDK) has a number of techniques to allow us to work safely with data in multi-treaded applications: We can declare a variable volatile, we can synchronize, explicitly define and use a lock from java.util.concurrent.locks, or use one of the...
by kornel@synkre.com | Jul 19, 2019 | Programming Tips
JavaBeans were created by Sun Microsystems in the 1990s to address a couple of shortcomings of the Java language. They wanted a way to make fields either read-only or read-and-write. They also wanted to make Java code better readable by design tools, such as NetBeans....
by kornel@synkre.com | Jul 18, 2019 | Uncategorized
Using Java beans will destroy your functional code. I keep coming across code that implements setters and getters in Scala code. There are multiple problems with this when it comes to functional programming. Scala code should use case classes, not mutable java beans....
by kornel@synkre.com | Jul 16, 2019 | Uncategorized
In the past couple of years, there’s been a trend to code with streams. Ever wondered why everything is turning into a stream? What are their advantages? What should you do if you wanted use streams? What libraries are out there and which ones are the good ones?...