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...
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?
I cleaned up the bookshelf in my office. Here's a look at what's left:
Honestly, most of the stuff still there isn't stuff I ever crack open anymore. The biggest chunk moved to the library was composed of ASP.old stuff. I don't know why I still keep the Perl or DHTML books around. I guess it's to show people I was around back then or something.
It's weird that once you get to a certain level with a particular platform or product, you tend to stick to that product's SDK documentation. I used to really hate Microsoft documentation, but I guess now that I “get it” and have been using it for man years, it's totally adequate.
I do find myself going back to some of the books as examples of how not to present certain material while writing my own book. It took me awhile to understand certain concepts not because they were difficult, but because the material that was supposed to teach me took a poor approach.
I think that's what's hampering my progress. I'm laboring over a couple of chapters because I want them to be totally idiot proof, and I fear they'll never be good enough. Let's face it, if the book sucks, I may not ever write another one!
The one book I've barely cracked the cover on is Chris Sells' Windows Forms book. I'm bidding on a project that would require me to get a little more intimate with that topic, and I think from what I've read so far he does an outstanding job at explaining how to position and scale forms.
I guess I'm just lucky, but I was surprised to find some bugs with the ASP.NET LoginView control and its use in VS 2005. I know it's only beta 1, but it surprised me.
First off, I can't access controls in the LoginView. So if you have:
<asp:LoginView Runat="Server" ID="TopNav">
<asp:TextBox ID="EmailTextBox" Runat="server" />
Then when you try to access EmailTextBox, like EmailTextBox.Text = "blah" for example, it throws an exception:
CS0103: The name 'EmailTextBox' does not exist in the current context
The thing is, it's clearly in the control tree, and if you move it outside of the LoginView, it can be accessed just fine.
Related, at some point when switching between design view and source for a page, the <LoggedInTemplate> of my LoginView migrated outside of the LoginView tags, and entirely outside of the <form> tags. It happened at some point while I was editing the <AnonymousTemplate> in design view, adding controls and an HTML table.
I guess I finally earned all of my mailings!
Almost two months ago I quit my day job. I justified it (rightfully so) by knowing that I had to dedicate adequate time to writing my book. What sealed the idea is that I could at least get by with the little book advance and advertising revenue from my sites. I wouldn't be rich or able to live the J-Pizzie lifestyle, but I could at least pay the mortgage for a little while.
The last two weeks in particular have led to a number of realizations, most of which have to do with the fact that three years in corporate hell sucked the soul right out of me, and made me a miserable person. The thing that's so fucked up about it is that I thought that for the most part I was pretty happy.
When the bubble burst in early 2001, and Penton Media was going down the crapper, I split for Pfingsten Publishing. After only a few months and 9/11 related problems (not to mention a bunch of cheeseball big company personalities in a worthless start-up), they laid me off. I spent six months on the "government payroll" with my self-esteem in the crapper, unable to find a job. I was at least able to learn .NET during that time, which got me a job at an even more shitty payroll company. A year and a half later they laid me off too. Barely missing a beat, recruiters calling every day, I got in on a contract job with a gigantic insurance company, breaking the six-figure barrier. Four months later, it was May, 2004, and I made the break.
Many things became very clear during those three years. The first was that money isn't the key to happiness, or a measure of self-worth. I doubled my salary in three years, and the more I made it seemed, the less interested I was in the work.
The second thing is that, for better or worse, your self-esteem is tied to what you do. Prior to this time period, I worked for three years creating, programming and engineering an amazing government cable access operation, and I loved it. I would've stayed had it not been for the fact I'd never break $30,000 on the salary scale, and the people I worked for would have no part in making a raise happen. (Money isn't everything, but skilled professionals need to have some minimum standard.) Even at Penton, I believed in what we were doing at one point. Every job thereafter I didn't care. It wasn't interesting, and that made me feel worthless.
The third thing is that the fire to do great things elevates your work ethic to a higher plane. I was doing great things in that government job, and worked insane hours to make it happen. The sheer act of creation is a natural high, and one I never got out of those three years. I would briefly have moments of satisfaction when I finished a revision for CoasterBuzz or something like that, but for the most part it was rare.
Fourth is that balance is key in life. I've talked about it in online journals for three years, but in reality I was never practicing it. Finishing Masters of Doom, I realized that lack of balance is what put Carmack's and Romero's ventures on a perpetual downward spiral (if the timing is right, you can still make millions even if you screw up). If you keep at it too hard, you'll burn out and alienate everyone else. If you live carelessly, failure will kick your ass. Somewhere in the middle, you can succeed and be happy.
Finally, the inability to take risks will keep you forever stuck in the same place. That's probably what was eating at me the most. In college I was idealistic and optimistic, heading into the worst business in the world, radio. I had a bright career ahead of me in an industry that killed more people's spirits than it elevated. The crappy jobs took those qualities away from me. Only now am I realizing that I missed out on three years because I wouldn't take any risks. Sure, I'm "poor" for the moment, but the long-term benefit of writing a book and taking time to "find myself" again will help me out.
Fortunately my dear wife Stephanie didn't take off during those years. She had a lot of realizations herself with regards to career and education, so naturally things could've been really bad between us. As of today, I feel better about myself, my surroundings, my skills, my interests and my future than I have in years. There are a lot of things I still want to change about myself, but I finally feel that I can evolve with a little time. I'm not stuck anymore.
Now I'm not just saying it anymore... it really is fun to be me again.
In responding to a post by Alex, I realized that American education is screwed up. It's not that there aren't many great teachers (among them my wife and many friends), it's that the standards they have to follow are stupid.
The first is this stupid "accountability" based on proficiency testing. These scores go up because the kids are being taught how to beat the tests, not to learn real skills or information. Teachers hate this, and they hate spending time on it.
What's worse is that many board-imposed curricula prohibit anything even remotely experimental or new to be taught. For example, my brain developed thinking in somewhat more abstract terms. When I had to add 47 + 19, my brain saw it as 47 + 20 - 1, which would allow me to quickly arrive at 66. This was unacceptable to my teachers, when I wouldn't show any work (carrying the one and such). The funny thing is, when the authors of workbooks gave you something like 723 + 99, they were thinking in the same terms I was! Add a hundred then subtract one!
I fear for our educational future.
I need to make yet another Masters of Doom reference, this time to the idea of shareware. The original Doom and Commander Keen series made a ton of money by going the shareware route. Is this still possible today?
Two things about software have changed. The first thing is the Internet, and everything that comes with it. From piracy to file trading and just the sheer volume of free stuff out there, do you really think anyone is interested to pay for stuff anymore? My personal stance is that I'll pay for something I intend to use if it's good software. It's the reason I paid for Trillian, for example. It's good stuff and worth it to me, and the developers deserve to be compensated for it. I'm probably a tiny minority that feels that way.
The second thing that has changed is the open source movement. It was with great reluctance last New Year that I started giving POP Forums away, because I knew its days of being paid for were over after three years. There were better free packages out there on different platforms. Even with my forthcoming version, which I think will finally “catch up” and even exceed other .NET packages, I can't see people paying for it. If I put a link up there to take $25 from people that thought it was cool, would anyone bite? Somehow I doubt it.
Is shareware dead?
I was reading Masters of Doom today, which chronicles the lives of John Romero and John Carmack, two of the founders of id Software. In talking about their youth, Romero spent a lot of time going to pizza joints to play video games, because that's where the games were generally found.
This made me stop and think, where did these places all go? I can think of three that used to be in the area around my house growing up in Cleveland. I always looked forward to going to these place because if I could convince my parents to spot me a quarter, I'd get to play Pac-Man, or even better, Ms. Pac-Man. How awesome was that?
Now, it's rare to find a pizza place at all where you can go in, have a slice and play a few video games. Pizza is all about the big chains and delivery. Arcade games are harder to find outside of places like Dave & Busters. It's so odd that the era has come and gone.
The weird irony is that you can buy the Ms. Pac-Man/Galaga combination cabinets now in small, medium and cocktail versions. In fact, some are targeted for home use, without the coin slots.
In the blog entry that will never die, “McMike” asks why they would kill TechTV shows and stick in a bunch of G4 shows on the newly merged G4TechTV. The more I thought about that the more I started to draw parallels to radio. More on that in a moment.
First, let's think about the TechTV audience. I think it's safe to say that it ranged from novice techie to tech junkie, and they're people that can afford to buy nice stuff. That's why they had car commercials for better cars on the channel. It's a nice demographic to have.
Compare this to the G4 audience, which I'm fairly certain (judging by their message boards) is the young gamer types that can barely peck out English. Certainly a niche, but not a demographic that will make you rich.
Comcast bought TechTV to exponentially expand their audience because TechTV had a huge subscriber base on satellite and cable. However, you'd would think that they would also realize the revenue potential in a more diverse demographic.
This is where it reminds me of radio. In the early 90s, radio experimented with a format commonly called “Z Rock,” which appealed mostly to 12-24 males. A niche you could corner, certainly, but what the hell do you sell those people besides heavy metal CD's and zit cream? Not much. Needless to say, the format died quickly. It has been reborn to some degree as “Xtreme radio” as of late, but you don't see those stations making any big scores outside of the same demographic. The only thing different now is that Clear Channel and Infinity own everything, so they can segment the market because they are their own competition.
So the programming geniuses at G4 got the demographic that spends money and attracts bigger advertisers, only to piss it away to emphasize its original demographic. The rules aren't that different than they were in 90s radio. What do you sell that audience other than heavy metal (and hip hop) CD's, zit cream and now video games? What's the ROI for advertisers?
I hate to keep complaining about it, because I know nothing will change. It's just that I really feel like I lost something. I didn't watch that much TV to begin with outside of Alias and 24. Now that's all there is.
Now that we have the glorious TreeView and site mapping controls in v2 of ASP.NET, I'm curious to know if anyone has published some kind of best practices regarding the extraction of hierarchical data from a database.
Visiting my local Border's bookstore just isn't the same as it used to be. There was a time when I would anxiously head back to the computer section and browse the many .NET books, especially the Wrox Press books with the red covers. There was so much to learn!
These days, none of the books cover anything I don't already know. Just before the old Wrox became whatever it is today, there was a flood of specialty books like C# Threading handbook, Professional ASP.NET Performance, Professional .NET Network Programming and C# Text Manipulation, among others. I bought them all.
These days, it's not that I know everything (I should know a lot more about XML and Web services, for example, but I already have those books and they're boring), but the really detailed stuff isn't out there anymore. This isn't that surprising anymore, because I know some publishers won't even touch a book unless it can sell 10,000 copies. That's a shame, because while the Internet does have a lot of fabulous resources, it's still too much of a mess at times to get a clear vision of how to do accomplish something. Books make it so much easier.
I hope and pray that my book meets that five-digit sales figure. It's one of the few really intermediate books out there, in my opinion, and I think it's a market that has been neglected, or at the very least books haven't been positioned for that market. I've got eight chapters in the can, nine to go.
Incidentally, I've bought lots of non-computer books lately. Rebel Without a Crew, Masters of Doom and now My Life, are the most recent. Weird that they're all biographies or autobiographies. The last computer books I bought were Test-Driven Development in Microsoft.NET (remarkably useless for anyone that has heard even a little about TDD) and Managed DirectX9 Kick Start (thin on theory, as intended, but an outstanding introduction to the subject).
I find it pretty funny that George Michael shut down his forum because people were being negative toward him. I heard his latest single on DirecTV's dance channel it's weak.
But what gets me is these clowns that post something about free speech or what their rights are. Got news for you, kiddies, if you don't own it, you're not entitled to anything. If the owner doesn't like you coming into his house and pissing on his rug (”It really tied the room together”), he has the right to boot your ass to the curb. If you want to exercise your free speech, start your own forum and cry about it to someone else that cares.
I used to get this all of the time on CoasterBuzz, back when the idea of a moderated forum seemed to offend every other person. It was rare that we deleted anything at all unless it was unreadable chat shorthand, but the way some people would tell it we were instituting some kind of fascist regime. In the long term we found that moderation and some respect for grammar attracted more people than it turned off. There are still crybabies that cry about it on Usenet.
Yet another thing that makes you realize just how much the Internet is a part of our culture.
I'm sitting here on my deck this morning enjoying a somewhat cool Northeast Ohio morning, wondering how we ever got along without wireless ethernet.
It sure beats being chained to a desk elsewhere in the house. Come to think of it, it beats being chained to a cubicle somewhere working for The Man as well!
Answered my own question regarding SqlCommand.ExecuteDbPageReader() by looking at it in the object browser:
[System.ObsoleteAttribute("Do not use, will be removed after beta.")]
Bummer. I find it surprising that anything they came up with was worse than what John Q. Codemonkey could.
Someone told me that SqlCommand.ExecutePageReader would be dropped from v2 of .NET. Well, it's in beta 1, so does that mean it will stay? Anyone have the skinny on that?
A friend finally hooked me up with a Gmail account. I guess the biggest reason I wanted an account was because it's not fun not being a part of the “in” crowd. So now that I've got one, well, not sure what I'm going to do with it.
My normal address is handy because I use IPSwitch's IMail, and it has a Web interface. I use Hotmail only because I've had it for many moons and it doubles as my Passport account. Now I have this Gmail account.
Now that I'm “in,” I will say that it's pretty cool. The UI is fairly simple, the ads don't bother me and the conversation-style display of e-mail is a pretty good idea. If all e-mail did this we wouldn't reply with the entire message history duplicated in every message.
But at the end of the day, it's still just e-mail. Such a ridiculously simple thing anymore. Now that spam is getting a little more under control (at least with the tools I use), it's actually a useful medium again!
A while back I wrote about my disgust following the merger of G4 and TechTV. I'm convinced that the idiots at Comcast really had no idea how bad their programming really was in terms of production, air talent and scope. They bought TechTV because of its distribution, and ignored that fact that its programming was mostly top notch, so they killed good shows, fired a ton of people, and shut down the heart of the operation in San Francisco. Dumbasses.
Having worked in broadcast at the start of my post-college career, I can't say I'm surprised. Broadcast programmers treat short-term ratings like boards of public companies treat meaningless short-term changes in stock price. They never look at the big picture or accept that the development of the product may hold you back at first, but pay off ten-fold in the long-run.
Anyway, I found it odd that a month after I complained about this the first time, I was still getting comments about it in my blog. A check of the stats showed that it's because my blog entry was Googlrific. Searching for “g4 techtv merger” puts me at the first result. I've read the articles about how Google ranks results and how you can try and use that to your advantage, but honestly, it's just dumb luck sometimes.
The text parsing in POP Forums has always been the bane of my existence in that product. Version after version, it's the thing I've hated most to try and make it work better. In a nutshell, it's supposed to translate “forum code” into HTML for post storage as well as reverse parse it or parse the sad excuse for HTML that comes out of IE's built-in HTML editing.
For the Whidbey version, it's actually going better than it had before. Writing unit tests before the code makes all the difference because it provides instant feedback with a set of conditions to test every time. That's a lot easier than testing via the application's UI. It amazes me how different my approach is from just two years ago, and it reminds me that I've always got something new to learn, even if I am writing my own books.
The debugger in Visual Studio has been my best friend as well. When I think back to the ASP days I wonder how I got along without it. I've never been quite as happy as I am now with the tools that I use.
So far the rewrite of the parser is going pretty well. The big change is making sure that the final output is more or less XHTML compliant, and the only challenging part of that is dealing with overlapping tags.
I should be writing for the book, but I've got seven chapters down and ten to go. I feel pretty good about the progress there.
I revised the event/event handler listing I did last night. See edits there.
It appeared to me that they added a few things here and there to the Application, Page and Control lifecycle in ASP.NET v2.0. Curious, I whipped up some derived classes to output to a text file every time one of these events fired in the grand scheme of a request. I wired in the basic events then did overrides for everything that appeared to fire at some point. I think it's mostly complete, but the data binding events don't appear to fire unless you've got some data binding to do...
Edit 7/4: I added the postback events in there, as well as data binding for the control. However, keep in mind that the data binding for the control is, in this case, called from the page's Load handler. Naturally it's common to do this in PreRender as well, so it could also appear there.
Anyone have something to add?
Yesterday was my 31st birthday. It was a lot less stressful than my last one, presumably because you only really freak out on the ones that happen every decade. I don't feel like I'm aging too quickly or anything, or that I'm missing opportunities. The only age-related thing I ever think about these days is children. I'd love to have one (preferably a girl), but I just don't want one now.
So with that, Jeff Putz day was pretty laid back. We hit Chipotle for lunch and did a little shopping. Somehow only Stephanie got stuff out of that, but seeing her happy with new books is a gift in itself. I contemplated buying some video games, but I have some that aren't finished yet. I also have a couple of books to read, a book to write, and some miscellaneous code to write. I've got plenty to do!
After shopping, we went and saw Spiderman 2. Hands down better than the first. It makes you laugh and cry, it's insanely well written. I'm a little biased because I love Kirsten Dunst. She's a cutie (if a bit thin for my tastes), but for being young she seems to be really in control of the roles she'll play and the life she chooses to lead. Anyone in Hollyweird that can do that gets props from me.
After the movie we hit Outback for dinner. I almost never get steak there anymore. It's really all about the cheese fries.
We settled in for a quiet evening of TV and reading. I'm almost through Robert Rodriguez's Rebel Without a Crew. You might know him as the director of the El Mariachi movies, including Desperado and Once Upon a Time in Mexico, as well as Spy Kids. Basically, as a 23-year old, the guy struggling to get a break in film school went out and made his own movie from under $7,000. He's hands-on everything and thinks that Hollywood is a fucked up mess of studios, unions and financial waste. He broke into film-making by doing, just sheer will to make a movie, warts and all. Great special features on the Mexico DVD that show him shooting himself, editing and writing music at home, and best of all, shooting digitally. The guy is a real inspiration to people like me that need to make a movie.
Thursday I did something I almost never do. I wrote some code for the pure fun of it, to see if I could. I wrote a very simple SMTP client that sends basic e-mail. It talks back and forth to the server and, aside from a lack of error handling, does the job. It was kind of like the virtual equivalent of having an erector set to build something just for the satisfying feeling of creation. I guess it's true... I'm really a geek.
I should probably mention that last weekend's BeastBuzz at Paramount's Kings Island was a huge hit. We had 226 attendees and the marketing staff there made it an incredible event. Absolutely outstanding, and the biggest CoasterBuzz event yet.
The fun thing about my current voluntary break from “normal” work is that I can experiment with code for fun. I can't remember the last time I did that. Ever since I got the book “Professional .NET Network Programming” a year or two ago, I thought it would be fun to try and write a simple SMTP component. The spec is pretty straight forward, so why not?
Today I thought I'd give it a whirl. It might be something I'll include in the next version of POP Forums or something. To my surprise, it really wasn't that hard to whip it up. It's not checking response codes for errors or anything, but it does send mail. I even managed to get basic authentication for ESMTP to work.
I realize it's not rocket science, but it's kind of interesting to write something from scratch even though it has been done who knows how many times. A lot of it is just having an excuse to play with network and stream classes.
I'm easily amused.
Every once in awhile when you're tooling about .NET v2, you come across something that you wish you had in the previous versions. Today, that's the TcpClient.Available property. It returns an int that cleverly enough tells you how many bytes are available to read from the network stream. It helps shave down a couple of lines required to read a stream.
Nice job, guys!