2022 Reading

Even though the number of books I read in 2022 was below the goal I set for myself I think it was a good year of reading for me. Since I’ve started tracking my reading with goodreads and setting goals it seems like I alternate between going over my goal then undershooting the next year. I’ve been aiming to read about 25 books a year. I think I will set a similar goal for 2023. This pace keeps me constantly reading something and finishing about 1-2 books a month usually and getting a few extra in during breaks and vacations. Here are my thoughts of some of the books I read in 2022:

 

The Bullet Journal Method by Ryder Carroll

I read this book early in the year and it inspired me to attempt keeping a bullet journal for the year starting in February. I kept up with it well until June then neglected it over the summer months but picked it back up in the last couple months of the year. I heard about BuJos from a co-worker who was thinking about teaching her students the bullet journal method to help them stay organized in an upcoming project she was planning for them. The book itself is pretty straightforward: a bit of a how-to on the method with the bulk of the text being explanations of the supposed benefits of adopting the method sprinkled with some anecdotes about people who found success in their own bullet journal journeys. I could’ve just done a quick google search to see what a BuJo was and the basics of how to do it but I still stayed engaged long enough to finish the book and try some of the proposed activities like goal setting with the 5-4-3-2-1 pneumonic: Come up with a list of personal and professional goals with varying timeframes (5 years, 4 months, 3 weeks, 2 day, 1 hour).

Some notes I took in my Bullet Journal while reading Design of Everyday Things

The Design of Everyday Things by Don Norman

I’ve read bits of this book before, in particular when I was pursuing my Masters in Secondary Education. I’ve wanted to read it cover to cover and finally got around to doing so around March. The current school I’m at is all about the Design Process so it was highly relevant to my work. Having taken a few courses on design throughout my education and reading for personal development I’ve encountered most of Norman’s ideas before but I always like going to the source when I can. It gets me to think of ways to apply the ideas to problems I’m currently facing. In the last quarter of the 2021-2022 school year I planned and implemented a learning lab where learners had to design and create electronic toys then combine their ideas into a toy line and make a business plan to pitch. One of the visual tools from the book was helpful for them: The Double Diamond model that presents design as a 4 part process (Discover, Define, Develop, and Deliver) where the 1st and 3rd phases involve divergence and coming up with lots of ideas and prototypes and the 2nd and 4th phase are about converging and identifying the best parts of the previous parts.

 

Creativity, Inc. by Ed Catmull

This one was a direct suggestion by another co-worker. I loved this book, my copy was full of post-it notes and underlined bits. In my role as a “learning designer” at a project-based school I related to the difficulties of facilitating others to engage well in creative acts. I had a ton of ideas for how we might apply lessons from the book to our organization. As a computer scientist I loved the technical parts near the beginning of Ed’s journey and as someone who got into 3D modeling and animation during the pandemic, the artistic content later was good too. Overall, each part of the book spoke to some part of my brain and captured my attention all the way through.

 

A Brief History of Time by Stephen Hawking

Last school year I taught some physics for the first time. I had several conversations about the subject with a colleague of mine with much more experience teaching physics than me and it made me want to explore some of the concepts in the field a bit more so I picked up what I assumed to be a classic. It was a good read and it reminded me of why some people are referred to as geniuses not necessarily because of how complex the topics that they tackle are but in how they can make something very complex seem somewhat simple (or at least straightforward) when they break it down for others. One of the really cool parts to me was Hawking’s explanation for how emitted light can be detected from black holes even though no light can escape the event horizon due to quantum relativistic effects (Hawking Radiation).

 

A Brief History of Equality by Thomas Piketty

This is the first Piketty book I actually finished (which I think was the point of this book). I made it one to two hundred pages into both Capital and Capital and Ideology–about 700 and 1000 pages respectively. I was really interested in the subject but after the introductions, they proved to be a daunting task to complete. But this one clocked in under 300 pages so I was able to make my way through it albeit slowly since it’s still a dense work. The gist is that over the past couple hundred years we’ve been trending toward more equal societies though on the economic front since the 80s we’ve been regressing due to unchecked global capitalism. There’s a need for highly progressive taxes and strong welfare states to get us back on track. He also makes cases for reparation between countries and for historically oppressed peoples within countries. Several forms of historic inequality were discussed alongside ways things have changed. It’s also interesting seeing trends reverse. One thing that still stands out to me is how some antidemocratic practices are now the mainstream accepted way of doing things such as shareholders getting direct proportional votes in business – many societies used to let people vote more in elections based on wealth and that seems preposterous to us now but we still accept it in the world of business. In places like Germany, the workers themselves have some decision making power by law (Codetermination).

 

Shape by Jordan Ellenberg

I’ve returned to teaching math this quarter and I always like thinking deeper about any subject I’m teaching to form more (and more interesting) connections between what we’re doing in class and what lies beyond. As the subtitle implies, there is a good deal of diversity of topics covered in this book including random walks, decision trees, markov decision processes and invariants. Near the end, the topic of gerrymandering came up which is something I’ve always wanted to make a geometry project out of. I like that Ellenberg didn’t seem to “dumb down” his explanations but trusted his audience to make some mental leaps while giving plenty of support to get you there. There’s also interesting stories about the history of the study of mathematics itself and the imperfect humans who have been players in that world. 

 

Game Theory by Brain Chegg

This was a quick read. I’d have to say it wasn’t particularly informative or entertaining. It definitely feels like it follows a common modern non fiction formula (Take a big idea, break it down to smaller ideas, make a chapter about each of the smaller ideas, tell some anecdote in each chapter highlighting while that smaller idea is relevant and related to the bigger idea) but it doesn’t do it particularly well. I had a cursory understanding of game theory going into it and this book didn’t do anything to deepen my knowledge. I feel like it could have been a nice short online article to introduce game theory to those that have never heard of it. It doesn’t make me want to check out any more of the “Hot Science” series.

 

Money by Yuval Noah Harari

Having read Sapiens, Homo Deus and 21 Lessons for the 21st Century, I jumped at the chance to read more Harari and this was quite short and contained some of the ideas in Sapiens about human behavior. I can’t recall anything particularly new or noteworthy from my reading but it is always helpful to spend some time thinking about some of the concepts of economics and history that he brings up so I still consider the time investment of reading this worth it.

 

Jurassic Park by Michael Crichton

I’ve wanted to read this for a while and last semester I ended up reading it with my students. The other learning designers and I realized we hadn’t been having them read much fiction and we were running two biology related projects (genetic engineering and biomimicry) so this seemed like a fun tie-in. I have fond memories of watching Jurassic Park in my high school biology class. I think the book was also entertaining though not without some major flaws if you wanted to take the time to analyze it as a work of literature.

 

The Animator’s Survival Kit by Richard Williams

As I mentioned earlier, I got into 3D modeling and animation during the pandemic. In searching for resources on how to improve beyond just going through youtube tutorials I wanted to find some books as references. This one popped up in every list put together on “must reads” for animators. After going through it, I can see why. There was great, practical advice here as well as some interesting history of animation in the US. This was a book to follow along with and create some animations to really understand the principles that it laid out. I ended making a fanart animation of the Hornet fight from Hollow Knight that ended up being my highest upvoted post on reddit. Even though this was all 2D, many of the principles apply to 3D animation as well which is what I’m more interested in at the moment.

 

The Umbrella Academy (Vol 1-3) by Gerard Way and Gabriel Bá

My daughter and I watched The Umbrella Academy on Netflix after she read that it has similarities to Stranger Things. We really enjoyed it so I picked up the graphic novels that the show was based on. If I’m being honest, I didn’t really enjoy them as much as the show but I’ve never been too into graphic novels though I’ve wanted to get into them (I also watched Sandman this year and I’ve enjoyed Gaiman’s writing so that may be my next attempt at getting into the medium).

 

We Should All Be Feminists by Chimamanda Ngozi Adichie

I’m a fan of TED talks and I liked Adichie’s talk The Danger of a Single Story. We Should All Be Feminists is another talk she gave that I had not seen. This was a pretty short (44 small pages) text version of the talk so I checked it out. I already consider myself a feminist so I didn’t find myself challenged by the ideas presented but they were presented very clearly and in a compelling way. This is something I think I’ll share with younger readers.

 

Deep Work by Cal Newport

I read the ebook version of this (partially while at work – it seemed appropriate). The cover gives away the main point – we’re living in a world full of distractions so it’s a challenge to find ways to engage in deep work. The book makes a case for why deep work is important, defines what the author means by deep work (as opposed to shallow work) and shares ways you might do more of it. There are different methods presented from being a complete hermit and cutting yourself off from the internet completely, to carving out set chunks of time in your calendar to dedicate to focused work and some in-between compromises. Many of the traps for how we get sucked into shallow work sounded familiar to me and it made me evaluate how I’m currently spending time which is always a worthwhile thing to think about.

 

Meditations by Marcus Aurelius

I picked this up while on vacation with my family in Italy while we were going through the Colosseum gift shop. Like many philosophical works I’ve read, there are ideas that resonated, others that made me wonder about modern (or personal) applicability and some that made me pause and reflect.

 

Tomorrow, and Tomorrow, and Tomorrow by Gabrielle Zevin

I got suckered into studying computer science in college because I loved video games; then I ended up loving computer science as its own thing separate from a path for me to make games. I was suckered into reading this book based on the description and the reference to the characters starting a video game company which is something I’ve always wanted to do. The book wasn’t exactly what I expected but I was hooked and flew through it in a couple days (I’m usually a pretty slow reader). I connected to concepts like being mixed race, dealing with pain from childhood, complicated relationships and “gate-shut panic.” Happy I picked this one up and I think I’ll check out more of Zevin’s work even though they don’t seem to have anything to do with video games.

 

Books for my kids

I was looking back at some notes from previous years and I noticed I also talked about books I read with my kids and that made me a bit sad because I realize this is the first year that I didn’t complete a book with them. I was reading Redwall with my daughter but she lost interest and our tradition of reading together kind of fizzled out. Although, one thing I am happy about is that I do seem to have succeeded in instilling a love of reading in both of them. I tend to get books for them as gifts and I’m proud of my ability to select books for them that I think they will enjoy. When talking to my daughter earlier in the year she ran into the problem of not having a book to read because she’d already read all the books she has (She ended up doing a re-read and I got her a few more after that conversation and reminded her to make good use of libraries). My son has been going through the Game of Thrones books recently – I made a point of saying they may be a bit too “mature” for him (but secretly still being happy he’s tackling such long books and me voicing my concerns might even push that rebellious teenage brain of his to want to read even more). For Christmas I picked up The Inheritance Games by Jennifer Lynn Barnes for my daughter and the Mistborn Trilogy by Brandon Sanderson for my son.

Trekking the Himalayas

For Spring Break of 2021 my roommate asked if I’d like to join him on a trek in the Himalayas. We’re living and working in India and international travel is out of the question but heading somewhere remote with a small group of people seemed a reasonable way to spend the break. It also gave me motivation to start getting into better shape. A year into the pandemic, my lifestyle has become pretty sedentary so I took this opportunity to push myself to start focusing on my fitness a bit. I thought I was decently ready but it turns out walking 10 km on flat ground in Delhi is uh, not quite the same as walking 10 km up in the mountains.

The trek took place in Uttarakhand and the trip itself lasted a week. We flew from Delhi to Dehradun and stayed the first and last night in Rishikesh – yoga capital of the world. We were picked up and dropped off by the company – Trek The Himalayas – and transported from Rishikesh to Joshimath. We travelled by van for about 9-10 hours both ways. We stayed in a guesthouse in Joshimath the first and last nights of the trek and camped in tents a total of 3 nights as we made our way up to Kuari Pass and back down. The first day of trekking we went from the end of the mountain road up through a few villages and to our first base camp. About 6 km of hiking uphill. It was a bit hotter than I thought it was going to be but it got chilly that night. So much was taken care of for us – tents were already set up including a food tent, supplies were brought via mule, we were led by highly experiences trek leaders including one local guide. They led us in some games so the members of the group would get to know each other. We were also led through some cool down exercises at the end of each hike. We took acclimatization walks at the different camps to get us used to the altitude. Our oxygen levels and resting heart rate were checked each evening. Even though I was extremely challenged each day of trekking I always felt safe thanks to the TTH staff.  Day 2 was only 3 km but it was a total ascent so it was still a tough day and after reaching camp we also took an additional 1 km walk to a nearby saltwater lake. Day 3 we went up about 5 km to the summit, then came back the on the same route. And the last trekking day was back to Joshimath (I opted to take the same path down that we had come up Days 1 and 2 but the other trekkers took a different route (both ways were about 9 km but for me it was 9 km downhill so I finished much earlier).

The food during the entire trip was great. We found good places to eat in Rishikesh – some small restaurant on the roof of a building near our hotel the first night and the Beatles café our last day (I only just learned while I was there that Rishikesh was where the Beatles stayed during their trip to India). On the van rides to/from Joshimath we stopped at good places to nosh. But most impressive was how good all the food was during the camping/trekking itself. No meals were repeated. We had great chai every morning and evening. There was amazing soup that became a running joke in our group (gotta wrap up the trekking quick to get back to that delicious soup each night!). The whole week we ate veg and it was so good I never had a thought about missing non-veg meals.

There were lots of other great parts of the trip besides the food. We got to learn about the area we were travelling through. We were told about the various flora and fauna in the region. The trek itself was diverse with different types of terrains and all kinds of incredible views. I also enjoyed bonding with the other members of the group. There were 17 of us in total and though my roommate and I were the only non-Hindi speakers we were made to feel included and had a great time all together. People looked out for one another and gave support when needed. I was consistently in the back of the pack during hikes but I was never made to feel rushed or looked down upon. We all celebrated one another’s success. It was great that all 17 of us reached the summit – that’s not always the case.

Since the physical aspect of the trek was quite difficult for me I was so focused on making it to the next destination that sometimes I forgot to stop and just look around at all the beautiful nature I was surrounded by. I take for granted sometimes the amazing opportunity I have to live in India. There’s such a diversity of geography, food, culture, languages, etc… Near the beginning of our trek was Holi and we had a brief celebration with some color powder at one of our rest breaks. Trekking through the Himalayas is something that always sounded like a great time but I didn’t know if I’d ever actually get the chance to do it. There were several times during the actual experience that felt grueling and I just wanted it to be over – to get to camp – to get back home. I’m back at my place in Delhi now and feel an overwhelming sense of gratitude for being able to have the experience.

I’ve mentioned a couple times that this trek was tough for me. I’m not exaggerating when I say this was the most I’ve ever been pushed physically in my life so far. During the final ascent at one point I was crawling on my hands and knees for several meters. As I saw the top peaking over the ridge where the others from my group were waiting I got up to my legs and walked the final 50 or so steps to join them. I felt like crying but held back the tears more due to self consciousness than any kind of mental toughness.

In the end, I was able to reach the summit but the way back down was so much harder for me because I had pushed myself past my physical limits and felt like I had nothing left after that. I was experiencing some unpleasantness like headache, nausea and fatigue on the return hike. One of the trek leaders stayed with me and one of the members of staff from camp even ran out to bring me samosas and chai on the way. I made it back to the camp about an hour after everyone else and felt completely drained. I skipped dinner that night, took some medicine and at the trek leader’s suggestion went back down the same way we came up on the final day. I still feel proud of making to the top and overcoming my body’s desire to give up. This is definitely an experience I’ll always remember and now that I have one trek under my belt, I’m already thinking of the next.

Teaching and Learning Online

Many teachers suffer from a cognitive bias known as the “Curse of Knowledge.” When you’ve mastered something, many aspects of that topic feel basic or intuitive. Especially, as time passes and you forget what it was like to initially struggle with a concept. To combat this, many of us take off our teacher hats from time to time and don our learner hats. We can do that in many ways. To that end, a few years ago I enrolled in a program called OMSCS: Georgia Tech’s Online Masters of Computer Science. This summer I took my last classes and graduated from the program. At the end of any valuable experience, it is worthwhile to reflect on it to extract the lessons you can carry with you.

Going into the OMSCS experience, there were some things I knew I would get out of it: a deeper understanding of many areas of computer science, the chance to take on the role of a learner in my field, and a chance to collaborate and learn alongside other working professionals. I also ended up not just thinking about the content taught to me but the way the professors delivered their courses in an online format. I didn’t expect the online aspect of it to be so relevant in my own teaching but here we are.

Here are a few lessons I learned beyond the content of my courses:

  • The urge to procrastinate is strong! With less face-to-face time with teachers, there feels like a little less accountability. Something that helps is breaking big tasks down into smaller ones. Having more deadlines or milestones can actually reduce stress as it leads to not putting off work longer.
  • Input = Output What you put into a class correlates to how much you get out of it. It can be tempting to just put in the minimal effort and check off the list of things you are required to do to get the grade but I find I got way more out of the classes where I looked into the supplemental resources provided, read beyond just the assigned chapters and tinkered with concepts.
  • Going off the point above: It’s okay to just survive! I did not (wasn’t able to) go above and beyond in every class, only the ones I felt compelled to do so. Especially now, there’s so much on our plates that just checking off the to-do list and making it to the next week is more than admirable
  • Over-communication > under-communication
    Yes, getting tons of emails is annoying and I’ve changed my settings on various platforms to reduce the number of notifications I receive. But, getting too much information has been an easier problem for me to deal with than getting too little information. I’d rather repeat myself multiple times and in different ways at the risk of sounding like a broken record than leave some behind and confused. With background stressors, there can be hidden factors that cause our attention to fade or to forget something we just heard. Having information in an email, on a class website, in a pre-recorded video, and repeated live is not just covering all our bases but maximizing the chance that it’s received by all. As a student, don’t be afraid to follow-up on an email a teacher hasn’t responded to after a few days: many can get lost in the ever-growing mountain we call our inbox. I know I’m guilty.
  • Relationships > Content
    Teaching and learning can be a fun, academic puzzle to solve. How do I express this idea? How do I explain it in a way others can understand? How can I design it in a way to guide someone to learn it themselves? But at the end of the day, the people doing the teaching and the people doing the learning are human beings with a lifetime of experiences, fears, joys, interests, biases, etc… Connecting with the people in our space (physical or virtual) is the real challenge of a school no matter your role. I remember the teammates I worked with on group projects more than the lectures on the principles of software engineering, artificial intelligence, databases, and security. I value the peer reviews, TA feedback and the time the professor admitted they were wrong in a forum post and showed me even experts in a field get mixed up sometimes
  • Fast, simple feedback loops drastically improve learning
    One of my favorite but most challenging classes was Artificial Intelligence. I learned more in that class than any other not only because of that challenge but due to the speed and quality of feedback. The professor set up a way for us to submit the code we wrote and have it tested and our results were given back to us quickly. So I could create an AI to battle another one and my score was based on its performance and when it did poorly I could attempt to figure out why and make improvements. In the classes I teach involving computer programming, I have a similar setup for some tasks but for many types of work, this isn’t possible. A lesson I take from this is to try to give and get as much feedback as you can! Peer review, asking for more feedback when you don’t get enough, and iterating on your work are all good ideas.
  • Finding a good balance of control is important
    Sometimes it’s nice to just get straightforward tasks and directions and do the work. Other times, it’s better to get a chance to be creative and come up with our own tasks. I think any good learning experience or course should have a mix of varying degrees of teacher and learner control. I try to structure my courses by giving specific tasks to learners with very explicit directions and feedback at first to build core skills then opening it up to allow students to take the skills they built in the directions they want to take them and chart their own courses of exploration. When I set out to learn a new skill, I start by following step by step tutorials and reading books or guides and then planning personal projects using the knowledge gained from that first stage of learning.

I have avoided talking about my specific content area too much since I think these lessons apply regardless of if you’re teaching/learning computer science or anything else. But I would like to speak a little to one of my favorite sub-fields of CS: game design. I have made so many connections between designing good games and crafting effective lessons and courses. You have to understand the person playing your game (or student learning your topic) and give them the appropriate level of challenge: too easy and they get bored, too complex before they’re ready and they get frustrated. We want to keep them in the zone where they’re just brushing up against the boundary of their current level of skill to push them to make it to the next level. We have to make it interactive and get them to get “in character” and take on the role of superhero, mathematician, problem solver, computer scientist, race car driver, whatever. It’s an iterative process. We try out our ideas, get feedback, and improve on it next time. There will be many failures as we navigate the world of virtual learning but that’s exciting. Because each “failure” is an opportunity to learn and to grow.

Staying Sharp

When I first made the transition from working in industry as a firmware engineer to teaching high school, my technical skills earned through my education and work experience was a selling point in interviews. One thing I’ve worried about during my teaching career so far is “losing my edge.” I’ve had the thought that the longer I spend as a teacher and not working in my field, the more likely I am to lose skills or knowledge I once had. Maybe this fear is irrational, but I’ve taken some steps to prevent it.

Formal Education

The most straightforward action I’ve taken is to take graduate courses in computer science. During my first couple years teaching I was an advisor for seniors so I spent time looking into different university programs. At the same time I was investigating the requirements to teach dual credit courses. To my dismay and amusement, I was qualified to teach computer science both at the high school and university level but not dual credit (teaching a class that gives both high school and college credit). I had a B.S. in Computer Science and an M.A. in Secondary Education but I needed at least 18 hours at the graduate level in my subject to teach dual credit.

Eventually I found Georgia Tech’s Online Masters of Science in Computer Science (OMSCS) program which appealed to me for many reasons such as the low price tag, completely online nature, awarding the same degree as the on-campus equivalent without any special “online” designation and a wide range of interesting courses available. I’ve gotten to brush up in some areas like databases, artificial intelligence and information security, take classes relevant to my career as an educator like education technology and human-computer interaction and explore new topics I wasn’t exposed to in undergrad like machine learning. I feel like I’m getting to double dip: I’m learning content as a student in the program and I’m paying close attention to how these courses are run to think more about my own pedagogical practices.

Reading

I love learning from books. There are many must-reads like Code by Charles Petzold, Clean Code by Robert C. Martin, and The C Programming Language by Kernighan & Ritchie (even if C is the primary language you use). Not only do well established, popular books contain valuable knowledge and insights but it gives you common language to use when discussing technical matters with others.

I also enjoy reading more recently written books even if they center around a technology or tool that might not be around (or widely used) in a few years. A book that I attribute to pushing me to pursue computer science as a teenager was the book Game Programming for Teens which taught the basics of Game Programming using a language called BlitzBasic which I haven’t used or heard anyone talk about since I used it during my reading of that book. There’s still lots to be gained from the experience of using specific tools even if you move on to something else later on. Recently, I read a book about using Design Patterns in Unity 2019. I quickly jumped into Game Program Patterns by Robert Nystrom which is excellent.

I also try to diversify what I read. A good book that got me thinking more about ethical considerations of emerging technology was Weapons of Math Destructions by Cathy O’Neil. And there’s more to read than just books. There’s a ton to learn from articles online and blogs. I particularly like seeing blogs from other CS teachers like Mike Zamansky and Alfred Thompson.

Sharing

In addition to reading what other people have to say, sharing what I have to offer has been crucial in my personal development as well. Writing about my experiences in a blog has been a good way to stop and reflect and get something more out of those experiences.

I also share links to things I’m working on on social media like twitter. So far, I usually don’t get much feedback but the little I’ve received has been quite useful. I’ve thought about making an explicit ask of specific people to take a look and give me feedback since it is so valuable. I also understand that it’s a significant ask so I want to not do it too often and try to offer something of value to the community in return.

Something I have only done a couple times but would like to do more of is giving talks at conferences. At LexPlay (Game convention in Central Kentucky), I shared some experience using video games as a mode of learning with some fellow teachers. I also gave two talks (one regular and one “lightning”) at PyCon Thailand. One was about teaching with Python. The other was about using programming skills to help with language learning (It was only 5 minutes but I gave that talk in Thai which was pretty terrifying but worthwhile). I also showed off a game I made at the Louisville Arcade Expo which was an incredibly fun way to showcase a project I had made. Something I’ve recently begun is streaming myself working on some of my projects on sites like Twitch and YouTube. Even if there are few or no viewers, it helps me to talk through my process out loud as if I were explaining it to someone else.

Side Projects

I think probably the most important thing I’ve done to keep developing my programming skills is… programming. Time is a precious commodity. So, spending time outside work hours working on side projects can be tough but enjoyable if it’s something you’re really into. I have also spent planning time during the school day working on relevant projects like demos for students and tools like random name generators, group selection helpers and programming challenges with automated tests on repl.it.

Outside of work I’ve participated in game jams like Global Game Jam, made a Thai language learning app for Android and just generally fiddled around with tools like p5js, codepen.io and Unity. By trying to use tools I’m unfamiliar with I can experience the pain of setting up new and sometimes confusing software just like my students do. I also get to experience the joy of finally getting things to work.

Teaching a variety of courses

There are definitely pros and cons of teaching a large number of courses. It would be nice to have a semester teaching multiple sections of the same course or teaching the same courses for several years in a row to be able to reduce the workload and time spent on planning, curriculum design and creating assessments and rubrics but there’s a benefit to constantly changing it up as well.

I’ve only been teaching for 5 years but I’ve already taught Computational Thinking, Computer Programming, Web Development, Robotics, Design Technology, and IB Computer Science (Year 1 and 2, Standard Level and Higher Level). In addition to IB I’ve taught under the Common Core in the U.S. and British Columbia curriculum in a Candian overseas school.

I feel that I get a chance to learn as I review code that students produce. I have gotten better at paying attention to detail. I have to make robust tests since students will create all sorts of unpredictable code that could pass simple tests but still be incorrect. I have to learn common misconceptions and anticipate them.

I’ve been teaching math too: Algebra I and II, Geometry, Precalculus and Calculus. Every new topic I teach, I feel I get a deeper understanding of the content and I grow in my ability to relate a wide variety of topics to students. I try to make connections between and within content and to the outside world. In my math classes I always try to sneak some computer science in and in my CS classes I sneak math in.

Collaboration

In addition to combining CS and Math content in the classes I teach personally, I’ve found that I get even more out of cross-curricular work when collaborating with teachers in different content areas. I no longer have an expert view of the whole problem domain, I have to learn to work with others to create something better than either of us could’ve done alone.

I’ve worked with an English teaching colleague to have students develop Choose-Your-Own-Adventure stories in HTML in our Web Development class. They also made Mad Libs in PHP and Buzzfeed style Top 10 lists populated with data from student created mysql databases. They used CSS to style their projects to help convey theme and mood.

I’ve collaborated with a Physics teacher to create visualizations and we got our students working together to make physics simulations for their final projects where my students made sure the simulations worked properly and allowed for customization of parameters while her students were the content experts and made sure the physics concepts were portrayed accurately.

Conclusion

A common theme in all of the ways I’ve tried to grow as a computer scientist and as an educator is that I always try to stay curious and try to go outside my comfort zone doing and learning new things. I try to put my learner hat on and not take myself too seriously. It’s also important to always step back and reflect to get the most out of every experience and to celebrate the successes along the way. I love what I do and I look forward to continuing to explore more topics over the years and sharing my accumulated expertise with others.

Collision Detection

I recently read a great explanation of the Gilbert-Johnson-Keerthi Distance Algorithm for Efficient Collision detection. I highly recommend checking it out. I’ve used collision detection as a way of teaching both math and computer programming concepts to students for a few years and would love to share some of the examples I’ve made with other educators and students.

What is Collision Detection?

I suppose, first I should explain what collision detection is. It’s basically checking to see if two shapes are overlapping at all:

Why would we care if two shapes are colliding or not? Well, there are several situations where this information is important: in video games to see if the player is being hit by an enemy, in physics simulations to check if two objects are bumping into one another or in robotics when interpreting sensor data.

Circles

Now that the answer to the “But, when are we gonna use this in the REAL world?” question is out of the way, how do we actually do it? Let’s just consider circles for now. What information do we need to figure out if two circle are colliding? See if you can figure it out by playing with the example below. Note that r1 and r2 are the radii of the circles.

What was the relationship between the distance and the sum of the radii when the circle are colliding? We can represent it in pseudocode:

if (distance < r1 + r2) then
circles are colliding
else
circles are not colliding
end if

Your inner mathematician might be saying “If they are equal, the circles intersect at a point, they should be colliding!” That’s fine, change the “less than” in the code above to a “less than or equal to” but with how floating point arithmetic works, it should be functionally equivalent. The only reason you can get the distance to equal 75 above is because I rounded the actual value to avoid the ugliness of a ton of numbers after the decimal point. Edge cases like that make for good classroom discussion.

To draw the circles to the screen we need to already know the radius and location of the center of each circle. But we will have to compute the distance ourselves. If you know the center of circle 1 is at (x1, y1) and the center of circle 2 is at (x2, y2) we can use the Pythagorean Theorem (or distance formula) to find the distance.

If we wanted to express that in pseudocode, we do something like:

dx = x2 - x1
dy = y2 - y1
distance = sqrt( dx*dx + dy*dy )

Above I used intermediate values of dx and dy to represent the difference in the x values and the difference in the y values. This isn’t required. We could have made this a one-liner but for the sake of clarity, I broke it down into multiple steps. I also just multiplied dx by itself to square it even though some languages have an exponentiation operator (** in python) or a power function like Math.pow().

Cool, that’s about all there is to that example. If you want to play around with the code yourself, here you go.

Spheres

I told you that collision detection is used in video games but aren’t more and more video games being made in 3D nowadays? We just looked at circles which are 2D. Let’s see if we can extend our approach to work in 3D by considering two spheres instead of two circles. This next toy has sliders to control the position of one of the spheres in the x, y and z direction. Try to make them collide. What information do we need to figure out if they are colliding? No numbers on screen provided this time:

You may have realized that the information we need is identical: the radius of each sphere and the distance between them. The same general method stated in the 2D case works for the 3D case. Of course, this time we’ve now got to consider the position of each sphere in the z direction. But luckily, we don’t have to tweak our distance formula very much to make it work:


Or, in pseudocode:

dx = x2 - x1
dy = y2 - y1
dz = z2 - z1
distance = sqrt( dx*dx + dy*dy + dz*dz )

if (distance < r1 + r2) then
spheres are colliding
else
spheres are not colliding
end if

For a good explanation of why this is, check out Math is Fun. But if tinkering with code sounds more fun to you, here it is.

Rectangles

Alright, 2D, 3D, we’ve got this! But, what if we want other shapes like rectangles or cubes? No radius in a rectangle, so our above method wouldn’t work. But, circles alone won’t always cut it. Consider the following situation:

With bounding circles, we might get a false positive and think two objects are colliding when they aren’t. You could shrink the circles around them to reduce the number of false positives but then you’d end up with false negatives:

Sometimes, rectangles will just be a better fit than circles for the objects we want to enclose. So, let’s try to figure out how to tell if two rectangles are colliding.


If you want spoilers, see how I did it in the code.

Unfortunately, there’s not an elegant mathematical formula like the Pythagorean Theorem that can help us out this time. We’ve got to do some logical deduction and come up with a set of rules. It may be easier to thinking about one dimension at a time.

In the diagram above, we see that we can draw the two line segments such that A is always to the left of B and C is to the left of D. The question of collision becomes about the relationship of the points on the red segment to the points on the blue segment. The rule to me seems to be that if A is to the left of D and B is to the right of C, the segments collide. This holds for these 3 examples. Try coming up with more and see if that rule holds or if you can find an exception.
The next challenge is to extend this from 1D to 2D.


In this diagram, imagine you’re only seeing one side of a rectangle for each of the given line segments. For two of the pairs, you could draw rectangles that would be colliding but for the first, you can’t. Try it if you don’t believe me.

Now, rotate these examples 90 degrees. You will see that the same rule above can tell us whether the projections of a rectangle onto either the x-axis or the y-axis collide. We have to combine all that to form a single conjunctive logical rule (by that, I mean several comparisons connected with “and”).


When drawing rectangles in code, you might have 4 points but more likely you just have one point (most commonly, the top left corner) and the width and height of the rectangle. We can still figure out the other points from that information give that these rectangles are axes aligned. For example, the bottom right corner of the first rectangle would be (x1+w1, y2+h2) and the top right corner of the second rectangle is (x2+w2, y2). This is enough information to allow us to write some pseudocode:

if (x1 < x2 + w2)
and (x1 + w1 > x2)
and (y1 < y2 + h2)
and (y1 + h1 > y2) then
rectangles are colliding
else
rectangles are not colliding
end if

This will likely take more work to convince yourself it’s true than the circles and spheres. Come up with examples, see if you can find any that this code fails on.

Many collisions

In a game or a simulation, it’s likely there are more than two objects on the screen at a time. So, we need to be able to take the concepts above and apply them repeatedly in a given scene. The example below isn’t interactive like the rest but keep an eye on how quickly the number of collisions adds up:


(As always, feel free to play with the code. Try changing the 3 values at the top and seeing what happens.)

One way you could handle all these collisions is by using an array to store all the objects and a loop to iterate through them all and another loop nested inside of that to check like this:

N = 15
circles = new Array(N)
//add circles to the array
index1 = 0
loop from 0 to N - 1
start = index1 + 1
index2 = index1 + 1
loop from start to N - 1
//check if circle[index1] is colliding with circle[index2]
index2 = index2 + 1
end loop
index = index + 1
end loop

That’s a lot of collision checks. The first circle is checked against the other N – 1 circles, then the 2nd circle is checked against the remaining N – 2 and so on. Another math connection here: arithmetic sequences and series. If we add it up, there would be (N2 – N) / 2 comparisons. There are definitely ways to do this more efficiently. If that interests you, you might want to investigate techniques like space partitioning.

This is a really fun topic to me. It’s rife with connections between math and computer science. There’s tons of possible extension and it can be used to create really fun projects. Most modern game engines will handle collision detection for you, but understanding how your tools work helps you get better at using them. I hope you enjoyed playing around with these examples as much as I enjoyed creating them.

All the examples in the post were written using p5.js, a javascript library meant to be accessible and used for creative expression. I made the diagrams using draw.io which will soon be changed to diagrams.net.

Build-A-Borg Workshop

This previous semester, I taught a computer programming class to a small group of students using the British Columbia curriculum. The curriculum focuses very much on process over content. In computer programming, the emphasis is on the development process over writing code. One thing I like about this is that there are lots of opportunities to get students off of their computers. While I love programming, I want the students to see it doesn’t require being glued to a screen all day.

My latest project was inspired, as many great projects are, by student interest. When trying to explain logic using light switches as an example I could see eyes glazing over. I noticed a student with a stuffed animal attached to her backpack and I asked if I could borrow it. I asked the class to imagine we were going to give this toy an upgrade and add lights and buttons to it. Maybe rubbing its belly would cause its cheeks to light up or booping its nose might make it coo. They quickly came up with many ideas for how we could use buttons lights and sounds to make this toy more exciting. After this success in a theoretical lesson, I asked if they’d be interested in making this a reality and an enthusiastic “yes” was the consensus.

That evening I gathered supplies and went out and found the cutest stuffed animal that was on sale and of reasonable size. To create our cyborg bears we also needed an Arduino with a USB cable, breadboard, some LEDS, resistors, push buttons, wires, alligator clips, and a sewing kit to open and close our toy.

During the course of this project I gave mini-lessons on boolean logic including truth tables, if-statements, how to write programs in processing and upload it to an Arduino, prototyping with breadboards and making circuits.

Students each sketched the bear and came up with ideas for where to put push buttons (inputs) and LEDs (outputs). I then had them create truth tables that described which lights would come on for each combination of buttons being pressed. This would be translated into a program in processing that would be uploaded to their Arduinos. At the same time they needed to create the necessary circuits. They could test out the functionality before doing anything with the stuffed animal.

While everyone loved the idea of enhancing the bear, they gave looks of horror when I told them it was time to open the bear up to put our circuit inside. No one else wanted to make the first cut so I did it for them but once that part was over it was no time before the were ripping excess stuffing out to make it easier to get their hand inside and connect LEDs to their wires.

It was pretty orderly at first, but as more LEDs and buttons were put in, the amount of wires caused a bit of a mess so strategizing how to best physically organize everything became important.

The first LED and button being added and working was a big milestone that got everyone excited about seeing the final result. After school, students brought their friends from other classes to come look at what they had made.

At the end we had to sew it back up but a hole was left to plug the USB cable into the Arduino for power and so we could upload code from different students to change the functionality. This was a great chance to drive home the fact that computer science is an iterative and creative process.

What went well

  • Student motivation was through the roof during this project. Their  sense of pride after each phase was extremely evident
  • There was great collaboration between students, everyone wanted to participate and the readily helped troubleshoot for one another.
  • There was some authentic struggle taking place that students persisted through due to just wanting to see it work
  • The project was real world and “messy” challenges/obstacles presented themselves like getting wires tangled up, having exposed wires touching causing circuits to fail, etc… They had to physically get the components somewhere inside the bear they wanted instead of just neat and orderly on a breadboard

What I would change

  • I’d set more explicit expectations about writing in their engineering journals regularly. I got them talking and discussing but getting them to do written reflection was tough so some of that great talk didn’t get recorded
  • I’d like to come up with a wider variety of project ideas. There’s no one-size-fits-all project that hooks everyone so the more ideas I bank up, the more likely I am to be able to get more students engaged and energized about what they’re working on.
  • Extending what I did, I would’ve like to use more types of input/output like something to make noise, moving parts, temperature sensor, gyro sensor, etc… We also could’ve made the changes to the bear more permanent by making a pouch and inserting a battery pack instead of needing to have it plugged up and soldering everything in place instead of holding it together with prototyping materials (though as is, it’s nice since we can take it all apart and have new students reuse everything)

 

Asking Questions in Thai

When I told คุณย่า (koon ya – paternal grandmother) I was moving to Thailand she offered to give me a little crash course in the language. She had taught me bits and pieces throughout my childhood but never anything too formal so I was definitely interested. There was one grammatical structure she considered the most important for me to know for asking Yes or No questions.

It looks like this:

Question:

X mǎi?

Negative Response:

mâi X

Positive Response:

X

Note that mǎi (ไหม) and mâi (ไม่) have different tones (rising VS falling) but it’s one of the only time the tone makes total sense to me since you put an inflection that sounds like you’re asking a question for mǎi and and tone like you’re responding with “No” for mâi. Also, if you’re reading Thai script, you’ll notice there are no question marks, the particles/ending words are used to signify a question instead of any dedicated symbol.

Some examples:

เอาไหม (ow mai?) – Do you want?
ไม่เอา (mai ow) – I don’t want.
เอา (ow) – I want.

ชอบไหม (chawp mai?) – Do you like it?
ไม่ชอบ (mai chawp) – I don’t like it.
ชอบ (chawp) – I like it.

หล่อไหม (laaw mai?) – Handsome?
ไม่หล่อ (mai laaw) – Not handsome.
หล่อ (laaw) – Handsome.
หล่อมาก (laaw mak) – Very handsome.

ไปไหม (pai mai?) – Go?
ไม่ไป (mai pai) – No, let’s not go.
ไป (pai) – Let’s go.

Or, if you want to sound really Thai say ป่ะ (bpa)

Another way to ask yes/no questions is to make a statement then add ใช่ไหม (chai mai?) to the end. To answer you would say ใช่ (chai) for yes, ไม่ใช่ (mai chai) for no. There’s also อาจจะ (aht ja) for maybe and ไม่รู้ (mai rue) for I don’t know.

And of course, like any Thai sentence you can throw Khrap (if you’re male) or Ka (if you’re female) at the end to make it sound more polite. When I’m walking through any touristy area where I’m getting asked by Tuk Tuk drivers if I’d like a ride, I usually use the phrase ไม่เอาครับ (mai ow khrap) and give a smile to let them know, in a polite manner, that I’m not interested.

This definitely isn’t the only way to ask a question in Thai but very handy to know. Here are a few others:

…or not yet? – หรือยัง – reu yang

Example:

กินข้าวหรือยัง (gin khao reu yang) – Have you eaten yet?
ยังไม่ได้กิน (yang mai dai gin) – I haven’t eaten yet
กินแล้ว (gin laaeo) – I ate already

…or nothing? (…or not?) หรือเปล่า – reu bplao

…or… – หรือ – reu…

Really? จริงหรือ – jing reu

(Or จริงหรอ – jing raw)

This is a phrase I hear/use often in Thai. Usually is sounds more like “jing aw” than “jing reu/raw”

To respond affirmatively you could say จริงๆ (jing jing – really!) or to respond negatively you say ไม่จริง (mai jing – not true)

A pronunciation tip is that the จ sound here isn’t exactly the same as ‘j’ in English, it’s somewhere between ‘j’ and ‘ch’. If you’re familiar with J.J. market and were curious why J.J. was the abbreviation for Chatuchak, it’s because sometimes ‘j’ is used to transliterate ‘จ’ and sometimes ‘ch’ is used.

Thai also has the 5 W’s (and 1 H). All very useful for constructing questions (or for understanding that you’re being asked a question).

ใคร (krai) – Who?

ใครคือเพื่อนของคุณ
krai keu peuan kong koon
Who is your friend?

อะไร (arai) – What?

อยากกินอะไร
yak gin arai?
What do you want to eat?

ทำไม (tam mai) – Why?

ทำไมแท็กซี่ไม่หยุด
tam mai tak see mai yud
Why didn’t the taxi stop?

ที่ไหน (tee nai) – Where?

ห้องน้ำอยู่ที่ไหน
horng nahm yoo tee nai?
Where is the bathroom?

เมื่อไร (meua rai) – When?

ร้านอาหารเปิดเมื่อไร
rahn aahaan berd meua rai
When does the restaurant open?

อย่างไร (yang rai) – How?

คุณเป็นอย่างไรบ้าง
koon bpen yang rai bang?
How have you been?

You might also hear ยังไง (yang ngai) for “How?” since it’s a bit easier to say than อย่างไร

รู้ได้ยังไง
rue dai yang ngai?
How do you know?

It’s also useful to be able to ask about quantities:

เท่าไร (tao rai) – How much?

อันนี่เท่าไร
an nee tao rai
How much is this one? (can use to ask about the price of an item at a shop)

กี่ (gee) – How Many?

คุณมีลูกกี่คน?
koon mee luk gee kon?
How many kids do you have?

Public Speaking in Thai

This weekend Thailand hosted its first ever PyCon: a conference dedicated to the Python programming language. This was a great opportunity to meet fellow developers in the region and learn more about topics like Deep Learning, Natural Language Processing, Graph Theory and more. I even contributed with a talk on Teaching and Learning with Python. Another fun part of the conference is the lightning talk session. Lightning talks are 5 minute talks that anyone can sign up for that happened at the end of each day in the main hall. It’s a chance for people to dip into speaking at a conference or to test the water for new ideas or just to share something cool they’ve been working on. While I already have some experience in that arena, I have zero experience speaking in public in Thai. I decided to take the risk of trying my hand at it. I’d say around half or more of the audience understood Thai, but definitely a large part that did not so I made slides in English and Thai but made a goal of only speaking Thai during the presentation. There were a couple times when I couldn’t think of the word I wanted to say in Thai and was tempted to just say it in English but didn’t, I either found another way to express myself or just left the comment out. Below are the slides I created and used for the talk:

I already started realizing how hard translating this all would be by slide 1. For the first word should I use เรียน (riian – to study at the elementary level), เรียนรู้ (riian rúu – to undertake to study; learn; study), ศึกษา (sʉ̀k sǎa – to study; to be educated; to receive education; to go to school; to learn (at higher levels such as college)) or something else? And the connecting word, am I learning/studying with/by/through programming? What’s the most Thai way to express it? And it seems I was so focused on getting the Thai correct that I forgot to capitalize the ‘p’ in Programming for my title in English.

When I actually gave the talk, I was thinking “should I explain what I’m doing in English, that I’m learning Thai and want to practice speaking or should I just start speaking in Thai, I’m sure it won’t be very hard for them to figure out I’m just learning…” I jumped right in with an unsure “สวัสดีครับ… ทุกคน ยินดีต้อนรับ” (sà wát dii kráp… túk kon, yin dii dtɔ̂ɔn ráp – Hello… everyone. Welcome.”

After the initial awkwardness, I felt a little more comfortable. Sure, I’m speaking a new language and I might mess up but there are slides to help people figure out what’s going on even if I mispronounce something. I push my students who are English Language Learners to take risks and make an attempt. It’s more about pushing yourself out of your comfort zone and learning and getting your point across than delivering a perfect speech.

“วันนี้ผมจะพูดเกี่ยวกับ…” (wan níi pǒm jà pûut gìao gàp – Today I will speak about…)

Now for introductions. Pretty standard for a presentation, but it did feel rather like day 1 in a language class.

ประมาณ (bprà maan – approximately) was a new word for me. I’ve heard it before but I’ve never actually used it in conversation. I think the experience of using it in a talk in front of a large audience will help it stick in my memory pretty well.

Got my first laugh here. There’s a term for people who are half Thai, ลูกครึ่ง (lûuk krʉ̂ng – half child).

“ไม่ใช่ลูกครึ่ง เป็นลูกครึ่งครึ่ง” (mâi châi lûuk krʉ̂ng bpen lûuk krʉ̂ng krʉ̂ng) – “I’m not half Thai, I’m half half Thai”

The term for people like me who have 1 Thai grandparent and 3 non-Thai grandparents is “ลูกเสี้ยว” (lûuk sîao – crescent child) a reference to the crescent moon.

An interesting tidbit about the Thai language is that there are different words for maternal and paternal grandparents, so by using the word คุณย่า (kun yâa – paternal grandmother) instead of คุณยาย (kun yaai – maternal grandmother) it can be inferred that it’s my dad’s mom who is Thai, not my mom’s mom without me needing to elaborate.

After introductions I showed a few of the programs I made to help me learn Thai and explained briefly what they did. The first one was my program to help tell the time. This came from one of my first posts on this blog, Telling Time in Thai.

Second program, my Days of the Week quiz, also about something I made for the blog. I did say the English words “Saturday, Sunday, Friday” here because I was explaining that you have to select the correct English word in this example. Though my childlike enthusiasm when saying “ถูก!” (tùuk – correct, can also mean inexpensive) got me another laugh from the crowd.

This is the only example I shared that isn’t from the blog, JamDai, the Vocabulary Card Matching Game I made. Instead of ถูก, this one ends with a supportive เก่งมาก (gèng mâak – very good, clever, skillful, superbly performed).

The final example I shared was the Thai Chat Bot I made recently. Got a couple more laughs here excitedly reading the chat between myself and the bot and explaining that the bot is male since he uses the polite term “ครับ” (kráp) instead of “ค่ะ” (kâ).

Though, if I end up adding text-to-speech that may change since all the existing Thai text-to-speech tools I can find only have a female voice. I have noticed that general service messages, or posted announcements tend to be either gender neutral or use female terms. Another interesting difference between Thai and English is that there’s no difference between she and he, it’s the same word (เขา – kǎo) so no need to worry about misgendering someone because you don’t need to refer to people by their gender. Though you do gender yourself by the self-referential pronouns you use, ผม (pǒm – I (male)) and ฉัน (chǎn – I (female)). There are instances when speakers will use the opposite gender terms such as a male using female terms with close family members or intimate partners to show softness/gentleness (it’s common for male singers to use ฉัน in love songs for example) or women might use male terms to show harshness or to be stern. Reveals some of the cultural connotations surrounding gender.

I’m very glad I took this risk even though it was scary, I’m happy with how it went. I hope to continue growing and using my Thai language skills. It would be great to be able to speak directly to the parents of my students who speak Thai instead of relying on a translator (though, the Thai staff that helps us with that are awesome!) And of course, the most rewarding way in which I use this skill is getting to connect more with my family members on this side of the globe. Even though initially, I barely knew any Thai, they’ve been so kind, welcoming and warm to me.

I have to give a special shout-out to my wonderful girlfriend, Mild, who took a look over my slides for me and offered suggestions to improve them. In general, she’s been a huge factor in helping me learn and pushed me take chances like this.

Gaggan

I’ve been living in Bangkok for almost a year now. This city happens to be the home of the restaurant voted the best in Asia for three years in a row. There’s an episode of Chef’s Table on Netflix about it. I’m talking about the Progressive Indian restaurant named after its head chef, Gaggan. I finally decided to check it out. I’ve been to a few fine dining establishments including a couple Michelin Star restaurants but this experience was pretty unique. Starting with the menu. Here it is:

Yep, just a list of 25 emojis, each representing one course. If you’re wanting to check it out for yourself and you don’t want any spoilers, you may want to stop reading here. However, the menu does change every few months so if you do go, most of these dishes will probably have changed.

1. Cucumber Aloe Vera 🥒

A cool, refreshing drink to start off the evening. Meant to be downed in one shot.

2. Yogurt Explosion 💥

The second course is similar to spherified olives made famous at El Bulli (where Gaggan worked at one point). You can slurp it up all at once and you don’t taste much until you bite into the thin membrane and get a taste of the yogurt flavor all at once.

3. Lick It Up! Brain Curry 👅

Next up is an incredibly fun dish. Before the food is presented an mp3 player with a portable speaker playing Kiss’s song Lick it Up is brought to the table which seems to not-so-subtly give you instructions for how to consume the food on your plate (no silverware provided).

4. Caviar Horse Radish Egg 🥚

After the fun of the last dish, you’re given another one-bite morsel to keep the rapid pace of the meal going.

5. Tom Yum Kung 🦐

When my kids visited Thailand, one complaint they had was that the food was too spicy here. At one point they requested ice cream and I teased them, warning them that the ice cream might be spicy as well. Well, this dish is proof that yes, you can get spicy ice cream in Thailand. All the great flavor of Tom Yum in the cold form of ice cream wrapped up in rice paper and served in a deep fried prawn head. My dining partner was allergic to seafood so this is can easily be modified by not coming with the last part.

6. Eggplant Cookie 🍆

Another quick hit of deliciousness. The last dish was something normally served piping hot but made frozen. This one is a vegetable turned sweet treat.

7. Chilly Bon Bon 🌶️

One of my favorites of the night. This thin shell of white chocolate comes loaded with a liquid chili sauce. Sounds weird but it was excellent. Really, that description could be applied to many of the dishes.

8. Idly Sambar 🍚

Here we get some foam: another staple of modern, progressive cuisine. Had a nice nutty flavor to round out the sweet spiciness of the Bon Bon from before.

9. Yum Pla Duk Foo 🐠

Another Thai dish spun on its head. Pla Duk (ปลาดุก) is catfish. This one came wrapped in a sheet of onion paper which had a great texture and taste. It even came with some nuts which are always great but we had to resist eating them all so we didn’t fill ourselves up. Still over twenty courses to go!

10. Keema Pao 🐐

The emoji’s a goat but inside this was lamb, they begged our pardon for the mismatch but the great, savory taste made me forget all about the switcheroo they pulled.

11. Turnip Uni Taco 🌮

Next up was a bite-sized taco made of turnip served atop the shell of a sea urchin. The waiter made sure to warn me against eating the spikes below.

However, there was more to eat inside the shell lurking beneath the taco.

12. Churtoro Sushi 🍣

Gaggan plans to close its doors in the next couple years as the chef will head out for his next culinary adventure in Japan. So, it only makes sense that he’d be experimenting with some sushi. Here, instead of served on rice, we have the raw fish on a meringue.

13. Foie Gras Yuzu Ghewar 🍊

This was the first dish where we were asked to guess about the ingredients. The citrus flavor came from an orange/lemon gel and interestingly mixed with the larger portions of goose liver pâté.

14. Anago Mole 🍫

Another guessing game. Living in Thailand, it was pretty easy to tell the inside was sticky rice but also from being from near the American South and seeing the chocolate emoji, I was also able to identify the mole rather easily.

15. Kintoki Carrot Rasam 🥕

Very smooth, warm drink that bore a resemblance to blood. Mmm.

16. Pork Vandaloo Black Garlic Momo 🥟

With a lengthy, self-descriptive name, there’s not much more to add here. Except that it tasted amazing. The bomb dot com.

17. Scallop Uncoocked Raw Curry 🥥

Lovely dish with an interesting mix of textures. The “shell” was actually crafted from coconut and it gave a nice crunch to complement the softer raw scallop that it was paired with.

18. Prawn Balchao 🍤

Second shrimp (or prawn, I can never tell the difference) of the night but actually got to eat some of its meat this time, not just its crunchy, fried face.


A great alternate version of the dish is provided to those with seafood allergies that’s made with paneer instead of prawn.

19. Return of the CTM 🇬🇧

Fish ‘n’ chips turned into a bite-sized sandwich. Simple. Scrumptious.

20. Edamame Shitake Charcoal 🌑

This one, I wasn’t able to guess but I still enjoyed it immensely. There were clearly mushrooms and some green vegetable inside. When we were told it was edamame, it seemed pretty obvious after the fact. But, this whole meal was great at mixing flavors together to give them a unique taste when combined in different ways.

21. King Crab Curry Rice Paturi 🦀

Finally made it to the main course and it definitely had some substance to it. I felt myself getting full by this point for sure but I am a solider so I carried on through dessert.

22. Beetroot Roses 🌹

Served under a glass (not pictured) in a very “Beauty and the Beast”-esque style. Elegant presentation and taste.

23. Flower Power Rose 🌼

More flowers, more happiness. 🌼🌼🌼

24. Oragami Caramel 🍬

Edible paper folded into fortune tellers reminiscent of middle school containing caramels of different varieties including sweet, salty, and sour.

25. Yin Coffee Yang Sesame ☯️

What a beautiful dish to end on. Peace.

Making a Thai Chat Bot

An assignment I’ve seen several Computer Science teachers give their students is to write a chat bot. I thought that could be cool to do with my students and I always run though assignments myself before assigning them to a class. So, for my take on the assignment, I decided to make a chat bot that speaks Thai. For the code, check it out on codepen. Note that the bot only knows the Thai script, phonetic transcription won’t work. To chat with it visit this page or try it out below:

 

 

 

 

 

 

 

There are lots of Natural Language Processing (NLP) tools out there for English but there aren’t as many in Thai. I took a pretty naive approach to my implementation since there are several challenges in NLP unique to Thai (even tokenizing words is nontrivial since there aren’t spaces between words in the Thai script).

The relevant function in the code is the one that determines what the bot’s response will be to what the user types. To start, lets just have it respond with ไม่เข้าใจ (mai kao jai – I don’t understand) to anything said. Our bot just arrived in Thailand and doesn’t know any phrases other than this.


function chatbotResponse() {
  botMessage = "ไม่เข้าใจ";
}

Alright, we have something going. Next, let’s teach our bot some basic greetings. How do we know if someone is greeting us? We could check to see if the user includes “สวัสดี” or “หวัดดี” anywhere in their message. That covers formal or informal and whatever articles someone may add at the end. It would catch user messages like “หวัดดี” (wat dee – hi) and “สวัสดีค่ะ/ครับ” (sawatdee ka/khrab – Hello) or as my first student tester entered: “สวัสดีจ้าาา” (sawatdee jaaaa – more colloquial way of saying hello in chat) Let’s respond with a random greeting such as สวัสดี (sa wat dee – hello) or สวัสดีครับ (sa wat dee khrab – hello). I’ve chosen to make my bot male so I’ll use particles like ครับ instead of ค่ะ. I’ll remember that going forward to stay consistent.


if (lastUserMessage.includes('สวัสดี') || lastUserMessage.includes('หวัดดี')) {
  /* randomElement is a custom function to pick one of the words in the given list */
  botMessage = randomElement(['สวัสดี','วัสดีครับ','สวัสดีครับ']);
}

Cool, now maybe we should give our bot a name. “Bot” seems appropriate, but let’s write it in Thai:


botName = 'บอท';
if (lastUserMessage.includes('ชื่อ')) {
  botMessage = 'ผมชื่อ' + botName;
}

Again, บอท is male, so we used ผม (pom) for I instead of ฉัน (chan). Next, we should check if the user is asking how we are. Since Bot is a pretty chill guy let’s have him always give a positive response.


  if (lastUserMessage.includes('เป็นอย่างไรบ้าง') || lastUserMessage.includes('สบายดีไหม') || lastUserMessage.includes('สบายดีมั้ย')) {
    botMessage = 'สบายดีมากครับ';
  }

Alright, we’re beefing up Bot’s vocabulary. How about another easy one, “Thank you” and “You’re welcome”. In Thai we might say thank you with either ขอบคุณ ครับ/ค่ะ (kop khun khrap/ka) or the more casual ขอบใจ (kop jai). We could respond with ยินดีครับ (yin dee khrap – you’re welcome) or ไม่เป็นไร (mai bpen rai – no problem/no worries), and of course we could always throw a ครับ (khrap) at the end to add some politeness.


  if (lastUserMessage.includes('ขอบคุณ') || lastUserMessage.includes('ขอบใจ')) {
    botMessage = randomElement([
      'ยินดีครับ',
      'ไม่เป็นไร',
      'ไม่เป็นไรครับ'
    ]);

Let’s give our bot a useful feature. How about telling you the time if you ask? กี่โมง (gee mong (long ‘o’ sound)) is how to ask what time it is so let’s check if the user writes that. And if so, we’ll print out the current time.


/* what time is it? */
if (lastUserMessage.includes('กี่โมง')) {
  botMessage = new Date().toLocaleTimeString();
}

Now, how about a sense of humor? When chatting in Thai, it’s common to see the number 5 (pronounced ‘ha’ in Thai) used for laughter. Maybe 555 or even more 5’s if it’s really funny. So, if we see the word ตลก (talok – funny) in the user’s message let’s output a string of 5’s (anywhere from 3 to 9) to indicate Bot’s amusement.


if (lastUserMessage.includes('ตลก')) {
  let extra_fives = Math.floor(Math.random()*6);
  botMessage = '555';
  for (var i=0; i < extra_fives; ++i) {
    botMessage += '5';
  }
}

Alright, let’s try something a bit more complicated. Let’s try to detect if the user is asking a question and respond either positively or negatively. ไหม (mai, also written as มั้ย) is a particle added to the end of a statement to make it a question. i.e.

เอาไหม (ow mai – do you want it?)
or
ไปไหม (pai mai – do you want to go?)

To respond positively we just chop off the question particle and use the verb i.e.

เอา (ow – I want it)
or
ไป (pai – let’s go)

To respond negatively we still chop off the particle but also add a negation (ไม่ – mai, with a falling tone) in front i.e.

ไม่เอา (mai ow – I don’t want it) or
ไม่ไป (mai pai – let’s not go).


if (lastUserMessage.includes('ไหม')) {
  let i = lastUserMessage.search('ไหม')
  botMessage = lastUserMessage.substr(0,i);
  let coinflip = Math.floor(Math.random()*2);
  if (coinflip) {
    botMessage = 'ไม่' + botMessage;
  }
}

if (lastUserMessage.includes('มั้ย')) {
  let i = lastUserMessage.search('มั้ย')
  botMessage = lastUserMessage.substr(0,i);
  let coinflip = Math.floor(Math.random()*2);
  if (coinflip) {
    botMessage = 'ไม่' + botMessage;
  }
}

I won’t list every single thing I put into the program here but I’ve added more stuff to it. Feel free to chat with บอท to find more messages I’ve added. Or peek at the code. If you’ve got more suggestions for what to teach him, let me know!