Very Informative Rap On HTML Coding Design
I got a kick out of this video I found on YouTube. Take a look:
Tags: Programming
while(!(succeed = try()));
I got a kick out of this video I found on YouTube. Take a look:
Tags: Programming
Just saw on OSNews that Microsoft Research has just released the Singularity Source Code on CodePlex.
Microsoft has released source code from the Singularity research project onto Codeplex under an academic, non-commercial license. “The Singularity Research Development Kit is based on the Microsoft Research Singularity project. It includes source code, build tools, test suites, design notes, and other background materials. The Singularity RDK is for academic non-commercial use only and is governed by this license.”
If you are unfamiliar with the Singularity Project, its goal is to create an Operation System based off of the C# programming language and the .NET 1.1 Framework. (I can only image they use the .NET 1.1 Framework, because that is about the time they started the project and haven’t got around to updating it.
Singularity is a research project focused on the construction of dependable systems through innovation in the areas of systems, languages, and tools. We are building a research operating system prototype (called Singularity), extending programming languages, and developing new techniques and tools for specifying and verifying program behavior.
Some interesting things that I found while browsing the source code:
For anybody interested in Operating Systems this is very interesting stuff. Especially for a guy like me that has never touched assembly or low level C programming in any kind of professional level. Hopefully this weekend I will have some time to load it up in Virtual PC and play with it.
Tags: C#, CodePlex, News, Operating System, Programming, Singularity
Every developer has their favorite tool collection that they must have in order to survive while developing software. The list below is indispensable in my day-to-day activities and that is why I am sharing it with my readers. My list was inspired by Scott Hanselman’s own list of tools that he uses. However I would be really interested to see what Scott’s actual list is since it would be almost impossible to touch each and every tool once a week as he claims. Because many of them serve the same purpose.
The goal of my list is to keep the tool list up to date with my current tool set. So if I stop using a tool it will drop to the bottom of the list in a section called Not Using Anymore.
This list is licensed under a slightly different license than the rest of my site. So please do not reproduce this work in it’s entirety. I would rather you link to http://www.coderjournal.com/essential-software/, because work like this takes much of my time. And I am going to do everything that I can to make sure the links stay relevant and up to date. You have this pledge from me, because the links below are also my source for downloading these tools.
Tags: Application, ASP.NET, C#, Essential Software, Personal, Programming, Review, SQL
Recently I have been working very hard on getting a new Web 2.0 initiative off the ground. With most new initiatives I like to start out by looking for software development patterns that will help me standardize my structure as well as make the programming experience common for any new members that are brought on the team. However I recently ran in to a structural “pattern” that seems like it is pretty simple and it addresses a common problem in software development. I researched as much as possible on all the common pattern websites that I visit and even went as far as posting on ASP.NET Forums to see if anybody could help me, give it a name. If this “pattern” hasn’t been named yet I am going to be shocked.
I like to consider myself pretty educated when it comes to some of the recent developments in structured software development. However I am at a total loss here so I am presenting this pattern to my readers to see if they have seen it before? For now I am calling this “The Modeling Pattern”:
The pattern I had in mind is to have the same object with different interfaces each modeling the required data for a specific type of User Interface.
In many websites you normally have the same information represented in various different ways. I originally arrived at this pattern after listening to Scott Hanselman’s MVC Screencast. The idea of a model, as in the M in the Model View Controller (MVC), really intrigued me. The more I thought about standard web page designs and how they are mostly based around only one “object”, the more it convinced me I was using the right model. For example you have these two different views of a article on the .NET Kicks site. (Which is a great site by the way.)
I call this a card just for the fact that it is a small representation of all the information for this article, much like a business card is a small representation of all the information about a person.

Notice how most of the information is similar between the two images above. We know they are similar because it is the same information represented from the database in different views. However the main difference is the amount of information show. Obviously it would be a massive overkill to load the users who kicked the story, and comments, when all that is required is the card view for the front page. I imagine most of this is not new to many of my readers, because SQL lets you create your datasets (models) however you want at will, the real trick in software development is creating the finite number of objects for the infinite number of datasets that SQL can return. That is what I am trying to address with “The Modeling Pattern”, creating a finite number of objects that makes sense based on the views I need for my application, because you obviously don’t want to dirty load all the properties for performance reasons. This is how I would code the above in “The Modeling Pattern”.
interface IUserModel
{
int Id { get; set; }
string UserName { get; set; }
DateTime JoinedOn { get; set; }
}
interface IArticleCardModel
{
int Id { get; set; }
string Name { get; set; }
string Description { get; set; }
int KickCount ( get; set; }
int CommentCount ( get; set; }
void Kick (IUserModel user);
}
interface IArticleModel : IArticleCard
{
List<string> Comments { get; }
List<IUserModel> UserKicks { get; }
}
Then with these interfaces you create the objects.
class User : IUserModel
{
// implement interfaces plus supporting code
}
class Article : IArticleModel, IArticleCardModel
{
// implement interfaces plus supporting code
}
Then you create a helper class to fill these methods in the data layer.
static class DataHelper
{
public static IArticleCardModel GetArticle (int id)
{
IArticleCardModel a = new Article();
// get data from database and only fill in IArticleCardModel interfaces
}
public static IArticleModel GetArticle (int id)
{
IArticleModel a = new Article();
// get data from database and fill in IArticleModel interfaces
// including supporting tables such as the collections
// or fill in some and dirty fill the others
}
// do the same for User
}
To use this pattern in something like the MVC framework, you would just use the interfaces instead of the actual object. What this does for you is two fold. Defines the UI model that is required and because it is an interface it doesn’t allow you access to the other properties of the class that maybe null.
So if anybody has seen this pattern before I would love to here about it. Also if you have a better name for it and you haven’t heard of it, I would love it to have something more than the tactical “The Modeling Pattern”.
Tags: ASP.NET, C#, MVC, Programming, Software Patterns, SQL, The Modeling Pattern