My Secret Life as a Spaghetti Coder
home | about | contact | privacy statement
I've been working on a couple of .NET projects lately. Maybe you could tell from a couple of my whinings (I won't call them rants), but I'm not entirely sure of what I'm doing yet.

I'm finding that I'm working against the platform. .NET and I are butting heads, and although I'm getting work done, I can't imagine it is really as hard or time-consuming as my initial experience has been.

Pain pills Some of this is due to the extra ceremony .NET adds as a tax on you and your development time. Most of it's due to my ignorance. I've been honest about that: my ignorance of the overall strategies and thought-processes present in .NET takes full credit for most of my pain.

I've known for a while that I need to read something to "get in the know," and I've been putting it off until I had time. Thanks to a conversation with another developer (who shall remain nameless, unless he tells me he wants credit) this morning, I've decided now is the time.

I'm looking for books that give a strategic overview of .NET. I'm looking for ASP.NET and Windows programming (Windows Forms) to start with. I'd also like to see some strategy guides for Active Directory and Sharepoint. Seeing as I'm sore from fighting so much, a guide for pain-free coding in .NET might also be in order. (I'm going to buy that book since I know the author is a good one.)

I can easily do a search on Amazon for .NET books. O'Reilly has a ton of them. But I don't know what's good or bad or how to tell the difference. Further, except for one person (who shall also remain nameless) I sent an email to this morning, I don't know who to ask.

Well, that's not entirely true. I know there's a crowd of good developers with diverse experiences reading this weblog. So I'm asking you:

What is TFM on .NET? Any suggestions welcome. Short reviews of why it's a good book (or article online) get bonus points.

Hey! Why don't you make your life easier and subscribe to the full post or short blurb RSS feed? I'm so confident you'll love my smelly pasta plate wisdom that I'm offering a no-strings-attached, lifetime money back guarantee!


I recently decided to cut the cord on cable and downloaded PlayOn to do the job of serving video content from the internet to my Xbox 360 and Wii, so I could watch it on my TV. Naturally, this led me to figure out how it worked, and how I could play around with it.

One thing I immediately wanted to do was improve the organization functionality. I thought I'd start with a plugin that simply takes the media server's location of video output and provides it as input back to the same server, but in a different organization scheme. Unfortunately, that didn't work as PlayOn didn't know what to do with its own URIs as input for a VideoResource in the Lua plugin API.

I didn't want to get into the scraping, transcoding, and serving of files from the internet -- that's already done well and I didn't want to spend all that time creating a media server of my own. But I did want to see better fastforward and rewind capability. To solve that, I thought I'd create a DVR for PlayOn (or TVersity, or any other media server really) and knock out both the organization features I wanted, along with the seek functionality.

Launching a business

This will be my first attempt at launching a money-making venture online (aside from programming for other people's money-making ventures). I don't expect this will turn into a full-time job, nor do I expect I'll make retirement money off of it, but I think it can make a decent return that won't require a ton of ongoing work on my part, and it might make a fun experiment.


A while ago, I was working with a problem in C# where where our code would get deadlocked, and since someone must die or several must starve, I thought it would be nice to just toss a "try again if deadlocked" statement into the exception handler. I muttered this thought on twitter to see if there was any language with such a try-catch-try-again-if construct. More...

Something's been bugging me lately about ASP.NET: I can't seem to remember to type runat="server" every time I write a line of code to display a server control.

For normal HTML elements, I understand the necessity of using the attribute when you want that element to be tied to the server. But I can't seem to figure out any other way to run a control that's been prefixed with the namespace asp.

So why does ASP.NET require such a silly, useless bit of text for everything it does?

I can think of three reasons: More...

A note to myself (a .NET neophyte) and others who may not know how ASP.NET works:

I was writing a user control (we'll call it ContentBoxVariation) in ASP.NET which composes another (ContentBox). Both have a public property Title, with getters and setters.

You might call ContentBoxVariation in an .aspx page like this: More...

Since the gift buying season is officially upon us, I thought I'd pitch in to the rampant consumerism and list some of the toys I've had a chance to play with this year that would mean fun and learning for the programmer in your life. Plus, the thought of it sounded fun. Here they are, in no particular order other than the one in which I thought of them this morning: More...

String fullName = new StringBuilder().Append(firstName + " " + middleName + " " + lastName).ToString();

When looping over collections, you might find yourself needing elements that match only a certain parameter, rather than all of the elements in the collection. How often do you see something like this?

foreach(x in a)
   if(x < 10)

Of course, it can get worse, turning into arrow code. More...

I just wanted to highlight a couple of interesting ideas I saw on InfoQ this morning:
  1. Somewhat-open classes in Java: I hadn't known about JavaRebel until now, but it looks interesting. It sounds as if you can do open-class type things, but they don't seem to market it on that aspect - instead, they focus on the time it saves you by not having to "redeploy or restart."
  2. That sounds quite a lot like another language where you're working in the abstract syntax tree itself. So I found it good timing that InfoQ also mentioned several implementations-in-the-works of Lisp on the .NET platform. Hey Grant, why don't you join one of those teams?
Do I have any votes for polyglot programming?

Like many of you, I got into programming because I wanted to make games as a kid.

Wolfenstein Title Screen It was around the time games started looking better and being more complicated than Wolfenstein 3-D that I started thinking I'd never be able to make a game. Sure, I could do Tetris or Minesweeper, but how in the world could I ever match the game play and graphics of a Quake or Diablo. Let's not even get started with Halo 3 and Call of Duty. More...

Here's a WTF I ran into the other day (partially pseudocode):

XmlDataDocument goto = new XmlDataDocument();

XmlNode gotoThisUrl;
if(referer == "")
  gotoThisURL = goto.SelectSingleNode("gotoOnDirectory1");
else if (referer == "")
  gotoThisURL = goto.SelectSingleNode("gotoOnDirectory2");

Response.Redirect(gotoThisURL.InnerText.Trim(), true);

It was actually a bit more complex than that (probably 3x as many lines), but with the same purpose. There were literally two places from which to choose to direct the request. And no, the application wouldn't take incredibly long to compile. I felt like it was quite a bit of overkill.

The last bit of advice from Chad Fowler's 52 ways to save your job was to be a generalist, so this week's version is the obvious opposite: to be a specialist.

The intersection point between the two seemingly disparate pieces of advice is that you shouldn't use your lack of experience in multiple technologies to call yourself a specialist in another. Just because you develop in Java to the exclusion of .NET (or anything else) doesn't make you a Java specialist. To call yourself that, you need to be "the authority" on all things Java. More...

For the dynamic language weenies (or otakus!), we have John Lam's Getting Started with the DLR: ToyScript. John is the driving force behind IronRuby, and the post provides a link to download ToyScript, "a quick starter kit for folks interested in building languages on top of the DLR."

Also we've got Visual Studio Shell, which InfoQ reckons will compete with Eclipse. Will be kind of cool to see what pops up on that front.

News courtesy of InfoQ: (ToyScript/DLR and VS Shell)

Don't forget to (learn how to) unit test it using XMLUnit.

I take my second weekend in a row (mostly) off of a computer, and look at all the cool things happening!

Adobe releases AIR (previously known as Apollo) and Flex 3 public beta, both products have been on my list of things to do for quite some time, still with no action taken.

Ruby (MRI) released bug fixes in version 1.8.6. JRuby officially went 1.0 (though it has yet to be posted to the website as I write this). And Ruby.NET released version 0.8 (IronRuby uses its scanner and parser, according to the article -- and this happened a couple of days before the weekend). More...

Often when we make a change to some code, if it is not properly designed, the result is that cascading changes need to be done throughout the application because bugs will ripple through the system. That's one of the ideas behind why we want to have low coupling between classes. We also have unit testing to combat the effects of this, but let's just suppose we haven't written any, and haven't used JUnit Factory to create regression tests.

Given that there is a lot of code out there that isn't quite perfect, wouldn't it be nice to have a tool that could analyze changes and where they would affect other code? I can imagine how such a tool might work, but I haven't heard of one before now (that I recall, anyway).

So the point of it all: I heard something about BMC and IBM teaming up on such a tool (my understanding is that BMC started it, and IBM later joined the project). I'm assuming it'd be in Java, but does anyone have information on this? Can anyone confirm or deny the story I heard?

What if we had functions compile(String sourceCode) and runCompiled(BinaryData compiledCode)? What could you do with it? Could it act as a closure, and bring really dynamic coding to traditionally static languages, perhaps allowing dynamically named variables and functions to languages without them (and much more!)? Could we store our code in a database and mix and match chunks, building programs based on a SQL query?

What do you think? Useful or useless?

Peter Bell's presentation on LightWire generated some comments I found very interesting and thought provoking. (Perhaps Peter is not simply into application generation, but comment generation as well.)

The one I find most interesting is brought up by several people whose opinions I value - Joe Rinehart, Sean Corfield, Jared Rypka-Hauer, and others during and after the presentation. That is: what is the distinction between code and data, and specifically, is XML code or data (assuming there is a difference)? More...

A couple of days ago, InfoQ reported on Jasper, an ORM for .NET (available here).

One of the things I never liked about .NET (or VC++ before that) were the reams of code it would generate. Of course, that's better than just hand coding everything, but it was a hassle to keep up with. It contributed to this vicious cycle where I never knew how anything worked, had horrible God-Classes, and had access to the code it generated which meant that sometimes I needed to know how some of it worked, but never took the time to learn (which may have taught me how it worked if I had used it correctly!). Of course, I was young, conceited, and generally "unconsciously incompetent" about programming back then (has anything changed? =) ). In any case, they are starting to implement the idea of synthesis, and it shows why run-time generation (what I keep calling synthesis) really trumps generating code in files.

It doesn't yet work in C#, but I would expect as they keep adding dynamic features to the platform, it eventually will.


Picture of me

.NET (19)
AI/Machine Learning (14)
Answers To 100 Interview Questions (10)
Bioinformatics (2)
Business (1)
C and Cplusplus (6)
cfrails (22)
ColdFusion (78)
Customer Relations (15)
Databases (3)
DRY (18)
DSLs (11)
Future Tech (5)
Games (5)
Groovy/Grails (8)
Hardware (1)
IDEs (9)
Java (38)
JavaScript (4)
Linux (2)
Lisp (1)
Mac OS (4)
Management (15)
MediaServerX (1)
Miscellany (76)
OOAD (37)
Productivity (11)
Programming (168)
Programming Quotables (9)
Rails (31)
Ruby (67)
Save Your Job (58)
scriptaGulous (4)
Software Development Process (23)
TDD (41)
TDDing xorblog (6)
Tools (5)
Web Development (8)
Windows (1)
With (1)
YAGNI (10)

Agile Manifesto & Principles
Principles Of OOD
Ruby on Rails

RSS 2.0: Full Post | Short Blurb
Subscribe by email:

Delivered by FeedBurner