26 August 2010

WebM Live on YouTube!

So apparently I am really, really, really late on this one (three months is a very long time in the technology world). WebM supported in YouTube has been reported since 19 May 2010. Anyway, this means that YouTube now supports three different video playback formats: flash, H.264, and the aforementioned WebM. As for initial thoughts, I have yet to notice any major differences in playback between H.264 and WebM (flash is just out of the question) on my Quadbox.

Yay, it's WebM!

In other news, the creators (esp. Laura Shigihara and George Fan) behind Plants vs. Zombies are awesome!

22 August 2010


To partially cure my boredom, I downloaded the Mono framework, a piece of software that allows cross platform programs to be written in Microsoft's C#. Installation was decently straightforward; install the program from an installer in a disk image and you are ready to code. For some reason, the GUI toolkits did not install correctly (but they are on my hard disk), and because I did not look into the problem, I was not able to play with GUI-based applications. Maybe everything will install correctly on my Linux box. I will finally get to use it tomorrow when I go to Massachusetts!

Here is the basic Hello World program:

using System;

public class HelloWorld
static public void Main()
Console.WriteLine("Hello MonoWorld!");

But the WinForms and GTK# based GUI applications failed to compile, sadly.


using System;
using System.Windows.Forms;

public class HelloWorld : Form
static public void Main()
Application.Run(new HelloWorld());
public HelloWorld()
Text = "Hello MonoWorld";


using Gtk;
using System;

class Hello
static void Main()
Window window = new Window("hi");

Feedback on my first C# post: Interestingly, I received quite a bit of feedback on my journey with C# all on Buzz. It evolved into quite an interesting thread. [Link]

And finally, here is a bit of programming/compsci humor:

Nope, I do not have mono(nucleosis). :P

11 August 2010

Adventures of a Music Note: C#

For the past two days or so, I began my adventures learning a Microsoft-centric programming language called C#. (Yes, this means I have to use Windows 7 instead of Linux on my QuadBox.) It seems relatively useful to know, and it's always nice to know more programming languages. Right now I'm still working through the basics and getting to know the language. Without further ado I shall present two niceties.

Append an @ before a keyword to use it as a variable name:

int @new = 5;
Console.WriteLine(@new); // outputs 5

Create nullable booleans! The book just put this in the beginning to show that such a feature exists, but goes into more detail later. It's useful if a trinary boolean system is required.

Boolean? married = null;
if (married == true)
Console.WriteLine("married = true");
else if (married == false)
Console.WriteLine("married = false");
Console.WriteLine("married = null");

The code above outputs married = null

That's all for now. Tune in again!

06 August 2010

Bridge in the south!


This summer, I had the pleasure of attending the 2010 North American Bridge Championships in New Orleans, Louisiana. I was more than thrilled after competing at last year's Youth NABC in Washington DC with my temporary partner Brian Hamrick, so I decided to bring Sam, my now-regular partner, to play. Brian would be playing with Lenny. The four of us had learned precision in the past year, but had slightly different systems. Perhaps the biggest difference was that Brian and Lenny have used their system against real people (they go to a local club), whereas Sam and I would be test-driving our system at the NABC. Like every other eager bridge player, we made all housing arrangements in February and planned out daily activities as soon as ACBL released the game schedule. I also took the opportunity to apply for a $500 subsidy by my local bridge section for going to the NABC, which I received, and am grateful for their support.

On the mild Saturday night on which Sam and I arrived, the four of us played a one session 299er Swiss. It went pretty well. On the hand that I held a decent 15 point hand with AKQJ seventh of spades, Sam raised me to game with a spade void after I made a jump rebid. It made! We were happy that Precision is working. I can't say I was surprised that the guys wanted to dive into bridge, but I was surprised that I did not collapse or deteriorate in the middle of the session, contrary to last year.

Sunday was a day full of bridge. After losing the first round of the Morning Compact KO, we entered a two-session Bracketed Swiss. Unfortunately, on one board, the opponents called the director on us because we had a miscommunication while bidding. Later that night we signed up for the Mini Spingold 0-1500 just for fun.

Monday was another day full of bridge, but thankfully it was the last three-session day. In the morning, we handily won the Compact KO Consolation. Then at 1PM we played a session of the Mini Spingold. We did surprisingly well in the first quarter, but not as well the second quarter. We lost more in the last two quarters, but did better than the second quarter. Sam and I did well, unfortunately at the expense of our opponents (at the end of 56 boards we seemed to have destroyed our opps' marriage. oops.) I psyched on a board by accident, having miscounted the point cards, so I opened 1D with 9 points but with AQ sixth of diamonds. Sam, thinking I had a decent hand, bid 3NT after a pesky opps' overcall. Guess what? It made! :D

Taking a break from Swiss teams, we played the Gold Rush pairs event on Tuesday. Like the name suggests, this event awards Gold masterpoints! Sam and I did OK in the morning, but were ultimately hampered by our poor defense.

Wednesday was another two-session pairs game, the National 199ers. Again, due to our subpar defense, Sam and I were massacred in the morning, finishing third to last in our direction. The opponents played nearly all the contracts. However, we made our epic comeback in the afternoon. We played as many contracts as possible, and stole contracts as much as we could. Our efforts launched us into 4th place overall!

Thursday begins the Youth NABC. The morning pairs went okay, but not as well as it could have. I had the pleasure of playing a 7NT, courtesy of Sam, and it made! Apparently it was supposed to involve a double squeeze because clubs split 5-0, but as I finessed the person with the clubs, he didn't cover high enough so I got an easy 13th trick ^_^ Sam and I finished third in our direction. The swiss match in the afternoon went pretty well. We tied for second place, with first place finishing just one victory point ahead.

Friday was the National Youth Pairs, sponsored by Baron Barclay's bridge supplies. To our dismay, the cards treated us poorly; the opps had most of the contracts and our sacrifices got doubled. Simply put, we got massacred. Finishing a dismal third to last in our direction, we had no chance of qualifying for the actual event, but we did get 0.20 pity (master)points. The same thing happened to Brian and Lenny. We decided not to play in the consolation game, but went for a session in the Midnight Zip KO just for fun. It went very fast; the opps that Sam and I faced had a very convoluted system and played very quickly. We were done with three boards in approximately ten minutes and the remaining three soon after. Unfortunately, we got knocked out. Still, that doesn't change the fact that it was fun!

Also, midnight knockouts redefine a popular phrase. The phrase no longer goes ``you snooze, you lose'', but ``you lose, you snooze''. Losers get to sleep first while winners have to keep playing. Who would have known?

Saturday was our last game day and the last day of YNABC. We participated in the National Youth Swiss Teams, a two session long swiss game. We ended up doing well (finishing first in C, fourth in B, and 7th overall), but not as well as we had hoped because of unfortunately placed cards. On one of the 3NT contracts the opps played, the dummy, sitting south, had AQT fourth of hearts, east held KJ third of hearts, and west had three low ones. Oh well, at least we blitzed C. In another hand in which I had the pleasure of 3D with a 4-3 trump fit, one of the opps showed out of diamonds on the first round of drawing trumps. Oh dear, a 6-0 trump split. *sobs* At least we didn't get doubled! 3D-4 vul is pretty bad enough. On yet another board, I overcalled a 15-17 1NT with 1 point, holding 5 hearts to the jack and effectively preempted the opponents out of a slam.

On *yet* yet another board, LHO opened 1S and Sam overcalled 2H. Looking at my 23 point hand with heart support, I was so excited and immediately launched into RKC. Sam showed no keycards so we stopped at 5H, which went down. Little did I know that Sam overcalled with 3 points. Oh well.

In sum, the week was very exciting. I have to say that I was actually looking forward to playing, but didn't expect to play this much (~400 boards). Unfortunately, this came at a cost of not being able to explore the culture-filled area. At least we had plenty of seafood for dinner!

Random discoveries

  • Precision works! Apparently some people haven't heard of it. Asking bids clear up everything and make slam bidding very easy and not nerve wracking.
  • Takeout 1NT scares people away. 1NT direct overcall is 4-14 points with two or fewer cards in the opponent's bid suit and at least three cards in the other suits.
  • Aggressive overcalls and preempts are fun! Going down four (doubled) is another story hahaha
  • Playing 7NT is nervewracking when you can't count 13 (or more) top tricks. Then you breathe a sigh of relief when opps set up tricks for you.

  • Saturday
    • 299er Swiss: 24 boards - 1.70MP (0.0708 MP/bd)
  • Sunday
    • Morning Compact KO: 24 bds - 0.00MP (0.0000 MP/bd)
    • Bracketed Swiss: 49 bds - 1.78MP (0.0363 MP/bd)
  • Monday
    • Compact KO Consolation: 24 bds - 1.60MP (0.0667 MP/bd)
    • Mini Spingold 0-1500: 56 bds - 0.00MP (0.0000 MP/bd)
  • Tuesday
    • Gold Rush Pairs: 48 bds - 0.89MP (0.0185 MP/bd)
  • Wednesday
    • National 199er Pairs: 48 bds - 4.06MP (0.0846 MP/bd)
  • Thursday
    • Youth NABC Pairs: 21 bds - 0.91MP (0.0433 MP/bd)
    • Youth NABC Swiss: 24 bds - 1.65MP (0.0688 MP/bd)
  • Friday
    • Youth NABC National Pairs: 24 bds - 0.20MP (0.0083 MP/bd)
    • Midnight Zip KO: 6 bds - 0.00MP (0.0000 MP/bd)
  • Saturday
    • Youth NABC National Swiss: 48 bds - 5.02MP (0.1046 MP/bd)
Total: 396 bds - 17.81MP (0.0450 MP/bd)

03 August 2010

End of Senior Year

This post will detail events happening in June, mostly.

5 May: Yay, birthday! Hannah gave me a plateful of brownies, which I distributed to my colleagues and Dr. Nevard during internship. By this time, Mr. Vidal was banned from entering BCA (long story; I'll probably cover this later in much more detail), so we decided to go to a nearby restaurant to have lunch. Because we were all tired of Boston Market and did not want to go to the Coach House diner, we decided to meet at Brooklyn Pizza. Little did we know that we were not allowed to cross the street, despite being at internship (I'm pretty sure that everyone who works off campus is allowed to do so). We found out, while walking to the restaurant, when we encountered a teacher, who lectured us on campus policies and subsequently reported us to the vice principal. Thankfully, none of us received detention; he just lectured me when he saw me in the hall.

2 Jun: Senior experience presentations. Unfortunately, I had the privilege of presenting to Ms. Anderson, one of BCA's incompetent and arrogant technology teachers (I say technology because it's really that; she thinks that she's teaching computer science). I was also quite surprised that we had a full house, considering that the internship wouldn't exist next year. To finish this with a blast, I decided to troll the slideshow (including trollface and playing Always on the last slide). On one of my slides where I had to describe Monte Carlo integrations, I was able to refer to the Riemann-Zeta function (it was so relevant and fitting!) while explaining the canonical pi calculation example. The handouts, in particular, were awesome: we made two versions, one with a legitimate overview of the internship for the teachers, and one with a hilarious description filled with puns and memes for the students. At the end, several students commended us on our successful troll attempt. Regardless of our mischief, I received an A for the trimester and the year. Win!

3 Jun: CompSci Day. This was actually another of Mr. Vidal's brilliant ideas, but was run by some CompSci Families parents instead (for obvious reasons). It was a luncheon for all students interested in computer science and featured some students who wanted to present their projects. Of course, I took the opportunity to present Battleship visualizer, the [formerly] ongoing Computer Team activity. As the first one to go, I presented for ten minutes on the various aspects of the Visualizer, such as Java being annoying, running external processes, how game designing is not trivial (contrary to another student's assertion that Java makes game development easy), and how two [skilled] programmers were able to put together a ~1000 line program in two weeks, with about an hour's worth of work each day. Everyone seemed thoroughly impressed (and amused -- the most important part!) by the presentation, especially the demos. :)

4-5 Jun: ARML. This was covered in a previous post. To recap, AAST Mu A finished 9th, the best in the recent four years.

9 Jun: Senior Luncheon. The class parents and teachers took us to a fancy restaurant, where we had lunch, took pictures, and signed yearbooks. The lunch was so fancy that everyone had four forks and two knives.

10 Jun: Prom. Again, this has been detailed in a previous post. This was the first of three events in which Troll, inc. (Patrick, Julia, me, and perhaps Sam, though he's always too shy to make a public move) tried to get the DJ to play Troll Music®.

11 Jun: Our hypothetical afterprom dissolved in thin air, so I stayed home for the day. Later that night I went with Dan and Sam to the mall for the night. We got dinner (teryaki for Dan, hamburger for Sam, and sushi for me), played around in the Apple store for an hour (yay Python and iOS games!), and then watched the Prince of Persia: The Sands of Time. Sam didn't mind seeing the movie twice in two weeks.

13 Jun: Joe Holbrook Memorial. It has already been almost five months since the old geezer passed away. The ceremony began at 4:30 when close friends of his and two BCA alums gave speeches, followed by dinner. At 6:30, Mark and I interviewed two candidates for the five Math Team Captain positions. They lasted until 8:00. Finally I went home.

16 Jun: Six Flags! This was my first time going to a theme park in two years. I was so excited to go on Superman, the only large roller coaster that I could withstand, but it was closed. Julia and I went on Rolling Thunder three times and screamed `CARD GAMES ON ROLLER COASTERS' pretty much on every decently-sized drop. Here is her post about it.

17 Jun: Our first graduation rehearsal. We get our caps, gowns, tickets, and picture taken. Luckily, we had no classes, but we just spent the entire day sitting in the gymnasium waiting to rehearse (we did it by academies). I spent a good amount of time watching some AEDT guys play Half Life (or whatever FPS it was) on Xbox 360.

18 Jun: Field day. Mark, Pavel, and I did final Math Team interviews and made our decision soon after. For the rest of the day we camped out in a classroom and played on our laptops. Somewhere right after lunch we played a bridge hand with Dr. Abramson.

19 Jun: Math Team Party. Mark and I passed down math team leadership to the five chosen candidates. We ate pizza.

20 Jun: Mr. Vidal's family and my family went to a local Thai restaurant to have lunch for Father's day. We talked mainly about the slew of unfortunate events that has happened at the school and I finally returned his GPU Gems book. Also Thai food is good when not very spicy.

21 Jun: Second of three graduation rehearsals. We ended up finishing approximately three hours before schedule, so we were dismissed at 11:00! Sam graciously drove me home and we played bridge.

22 Jun: Last day of school! The entire day was devoted to graduation rehearsal, but we managed to finish two hours earlier, so Sam and I hung out in Dr. Nevard's room. Unfortunately, not many people showed up to Computer Team. Oh well. At the end of the half day, I took home the ACSL prize printer that the ACSLers graciously gave to me for being their coach. I must have looked pretty weird carrying a printer out of the school XD

23 Jun: Graduation! It was a pretty basic graduation: walk on stage, listen to speeches while trying not to fiddle with hair or scratch face, get diploma, and walk (and jump) off stage, all while being filmed by over 9000 cameras. Because BCA teachers are cool, the director asked us to submit music suggestions for the song played at the end of graduation. Of course, I emailed her:

Here are some songs I would like:

1. Rick Astley - Never Gonna Give You Up
2. Erasure - Always


Sherry Wu

To which she replied:

Great songs. Thanks!

What a great response XD Unfortunately, none of the songs were played. Oh well, I tried.

However, our trolling efforts were finally fruitful during Project Graduation. We were fortunate that Patrick's mom was the co-director of the event, so Patrick was able to insert the Rickroll and Always in the mix CD. To our amusement, the Rickroll did play! Pretty much everyone groaned except for the nerds, who laughed. Julia, Patrick, and I bursted in excitement that our efforts finally paid off. What a great ending to four years at BCA.