<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Java on David Hamp-Gonsalves</title><link>https://davidhampgonsalves.com/tags/java/</link><description>Recent content in Java on David Hamp-Gonsalves</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Sun, 06 Sep 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://davidhampgonsalves.com/tags/java/index.xml" rel="self" type="application/rss+xml"/><item><title>Java 8: The Good Parts</title><link>https://davidhampgonsalves.com/java-8-the-good-parts/</link><pubDate>Sun, 06 Sep 2015 00:00:00 +0000</pubDate><guid>https://davidhampgonsalves.com/java-8-the-good-parts/</guid><description>Sometimes I feel that Java has become a second class citizen on the JVM. While it commands a huge market share and is generally blazingly fast it hasn&amp;rsquo;t progressed like Clojure, Scala and even Groovy have. Java 8 delivered on some of the long planned features and this post is to talk about my favourites.
Streams Java&amp;rsquo;s Streams are monads that let you represent computations as a chain of steps. Typically they are created from a Collection and then the typical functional map, reduce, filter, etc functions are applied to achieve a desired transformation.</description></item><item><title>Failed Projects: Open Mosaic</title><link>https://davidhampgonsalves.com/failed-projects-open-mosaic/</link><pubDate>Sun, 02 Aug 2015 00:00:00 +0000</pubDate><guid>https://davidhampgonsalves.com/failed-projects-open-mosaic/</guid><description>The goal of this project was to recreate an image as a mosaic of other images. I wanted to achieve this with a low number of tiles and not simply use images as pixels based on their colors.
Mistakes The biggest mistake I made was to vastly underestimate the difficulty of the problem. I thought I could get good results by tuning my early histogram grid implementation and floundered. I have seen many other attempts at this project but yet to see any that produce good results.</description></item><item><title>Generating Identicons</title><link>https://davidhampgonsalves.com/generating-identicons/</link><pubDate>Tue, 19 Nov 2013 00:00:00 +0000</pubDate><guid>https://davidhampgonsalves.com/generating-identicons/</guid><description>Identicons are icons that are generated from some form of user information. They usually serve to fill the gaps left by photo-less users that don&amp;rsquo;t provide a photo as unique(ish) identifiers for users.
These are usually generated by hashing the chosen user data and then using that hash to flip image pixels on and off. The following code snippit is a Java implementation of this concept and generates a 5*5 pixel, horizontally symmetrical identicon much like the ones github recently rolled out.</description></item></channel></rss>