Jeff and .NET

The .NET musings of Jeff Putz

Sponsors

News

My Sites

Archives

January 2006 - Posts

Regarding Community Server and the ASP.NET developer community
I made a pretty strong comment in response to Paul Wilson's post about a problem in CS. Alex Lowe sent me e-mail regarding that comment, and this is partly what I shared with him.

First off... don't think that I'm dissing the product outright. That isn't the case at all. My point, if I didn't make it well, is that the product as a whole is too big and too complex for a small shop or individual to really work it in to the specific needs they might have. But again, that in itself isn't a bad thing, because a lot of companies need exactly what CS provides, a robust community that just works out of the box. That's what I mean by CS being a "corporate" product. Capitalism is good.

I think the ASP.NET space in general suffers from overlooking the small user space, both small in terms of number and in experience. That shouldn't be that surprising because it does so much more than any of the "popular" platforms like PHP or whatever, but it does make hiring people hard and getting buy-in from the less experienced people. I'm crossing my fingers that the express products will help to change that, but MS is doing a crappy job getting the word out about them.

Forums and now blogs have become a fairly standard part of every community site on the planet. I'm not shy to say that I spend more time in these apps than anything else other than news sites (which aren't that different from blogs either). Most developers, and by most I mean the legions that run the bulk of the Internet, not the few that code for the biggest sites, can't build their own stuff because of time, money and desire. If you're a PHP monkey you're totally set because phpBB is free, and vBulletin is still worth every penny. You've got options.

In the ASP.NET space, we don't have a lot of options. Keep in mind that CS isn't free for commercial use, and unless I missed something, putting ads in and around your forum is certainly commercial use. So you're left with a number of relatively inexpensive options, many of which aren't very mature, and a few freebies that lack the features a lot of people want (and I'll throw my own POP Forums in that last group, after nearly two years between releases).

Assuming that you do like one of those options, customizing it probably isn't that easy. I blame that a little on the platform, because there's a lot of matrices to follow around to understand how something works in the OO world, a much different place than the script world. I also blame the design of the apps to a lesser degree. I know I design for my needs first, and I suspect a lot of other individuals and companies that give something away do the same.

What's the solution for that? Not sure. I had a discussion about complexity just today at my current gig. Stuff gets complicated and you have no idea how it got that way. I think it's sweet that companies like 37signals are challenging this problem, and largely succeeding. We need more of that.
Posted: Jan 26 2006, 02:57 PM by Jeff | with 4 comment(s)
Filed under: , ,
Gamer dork revived

What can I say... my hands hurt. I've been playing on the Xbox 360 almost all day. I haven't been this into gaming since the Super NES days. (Sidebar: I realized while talking to a friend that the first two things I ever bought with a credit card were a TV and a video game console, the SNES. Weird how history repeats itself.)

I also picked up NBA 2k6 and Project Gotham Racing 3, so I more or less have four game genres covered. All four games are awesome. I spent quality time playing them on Xbox Live too, and that is where these things really shine.

While playing a really simple track on PGR3, I was talking with a couple of guys about where they found their 360 machines, and was surprised to find they were also "got lucky" customers like I was. And that's what's so f'ing cool but this live stuff, that you can talk to someone anywhere in the world about dumb shit like this as if you're in the next room. And given the price of the box and the rising age of even hardcore gamers, they're adults.

That's not to say you don't have some real funny moments too. I was deathmatching on Perfect Dark Zero (always a ton of people on!), and I heard some guy (or kid) yell, "Ownage!" Come on, seriously... nobody really says that! Alas, I made it my mission to kill him, and I did so twice. Otherwise I was mostly getting my ass kicked, but laughing every time someone sent a rocket at my head. Death and destruction can be funny.

I played a couple of rounds of Joust with people too. There's something I wouldn't have thought of, that a game two decades old could find new life by way of online play.

So while there are amazing games for the Xbox 360, what really makes it amazing is the live service. Microsoft really, really got it right. All of the haters need to get over it... this thing is the shit. I just hope they can catch up with demand quickly because it really is an amazing experience to share with others.

Posted: Jan 09 2006, 01:42 AM by Jeff | with 1 comment(s)
Filed under:
What's wrong with HttpContext in an HttpHandler?
I experimented some more with the problem I posted recently regarding setting Session values from an HttpHandler. Instead of using Session, I tried using the Cache object instead. The same thing happened... worked fine in Visual Studio, but not in IIS on the server. Here's the class... the value of Session["spamimage"] doesn't update after the first try (called from an <img src="AntiSpamimage.ashx"> tag), even though the image clearly is regenerated. Again, this works fine in the context of the built-in VS server.

using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Web;
using System.Web.SessionState;

public class AntiSpamImage : IHttpHandler, IRequiresSessionState
{
    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "image/gif";
        Bitmap b = new Bitmap(200, 60);
        Graphics g = Graphics.FromImage(b);
        g.FillRectangle(new SolidBrush(Color.White), 0, 0, 200, 60);
        Font font = new Font(FontFamily.GenericSerif, 48, FontStyle.Bold,
        GraphicsUnit.Pixel);
        Random r = new Random();
        string letters = "ABCDEFGHIJKLMNPQRSTUVWXYZ";
        string letter;
        StringBuilder s = new StringBuilder();
        for (int x = 0; x < 5; x++)
        {
            letter = letters.Substring(r.Next(0, letters.Length - 1), 1);
            s.Append(letter);
            g.DrawString(letter, font, new SolidBrush(Color.Black), x * 38, r.Next(0, 15));
        }
        context.Session["antispamimage"] = s.ToString();
        Pen linePen = new Pen(new SolidBrush(Color.Black), 2);
        for (int x = 0; x < 6; x++)
            g.DrawLine(linePen, new Point(r.Next(0, 199), r.Next(0, 59)), new Point(r.Next(0, 199), r.Next(0, 59)));
        b.Save(context.Response.OutputStream, ImageFormat.Gif);
    }
 
    public bool IsReusable
    {
        get { return true; }
    }

}


Posted: Jan 06 2006, 01:29 AM by Jeff | with 19 comment(s)
Filed under:
Job hunting adventure
I mentioned previously that I was looking to get back into the job market after a break lasting a few months. I had no idea that it was going to go so well, but particularly with the start of the new year, there's a lot out there. I have one formal offer, one informal and possibly another tomorrow. It's so crazy.

There are a couple of reasons the jobs are coming to me. The first is that there is a serious shortage of qualified .NET developers in the Cleveland and Akron market. I don't know why that is, but part of the going theory is that Progressive (the auto insurer) is hoarding most of them. Seeing as how I used to be one of them, and with nothing to even do at the time, I think that's certainly possible. They pay a ton too, and kind of set what the market will accept in terms of compensation.

The other thing is that when I got laid-off in 2001, I made the decision to seriously buy into Microsoft's vision of using the .NET Framework as the next big thing. It was only beta at that point, but it seemed interesting and I had lots of time on my hands. As it turns out, that was a good decision. By getting into it so early, I acquired something you can't fake... time. No one can say they have more experience in terms of time because it didn't exist any earlier than the time I got involved. It also gave me more time to make the leap to the OO platform, which for former script monkeys isn't easy, me included.

The architect I talked to today was like, "Isn't it great to be in demand?" Yes, it is nice, but I honestly find myself feeling a little guilty about the whole thing. While a lot of my situation can be attributed to my own actions, some of it is luck too. A lot of people can't afford to take months off of work, and struggle to find a job. I'm very, very thankful that I've had this opportunity, and I don't take it for granted at all.

I hope I make the right decision.
Posted: Jan 05 2006, 08:30 PM by Jeff | with 2 comment(s)
Filed under: , ,
When Session objects don't update
This is weird. I did that little HttpHandler that generates images in the simple NewsBlog app. It saves a sequence of characters to Session so the (hopefully not blind) user has to type in the stuff on the graphic and confirm they're a human.

On my dev machine, works like a champ running it from VS. I deploy it to the server, and it saves the first set of letters to Session, but subsequent calls do not. Here's the code from the handler...

    public void ProcessRequest(HttpContext context)
    {
    ...
        context.Session.Remove("antispamimage");
        context.Session.Add("antispamimage", s.ToString());
        context.Response.End();
    }


Why do you suppose it doesn't work right on the server?
Posted: Jan 05 2006, 01:22 AM by Jeff | with 10 comment(s)
Filed under:
Vista CTP was server?
A friend gave me his key for the Vista CTP for December, and it worked. Here's the weird thing... when I came back and it was installed, it was Longhorn Server. Weird.
Posted: Jan 01 2006, 03:35 PM by Jeff | with 1 comment(s)
Filed under:
More Posts