Archives

Archives / 2004 / October
  • It's hard to conduct an uptime test in the real world

    Last night my host, ServerMatrix, put my server on a new power connection that allows me to remotely power cycle the box. I appreciate the new feature, but it's sort of a bummer that I had to lose 120 days of uptime.

    That's pretty cool though. I mean, I never made it that long when I use Win2k Server. In this case, I never even cycled a service on and off. It just worked, never choked. It's great to see that kind of reliability in a Microsoft product.

    Read more...

  • iTunes stops working, Windows Update annoyance

    For some reason, iTunes just stopped working on my HTPC. It appears in the process list, but the UI never appears. Annoying.

    Windows Update has an AMD processor update from 2002. It can't install it, and it gives one of those great meaningless errors as a sequence of numbers. Also annoying.

    Related? Only God really knows. I hate it when stuff doesn't just work. Reminds me of the Windows 95 days where you had to reinstall the OS once every six months.

    Read more...

  • Revenge of the greedy RegEx

    Naturally, when I get my text parsing right for the forums and release it, I realize that my test coverage wasn't as good as I had hoped. I've got a spot of code that looks for pseudo-code quote tags for conversion to an HTML blockquote. The expression looks like this:

    (\[quote\])(.*)(\[/quote\])

    Works like a champ... sort of. The middle group in the Match object (match.Groups[2]) then gets parsed to look for nested quotes. This works well to.

    The problem is that it counts this as one entire match:

    [quote]quote 1[/quote][quote]quote 2[/quote]

    Where I'm troubled is that I'm not sure which group I should be altering. The middle "meat" of the quote I need to access via the Groups collection so I can parse for nested quotes, and every attempt I've made to alter this breaks the proper nesting.

    I hate it that this one area causes me so much grief. I'm not brilliant, but I would think I'd be smart enough to keep this from eluding me! Help is appreciated.

    Read more...

  • POP Forums v7.5.0 final posted

    I won't post the changes (again) here, but last night, or rather this morning, I posted the final distribution of POP Forums v7.5.0.

    http://www.popforums.com/

    This is only an incremental upgrade, not something amazing and new. The real highlight of it is that the text parsing engine is finally producing something XHTML compliant (if my test coverage is any good). It's not the cleanest code ever, but it works, and it doesn't bring the server to its knees to do it. Two pluses for any software. ;) It was always kind of a source of embarassment to have mangled HTML creep up into a page every once in awhile, so after like five years of messing with it, I'm glad it works now.

    There's a site I very much would like to build and deploy before the end of the week, then I can turn my attention back to v8. My motivation for working on that had slipped a bit since it's not like I can use it in production until beta 2 of Whidbey. It has been hanging out in the corner of my mind though, and that has allowed me to think some things out regarding its overall architecture. I think it'll be better than I originally conceived it.

    Read more...

  • Are there remnants of a SQL worm out there?

    I noticed that some IP was banging on my server today, specifically on the SQL port. No big deal I guess, because I just outright blocked it for safety's sake, but are there little remnants of that SQL worm still hanging out?

    Read more...

  • POP Forums 7.5.0 beta 2 posted

    POP Forums 7.5.0 beta 2 has been posted to http://www.popforums.com/downloads.htm

    This beta fixes minor bugs from the first, and the text parser in particular generates very nearly correct XHTML every time (or at least it passes the unit tests!). I expect this will be a short beta cycle before final release. Thanks to the cats that posted to my blog for at the very least inspiring me in the right direction on certain issues.

    This release is a point release intended to fix some of the problems associated with v7.0.x of the core engine and v7.1.0 of the "feature" UI package. A more comprehensive update to v8.0 is slated for release when v2.0 of Microsoft's ASP.NET may be licensed for use in production environments (this is expected to be some time in the first quarter of 2005).

    The following outlines the changes in this version:

    Engine changes from v7.0.x to v7.5.0

    • New text parsing engine
    • Removed PopForums.Global class
    • Added PopForums.Module HttpModule class to replace global.asax functionality
    • Added PopForums.OnlineUsers class 
    • Five methods from PopForums.Stats marked obsolete, replaced in OnlineUsers
    • New online user engine
    • Added OnlineUsers table
    • Added "PopForumsSessionLength" to config settings, indicating number of minutes in a user session as tracked by OnlineUsers
    • Added new PopForums.Forum.GetTopics() overload to get paged results 
    • RichText control displays in Windows 2000
    • Old PopForums.TextParser methods marked obsolete, new ones added
    UI changes v7.1.0 to v7.5.0
    •   Fixed member post paging
    • Online user stats now draw from PopForums.OnlineUsers 
    • Added RequiredFieldValidator to SendPrivateMessage.ascx to check for a subject
    • PM reply doesn't add endless string of "re:"
    • Removed global.asax entirely
    • Fixed PagerLinks.cs to correctly display tool tips
    • Added PagedPagerLinks.cs to display paged results from new PopForums.Forum.GetTopics() overload
    • Made the member mailer text box in the admin bigger

    Read more...

  • Help a guy out with RegEx

    OK, I get how to replace a group in Regex.Replace something like this:

    Regex.Replace(@"(blah)(blah2)(blah3)", "new$2new", RegexOptions.IgnoreCase)

    ...where the result is "newblah2new"

    But how would use replace "blah2" with something dynamically generated, namely another string based on "blah2"? I'm tripping all over the examples in the docs and need a little help.

    Read more...

  • Stupid programmers of the day: Symantec's Norton Anti-Virus

    Last month I complained about the stupidity regarding The Sims 2 save folders. Well the kids at Symantec have made an even more ridiculous programming desicion.

    If you move the product's Start Menu folder to somewhere other than the root Programs folder, it chokes and gives you the message, "Norton AntiVirus 2005 doesn't support the Repair feature. Please uninstall and reinstall." Even worse, the message pops up every time you open an Office document.

    You've gotta be kidding me! Symantec wants to dictate the way I structure my start menu? I don't know about you, but I like to categorize stuff and organize it does I don't have a list of 50 different program groups.

    Unbelievable. I think I'm going to write them and tell them I want my money back. I'll buy someone else's product. Who allows this kind of thing to make it to retail?

    Read more...

  • Pretty media center PC's

    Story on News.com today shows conceptual media center PC's. Existing units don't sell well. Wow, what a shocker. Maybe it's because they look like PC's? Who wants to put one of those nasty looking boxes in their living room? You know, if Apple was designing the things they would fly off the shelf.

    I spent a ridiculous $200 on a case to make my HTPC look like it belonged in the living room. Talk about purchase regret, but what else could I do? Have you seen those hideous PC's made by HP and Dell? No thanks. Alienware got it right, but even I couldn't justify the cost of one of their boxes.

    Read more...

  • Product activation horror

    I got a shiny new CPU and motherboard this week, which required that I reinstall Windows to get it to boot (and by reinstall I mean "repair"). All was going well until I had to reactivate Windows. It wouldn't let me logon until I did so. The problem was, of course, that it couldn't connect to the Internet because the new network drivers weren't installed.

    I had to call. For reasons I don't understand, the automated process failed, so I had to wait for a human. I waited 20 minutes. Unbelievable.

    I don't have a problem with product activation, and as someone that owns a little IP, I understand Microsoft wants to protect its products. However, when the design of the product activation creates major inconveniences, it's broken. There has to be a better way.

    Read more...

  • Hardware upgrade bliss

    Against my better judgment and my business income, I bought an Nvidia 6800GT video card last week. At $400, it's more or less their top-of-the-line card right now (save for one higher that gets only slightly better performance). In my history of buying 3D cards, going back to the amazing Rendition cards that threatened 3Dfx at the time, I've generally only bought cards when they came down to the $150-200 level. This time I was planning on the $300 model, which had less memory. Then CompUSA had the sign there about getting Doom 3 for free with it, and Stephanie told me, "Just buy it."

    Of course, I theorized that I might be CPU bound with a two-year-old Athlon 2000+, and this was more or less the case. So after great success with a mobile Athlon in my HTPC, I decided to buy one for me.

    This thing is so easy to overclock that it's like getting twice the chip for half the price. I'm pushing the 2600+ (spec'd for 2 GHz) to 2.4 GHz without a problem. From the benchmarks I've seen, this puts the performance about on par with a P4 3.2 GHz, only the P4 sells for more than twice as much.

    I also have to give great props to the Thermaltake Silent Boost heatsink/fan (along with Ceramique thermal compound). Even though I'm overclocking, it runs really quiet and idles around 45 degrees C. My old CPU idled at 49! Now if I can just get the other five case fans (plus the power supply, motherboard chipset and graphics fans) to be a little more quiet!

    I'm thrilled to be getting 45 fps in Doom 3 at 1280x1024, with all options on 4x anti-aliasing. Believe the hype... it's beautiful and scary. This is the most interesting shooter visually since Half-Life.

    I also have a preview build of RollerCoaster Tycoon 3 that Atari was good enough to send me for review on CoasterBuzz. It runs reasonably well at high resolution, maxing at 100 fps on an empty screen, but it does get bogged down into the 30's with busy maps. I suspect there are a lot of tweaks that were made for the gold release, seeing as how this build appears a month older that the released demo. They really polished up the UI!

    This is a great season for games, probably the best ever. Stephanie has a list longer than mine. While I'm geeked up for RCT3 and Halo 2, she's playing Sims 2 and Leisure Suit Larry, and looks forward to Bloodrayne 2 and others.

    Read more...

  • The challenge of teaching ASP.NET

    I think about how people learn ASP.NET. I think about it a lot lately, because I'm trying to step away from my book and ask myself if my approach will cause light bulbs to appear over the heads of developers trying to learn the platform. There isn't much time for change at this point, but I still think about it.

    In reading a lot of books over the last couple of years, I've started to notice a pattern. Most ASP.NET books are written with the assumption that the reader has a formal education in computer science or at the very least extensive experience with some other platform. My experience out in the world, including my own, is that few Web developers have that heritage. It would appear that most got into the field as a totally new career choice, probably within the last five years. The difference in experience might be subtle after many years of work, but I do think it merits a harder look at the approach used to reach these two audiences.

    I'm not suggesting everything should be a For Dummies book, but I think even many beginning books either jump right in without providing context ("you do this because...") or they start talking about too much too soon ("ASP.NET page requests are handled by an HttpHandler...").

    As I get more involved in the community I see myself getting like this, and I have to slow myself down. I don't know if I'll write another book, but I do expect that I'll be involved with some level of face-to-face teaching from time to time. I think it's critical that authors and publishers make sure that we still serve this market, because clearly it's huge (judging by the questions asked in various forums). It's critical to the developing market that is coming with the Express tools as well.

    Read more...

  • BeyondTV: This is great software

    Snapstream released BeyondTV v3.5 last week, and I immediately loaded it to my HTPC. It isn't that often that I get real excited about software I'm not involved with, but this, my friends, is great software.

    The previous version was pretty good overall, and works great with the MPEG capture/tuner card I got with it. The new version just feels a little more polished in terms of UI and features. The "smart skip" that finds commercials and allows you to blow passed them with one click on the remote is awesome (I have the Firefly remote, which they also make). They have an affordable package that includes BTV, the capture card and the remote. They also have cable kits to control DirecTV receivers.

    The .Net connection: The Web-based admin is ASP.NET based and can be modified.

    I was skeptical that I could build a PC that really just worked, using nothing but the remote. Aside from ITunes, it basically does work with the remote, and that's all I need. All DVR and DVD functionality is accessed via the remote in a manner that's as simple as using a satellite TV tuner. It has really changed how we watch TV, and I'm curious to see how this phenomemon forces broadcast television to evolve. Bandwidth for true on-demand video isn't there yet, and broadcast isn't going to shrivel up and die overnight (well, radio might, since it sucks anyway).

    I love good software. I wish there was more of it.

    Read more...

  • Author perk

    I guess now that it's listed on Amazon, everyone knows that my book is being published by Addison-Wesley. I got a nice little surprise on my last call with the publisher when they offered to send me some of their current books. That's a nice little perk!

    It's a little intimidating too, because most of these other authors are far more clever than I am. It's tough company. These guys have been code monkeys for a long time, whereas I've been doing this (well, professionally anyway) for only about six years. I'm not so worried that I don't know what I'm doing as much as I'm worried that I'm not effectively translating what I know and can present in front of people to something that works on paper.

    I was thinking about drawing up a proposal for another book, one that combined a narrative of "growing up" as a programmer and the evolution of some piece of software, perhaps my forum app. The last part of the book might flesh out the design decisions and patterns of the app. I don't know how interesting it would be or if anyone would buy it, but I imagine there are a lot of people out there that would think, "If this guy can do it, so can I!" Empowering other people while exposing your own vulnerabilities is very much a feel-good experience. Since I don't have a CS degree, I'd at least be putting my journalism degree to good use!

    Read more...

  • Video card benchmarks are useless

    In the dissatisfaction with my current rig's 3D performance, I'm starting to strongly believe that the CPU is the bottleneck. I think this because the difference in frame rates doesn't change much from one resolution to the next. I have an older Athlon 2000+ (1.66 GHz) and a GeForce FX 5600 card.

    So I've been researching the parts out there right now. The problem is this: The hardware sites benchmark this stuff with high-end CPU's. Sorry, but even if I upgrade my CPU and motherboard (an inexpensive thing to do these days), I'm not going to buy an Athlon 64 3800.

    Right now it looks like I can upgrade my CPU and motherboard to something like a mobile Athlon XP 2600+ (over-clocked lots) for around $150. I don't know what kind of impact that will have on my existing video card, but I'm guessing it won't be great. Video card upgrades, those that aren't little incremental upgrades, pretty much rest with the Nvidia 6800's ($300) and the 6800 Ultra's ($400). I'm not really that geeked to spend that much.

    Read more...

  • ASP.NET vulnerability: I'm disappointed

    By now you've heard about the alleged vulnerability in forms auth-protected folders. I'm ridiculously disappointed that this wasn't caught years ago because it's not entirely unlike the worm vulnerabilities of 2001 in terms of messing with the URL to get to naughty stuff.

    In all fairness, I can't duplicate the exploit that someone sent me, but apparently someone can or it wouldn't have Microsoft's fullest attention.

    I hope there's a fix soon, like tomorrow.

    Read more...

  • Getting the hardware tweak monkey bug

    Quite by accident, I bought for my HTPC what apparently is the CPU over-clocker's favorite board for AMD processors, A-Bit's NF7-S. My criteria for buying the board was just that it had an optical audio output to hook up to my Sony receiver for DVD's. With it I bought a mobile Athlon XP 2400+ because a lot of users reported it running cooler than normal Athlons. It also happens to be unlocked, so you can clock it as you wish. This good accident was matched with another good accident, in buying a really good cooler for the thing.

    The last good accident was that I unintentionally clocked it at 2.0 GHz, though it's spec'd for 1.8 GHz. So for $77, I'm getting roughly Intel P4 2.6 GHz performance for about $70 less, and I don't even need that performance for playing iTunes, DVD's and Beyond TV shows.

    So now I'm getting all geeked up about this over-clocking stuff, and the crazy cooling schemes people use to make these things sing. Seriously, they spend so much on the cooling gear that they could've just bought the faster CPU to begin with, but I guess that's not the point.

    So now I'm tempted to upgrade my office computer, mostly to make the forthcoming RCT3 run at ridiculously high frame rates. Right now I have an old Athlon 2000+ and a not-that-old Nvidia 5600 video card. Simply buying a faster video card may not give me the boost I need if I'm bound by the CPU, so I'm not sure what I'll do. I'd love to get an Athlon 64, but they're still kinda pricey and who knows when 64-bit Windows XP will finally go retail.

    Have I mentioned that I'm doing everything but work lately? :)

    Read more...

  • More HTML and text parsing woes

    I mentioned last week how I absolutely hate regular expressions, and that rewriting the POP Forums text parsing engine is going to be the death of me (especially to get it to work with FreeTextBox, "forum code" and various mixtures of IE and Mozilla-generated HTML).

    I've managed to come up with an OK algorithm that makes sure tags are closed, and do not overlap. If they do overlap, they're properly nested. The challenge is getting block elements right, namely <p> and <blockquote>, to make sure that they appear as they should. So far, I'm sucking at that part pretty bad.

    Somewhere just out of reach of my brain, I know I have a fresh solution that will cure cancer, but sitting in front of the two monitors for hours on end is starting to take its toll in terms of me maintaining an attention span. That and I'm supposed to be finishing the book revisions.

    I have to keep reminding myself that these are good problems to have. I didn't have to get up early, drive in rush hour or answer to The Man today.

    Read more...

  • SQL Problem solved, it wasn't weird, but the responses were

    It's always crazy when you post a question to your blog or a forum when you get everything but what you expected as responses. This happened with my SQL "problem" last night.

    First the good news. There was no problem. If you look at the sproc I had, I was sorting correctly when I populated the cursor, but not in the join at the end. Whoops! Can't believe no one caught that.

    Anyway, one person came in and said you couldn't sort by a bit field. That obviously wasn't true because I was clearly doing it before. When someone called him on it, he said it wasn't ANSI standard and you should avoid it. Should we avoid using the CLR in SQL 2005 too? It's not ANSI standard. Sometimes I just don't understand how people respond.

    Another respondant said using a cursor was a bad idea in his experience, but didn't offer an alternative. The article I linked to makes a pretty strong case for using a cursor to page data. In fact, I searched far and wide on the Web and Usenet to find some kind of quantitative reasoning for this approach, and it's the only one I found. Hey, I'm easily influenced, especially in areas for which I have no significant expertise (like SQL). Show me something better and I'll switch to that. In running this sproc against 30,000 forum topics, it's pretty fast. If I apply a little caching to it, I suspect it will be even faster.

    Regardless of the outcome, I love to see people get out there and debate stuff like this. A disadvantage of working alone as your own business is that you otherwise don't have another set of eyeballs to question your work.

    Read more...

  • 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.

    Read more...

  • 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! ;)

    Read more...

  • 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.

    Read more...

  • 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.

    Read more...