Tales from the jar side: An actual sale, and writing for rejection
Welcome to Tales from the jar side, the Kousen IT newsletter, for the week of November 17 - 24, 2019. This week I added a new post to my blog that included info about my Kotlin Cookbook, closed on a Groovy training course, wrote a contribution for a book that almost certainly will not be accepted (!), and worked on my Managing Your Manager book.
Humor. What A Concept
First, I have to mention something that came up during my JUnit class last week. I was showing how to test for exceptions. To do so, I created an array with six elements and tried to access index number 99, which threw the expected ArrayIndexOutOfBoundsException.
(Yup, that's the actual class name. Some of my other favorite Java exceptions are, and these are all real:
TooManyListenersException, which I always mention during my popular talks
UnsupportedFlavorException, as though chocolate and vanilla are fine, but no strawberry or else
UnsupportedLookAndFeelException, which definitely could get you sent to HR
CloneNotSupportedException, bio-ethical implications being what they are and all
GeneralSecurityException, when something goes wrong but we can't be specific
IllegalStateException, which for me, being from Connecticut, means New York
My favorite Error subclass, like everyone else's, is ThreadDeath. Usually by starvation. Aren't computers evil?)
Anyway, when I accessed element 99, the expected exception was thrown. A friend in class suggested I try 86 as well, and I immediately got the Get Smart reference. I laughed about it, and someone else in class responded with "Sorry about that, Chief", which was awesome.
I realized later, however, that that was a perfect opportunity for some Millenial in class to toss out an Ok, Boomer, and I would have had no defense whatsoever. Talk about a missed opportunity. Oh well. Maybe next time. I only hope that when a Millennial does manage to say it to me, that they accompany it with a really exaggerated eye roll, because of course.
Table of Contents == A Blog Post
Last week I received an email that read, in part:
"I couldn’t find one [a table of contents for the Kotlin Cookbook] on the O’Reilly site or on Look Inside on Amazon. Is there one somewhere I could look at? They tend to be really useful for evaluating cookbook purchases."
That is, of course, an entirely reasonable request. I checked, and at the time the questioner was right -- the list of recipes wasn't available. Since then, the "Look Inside" feature on the book page at Amazon has been updated (whew) and does include both the preface (with the chapter summaries) and the table of contents.
Nevertheless, that felt too inconvenient for people who needed to see them, so I decided to add another post to my blog:
https://kousenit.org/2019/11/20/annotated-toc-for-kotlin-cookbook/
Creating that post turned out to be easier than I expected. I was able to copy and paste from my PDF version of the book into the WordPress editor, and it mostly worked, with just a moderate amount of clean-up necessary.
When the post was published, I replied again to the original email, and got this in return:
"The TOC looks good and I appreciated your following up with me. I purchased a kindle version about 5 minutes ago and just used your elapsed time recipe to instrument some code. :)"
That was cool, and I said so. It wasn't until a few hours later that the real meaning of that post hit me. My book -- at least the Kindle version -- is now available, and it just sold a copy. That's ONE!
I can't help wondering if the person who asked was actually the first sale, but I have no way of knowing that.
As it happens, later in the week I dropped by my local Barnes & Noble in Glastonbury, CT. I don't go as often as I used to because the store has evolved into as much of a toy store as a bookstore and the noise levels have gone up accordingly, but I was in the area. I even had my headphones with me, so I could do some actual work on the Managing Your Manager book.
I know I'm setting myself up for pain, but I decided to ask if they could order a couple of copies of my Kotlin Cookbook, which I could sign and let ferment in the store over the next few months. It turns out that they can't order a book until it is officially released, and in their system the release date is December 10.
The actually release date is apparently December 10, after I get back from KotlinConf. Good to know.
So I guess after that I'll go back and try again. I have a long history with that store. I got them to order copies of all three of my previous books, which I signed and saw on the shelves, but I don't think a single copy of any of them has sold. Still, it's nice to see your name on a book on an actual shelf, even if I have to ask them to put it there. Maybe this time it will be different.
(Narrator from the future: This time wasn't different. Sorry.)
97 Things, None Of Them Groovy
Speaking of email, last May I received an email from an editor at O'Reilly Media that began:
"We are happy to let you know that we are in the process of developing a new book this year, 97 Things Every Java Programmer Should Know. This project is a collection of Java programming pearls of wisdom collected from leading Java practitioners like you."
Yeah, now I'm a "leading Java practitioner". Of course, that reminded me of the original Shrek movie (the good one) and this nice moment between Fiona and Donkey:
I believe I suffer less from impostor syndrome than most people, but even I have my limits. Since my primary day job is teaching technical training classes, I sometimes experience what I call the Instructor Problem: I know the "right way" to use a language, but since I can't point to hundreds of thousands of lines of code I've written for industry, I worry about both my credibility and whether I really know anything. There's no substitute for "real world" experience, right?
Well, yes and no. Real world problems get complicated fast, and their solutions always involve trade-offs and compromises. Often the actual code in industry is a series of kludges that seemed like a good idea at the time but are now long-term maintenance problems. Plus, the solutions often involve internal political decisions that have nothing to do with the technology. Sometimes the code consists of answers from Stack Overflow that were copies and pasted without any real understanding of what they do -- which happens more often than you would like to think. Finally, there's a big difference between ten years of experience, learning and growing along the way, and one year of experience repeated ten times.
All of those are true, but I still worry. I've been at this long enough, however, that I've built up enough of a base of successes so today I worry a lot less than I used to.
When I received the invitation, I thought maybe I could participate. I don't favor the "pearls of wisdom" approach, but it's not like I can't generate the required 450 to 550 words at the drop of a hat, right?
(Waves vaguely at the newsletter you are currently reading...)
My problem at the time was that I was wrapped up in my Kotlin Cookbook, among many other things, and didn't want to change gears to put together a Java contribution, especially when they didn't want any source code. I tried to come up with something, but it didn't work out. I figured the project was over.
On November 12, however, I saw a tweet from Trisha Gee soliciting contributions for the same book. I like Trisha. She's a Java Champion and a developer advocate for JetBrains, and she was nice enough to contribute a foreword for my Modern Java Recipes book.
Since I had no desire to be one of 97 co-authors, especially when no compensation was involved and I wasn't sure I had that much to say anyway, I thought about what i could do that would be different. I eventually decided to ask Trisha if she would accept any Groovy or Kotlin submissions. She said sure, so I started thinking about it.
Given vague criteria like that, my mind can go to some strange places, and they almost always involve rather silly humor. I generated a few paragraphs right away that involved parsing XML, Marvel's poor attempt at diversity by including Black Widow in the Avengers, Hypermedia As The Engine Of Application State, and a quiz whose rewards included a Participation trophy and a "Gentleman's B" that you could argue up to an A-.
Unfortunately, however, it didn't make sense. I couldn't find a way to tie it all together that was even moderately coherent and maintained the humor without coming across as too contrived.
I didn't exactly give up, but I threw out what I had (actually I saved it for another "opportunity") and started over. What I eventually wrote was a dialog between a developer and his boss, who showed him how to use Groovy to solve all his problems quickly and easily. It worked, but to be honest, it's more of a blog post than than an appropriate submission for the book. It also came out way too long, even without the source code. I won't be at all surprised if the editors decide to reject it, and honestly that's fine.
To be honest, the most notable part of the whole experiment was that I was willing to write whatever I wanted (as long as it worked) and not worry too much about how it would be received, much less approved. That's really different for me, and shows a level of confidence that I didn't expect. That was pretty sweet, actually. We'll see how long it lasts. :)
I really enjoyed getting back to Groovy again. It's been a while since I've had a reason to do that. No Groovy talks have been scheduled on the NFJS tour for a couple of years now, and the Groovy course I used to offer on Safari is no longer being scheduled. Plus I've been living in the Kotlin world for the last couple of years, both on the tour and while trying to finish my book. But Groovy has always been my first love (if you don't count Java, I guess) and it's fun to revisit. Assuming the submission is rejected, I plan to flesh it out and add it to my blog. That will be the subject of a future newsletter if it happens.
On a related note, I got contacted by a new client who needed Groovy training. We negotiated a price and schedule and it looks like I'll be doing that in January, which is truly sweet.
Finally, this week I started revising a chapter in my Managing Your Manager book, involving the Iterated Prisoner's Dilemma. I've discussed that in earlier newsletters, but I'm sure I'll have more to say about it as I go along, applying relevant strategies to the employee-manager relationship. I'm starting to shift gears from Kotlin to the new book, so that will no doubt show up here more often.
Last week:
Blog post: Annotated TOC for the Kotlin Cookbook
Submitted a very unlikely piece for 97 Things Every Java Programmer Should Know
Closed on a private Groovy training course for January
This week:
Record a Groovy Podcast. For realsies. I mean it.
Finish a chapter of Managing Your Manager
Happy Thanksgiving!