Tuesday, June 04, 2013

愛民族及民俗

今天六四,一早見到香港傳來的良心照片,心情多欣慰少沉重。無獨有偶,也過了愛國愛民的半天。話說每逢星期二三藩市唐人街旁的舊聖瑪利堂都有午間古典音樂會,今天的表演者是自小從台灣移民美國的鋼琴家Tien Hsieh。老實說,我對古典鋼琴獨奏熱愛程度只屬中等,但直覺告訴我這可能是一個不同凡響的音樂會,再加上曲目包括華格納及李斯特這兩位我欣賞的作曲家的作品。果然,很慶幸沒有錯過!第一首是李斯特改編華格納歌劇,也是無人不識的Bridal Chorus(即「成個老襯從此被困」,好在這幾天沒有這種感覺!)Hsieh的彈奏抑揚頓挫,老掉牙的旋律也感新鮮。最後一首唐璜幻想曲更是大顯功架之作:快及大聲得來粒粒音清清楚楚,當然贏得全場熱烈掌聲!作為中國人也沾了一點光,很久不太有這種感覺了。沒有浮誇,只靠實力,實屬可貴。接著順道循例到金門餅家看看,幾個月沒開門做生意,經已沒有期望,但見門外有一條短短的隊,實在喜出望外!金門也可以「只靠實力」來形容,做出好東西,自然得到中外人士欣賞。回到office,沖壼鐵觀音。飲啖茶,食個包;香港人的生活情趣實在可愛!

Wednesday, May 29, 2013

Jazz playlist

I have been listening these few CDs:
- Todd Marcus: Inheriance
The current issue of JazzTime magazine has a special on bass clarinet: its history in jazz and its players, Todd Marcus being one of them. He led a group that included guests Don Bryon (another famous jazz clarinetist) and Warren Wolf on Inheriance. 

- Bob James and David Sanborn: Quartette Humaine
David Sanborn is probably more well-known for his "smooth jazz" efforts like his album "Close-Up" from 1988. Indeed, I picked it up because it's supposed to sound like Kenny G from around the same time. Of course, in the music circle, Sanborn is much higher regarded than Mr. G. In fact, Sanborn isn't a smooth jazzer. His more mainstream stuff sounded that way because of the R&B elements. He could play "real" jazz too. You could hear that from "Another Hand", the 1991 album he released after "Close-Up." It has my favorite version of Charlie Haden's composition, "First Song." Bob James was another musician(pianist) known for his smooth jazz work. He was an original member of the smooth jazz supergroup Fourplay. He collaborated with David Sanborn before and produced a smooth jazz classic, Double Vision, that included popular tunes like Maputo. Again, he played more than smooth jazz, as evident on this latest (2nd) collaboration with Sanborn, which is an acoustic tribute to Brubeck and Desmond. 

- Wayne Krantz: Two Drink Minimum
This was recommended by my teacher at Berklee for the interesting stuff he did with rhythms.

Last but not least, it's a sad sad day for jazz fans as pianist Mulgrew Miller passed away today because of a stroke. I still remember my first time visiting Yoshi's (in the old Oakland Claremont location) was to see him perform. The DJs at KCSM have been playing many of his works as a tribute. RIP.

Friday, May 24, 2013

ExtJS tips

My boss always joked about being impressed by my front-end skills listed on my resume (of course I was hired to do back-end work primarily) It seems that I'm considered to be more of a back-end guy throughout my IT career even though I have built UI for every job I had, including those used by engineers in manufacturing and IT, B2B buyers and sellers, etc. I have even built a tutorial/demo of using that B2B site in Flash! After a few years of hiatus from building UI, I'm finally back in the game, "fast-forwarding" from Weblogic/NetUI (yes, that's ancient technology I used last time) to ExtJS by Sencha. I visited them earlier this year. The offices and the atmosphere was so dot-com! The web UI created with ExtJS looks very slick with tons of eye-candies (which a lot of people like) You could build a good-looking basic web app with it quickly and easily. However, there are quite a few gotchas that have to do with its association model. Let's say you are a publisher who sells magazines to your subscribers. You have a one-to-many relationship between your customer and your magazines. So you created a class for the magazine model and another for the customer model. Then specify in the customer model a hasMany relationship with magazine. This is to be used with a REST-ful webservice for CRUD of customer (along with magazine relationships)

1)  You cannot create a separate store class in which you define a REST proxy with the URL of the aforementioned webservice. Instead, the proxy must be defined within the model class. Stores for customers and magazines are implicitly created. To load these stores, call Ext.ModelManager.getModel to obtain the model object and call load(<id>) on it.

2) Query of your customer REST-ful webservice could return magazines subscribed by the customer as a JSON array, named the same as the hasMany relationship. The implicitly created store for magazines associated with the customer will be populated properly. However, when you call customer.save(), the payload to the REST proxy's URL will not include the array of subscribed magazine. To make this happen, you have to override the default JSON writer of the proxy. See the second part of this post for a generic implementation that works for all associations. Alternatively, you could just implement a customer JSON writer that handles your customer/magazine relationship only, which is much simpler: basically you implement the getRecordData function. Add the fields of customer to the data object to be returned. Also loop through the associated magazine stores and add the fields to an array inside that data object.

3) Let's say you implement a drag-and-drop UI that allows user to drag magazines between the 'subscribed' and 'not subscribed' lists. Check out this example from Sencha. Each of such list is actually an ExtJS grid panel defined with its store. However, you want the 'subscribed' grid to use the implicitly created associated magazine store at run time. The name of the method to use is not that obvious. It is 'reconfigure.' I learned that from this post.

Thursday, May 23, 2013

Implementing RESTful Webservice using Wicket

Wicket alone might not be the ideal framework (check out this project that extends Wicket for such purpose) but this could be done. Simply write a class that extends WebPage. Override the renderPage method and write to the response. Finally, mount that page in Application.init() to a URL for its client. Here is the syntax for specifying the id in the URL with mountPage. (For example, a typical RESTful query looks like this: http://youraddress/order/<order id> )
  mountPage("/order/${orderId}", Order.class);

More tips:
1) PUT and POST
One of the key features of REST is using the "verb" (i.e., the method of the servlet request) to determine which of the CRUD (create, read, update, destroy) action is to be performed. It took me a while to figure out how to extract this "method" value:
        HttpServletRequest servletReq = (HttpServletRequest) getRequest().getContainerRequest();
        String method = servletReq.getMethod();
        if ("GET".equals(method))
        {
            // logic to read the object
            ...
        }

2) the payload
To create or update an object via RESTful Webservice, the payload includes a serialized form of the object (e.g., in JSON format) Again, it took me a while to figure out how to extract the payload:
        HttpServletRequest servletReq = (HttpServletRequest) getRequest().getContainerRequest();
        BufferedReader br = servletReq.getReader();
        String payload = null;
        if ((payload = br.readLine()) != null)
        {
            // process payload
            ...
        }

3) HTTP Status code
The page should return a meaningful code to the user. I found this table quite useful. Set it in renderPage() like this:
    public final void renderPage()
    {
        WebResponse response = (WebResponse) getResponse();
        response.setStatus(200); // for OK
    }

4) Return a download file
This is not RESTful but I just want to mention it here. Sometimes you want to provide a URL that would serve the browser content not in a browser window but in a download file. HTTP actually supports this using the Content-Disposition value (set to 'attachment') in the header. Let's say my page/class that extends WebPage create a zip file to be downloaded by the browser. Implement renderPage() like this:
    public final void renderPage()
    {
        WebResponse response = (WebResponse) getResponse();
        response.setHeader("Content-Type", "application/zip");
        response.setAttachmentHeader(fileName);
    }
BTW, don't rely on overriding the getMarkupType() method to set Content-Type in the header. It doesn't work that way for some reason. Set it explicitly like the above.

Wednesday, May 22, 2013

The Amazingly Flexible Jackson

Continuing my praises for Jackson, the JSON processor. I have a fairly unusual requirement for JSON generation: for a certain class of object in the hierarchy, the JSON representation needs to be all on one line. I have been using JsonGenerator instead of the ObjectMapper to generate my JSON and I knew injecting my own newlines could be done by simply JsonGenerator.writeRaw("\n") However, I rely on writeObject for that class of object, which is in an array, and writeObject is responsible for writing the commas before every elements after the 1st element in the array. So there are commas after the newlines but before the { of the object. I need to have these commas on their own line.

What I ended up doing is "hacking" the pretty printing support of Jackson. Jackson allows you to set a pretty printer to the JsonGenerator (or perform no pretty printing by setting it to null) Jackson also provided a full-blown pretty printer (the default) and a minimal one (that basically print as if no pretty printing and expect you to override some of its method to customize its behavior) I needed the JsonGenerator to add newlines surrounding the comma when writing array separators. However, this should only happen before the first { of the object, i.e., for the arrays nested within the object, it must not add newlines. Otherwise it violates the requirement of getting everything on one line! My subclass that inherits the minimal pretty printer has a boolean flag to control adding newlines so that it only adds the first time. Sounds tricky, right? Yes, it is.   

Tuesday, May 21, 2013

Jackson and polymorphism

Believe it or not, I have been manually adding {[': ......etc to generate my JSON for a while, until I discovered the open-source library Jackson, which I should have been using all along. It is very easy to turn a Java POJO into JSON and vice versa (i.e., serialization and deserialization) Check out the simple examples provided by this fellow. The only hiccup I had was related to deserialization and polymorphism. Imagine you are Jackson and parsing a block of JSON. According to the class definition, that block belongs to an abstract class or interface. Which subclass would you choose to deserialize this? Obviously you need some hints. Jackson actually includes mechanism to handle this. It's easy if you have something like 'dog' and 'cat' extending 'animal' and there is a type variable in the classes that could be used to tell whether the object is a dog or a cat. (See example 4 from this post) However, I have 2 subclasses of an abstract class that could only be distinguished by the class variables (i.e., unique attributes.) Fortunately I've found a way to solve this (See example 6 from the same post as above) Basically I wrote a custom deserializer for my abstract class. This deserializer looks for the unique attribute and find the corresponding subclass for deserialization.

Monday, May 20, 2013

Running a daemon using Tomcat

From Wikipedia:
a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user.
Anyone who know Java could write a standalone one easily. My main concern is ease of management and deployment. Since I am using Tomcat as app server already, I decided to find out how to have a daemon running inside and managed by Tomcat. It turns out to be a popular choice. I've found quite a few links (1, 2) about it. Basically the daemon class needs to implement ServletContextListener. Then mention the class in web.xml like this:
<listener>
    <listener-class>MyDaemonServletContextListener</listener-class>
</listener>

For deployment, I use the Maven tomcat plugin and simply specify the server URL in the pom.xml.

Sunday, May 19, 2013

Open another browser from a hyperlink using Javascript

This sounds like a trivial and common task but I just learned how to write that. First, include a function like this:


Then use it in the A HREF like this:
<a href="javascript:void(0)" onclick="javascript:openInNewTab('blog.00zine.com'); return false;">00zine</a>


BTW, I have also just learned the above way of publishing code on Blogger from this post, which is linked to the useful HTML encoder (turns your angle brackets to < and >)

Tuesday, May 14, 2013

Phil Humber's perfect game from 2012

Just realized I drafted this post last year but have never finished it. I still remember when I found out his perfect game: on my drive back from Monterey after finishing the Sea Otter Gran Fondo ride. (None of our friends did it this year. Neither did I) This was THE topic of those sports talk radio shows (the host debated whether or when he would root for the opposing pitcher pitching a perfect game against his home team) Here is a link to the video. The White Sox ended up having a decent season under 1st year manager Robin Ventura (they had a strong 1st half but faded and passed by eventual AL champ Detroit Tigers) Another interesting comment about the game was the comparison to former White Sox pitcher Mark Buehrle's perfect game:
If Buehrle throws one, everybody can throw one — with respect to Buehrle. I say that about Buehrle because Buehrle is a contact pitcher. That’s what I think is one of the most amazing things I ever see – he has both, he has a no hitter and perfect game. That’s hard to come from Buehrle because Buehrle’s game is (pitching to) contact.
Fast forward one year though, Humber ended the 2012 season with a 5-5 record. The Sox put him on the waiver and he was claimed by the Houston Astros (which switched from NL Central to AL West!) He started the season in the Astros' rotation and lost all 7 games he started. Then he was moved to the bullpen, appeared as reliever twice and lost 1 more game (overall record: 0-8 record after less than 1.5 month into the season) Houston has designated him for assignment. It's sad sad sad to see him falling from glory so fast, just like a one-hit wonder in music. Still, he is in the record book for good for one game in which he did not give up any hit. (How ironic!) Not something a lot of great pitchers had achieved in their careers! I don't mind being a one-hit wonder. (I think I kinda qualified already with our band's song being kinda popular in the HK indie scene)

Monday, May 13, 2013

雨中的浪漫

出車最不喜下雨天,踏入2013年以來上班踩車卻竟然未試過要穿雨衣!今早駕車經南三藩市路段時,見小雨點落在擋風玻璃也不以為然,通常進入三藩市便會消失,今天卻是例外。從停車場踩到公司短短數分鐘,絲絲雨線反而加添了點點浪漫,想起你和這首歌:
...心只好 只好恨透絲絲雨線
微雨的天 總像是個謊言
靜靜地 垂淚 漸漸地 別去
忘掉當天不再追

垂著頭暗暗對我說清楚
曾說過愛我卻不可
像火的心窩心裡是痛楚
從未忘妳最愛聽那些歌
微雨裡暖透妳心窩
怎麼不是我

之前剛好見到阿Miu的母親節post,記得她喜歡哼落雨擔遮想起媽媽:)跟著想到雨夜的浪漫和Rainy Days and Monday都不應景(雖然是星期一但雨不夠大:P)想起有首雨中的浪漫但不記得誰唱,還是留待FB朋友解答吧。

Monday, May 06, 2013

Sports highlight: auto racing

I watched a bit cricket and rugby during the weekend but the main thing was auto racing. First, it was Aussie V8 Supercar, which I had never watched before. Marcos Ambrose raced there and won before he came to US to race NASCAR so I knew they've got pretty good drivers for sure. It was indeed competitive with cars nudging each other for position on a road course, just like the NASCAR road races. What I found most interesting though was the manufacturers and models raced in that series: there are Mercedes AMG as well as Nissan Altima. It seems to me it's a bad idea for the former because they are supposed to be much better than the other "lowly" brands/models (e.g. Ford and the aforementioned Nissan) but they did not actually finish higher in the races!
Back to the States, both NASCAR series were racing at Talladega, which I considered one of the tracks with most exciting races. To be honest, they are exciting for the "wrong" reason: the "big one", i.e., a big crash that almost always happened, once or more, especially near the end of the race. Both the Nationwide and Sprint Cup race ended with last lap passes (also multiple crashes though) The former was enough to make the races interesting. I was happy to see "underdog" drivers on lower-budget teams did well: Regan Smith won the Nationwide race while David Ragan did it at the Sprint Cup race (with his teammate finished 2nd)
More drama from Talladega: During her career Danica Patrick usually did better on longer tracks like Talladega but her day was ruined by none other than her current boyfriend, Ricky Stenhouse Jr, who is a talented driver but with few experience at the Sprint Cup level. He drove too aggressively and caused a big crash that collected Danica. I was surprised this story was not mentioned a lot in the media.
I was so glad I didn't miss the IndyCar race at Sao Paulo because it featured yet another exciting finish! I have been rooting for Verizon/Penske driver Will Power for the past few years. He was almost invincible at road races but seemed to have lost his magic this year. He didn't qualify well but was making his way through the field. Just when things started looking promising, his car was on fire and forced him out of the race. There were a ton of cautions but the last dozen laps were really close with 3 drivers fighting it out. Takuma Sato, the winner of the previous race, was leading but challenged by Joseph Newgarden and James Hinchcliffe. He was accused of violating IndyCar's rule by blocking both. It didn't matter much though 'coz he was eventually passed by Hinchcliffe. The young guns are doing well in this series (Will Power and former champ Dario Franchitti are 18th and 15th in the current standing, respectively) For a sports that couldn't gain enough fan support here due to lack of success of American drivers, it's moving in the right direction.

Tuesday, April 30, 2013

The 19 inning game and Loyalty

Can't believe I am writing two posts about baseball in a row, and about fans from two teams opposite to each other across the bay and with almost opposite behavior! I'm talking about the Giants and the A's. The latter played against the Anaheim Angels on Monday night. I was busy watching other stuff late at night and realized I didn't find out who won. It was midnight and I'm surprised the game was still going on, in extra inning. Another 1.5 hr passed by. I was almost done with the video I was watching and about to go to sleep. Checked the result again. OMG it was still tied! Finally the game ended ~1:45am. The A's have just played the longest game, a 6.5 hr one, in team history! I listened to the highlights while I was in bed. What a great game! The A's trailed the Angels 2-7 in middle of the 8th. I definitely won't blame the fans for leaving at that point. But they scored 4 in the bottom of the 8th and 1 more in the 9th (down to their last out. Cespedes hit a long single to the outfield for the RBI) to tie! Both team scored again in the 15th (again, the A's were down to the last out and tied) Brandon Moss hit a 2-run walk-off homer to win the game for the A's in the 19th inning. The sports talk radio show host talked about this game, of course, and he estimated around 1000 or less fans stayed till the end to support their team. Those fans were as loyal as you can get. (They and the Giants fan who left in the 7th inning around 3pm in the afternoon in a tied game were beyond comparable)

Monday, April 29, 2013

"Breaking up" with the SF Giants

This has nothing to do with their players and the recent slump, and of course not the management (which could do no wrong because they did a great job building a team that won 2 world series in 3 years) I just don't want to be associated with this fanbase and deal with the greedy bloodsucking businesses near the ball park (or I should say remotely close to) I have been driving to SF to work for years. My office building is ~1 mile from the ballpark and in the past the parking lots here do not charge extra on game day. I guess most people went to the games chose to park closer to the ball park. Well, things started to get crazy last season. The parking lots and garages near the ball park started to charge >$50 and it has a ripple effect: the not-so-close-by parking lots were jacking up the price to ~$30 as well, including the ones near work. Only 1 parking lot sticks with the regular $15 and of course that one got full quite fast (I arrived at 9:45 the other day and almost couldn't get in. They still need to reserve a few spaces for the monthly parker, which I am not)  And it's not just parking. The traffic near the park got busy at that time already but the game wasn't started until 12:30 (or later?) My co-worker who took CalTrain to the city told me the train was jam packed when he was getting to work! That's why I still glad that I drove instead. It would have been crowded on the train back home too. Some riders who left the games were drunk, high or loud (or all of the above) and I wanted to avoid them at all cost. Still, driving away from the city at 3pm could only help so much: the streets outside the ball park was already filled with people leaving the game, less than 3 hours after the game started, in the 7th inning with a 1-1 tie! No way I would call these people true supporters of the team. Why do they even bother to come to the game? Just stay home next time, OK? BTW, it was a really exciting game: the Giants fell behind soon but came back in the bottom of the 9th. Too bad they couldn't win in the end. More home fan support might have helped. Who knows? 

Sunday, April 28, 2013

Free Your Mind!

"Free Your Mind" is the title of a series of lectures about improvisation presented by the Institute for Diversity in the Arts and The Department of Theater and Performance Studies at Stanford University. It includes a wide variety of topics such as food, comedy, dance, visual art and of course music(jazz) which I'm most interested in. The lectures are actually open to public (also streaming online) and I attended the one with jazz pianist Vijay Iyer as the guest.

Dr. Iyer has a very interesting background. Check out this well-written article on him. His parents were immigrated from India. He double-majored in Math and Physics at Yale and then got accepted to the PhD program at UC Berkeley. He also started learning violin at 3. So, that sounds like your typical Asian American kid, right? Wrong! He studied violin 'til he entered college, when he realized he did not have enough time for the highly demanding classical violin training. (The amount of time high-level violinists put into practicing was incredible!) After he came to Berkeley, he got involved in the big musician community in the Bay Area but playing jazz piano (which he taught himself mostly) instead. At the same time, his research focus had also switched from physic to music and technology and eventually earned a PhD in such an interdisciplinary program.

Enough about his background, there were quite a few things they pointed out during the lecture: they talked about improvising during a performance as taking risk, which makes a lot of sense. As a performer, you could always "play it safe" but then if you played something different (e.g. musical or comedy ideas) that worked for the audiences, it would be even more rewarding. Of course it might not work so that's the element of risk.

They also talked about improvisation occurs more often then we think. In fact people improvise all the time during daily routine instead of planning/thinking ahead. Again, it makes sense. Just that most people won't think of that.

They pointed out music is highly related to motions of human. Musical beats mimic human movement (our pulses, our walking paces) In face, the same area in our brain is activated when we hear music or when we move. Finally, they mentioned empathy when hearing music, i.e., the player and listeners would fire similar nerves in the brain. When it comes to our brain and music, there are still a whole lot of unknowns (see the books "This is Your Brain on Music" and "Guitar Zero")

Saturday, April 20, 2013

Spring Break 2013

Seems like writing about Spring Break has become my annual tradition (see 11, 12) even though I'm not a college kid anymore (And Berklee has no break between Winter and Spring!) I took only 2 days off work but did a lot during the weekends and weeknights.

It began with my sister's visit 3 weeks ago. I took her to the newly opened SFJAZZ center for a concert by the SFJAZZ Collective, the "house" band of the 20+ year and running festival. It was the first time I've been there too even though I've been curious (or I should say skeptical) about the concept of a building dedicated to jazz (well, I'm not the only one. Even a SFJAZZ collective member said he thought it could not have happened) I should have been to one of legendary jazz bassist Dave Holland's concert earlier in the year but I missed it. Anyway, the theme of the concert was playing music inspired by pianist Chick Corea and rearrangement of his works. Chick Corea was a name I learned when I was a kid listening to HK's Jazz Radio Programme (yes, such thing existed back then. The DJ was all excited when Miles Davis and Pat Metheny visited HK. RTHK3 still has a jazz programme these days) To be honest, for some unknown reason, I am not familiar with Chick Corea's work at all even after all these years listening to jazz. Almost each member of SFJAZZ collective (there were 8 of them, which made them somewhere between a small combo and bigband, an interesting lineup to me) contributed a piece (new composition or arrangement) that night. The Chick Corea piece I like the most that night was "Crystal Silence", a ballad. It has been a refreshing musical experience for my sister, an aspiring pianist herself. In fact, she was so inspired that she went to Hiromi trio's concert after she went back (Hiromi played at SFJAZZ before flying there! What a coincidence :) She's definitely one of the most exciting young talent (and pianist) today.)

Also worthy to mention was the dinner before the concert: we had it at "Off the Grid," a food truck event at Fort Mason. We had pork puns from Koja (a truck that fused Korean and Japanese food) and The Chairman (I wrote about this truck before) And a Kalifornia Kölsch (beer) Pretty good food and even better atmosphere!

Another fun thing we did was hitting all these different coffee shops in the Peninsula 'coz my sis was also an aspiring coffee connoisseur. Check out her journal of her coffee experience during this visit!

Then we did something really healthy: playing badminton together. We haven't done it for maybe 30 years! Still remember the wooden rackets we used in those days.

Almost every time she visited, we would go to wineries. No exception this time and we picked a great day (Monday) to go to Napa. First we stopped in downtown for a lunch at Morimoto. She saw the restaurant and took a picture of it last time so it's a natural choice this time around. The famous bone marrow justified its fame. The other dishes we got were good too, including a wagyu beef wrap. The wrapper was edible rice paper which made it even more interesting. Another place we missed last time was Bouchon Bakery 'coz the line was so long but it's surprisingly short on a Monday. So we all got macarons (actually I shared an eclair too) which are very reasonably priced because of their huge sizes. Enough about eateries, the wineries we visited included Chandon (a pretty surrounding), Opus One (classy looking. Can't believe my sis hasn't been there before), Groth (interesting architecture - Mission style), Paraduxx (we did a tasting here and was very impressed by the high quality), and last but not least, Alpha Omega (our good friend is a member and made an appointment for outdoor tasting for us there. Awesome wine and view!) We were back to the City after a relatively smooth drive. Still, we barely made it to the happy hour at Hog Island at the Ferry Building (yes, long line there. Lots of people went after work I suppose) We had a few dozen of oysters, their unique clam chowder soup that was served with real clams still in the shells, and of course good beer (Racer 5 IPA)

On the last day of her trip, we're back to SF again. No luck with the Golden Gate Bakery of egg tart fame which has been in a loooong vacation. The main thing I wanna took her to was the noon time concerts that occurs every Tuesday at the cozy Old St. Mary's Cathedral. Coincidentally, a warhorse of the violin repertoire, Beethoven's Kreutzer Sonata, was performed that day. It was a superb performance.

Then we headed to the shopping area and visited her type of store: the trendy UNIQLO clothing store, and my type of stores: the artsy Lomography store and the smelly Rasputin music store. The other Lomography store I've been to before was the one in the MuseumsQuartier in Vienna and fittingly the Lomography movement was started there (the society that promotes event for the community is headquartered in Vienna and the camera distributor/trademark owner is also in Austria) So, what is Lomography all about? Basically it's a community of photographers that advocate creative and experimental film photography. To me, the most important and interesting aspect is spontaneity and de-emphasizing traditional techniques. A few of my friends have done a lot of that on FB, not with film though. I definitely enjoy looking at the photo displayed in the stores. In fact, I read a travel guide to HK using Lomographic photo and the photo fitted very nicely in the book. Well, as far as actually doing it, it's not really for a lazy guy like me as the films needed to be developed. I didn't actually shoot much pic before the digital era. I did spend some money at Rasputin, $6 on vinyl including Crystal Silence by Chick Corea/Gary Burton (inspired by the SFJAZZ performance obviously) and a Bach album by renowned classical guitarist Christopher Parkening.

The fun was not over (though a bit less :( ) after my sis left town. I had a weekend all to myself. First stop on that Friday was Nickie sports bar on Haight street. The Giants game (a really close win) was just over when I arrived and people were all in celebration mode. All TV was still showing the same Giants channel and no one bothered to switch to other games (I expect facility to show multiple games from multiple sports to be qualified as a sports bar) I did got my request fulfilled: the A's game. (I know nobody cares about the A's in the city) I never like parking in SF but that area is especially bad. The street parking is only for 2 hour. I have no choice but to leave early, way before I needed to but I did squeeze in a few min to drop by Metro Caffe for its cheesesteak sandwich that got a pretty good rave on Yelp as dinner.

The main event of that night was Pharoah Sanders Quartet playing at Yoshi's SF. I have seen his group performed Yoshi's Oakland many years before and enjoyed his music a lot. Even though he was often promoted as a collaborator of Coltrane and you could easily hear Coltrane's influence (well, everybody was influenced by Coltrane!), nowadays Sanders play fairly accessible yet refreshing sounding jazz. The amount of energy from this senior musician was unbelievable.

Saturday was reserved for an all-day bike ride (well, not quite, only on the saddle for 6+ hours) at Mt. Diablo (from Danville to the summit, and down north to Walnut Creek, through Clayton and Morgan Territory and loop back to Danville) 65 miles in total. It's kinda scary (steep downhill and the no man's land) but I'm also proud of riding it all by myself!

It was admission-free day at the Asian Art Museum the next day. Of course I won't miss it! The line was much longer than expected though: it was 3 block long when I arrived 20 minutes after the museum was opened. The museum was heavily promoting the Qin terracotta warrior exhibition which was NOT free but fortunately I wasn't too interested (In fact, I found it amusing that stores sell real-life size statue for garden decoration. Don't people know they were for accompanying the dead?) There were plenty to keep me busy anyway, including the South Asian part (mainly Buddhism and Hinduism from India, which I never had time to explore much of them) I always get something different from the art after reading more Buddhism and religion-related literature. As usual, I spent some time on Chinese painting. This time I paid more attention to the works from the Lingnan school (some Lingnan masters lived in HK after the war) And there was another exhibit dedicated to Chinese painters near our time. Those were artists/teachers immigrated to the States in the last century. They have not only used Western technique but also Western subjects (like the family of then US president)

I wish I had more time to spend at the museum but there was an interesting concert from the San Francisco Symphony's Chamber Series, which featured musicians from the orchestra and a program of unfamiliar works from familiar composers (Bruch, Amy Beach and Hindemith) As a violist myself, I especially enjoyed the appearance of the usually under-represented/appreciated instrument. In fact, Hindemith himself was a violist and he wrote the Octet featuring 2 violists in which he intended to play and showed off a little bit. The yet more unusual moment happened during the Bruch's trio pieces: the clarinetist couldn't flip his sheet music to the right page and the trio had to stop and started over. I was really puzzled and thanks to this review by San Francisco Classical Voice, I found out the confusion was likely caused by not all 8 pieces written by Bruch was performed. Nevertheless, it was a very enjoyable performance.

Finally, the "break" was over after attending jazz pianist Vijay Iyer's talk at Stanford, which I'll write in a separate post. (Yes, this has been a loooong post, which explained why my blog was not updated for over a week!)

Tuesday, April 09, 2013

Steinway dealer

I received a mail regarding the local Steinway store going out of business (actually, it's promoting the store-closing sale. Like I could afford one!) I'm really surprised 'coz people seem to be spending at will as if there's no recession in the area. I googled immediately and found a few posts about Steinway dealers closing in other cities (e.g. Chicago, Phoenix and Cincinatti) Does it have to do with the brand or the instrument in general? It's hard for me to tell as an outside. Mercury News painted a very gloomy picture by describing this as a retailer to surrender to the piano industry's collapse. Well, it turns out while the Santa Clara store will be closed, the SF and Walnut Creek stores currently owned by Sherman Clay are being sold to Steinway themselves. Personally I feel kinda sad 'coz the Santa Clara store looks really nice and have a good room for recital (my kid played there once)

Tuesday, March 26, 2013

迷幻 唐人街

星期二中午我的慣常節目是到聖瑪利教堂欣賞免費的古典音樂會,不過今週是choral music, 我改為逛逛唐人街。第一站到書店瀏覽一下八卦雜誌封面,不少都和迷幻飯局或家族有關。第二站到金門餅店,再度失望,皆因仍在休假;唯有看看電子產品店,只見一名中女推銷員力推一個中文互聯網電視機頂盒(心水清的你知我講那一部吧),好處包括無月費,營光幕播放的則是KaraokeTV,然後該女士就以別有韻味的唱腔唱起來,我不禁發出會心微笑。此時竟然傳來一陣大麻氣味,仿如置身迷幻樂隊演唱會,真是一個奇妙的中午啊。

Saturday, March 23, 2013

Sports highlight: Golden Oak climb, rugby weekend

I ride up Alpine Road quite often, either to Portola Valley or to Joaquin Road (one of the steepest climb in the area, max 19%!) I just learned about an interesting "detour" on Alpine called Golden Oak. The entrance to Golden Oak is near the intersection of Alpine and Arastradero. It's 0.8 miles long with quite a steep climb (not as bad as Joaquin but still challenging when I did it) and lead you back to Alpine 0.3 miles further up hill. 

More on sports that I don't play: it's time for Hong Kong Rugby 7 again! Time really flies. I still remember watching it on TV in HK a few Spring Breaks ago. I watch quite a bit of rugby during this break between football and baseball season. The last-minute try scored in the London Wasp vs Northhampton Saints match was really something. A bit off-topic here: as a frequent rugby watcher, scrum means physical confrontation between strong men who fight for control of the ball. It's funny to hear the term also being used to describe meetings for software projects which definitely disallowed any physical contact and hopefully not much confrontation. Another term I learned recently is even worse: daily huddle, obviously borrowed from the sports but simply means a quick daily meeting to provide updates to the management. Whoever invented the term must have fancied himself being an elite athlete which he's unlikely to be. It probably explained why the management type likes to use the term :P

Monday, March 18, 2013

Sports highlight: World Baseball Classic

Not sure if we are one of the very few families in the States that are following this tournament, even after USA was out! Baseball is on the top (tied with several others) of my long long list of favorite sports and I actually paid attention to this "World Cup" for baseball that is played every 4 years. I checked the ticket price when I found out the final 4 will be here in SF but decided $75 was too much (It has been dropped to single digit, reflecting the fact that a lot of American fans simply don't care) We followed both of the last 2 games of USA (in which they just needed to win one and advance to semi) hoping they got some of Giants vibe from last WS (in which they won every elimination game) Giants pitcher Ryan Vogelsong actually started and lost in the final game that eliminated Team USA. I agree with some writers that the team didn't show enough determination to win like their opponents. Playing baseball for national pride is not in our culture, yet. Oh well, now I'm rooting for a Puerto Rico vs Dominican Republic final. These teams do have some big MLB names on their rosters: Yadier Molina, Alex Rios, Angel Pagan, Robinson Cano, Alejandro De Aza and Jose Reyes. (Pagan is from the Giants while Rios and De Aza are from the White Sox)

Sunday, March 17, 2013

My weekend

One of my friend has bought a new road bike. Of course we gotta went for a ride together. Now that I have been riding in the bay area for a few years, I could recommend an interesting route close to most of my friends, in this case, it's the 37-mile Fremont-Sunol-Calaveras loop. We had a good time riding together. Another interesting fact about the ride was that we went through Bradley St and Evans Rd. If you're a fan of the sports, you would notice these are the names of the two most recent Tour De France winners.

And I am finally back to the world of vinyl after my first stint ~15 years ago, during which I collected a whole bunch of classics on LP. I didn't even listen to LP before the digital era began but spinning a record on a turntable simply sounds and feels great. It's a more engaging experience than streaming and more natural sounding than CD. Many are surprised that brand new vinyls are still being manufactured (just bought a copy of jazz organist Larry Young's 1966 album, Unity) I did some research before I made my purchase this time around (my old $1500+ setup consisted of a VPI HW-19 Jr with Audioquest PT-6 tonearm, Benz-Micro MC Silver cartridge and a Creek OBH-8 phono stage) To keep things inexpensive and simple, I opted for a piece of critically-acclaimed "budget" equipment: the USB version of Pro-ject Debut Carbon, which has a "built-in" phono stage that could output both analog and digital signal (via USB) I checked with the distributor for a local dealer and then contacted the local dealer but too bad they don't have any in stock and they are not expecting another shipment soon. So, I have no choice but to buy online. And because of this, I have to partially assemble a turntable for the first time ever! The task sounded intimidating with all those loose parts that I needed to put together, including the counterweight and anti-skating weight for the tonearm/cartridge. After installing the counterweight, I still needed to adjust the tracking force. Well, it's not that complicated after all. Next, I wasn't too sure if the analog output is properly amplified (i.e, to line-level and adjusted with the RIAA curve) because the manual didn't say so (the manual is really for the "regular" instead of the USB version) I tried the USB output first with the recording software I most familiar with, Audacity, but it's not clear to me how to simply playback the audio signal (more on this later) Still uncertain about the level of the signal, I decided to try it with my tube headphone amp, a Qinpu A3 (also capable of powering my speakers but they are shelved, which was another story.) I started with an album by jazz pianist George Shearing. Well, the audio is strong enough and balanced but his playing seemed extremely fast. I'm not too familiar with that album anyway so I put on Sgt Pepper. And Paul McCartney sounded funny. I had a feeling that the speed is wrong: to switch from 45rpm to 33, I needed to manually "pulled" the belt from one pulley to another. Finally it sounded right, actually, fantastic!

BTW, to playback through the computer using Audacity, one simply needed to enable 'software playthrough' under the 'Transport' menu. (Found the instructions here) The sound might be distorted (this is called clipping) before the level of the recording device (i.e., the USB input) is adjusted. This could be checked in Audacity by starting monitoring and making sure the level is not exceeding max. I don't plan to use this often but it comes in handy (e.g., sending the audio from the turntable to the computer then to TV via HDMI)

It has been a rather awful week overall but at least I have something positive to write about.