Posts

Never been promoted? You’re not alone.

I was chatting with some other women in tech about career paths and especially promotions. Most have said they had to change jobs/companies for a title bump. What about you? For Women Devs Only: Have you ever gotten a promotion (or title bump) at the company where you worked? — Jenn Strater (@codeJENNerator) February 7, 2020 At first glance, you might think 54% is ok. After all, a majority of the women surveyed say they’ve been promoted. If you read it again and think about the fact that it says EVER, it’s depressing. Many of the women who said yes have also experienced discrimination in at least one review. So if this keeps happening and you’re thinking maybe it’s just you, it might not be! I’ve been hearing more and more stories from women like myself with 10+ or even 20+ years of tech experience who switch jobs every 2 years because they can’t seem to get promotions any other way. It’s just heart-wrenching and, frankly, bad for business to keep losing employees and paying mor

7 Things I hope conferences change for 2019 and beyond

As a conference speaker, attendee, organizer for GR8Conf , and developer advocate for an organization that sponsors conferences, I get to see a lot of different sides of tech conferences from small, community-run events to large for-profit companies. No matter the size of the conference, there are some trends I've noticed over the years that I really hope we can change: 1. Stop making excuses for a lack of diversity There are now countless articles on how to make conferences more diverse. Really. Just search for it. Yes, there aren't as many women to speak/attend your event as men, but they do exist so at least make an effort. How much clearer do we need to be with conference organizers? Do not have an all male speaker lineup. It is not complicated. Don’t do it. Work harder to find women speakers. They exist, they are willing & able. There is simply no excuse for an #AllMalePanel #Manel @DianeSmithG https://t.co/eO0wuAgsbh — Dr Kirstin Ferguson (@kirstinfergu

QuickTip (Spock): Remember to add asserts when creating helper methods in spock tests

This is very similar to my blog post about  using .each in Spock tests . The Problem Having helper methods in a large spec is generally a good practice. For example, we use this pattern a lot is in testing lists of results. def 'test that does some stuff'() { given: String someFieldName = 'someOtherValue' when: List<SomeType> someResults = service.someAction(someParam) then: someResults.each { assertResultContainsAllTheseThings(it) } } . . . private boolean assertResultContainsAllTheseThings(SomeType result) { result.someFieldName == 'someValue' result.someOtherField == 'someOtherThing' result.someList.size() == 3 } I've run into lots of problems with tests not failing when they should have because I forgot to do this. The Solution If you can already tell what's wrong with this code, congrats! If you can't, when copy pasting that original check from the then block into

The journey to a BMI of 29

Image
If you are only interested in my tech blog, then skip this one. It's a personal story. Back Story A few weeks before I left the US for Denmark in the summer of 2016, I hit the highest weight I've ever been and a BMI of 37.4. I still thought I was pretty healthy though. After all, I was walking 5 miles (8 km) a couple times a week and biking 5 miles (8 km) to/from work once a week. 🤦‍♀️ Although there are no full body pictures from that time, I do have a picture from my first few days in Denmark(red shirt/left). I distinctly remember trying on several outfits that morning and those were the only pair of shorts I had that fit. And by this point, I'd already lost 5 pounds (2.25 kg) during the move. Moving to Denmark and living on a very strict student budget meant making some major changes to my life. I no longer had a car to drive everywhere. I had to walk to/from public transportation. I no longer had money for restaurants and fast food and had to buy my own groc

Getting Started with Groovy Applications and the Gradle Init Plugin

Image
When working with groovy, there are several ways to get started.  Most tutorials, including my own workshops, use the GroovyConsole as a way to write small scripts and then save them to run later. What comes after that though? How can one build a slightly larger example without all the excess of a framework like Spring Boot or Grails? With this article, I will show you how to use the Gradle init plugin to create a small runnable, testable Groovy application. Before we start you should have a local installation of Gradle 4.0+. If you don't have Gradle installed or your version is less than 4.0, I highly suggest you manage your Gradle installations with  SDKMAN . In a clean directory run the following command:   gradle init --type groovy-application After running that command, you should see several new files. The Gradle files are for building and running the project and your project code will be in the src directory. To start working open the project in an IDE

QuickTip (Spock): Stubbing with null

This is less of a problem and more of a code style thing, but I noticed recently that some of our Spock code has several instances of >> null. For example: ... then: result 1 * service.doSomething() >> new Blah() 1 * service.doSomethingElse() >> null ... It's nice to see that the interactions are written in the same style, but for many methods 1 , Spock returns null by default so writing the >> null is redundant and I prefer to remove it. Do you agree or not? Feel free to comment below. If this is something we agree on, perhaps it should be a new codenarc rule.

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 same error, it will save y