Tales from the jar side: Gradle laziness, frickin' laser beams, options trading, and Tom Brady
The off week before the Super Bowl felt off in lots of ways, actually
Welcome to Tales from the jar side, the Kousen IT newsletter, for the week of January 24 - 31, 2021. This week I taught my periodic Introduction to Gradle class for Gradle, Inc., and an NFJS Virtual Workshop on Functional Modern Java. If you are here because of either of those events, welcome! This newsletter is free and will always remain so, so it’s trivially easy to both subscribe and unsubscribe. If you find value here, great. If not, I understand, thanks for trying it out.
And if you’re one of the vast majority of readers who never seem to quite find time to read it each week, hey, I get that, too. Sorry for causing you additional stress in these difficult times., except that I’m not sorry at all. :)
Here’s the easy subscribe button for those who may want it:
Gradle Laziness
I just beginning to get used to the new way to make Gradle tasks lazy, meaning they’re only configured if ask for them at execution time. Normally if you write a task like:
Then you’ll get the print of “config time” on any Gradle task, even those that have nothing to do with the hello task. That’s because all tasks are configured before any are executed. The given task is also an example of a DefaultTask, which means it doesn’t do anything at all (formally, it doesn’t have any methods annotated with @TaskAction) at run time unless you add a doFirst or a doLast block.
There are two ways to avoid instantiating and configuring this task if you don’t need it. One is to use the named method on the tasks container:
This look for any task already defined named hello defined and configures it. That’s probably not what is needed for this task. Instead, use the register method:
This defines a new task, but will only be created when it is required. The create method is eager, but the register method is lazy. It’s that simple.
There were many other new items in my class this week. I’m working with some members of the team at Gradle, Inc to revise the training materials for the future.
A Tough Week
Ah, Twitter, what would I do without your recommendations?
Sigh. Hey Twitter, read the room, okay? For those who don’t recall, Russel Winder was an active developer, especially in the Groovy language community, who passed away a couple weeks ago. I talked about him in my last newsletter. Sorry, Twitter, now is not the appropriate time to recommend a follow, but I guess I can’t really expect you to know that.
That reminds me that I really ought to make sure my wife knows what to do with all my social media accounts when I’m no longer around, including burning them all to the ground.
Speaking of that, here’s a tweet I sent on Friday:
Yes, this week I had medical care inflicted upon me. I’m fine, btw. I was rather hoping that the laser surgery would involve frickin’ sharks with frickin’ laser beams:
But it felt a bit more like:
“Do you expect me to talk?” “No, Mr. Bond. I expect you to see better. Eventually.”
Honestly, I can’t complain (more than I already have). I had a partial tear in my left retina which they caught early and repaired, so it’s all good. A detached retina would have been really bad, and now that’s not an issue. The whole process was aggravating more than anything else.
The other topic in that tweet was the funeral for the spouse of a long-time friend, which was very sad. I had no idea how depressing funerals are during the pandemic, with a limited number of attendees all socially distanced and wearing masks. Ugh. I’m glad my wife and I were there, however, support our friend.
(For the record, the latest episode of WandaVision (number 4 for those keeping track) was by far the best one of the season.)
Meme Watch: GameStop, Options Trading, and more
I never planned to have a section of my weekly newsletter dedicated to memes, but here we are. Two weeks ago it was sea shanties. Last week it was Bernie in mittens. This week it’s taking down hedge funds by buying mostly dead stocks from the 90s.
GameStop? Blockbuster? AMC? Mostly dead is pretty close to being completely dead.
There are many online descriptions of what happened (“it would take a miracle!”), so I’m not going to cover them here, but as usual the whole event leads me to a story.
Way back in the mid 1980’s, my father bought a PC game called Millionaire: The Stock Market Simulation. To my utter astonishment, Wikipedia has a brief page on it, which I used for the link. The game let you buy and sell stocks, but also had a mode where you could buy on margin (i.e., take out loans to buy more than you could afford based on money in your account), and even let you learn how to do options trading.
Note: there’s an old joke about both options trading and commodities trading, which is that you can make a small fortune that way, but only if you start with a big fortune.
My dad played the game for a while and then let me have a go at it. I didn’t understand anything about options when I started, but I rapidly figured out that I could use them to get rich.
Some time later, I came downstairs and told him I’d won the game (i.e., become a millionaire). He was surprised and asked me to do it again. I think I did it three or four more times before he asked to watch me play. He saw that I didn’t pay any attention to the so-called “fundamentals” of any particular stock — I just watched the news reports to see who the big movers were each day, and bought call options when they were going up and put options when they were going down. In other words, I was the purest of front runners, trying to catch the wave as a stock moved quickly. These days, you would have called what I did day trading.
Options trades are a multiplier. Rather than buy a stock, you buy a set of call or put options at a given price and a given date. That means you don’t own anything, but if the price of the underlying stock moves enough to hit your strike price before the deadline, you can then buy or sell and make many multiples of what you invested. As my father noted at the time, my entire strategy was based on volatility. If the stocks were moving fast and you caught enough of them going the right way, you won. If nothing was moving, your options expired and you lost what you put in.
A few years later, in late September of 1987, my father mentioned to me he was worried about the stock market. It was getting very precarious and very volatile (!), and showed all the signs of a big drop coming. I reminded him of the game, and said if he was nervous, he should buy a couple of put options on the index. That way if the market collapsed, the options would make up for a lot of his losses, but if the market didn’t move or went up, all he would lose was the price of the options contract.
He decided to try it. Then, on October 19, 1987 came Black Monday. The Dow Jones Industrial Average dropped over 500 points (22%) in one day.
Those put options came into the money (as the phrase goes), and while he still lost overall that day, it was way, way less than he otherwise would have.
It was one of the few times my advice to my father actually paid dividends (pun intended), and it was all because we played a stock market simulation game.
As a reward, he gave me about $2500 and told me I could use it in the market any way I wanted, to see if I actually had some gift or if it only applied to the game. I was a graduate student at Princeton at the time, so I went to talk to a few of the brokerages in town, mostly because they were within walking distance. As you might imagine, they all tried to talk me out of playing options.
I eventually created an account with this newfangled discount broker called the Charles Schwab Corporation and tried my luck. I lost about half the money in about two months, gave up, sold everything and just kept the rest. The game is very different when it’s your own money.
I haven’t played with options since. That means I’m not trying to participate in the chaos around GameStop and other nearly collapsed companies and trying to pull a real Robin Hood (as opposed to the Robinhood app) and drive short-selling hedge funds out of business. All it really means is that I pretty much understand what happened and why.
If you’re curious, check out the term gamma squeeze.
Instead, I tweeted this:
That led to an awesome Twitter exchange between my friend Scott Selikoff and me, which you can follow by clicking on that tweet. We went back and forth, each trying to scam each other out of our credit card and bank account details in increasingly unlikely ways, until we both acknowledged that Jeanne Boyarsky should just win it all. I was going to paste the tweets here, but there are about 17 of them, so that sounds like too much work. They were fun, though. :)
As I mentioned to a friend, the only part of that original prediction I have confidence in is Kansas City in the Super Bowl, and that’s because Patrick Mahomes is awesome. I’m not going to actually put money on it, though. I hate gambling, or, more to the point, I hate feeling like an idiot when I lose at gambling, which is inevitable. I’d rather not play than berate myself for trying to predict random numbers in a casino, or bet on a football game when one turnover or injury can change everything, or try to out-time zillions of expert stock traders whose entire lives are based on unscrewing the inscrutable.
Instead, I’ll finish this week with a few notes about that football game.
Football Next Week
This is the off week between the NFC/AFC Championship games and the Super Bowl. I’m rather happy to have the whole day to work on this newsletter (and other things), so that worked for me.
Here is a link to an article from The Athletic, entitled Tom Brady’s Ben Winning For How Long?! 21 Amazing Facts Heading Into Super Bowl LV. Here are a few samples:
Tom Brady is heading to his 10th (!) Super Bowl.
That sounds like a lot.
When Tom Brady played — and won — his first Super Bowl in 2002, Patrick Mahomes and Josh Allen were both in kindergarten.
Mahomes (his opponent in SB LV) is now 25. He’s also the greatest QB I’ve ever seen, Brady included. All he needs is another 15 years or so (yikes) to catch Tom in almost every category.
Yeah, good luck with that. I’ll add one comment of my own, which probably deserves its own essay, but here it is anyway. As I’ve gotten older, I now realize that many old people can do what they did when they were young. They just can’t do it for as long, or as often. I think we partly saw that with Tom Brady in the AFC Championship game, which started out great for him and then wound up with him throwing three interceptions in seven pass attempts.
Translated to the Super Bowl, I think this expresses the situation best:
Says it all, doesn’t it?
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:
Introduction to Gradle, Gradle Inc
Functional Modern Java, on the O’Reilly Learning Platform
This week:
Beyond Managing Your Manager, an NFJS Virtual Workshop
Managing Your Manager, on the O’Reilly Learning Platform
I’ll have much more to say about my (former) Managing Your Manager book next week