Tales from the jar side: Dealing with stress, Learning Kotlin coroutines, and Remotely managing your manager
Imagine if your remote manager stressed coroutines. Yikes.
Welcome to Tales from the jar side, the Kousen IT newsletter, for the week of October 11 - 18, 2020. This week I taught an NFJS Virtual Workshop called Kotlin: The Basics and Beyond and an O’Reilly course on Functional Java. I also spent a lot of time preparing materials for an upcoming private course on Kotlin for Android Developers, and dug into a video course on Kotlin Coroutines from Udemy.
Before I get into that, however, I need to tell a small story.
Dealing with Stress
When I was at Princeton as a graduate student, there was a formal process for the Ph.D. degree. It all centered around a series of general exams, which students normally took at the end of two years. The test consisted of a three-hour oral exam broken into six half-hour blocks. In each block you defended the equivalent of two or three courses. In principle, the best preparation was to take those courses, but technically that wasn’t required. I wasn’t so foolish or arrogant as to skip the courses and then try to defend them (with one exception, which I’ll talk about at another time). While the the examiners were suppose to ask you questions covered by that material, they were free to ask anything they wanted
My purpose in bringing this up is not to talk about the actual exams, but rather to comment on the increasing stress leading up to the exam. That was probably my first experience a build up that long. I spent two full years working toward a single test on a single day, satisfying a whole series of requirements (there were several more than I didn’t mention), and everything came down to one three-hour block. If you passed, all you need to do was write and defend your thesis (right, that’s all), but if you failed, you were in trouble.
Normally if you failed, they gave you a chance to do it again in the Fall, but very few students did that. If you failed the second one, you were out. Most students who failed in the Spring wrote up their thesis as it was and settled for a terminal Master’s degree. That’s hardly a bad consolation prize, but at the time it felt like a potential nightmare.
I mean that literally. One day, about two weeks before the actual exam, several of us were sitting at the dining table in the graduate dormitory, when one student from the next year (who had already been through all this) said out loud, “so, have the nightmares started yet?”
Edvard Munch would like a word
Everyone in earshot gave a nervous laugh, followed by a lot of “wow, I thought I was the only one” comments. We all knew exactly what they meant. Think of the standard awful dream of taking a test you aren’t prepared for, combined with standing up in front of a crowd with no clothes on, and you’ve got the basic idea. The tension was awful and inevitable, and kept coming out is assorted subconscious ways. Some students broke out in hives. Some had stomach problems. Some isolated themselves and worked non-stop.
I used to go for long walks around the Institute for Advanced Studies, experiencing massive imposter syndrome and wondering how I would ever explain to my parents that I’d failed, knowing in my heart they would blame me for not working hard enough.*
*Yeah, there were success issues in my family that took me a long time to resolve.
Even today, decades later, I can reach back and touch the tension that grew day after day, as the deadline approached, for what was arguably one of the highest stakes events of my life. There was never enough time to learn everything that might be covered, but the deadline kept approaching, inexorably. I vacillated between wanting it to go away forever and wanting it to happen right away just to get it all over with.
Why bring this up? On a seemingly unrelated note, I just want to mention that the upcoming U.S. elections are 16 days from today. So let me be the one to ask: Have the nightmares started yet?
(Just to finish the story, I passed my exam, because if there’s one thing I’ve always been able to do is to talk about technical topics in front of an audience. I was hardly the best student in my year, but I managed to avoid sounding like an idiot and got enough questions right that I passed, which was all that mattered. After the exam, one of the examiners tried to explain a concept I’d gotten wrong to me in the hallway. He went on for a good ten minutes and I don’t think I heard a word of it. I was in my car and out of the state within the hour.)
Kotlin Coroutines
My book entitled Kotlin Cookbook came out last December, which is almost a year ago. I included a chapter on coroutines, which are cooperative functions that are able to run concurrently. Coroutines are one of the more popular features of Kotlin, and they’ve become the definitive way to run multiple tasks simultaneously. In the Android world, which has adopted Kotlin as the default language, coroutines are used to do anything time consuming, including make network calls or access databases, off the main user interface thread.
The deadline for my book was a hard one, and I had to scramble to add several sections at the last minute. The coroutines chapter was one of them. That wasn’t because I hadn’t put in the time — I spent weeks and even months digging into the details trying to understand them. It’s just that asynchronous programming is hard, and as useful as coroutines are, they involve a lot of moving parts and a fair amount of surprising behavior. What I wound up putting into the book was fine, such as it was, but I always considered it a minimum, and I never really felt comfortable with the subject.
This week I’m teaching a series of courses for a private client on Kotlin for existing Java developers with Android experience. That meant I absolutely have to cover coroutines, and I’m sure I’ll get some tough questions about them.
By coincidence, on Friday this week a developer named Lukas Lechner who writes blog posts about coroutines published a course on Udemy called Mastering Kotlin Coroutines for Android Development. As part of its initial offering, the course was available at a substantial discount.
I’ve never bought a course from Udemy, but I know about them. Their idea is to offer courses as an a la carte model. Rather than offer a subscription (though those are available for business), you buy only the courses you want. They make it easy to offer your own course there, too, but if you pick a popular topic you’ll be competing against everyone in the world who offered a similar course.
Needless to say, I bought the course. From Friday to Sunday I even managed to watch all 9 1/2 hours of it, and it was excellent. Lechner has a very dry speaking style and a pronounced Austrian accent (I dearly wanted him to say “I’ll be back” at the end of each section), but the content is what mattered and it was just what I needed.
As with anything that long, I’m going to have to go over it several times before it really sinks in. I’m glad there is a GitHub repository with the code. That’s the downside of video courses: they’re hard to search once you’ve watched them. There aren’t any printed materials, either. Fortunately I can mostly work out what I need from the code repository itself.
For what it’s worth, I’m not getting anything from endorsing this course. I’m not even connected to the author yet, though I hope to get in touch soon, but I found this course really helpful and the least I can do is share it.
Managing Your Manager
I mentioned in a recent newsletter that my Managing Your Manager book went out for its 50% (or more) review. The deadline for getting the feedback is this week. I’ve only received one review so far, but it was very positive. My hope is that once I get through my Kotlin course this week, I can spend time fixing up the book for early release. I’m offering the associated training course again on the O’Reilly Learning Platform on November 6, and I’d love to have the book available for ordering by then. We’ll see.
One topic I’ve written about but did not include in the book yet is the whole issue of remote work. There are entire books on that subject (one popular one is REMOTE: Office Not Required by the people behind the Ruby on Rails framework), and it seems silly to try to compete with that.
What I plan to say is how the recommendations in my book, which are all about building a constructive loyalty relationship with your manager so that you can get what you need when you need it, are affected by working remotely. One point I make is my suggested approach, based on a solution to the Iterated Prisoner’s Dilemma problem, requires your manager to consider your reactions when they make decisions that affect you.
In order for that to work, though, they have to be aware of you on a regular basis, and that can be difficult when working remotely. If everyone is remote, there is less of an issue because if a problem occurs the manager will automatically use whatever remote access is available to let everybody know. If everybody is local, they’ll just come out of the office and talk to people.
The challenge is if some people are local and some are remote. It’s too easy then for a manager with a problem to talk to the local people and never get around to notifying the remote ones. They should, but if you are one of the remote workers, you can’t rely on that.
Therefore, my recommendation is that you have to arrange periodic, regular meetings with your manager. If you can meet face to face, great, but if not, video is better than voice and voice is better than email. They need to see your reactions to their decisions, and you need an easy, low-stakes way to give your feedback.
There are many reasons to arrange for weekly or bi-weekly meetings with your manager, and working remotely doesn’t change that. It actually makes that a higher priority, because out of sight can be out of mind, and you can’t afford that.
Anyway, more about the book as we proceed to the next step in the next week or so.
This week:
Kotlin: The Basics and Beyond, NFJS Virtual Workshop
Functional Java, on the O’Reilly Learning Platform
Lots of Kotlin on Android studying and preparing materials
This week:
Spring MVC Fundamentals, on the O’Reilly Learning Platform
Kotlin for Android Developers, private class
Lots of work on Managing Your Manager
…