Kotlin, MYM, and more; Tales from the jar side, week of January 20 - 27, 2019
Welcome to the Kousen IT newsletter, "Tales from the jar side", for the week of January 20 - 27, 2019! I have way over 100 subscribers now, by which I mean 109.
First things first: I talked to some people at O'Reilly, and it looks like the name of the site that replaces Safari will be called the O'Reilly Learning Platform (OLP). Not a huge surprise, frankly, and there's no official announcement yet, but I think I'll start using that name both here and in classes until someone says otherwise.
On to the bigger news for this issue, which is that I'm working on a Kotlin book.
Cooking with Kotlin
The new book will be called Kotlin Cookbook, and it will be published by O'Reilly Media. The idea is that while there are several basic Kotlin books on the market that try to teach you the fundamentals, my book is more about how to use the language to accomplish whatever you need to do. The intention is to make a practical book that will be complimentary to the existing books, rather than a competitor.
Back in 2016, I wrote a book called Gradle Recipes for Android, which was published by O'Reilly Media.
(If you're interested, you can download that book for free from Gradle, Inc, at https://gradle.org/books/, for the low, low price of your email address and the risk they might try to market Gradle Enterprise at you.)
Then in 2017 I thought, "Hey, why not write another recipe book for the same publisher? How hard to could that be?", and Modern Java Recipes was born.
(As you might expect, the answer to "How hard could that be?" turned out to be, "Very hard. Very hard indeed." But it was worth it, and I like the result.)
For the past year or so I've been digging heavily into Kotlin, for two reasons:
Kotlin is the definitive language now for Android development
As of version 5.0, Gradle now provides a Kotlin DSL (domain specific language) for the build files
In other words, two of the technologies I spend a lot of time on and for which I teach a lot of classes both decided to use Kotlin in a big way, so I really needed to learn it. I've therefore spent a lot of time digging into the language. I read most of the Kotlin in Action book (at the time, the definitive reference for the language), and last year I gave a basic Kotlin talk on the No Fluff, Just Stuff tour many times. That will continue this year, along with a new, more advanced talk.
I also got the opportunity to be a tech reviewer for an upcoming O'Reilly book entitled Head First Kotlin, by Dawn and Dave Griffiths. The Head First series has been very successful, and I really liked the Griffith's previous book, Head First Android Development. The new book gave me a chance to go through the language yet again, from another perspective. Their book, btw, just got turned in for final production, and should appear in March.
Finally, I talked to the people at JetBrains, Inc., who created and manage the Kotlin language and who produce the most important integrated development environment (IDE) for all the languages I use, IntelliJ IDEA. They also work closely with Google to produce Android Studio, the free, scaled down version of IntelliJ that is the only officially supported IDE for Android.
It turns out that JetBrains was in the process of revamping their partnership programs, and I had the opportunity to spend a couple of weeks working on an extensive take-home test they sent me.
(I'm not kidding about the word "extensive". The test had over 70 questions, very few of which were trivial. Since I wanted to get them all right, it took me roughly two weeks, working a couple of hours a day, to complete it.)
The result is that as you'll find me listed here, as one of only six officially certified Kotlin training partners.
All of which brings me back to my new book, Kotlin Cookbook. I've been cranking away on it, but if you read between the lines above, you'll discover that while I have a lot of book knowledge about the language, I'm somewhat limited in my experience with it. The whole purpose of my new book is to provide that experience to others, which means I've been both writing a lot of code and doing a lot of research to find the most correct, idiomatic way to solve problems in Kotlin, and that takes time.
For those who might be interested, the Kotlin Slack channel has been very helpful in that regard. Questions people ask there give me an idea what I should include, and the answers show me what experienced Kotlin developers recommend. Most of the answers I've seen have been sufficiently generic that I haven't needed to add reference links in my recipes to them, but I will add them as necessary.
Working on this book does have one (semi-)serious downside. For the past couple of years, my co-host on the Groovy Podcast, Baruch Sadogursky, has been calling me "Kotlin Ken" because of the natural alliteration. A few other "funny" members (i.e., they think they're funny) of the Groovy community have done the same. I'm afraid writing a Kotlin book isn't going to help that situation.
Still, the results will be worth it. I guess I might as well, as they say, own it.
So far I've accumulated about thirty recipes for the book, which will probably have around 80 when complete, though these things tend to grow over time. I'd like to be about halfway done by the end of the month, which is pretty ambitious, but it's not like I have anything else going on in my life, right?
Your Manager's Agenda
Oh yeah, I'm also working on a book with the working title Managing Your Manager. That book is also headed for its first milestone review, as I mentioned in the last newsletter. This week I spent time on the introduction. For the record, I don't really like doing that. I prefer to write the intro at the end, after I already know what the book says.
As an aside, that's how I preferred to handle performance reviews, too. My boss would ask me to write up what I did during the year as part of the evaluation process. I would then put together a document of accomplishments and add my goals, which correlated suspiciously well with my accomplishments, adjusted to be slightly less ambitious, so somehow I always managed to exceed the goals. Sometimes I would get away with that. Either way, it was another survival skill for the business world.
As part of the introduction, I talk about how you have an agenda for your job, your career, and your life. Your manager also has an agenda. Those form a Venn diagram vaguely resembling this one:
There is an overlap, or we wouldn't be working together at all. But the other parts happen as well, and it's easy to see when they can arise. The fact that the two agendas don't perfectly overlap is the cause of many issues. In fact, there is a third agenda as well -- that for the company itself, but as managers rise through the ranks, their agendas tend to match the company's agenda more and more closely. All of this is discussed in the book.
I also talked about the Dunning-Kruger effect, which is the psychological phenomenon where someone with limited ability thinks they're awesome. That lead to two jokes, one of which I could use in the book and one of which I can't. See if you can tell which is which:
Joke 1:
"The Dunning-Kruger effect is where people think they're great at something despite all evidence to the contrary, and that's all I'm going to say about our present political situation."
Joke 2:
Me: The problem with the world is that idiots are so sure of themselves, while smart people are so full of doubts.
You: Do you really think that's true?
Me: Absolutely!
(The answer, of course, is 1. I actually did add it to the current text, with a note to the editor that I was going to take it out, but then I came to my senses and removed it.)
The Gradle Will Rock
Roughly every other month I teach the online Introduction to Gradle class for Gradle, Inc (that link is to the next offering, in March). The class takes four hours a day on two consecutive days, and is scheduled for 8:30 am to 12:30 pm Pacific (!) time. That makes it 11:30 am to 3:30 pm my time, which is right in the middle of my day.
I like teaching that class, and this time was no exception. Since the price is right (it's free) for the attendees, we get a lot of developers from all over the world. I always get a kick out of that. In both that class and in my Safari (oops, I mean OLP) classes, I meet people from pretty much everywhere. That's an opportunity I never would have dreamed of when I was back in school (and dinosaurs roamed the Earth).
That also gave me a chance to upgrade everything to the latest version of Gradle, 5.1.1. That didn't affect the class, which concentrates on the fundamentals that work for all recent versions, but I was able to make sure all my old builds were still working. It turns out the made a chance to the properties in the build scan plugin, but I could handle that much.
At some point, I imagine they'll want that class delivered in Kotlin, but not yet. When they ask, given my current activities, I expect to be ready.
Last week:
Taught the online Introduction to Gradle class for Gradle, Inc.
Taught my Spring and Spring Boot class online on OLP.
Next week:
Functional Java two-day online course on OLP
Reactive Spring one-day online on OLP
Managing Your Manager (!) one-day online course on OLP, which may be the last time I teach it before I have a draft of the book