Author Archives: Derek Carr (zaphinath)

FirstOrDefault C# Lambda to Java 8 Lambda

Description While converting c# code to java there are several lambdas that c# has that were a little difficult to find a port to java. One of these was C Sharp’s FirstOrDefault lambda expression. Java has an equivalent stream. We can use the findFirst and if it doesn’t find anything then we can return a […]

C Sharp delegate function in Java

Porting from C# to Java – The Delegate The delegate function is kind of cool in C# land. It allows you to pass a bunch of functions as a parameter. Java has a handful of different ways you can do this. I personally like just passing an object that implements Runnable and then have an […]

Perfect WordPress Development Environment

WordPress Development Problem Anybody who has developed for php applications knows it can be tricky to have  the right environmental setup to do development work. I love WordPress, but it is no exception, until now . . . I found the fastest way to have a development environment for WordPress that can be blown away […]

Spring Rest Endpoint Test With MockMVC + ApplicationEvent

Problem Addressed In a service oriented architecture, known as SOA, we have several microservices that get regularly deployed. The  strategy and various needs of deployment of such services has already been solved by applications like kubernetes. From a quality perspective there needs to be a high level test after any service is deployed or any […]

Finally Can Sleep on a Noisy Street

Description My house is between a busy highway and a railroad. Living by a railroad doesn’t really bother me, but we have a street crossing really close to my house and by law railroads are required to blow their whistle for the international morse code “Q”,  which comes from the times when a queen would […]

How To Build An API

What is an API API stands for application program interface. In a nutshell an API is a way for external applications to access information and queries from your program. Twitter for example has a a REST API that allows you to access all types of data from twitter. REST API’s are among the most common types of […]

API Endpoint Testing With Groovy & Spock

There are several ways of making http requests through java and groovy. You can use anything from Netflix’s feign client to standard http url connection classes built into java. I have used many different classes/frameworks for testing system integrations. My favorite choice by far is to use either groovy’s http builder or another class that extends […]

Internet Explorer Bashing

Internet Explorer eats glue

The first development job I had was working for BYU’s Independent Study program converting lessons into website material. The bane our existence was Internet Explorer. Anybody who has developed javascript a few years ago knows that every version of IE had a different engine. The css is also rendered different for each version of IE. […]

Stupid iPhone keyboard layout

I have a terrible beef to pick with Apple Inc. I originally started switching to Apple’s products years ago because they spent time to quality control their hardware and software. I was so tired of spending time fixing my development environment just so I can write code. The iPhone was a natural progression of jumping […]

Using groovy closures in Spock where blocks

Groovy Spock vs Java jUnit Because Spock is just jUnit under the hood we can do everything we can in jUnit and more because Spock uses groovy. One aspect of the jUnit test framework that most people don’t take advantage of is using parameterized classes – making the test class be test driven. The best part […]