Archives

Archives / 2004 / August
  • Themes and CSS in ASP.NET v2

    I've been playing a little with the themes in v2 and I've changed my opinion on them. When I first learned about the basic capabilities of themes I kind of shrugged it off as a, "That's neat, I guess."

    Read more...

  • SQL Express and ASP.NET v2: wow!

    Scott Guthrie pointed me in the right direction in my last post regarding the use of SQL Express databases in ASP.NET v2. What I thought most incredible was that in e-mail he said that a box with SQL Express on it will create a database file in your /data folder, ready to go, for Membership, Profile and such, just as it did with the Access provider (which is going away for beta 2)! How cool is that?

    Read more...

  • Need help on SQL Express using file in /data

    It's my understanding that since the Access providers are going away in .NET v2 that the SQL providers will be the default. However, and correct me if I'm wrong, they won't generate a database file for Membership, Profile, etc., the way that the Access provider did in the /data folder, right?

    Read more...

  • Gmail must be ready to ramp up

    In the last week, I think I've had at least ten invites to give away from Gmail. I get the distinct impression that they're either pushing another level of traffic for testing purposes or they're considering going live soon. There are so many accounts out there now that it's not nearly as cool or "in" as it used to be to use Gmail!

    Read more...

  • Slipping schedules aren't good for anyone

    It appears that Longhorn is going to be less than we had hoped for. According to News.com, some features will be left out just so they can finally get it out the door. Personally, I don't care that much, but I know the Windows developers that have been working with the alphas are disappointed.

    Read more...

  • ParameterizedThreadStart: Good call!

    I just noticed that a new overload of the Thread constructor was added to .NET v2, accepting a ParameterizedThreadStart object. Cleverly enough, it allows you to call the thread's Start() method with a parameter to pass in to the method you're firing in its own thread. I don't understand why that wasn't there from the start, but good call!

    Read more...

  • Search for "http" on Google

    I was trying to remember if the second "T" in HTTP stood for "transfer" or "transport," because let's face it, even code monkey geeks don't think about it every day. To find out, I typed it into Google because of their convenient link to the definition.

    Read more...

  • SQL paging advice needed

    OK, so saying that SQL Server isn't really my thing is kind of lame, but I'm not one to pretend I know everything. Generally I use a procedure like this to get paged data (parameters replaced with actual values for simplicity).

    Read more...

  • Jeers for LoginView control

    Awhile back I was crying about how LoginView is designed wrong. Apparently Microsoft doesn't agree with me. At issue is the fact that controls inside of a LoginView are created late in the page lifecycle so they can't be accessed directly from PageLoad or postback events. The stated purpose of the control, according to the documentation, says: "Displays the appropriate content template for a given user, based on the user's authentication status and role membership."

    Read more...

  • Why electronic banking is better

    Last month I went inside of my bank to make a deposit and get some cash, somehing I almost never do because I use the ATM. That particular day, the ATM was broken, so I had little choice.

    Read more...

  • .NET seems to make everything easier

    Back when I used Overture, I always thought it was kind of a cool security feature where you had to type in letters in a graphic that is, theoretically, not machine readable. This deters automated attacks. It occurred to me that'd be a nice feature for the forum registration.

    Read more...

  • More adventures in Web app threading

    Responses in my last post about this were either, "Threading in a Web app isn't a good idea," or a lengthy example that works, but wasn't really what I was after. After looking a little harder, I realized the error of my ways. The goal was to launch a Timer from an HttpModule. This is where I started:

    Read more...

  • XP SP2 issues

    I'm sure that 90% of people running SP2 will not have any problems, but we've already had a lot of issues.

    Read more...

  • Not every website is Match.com

    In my post yesterday there were some interesting comments about the code sample I posted regarding the use of StringBuilder vs. straight concatenation. Yes, I created a ridiculous scenario that would probably not ever occur in real life, but the intention was to illustrate a point.

    Read more...

  • Dinner at The Bill's house

    Yeah, I'm late to the party, and everyone else has already linked to it, but here's a good story from a Microsoft intern that got to have dinner at Bill Gates' house. Interesting read. In the last moments of the story, I think you'd be surprised to see just how normal one portion of his life actually is.

    I'd love to get an hour or two of face time with Gates. I don't worry that he's too brilliant to talk to or that I might appear stupid. It's his company's products that made me what I am today, and he's far more driven than I am. He's a geek first, which is more than I can say for the Ellison's and McNealy's of the world.

    Read more...

  • A new version of IE? Why bother?

    I was reading this article on News.com about the updates to Internet Explorer included with SP2. One “freelance Web developer” is quoted as saying, “Internet Explorer hasn't been updated in three years, whereas every other browser has been updated in the last six months... A company like Microsoft shouldn't have the least-capable browser.”

    Call me crazy, but now that it has the pop-blocker, what exactly is it that IE doesn't do? I've used Firefox on and off, but honestly, it makes no difference. Browsers don't really need any features other than the row of buttons, bookmark management and compliance to standards.

    Does anyone remember around 2000? Designing was a constant pain in the ass because you had to make sure your sites worked in a half-dozen browser versions and hope that people upgraded. We've had relative stability now for years, and everyone has CSS browsers. Stuff just plain works these days. There are quirks here and there, but few show-stoppers.

    When Longhorn and the new IE does come around, I can only hope that it's a beautiful, standards-compliant, managed code, elegant browser, written from scratch. I think Longhorn deserves that.

    Read more...

  • XP SP2 thoughts

    I got XP Service Pack 2 today. So far so good, I've only noticed one compatibility issue so far. The pop-up blocker in IE is nice, though the default option with that warning bar is annoying. Not sure what they were thinking there.

    The security center is interesting. Hopefully once it lands on people's machines it will make a difference in the worm/virus impact, but I'm still convinced that human nature will continue to circumvent any measures Microsoft puts in place.

    The one incompatibility issue is with Avid Xpress Pro, but I don't have their latest version (downloading now). The serious upgrade still isn't available for download unfortunately. Of course, a security fix last year caused the UI to get hosed, and Avid wrote it off as Microsoft's problem. In the old days, Avid could require very specific hardware and software configurations, and could get away with it because customers would need to spend at least $10k in the first place. A dedicated, specific machine came with the territory. Ever since they started targeting the film geeks and cable access crowd, they don't seem to understand that those requirements are ridiculous for people that use their machines for everything.

    Edit: The 4.3.5 version of Avid still doesn't work. Bummer.

    Read more...

  • Need SQL help

    I'm embarrassed to admit it, but I need a little SQL help. The truth is, I suck when it comes to SQL. I guess I'm not disciplined enough to really become a guru.

    I'm serving ads, and I have two queries. One counts impressions, the other clicks. They look like this:

    SELECT COUNT(*) AS ImpressionCount, CONVERT(nvarchar, Impressions.ServeTime, 101) AS ServeTime
    FROM Impressions
    WHERE Impressions.CreativeID = 15
    GROUP BY CONVERT(nvarchar, Impressions.ServeTime, 101)
    ORDER BY CONVERT(nvarchar, Impressions.ServeTime, 101)

    SELECT COUNT(*) AS ClickCount, CONVERT(nvarchar, Clicks.ClickTime, 101) AS ServeTime
    FROM Clicks
    WHERE Clicks.CreativeID = 15
    GROUP BY CONVERT(nvarchar, Clicks.ClickTime, 101)
    ORDER BY CONVERT(nvarchar, Clicks.ClickTime, 101)

    What I'd like to do is combine them into one set of results, three columns: ImpressionCount, ClickCount and ServeTime (one for each date). The idea is to roll that into a new table for faster querying, since the data will never change. How do I do that? If my methodology “ain't right,” feel free to poke fun or help.

    Read more...

  • A "pact" week on G4TechTV

    What the heck, I love picking this network. From their e-mail newsletter:

    “It's a pact week for The Screen Savers.”

    I hope they make a pact not to suck anymore, but I think it's safe to say our old friend is most certainly gone.

    Read more...

  • Specifying the right parameter in SqlDataSource control

    I don't recall seeing this before, but after searching a bit in the forums I found that you need to specify the parameters in your WHERE clause of update and delete commands differently for the SqlDataSource control. The following is functional code:

    Read more...

  • Object-oriented data abstraction and caching strategies

    I'm not sure if anyone reads blogs on the weekends, but what the heck. :)

    I've been thinking a bit about the way I get data in a lot of apps I write, and it's typically something like the article I wrote on uberasp.net. I have some kind of class that has the typical CRUD stuff and properties that match columns, with lots of caching. This works really well, particularly in the forums, where pages get rendered in .05 seconds or less. (Actually, the data access is generally in yet another class, so that article isn't exactly the way I generally do things.)

    This class design is great for straight-forward data selection, but it's not quite as straight forward when you do joins. For example, in a forum topic I might get all of the posts as well as user data to display (their post count, signature, or whatever). Sure, each Post object could have a User object as a property, but then I start to worry about the caching, and all of the performance that brings. I may cache a collection of Post objects for as long as the topic isn't changed, but what happens when an individual user changes their sig or increases their post count? The data in the cached topic is then too old.

    I probably shouldn't be thinking about this on a Saturday night, having a beer on the deck waiting for friends, but what the heck, I'm still a geek, even with the beer. What would you do?

    Read more...

  • Getting back to writing code again

    Finishing my book is sucking the life out of me, because I just can't seem to stay focused enough to bang out the last few chapters. They aren't even chapters that require research, it's stuff I feel I know well enough to just go at it.

    So yesterday I took a break from it to write code. I don't have any other projects right now, so I thought it would be fun to just work on something I want to work on. I looked at stuff I started but never finished, and settled on the ad serving software I wrote.

    I wrote the serving half two years ago, and it has since served millions of impressions. Looking back at the code, it sure did suck. I'm amazed at how you never quite look back fondly at code that you wrote. It can always be better.

    I killed it all and started writing it from scratch. The algorithm for serving was great, and included session and frequency capping and all of that. It was just horrible organization, and I never did write any UI for it. I got lucky in that no client was ever smart enough to ask for reporting capabilities.

    I'm stoked with what I started to pull together, and I think I might sell it or give it away or something. Looking at what's out there, people are getting away with murder charging hundreds for what amounts to a couple hundred lines of code. I need some of that action!

    Read more...

  • What piracy is not

    Frans says I'm “handling the discussion wrong” from my last entry. I wasn't aware that I was bound to any one person's discussion guidelines. If you don't like how I handle it, don't respond.

    The reason I don't care to have fair use brought into a discussion about piracy is because it's a distraction from the real issue. I think that most reasonable people on the planet would agree that it's OK to backup or copy some copyrighted work for your own use. If most people agree on that (and it's safe to say that everyone short of the RIAA and MPAA does), then why muddy up the issue? I was never talking about this type of use in the two previous posts.

    The issue is that of piracy, stealing, theft... all the same where I come from. Kids downloading Doom 3 and not paying for it. Distributing copies of Windows and Office around Asia. Obtaining a copy of Photoshop or 3DS Max and not paying for it because you're “just a hobbyist.” That's a problem.

    The moral justification some people make in the previous post absolutely disgusts me. Matt says, “The reality of the situation is that a very large proportion of the community feel they're being taken for a ride by large intellectual property companies - charged exorbitant prices for product that's not really worth it especially given the draconian restrictions on it.” So that makes stealing OK?

    He further says, “The IP industries need to a) respect their customers instead of treating them like thieves b) charge realistic prices for their products.” I fail to see how Adobe or Microsoft treats me like a thief, if you're talking about product activation. Apple's DRM on iTunes is also reasonable enough, and it hasn't prevented me from using my music or inconvenienced me in any way. If you think these are issues, you're free not to purchase the products. I'm sure you can come up with other products that do have restrictions you don't agree with. I can too, and I choose not to buy them.

    As for “reasonable prices,” that's not for you to decide. You can choose to not purchase a product and vote with your feet. That's capitalism. People have stated they use PaintShop Pro instead of Photoshop, or Star Office instead of Microsoft Office. What kind of world would we live in if we just stole everything we thought was too expensive?

    The bottom line is that just because a product doesn't meet your expectations in terms of price or certain qualities doesn't justify stealing it. You wouldn't do it with some kind of physical object, so why would you do it with some kind of digital media? Answer that question... I dare you.

    Read more...

  • Shocked by our community's response to piracy

    I'm really, really shocked at some of the responses I got to my blog entry about the piracy of Doom 3. I guess I'd go as far as to say that I'm disappointed.

    The people that tried to justify it or downplay it I assume aren't kids that don't know life without the Internet, and even more disturbing, many presumably write software for a living.

    Some people make a distinction between physical goods and software, and try to make the claim that it doesn't hurt anyone. Others say that the price of these intangible goods are frequently a reason for piracy, as if to cite some kind of moral justification. Like I said, people have the right to create something and be compensated for their work. It's not more complicated than that. If it's too expensive, then you don't buy it and use it. Let normal market forces determine the success or failure of a product. What's “fair“ doesn't even factor into it. If you freeload off of work that I did, and I find out, I'm going to sue your ass into oblivion. It's not your right to decide what's “right,“ you either pay for the product or you don't get to use it.

    If you think that owning something means having something tangible, can I have all of your money in the bank? Because it's not tangible, it's just a number in a computer, kind of like software.

    I especially loved the comment that kids stealing the game might buy it anyway. I've never read a more naive comment than that.

    Read more...

  • Any good examples of a custom ProfileProvider?

    I was looking at the underlying data the Access and SQL ProfileProviders create when saving profile data. Yikes! Not pretty at all.

    Has anyone implemented their own ProfileProvider? I'm surprised at just how little stuff is out there around the Web. It's not nearly as straight-forward as doing a Membership or role provider.

    Read more...

  • G4 game awards a joke

    There's a short story on GameSpot about G4-TechTV's “G-phoria” game awards, and it sure sounds lame. Yes, I'm one of the many that hated the network merger (along with the functionally illiterate kids that keep posting in my blog), but it sounds like the Comcast folks don't even understand the audience they thought they had, let alone the one they acquired.

    According to the story, people left mid-show, the production values were terrible and no one cared about the awards. I'm not surprised. Everything else they have on the air blows.

    I sure hope they keep X-Play running and let it go as is (and not just because my wife and I think Morgan Webb is everything our media friends never got to be). Adam and Morgan might be a little goofy, but they're entertaining, not stupid and form intelligent opinions about games. Oh, and Morgan breaks up what is otherwise a total sausage party on that network.

    Read more...

  • Doom 3 piracy out of control

    I'm still astounded that so many people have such little regard for intellectual property. I saw on GameSpot that Doom 3 piracy has easily spiraled into the millions of dollars of damage and the game doesn't even come out until tomorrow.

    Is it just because I've worked in media my entire life, and as a programmer now, that I find this behaviour disgusting? I mean, did people ever consider that the work people did to create something entitled them to some kind of compensation?

    I certainly realize that there are times when the price of something makes it not worth it to you, but when that's the case, don't buy it. Let the market dictate what something is worth, but don't steal it. I don't buy expensive cars because they're not worth it to me. I don't steal them either. It's sad that people don't see any difference.

    Read more...