Java Lambda Expression Basics

Java 8 introduced Lambda expressions. Lambda expressions are a shorthand for implementing single method interfaces. By a single method interface, I mean something like the following.

package com.tgenedavis.lambda;

public interface Flower {
	public void bloom();

The interface Flower has a single method called bloom(). Before Lambda expressions, we could implement single method interfaces with an anonymous class or with a normal class.

Continue reading “Java Lambda Expression Basics”

Separation of Concerns

Separation of Concerns (SoC) is a principle of design used in computer programming. Separation of concerns results in modular programs. The idea of separation of concerns is that each part of a computer program should deal with one concern, and that each of those sections of code should be broken down into more targeted concerns, preventing the same module of code from addressing more than one concern at a time.

Concerns have different granularities, so that the 10,000 foot view of a solution will have separations that may be addressed by different company divisions, and more focused concerns would be addressed by teams of programmers, and so on down to the most granular of concerns being addressed by individual programmers or projects.

Continue reading “Separation of Concerns”

Functional Programming Primer

Functional Programming is the hot new keyword in the coding world. Look! We’re Functional! However, I’m pretty sure most people jumping on the Functional Programming bandwagon have no idea where Functional Programming came from, why functional programming is important, or why the lowercase greek letter lambda is splashed all over the covers of Functional Programming books.

Never fear! This is  your quick Functional Programming Primer. I’ll give you the 10,000 foot overview of the benefits of Functional Programming, along with its benefits, and even explain the origin of the lambda. Continue reading “Functional Programming Primer”