Author Archives: kenny

Notes on Vietnam/Cambodia

I’ve been meaning to blog about some of the more entertaining experiences that we had in Vietnam and Cambodia. But in the meantime it turns out that my cousin is heading to southeast Asia tonight! I just finished the past hour composing the following email to him:

————————————————–
All our time in Cambodia was for the Temples of Angkor, so we can help a little with that (I assume you’re going there from Phnom Penh? If not you should rearrange your itinerary, it’s a must-see). We spent just over 2 weeks in Vietnam; it was enough time to hit all the main sights in a pretty relaxed fashion.

Vietnam is a very long country, and there are a lot of "dead zones" as far as attractions go. Fortunately there are ample 1 hour domestic flights that are very cheap (when booked in Vietnam).  Ours were all between $45 and $60 one-way.  We started in the North and ended in the South (with our side-trip to Cambodia in the middle), but you could also reverse it, or bypass sections entirely depending on weather.

Here’s what we did:

Hanoi — very interesting city from a cultural level.  In general the further south in Vietnam you go, the more "Western" the places feel (and the more expensive they get), culminating in Saigon.  2-3 days is plenty to take in what the city has to offer, with highlights including a water puppet show (right near Hoan Kiem Lake), the Old Market, the Mausoleum area, and the Temple of Literature.  A lot of thing in Hanoi are closed on Monday, so you should check schedules (especially for the Mausoleum).  Hanoi has the largest variety of street food (and better quality) in Vietnam.  One great street kitchen that is worth seeking out is Cua Hang Bun Cha (1 Pho Hue).  They serve crab spring rolls and fabulous bun cha. The best restaurant we ate at in Hanoi was "Little Hanoi" (14 Ta Hien). Quan an Ngon (18 Phan Boi Chau)  was also fun, it’s an outdoor food court atmosphere (they also have a branch in Saigon called Ngon).  69 Restaurant was overrated. Tandoor (24 Hang Be) had good Indian food.  The Old Market in Hanoi is the best area for shopping we found in Vietnam (Hoi An would be a close second).

Halong Bay — we took an overnight side-trip to Halong Bay when we were in Hanoi. This was the highlight of our time in North Vietnam.  It’s a beautiful area with limestone outcroppings. You kayak on the bay, swim if it’s warm enough, and check out some caves. The boat we used is the Santa Maria Cruiser, and you can contact them through www.columbuscruise.com The food on the boat is great, plentiful, and there are very good guides. There are a bunch of 1-day trips available, but it’s well worth spending the night (otherwise you’re on a bus for more time then you’re on the bay). It is winter time in the north though, so definitely check the weather.

Hue — we flew from Hanoi to Hue ($60), the old imperial capital of Vietnam.  We spent 3 days there, though realistically 2 would suffice.  1 day for the citadel and the items in town, and another day to take a boat ride on the Perfume River to all the Royal Mausoleums.  The imperial kings had palaces built in their own honor (a la the pyramids), and in general are the size of a small village. The "shared boat" is $2pp, don’t let yourself be ripped off by higher offers.  The Mausoleum of Khai Dinh was my favorite.  We stayed at Canh Tien Guesthouse (tvphuong@dng.vnn.vn; $15/night). Nice rooms in a place owned by the professor of foreign languages.  Fantastic location in an alley that has everything you could need.  Supposedly Halo hotel across the street is great as well. .  Next door to Canh Tien is a tasty vegetarian Buddhist restaurant called Dong Tam. Our favorite meal in Hue was at Lac Thien (6 Dien Tien Hoang). It’s run by a deaf-mute man (as is the place next door with a _very_ similar name). Be sure to order a beer (the best is Huda, the local Hue beer), and you’ll receive a wooden bottle opener along with a photobook showing people around the world with their openers.

Hoi An — from Hue we took a 3 hour bus to Hoi An, which we used primarily as a transit stop (we had a flight the next day out of Danang). They lied and told us that our bus was going to stop at the Marble Mountains (which is on the highland road and is supposed to be a very scenic ride). Instead we went through the tunnel. Not a big deal, but possibly something to watch out for.  You can also rent a private car for like $10. 1 day felt like the perfect amount of time to spend in Hoi An. It’s a small, cute, very touristy town. This is where people go to get hand tailored silk suits (and other clothing). We mostly hung out at the Cargo Club eating tasty pastries, ice cream (try the lemongrass ice cream, it’s fantastic), and people-watching. Hoi An is a great place to go shopping, and people are generally very friendly. We had a good lunch of grilled fish in banana leaf at Hong Phuc (86 Bach Dang on the water). There’s a little plaza just off the water near the market which has a bunch of friendly street food vendors, unfortunately we didn’t discover them until after dinner. Make sure your hotel is in the main drag. Ours wasn’t, and that kinda sucked. The hotel maps can be deceptive it turns out.

Nha Trang — We took a short flight ($45) from Danang to Nha Trang. Nha Trang is a great beach town, with a solid amount of tourist infrastructure.  Grab yourself a beach chair and umbrella for 20,000 dong ($1.25), and all your needs will be attended to. Women will arrive with offers of fresh fruit, grilled to order crabs and lobsters, massages, Vietnamese donuts, and more.  Make sure to haggle a bit for a reasonable price. The mangoes, pineapples, and dragonfruit were amazing. La Louisiane (near the south of the beach) offers great $6 massages in their pool area.  Our best meal in Nha Trang was at Truc Linh 3 (they own 3 similar restaurants in a 2 block radius). Many restaurants have fresh seafood on order that they will grill up in various preparations. Cyclo Cafe was also pretty good. The big tour that gets touted in Nha Trang is a boat trip "to the islands". We did this and it was a complete bust. We felt like our time would have been much better spent hanging out on the beach. For lodging we stayed at La Suisse (lasuissehotelnt@dng.vnn.vn; $23/night), which was very well located (2 blocks from the beach, close to restaurants and nightlife) and had nice rooms.

Siem Reap — we flew from Nha Trang to Siem Reap (via Saigon). I’m sure your guidebook has tons of info about Angkor, but here are some notes from our experience:

  • Food – Loved Khmer Kitchen (best amok curry that we had, recommend getting it with fish as is classic). Blue Pumpkin has great ice cream and pastries.  Best ice cream there was ginger with black sesame. The coconut, pineapple, and dark chocolate were also great. Soup Dragon was mixed (if you do go, get the spicy fish in claypot which was awesome).  Dead Fish Tower was a fun experience with decent food. Amok Restaurant was mediocore and overpriced.  Other good things to know is that Blue Pumpkin has 50% off their pastries/bread after 7pm and the Hotel de la Paix Cafe is 50% off after 8PM.
  • Temples – Sunrise at Angkor Wat is busy but not too crazy and well worth the early wakeup. We got a guide + driver for the first day (
    total cost $50) to cover Angkor Wat, Ta Phrom, Angkor Thom, with side stops at Kravan and Ta Keo. One day we got a (car) driver to go to Banteay Srei and Banteay Samre. Banteay Srei is far away but worth the drive (leave Siem Reap no later than 7am if you want to beat the crowds). We had a fantastic driver named Sun Same (sunsame99@gmail.com). He also took us on a boat in Tonle Sap lake and acted as our guide there as well. Smaller temples that often get missed but are worth checking out include Pre Rup, Ta Som, Neak Pean, and Banteay Kdei/Srah Srang.
  • Lodging — it’s high high season in Siem Reap right now, so book in advance if you can. We stayed at "The Villa Siem Reap" (thevillasiemreap.com; $35/night) which was well located and had very nice staff. Great fresh fruit plates and omelettes in the AM as well.

Saigon – Last stop for us in Vietnam was Saigon. Saigon is a big city. There aren’t that many sites (the one to make sure you see is the Reunification Palace). The Botanical Gardens were a bust. In general Saigon is about twice as expensive as Hanoi (hotels, food, etc). Still very cheap by US standards of course. Blue Ginger (37 Nam Ky Khoi Nghia) was the best restaurant we went to (and arguably the best food we had in all of Vietnam). Vietnam House was good, as was Temple Club (29 Tom That Thiep) which had an amazing tamarind fish.  Right next to Temple Club is Fanny’s, which is a great ice cream cafe.  Check out sunset from the rooftop lounge at the Rex Hotel. Pho 2000 (1-3 Phan Chu Trinhnear Ben Thanh Market) has great Pho and fruit shakes (try the soursop), as well as pictures of the staff with Bill Clinton 🙂

Mekong Delta – we took an overnight trip to the Mekong from Saigon. This was an adventure in an of itself (we’ll blog about it eventually). The short version is that you can get a bus from Saigon->Vinh Long (from Cong Ty Cp Van Tai Sai Gon) for 53,000 dong (I can send you the address tomorrow), and from Vinh Long  you should get a moto to Mekong Travel (No 8 – 1/5 Street, vinhlongmekongtravel@yahoo.com). Mekong Travel can then take care of you with some great itineraries that include boat trips and a homestay plus an English speaking guide for $20-$30pp depending on how many ppl you are (we paid $26pp for what turned out to be a 24hr private tour).  You can also arrange for a 1 or 2 day tour out of Saigon, but we did it this way to get a little further into the delta and because the tours seemed pretty cheesy.

Controlling HTTP Cookies on a WCF Client

A few customers have tried to control their HTTP Cookie headers from a smart client (using a previously cached cookie for example). The common experience has been “I enabled AllowCookies=true, and added the cookie using HttpRequestMessageProperty.Headers.Add. But somehow my cookie didn’t get included in my request.”

This is because “allowCookies” is a somewhat unfortunate name. When setting “allowCookies=true” on your HTTP-based binding (WsHttpBinding, BasicHttpBinding, etc), what you are indicating is that you want WCF to manage the cookie headers for you. That means that WCF will create CookieContainer, associate it with any IChannelFactory that is created from the binding, and then use that CookieContainer for all outgoing HttpWebRequests. The end result of this setup is that the user has zero control over his cookies, since the CookieContainer is taking over all management (including echoing server cookies if and only if a cookie was sent in an earlier response to that factory).

To cut a long explanation short, if you want to manipulate cookies on the client, then you (somewhat unintuitively) need to ensure that allowCookies=false.  In this manner, you are taking full responsibility for all cookies sent on that channel (in all cases, including capturing response cookies and echoing appropriately).

Diddy Riese (Los Angeles, CA)

Rating:

When Lauren‘s Mom moved to West LA, I was introduced to a little ice cream shop near UCLA.  They advertise snow cones, cookies, and ice cream on the menu.  But what has made Diddy Riese famous was their $1 ice cream sandwiches: two freshly baked cookies with a scoop of ice cream sandwiched beteen them. 

It’s a simple formula really, but their execution is flawless. Even after their price increase to $1.50 they’re still a bargain (the price increase was accompanied by a very apologetic note that explained the economics of the dairy industry and how a new contract requires some costs to be regrettably be passed along to the customer). You can choose two different cookies for the top and bottom if you’d like and choose from an assortment of Dreyer’s flavors.

After my first hit I was hooked, and since then Diddy Riese has become a necessary stop anytime I visit LA (its one block proximity to an In and Out makes for a tasty fast-food combo visit). 

The “classic sandwich” is oatmeal raisin cookies with vanilla ice cream. Today I had chocolate chip cookies with strawberry ice cream. Soft, fresh from the oven cookies. Ice cream soft enough for a sandwich but cold enough to avoid a quick melt.  There are few better things I can imagine on a sunny LA afternoon.

  

Diddy Riese
926 Broxton Ave
Los Angeles, CA 90024
(310) 208-0448

Junior's (Los Angeles, CA)

Rating:

Thanksgiving. Day of cranberry salsa and closed restaurants. We had the bright idea to get In and Out for lunch today. Fortunately we remembered to call on our way to see if they were open. No dice. So we drove around briefly near Helene’s place and found that Junior’s Deli is open on Thanksgiving until 5PM.

I first went to Junior’s on New Year’s Day after a nasty bout with the stomach flu (it was the first solid food I had in 3 days). So while any memories there are suspect, I had a positive recollection of the food. When you first walk into Junior’s you are greeted by a large display case of pastries, including a few kinds of tasty rugelach. Further inside is a fairly standard diner setup, with a NY deli-inspired menu.

Given the large Thanksgiving dinner awaiting us tonight, Shawn, Lauren and I shared a tuna melt and some cheese blintzes.

The tuna melt was grilled on fresh Jewish rye bread, stuffed with freshly mixed albacore tuna salad and the obligatory melted chedder. All in all a very solid tuna melt. We ordered “mini potato pancakes” in place of fries. I was expecting smaller versions of the classic latkes; flat and shredded potato based. Instead we were treated to an entirely new dish — asteroid-shaped potato puffs that were briefly deep fried. Crispy on the outside and a little mushy on the inside they were closer to hush puppies than potato pancakes, but thoroughly enjoyable.

Since we’d likely have our fill of turkey this evening, we opted for a set of cheese blintzes instead of a turkey sandwich. Original plan was to order a mix of cheese and blueberry blintzes, but they were out of blueberry. So we got a trio of cheese blintzes. They were fairly large, stuffed with a sweet ricotta filling, and seared on the outside shell. The blintz sheet was soft (outside of the crispy top searings), and the filling was sweet while remaining on the savory side of the palette.  Personally I would have blintz overload after one of them, so it was fortunate that we were sharing 🙂

 

Overall Junior’s provided a relaxed, tasty lunch and I’ll be happy to return for more deli and ruggies next time we’re in Westwood.

Junior’s
2379 Westwood Blvd
Los Angeles, CA 90064
(310) 475-5771

Bombay Café (Los Angeles, CA)

Rating:

When I told Don that I was headed to LA for Thanksgiving, he gave a list of his favorite food stops. A couple of them are very close to Helene’s place in Westwood, including Bombay Café.

Bombay Café is a nouveau Indian restaurant (it’s to Indian as El Camino is to Mexican). But they did stock the classic Indian brews, including a large Taj Mahal for my brother-in-law:

There were far too many good looking dishes on the menu to choose from, but since there were four of us we managed a reasonable initial sampling. We opted for one familiar dish that the entire Lavoie family enjoys: Saag Paneer. Bombay Café makes their paneer in-house, and it is notably fresh. The spinach was piping hot, a little sweet, and satisfied my spinach craving. That being said, it wasn’t overly distinctive and could have used a bit more spice.

 

 

The highlight of the meal for me was the Chicken Frankie. Frankies are supposedly a popular Indian street food (we haven’t made it to the sub-continent yet, so will have to wait for personal verification).  I can say that the one at Bombay Café was awesome — a dark masala sauce wrapped in a chapati “burrito” form.

I had never heard of white poppy seeds, and so couldn’t pass up the Goan Shrimp Curry (served in a puree of white poppy seeds, coconut and cilantro). It was Helene’s favorite of the pack, and my second favorite after the Frankie. If you like coconut, shrimp, and Indian food then you should definitely get the Goan.

 

We were deciding on one of the two eggplant dishes, and asked our server who recommended the Eggplant Deva (Japanese eggplant layered with fennel-laced tomato sauce and garlic-ginger infused yogurt). She said it was her favorite dish on the menu. It was good, but next time I’ll try the Baingan Bharta, as I just couldn’t shake the fact that it tasted very much like a pizza with an eggplant crust.

 

Overall a very enjoyable experience — good food, good beer, good family fun 🙂

 

Bombay Café
12021 West Pico Boulevard
Los Angeles, CA 90025
(310) 473-3388

Performance Characteristics of WCF Encoders

As part of the Framework, we ship 3 MessageEncoders (accessible through the relevate subclass of MessageEncodingBindingElement):

  1. Text – The “classic” web services encoder. Uses a Text-based (UTF-8 by default) XML encoding. This is the default encoder used by BasicHttpBinding and WsHttpBinding
  2. MTOM – An interoperable format (though less broadly supported then text) that allows for a more optimized transmission of binary blobs, as they don’t get base64 encoded.
  3. Binary –  A WCF-specific format that avoids base64 encoding your binary blobs, and also uses a dictionary-based algorithm to avoid data duplication. Binary supports “Session Encoders” that get smarter about data usage over the course of the session (through pattern recognition). This is the default encoder used by NetTcpBinding and NetNamedPipeBinding

I often get asked “which encoder is the fastest?” (and then “by how much?” :)). As always, the first principle of performance is to measure and tune your exact scenarios to determine if this is a bottleneck for you. That being said, here are some notes on the performance characteristics of our built-in Message Encoders.

Broadly speaking, encoders can impact your performance along two axis: size of encoded messages, and CPU load required to generate/consume those encoded messages.

In general, binary has the fastest encoding/decoding speed since it has less to do (usually because there is less data to read/write). This has to do with the dictionary-based optimization characteristics. The speedup is greater over TCP/NamedPipes since the encoder can recognize patterns (and negotiate optimizations) over the course of the session. If both participants are using WCF, then binary is a natural choice for production. (Note that during development, Text may be useful for debugging purposes).

Both binary and MTOM yield much faster processing of binary data (by avoiding the base64 process as well as the associated size bloat). Binary achieves this with inline binary blobs. The MTOM format achieves this through an inline base64 stub that references the binary blob outside of the Infoset. In both cases, the user model is abstracted from this detail and they will “appear” inline through the encoder.

If you do not have any binary data involved, MTOM will actually be slower than text since it had the extra overlead of packaging and processing the Message within a MIME document. However, if there is enough binary data in the document then the savings from avoiding base64 encoding can make up for this added overhead.

We spent a lot of engineering effort tuning the performance of our UTF-8 Text encoder, so you will see better performance over UTF-8 then the Unicode variations. And as to whether you should use Text or MTOM for interoperable endpoints, the guidance above should help with gut feel, but please measure your scenarios!

New York State of Mind

Gio and I saw Billy Joel last night at the Key Arena. Wow. He still sounded great, had great crowd engagement, and even hit his own high notes on An Innocent Man. First concert in awhile where I’ve been on the younger side of the audience though 🙂

Congrats Babajob!

I’m very proud of my friend Sean. For as long as I can remember, Sean has been very passionate about the “social” aspects of computing, He has been living in India for the past few years, and was inspired to apply social computing to help India’s poor. And today Babajob received front page coverage in the International Herald Tribune. Congrats Sean!

Behind the protected BindingElement ctor

On our BindingElement class, there is a protected ctor that takes another BindingElement as its parameter. This constructor exists in order to facilitate a composable implementation of BindingElement.Clone.  When writing a custom binding element, first implement a protected copy constructor as follows (note that for sealed classes this ctor should be private):

protected MyBindingElement(MyBindingElement elementToBeCloned)
   : base(elementToBeCloned)
{
 
// copy all fields from elementToBeCloned.XXX to this.XXX
}

Then you should implement your Clone() method as follows:

public override BindingElement Clone()
{
  return new MyBindingElement(this);
}

Any BindingElement in your inheritance chain (assuming it has followed this pattern) will then copy over the relevant values in its copy constructor, so that you can be assured a full Clone of your custom binding element.