Groovy
Apache's Groovy Gets a New Parser
@kenkousen would like this trivia fact:
The new parser was code-named "Parrot" because its creators originally intended its output to be "an exact echo of what the old parser produced"
It is worth remembering the features Groovy 3 adds:
Groovy 3.0 also comes with a number of Java-like features, including the control-flow do-while loop, enhanced for loop, with support for comma-separated expressions and multi-assignment statements, array initialization using curly brackets, Lambda expressions, method references, try-with-resources statement, anonymous code blocks, non-static inner class instantiation, and default implementation for interface methods.
Spock
Spock vs JUnit 5 - the ultimate feature comparison
@SolidSoftBlog compares both Spock and JUnit 5 in several areas:
- development
- learning curve
- tool support
- test structure
- exception testing
- conditional test execution
- mocking
- parameterized tests
- migration from JUnit 4
Tools
Bespoken
I am on a journey to learn Alexa Skills development and this is a tool I want to investigate further to declare test scenarios.
It's easy to unit-test your Alexa skills and Google actions with Bespoken.
Java
The Java lowercase conversion surprise in Turkey
Couple of days ago, a PR in the micronaut-security module pointed to something I did not know. toLowercase()
is unsafe.
The defensive code is to use toLowerCase(Locale)
instead.
@GaryGregory explains it with a tangible example.
Misc
Conventional Commits
I am trying to write better commit messages and conventional commits looks like a good and easy to implement structure.
The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of.
Example: Commit message with description and breaking change in body
feat: allow provided config object to extend other configs
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
Comment
It has been two months since I wrote you. I am sorry. I needed a break. I need to focus in family and work. I am fine. My family is fine.
In the beginning of the Covid-19 situation, I was a bit overwhelmed. However, I probably should have not been. The situation did not involved as many changes for me as it does for others. I already had been working remotely for a long time before Covid. I am used to stay at home. I like to stay at home.
OCI, the company I work for, is really flexible. To be fair with OCI, it was really flexible before the pandemia. My department, the Grails and Micronaut team, has been always remote. I have always valued that (remote and flexible work) from OCI. I like to wake up early and I sometime like work during the weekend. I have complete freedom to work when I can or when I feel more productive. We usually have some meetings around 16:00 Madrid (Spain) / 9 am St. Louis (USA). Those meetings aside, my work schedule is as flexible as I want.
Currently, I am taking advantage of this flexibility even more. Before pandemia, when my wife worked during weekdays, I will leave my small kid (2 year) with my parents and take the other one (5 years) to school. Then, I picked her up from school at 14:00, drove to my parents house, had lunch with the kids and my parents, went back to my house, worked until 18:30 - 19:00, and picked up the kids.
Now, when my wife works. I don't work. Spain situation is improving but we are still not seeing any of our families in person. I cover those hours in the weekends. It is been challenging but we are managing. I am reading less news, which is helping as well.
I have a lot of things to write about. So, forgive me if this issue feels a bit unconnected. Hopefully, in the next weeks I am able to write with a better structure.
I hope you are doing well.
Sergio del AmoLockdown Productivity: Spaceship You
Block 11 minutes and watch this video. It may help to deal with this situation.
This point resonated with me.
I exercised today for the first time in the past two months.
youtube.com