Skip to content

Stuff I've learned recently…

I teach this stuff. I didn't say I could do it.

  • Home
  • About Me
  • Groovy
  • Java
  • Kotlin
  • NFJS
  • Teaching
  • Silly GORM tricks, part II: dependent variables

    This post discusses a relatively simple topic in GORM: how to use dependent variables in a domain class. It’s simple in the sense that it’s been discussed on the mailing list, but I haven’t seen it documented anywhere so I thought I’d do so here. I started with a simple two-class domain model that I…

    Ken Kousen

    April 29, 2008
    Grails
    Grails
  • Silly GORM tricks, part I: Lists

    In GORM, when one class has a hasMany relationship with another, a java.util.Set is injected into the class. Sometimes, though, I want to use a List instead in order to maintain ordering. The Grails reference documents (see section 5.2.4 specifically) discuss how to do that, but there are other issues that I needed to solve…

    Ken Kousen

    April 22, 2008
    Grails
    GORM, Grails
  • assert != assertEquals (duh)

    It’s probably not great for my reputation to show how I made a very silly error, but since I did it so consistently I thought showing it might help somebody avoid it. My Groovy course materials consist of far more scripts than classes. That’s probably not surprising, given that teaching Groovy involves writing lots and…

    Ken Kousen

    April 4, 2008
    Groovy
    Groovy
  • Some notes about the Windows installer for Grails

    This isn’t really a problem, but I don’t think it’s documented anywhere, so I thought I’d record it here. (And by the way, if your reaction to my Windows-based comments is going to be “why not use something other than Windows,” my answer is (1) at least one of my machines is always running Windows,…

    Ken Kousen

    March 26, 2008
    Grails
    Grails
  • Integration tests of controllers in Grails

    The documentation on doing integration tests of controllers is a bit thin. I had to ask on the mailing list about how to do some of the basics, so I thought I’d make a record of the results here. First of all, Grails distinguishes between unit tests and integration tests, in that integration tests involve…

    Ken Kousen

    March 24, 2008
    Grails
    Grails
  • Using Groovy to determine Unicode characters

    (Technically speaking, this post doesn’t require Groovy. You could do the same thing in Java. Still, as usual, Groovy is easier.) I’m teaching a Groovy course this week and having a great time doing it. One of the exercises I put together is to create a concordance, which is a map relating individual words to…

    Ken Kousen

    March 20, 2008
    Groovy
    Groovy
  • Turning Java enums into Groovy ranges

    It turns out that it’s easy to turn a Java enum into a type that can be used in a Groovy range. Consider a simple enum representing the seasons: public enum Season { WINTER, SPRING, SUMMER FALL } Since enums implement the Comparable interface, they have a compareTo() method. Despite that, however, you can’t use…

    Ken Kousen

    March 19, 2008
    Groovy
    Groovy
  • Nothing makes you want Groovy more than XML

    I’m in Delaware this week teaching a course in Java Web Services using RAD7. The materials include a chapter on basic XML parsing using Java. An exercise at the end of the chapter presented the students with a trivial XML file, similar to: <library> <book isbn=”1932394842″> <title>Groovy in Action</title> <author>Dierk Koenig</author> </book> <book isbn=”1590597583″> <title>Definitive…

    Ken Kousen

    March 12, 2008
    Groovy
    Groovy, Java, XML
  • A few 2GX notes

    Late last night I returned home from the Groovy/Grails Experience (2GX) in Reston, VA.  I met many wonderful people and learned tons of new things, which I’m sure will spawn blog posts over the next few weeks. Just to get started, though, I thought I’d mention a few random observations from the conference. Buy Scott…

    Ken Kousen

    February 24, 2008
    Grails, Groovy
    Grails, Groovy
  • Additional comment about GRAILS_HOME

    Yesterday I commented on how I needed to change my GRAILS_HOME variable to point to the grails subdirectory of the grails-1.0 distribution. I did a bit more checking and discovered something interesting. I’ve been using the Windows installer for Grails. I like how it also installs links for all the JavaDoc documentation, how it includes…

    Ken Kousen

    February 22, 2008
    Grails
    Grails
Previous Page
1 … 12 13 14 15 16 … 24
Next Page

About the Blog

Stuff I’ve Learned Recently chronicles my adventures in the world of teaching software development, primarily focused on Java and related languages, like Groovy and Kotlin. I also teach Spring, Android, Gradle, and more.

Popular Posts

  • I Finally Understand What MCP Is ForJune 22, 2025
  • Sure, I’ll sign your ebookMay 28, 2025
  • Waiting for Spring AI Streaming Responses in JUnit TestsMay 27, 2025

Newsletter

Subscribe to our email newsletter for a weekly dose of travel inspiration.

Proudly powered by WordPress

Loading Comments...