Ken Kousen
Ken Kousen
@kousenit@kousenit.org

I am a Java Champion and the author of the books “Mockito Made Clear” and “Help Your Boss Help You”, (Pragmatic Bookshelf), “Kotlin Cookbook”, (O’Reilly Media), “Modern Java Recipes” (O’Reilly Media), “Gradle Recipes for Android” (O’Reilly Media), and “Making Java Groovy” (Manning), as well as over a dozen video courses at Safari Books Online. I’m a regular member of the No Fluff, Just Stuff conference tour and have given talks all over the world. Through my company, Kousen IT, Inc, I’ve taught training courses to and worked with thousands of developers.

241 posts
8 followers
  • If a method arg is a closure, for crying out loud pass it a closure

    This is a (mildly) embarrassing post, because it demonstrates how in my transition to functional programming I missed something important. I get it now, though, and I might as well help others avoid the same mistake I made. I teach a lot of Grails training classes, and one question that always comes up is how…

  • Now Co-Hosting the Groovy Podcast…

    When I first starting learning Groovy in a serious way, one tool I enjoyed was listening to the Grails Podcast. Glen Smith and Sven Haiges led a discussion about Grails-related issues on a regular basis. Of course, since they talked about new developments in Grails, they also had to cover new developments in Groovy, so…

  • Groovy/Grails – Pivotal == Opportunity

    The news broke this morning that Pivotal plans to withdraw its financial support from the Groovy and Grails projects by the end of March, 2015. The heads of both projects, Guillaume Laforge and Graeme Rocher, have each blogged about it, with their typical grace, thanking Pivotal for the opportunity and assuring everybody that both projects…

  • Spaceships, Elvis, and Groovy inject

    When I first started learning Groovy, I took to collect pretty quickly. The current trend of adopting “functional programming” practices works well in Groovy, though the names of the methods are somewhat surprising. For example, collect is like map, findAll is the equivalent of filter, and inject is the proposed replacement for reduce (or whatever…

  • The Reason The Internet Was Invented, or, Cat Pictures FTW

    I’ll report about the SpringOne2GX conference soon, but I’m fighting a cold at the moment and the medication has put me in a rather bleary state. Thus, the following bit of random Groovy whimsy… In this post, I’ll use Groovy to access a publicly available RESTful web service, parse the downloaded data, and build a…

  • SpringOne2GX, Day Minus 3

    Yes, that’s a minus sign, because the event in question hasn’t happened yet. This is my first report from the upcoming SpringOne2GX conference, which starts in Dallas, TX next Monday, 9/8/14 (or 8/9/14 for my non-US-based friends). Since there are no talks on the opening day (just an opening keynote and reception), I’m arbitrarily designating…

  • Responses to “The Closure Of No Return”

    I knew as soon as I wrote about implementing a simple prime number algorithm using Groovy that someone would find a more elegant way of solving the problem. In this post, I want to highlight some of the responses I received. In my previous post, The Closure Of No Return, I discussed implementing an isPrime…

  • The Closure Of No Return

    Even in a language like Groovy that is normally so clean and intuitive, there are traps for the unwary. I fell into one again today (in front of a room full of students), and I think it’s high time I documented it, at least so I’ll remember it for next time. I’m teaching a Groovy…

  • Start With A Story

    Way back in the early 90s, I decided to revisit a notion I’d toyed with for years, which was to become a science fiction writer. As part of that effort, I subscribed to Asimov’s Science Fiction Magazine, which was (and is) the best short story market available. Back then, Isaac Asimov himself was semi-retired (he…

  • Groovy Groundhogs, revisited

    For those people in the U.S. who are concerned that this morning Punxsutawney Phil, the Seer of Seers, Prognosticator of Prognosticators, emerged, reluctantly, but alertly, and stated in groundhog-ese, “I definitely see a shadow”, let me allay your fears using Groovy: The result of that script is: There are 46 days between Groundhog Day and…