July 2004 - Posts
I was reading a little more about the role management in ASP.NET v2.0 when I realized that, duh, the reason it's not on by default is that it checks the logged in user roles for you and adds them to the user's Principal object. I was so blinded by the idea that I had a fun little HttpModule that did this for you (back in the “dark ages” of .NET v1.1) that I overlooked that.
Now that the Microsoft documentation is, generally speaking, a lot better than it used to be, I should actually try reading it occasionally.
Anyone that published a small Web site than pulled a few hundred thousand visits a month circa 1999 knows that you could make an OK dollar producing such a site. It was a blast because if you did it, it was probably something you were really excited about, and it was a labor of love that proved to be a hobby with income.
Those days went away pretty quick by late 2001, and they haven't been that pretty since. I've been running one site or another like this now since 1998. Back in those days I had a shared hosting account for around $50 a month (NT hosting wasn't cheap, you know), and I got like 2 gigs of monthly transfer. I barely cracked 50,000 visitors a month at the time.
For a short period of time in 2000, I co-located a server with my shady ISP. That was a disaster. I eventually rented a box at CrystalTech. It was expensive, but worry-free because they have the best support in the business. As my bandwidth costs continued to rise and my total cost was around a grand, I couldn't find anyone else that could rent a Windows box that didn't have a horrible reputation. I reluctantly got a T-1 to my house in 2001, and had it for two years. Aside from the sting of buying my own licenses and a router, it was a rewarding experience, and kind of nice because I couldn't get DSL or cable at the time.
In 2003 I ditched the T-1 (cable Internet finally came to town) and rented a server at a certain host in San Francisco. All was going well until a power problem knocked out half of their network, put my box off-line, and the excuses started rolling. Sure, they had redundant power and generators, but this was caused by a spike from the utility (and it was all their fault, so stop calling us). I was pissed, and regretted leaving the T-1, even though I was paying less than $300. They were in no hurry to even meet their SLA refund promises, so they were out.
I then migrated to ServerMatrix, which for the most part has been outstanding. More than a terabyte of monthly transfer and under $200. I went down twice early on when a router for my particular segment of the network crapped out. I was annoyed, but got the credit for it and reminded myself I wasn't shelling out four figures for a T-1 anymore.
So expenses, even for a popular site, are well under control these days. A part of me wishes I would've gotten into porn back in the day (something classy and real, if porn can be either of those), because today your profit margin would be through the roof with the reduced costs of running a popular site.
The reliance on advertising is still a factor, but the ad market is slowly coming back. It's filled with pop-ups, yes, but I honestly believe that the dollars will shift to larger in-page formats (I think the “leaderboard” format is great) when XP SP2 ships with the blocker. I don't make enough to live on, because my sites' appeal is a little too narrow, but at least I'm making back all the money I spent in the T-1 days. I could be doing even better if I got out there and tried to do some selling. I could probably add two or three grand a month, but I hate selling. The ad rep firms, try as they might, never seem to be able to close the deal.
I also get a little from subscription revenue. That helps when ad dollars are soft. Contrary to popular belief, people will pay for online content if it's something that they really enjoy. There's a certain gratification that comes from that because it shows that someone out there genuinely appreciates what you're doing for them, and you get compensated for it.
The point of this rant is that there is potential to make a living off of a specialty content Web site these days. Expenses have gone way down while revenue opportunities are slowly creeping back up.
One thing I noticed about being self-employed (er, a bum, or something), is that I've had more time to blog. I feel like I've been doing it a lot more since I quit working for The Man.
It's an exciting time for ASP.NET developers, because the future holds a lot of promise in terms of our ability to do our jobs better. The tools are making a quantum leap, and the platform itself is getting far more interesting than I expected.
Isn't it funny though how real life draws you back into hiding? The last blog entry I made was Monday, which is a long time for me. I've been wrapped up in a short project and trying to crank out more book chapters. I haven't touched Whidbey since last week. The horror!
I'm still looking for that gig that pays $100,000 a year and requires very little work. Oh, wait... that's what I was doing as a full-time consultant. ;)
The typical e-mail or phone call I get these days from recruiters go something like this:
“I have an opportunity I'd like to discuss. Please give me a call at...”
Apparently .NET jobs are difficult to fill here in the Greater Cleveland area, because I get these messages about four or five times a week. While I'm not looking for work until the book is done, I still don't get the “sell” of messages like this.
So last Friday I called a guy on it. I replied and asked him why I would consider his position without the slightest indication of what it is. I was nice about it, but he was offended. His reply was something along the lines of, “Well if that's your attitude.” I continued to play nice and replied, telling him that if people were to take his inquiry seriously, it would be great if he'd explain what it is. I think that's reasonable. I think we've all had calls like that and you end up finding that 90% of them aren't things you're even remotely interested in. Help me avoid wasting time for you and me!
I may go for days writing or writing code, and it's interesting that when I take a break, I need to create something physical.
I discovered this last night. I fired up RollerCoaster Tycoon 2 because, being a coaster geek, it's the best game ever made. I played for about 30 minutes before I felt that it wasn't really doing anything for me. I got up and went to the next room to start experimenting with a “real life” coaster using my CoasterDynamix set.
I got the hook up for this kit because I built their Web site. It's really awesome stuff. There's something about watching a physical object move around that path. It's far more satisfying to create something with your hands and watch it do its thing, compared to the virtual world of RCT.
I don't think I'm alone in this either. It seems that most of the code monkeys I know like to build stuff in the physical world. With me it's a roller coaster, with other people it's home improvements, car modding, etc.
Maybe we could get along without computers after all! (For a short time, at least...)
I finally finished my book chapter on Web services. Like the rest of the book, the goal is to get beginners up to mid-level code monkeys. I have to admit that I've not done a ton of work with Web services, though I've consumed those provided by Amazon and Google for little projects, and written a few in various jobs that send and receive fairly concise objects. I'm comfortable in my knowledge, but there are a lot of people that know far more than I do, especially with regards to the underlying XML SOAP structure.
In researching the subject a little, I was surprised to see that you could mark the get and set of a property with the WebMethod attribute. I was not aware of that. I'm all for simulating an object-oriented approach to Web services, but wow is that a bad idea.
The funny thing is that the rest of the book spends so much time explaining how to exploit an object-oriented platform and here I am saying “keep it simple!” It's tough because here I am covering a topic in around 20 pages that some books cover in a thousand pages. I've been trying to ruthlessly keep my target audience in mind, but I'm always worried I'm leaving something out. It's like scope creep for authors!
And people wonder why politicians are loathed by young people...
Orrin Hatch wants to ban peer-to-peer networks
I have an idea. Why not enforce copyright law instead of interfering with technology? I realize it's not that simple, but come on, we've been through this already with VCR's, CD's and DVD's. Don't hate on the technology, address the problem. We don't ban cars because they run over people, and we don't ban toasters because they burn houses down. Don't ban a technology that may have legitimate use.
I haven't done much to update uberasp.net because the book is taking most of my time, but I pop in to answer POP Forums questions daily. I was playing with the book section, which I use to buy books from Amazon (so I get a kick-back) when I got an error because the Amazon Web service didn't respond for whatever reason.
After I got the frienly error message indicating that the error had been logged, I went and checked my log. I found some interesting errors. The logged URL's had all kinds of stuff tacked into the query strings like “insert into” and “delete from.” Dozens of guesses were there intended to create a SQL injection attack.
Naturally I use parameters and parse anything that can be molested in the request, but it just goes to show you that people will mess with you.
...or if it's not designed wrong, it addresses the wrong business problem.
Every ASP.NET developer has been there before. Some sections of a form should be shown to some people or anon users. You probably tucked the portions of UI into Panel controls and set their visibility properties based on the login status of the user.
So along comes LoginView, presumably to address this problem, only the controls within each template can't be accessed. As someone mentioned in my previous entry on the subject, this is by design. The controls are created after the PreRender event.
That's a pretty stupid design.
At that point, I can't do anything with the content inside of them. Postback events have long since fired. Honestly, how is this useful? Some might argue that it's like the controls you create in a grid or repeater, but this isn't like that at all because you'll never have the same template rendered more than once in a LoginView.
I sure hope they change this before the next beta.
I finally finished writing my book chapter on custom and composite server controls tonight. I hated every minute of it because it's not an easy thing to write about in a way that is simple and lets the reader "get it" quickly.
I looked through some of my old books for inspiration, and I think that was the reason I hated it. Eventually I put them on the shelf and started from scratch. I wanted to simplify.
For example, nearly every example you see includes creating an event and a handler. While that's certainly what makes control interaction possible, it's not necessary at first. If you want to show how to make a simple text box, you don't need a “TextChanged” event to process postback data. If you're not familiar with event wiring, you'd look at it and ask, “Why do I even need to do that?”
Composite control examples suffer from the same complexity. Inherit from CompositeControl, override CreateChildControls(), and go about your business. Once you've got that, then talk about overriding Render(), then talk about events.
This experience is showing me what I bet is the single biggest struggle for all authors: What exactly is the right amount of detail? In this particular chapter, I thought getting into events from the start was overkill. Someone might (no, will) disagree with that, but in working with developers trying to raise their game, too much, all at once, doesn't help them learn. The only reason I got into events at all was because at this point in the book the reader should understand how they're useful and how to wire-up code to them (because it was covered in writing HttpModules).
Now as I try to keep my sanity, would you believe I'm considering another book proposal?
More Posts Next page »