rc3.org

Strong opinions, weakly held

Month: July 2005 (page 5 of 7)

The important things in life

I agree with Slate’s Dana Stevens that the new Daily Show set is unpleasant. Bring back the couch!

Where are the women?

Everybody knows that fewer women than men start careers in the computer industry, but now it looks like the women that did wind up working in this business are leaving.

Revisiting my data fetching puzzle

So a couple of months ago I wrote about a problem I was having with a reporting application, and the solution I was considering. In short, the problem was how to paginate results that may return multiple rows for each “object” due to the use of an outer join. I wound up going with the solution where I retrieved the IDs for each object first and then went back and used that list of IDs in an IN expression to grab the actual data.

That worked fine, but now I find myself in another sticky situation. The solution is ideal when you’re working with paginated results. I retrieve the IDs, then I retrieve the data, then I iterate over the data and convert it into a data structure (this is PHP, so an array of associative arrays) so that I can iterate over it in the presentation layer. When we’re talking about pages of 50 or 100 objects, the solution is fast and even somewhat straightforward.

The story doesn’t end here, though. The application also produces downloadable reports in CSV format, some of which contain many thousands of records. Naturally, I was using the same code to fetch the data from the database and prepare it for the presentation layer, the only difference being that if I wasn’t paginating, I skipped the “retrieve IDs” step and just used the search expressions in the query that retrieved the actual data. Unfortunately, for big reports, copying the results from the database into a datastructure that lives in memory can result in massive memory usage. So now I have another hurdle to cross, how to restructure my code so that I can iterate over the results from the database and present them in one step rather than accumulating everything in memory and then spewing it out all at once. The trick, of course, is to accomplish this in such a way that I can still reuse my code easily and without totally mixing up the business logic (which turns the data in the database into presentable results) with the presentation code.

I know that I could just raise the memory_limit setting in php.ini, but that doesn’t strike me as a real fix.

Karl Rove’s significance

It sure seems like Karl Rove’s career as an employee of the White House is on the ropes now that it turns out that Joseph Wilson’s September 2003 accusation that Rove had disclosed his wife’s identity as a CIA agent by leaking to the media is true. Given that we may not have Karl to kick around any more, it’s important to me to remember and take note of his role in the Bush administration as the symbol that perhaps best illustrates the hypocrisy of the George W Bush persona that has been manufactured. Since Bush first ran for president, his claims of being an outside the beltway figure who avoids being mired in petty partisanship have been a constant fixture. But Karl Rove ha always been the man who gives lie to those claims. Nobody has ever explained to me how Karl Rove differs from Dick Morris, whose presence in the Clinton administration was emblematic of its largest failings (and rightfully so). And yet after the 2004 election, when President Bush had won the last election he would ever enter, Karl Rove was granted a promotion. If you are above playing politics, then why do you need to retain the acknowledged master of political gamesmanship? So if Karl Rove does exit soon, let’s try to remember why he was there in the first place.

Blog tools revisited

Well, my bake off of blogging tools has sort of been hibernating for the past couple of weeks for no particular reason. That being said, I’m declaring a winner — Movable Type. The only question now is whether to wait for Movable Type 3.2 or to go ahead and migrate now and then upgrade when it’s released.

Why Movable Type? The short answer is that MT supports multiple weblogs. I was under the impression that everybody did at this point, but that isn’t the case. None of the other tools seem to offer any compelling features that Movable Type does not offer, and I don’t have a strong aversion to using tools that aren’t open source. Besides, given the level of effort I’ve put into comparing weblogging tools, the odds of my contributing to any of the open source tools are low, at least right now. So Movable Type it is.

Next step — building templates.

Is Perl on the way out?

In his most recent Ask Tim column, Tim O’Reilly responds to a reader who asks, “Is Perl relevant any longer?” Surprisingly, Tim’s answer is “Yeah, pretty much.” He puts it in the nicest way possible, though.

Evangelism I can deal with

Blake Ross has the best technology evangelism story you’ll ever read.

Dancing With the Stars

I’m going to out myself as someone who watched Dancing With the Stars. My excuse is that my wife will watch anything if it has to do with dance. I felt emboldened because both Kevin Fox and Jason Levine have outed themselves similarly. I post only because I was outraged at the injustice of the judging and results throughout. If you don’t know what happened, I won’t bore you with it. Suffice it to say that at some point during the show’s run, the producers rigged it to insure that an “underdog” who emerged after the first episode would ultimately win. Oh, and the judges have no business judging a dance competition, since they didn’t seem to award scores based on the ability of the participants to actually dance. What can I say, I’m still frustrated.

One false move

Microsoft is rumored to be looking to aquire Claria (makes of Gator, a famed spyware package), and have updated their anti-spyware tool to ignore its presence. My dislike for Microsoft has really ebbed over the years, but this move leaves a bad taste in my mouth.

Updated: I changed from a BoingBoing link to the Register because BoingBoing incorrectly reported that Claria had already been acquired by Microsoft. They have since posted a correction.

Morgan Spurlock

I really like Morgan Spurlock’s new television series, 30 Days. The show is entertaining and informative, and the production values are excellent. At the same time, I am entertained by Morgan Spurlock Watch, which serves as a useful tonic to Spurlock’s excesses. I’m not sure what it says about me that I enjoy both. (Oh, and if you’re thinking about buying Don’t Eat This Book, I’d recommend Eric Schlosser’s Fast Food Nation instead.)

Older posts Newer posts

© 2024 rc3.org

Theme by Anders NorenUp ↑