Monday, September 12, 2005

Joe Ranft, R.I.P.

Joe Ranft, of Pixar, died at the age of 45 on August 16, 2005, in a car accident. I didn't know Joe, but as an animation fan in general, and a Pixar fan in particular, this is horribly sad news.

I keep away from the news, in general, so I didn't find out until just minutes ago. I feel for his friends and family, and know that Pixar will have a hard time living up to his legacy. He was the head of story on several films, which for Pixar, is just about the most important position there is. His work includes other films like Who Framed Roger Rabbit? and The Nightmare Before Christmas. has a page in memorium, which links to a Hollywood Reporter page on the accident and Ronnie Del Carmen has an entry in his blog.

Rest in peace, Joe, and thanks for all the good work you did for us fans.

Sunday, September 11, 2005

Is there any winner, here?

So Hurricane Katrina comes in, and wipes out lives, property, and most likely, some politicians. It's not surprising: in Chicago, we once fired a mayor that messed up because of SNOW for heaven's sake.

I'm not a fan of the Bush administration, so I'd love to pile on. But I haven't seen anything that tells me any level of government handled this well. There's the "Everything Fine, Nothing to See Here" angle from FEMA, looking like an out of touch parent of a drug-using, sexually active teen who just knows his kids are as untouched as the ones on "Leave it to Beaver." The cluelessness there is the most vicerally inexcusable right when you're looking at news of people in desperate need of help. Then there's the mayor of New Orleans screaming at everyone to get more help in, when getting everyone OUT seems to have been his job. And what exactly IS going on with the LA governor?

And that's just NO. It wasn't the only place wiped out.

A fair number of folks are showing no sympathy, saying that no one should ever have lived in NO in the first place, as it's too dangerous. I suspect they're the ones who want us to all live in deep salt mines, because every major city in this country has had something hideous happen to it in the not too distant past. Or do you not recall 1995 when Chicago had 739 dead from the heat?

I hope the various investigations, and it looks like there will be many, come to mostly the same conclusions and that the whole experience scares the country into being better prepared for such a disaster (or the local equivalent)... but why should I be an optimist? You'd have thought 9/11 would have spouted that kind of concern, and it did, but where's the evidence that any of the planning or preparation for diaster recovery was successful in NO? Or even that it was used: if as a few places have reported, there WERE adequate plans created, then after the heads roll how do you make sure that next time the freakin' plans are actually used?

It's all disheartening. Donating to a few causes helps make me feel better about being otherwise useless but it still seems hollow. Of course, the mercenary side of me says "offer space to a chef! Offer space to a chef!" but those tend to be pretty big people, and my place barely contains MY girth. Yes, making light of the situation is one way I deal with it, why?

Sunday, August 29, 2004

Corporate programming: Welcome to Annoyance

I can't name the names, or I (and the company I work for) would probably be sued. And no, if you contact me, I can't even warn you: sorry.

So there's this project at work, and it costs a bundle to get done. Much of that is just figuring out requirements, as nobody (of course) really knows ALL the little details of the job. What IS clear is that there are something like 4 different spots where the same data is printed out and sent to another set of folks for data entry, so any automation at all would save a LOT of time.

I won't detail the ridiculous nightmare that was the going live with a consultant that screwed up the final production install: I mention it only because it's what got ME involved in this thing.

See, once I was brought in, I also got the following bug reports... and there are a few. But the BIG killer is the speed... or lack thereof. It's application-wide, that clicking from one page to the next is taking, roughly, 30-60 seconds. Or more. This is not a web-based content management system: this thing is just showing a list of people, and a few bits of data about them. There's no reason in the world for this nonsense.

With my time constraints, though, we bring in another consultant. And he looks at the code for a few days, and he comes back and points out that, for any given action, the application is getting THE WHOLE SET OF RECORDS in the database, then filtering them, then creating little objects for the bundle. Which all die, of course, at the end of the page hit.

This weekend, I replaced the overly complex visual basic objects with plain old ASP code and reasonable queries, and the average time is 2 seconds from one page to the next. Since I'm an open source advocate, and haven't ever worked in ASP, the fact that I can do this in a few hours means anyone who is seriously PAID for this should have never, ever done something as stupid as grabbing the full database, and certainly not making objects for all the records.

The company's DBA and I (I'm technically the webmaster, but basically I'm "that guy who can code in a bunch of languages and knows basic SQL") have asked the boss in the future, to let us be in on the approval process for any project. We'd have spotted, if we had been given the opportunity, the following danger signs:
  1. No foreign keys, no constraints on the database: "that just takes away flexibility" (!!)
  2. The aforementioned grabbing of all the records in a table
  3. The extreme overuse of objects.
Number 1 is a giant sign of an amateur at work. By trying to be more "flexible" with the database, you
  • Make it wholly possible that corrupt data can get into the database, requiring manual intervention to get it out.
  • Have to do all the constraint checking and foreign key relationships in code. News flash: the folks who wrote MS SQL server, Oracle, PostgreSQL: these folks are smarter than you. Trying to do what they've already done is a waste of time, and if you're a consultant, a waste of money.
  • Hide serious bugs in your code, related to "corrupt data" above: if the database has constraints, it's like a whole little set of asserts or unit tests that your code has to deal with. If your code can't, and the constraints are proper, then you have a bug. If there are no constraints, you have to FIND that bug, which is always more work.
Object overuse is endemic in modern programming. Folks, when you have a table, and you want to list that table on the screen, making a little object for each row, and calling the object display portion to show it, is only useful if you know you're going to use those objects again, a lot. In almost every case, start with the simplest piece of procedural code that shows the table, and you'll have saved yourself a LOT of work. If you really do need the objects for some future project, they'll be easier to implement well for that project AND the previous one, if by some miracle you actually need to change the old one. Probably you won't. Don't bet against your time that way.

This doesn't necessarily apply to new languages that are meant to be object-centric. In C#, it might make more sense to start with the OOP approach for your simple table display... I won't bet on it, not having gotten into C# yet, but it might.