Tales from the jar side: Training courses, a Java puzzler, and How I Got Here
As the Talking Heads song goes, you may ask yourself, how did you get here? As for me, I don't live in a shotgun shack, but I do have a beautiful wife. Some of the rest of the story is below.
Welcome to Tales from the jar side, the Kousen IT newsletter, for the week of May 9 - 16, 2021. This week I taught my Managing Your Manager course and the first day of my new Spring Boot in 3 Weeks course on the O’Reilly Learning Platform, and taught my Modern Android Development virtual workshop for NFJS. In addition, the draft complete version of my book Help Your Boss Help You went out to reviewers for feedback.
If you are not a subscriber, please consider becoming a jarhead using this link:
This Week In Training
The Managing Your Manager course went well, though I really need to update my slides to reflect the latest version of the book. What I mean is, I understand what I’m trying to say better now, so the slides should reflect that. They work as they are, fortunately, but they could be better.
At least I did manage to remember to mention that the book was in the midst of a 50% off sale that ended Friday. I don’t know if anybody bought it, but I didn’t want anyone to miss the sale if they were planning to buy the book.
The Spring in 3 Weeks course is part of a new experiment on the O’Reilly Learning Platform. I took my Spring and Spring Boot fundamentals course and my Spring MVC course and merged them together, teaching them as one day a week for three weeks. My friend Dan Vega was kind enough to build some exercises based on the internal katacoda system inside the platform, which I gave to the students to do between the sessions.
Unfortunately, when I started the course I discovered that for some reason it was only scheduled for three hours each week rather than four, and the course already had too much content for four hours. I discovered later that was a mistake — the course was supposed to be four hours each week. But the students who signed up were (and presumably are) expecting only three hours, so that’s what I have to give. I’m talking to the people at O’Reilly to see if there might be some way to adjust that for the remaining two weeks or if I can add a fourth week, but there really aren’t any good solutions that will accommodate everybody. I’ll plan to stick to the limit and do my best.
The good news, of course, is that the platform is a subscription model, so anyone who wants to can take the course again if they feel like it, at which point we’ll have adjusted the hours. The first day did go well, just shorter than I anticipated.
Finally, my Modern Android NFJS virtual workshop mostly went well, but again there were issues. The biggest problem is that Google I/O is actually this coming week, Tuesday through Thursday, and I expect many announcements regarding Jetpack Compose during that conference. That’s going to fundamentally change how Android apps are built (again), but this change looks like it might be really favorable. At minimum, Compose seems to eliminate the abomination that is the RecyclerView component, which is still way too complicated for what it does.
The point of my course was to show how the development model has changed, based on the Guide to Application Architecture:
The course I now have promises to introduce the students to ViewModel, and the Repository abstraction, and the Room object-relational mapping approach, and the Retrofit library for networking, among others. I did that, but I still don’t feel I did it well. I have demos that work, and I’ve come up with the simplest example I’ve been able to create that combines data binding, ViewModel, and LiveData (see this GitHub repository), but it still feels too complicated. I wish I could simplify it, but at some point I have to acknowledge maybe it’s not me — maybe this stuff is just complicated. I hope Compose will make a big difference. We’ll see.
As part of the course I showed the students the slides from Lesson 8 on App Architecture from this page. That went pretty well, but when I tried to walk through one of the code labs at the end, it all got bogged down again. Sigh. Lesson learned. I should have stuck with the classic Android Room with a View codelab that they often recommend, though even that isn’t trivial.
The good news is the students were very kind, and the other stuff I did during the workshop came out well, so hopefully it was all good.
Tricky Java Issue
This week I’m teaching my Functional Java course again. Last Monday, however, Lukas Elder posted this tweet:
If you’re a Java developer, I should mention that before you get to the actual issue, the toList method was added to the Stream interface in Java 16. If you’re on a version earlier than that (like basically everybody in the industry), just replace that line with .collect(Collectors.toList()), which does essentially the same thing.
Everything I know suggests the answer should be “fff”, but that’s not the case. In fact, the code prints a single “f”, but I had to run it to be sure. I didn’t understand what was going on, but I added a few print statements to see how it worked. It turns out when preparing to execute the stream, the f() function is evaluated before any data is pulled through the stream. Evaluating the f() function prints “f” and returns the method reference to the toUpperCase function, which is then used inside the stream. The stream data is processed element by element, converting each letter to its capital version.
Ugly, but it makes sense to me now. I’m not going to be using a trick like that in any of my training courses, however — it’s nasty, and I don’t think helps people understand the basics.
How Did I Get Here?
I ran across this tweet a few days ago:
My story doesn’t quite fit into a tweet, though I tried. Let me give you the basics.
In college, my original plan was to major in Computer Science. I took a very difficult course at MIT my first term freshman year called Structure and Interpretation of Computer Programs, from the great Gerald J. Sussman himself.
(Pause for an impressed reaction from the IT people who know that name, or, perhaps more importantly, that classic text. For me the book consisted of mimeographed pages printed out week by week, as he and his coauthors were still writing the book at the time.)
The tragedy is that I learned almost nothing during the course. The concepts were so new and unfamiliar, and my own learning skills were so primitive at the time (high school had been so easy for me, I hadn’t developed any real learning skills at all) that I nearly crashed and burned. I was very fortunate to have a kind TA who went over every homework assignment with me and got me through it. The course was taught using Lisp (!) and Algol 60 (??), both of which were completely unfamiliar to me. Somehow I managed to get through the exams and passed, though it showed me I was completely out of my depth. I switched to engineering and didn’t come back to software development for nearly twenty years.
There’s an old saying from science fiction author Robert A. Heinlein that goes, “when it’s time to railroad, people will railroad.” He meant that the infrastructure necessary to support an innovation has to be available or ready to be developed when the innovation comes, or it won’t matter. Leonardo da Vinci anticipated flying machines by literally centuries, but he was way too far ahead of his time to create the entire aviation industry.
For me, it wasn’t yet time to railroad. I wasn’t ready to learn what they were teaching, and therefore the golden opportunity was wasted on me. That was sad, which I even realized at the time, but there was nothing I could do about it.
Getting back to my own history, I eventually double majored in Mechanical Engineering and in Mathematics, then went to graduate school in Aerospace Engineering, and eventually got a job as a Research Scientist. I did lots of math and coded in lots of Fortran (shudder).
(Incidentally, I didn’t adopt Fortran willingly. All the coding I did from my senior year at MIT until halfway through my graduate program at Princeton was done in Pascal, mostly because you could get Turbo Pascal for free on a 5 1/4" floppy drive and I had a book that taught me most of the basics. It was only because I eventually had to work with a large, powerful CFD (computational fluid dynamics) system, written by a big name professor, that I was forced to learn Fortran, mostly because that’s where all the major numerical libraries were at the time.)
Then in the mid 90s, the Java programming language came along, and I was fascinated. I managed to learn enough of it to be reasonably productive (thanks to Bruce Eckel’s Thinking in Java book), and eventually moved to an Artificial Intelligence group in my company. It took me about a month to realize that 15 years of coding in Fortran hadn’t taught me anything about computer science, so I went back to school at night to get an MS in Computer Science from the local campus of R.P.I. (which at the time was called Rensselaer at Hartford, and before that the Hartford Graduate Center).
At long last, that brings me to the moment that changed my life. I was in my last semester at Rensselaer. It was in February, 2000, on a Saturday morning, and I was sitting in a class on computer networking. I was annoyed, partly because the class was held on a Saturday morning, but I had a bigger reason.
It seemed that several of the other members of my team at work were going to a training class the following week to learn Java. I already knew Java, and was studying to get certified as well, so I annoyed that the work hadn’t been given to me and that somehow other team members had arranged a private training class instead.
That’s when the lightbulb went off. “Wait a minute,” I thought. “Who teaches those classes, anyway?”
My original plan had always been to become a professor. I went all the way through school and got my PhD., but my advisor was an Assistant Professor without tenure and I saw what that life was like. In fact, my last year at Princeton we found out he was denied tenure, for reasons having to do with a lack of fundraising rather than any quality issues. Princeton always hired seven professors in order to keep one (the tenure rate was about 14%), and he turned out to be one of the six that didn’t get tenure. In fact, he left (and stepped into a tenured position at UCLA) the weekend before my final thesis defense, during which I told the committee I was an orphan.
I didn’t actually do that, but they knew it anyway. I have no idea whether it mattered or not. Thesis defenses tend to be pretty routine — you know your topic by that point better than anybody, and it’s very unlikely anyone will ask a question so devastating that will cause the committee to reject your dissertation. Mine was about as straightforward as it could be.
My experiences with academia, however, had shown me that the life of an assistant professor involved a lot of pain and a lot of fundraising, so instead of all that I took a job at an industrial research lab. That’s how I wound up at United Technologies Research Center (UTRC), and eventually as a career changer in that networking class on Saturday morning. Along the way, however, I had done some teaching as a visiting professor at Trinity College in Hartford, and I’d spent a summer attending the Alternate Route to Certification program to let working professionals become certified to teach in Connecticut high schools. I enjoyed that, too, but that’s a story for another day. I was eligible to be hired, but I also knew I’d have to declare bankruptcy the next day if I did so, so that didn’t seem a viable alternative at the time.
The idea of teaching training classes, however, never occurred to me. I didn’t even know such things existed until then. But the idea really appealed to me because it combined teaching, with no grading (whew), with the opportunity to always learn the newest developments in the field and pass them along to working professionals. I really liked that idea.
I followed up by going down to our own training center inside UTRC to ask who they used for training courses. They pointed me to a handful of approved vendors. I then approached each of those vendors and asked them who they used for trainers.
Some were interested in using me as a contractor right away, but I knew I didn’t know enough about the business to make it as an independent yet. Instead, a friendly person pointed me to a local company called the Golden Consulting Group, who was looking to hire a Java trainer. I interviewed with the owner, Nancy Golden. We hit it off, and I got the job.
I talk more about those adventures later. I’ll conclude by saying my first training course was on Object Oriented Concepts and was held on May 31 and June 1, 2000, and I’ve been in this business ever since. I became an independent myself in 2005, forming Kousen IT, Inc, and that’s where I’ll be when I retire.
For me, teaching training courses is way better than the academic world I expected to enter. I still love it, and I enjoy working with regular developers from literally all over the world.
It took me until age 38 to find my dream job. I published my first book in the field, Making Java Groovy, at age 51. My fifth book, Help Your Boss Help You, will come out this summer, at which point I’ll be 59. Don’t worry about starting late. It’s never too late to become the person you were meant to be.
Tweets This Week
This tweet thread describes the chaos and massive risks inherent in the cryptocurrency market:
I’d never even heard of Tether, but if half of what that thread claims is true, there are bad times ahead for anyone highly invested in cryptocurrencies.
Another thread along the same lines was:
Explains a lot.
To lighten things up, try this:
Variation on a theme, but a good one. I followed with these:
Or this dated reference:
Actually, that one was my wife’s idea. :) And speaking of meaningless currencies,
Finally, this was simply brilliant:
Have a good week as things in the US open up.
I know a lot is going on in the rest of the world, but I’m going to do something that never happens on Twitter (and rarely in newsletters), and say I don’t have any answers and I don’t know enough to talk about the issues intelligently, so I’m not going to say anything.
As a reminder, you can see all my upcoming training courses on the O’Reilly Learning Platform here and all the upcoming NFJS Virtual Workshops here.
Last week:
Managing Your Manager, on the O’Reilly Learning Platform
Day 1 of Spring and Spring Boot in Three Weeks, ditto
Modern Android Development, an NFJS Virtual Workshop
This week:
Functional Java, on the O’Reilly Learning Platform
Day 2 of Spring and Spring Boot in Three Weeks, ditto
NFJS Webinar: Upgrade to Modern Java