Posts

Showing posts with the label grails

QuickTip (Grails): Grails LinkGenerator

The Problem Recently, I was using the Grails Link Generator in a service.  I was using IntelliJ so as I added the dependency at the top of the class using the same name as the class. It looked something like this: package com.example import grails.web.mapping.LinkGenerator class ExampleService { LinkGenerator linkGenerator String doSomething() { ... } } It took me a long time to debug this. Luckily, I had written a test. There was no compilation error, but the test picked up that linkGenerator was null. Of course, I was stumped. I tried checking the mocks in the service and various other debugging strategies but had no luck.  I looked through tons of other examples online until I noticed the one small difference between my code here and theirs... the name! The Solution To make the LinkGenerator work correctly, it needs to be called grailsLinkGenerator exactly. Hopefully, if you come across this post because you made the sa...

No, It wasn't just about the travel

I haven’t talked about this for various reasons. From the comments I’ve received in the last week, it seems like continuing to hint at what happened rather than talking about it, and embarrassing people(myself included) has actually made the situation worse so here’s a collection of everything that happened from my point of view. The First Blog Post (Early March) So let’s begin with a blog post I published back in March.  The version there right now is not the original.  Originally, I had included a case study based on a conversation from Twitter about the low number of women who were applying at Gradle, Inc. I thought I was helping by showing that it wasn’t just a problem with Gradle, but in the entire community and trying to think of reasons why the numbers might be so low. Within 45 minutes of posting it, I had three different people harassing me via various communication methods about how it might be viewed as an attack on Gradle, Inc.  I had a lot of respect for...