A couple of years ago I got a subscription to Cook’s Illustrated, a fabulous food magazine. It has a few distinctive features:

  • IMG_1873no ads! this hugely increases my happiness in reading the magazine cover-to-cover
  • the recipes are written like science experiments
  • the interiors are all black-and-white, with some photos replaced by schematics or pencil-sketch-style drawings (see right)

I’ve added quite a few delicious items from the magazine to my regular rotation of dishes, including carne deshebrada and wheat berry pancakes. This month’s issue had something entirely new for me.

The recipe is for a vegetarian burger. I’ve had veggie burgers before, but they always had the look, taste and texture of hockey pucks. To the contrary, these ones are pretty satisfying on all counts. Especially if you like your burger loaded with fixin’s, you can barely notice the difference in switching from beef burgers to these beany bad boys.

The patties

The patties

Here’s the outline of the recipe. I imagine you can use whatever herbs and spices are your favourite and it will turn out great no matter what.

  1. Drain two 15-ounce cans of black beans. Let sit on paper towels to dry thoroughly.
  2. Weigh one ounce of tortilla chips by into a food processor. Pulverize.
  3. Add the beans to the food processor and process until they have the texture of ground beef (approx 5 pulses).
  4. Beat two eggs. Incorporate 2 tbsp flour; this will be the glue to keep the burgers together. Add herbs (4 green onions and a half-bunch of chopped cilantro leaves) and spices (1 tsp cumin, 1/2 tsp coriander, 1/4 tsp each salt and pepper, 1 tsp sriracha, 2 minced garlic cloves). Stir.
  5. Combine “glue” with bean-chips mixture and stir with a spoon until uniform.
  6. Important! Let the mixture rest, covered, in the fridge. Rest for at least 1 hour and at most 1 day.
  7. Form about 8 patties (or 12 to 16 sliders). Fry in a generous amount of vegetable oil at medium-high heat for 5 minutes per side.

We still have a couple left (pictured above). Just to make sure I don’t forget how to be a carnivore, I’ll be eating one topped with bacon slices for dinner.


Mexico

12Aug15

Better late than never, I wanted to post some memories from the trip we took to Mexico this summer for my brother’s wedding. Disclaimer: due to time zone changes, cerveza, or other factors, my memories of which thing happened on each day may have shifted.

Day 0: We got rebooked and had a slight delay but arrived in the afternoon to meet my family at the resort. It was a beautiful place. I played gigantic human-sized chess with my sister, who whomped me. At least there were free drinks to drown my sorrows. We went to the French restaurant on-site and had a delicious 3-course dinner.

IMG_1230

The newlyweds’ patio

Day 1: Had a great night’s sleep (no dream of being attacked by giant knights and bishops). We rendezvoused with siblings, siblings-in-law, and brother’s other friends at the various beaches and bars. We took taxis to Playa Del Carmen for a special dinner arranged by the newlyweds-to-be. Before returning home we checked out what I presume is one of the world’s largest souvenir stores, but managed to escape without purchasing anything.

IMG_1263

Central square in Cancún

Day 2: Ate a delicious breakfast (as usual); there were omelette stations and bottomless mimosas but I think on this day I composed some huevos rancheros. We started checking out the attractions off-site. Sara and I went to a particularly cool cenote named Río Secreto… it reminded me of past spelunking adventures but was much more chilled out. We skipped paying $100+ for the entire set of pictures but snapped a blurry bootleg of one image. We went to Cancún city afterwards; we got a little lost but then discovered some random outdoor concert/festival with lots of locals. It was a great adventure together, all in all. I tried out the churros. Verdict: they were delicious!

IMG_1278

Brad, Isaac and me

Day 3: My brother Brad’s wedding. Got my fancy clothes on with him and then we headed out to the bar for his last pretzel as a free man. The other groomsman Isaac was there to party in fine style (pictured: the fanciest bathroom I’ve ever been in). The wedding was on a beautiful beach, with beautiful people, and beautiful food. Brad and Claudia gave very heartfelt speeches and it was my honour to spend that day celebrating with them. There was an extremely delicious cocktail made with special Pisco (a national beverage for the bride). Then as it got dark we saw just how good the resort was at wedding planning :) From what I recall we danced with pool noodles, glowing glasses, balloons, noise makers, and managed to stay until the closing of not one but two bars on the resort.

IMG_1567

Brad, Claudia and the Atlantic ocean!

Day 4: Recovery. We played a lot of volleyball in the pool. Delicious mexican restaurant on the resort for dinner!

IMG_1662

Chichén Itzá’s one unrestored face

Day 5: Adventure. We rented two cars and drove out to Chichén Itzá. It was a very hot day but we had a good tour guide to keep us motivated. The driving was extremely peaceful as the highways were pretty empty. We learned that there were special acoustic effects built into the pyramids’ architecture, and that a lot of people “lost their heads” over competitive sports back in Aztec days. After escaping to some frosty beverages, we headed to Cenote Ik Kil; this cenote was a swimming hole set about 20 metres underground, with some fish patrolling the waters underneath us, and huge diving platforms overhead. Finally we headed to a delicious dinner of local Yucatan cuisine at Las Campanas, checking out Valladolid’s picturesque church before returning home.

IMG_1685

Valladolid church

Day 6: I went on a whale-shark expedition with my cousins’ significant others, Matt and Taka. (Sara has a fear of neckless animals so she decided to pass.) I managed to put on my contacts while on deck a boat speeding across the open ocean, which was exhilarating. We chased those whale-sharks (they are vegetarian sharks the size of whales) for a good couple of hours, stopping 4 or 5 times to get in the water with them. Each time we dived in we were disoriented, not just from being besnorkeled and finned, but also from the sheer scale of the creatures. They normally carried in tow an entourage of feeder fish to their sides, above and below. They were as large as a bus and moved just as fast but it looked effortless and so it was a strange feeling trying to chase them while swimming. It was an unforgettable experience! They served some ceviche with hot habanero peppers on-board, afterwards, and we did some more low-key snorkeling near a beautiful reef. We had one more dinner back on the resort and my family kindly endulged us to show them pictures of our trip to Iran, for which we repaid them in Persian sweets.

1907534_10153106305677779_8543131792247377551_n

I think this is our best direct evidence of being with the whale sharks

It was an amazing trip, both relaxing and full of unique celebrations. Congratulations again, Brad and Claudia! And thanks for bringing us all together on that awesome trip.


Websheets

03Jul15

Next week I am headed to the ITiCSE conference (Innovation and Technology in Computer Science Education), in Vilnius, Lithuania, to present Websheets, an exercise system for programming problems in C++ and Java.

Websheets combines a couple of ideas.

  • It is an online system where students get immediate feedback on their programming solutions. This has become very common in recent years, though not many support C++, and not many are open-source (the biggest exception being the awesome CloudCoder system).
  • An exercise isn’t just a big blank page, rather it’s a template with specific gaps to be filled in. The motivation for this is a system of hard-copy handouts used at Princeton… the idea being that, if you are just teaching one topic that day, and you have limited class time, it would be better to give the boilerplate and off-topic bits of the program to the students ready-made, so they can make better use of their limited in-class time.

Try it out! Go here and read all about it:

http://cscircles.cemc.uwaterloo.ca/websheets.html

If you create any cool exercises to share, or find ways to break it horribly, I’d love to know.

In the last couple of weeks I’ve done a few fun things to it:

  • I combined the Java version from Princeton and the C++ version from USC.
  • Taking inspiration from CloudCoder, you can now create and edit exercises online.
  • Teachers can now keep track of their students, like we did last term at USC. (We hosted some very low-value homeworks on the system; basic stuff to complement the readings and help students stay focused.)

Moving past the technological part, I’d like to eventually do a study to measure the effects of different types of scaffolded exercises in the classroom. Is it better to provide more scaffolding or less? Though one may be faster, do you learn more from doing more work? Or is the code reading of the scaffolding itself an important skill?


Visiting Iran

23Jun15
Tehran's awesome mountain backdrop

Tehran’s awesome mountain backdrop

I had an amazing vacation this year! For 3 weeks I travelled to Iran where I got to visit several historic cities, meet my wife’s extended family, and participate in my sister-in-law’s amazing wedding. This was followed by one more fantastic week in Mexico for my brother’s destination wedding, which deserves its own post later.

One thing several friends have asked is: how difficult is to get to Iran in the first place? The answer for us was, pretty easy, it was just a lot of paperwork. (Caveat: this is only our answer from the perspective of a non-Iranian married to an Iranian, not just a visiting friend.) Here’s what it was like for us:

  1. We registered our marriage with a “daftar” in Toronto, which took about an hour during the week we got married last summer.
  2. We registered our marriage with Iran’s offices in Washington, DC. This is a long form that requires copies of everything from step 1, our Canadian marriage documents, as well as a police record check, passport copies, signatures from her dad, passport photos… and I sent a blood test for AIDS and drugs too though I no longer see that requirement listed.
  3. Sara’s parents sent a visa invitation letter to Tehran.
  4. Once that was approved, I got a visa application number and sent in my visa application paperwork to Washington along with my passport. I got the passport back in a few days.
Fakin' bacon

Fakin’ bacon

We booked our flight somewhere in the middle of the process since there was a good sale, but luckily all of the steps went without a problem. We sent in the Step 2 documents in February and Sara’s parents did Step 3 in March (be careful that the government stops everything for 2 weeks in late March for the Persian new year).

Our trip actually started by visiting Dubai in the United Arab Emirates, just for the sake of seeing something new. There, we made a Canadian pilgrimage to several Tim Hortons locations. They had freshly squeezed orange juice, faux bacon breakfast sandwiches, and delicious hot brown water, needless to say. We also went in the UAE coast of the Persian Gulf, had a nice IHOP breakfast opposite the world’s tallest building, visited the spice/gold bazaars, did some shopping at the gigantic Dubai Mall, and went on a short boat tour. We walked a LOT which was pretty challenging because it was super hot and humid.

Jamshidiyeh Park

Jamshidiyeh Park

After that short visit we took our next flight, bringing us to Tehran. It is the capital city of Iran, where Sara grew up. Tehran is only about 250 years old (pretty young by Persian standards) and it is a massive city. Its population is over 8 million, approximately equal to New York City, and it also has about the same size. The first couple of days there were spent exploring her neighborhood and seeing some of her family. Her dad offered to buy me some ice cream from the nearby Bastani Madar, so I took him up on his offer and got bastani ob havich, which is a scoop of vanilla ice cream floating in a cold glass of carrot juice. Sounds weird, I know, but anyone who’s had it can attest to its deliciousness. We managed to check out some sights at Jamshidiyeh Park and Niyavaran Palace before moving on to our next stop.

IMG_0505We took an overnight train with Sara’s mom to Isfahan. This city, a former capital of Persia, is known for its art and its architecture — even the train station had lovely arches rising up to the ceiling. On the right you can see a picture of the big “bazaar bozorg” with several notable features. First, more beautiful ceilings with geometric cutouts leaving lighted spots on the floor. Second, a car headed in my direction, which was typical traffic, pretty amazing given how narrow and twisted the pathways were.

---

Si-o-se pol

Esfahan had a lot of different sights to see. There is a huge rectangular public square called naqsh-e-jahan; at its center are gardens and pools, around the sides are vendors (part of the bazaar), and it is flanked by 4 main features, one on each side: a big mosque, another even bigger mosque, a palace, and the bazaar’s main entrance. The city’s wide boulevards bring you from this area through several parks, palaces, and si-o-se pol, a beautiful old bridge. Out of town, we visited an ancient zoroastrian fire temple (ateshkadeh).

One of the most memorable parts of our visit to Esfahan is actually the hotel we stayed at, Hotel Abbasi, which had not only a kickin’ breakfast buffet, but also a central tea garden where we refreshed ourselves in the evenings with tea, sweets, soup (ash-e-reshteh) and ice cream.

Hotel Abbasi

Hotel Abbasi

Part of Persepolis

Part of Persepolis

Our next destination was Shiraz, yet another former capital city. We started with one of Iran’s most famous historical sites, Persepolis, located an hour’s drive outside of the city. This is where the Persian empire was centered during the Achaemenid days of Cyrus the Great, Darius, and Xerxes. It was burnt down by the army of Alexander the Great in 330 BC — reputedly in revenge for Xerxes’ burning of the Acropolis in Athens 150 years earlier.

Persepolis was a large series of palaces, the size of a village, with foundations and pillars made out of stone. From a historical perspective it is pretty amazing that it’s survived 2500 years because that period includes several conquests of Persia by caliphates and mongols that tended to destroy all cultural artifacts they could get their hands on. The reason that it survived is that it was buried by dirt and sand not long after it was burned to the ground, and only in the mid-1800s did archaeologists re-discover and start to excavate the site.

Mikhai bekha, nemikhai, nakha

Mikhai bekha, nemikhai nakha

Visiting Persepolis brought me face to face with a lot of ancient Persian history: the cuneiform script in which Old Persian was written, Zoroastrian history, and the Farvahar symbol. But a lot of the most interesting parts of the story are still visible. On the Apadana Staircase you can see an inscription showing the annual tribute festival where distinctive people and gifts are depicted from each of Persia’s 28 provinces at the time (spanning the globe from India to Ethiopia). This was definitely an important place to hire a guide since he was able to explain this history, make us aware of the symbolism, and bring life to the ancient ruins.

Here are a couple more cultural highlights from Persepolis thanks to our guide:

  • Iran Air logo imitation

    Iran Air logo imitation

    The main entry stairs to Persepolis were constructed with an especially short height because it was important that world leaders, walking up these stairs together in their flowing robes, could talk without fear of tripping.

  • The logo of Iran Air is based on the two-headed cat statues of Persepolis (see right).
  • Those cats had interchangeable ears depending on the occasion (like Mr. Potato Head).
  • If a Persian grabs you by two fingers, they are just bringing you to a party: every delegation pictured on the Apadana staircase was led by a Persian guide doing this. Make sure to bring presents.
  • Unlike the great pyramids, Persepolis was not built by slavery. Archaeologists have found records of payments to builders, and health insurance.

Shiraz is also home to relatively newer attractions. We went to an amazing kebab place that evening and had salad shirazi (diced salad of tomatoes, cucumber, onion and lime juice). A surprising source of culinary inspiration was the tomb of Hafez, the most famous Persian poet. It was one of several places that we had faloodeh, the famous rosewater sorbet with vermicelli noodles served with lime juice.

IMG_0631

The tomb of Hafez

The teahouse also had masghati, a.k.a Turkish delight. I remember eating this once in Turkey but it was just kind of weird. The one at Hafeziye was pliable, fragrant, and delicious! In explaining it later to my friends I have described it a big spherical gummy bear with nuts inside of it, and this seemed to help more people try it :)

We visited a few other things in Shiraz including a lively public park (a nice break from the tourist attractions), an old citadel, a beautiful palace called Naranjestan (literally, land of the oranges) and the Nasir al-Molk mosque due to its famous stained glass windows.

Just as we were leaving Shiraz, some random people on the street offered us some free beverages. The cab driver explained that this is common on holidays so we grabbed a few and it turned out to be an extremely delicious lime cordial, simply made from water, sugar, and juice from local shirazi limes. Merci, Shiraz!

Once back in Tehran, several members of Sara’s family had dinner gatherings which were awesome. Her aunts and cousins were great to meet and hang out with, and extremely gracious in letting me practice my Farsi. They cooked so much food for us! I may have arrived in Iran with a little bit of a Persian tongue, but I left with a fully Persian belly.

Sofreyeh Aghd

Sofreyeh Aghd

A few days later, Vida and Navid’s wedding took place in the outskirts of Tehran. It was completely awesome. Sara and I commissioned a sofreyeh aghd for our own Persian-Canadian wedding last year, so I had some general idea of what to expect. But, the location of their wedding was not only beautiful and elegant, but huge! It was an outdoors setting with gardens, streams, ponds, musicians, tea, but more importantly, a ton of food and lots of dancing. The area with traditional instruments included a daf (like a large tambourine) and tombak (another drum) where, as I hope the wedding footage will attest, we got some of Navid and Vida’s aunts and uncles on the dance floor. I want to thank both of them heartily for including us in their wedding party on their special day.

Darband

Darband

We had one night in Tehran to relax by ourselves. Thanks to the suggestion of Sara’s cousin Azita, we went to visit Darband, and it made for one of the best nights in the whole trip. Darband is a path up in the mountains to the north of Tehran, nestled in a long crevasse populated by kebab stands, dried fruit merchants and cafes. The path continues up to hiking though we didn’t make it that far, getting distracted by kebab barg and shishlik for dinner, followed by shisha, tea and Persian dates on a traditional platform (takht). The next time I come back, it will definitely be an area ripe for further investigations.

Following this, we made the trip up to Mazandaran province where Sara’s parents are originally from, partied with even more of her family, and got to put our toes in the Caspian Sea thanks to her niece Negar.

If you are planning to visit Iran, two other practical things are useful.

  1. A practical thing that I strongly recommend is getting a data SIM card for your phone. We got one in an Isfahani mall; it was very cheap though it required some paperwork that Sara’s mom filled out. We went with Irancell (MTN), which seemed like the most popular national carrier, and bought a data plan for it later on (we bought prepay-refills from corner stores and then bought “plans” using text messages).
  2. I brought a Lonely Planet travel guide and it was invaluable, especially because we were visiting so many cities (and because several of those visits were before I had the data SIM). Though not all of the recommendations were totally accurate (the Shahrazade restaurant in Isfahan was pretty mediocre) I have to say that there was a ton of great food (Shater Abbas in Shiraz!) and zero food poisoning, plus we wouldn’t have known about most of the tourist sites otherwise. If you want to borrow it let me know!
  3. There’s a surprisingly large number of tourists in Shiraz and Isfahan; most of the ones we saw were from France, Germany, and northern Europe. Everything was safe and the locals everywhere were friendly, though you will of course be able to navigate things more easily if you travel with someone who is fluent in Persian.

If you do go, safar khoob daashte boshi — have a good trip!

Naranjestan, with people in traditional Shirazi cloth

Naranjestan, with people in traditional Shirazi dresses


Today I pushed some code that I used last semester for C++ visualization to github. The bad news is that it’s smoke and mirrors, but the good news is that it did the trick: it helped to convey important ideas about flow control and programming semantics to my students.

This is based off of the Python visualizer at http://pythontutor.com by Philip Guo. His visualizer takes an arbitrary Python program as input, and then creates an animated HTML illustration showing which lines of code are executed in what order, and also showing the values of the variables as they change. Eric Grimson had an antique visualizer running at MIT when I was a TA for their course 6.001, but the great and novel aspects of Philip’s one are that it was freely available online, could be embedded in other web pages, had a much nicer interface and output, and used a language that has fewer scary parentheses (and is for this reason more widely taught).

A couple of years ago, I scavenged the frontend of that visualizer and wrote a Java backend for it, creating the Java visualizer. This was very helpful during my stint at Princeton, where the introductory programming course I taught used Java.

Flash-forward to the most recent academic year, teaching C++ at the University of Southern California. I was very used to having a visualizer to show new concepts like for loops, function calls, object-oriented programming and recursion… I’d used it both in Python for CS Circles and for the Java course. The bad news is that the implementations in Python and Java are heavily dependent on modern features, such as a debugging API and reflection, which C++ doesn’t readily offer.

So here’s the “good enough” solution: write programs that are actually Java, but ‘skinned’ to look like C++.

Click on this link to see an example.

The actual code being run by the visualizer is the following:

public class C { public static void main(String[] args) { //><int main() {
 int x = 2;
 int y = 2;
 System.out.println(x+y);//>< cout << x+y << endl;
}} //><}

So it’s Java code, but the parts before //>< are being selectively hidden, so it looks like C++. More examples are available in the course notes.

The biggest disadvantage of this approach is that students can’t enter their own C++ code for visualization, which is a huge tool for learning (and debugging!) when available. But, it’s definitely better than nothing, and it saved me dozens of hours compared to creating PowerPoint animations for every single new control flow topic.

There is some hope that a real C++ visualizer could come about. At least two people have told me they have students working on it, both using text piping to GDB as a means to accomplish it. I think there’s some hope that LLDB’s debugging API could be used; or alternatively by using the same technology as valgrind. Until then, you can read about the fake C++ visualizer in all its glory here.


Happy Nooroz!

21Mar15

IMG_20150321_101634

For the first time since living in the US, we put together a haft seen ( هفت‌ سین : seven S’s) table! It has:

  • center: garlic (sir / سیر)
  • left: lentil sprouts (sabzeh / سبزه)
  • counterclockwise: apple (sib / سیب),
  • wild olive / oleaster (senjed / سنجد),
  • vinegar (serkeh / سرکه),
  • wheat germ pudding (samanoo / سمنو),
  • and sumac (سماق)

There are some bonus items too:

  • coins / sekkeh / سکه
  • wild rue incense / esfand / اسفند
  • a book by Hafez / حافظ
  • noon nohodchi (from Toronto; thanks Navid and Vida!) / نون نخودچی
  • on sofreh termeh fabric / سفره ترمه

And not pictured, the board scraper that I used to recover the samanoo when it exploded in its bag on the bike ride home.

I hope you have a prosperous new year!


About 2 weeks ago, I went to SIGCSE, which is the major computer science education conference. I talked about Computer Science Circles, its translations to other languages and translations of Python error messages to English; see the poster here. Like my last trip to SIGCSE, it was pretty great. I got to re-encounter previous colleagues, meet new ones, commiserate about C++, look at cool tools, learn more about pair programming, and I got to attend the famous “Nifty Assignments” session.

The food scene was also a good surprise! The event was held in Kansas City, Missouri. It turns out that not only is there a really great cafe (“The Filling Station”) tucked inside of an old gas station:

IMG_20150307_163459

But there was also an amazing BBQ joint inside of another gas station (this one in Kansas City, Kansas):

IMG_20150307_174949

Just to round things out and prove that there is food outside of gas stations, here are some shots from the farmer’s market in the River Market district:

IMG_20150308_115243 IMG_20150308_121215




Categories

Follow

Get every new post delivered to your Inbox.