Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Jeff Makes Software

The software musings of Jeff Putz

  • Come on, Steve... don't be a target

    I'm a big Microsoft fanboy, and I really admire Gates and Ballmer. However, Steve says some things from time to time that make him a target. He said today: "The most common format of music on an iPod is stolen."

    If you're a presidential candidate, you can make stuff like this up and people will just take your word for it. Techies, generally speaking, aren't that stupid, so to make an unsubstantiated claim like that and hating on the company that makes the most beloved device of our time is asking to be a target.

    My wife and I have iPods, and we actually own everything on them (including hundreds of iTunes songs). The rest of the thousands of files were ripped from CD's we own. We may not be typical, but the point is that suggesting every kid with a WMA player has more legit music than an iPod user is stupid.

  • SQL ORDER BY weirdness

    I'm sure some SQL guru will laugh and kick Dummies books in my face, but what's the problem here? I decided to do a stored procedure to page results of forum topics using a cursor. (Before anyone tells me that's a bad idea, read this to see why using the cursor appears to be the best performing option.) Originally, I was getting topic records in a date range, using this SQL:

    SELECT * FROM Topics
    WHERE (ForumID = @ForumdID) AND ((LastPostTime > @TimeSpan) OR (Pinned = 1))
    ORDER BY Pinned DESC, LastPostTime DESC


    To populate the cursor, prior to the paging and such, my sproc uses this:

    SELECT TopicID FROM Topics
    WHERE ForumID = @ForumID
    ORDER BY Pinned DESC, LastPostTime DESC


    For some likely obvious reason I'm missing, it doesn't do the ordering for the Pinned column, which is a bit. Pinned topics should come first.

    Tell me what I'm missing, and you get a free copy of the forums! ;)

  • Messeges to me via asp.net may have been spam filtered

    If you've sent me a message via weblogs.asp.net, I may not have received it. I just learned that the asp.net is on the black list being distributed by IPSwitch for IMail server. I cut it out of my list. No one at IPSwitch seems to be interested in removing it, even though it's obviously a legit site. I'm not sure actual humans work there. Funny how they have no problem making sure I get e-mail from them for a service contract renewal.

  • The scary reality of being a published author

    Last night, someone pointed out that my book is already listed on Amazon. I'm a little freaked out by this, in part because it's not even done yet. We've got one more round of editorial review.

    I'm not sure exactly why I'm freaked out. I started my professional life working in radio as on-air talent. It's a very visible job where people think you're famous (because they don't know how little you actually make). That never bothered me, and I wasn't worried about being judged or whatever. This is so different from that, perhaps because programming books are not something read by stupid people, or top 40 listeners. ;)

    I have a lot of anxiety because if the book sucks, the feedback indicating this is very visible in terms of bad reviews online and a lack of royalty checks down the road. Yes, despite the occassional pissing match I get into online, I'm ridiculously insecure. I think my strength is teaching, not necessarily all encompasing knowledge. The reviewers say I know my stuff, but for some reason that's not comforting.

    On the upside, it's nice to know that I'm in the home stretch now. Writing a book is a lot harder than I thought it would be. I don't think I could have done it while working a regular day job. It's not that it's exactly time consuming, but it's very difficult to stay focused on it. Regardless, a month from now, it'll be out of my hands and all I can do is hope for the best when it hits the stores in the spring.

  • I sure hate regular expressions

    Call me names or whatever. I hate regular expressions. I can't put my finger on what exactly it is that keeps me from mastering these.

    I decided that the text parser for POP Forums v8 should be retro-fitted into the v7.5 point release I'm working on because it sucks and I can't wait (v8 is a Whidbey product). I would like to try and produce something remotely resembling XHTML-compliant junk coming out of it. So far so good. The last stab I took at it was back in early 2003, before I really understood unit testing. What a difference that makes in terms of writing the code and debugging (latching on to Nunit, in this case).

    Still, I can't stand regex. Just when I get one thing right, I break something else. This is one of the reasons I will never be one of the really brilliant academic type code monkeys.

  • The Home Theater PC complete

    I don't remember now how I found Beyond TV, but for all of the times I was missing the two TV shows I actually watch, I figured there has to be a better way than the VCR. I had seen Windows Media Center and wasn't that impressed, or interested in tying into the platform. BTV controls DirecTV receivers by a serial connection, has free program listing and it has a great hardware MPEG encoder bundle. TiVo shmeevo, I say.

    So I took the plunge and built my own box. The most ridiculous thing I bought was the case. The aluminum Ahanix D5 looked the nicest to me. Yeah, it's a rip-off for $200, but I couldn't find a better looking one in black that didn't have a stupid door on the front. What the hell is with the doors on the front of HTPC cases? Last I checked, none of my other stereo components had doors on them. It's a nice case, with two issues. The first is the cheap punch-out slot covers on the back. That's lame, and for $200 I would have expected better. The second is that the drive cage is nearly flush to the front, meaning you don't get enough wiggle room to align your DVD drive so that the button makes contact and the replacement drawer face is in the right place. I had to shave the sides of the existing face off so it could slide ever so slightly further into the cage. One other minor complaint is that the little display has to connect via the parallel port, and the software for it sucks. It's a minor complaint because I wasn't really that concerned about using it in the first place.

    I got a really spiffy A-bit (NF7-S) motherboard with Nvidia's nForce chipset and an optical SPDIF audio output. Sitting in it is a mobile Athlon XP 2400+. I opted for the mobile because it runs a little cooler and is easily over-clocked. The rest of the stuff is pretty standard, including a wireless card. The hard drive was a steal at CompUSA... 250 gig Maxtor for $130. The DVD burner is a $68 NEC that does dual-layer discs. It all fits no problem. A $17 infrared keyboard/mouse has been a home run.

    The heatsink had to be quiet, and work efficiently, so I settled on this beautiful unit from Thermaltake. It's HUGE! It really dominates the inside of the case. Sure enough though, it runs at a fairly cool 45 degrees most of the time, and that's with the CPU slightly over-clocked.

    The software is awesome. Beyond TV is a really great product. The guys at Snapstream really put a lot of love into their products (and they're all about .NET too). I got their remote control as well, which works great with PowerDVD and to a certain degree, iTunes. Pausing live TV works as it should, and it "finds" the TV spots in recorded programs. The hardware MPEG card makes nice recordings from the DirecTV receiver. The really neat thing is that you can pull up the program guide on their site from any Web browser, and BTV periodically checks the site to see if you've ordered any recordings. That's cool.

    I replaced my CD player, DVD player and VCR with this one box. The remote and BTV make it possible to never need the keyboard when you're using TV functions. I only need it for iTunes. Bottom line, I have a media center I can always upgrade.

  • Why do .NET community projects suck?

    "Suck" is too strong of a word, but who cares. I probably have your attention. :)

    It seems that every time I want to post something to ASP.NET or to this blog, I get some kind of errors. The frustration of using this stuff is one thing, but the bigger problem is that we kind of expect these forums and blogs to be examples of "how to do stuff" on our beloved platform.

    I've looked at the source of these two packages and I find them to be needlessly complex approaches to otherwise simple problems. An online forum in particular is at its core four database tables with simple relations (I realize there's more to it, but that's the core required to collect posts and display them).

    Other platforms have some great stuff out there. They might be commercial, but you'd think that with Microsoft's backing it wouldn't be a big deal. vBulletin is an amazing product for PHP. What I really like most about it is that the most recent version took a very hard look at what we expect and do with a forum and came up with a much cleaner interface. I frequent a number of sites that use it and I love it. Even the original UBB written in Perl, arguably the original Web-based forum we all immitate today, was awesome, and generally just worked (and it was written by one guy).

    Where is our UBB or vBulletin? People keep telling me it could be my forum if I kept improving it, but it doesn't have the features to make it popular. (Actually, it meets my needs 100%, which is part of the reason it's so hard to keep improving it.)

    I guess the thing about the Microsoft Web jockey community is that it's still dominated by people from the corporate world. Corporate types think differently. On one hand they're generally a lot smarter than I am (though I suppose after working for enough public companies I'm supposed to be a corporate type), but on the other hand their approaches lack the guerilla instinct that the typical one-man band has (the Chris Sawyer's, Ted O'Neill's and even the John Carmack's of the world). Maybe there just aren't enough people out there as clever as the people on the .NET team itself.

    Maybe the release of Whidbey will reveal new and fabulous things from the community.

  • RollerCoaster Tycoon 3 demo... ouch!

    Atari and Frontier Development released the demo or RCT3 yesterday, and what a mess it has been. It would appear by reading their forum that fully one-third of the people that tried to run it couldn't do to various errors. Ouch! It appears a lot of it is driver issues. It has been said somewhere that the demo is based on an aging beta. Not sure why you'd put something out there like that.

    For me at least, the demo works pretty well, with only a handful of minor graphical glitches. I like the direction Frontier took the game, and it still sticks to Chris Sawyer's gameplay. My only disappointment, or I should say affirmation of my fears, is that the minimum requirements are entirely absurd. Playing the game generally gets me 15-22 fps, which is fine until you go into the "CoasterCam" mode where you get to ride your creations. For that to work well you no doubt need a Doom 3-capable video card.

    Few games have ever been as important to me as this franchise, so I hope that the retail release in about a month gets the most thorough QA possible.