February 2009 Archives

My Windows Vista/7/8 Wishlist

These are some changes I’ve been try­ing to get made since Vista en­tered beta. Now 7’s beta has begun and still chances look bleak. Maybe I’ll have more luck in 8?

First thoughts on Qt

I’ve been doing so much C# and XAML cod­ing for work lately, I felt com­pelled to get back to the place I thrive—real C++.

I’ve al­ways been weary of cross-plat­form C++ GUI cod­ing. The op­tions just never seemed very good to me: GTK, which doesn’t act any­thing close to na­tive in Win­dows. Qt, which seemed good but was under GPL. wxWid­gets, which feels like a thin wrap­per around Win32 (and was there­for quite easy for me to learn) but has lots of lit­tle is­sues like the in­abil­ity to scale with DPI. Given the an­nounce­ment of Qt going LGPL, I fig­ured it’s a good time to start learn­ing Qt.

If you’re like me you might be think­ing – “Qt, but that’s not real C++! What hap­pened to using the stan­dard li­brary, tem­plates, and not pay­ing for what you don’t use!?”. Do I wish there was a more mod­ern Boost-qual­ity li­brary? Ab­solutely. But that doesn’t exist. Per­haps be­cause GUI work is rather bor­ing, and coders who could make a bet­ter qual­ity li­brary would rather spend their time on more in­ter­est­ing things. Qt is still the most mod­ern GUI lib I’ve seen for C++ yet. But I di­gress.

Hunt­ing around the Qt web­site, first thing I find out: it’s going to be a pain in the ass to com­pile my Qt-based pro­ject with VC++. I’m sure it’s pos­si­ble with a lit­tle elbow grease, but I wanted to get started quickly so I down­loaded Qt Cre­ator in­stead. Cre­ator has a bun­dle that in­cludes MinGW, Qt, and the Cre­ator IDE. Per­fect for a quick start!

Cre­ator turns out to be a pretty good IDE. It is very close to knock­ing VC++ out of my fa­vorite po­si­tion. With a few bugs and us­abil­ity is­sues fixed, it’s pos­si­ble I’ll be using it even for pure Win32 apps.

I cre­ate a GUI pro­ject, hop into the de­signer and lay out a sim­ple win­dow. I haven’t even read any doc­u­men­ta­tion or tu­to­ri­als for using Qt at this point, so I get a lit­tle stuck. There are no Cre­ator tu­to­ri­als out there yet, so I skimmed through some other Qt stuff and quickly found my way to the lay­out model – ex­actly what I was look­ing for. The best thing I’ve found in WPF is the abil­ity to have a win­dow layed out au­to­mat­i­cally based on the size of con­trols in it, and I’m very pleased to see Qt has some­thing sim­i­lar. Tie in some events, and I have a sim­ple app cre­ated.

Com­pile the pro­ject and oops, some er­rors pop up. After a lit­tle hair pulling, I found out the Cre­ator bun­dle comes with MinGW GCC 3.4 — very old! It was not com­pil­ing some of my stan­dard C++ cor­rectly. I’ll see about in­te­grat­ing TDM’s GCC 4.x builds soon, but fear it will mean re­com­pil­ing Qt. For now I’ve be­grudg­ingly dumbed down my C++ to the sub­set that GCC 3.4 works with.

In one day I’ve learned how to cre­ate a func­tion­ing GUI pro­gram with Qt. I’ve also backed away from the de­signer and learned how to do things man­u­ally – I’ll def­i­nitely use the de­signer for a se­ri­ous pro­ject, but learn­ing how things work be­hind the scenes is im­por­tant too.

All-in-all I’m im­pressed with Qt. It feels na­tive on Win­dows, and has a rel­a­tively clean API. It is more pow­er­ful and pro­duc­tive than straight Win32, but doesn’t seem nearly as pow­er­ful as WPF. Then again, it took me sev­eral months to wrap my head around WPF enough to build any­thing of sub­stance.

CN 2009 recap

This year’s NSU Cul­ture Night was in­cred­i­ble!

Open­ing up was Kyodo Taiko, per­form­ing their Swing and Black and White sets. Black and White is a new, pow­er­ful set cre­ated this year which I sus­pect will be­come a new fa­vorite among fans. As al­ways, Kyodo loves to have fun – doing funny skits in be­tween sets, and al­ways show­ing off their skill and good humor through­out their per­for­mance.

Next was the drama team. Drama al­ways sets the theme for the show, typ­i­cally about the cur­rent is­sues of the Nikkei com­mu­nity. This year their per­for­mance cen­tered on re­cent buy­outs in Lit­tle Tokyo, hop­ing to bring at­ten­tion to what has been a de­cid­edly stealthy move by cor­po­ra­tions that may end up re­mov­ing a large chunk of the cul­ture from Lit­tle Tokyo. This year’s set had plenty of humor to go along with it, oc­ca­sion­ally pok­ing fun at rival Los An­ge­les col­lege USC. They brought back a run­ning joke from last year’s per­for­mance which re­ally had the croud bust­ing up. This per­for­mance was split into sev­eral parts, spread through­out the night.

The Odori (tra­di­tional dance) team opened up with their typ­i­cal slow, ex­ag­ger­ated, metic­u­lous dance. But some­thing was dif­fer­ent this year – for the first time I’ve seen, they are using a bit more mod­ern music. They per­formed Gion Kouta, and ex­pertly merged it’s more com­plex and slightly faster music with the tra­di­tional Odori style. This ap­proach was a pleas­ant sur­prise, and puts them more in line with Kyodo’s tra­di­tional-mod­ern hy­brid style.

NSU Mod­ern’s first set was their very en­er­getic Mad Hat­ter’s Tea Party, which is a real treat to see live. Mod­ern re­ally shines here, show­ing a true pas­sion for in­no­va­tion in dance—these guys must sweat pure con­cen­trated skill.

After a short in­ter­mis­sion, Odori started the show per­form­ing the aptly named Mat­suri, also a more mod­ern up­beat song. This was evoca­tive of a real mat­suri (fes­ti­val) in Japan and was very fun to watch!

Kyodo came back to per­form Yon­sei, Nanairo, and of course their sig­na­ture fi­nale En­core. Nanairo is a new set cre­ated by this year’s new­bie class, but not to fear—this has all the en­ergy you’d ex­pect in a Kyodo per­for­mance. Kyodo holds a spe­cial place in my heart—the first time I saw them left me spell­bound, caus­ing me to fall in love with taiko and seek it out any­where I could find it. I’ve been to many taiko per­for­mances since then—most of them fea­tur­ing Kyodo—so I am quite fa­mil­iar with En­core. Yet after all this time, it still fills me with the same glee as if I was see­ing it for the first time.

Mod­ern closed the night with their Tribal and Jazz sets, both of which I've never seen be­fore. Tribal was typ­i­cal Mod­ern style—en­er­getic, fun, super sexy, and good beats. Jazz took a com­pletely dif­fer­ent turn with a strong bal­let per­for­mance, show­ing Mod­ern’s di­ver­sity.

And that’s the night, it was a blast! I was happy to see Leech Sen­sei there, my awe­some Japan­ese teacher from high school. Looks like he brought even more kids than when I orig­i­nally came to a CN with him, so I’m glad to see Japan­ese is get­ting more pop­u­lar! I just hope they aren’t giv­ing him as hard of a time as I did, read­ing Dune in class and ar­gu­ing with him about the mer­its of Quake vs. Di­a­blo II ;).

Edit: added miss­ing Kyodo and Mod­ern videos, and up­dated the ex­ist­ing links to the CN2009 ver­sions. Thanks zachirie!