3 Ways to Skin a Fibonacci

September 11, 2011

Fibonacci sequences and their calculations are always an interesting computer science question and sometimes even an interview question. There are endless ways to calculate a fibonacci value and mathematicians way smarter than I am have much better ways. This is really just a blog post on three simple Java-based solutions. In no way is this [...]

1

Easy REST: Groovy, Grails, and JAXRS

August 8, 2011

I needed an easy way to get an API up and running for a project that exposed JMX as an API (in order to easily interoperate with non-Java clients [ie: iOS…more details coming]). There are a variety of tools, resources, languages, etc to do this, but the one that I found easiest was via Grails [...]

3

Java: Understanding Generics, Type Erasure, and Bridge Methods

June 24, 2011

Generics is one of the more prominent features from JDK 5 that allows you to basically specify the type as a parameter. For example, in JDK 1.4, a List was always a List of Objects. If you wanted to get something out of the list, you had to cast it. JDK 5 helped to resolve [...]

2

Code Generation Synopsis

June 21, 2011

One of the areas I have dug into lately is around code generation and class file manipulation. It’s actually quite amazing how much you learn and understand when you begin to understand what the JVM is doing and how class files are constructed. Even though on a day-by-day basis, class generation is rarely used, it [...]

1

jQuery Mobile, Grails, GAE, Oh My!

June 19, 2011

I recently decided to sit down and play with jQuery Mobile and absolutely fell in love with it. I’ve been designing web applications for years, but the pure simplicity in jQuery Mobile is absolutely amazing. The one part I’ve never been good at is graphics with respect to web design. jQuery Mobile removes that requirement [...]

0

Using Grails with CDI/Weld

March 4, 2011

Two of the libraries I’m most interested in lately are Grails and CDI/JSR299 (Weld being the implementation). The problem is that the two are really not compatible directly with each other. First, CDI is a JavaEE6 technology requiring a compliant container (ie: Glassfishv3) whereas Grails can run in any servlet container (plain ol’ WAR). Second, [...]

0

Project Lambda: Closures, Extensions, Mixins, Oh My!

January 5, 2011

NOTE: Documentation and code presented here is based on living and changing documentation by the JSR committee and subject to change causing this article to be inaccurate or outdated. I am also not affiliated with the JSR or its members. This blog article is probably a bit premature being it is centered around JDK 8, [...]

0

Java Performance: Map vs If/Else

December 17, 2010

I came across an interesting javascript article the other day on how not to write javascript: Google Closure: How not to write JavaScript The interesting part of this article that caught my eye was using a map instead of a switch or if/else statement to check for string comparisons. This got me thinking of whether [...]

2

Building Annotation-Driven Configuration

December 7, 2010

In the last few years, annotation-driven libraries have been on the rise in new and even existing libraries. Rather than use configuration files such as XML or properties, libraries now make use of annotations in JDK 5 to mix the configuration directly inline with the code. This simplifies the configuration by not having to maintain [...]

0

Creating Transactional Proxy Classes

July 10, 2010

One of the frequent patterns I make use of for Java backend systems are transactional code blocks, and not transactional in the sense of JPA, Hibernate, Databases, etc. I mean generic transactional blocks in which you have to wrap a piece of code with a begin and end block. For example, JPA is just one [...]

2