Jeff and .NET

The .NET musings of Jeff Putz

Sponsors

News

My Sites

Archives

November 2005 - Posts

Search for Xbox 360
How fast can you whip something up with ASP.NET? Pretty fast.

http://www.searchforxbox.com/

I don't know if anyone will actually go to the site, but it took me all of two hours to do and $8 for the domain name, so it's worth a shot. If I generate that much in AdSense, I broke even. :)
Posted: Nov 29 2005, 01:49 PM by Jeff | with 8 comment(s)
Filed under:
How do I really copy a List<T> object?
OK, color me annoyed. I want to copy a List<T> object because I want to manipulate the junk in it. The junk is in the ASP.NET cache, so if I alter it, it gets changed and the change is reflected on the next request.

For example... right now I have

List<Foo> list = Foo.GetFromCache();
list[0].MyString = "yo";


As you would expect, that MyString property is going to be "yo" next time I get it. I tried using List<T>.CopyTo() to copy it to an array, but that array is still a reference to the original.

It's gotta be easier... right?
Posted: Nov 21 2005, 09:48 PM by Jeff | with 13 comment(s)
Filed under:
Getting sucked into Ajax

I actually bought a book at Borders today, something I never do anymore. Computer books in particular are rare purchases for me because there are few that I need or want to learn from.

Ajax technologies have been around for a long time, it's just that they're finally be used together in really interesting ways. There's quite a bandwagon behind this stuff, much of it hype. Yes, browser-based apps are all the rage, and have been around for a long time, but there are now design patterns you can clearly identify and other people have made mistakes for you.

Ajax in Action looks at the state of the combined technologies and how they relate, then goes right into the patterns that make it work. It even covers security issues and various frameworks out there. The examples are pretty solid too, especially the type-ahead suggest (auto complete) example. Neat stuff. The single most useful thing I've read so far is an appendix about JavaScript for OO code monkeys. I read that first, and it sure clears up a lot of things about JavaScript I didn't realize.

Do I have use for any of this? Well, I can think of a couple of instances where it may be useful to me. I guess the reason that I'm drawn to it is just that it's something new.

Posted: Nov 11 2005, 04:35 PM by Jeff | with 1 comment(s)
Filed under: ,
First day with the final Visual Studio 2005
I finally have Visual Studio 2005 and SQL Server 2005 installed here on my local machine following the MSDN subscription stuff, and it's hard to believe after all of this time with alphas and betas that the new world has finally arrived. It's a good day!

I've managed to write a couple hundred lines of code today, and even test code using the new stuff (I have the VSTD version). I'm digging it. I mean, I knew what it was going to be anyway, but I'm pleased at how well it all seems to be working. The goofy little bugs I had been dealing with the last 18+ months are obviously gone.

I've got a project I'm trying to knock out in the next week or so, but I'm not being a good code monkey and executing the way I should. I'm hoping for some bout of inspiration to push me here. Maybe if I won that Xbox 360 launch invite. ;) I mean shit, I'm all about the Microsoft stuff. Hook me up!
Posted: Nov 11 2005, 12:41 AM by Jeff | with 3 comment(s)
Filed under:
Is there a way to count lines of code in a project?
Does VS 2005 have some way to count the lines of code in a project? It's not any kind of vital statistic to me as much as I'm just curious.
Posted: Nov 10 2005, 01:21 PM by Jeff | with 8 comment(s)
Filed under: ,
Chris Sawyer sues Atari. My hero.

Ever since the first RollerCoaster Tycoon demo came out back in 1998 I think it was, I was floored that there could be such a fun game developed by just one guy. That guy, Chris Sawyer, is now suing Atari for screwing him out of his due royalties. Good for him.

A UK paper reports that Sawyer should have scored around $30 million for the games, the first two of which were developed solely by him, with a few others creating sounds and graphics for him. The third game, a complete piece of shit, was developed by Frontier and essentially licensed.

The software development industry, and especially the gaming industry, is filled with gigantic budgets and teams that involve often hundreds of people. The fact that this guy made an irresistible game more or less on his own is remarkable. The fact that he got rich doing it is also amazing. This is the kind of success story that never happens. Stuff is just too complex these days.

I interviewed Sawyer ages ago, and I thought it was remarkable how intense he was about making a game that doesn't suck, and is just outright fun. Those simple goals are often totally lost these days.

Posted: Nov 10 2005, 01:13 PM by Jeff | with 2 comment(s)
Filed under: ,
MSDN is slooooooooooow
Since I never got a "welcome e-mail" from MSDN, I began relentlessly pinging the form for a subscriber number lookup on Sunday. Finally, this morning, it worked and I got my number. I started downloading Visual Studio. Twelve hours ago. Still only two-thirds the way there. Getting 35k/second.

That's pathetic. How does a company the size of Microsoft offer a very high-end and premium download service and not have the bandwidth to support it. I keep seeing people in various forums and blogs post excuses, but there is no excuse. People are paying big money for this stuff.

What a disappointment.
Posted: Nov 08 2005, 08:59 PM by Jeff | with 12 comment(s)
Filed under: ,
MSDN... still not in real time!
Since I guess I still haven't done enough to impress anyone in the community (or perhaps because my intentions frequently involve profit), I never got an MVP and free access to MSDN, so I paid for it. I scored the old "Enterprise" version from Amazon for about $1,400, so that upgrades me to the Team System for Developers version. Score. Beats $5k.

That said, I'm shocked that it's still not a real-time affair. Back in 2001, the first time I subscribed, I accepted that as just being with the times, but still? I activated my membership on the phone (since the Web site was down, also disappointing), and I have to wait the three or four days until they send me a membership number.

It's disappointing that access isn't nearly instant. You'd think Microsoft would be better than that for such a crucial function for its developer community.
Posted: Nov 03 2005, 08:31 PM by Jeff | with no comments
Filed under: ,
NBC Nightly News free online, but still sucks
And it will suck because you still can't view video on MSNBC without IE. Lame.
Posted: Nov 02 2005, 01:58 AM by Jeff | with 5 comment(s)
Filed under: ,
HttpHandlers and big files
I use an HttpHandler on my podcast site to catch the requests for MP3's and increment a download counter. This seems to work pretty well, and I haven't had any problems to date. It also helps force the "save as" dialog so people aren't viewing them in their browsers.

However, when I try to apply the same concept to big video files, it chokes. iTunes says the network connection is reset while Firefox simply says the document contains no data.

What might be going on here? The code is what you've likely seen in countless examples elsewhere, like this:

public class MovHandler : IHttpHandler
{
    public MovHandler()
    {
    }
   
    public bool IsReusable
    {
        get { return true; }
    }

    public void ProcessRequest(HttpContext context)
    {
        context.Response.Clear();
        context.Response.ContentType = "video/quicktime";
        string path = context.Server.MapPath(context.Request.FilePath);
        NewsItem item = new NewsItem(Path.GetFileName(context.Request.FilePath));
        item.Downloads++;
        item.Update();
        context.Response.WriteFile(path);
        context.Response.End();
    }
}

Posted: Nov 01 2005, 05:35 PM by Jeff | with 9 comment(s)
Filed under:
More Posts