In case you missed it, I built an ML demo for the Google Cloud Next OnAir Hands-On Keynote. For the demo, I trained a machine learning model with AutoML Tables to predict whether a credit card transaction was fraudulent. Then I deployed the model and called it via Cloud Run. The demo has a little cake-related surprise. I won’t totally spill the beans here – you gotta watch the keynote to find out. But I will tell you a story about the cake.
Baking vs. Banking
I’ve been doing a lot of baking during quarantine, and as I was building this finance-related demo I thought “Hey wait, the word baking is pretty similar to the word banking. In fact, there’s only one letter difference.” This is a strange thing to think about, but it’s 2020 so anything goes. Then I decided that a cake might spice up this demo, but I figured I was probably alone in this thinking. It never hurts to ask though, right? I mentioned the idea to the keynote team, and to my surprise they were into it.
I was trying to think of a way to incorporate banking into a cake and my first thought was to make some sort of piggy bank cake. Then my teammate Eric suggested that I make a credit card cake, which I thought was genius (thanks Eric!). After all, I was training my model on a dataset of credit card transactions. I wanted the cake to be the same size as a credit card so that it would be more believable. I can also only share my baking with one other person right now, and because there is sadly such a thing as too much cake, a bite-sized cake was the way to go.
A credit card, but make it cake
First step was to make some cake! I used a 6-inch cake pan, which makes for a great canvas for cutting out smaller shapes. One of my favorite bakers to follow is Chelsweets, and I used her funfetti cake recipe for the base. I left out the sprinkles this time (the next cc cake will definitely have sprinkles). Once the cake fully cooled, I trimmed the top off and sliced the cake in half lengthwise to make two shorter 6-inch cakes. I used to trim cakes with a serrated knife, but for reasons I won’t go into here I stopped doing that. Surprisingly, dental floss works pretty well too, though I recently upgraded to a wire cake slicer.
The key to this whole process was to re-freeze the cake before every step. Because it’s small, usually around 20 minutes does the trick. With a frozen half cake layer, I found an old hotel room key (remember those?) and used that as an outline for cutting a credit card shape:
Each cake piece yielded two credit cards, so I had plenty of cake to get this right. I put the credit card sized pieces back in the freezer and made the frosting using the buttercream from the recipe linked above. I wanted the frosting to be grey since that’s a pretty common credit card color. To achieve grey frosting I ordered some activated charcoal powder. Yes, I ordered it just for this purpose and yes, the jury is still out on whether you should put this in food. I set aside some of the white frosting to use for writing, and then added ¼ teaspoon of the powder to the rest of the buttercream. This resulted in what I’m calling “super platinum credit card grey.” I put the frosting in a piping bag and covered the sides and top of the cake.
Then I smoothed everything with a bench scraper, probably too many times to count until I was happy with it:
I wanted this to be a chip card, and I happened to find some white nonpareil sprinkles in my cupboard (I mean, who doesn’t have white nonpareils hanging out in their cupboard?). I cut a rectangle hole in a piece of parchment paper, held this over the frozen cake, and pressed a bunch of nonpareils in. This worked well!
The first time I tried writing the credit card details on top, I cut a very tiny hole in a piping bag, put the white frosting in and used that to make the wifi lines, number, name, and little cloud icon in the corner. For a first try I was happy with the results. However, being a perfectionist, I thought I could do a little better. I ordered a small frosting tip designed for writing and it turns out, the right tools make a big difference (in machine learning and in cake). Here’s a comparison of v1:
Let me know what you think of this cake story on Twitter – I’m @SRobTweets. I’ll also give a plug for my Instagram where I’ve been posting some of my quarantine baking. And if you want to check out any of the Cloud tools covered in my demo, I got you: