Letting the kids loose on your junk
I ported the data from my reasonably large forum on CoasterBuzz over to an early test build of POP Forums v8. First off I was just relieved that the data was easy to move.
The thing is far from feature complete. It's funny how the basic stuff, users, forums, topics and posts, turns out to be like 20% of the overall work in a forum application. It's all the other stuff that takes time. But breaking it down into little simple parts and iterating like crazy makes it so much easier to manage. Sometimes all you're doing is enabling and worrying about deeper implementation later. For example, there is serious logging going on for all things security related, and moderation is totally logged. Right now there's no mechanism for viewing the data, but it's there.
I've learned some interesting things since the last time I hacked at already hacked code three years ago. Starting over has been very freeing. Among the lessons:
- Stop trying to be everything to everyone, all at once. I realized that I was so worried about how people would look at the code, whether or not it met external and often imagined requirements, if it matched current conventions or feature sets, etc.
- Unit test when it makes sense to unit test. I dig test-driven development, but I've reached the firm conclusion that it's a total waste of time for things that aren't likely to get broken directly or indirectly. I know that's blasphemy to the TDD zealots, but come on man, I've gotta ship something!
- SQL 2005 is the shizzle. Actually, I have little use for the CLR functionality in daily use, but when it comes to migrating data, using CLR-based functions and procedures is hands down, rock your socks, easier than using T-SQL. Deploying in a manner other than via Visual Studio is awkward, but again, I don't plan to use it in normal production.
- ASP.NET's event-driven model is so far and away easier to code for than anything else I've encountered because it's so damn extensible. Things like the DataBound event on Repeaters make the presentation of data so easy to do anything. I don't know why ASP.NET books and online articles do such a crappy job of teaching this stuff. I feel like I could write another three chapters to my book to cover this stuff.
- Performance is everything, and it's easier to tweak when you trace. There are times you can do something silly and end up making multiple database or method calls that have a negligible effect on things until they happen in the wild. There's nothing dirty or wrong with putting Trace.Warn() calls in your code to see exactly what's slow in your app.