Wednesday, April 25, 2007

"The Pines Of The Appian Way" rocked my world

Last night I performed Ottorino Respighi's "Pines of Rome" with the Salt Lake Symphonic Winds. During the last movement - "The Pines of the Appian Way" - an antiphonal brass section of 16 players joined in with the rest of the group, just belting away, adding even more power to the ensemble. Add the fact that the trombone section (my instrument) was seated in the back, next to the trumpets, and right in front of the percussion and extra brass, and we were on some sort of hollow floor that was shaking when the bass drum and tympanis played, and that has got to be the one of the most visceral music experiences I've ever had.

Holy crap.

The last movement was absolutely incredible. I think the sound was ringing through the concert hall for a full 5 seconds after we finished. My big old Conn 88HO got as much as it could take in terms of sheer, focused sound projection without distorting.

Now I've got to find a good recording of somebody much better than us performing it. I bet it will sound better overall, in terms of performance quality, but it will be tough to beat the experience of actually sitting right in the middle of the group and getting enveloped by huge, building tidal waves of sound, envisioning huge columns of ancient Roman soldiers marching up the road as the dawn breaks. Goosebumps.

I whole-heartedly recommend it to all musicians out there. If you ever get a chance to perform this piece with a good group including the extra brass section, do it. What a rush.

Tuesday, April 24, 2007

C++ is a psycho hose beast

C++, you and I go a ways back. We've been together since before I finished my degree. Since before I got married. I had great times with C++ in college, and we were hanging out pretty much exclusively during my first 3 years as a professional, and I thought things were just great the whole time since we'd met, 12 years ago. That's a pretty freaking long time to be deluding myself into enjoying a dysfunctional relationship.

I've had enough. You suck, C++. We're getting a divorce.

I'll be civil about the whole thing, and we'll still deal with one another to support the kids (legacy projects). Maybe you'll still have a happy life in low-level systems code, but I just don't love you any more, and I've got to move on with my life. But before we split, it's only fair that you know why I'm taking such drastic measures.

How do I hate thee? Let me count the ways...

1) You can't decide who you are.

Any time we're with our other compiler friends, you are maddeningly inconsistent in your behavior. It's seriously creeping me out when I hear about the multiple lives you're going on with. I talk to one buddy and he says that you've adopted the standard namespace and no longer want to deal with your old friend and all her friends. Another says you told her you've never heard of the standard namespace, and you're as close to the old ".h" gang as ever. And now I heard that you actually acknowledged the existince of the "export" keyword with that one pedantic friend, and now that's all he'll talk about when we meet. It's like you brainwashed him into thinking it's commonplace.

I'm tired of trying to remember which compiler we're hanging out with, and having to walk on eggshells with the preprocessor so you don't blow up. No more. My next significant other will be somebody that not only has standards, but sticks to them.

2) You live in a constant state of self-denial

The other day I wanted to ask you about an enumerated type, to see if you'd defined a particular name. Of course, you would have covered your ears and done your "I don't know what you're talking about" routine. Just once, it would be nice if I could give you a string, and you could tell me if a class had that particular method, attribute, whatever. Instead, you basically tell me screw off and do it myself. Introspection opens up all kinds of amazing framework and metaprogramming possibilities, but you're utterly incapable of doing this without help from clunky libraries.

3) You don't know what strings are.

Speaking of strings, what the heck is your problem? Every time I want to use one, I have to use a null-terminated pile of garbage, or a
std::string with a horribly bloated interface, or any number of nonstandard third-party solutions with different interfaces and conventions. I shouldn't have to put up with this every time I want to do some high-level string manipulation.

4) You barely know what arrays are.

Arrays are just pointers to the data with no comprehension of the length of said data? Seriously, do you know how crappy that is? You make two-dimensional arrays needlessly cumbersome and obtuse. How tough would it be for a minimal, non-resizeable version of std::vector to be a first-class citizen? Heck, just making them objects that are aware of their own size would make "ProcessArray(int data[], unsigned int length)" a thing of the past.

5) Your templates are uglier than Sam the dog

Sure, at least you have templates, which is more than Java could say before generics. But holy crap, do they have to be so freaking nasty? And I'm just talking about usage, not implementation. I hope I never again have to type "for(std::map>::iterator ix = data.begin(); ix != data.end(); ix++)"(note: The fact that I forgot to use the preincrement operator instead of the postincrement is yet another stupid detail I have to devote brain cells to) just to set up a loop. Frankly, I'm amazed that people have produced compilers that can make sense of your nonsense.

6) Crappy dependency resolution

I could just #include everything I need, but then every time I make a change half of the project gets recompiled. Admittedly, this isn't a problem until I, oh, get out of school and enter real life, and have to work on sizeable projects, and then it takes 15, 30, 60 minutes, or even hours if you've got a really gnarly program. Way to kill productivity, jerk. And even with #include peppered all over the place, if I get a circular dependency loop, I still have to throw forward declarations in there to get by. Then I have to keep track of when to give you a forward declaration or an inclusion. When I'm subjected to this kind of micromanagement, how does this help me?

7) The neccesity for design patterns

Let me make this clear: I don't hate "Design Patterns", neither the book or the concept. What I do hate is that these are even neccesary in C++. A lot of these patterns are simple to use and don't require a cookbook if implemented in another, more capable language, unlike you, you decrepit heap of ineptitude. I guess this is nitpicking, but I'm at the limits of my attention span on this blog post, and I felt I just had to throw one more reason in there. I could probably go on all day, but then I'd get all weird and incoherent on my imaginary audience, so I'll just take a deep breath and move on to my conclusion. Let's get this rant, er, break-up over with.

(deep breath)

Programming language monagamy considered harmful

Ruby looks like a really cool language, and I'm going to start playing with it more, and hopefully use it on some lightweight applications. Yet, as great as Ruby looks, I'm promising myself that I won't ever get married to another language. I need to broaden my skillset some more, wrap my mind around different paradigms, that kind of thing.

I've heard it said many times, in various forms, that I don't neccesarily need to use Lisp for real work, but I need to learn about it, get comfortable with it, really explore what makes it different from the C family of languages, and it will make me a better programmer. That's next on my list, after I try building a few decent-sized apps in Ruby. Maybe I'll try Haskell or OCaml next.

It's hard to get away from the safe languages, like C, C++, Java, Perl, etc. That's what employers want, because they're popular, and they can pick up just about anybody that can read some C, and have a vauge idea of what's going on. It's hard to use some of these more different languages at many companies, which is understandable, because for all of it's groundbreaking amazingness, who has real world work experience with OCaml? Speak up. Anybody? That's what I thought.

But if we had fewer language monagamists out there, more die-hard language bachelors of the kind I'd like to become, this wouldn't be as much of an issue. We might just find ourselves asking each other why the heck we're still using Perl, when Ruby does everything Perl does with practically none of the downside. And then some of us start using these new languages on some low profile, internal projects, and it works, and we start using them more and more, and suddenly it reaches some sort of critical mass and a language like Ruby completely supplants an inferior cousin like Perl.

It could happen, and I hope it does.