A Kentuckian’s Guide to Making Bourbon Balls

While living abroad, it can be nice to embrace aspects of your home culture and share it with others. I’m currently living in Thailand but on my last trip back to the U.S. I picked up a bottle of Kentucky Bourbon to bring and share with my peers here. Instead of just serving drinks, I decided to make and share a treat from the Bluegrass state: Bourbon Balls. And now, I’d like to share the recipe to spread the KY love.

Ingredients:

  • 1 cup chopped pecans
  • About 25 pecan halves
  • 2 shots (5-6 Tbsp) bourbon
  • 1/2 cup butter
  • 16 oz (450 g) confectioners’ sugar (called icing sugar in Thailand)
  • 18 oz  (500g) semisweet chocolate

1. Chop the pecans

Chop ’em up good. Remember to keep some halves so you can put them on top at the end. They can be pretty coarse, no need to make them too fine.

2. Toast the pecans

I heat them in a skillet until they release a strong, nutty, fragrance. I don’t know if this is necessary but it makes my kitchen smell good.

3. Soak the pecans

Now throw ’em in a jar and put the bourbon in there. I shook it up and let them sit overnight. Good time to pause and drink some of the bourbon.

4. Bury the pecans in a mountain of powdered sugar

Resist the urge to recreate the scene from Scarface. If you want a buzz, just drink more of the bourbon. You can’t really see the pecans in this picture, but they’re there, believe me.

5. Turn the sugar mountain into a butter volcano

Melt the butter and pour it over your concoction.

6. Smoosh the volcano

Look, we can see the pecans now. I told you they were there.

7.Roll your smooshed mix into balls

I recommend repeatedly squeezing and pressing the mix into a spherical shape instead of rolling them up like Play-Doh since the mix is more likely to either stick to your hands or fall apart that way. Once you’re done, throw these in the fridge to chill while you melt the chocolate.

8. Coat the balls in chocolate

Melt the chocolate, then coat the balls one at a time. Some tips for melting chocolate: cut the chocolate into small, uniform chunks before melting and constantly remove the chocolate from heat and stir. For coating I used a fork and spoon to roll them in the bowl of chocolate and let excess drip off before transferring them to the plate.

9. Throw pecans on top

Make ’em look fancy. It’s okay if they’re lumpy and a little ugly. It shows they were made with love. They’ll taste great.

10. Enjoy your favorite bourbon drink

Sipping bourbon throughout the process is essential. You can drink it straight or mix a cocktail. Can’t go wrong with an Old Fashioned.

Bonus recipe – Old Fashioned

Ingredients:

  • 1/2 tsp sugar
  • 1 tsp water
  • 3 dashes of aromatic bitters
  • 1 shot of bourbon
  • 1 orange peel

Put the sugar, water and bitters into your glass and stir until nearly dissolved. Plop some ice in and pour the bourbon over it. Stir it up a bit more. Twist the orange peel a bit to express its oil then drop it in the glass and enjoy!

Machine Learning Lesson

A very important part of my job as a K-12 computer science teacher is to take concepts that may seem impossibly complex to some and come up with ways to make them more accessible to all of my students. In this post, I’d like to share an activity I did with my students grades 7-10 to engage them in machine learning.

There are many aspects to machine learning and the process I guided my students through is predictive modelling which consists of 5 steps:

  1. Obtaining data
  2. Correctly formatting the data
  3. Training a model with the data
  4. Testing your model
  5. Improving your model

Like many processes in engineering/design, this is not a process you step through once. It is a cycle you perform multiple iterations of and there is no set number of times you should go through the cycle.

I was inspired to tackle this subject with my students after watching a video on youtube by LearningCode.academy: “Machine Learning Tutorial for Beginners – USING JAVASCRIPT!”

There were several things I liked about this video:

  • It was short (less than 12 minutes)
  • I could jump right into the provided example code and start playing around with it with no setup required
  • The problem presented was easy to understand

All these things told me I could make a lesson plan out of it. If I stand in front of my students and lecture for more than 10-15 minutes I will lose most of their attention. I need to be able to get them engaged in a meaningful task for the most learning to occur. So, having tedious setup to go through on their computers would also be detrimental which is why I like online tools like codepen for in-class activities.

I did feel like I needed a different problem from the one in the video, one that could encourage both collaboration and individual effort. I thought of a well-known beginner project in machine learning, Building a model to recognize handwritten digits in Tensorflow. That project, as it is, is a bit out of scope for a 1-hour class with middle school students so I created my own version. I like the notion of recognizing digits, there are 10 distinct items we want to train our model to recognize and there are many ways to collaborate here. Even if students are tempted to split up the individual digits and have specific people get the model working for specific digits, they’ll still have to put their data together and test it out and find test cases that fail and work together to improve the model.

Here’s the program I made. I used two libraries. First, brain.js  (Neural Networks implemented in JavaScript) and second, p5.js (a JavaScript library similar to Processing, made to make programming more accessible).

I used p5.js since it’s something we’ve used in or class many times. In this program, I used it to draw a 6×4 grid of cells that start off empty but that the user can fill by clicking on them. Whenever the user “draws” in this way, the program attempts to guess what digit was drawn. I currently only provided training data for the digits 0-3. The students had do do the rest of the work to make it work for all digits 0-9. I wanted to make the representation of this grid as simple as possible so I made a 1-dimensional array of 24 1’s and 0’s: A 1 is a cell that’s filled in and a 0 is a cell that’s empty. They go from left-to-right, bottom-to-top the same way we read. So, as a class we looked at an example like the ‘2’ that I drew above and produced an array that would represent it: [1,1,1,1,  1,0,0,1, 0,0,0,1, 1,1,1,1, 1,0,0,0, 1,1,1,1]. The whitespace between groups of 4 help us to understand that each group of 4 represents a row in our grid. The training function in the code is where we have to insert our training data. A line might look like this:

{ input: [1,1,1,1, 1,0,0,1, 0,0,0,1, 1,1,1,1, 1,0,0,0, 1,1,1,1], output: { 2: 1 } },

We input the grid, and the output says that the probability that the input we provided is a “2” is 1 (i.e. We’re 100% confident this is a “2”). By this point, the students wanted to jump in and start adding their own data.

At the beginning of the tasks many of the questions are technical (maybe they’re getting syntax errors because they forgot a bracket or a curly brace), but once every figures out how to successfully add new test cases there are process questions like “How many test cases do I need to add?” I don’t give any guidance on this front, I just let them know that we’ll be testing out their implementations together. This encourages them to test out their own model beforehand. I also ask them questions as I’m circulating the room like “How many different ways can you think of to draw a 4?” or “Are there any numbers that could look similar to one another?”

Once we move onto testing, we quickly see that no one’s program works all the time. There’s a good chance we’ll be able to easily find some cases that are obviously wrong. So I might end up with something like this:

I can see why our program might think this is an 8, if we filled in 3 or 4 cells on the left border it would definitely look like an 8. But, as humans, we can look at this and agree that it’s most likely a 3. To improve our program we can train it with this case. In our program it would like like this:

{ input: [1,1,1,1, 0,0,0,1, 0,0,0,1, 0,1,1,1, 0,0,0,1, 1,1,1,1], output: { 3: 1 } },

And, after we re-run our program and try again, it gets it right:

We had good discussion both before and after the activity. We talked about how this process is different than the ways we’ve implemented algorithms in class before, where we give the program a step-by-step procedure to follow that we can easily trace. In this task, we give the program examples and it comes up with the rules. It’s messy and not as predictable, but it’s quite powerful. Trying to write our own algorithm to take a list of 24 1’s and 0’s and determine what digit it most closely resembles would be very difficult and the edge cases would take a long time to account for. Here, if we find a case that doesn’t work, we just throw another line of training data at it.

And if we look back at those 5 steps of predictive modelling, we’ve done each one:

  • Obtaining data – coming up with different ways to represent the digits
  • Correctly formatting the data – putting them into lines of code that syntactically work in our program
  • Training a model with the data – running the program after we’ve input the new lines
  • Testing your model – trying it out, drawing digits and seeing if it gets them right
  • Improving your model – when we find failed cases, we add more training data (Which sends up back to step 1)

 

What’s next?

Teaching at the secondary level, we tend to go broad but not too deep. I expose the students to all kinds of topics in computer science but the main learning goal is to build their skills in engaging in the processes rather than remembering all the details of the content. But, every now and then, some students will really latch on to a particular topic we covered which could help inform future projects that they either complete for my class or on their own. There are lots of directions to go from this simple lesson.

Bigger Test Cases

We just looked at a 6×4 grid. The original data set I referenced, MNIST, represented hand drawn digits as 28×28 grids. Or if you want to move into image recognition, a single image could have thousands or even millions of pixels with different color data in each.

More Training Data

At the end of the activity, we might have generated dozens or depending on your class size, hundreds of test cases but in the world of Big Data, that’s miniscule. MNIST has 60,000 training cases and 10,000 for testing. And think about how much data you’d want to give to something like a self-driving car where lives are on the line. You will have to develop more sophisticated methods for collecting and using data if you want to start working with large quantities of it.

Offline Training

The program I wrote trains the model in real-time. Once you start using much larger sets of data the time it takes to train the program increases dramatically. To accommodate this, you will need to be able to train the data offline and generate a pre-trained network that you could plop into a website if you wanted people to present it without having to wait for it to re-train every time.

Resources

Between the time I ran this lesson and writing this post, A new javascript library was released by Google’s AI team: tensorflow.js. But if you really wanted to dig into machine learning, Javascript is not the best way to go due to performance. I like it for the classroom for the speed with which we can implement and test our programs. Using TensorFlow with Python would be a good route to explore.

What Color is Saturday?

Purple! And Sunday is Red. In Thai culture, each day of the week is associated with a color. Here’s a breakdown of each day and their color:

วันอาทิตย์ (wan ah-tit): Sunday – สีแดง (see daang): Red
วันจันทร์ (wan jan): Monday – สีเหลือง (see leuang): Yellow
วันอังคาร (wan ang-khan): สีชมพู (see champoo): Tuesday – Pink
วันพุธ (wan poot): Wednesday – สีเขียว (see kiaw): Green
วันพฤหัสบดี (wan pa-ru-hat): Thursday -สีส้ม(see som): Orange
วันศุกร์ (wan suk): Friday – สีฟ้า (see fah): Sky Blue
วันเสาร์ (wan sao): Saturday – สีม่วง (see muang): Purple

Each day of the week begins with วัน (wan) which means “day.” If you want to say today, you would add the word for “this.” So it’s วันนี้ (wan nee). Sunday and Monday have similar etymology to the English names of these days. พระอาทิตย์ (phra ah-tit) means “sun “and พระจันทร์ (phra jan) means “moon.” พระ- is a prefix for divine or sacred things in Thai. You can use it to refer to a Buddhist monk.

Similar to how each day starts with วัน (wan), each color starts with สี (see) which means “color.” If you wanted to ask what color something is you could add “what” to the end: สีอะไร (see a-rai). Some other colors that aren’t association with one of the days are:

สีขาว (see khao): white
สีดำ (see dtum): black
สีน้ำเงิน (see nahm ngern): dark blue
สีเทา (see tao): gray
สีน้ำตาล (see nahm dtan): brown

Beyond the connections between specific colors and days of the week, the day of the week that you were born on holds significance in Thai culture similar to how the month or year you were born on is important in some systems like Western astrology or the Chinese Zodiac.  Because of this, many Thai people know the day of the week they were born on whereas I and others I asked from the U.S. did not know without looking it up.

Learning about this actually solved a small personal mystery I encountered growing up and visiting my grandma’s temple in South Carolina. Just like many temples here in Thailand, there were 7 small statues of Buddha lined up with jars beneath them, each in a different pose. Visitors make donations to just one of these jars, but how they chose which jar eluded me until a cousin of mine in Thailand explained it to me during a trip we took together. Each posture is associated with a different day of the week and you should place your offering in the jar below the one that is associated with the day you were born. I had always been partial to the seated Buddha being protected by the Naga (A 7 headed serpent king) because it looked the coolest but it turns out that’s also the one associated with my day of birth. If you’d like to learn more about this, check out this blog post.

Practice matching up colors and days of the week in Thai and English using this tool I made to remember them:

Choose the match:

By the way, I’m a Capricorn , born in the year of the Dragon on a Saturday.

Thai Chess (หมากรุก: Makruk)

It’s always awesome when seemingly unrelated interests collide. That happened for me last summer when I visited Thailand for the first time. I had brought my chessboard because I’m a huge nerd. One of my Thai co-workers  told me he was a former chess champion so we decided to play a match against one another. We ended up setting the pieces up differently and after some discussion, realized we played two different versions of chess. I ended up learning the rules for Thai chess (หมากรุก: Makruk) along with some new Thai words. I also taught him the rules of International Chess and the English names of the pieces. We played each other in both versions and unsurprisingly I won in the version I knew and he won in the version he knew.  Makruk is said to be the closest modern chess variant to the ancient game from which all known versions are derived (Chaturanga from 6th century India). Here are the names of the pieces in Makruk (along with their literal translation and corresponding chess piece):

เบี้ย (bia) – cowry shell – pawn
เม็ด (met) – seed – queen
โคน (khon) – nobleman or mask – bishop
ม้า (ma) – horse – knight
เรือ (ruea) – boat – rook
ขุน (khun) – lord – king

Differences between International Chess and Thai Chess:

  • Pawns start on the 3rd and 6th ranks instead of the 2nd and 7th (therefore, there is no en passant and no moving forward 2 on their first move)
  • The white king and queen have their starting location swapped, so black and white do not have mirrored positions at the beginning
  • Pawns promote automatically when reaching the 3rd or 6th rank instead of the 1st and 8th and always become a queen (called เบี้ยหงาย [bia-ngai: overturned cowry shell] as opposed to เม็ด )
  • Queens can only move to the squares diagonally adjacent to them, making them arguably the weakest pieces in the game
  • Bishops move like the queens (diagonally adjacent) or to the square directly in front of them
  • There is no castling
  • There are a long set of counting rules similar to the 50-move rule in International Chess, you can read about them here.

You can say รุก (ruk: penetrate) instead of check and just add the word ฆาต (khat: kill) to make รุกฆาต (ruk khat: checkmate). Another fun word to use is กิน (gin: eat) when you capture a piece. For example: ม้ากินเรือ (ma gin ruea: the horse eats the boat, I bet that horse would have a bit of a ปวดท้อง [stomach ache] afterward!).

I modified a couple of javascript libraries made to implement chess to work for Makruk instead, try it out:


The libraries I modified:

  • chess.js by Jeff Hlywa released under the BSD license
  • chessboard.js by Chris Oakman released under MIT license (While working with this one I actually discovered a bug, fixed it and submitted a pull request which was accepted. Technically, my first open source contribution!)
    Original copyrights left in the source code

Telling Time in Thai

In my journey to learn Thai there have been words or phrases I’ve needed since my first day living in Thailand and I learned immediately (like telling a taxi driver to turn left, right or go straight) and there have been others that I thought “That’s a little too complicated for now” and I didn’t remember. One of those “too complicated” concepts for me at first was telling time. I’ve decided to finally tackle it and I’ve done so by doing what any good constructionist would do and built on already existing knowledge. I am a computer programmer who teaches computational thinking skills. So I wrote a program to take a given time and tell the user how to say that time in Thai (both in Thai script and roman transliteration). I’ll break down how it works, then let you play with it yourself. Actually, a lesson I’ve learned from teaching is that if you tell someone you’ll let them play after your lecture, they’ll ignore the lecture and just wait for the part where they get to play. So, here, play away!

Enter a time:

Okay, if you liked that and you’re still here I’m assuming you want to know more about how it works. First of all, the ‘time’ input type will give us a value in the format HH:MM anywhere from 00:00 to 23:59 (12:00 a.m. – 11:59 p.m.). To speak about the time in Thai, you need to know what time of day it is:

เที่ยงคืน (tiâng keun): midnight (00:00-00:59)
ตี (dtee): early hours (01:00-05:59)
เช้า (cháo): morning (06:00-11:59)
เที่ยง[วัน] (tiâng [wan]): (12:00-12:59)
บ่าย (bài): afternoon (13:00-15:59)
เย็น (yen): evening (16:00-18:59)
ทุ่ม (tûm): late hours (19:00-23:59)

The next thing to know is that when saying the hour, we work in mod 6 instead of mod 12 (If you’re unfamiliar with modular arithmetic, keep reading and it should make sense). You know how we count up from 1 o’clock, 2 o’clock, …, 12 o’clock, then start over again at 1 o’clock p.m.? Well, in Thai we can count up from 1 o’clock, 2 o’clock, …, 6 o’clock and go back to 1 o’clock. So you “roll over” 3 times in a day instead of just once (a.m. to p.m.). One thing to note is that Thai can be a pretty forgiving language. If you say 7 in the morning instead of 1 in the morning, it will still make sense.

Some more important words:

โมง (mong, long ‘o’ sound like in go or row): hour
นาที (na tee): minute

Also, the numbers 1-59. I’ll do a separate post about numbers in Thai (Until then, here’s a good reference). Here are the first 6 since they’ll be the most common since we need them for the hours:

หนึ่ง (neung): one
สอง (song): two
สาม (saam): three
สี่ (see): four
ห้า (ha): five
หก (hok, again, long ‘o’ sound): six

Saying the hour portion is different during the different parts of day. For noon and midnight, we just say เที่ยงคืน/เที่ยง. Early hours it’s the time of day then the hour number (1 .a.m. = ตีหนึ่ง ). In the morning and evening it’s [hour number] + โมง + [time of day] (6 a.m. = หกโมงเช้า, 6 p.m. = หกโมงเย็น). Afternoon, it’s บ่าย + [hour number] +โมง (3 p.m. = บ่ายสามโมง ) but you don’t have to put the number if it’s one (1 p.m. = บ่ายโมง ). Late hours, it’s [hour number] + ทุ่ม (11 p.m. = ห้าทุ่ม).

Minutes are easy enough, unless you’re at minute zero (*:00), just add the number and the word for minutes (2:03 p.m. = บ่ายสองโมงสามนาที: bai song mong saam na tee ). Now, just like in English, we could say things like ครึ่ง (kreung: half) instead of *:30, or 5/10/15 ’til the next hour but I haven’t included those in this program. We could also say [hour number] + [the Thai word for clock] the same way you use “o’clock” in English but you need to switch to a 24 hour system (ex. 6 o’clock am = หกนาฬิกา: hok na lee gah but 6 o’clock pm would be “18 o’clock” = สิบแปดนาฬิกา: sib bad na lee gah ).

By coding this up, I had to think about the patterns and rules for when to say what when talking about time in Thai which has definitely helped my understanding. Thanks for checking it out!

Featured Image originally posted on Flickr by Jorge Láscar  licensed under the Creative Commons Attribution 2.0 Generic license.

สวัสดีครับ

Hi! I’m Michael, an American teaching at a Canadian International School in Bangkok, Thailand. I created this blog to both share my adventures with friends and family that are far away and to chronicle my learning of the Thai language and culture.  It’s my long term goal to become fluent and literate in Thai. My interest stems from the fact that my grandmother is Thai so learning the language and familiarizing myself with the culture is a way of connecting with my own heritage and exploring a part of my identity.