Home » Author Archives: Alex Staveley (page 2)

Author Archives: Alex Staveley

Scala pattern matching: A Case for new thinking?

scala-logo

The 16th President of the United States. Abraham Lincoln once said: ‘As our case is new we must think and act anew’. In software engineering things probably aren’t as dramatic as civil wars and abolishing slavery but we have interesting logical concepts concerning ‘case’. In Java the case statement provides for some limited conditional branching. In Scala, it is possible ...

Read More »

Scala: Collections 1

scala-logo

This post contains some info on Scala’s collections. Problem? We want a function that will take an List of Rugby players as input and return those players names that play for Leinster and can run the 100 meters from the fastest to the slowest. Step 1: Have a representation for a Rugby player. Ok so it’s obvious we want something ...

Read More »

Scala: call me by my name please?

scala-logo

In Java, when frameworks such as log4J became popular in Java architectures it was a common occurence to see code such as:                   if (logger.isEnabledFor(Logger.INFO)) { // Ok to log now. logger.info('ok' + 'to' + 'concatenate' + 'string' + 'to' + 'log' + 'message'); } It was considered best practice to always ...

Read More »

Scala: Do you partially understand this?

scala-logo

Nearly everyone who learns Scala can get confused over the word partial used in the contexts: Partial functions Partially applied functions Let’s look at both. Partially applied functions Scala gets its functional ideas from classical languages such as Haskell (Haskell 1.0   appeared in same year as Depeche Mode’s Enjoy the Silence and Dee Lite’s Groove is in the Heart ...

Read More »

Scala function literals

scala-logo

Functions are an important part of the Scala language. Scala Functions can have a parameter list and can also have a return type. So the first confusing thing is what’s the difference between a function and a method? Well the difference is a method is just a type of function that belongs to a class, a trait or a singleton ...

Read More »

Is Java Dead or Invincible?

java-logo

Writer Isaac Asimov once said that ‘the only constant is change’. That isn’t just a phrase in the software industry, it is an absolute fact. Once, there was a day when Corba was king but it was usurped by Web Services. Even within the world of Web Services, that used to be all about SOAP but now it’s REST style ...

Read More »

Code reviews in the 21st Century

software-development-2-logo

There’s an old adage that goes something like: ‘Do not talk about religion or politics’.  Why?  Because these subjects are full of strong opinions but are thin on objective answers. One person’s certainty is another person’s skepticism; someone else’s common sense just appears as an a prior bias to those who see matters differently. Sadly, conversing these controversial subjects can ...

Read More »

Extending your JPA POJOs

eclipselink-logo

Extensibility is an important characteristic in many architectures.  It is a measure of how easy (or difficult) it is to add or change functionality without impacting existing core system functionality. Let’s take a simple example.  Suppose your company have a core product to track all the users in a sports club.  Within your product architecture, you have a domain model represented ...

Read More »

Make your JAXB cleaner with the MOXy implementation

eclipselink-logo

The principle advantage of using JAXB when marshalling and demarshalling XML is the programming model. Simply annotate a few POJOs and use the JAXB API’s and you can serialise to XML and deserialise from XML very easily. You don’t need to worry about the specifics regarding how the XML is marshalled / unmarshalled. Everything is much simpler than alternatives such ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close