Monday, April 28, 2008

Interview Questions - Fibonacci

I found a interesting interview questions that is most likely a bit over done, but I still like it, it reminds me of my intro to programming classes from back in the day, which for me was only about 5 years ago. This one concerns the Fibonacci Numbers. The problem is write the Fibonacci Sequence without Recursion. With Recursion the fib sequence is relatively easy:

public static int GetFibValueRecursive(int place)
 {
     if (place <= 0) return 0;
     if (place == 1) return 1;
     return GetFibValueRecursive(place - 1) + GetFibValueRecursive(place - 2);
 }

First step to this problem I would write a test to make sure my code is correctly solving the problem.

[Test]
 public void GetFibValue_GivenPlace_ReturnCorrectValue()
 {
     Assert.AreEqual(0, Fibonacci.GetFibValue(-1));
     Assert.AreEqual(0, Fibonacci.GetFibValue(0));
     Assert.AreEqual(1, Fibonacci.GetFibValue(1));
     Assert.AreEqual(1, Fibonacci.GetFibValue(2));
     Assert.AreEqual(34, Fibonacci.GetFibValue(9));
     Assert.AreEqual(144, Fibonacci.GetFibValue(12));           
 }
Then I would write the code.
public static int GetFibValue(int place)
 {
     if (place <= 0) return 0;
     int previous = -1;
     int result = 1;
     for (int i = 0; i <= place; ++i)
     {
         int sum = result + previous;
         previous = result;
         result = sum;
     }
     return result;
 }

Bam! The Fibonacci Sequence without recursion of course if you wanted more than just a value for given place I would write it a little different perhaps return a list of values instead of a single value.

FibSequence.zip (71.66 KB)
#     Comments [0]  
kick it on DotNetKicks.com
 Monday, January 28, 2008

Post Seattle Code Camp

I spent my weekend attending Seattle code camp sessions. I learned a lot, but one of the biggest things I learned is how much I still don't know. My experience as a developer is limited I have yet to reach 2 years developing professionally and I am still in school currently working on my last quarter for my BS. I like to think that I am a good developer but speaking to people at the code camp is a nice ego check and I still have a long way to go before I can reach the status of elite alpha geek. My goals as a developer this year is to really dive into WCF and to study the code put out by the Patterns & Practices guys at Microsoft, specifically the Enterprise Library and Smart Client. What I really need is a chip I can insert behind my ear and just download the knowledge and experience I need, I cant seem to consume information fast enough otherwise.

One thing I would like to know is the process of how other people obtain deep knowledge of a subject not just an overview.  I am open to opinions please give me your 2 cents by Email Aaron@thesprage.com or leave a comment.

#     Comments [0]  
kick it on DotNetKicks.com
 Tuesday, January 15, 2008

Seattle Code Camp

Seattle Code Camp on Jan. 26th from what I hear it is a little smaller than most but seems to have some good content. The schedule includes speakers such as William (Bill) Vaughn and Phil Haack. Most of the tracks covered will pertain to .Net but there are a few Java sessions as well.

The following sessions look interesting to me:
26th
Rethinking Unit Testing: xUnit.net
Data Enhancements in Visual Studio 2008
Windows Application Enhancements in Visual Studio 2008
Visual Studio Reporting
27th
An Introduction to Windows Communication Foundation
Black Belt DSA, building Duplex Agents
The Web via WCF
LINQ Overview

#     Comments [0]  
kick it on DotNetKicks.com
 Thursday, January 10, 2008

using Statement

The using Statement is simply syntax sugar for a try finally block. If you instantiate an object that implements IDisposable you can make your code look cleaner with the key word using.
Example:
StreamWriter sw = File.CreateText(filePath)
try
{
  sw.Write(someText);
}
finally
{
  sw.Dispose();
}
The above block works the same as:
using(StreamWriter sw = File.CreateText(filePath))
{
  sw.Write(someText);
}
More Info:
MSDN

#     Comments [0]  
kick it on DotNetKicks.com
 Saturday, September 15, 2007

Sweet Sweet NUnit on VS2005 Action

This is great! I dont know why I didnt do this earlier, but you can Debug your code and run NUnit at the same time. You just need to set the Debug>Start Action to start external aplication NUnit.exe. Then set your start project to be the same project as your test code and tada you now have debuging and break point goodness wile running nunit.

#     Comments [0]  
kick it on DotNetKicks.com
 Friday, September 14, 2007

Singleton Pattern

The singleton pattern in C# is very simple to implement and very useful. This pattern ensures that there is only one instance of its self providing a global point of access. There are different ways of doing this but I like to use the example below  because it is thread safe and clean.

public class User
{ private int _userId = 1; private static User _instance = new User(); static User() { } private User() { } public int UserId { get { return _userId ; } set { _userId = value; } } public static User Instance { get { return _instance; } }
}
Here is a quick test I wrote in NUnit that shows how it is used and comfirms there is only one instance.
[Test]
 public void TestSingleton()
 {
     User sngle1 = User.Instance;
     sngle1.UserId = 1;
     User sngle2 = User.Instance;
     sngle2.UserId = 2;
     Assert.AreEqual(sngle2.UserId, sngle1.UserId);
 }

More Info:

Everything you need to know about C# singleton.

More Patterns

#     Comments [3]  
kick it on DotNetKicks.com
 Wednesday, August 22, 2007

Eponymous Laws Of Software Development

Do you want to sound smart, impress your friends, increase your chances of scoring next time you go out on a night on the town? Take a look at Phil Haack's blog post on 19 Eponymous Laws Of Software Development.

My Favorites are Sturgeon's Revelation Ninety percent of everything is crud (it seems to me to have a duel meaning crud = Create Update and delete or crud = crap) and Hofstadter's Law A task always takes longer than you expect, even when you take into account Hofstadter’s Law.

#     Comments [0]  
kick it on DotNetKicks.com
 Wednesday, June 13, 2007

Mission Complete: Continuous Integration .Net

I have completed or at least gotten a good start with Continuous Integration. What I have done may not be doctrine but it is what I could find to be the simplest and cleanest way. There are in my opinion 4 main parts you must have in order to achieve CI. First you must have a good repository, second you need to have a development tree setup for your project, then each project needs a build script, and finally you need to setup an automated build server. For more on continuous integration check out Martin Fowlers article and Jay Flowers article.

  1. Repository

The repository/version control/source code management, what ever you like to call it is the first thing that needs to be established. There needs to be a common place where your entire source is kept so that your build server can know where to get the latest version (head). I choose Subversion (svn) with TortoiseSVN. I was using visual source safe and I was happy about this, but like my grandpa is happy with dial-up, I had no idea what I was missing. If you are using source safe switch now to Subversion its open source and its free you will not regret it.

If you would like to know just about everything a user would need to know about modern repositories go to Eric Sink’s online book: Source Control HOWTO.

  1. Creating Development Tree

Basically the Development tree is the folder structure/organization of your project. A good development tree is defined by Mike Roberts as easily inheritable on new environments, requires little maintenance, easily maintained, supports productivity, and is consistent. I tried to follow his guide lines in his article: How to Setup a .NET Development Tree. I am using a refactored patterns project I did earlier for this example. I define the trunk/root folder name to be the same as my visual studio solution. In this folder I have 3 other folders src, lib, and tools.

The src contains all the developer created content need to build the solution. The lib contains all references dlls that are needed for the project and are not built with the solution. The tools folder will house things like NAnt, NUnit, FXCop, and whatever else you need to help build quality software. You can also include a docs folder to contain the documentation. Another good source on development trees is an article on

  1. Build Script
To automate my builds I choose NAnt  + NAntContrib. I save the build script in the root of the project with the file name of [projectName].Build and a go.bat that contains one line that calls NAnt with the build script.

@tools\nant\Nant.exe -buildfile:[projectName].build %* > buildOut.txt

 The > BuildOut.txt saves the out put of the build result to a text file I found this convenient to view how the build went. My build script should be made in a way that is easily implemented, easy to maintain, and need as little maintenance as possible. I include this as an existing solution item that way it can be edited along with the src.

<?xml version="1.0" encoding="utf-8"?>
<project name ="nant" default ="all">

  <!-- The Build Directory -->   
  <property name="build.dir" value ="build"/>

  <!-- Define Default targets and the order they run -->
  <target name="all" depends="clean, compile, run-unit-tests" description="Compile and Run Tests"/>

  <!-- delete build folder, everything in this folder should be created on the build,
    so it should be safe to delete at any time. -->
  <target name="clean" description="Delete automated build artifacts">
    <delete dir="${build.dir}" if="${directory::exists(property::get-value('build.dir'))}"/>
  </target>

  <!-- Compile solution with msbuild task(Only Available with NAntCOntrib)
    if it is 2003 use solution task all build properties should be
    set up in a new VS Automated Build configuration. -->
  <target name="compile">
  <!-- point msbuild to the solution file with should be at the root of your src folder-->   
    <msbuild project="src\Patterns.sln">
      <property name="Configuration" value="Automated"/>
    </msbuild>
  </target>

  <!-- RunUnit tests -->
  <target name ="run-unit-tests">
    <!-- Creates Nunit Reprot Directory-->
    <mkdir dir="${build.dir}\test-reports"/>
    <exec program="nunit-console.exe" basedir="tools\nunit"
          workingdir="${build.dir}">
      <!-- The dll that contains your test that
    should now be in the build folder -->
      <arg value="Strategy.Test.dll"/>
      <!-- Location and name of the NUnit test report -->
      <arg value="/xml:test-reports\UnitTests.xml"/>
    </exec>
  </target>

</project>

In side VS I set up a new visual studio build configuration called Automated. Automated is basically a copy of the default configuration Release but I changed the folder it builds to be ..\..\build\.

  1. Build Server
The final step is implementing your build server. I have heard of people just using scheduled tasks for this but that doesn’t sound very useful. I wanted the build done when some one commits a change to the repository. For this I used CruiseControl.NET. CruiseControl.NET is an Automated Continuous Integration server, implemented using the Microsoft .NET Framework. It works with majority of the source code management (SCM) tools out there and more importantly it works with subversion. The installation was simple just download and run the MSI but the configuration can be a little difficult because of the flexibility available. To get it running you need to edit the ccnet.config.

<cruisecontrol>
    <!-- Each Project needs the following setup -->
<project name="Patterns">
<!-- The Working folder/checked out
folder for the project on the server -->
<workingDirectory>H:\MyApps\Patterns</workingDirectory>
<!-- sourcecontrol setup -->
<sourcecontrol type="svn">
  <!-- URL to the project in the repository -->
    <trunkUrl>http://www.myrepos.com/myapps/Patterns/</trunkUrl>
    <executable>D:\Program Files\Subversion\bin\svn.exe</executable>
    <!-- The Working folder/checked out
    folder for the project on the server -->
    <workingDirectory>H:\MyApps\Patterns</workingDirectory>
</sourcecontrol>
<!--Build task-->
<tasks>
    <nant>
     <!-- Nant EXE for project -->
        <executable>H:\MyApps\Patterns\tools\Nant\nant.exe</executable>
    <!-- where the build file lives -->
        <baseDirectory>H:\MyApps\Patterns</baseDirectory>
        <buildArgs></buildArgs>
        <nologo>false</nologo>
        <buildFile>Patterns.build</buildFile>
        <buildTimeoutSeconds>1200</buildTimeoutSeconds>
    </nant>
</tasks>
<!-- reporting information -->
<publishers>            
    <merge>
        <files>        
            <!-- Location of Unit test reports -->
            <file>H:\MyApps\Patterns\Build\test-reports\UnitTests*.xml</file>
        </files>
    </merge>
  <!-- create the log files used by the CruiseControl.NET Web Dashboard -->
    <xmllogger logDir="D:\Program Files\CruiseControl.NET\server\Patterns\BuildLogs" />
  <!--default statistics for capturing during the build process.-->
  <statistics />
</publishers>
</project>
</cruisecontrol>

After that just edit the project, commit the changes, and watch the dashboard build report.


#     Comments [4]  
kick it on DotNetKicks.com
 Friday, June 08, 2007

Getting Started with .Net Development

  

 I am really impressed with the amount of developer support being put out by Microsoft; everything you need to get started is pretty much free. You can download the Express version of Visual Studios and it gives you a majority of its big brothers features which is 300$ IDE, the most notable difference is that the express version is not pluggable. There are different flavors of Visual Studio express, one for windows, web with AJAX, hardware/robotics and game /XNA development.  Although the free IDE is nice and I use visual studio as my primary development tool I am totaly blown away with the amount of resources available for learning. I am not talking about the MSDN Library, most of the time the MSDN documentation just confuses me, but webcast live and On Demand, podcasts and virtual labs are fantastic. There is tons of time worthy information put up here for beginning and advance programmers. It’s the first place I go to when I am trying to learn a new technology. I hear a lot of trash talked about Microsoft everywhere I go but I feel they have the best development support out there.

#     Comments [0]  
kick it on DotNetKicks.com
 Tuesday, May 08, 2007

How do I learn?

    I was at school the other day talking to a class mate he was admitting to me that some thing big needs to change in his life. He was about to graduate with a BS in Software Engineering and he all ready has his AAS in Software Application Programming, but he still did not have confidence in his abilities as a programmer. This made me think; we started school at the same time with about the same skill level. Why has my skill and confidence in them surpassed his? I believe it has to be because I strive to find and consume knowledge in multiple ways.
    I regularly listen to podcasts and watch webcast. I am also subscribing to multiple blogs from people I believe to be successful and knowledgeable programmers. I always have at least one book that I am reading that is related to the field. I attend classes on programming as well as try to instruct others on techniques through my blog as well as in person. On top of my work, I always have a side project going on that allows me to practice new and interesting technologies. That seems like a lot and it is, but I enjoy it. I guess that is the real answer, you have to enjoy it to be proficient at it.

#     Comments [0]  
kick it on DotNetKicks.com
 Saturday, April 07, 2007

Finding your Solution/Discoverability for DotNet Developers.

   
I was listening to .Net Rocks today and they where interviewing Dan Appleman on discoverability. I thought when I herd this title it was going to be a show on how to make you application features get noticed, but this show was even better. This show was on how to make your life as a developer easier, easier by tipping you on how to find solutions to your problems that have already been solved. The best tip was on Google custom search this allows you to create your own seach that only searches sites that you specify. Dan Appleman has already done this work for us .Net Developers. He gathered up his favorite reference sites and created the site SearchDotNet. Try it out!


#     Comments [0]  
kick it on DotNetKicks.com
 Wednesday, April 04, 2007

The Strategy Pattern

    The strategy pattern is intended to provide a means to define a family of algorithms, encapsulate each one as an object, and make them interchangeable. What does this mean?
    From my understanding of the strategy pattern, you are separating the behavior from an object with the use of an interface. The interface defines the family of algorithms and you encapsulate each behavior with a class that implements this interface. With this use of the interface contained in the class you have the ability to reference different behaviors at runtime.
    To better understand this I created a simple app that is a form with a button. When this button is clicked it uses Reflection to load a .dll that contains a class that defines the behavior of the button.



The first thing I did to implement the strategy pattern was to create my interface that defines my family of behaviors/Algorithms.
namespace Patterns.Strategy.PluginInterface
{
public interface ICrazyBehavior
{
void GoCrazy();
}
}

In order to assign a concrete behavior I created a class that implemented this interface.

using Patterns.Strategy.PluginInterface;
namespace MyUsefullPlugin
{
class MyUseFullPlugin : ICrazyBehavior
{
public void GoCrazy()
{
System.Windows.Forms.MessageBox.Show("This Plug-in is out of controll");
}
}
}

Finally I wrote the class that contains the interface and all other content I needed.
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
using Patterns.Strategy.PluginInterface;
namespace Patterns.Strategy
{
public partial class PlugableStrategy : Form
{
private List<ICrazyBehavior> _crazyBehavior = new List<ICrazyBehavior>();
public PlugableStrategy()
{
InitializeComponent();
}
private void btnGoCrazy_Click(object sender, EventArgs e)
{
GetPlugins();
foreach (ICrazyBehavior thisBehavior in _crazyBehavior)
{
thisBehavior.GoCrazy();
}
}
private void GetPlugins()
{
_crazyBehavior.Clear();
string path = Application.StartupPath + "/Plugins";
string[] files = Directory.GetFiles(path, "*.dll");
foreach (string file in files)
{
try
{
Assembly asm = Assembly.LoadFrom(file);
Type[] types = asm.GetTypes();
foreach (Type type in types)
{
Type[] interfaces = type.GetInterfaces();
foreach (Type currentInterface in interfaces)
{
if (currentInterface.Name == "ICrazyBehavior")
{
if (currentInterface.Namespace == "Patterns.Strategy.PluginInterface")
{
object obj = asm.CreateInstance(type.Namespace + "." + type.Name);
_crazyBehavior.Add((ICrazyBehavior)obj);
}
}
}//interface
}//type
}
catch (Exception) { }
}//file
}
}
}

   

So, putting this all together I have my form/class that contains a button when some one clicks this button it calls GetPlugins(). The method GetPlugins() uses Reflection to find any .dlls in the plugins folder that contains the ICrazyBehavior interface with the name space of Patterns.Strategy.PluginInterface. If such thing exists in the folder it creates an instance of this object and adds it to my list of _crazyBehaviors once the list is filled the click event continues, it iterates through the list calling the method GoCrazy().

    Using the strategy pattern allowed me to decouple the context class and its behavior enabling me to implement a very "useful" pluggable application.

Dowload The Complete Code Below:

Patterns.zip (83.64 KB)
#     Comments [3]  
kick it on DotNetKicks.com
 Tuesday, April 03, 2007

Long Time No Post

Its been a wile sense my last post but I have a good excuse. My blog was contending with finals from last quarter and a new job. I am now working for The PBA as a C# application developer and I love it.  It is a great opportunity and I get to work with great people. But now that I have finally settled in too my new job and new quarter of school I can continue my quest for mastering patterns I have already started working on a good example of the strategy pattern and will have it completed and posted by the end of the week. Cheers all I have to catch my bus.

#     Comments [0]  
kick it on DotNetKicks.com
 Friday, February 09, 2007

Web 2.0 Presentation

This video is the coolest most impressive explanation of the buzz word web 2.0 I have ever seen. Definitely worth 5 min of your time.
#     Comments [0]  
kick it on DotNetKicks.com
 Wednesday, February 07, 2007

The Observer Pattern

The observer pattern is very useful and very easy to implement. It only requires two interfaces. One interface is the subject interface the other is the Observer.

    The subject contains three methods: AddObserver, RemoveObserver, and Notify. This interface is implemented by any class that needs to notify other objects that its state has changed.

Public Interface ISubject
    Sub AddObserver(ByRef ob As IObserver)
    Sub RemoveObserver(ByRef ob As IObserver)
    Sub Notify()
End Interface

The other interface is the observer it only contains one method Update, this interface is implemented by any class that needs to be notified by the subject object.

Public Interface IObserver
    Sub Update(ByVal subj As Object)
End Interface

In some examples of this pattern I have seen the subject is setup as an abstract class that you must inherit from, but I believe it limits the usefulness of the pattern. From what I read in the Head First Design Patterns book it says it is best to program to an interface instead of using inheritance. To illustrate this pattern I have created a simple program that monitors My Documents  folder on your computer and notifies a form when ever this folder's contents have changed. This is only an example, the way I implemented the subject object is a little weak but it will serve well enough.

I used the FileSystemWatcher as my base class and implemented the ISubject interface to serve as the subject. The class that implements the subject interface must contain a collection of observers the observers are added and removed using the AddObserver and RemoveObserver methods. The observers are notified by the Notify method witch iterates through the observer collection calling the Update method in the IObserver interface.

Imports System.IO

Public Class MyFileWatcher
    Inherits FileSystemWatcher
    Implements ISubject

Dim _observers As New ArrayList

Public Sub AddObserver(ByRef ob As IObserver) _
  Implements ISubject.AddObserver
    _observers.Add(ob)
End Sub

Public Sub Notify() _
  Implements ISubject.Notify
    Dim ob As IObserver
    For Each ob In _observers
        ob.Update(Me)
    Next
End Sub

Public Sub RemoveObserver(ByRef ob As IObserver) _
  Implements ISubject.RemoveObserver
    _observers.Remove(ob)
End Sub


Private Sub File_Changed _
 (ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles Me.Changed
    Me.Notify()
End Sub
Private Sub File_Created _
 (ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles Me.Created
    Me.Notify()
End Sub
Private Sub File_Deleted _
 (ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles Me.Deleted
    Me.Notify()
End Sub
Private Sub file_Renamed _
    (ByVal sender As Object, ByVal e As System.IO.RenamedEventArgs)Handles Me.Renamed
    Me.Notify()
End Sub
End Class

The observer is implemented as a form that contains List box this list box is Notified by the Subject and the Update method is ran witch updates the list with a valid list of files.

Imports fileWatcher
Imports System.IO
Public Class Form1
Implements IObserver
Private _path As String
Private _allfiles As Collections.ObjectModel.ReadOnlyCollection(Of String)
Public Property Path() As String
Get
Return _path
End Get
Set(ByVal value As String)
_path = value
End Set
End Property
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
_allfiles = My.Computer.FileSystem.GetFiles(_path)
For Each singleFile As String In _allfiles
Me.ListBox1.Items.Add(singleFile)
Next
End Sub
Public Sub Update1(ByVal subj As Object) Implements fileWatcher.IObserver.Update
Me.ListBox1.Items.Clear()
_allfiles = My.Computer.FileSystem.GetFiles(_path)
For Each singleFile As String In _allfiles
Me.ListBox1.Items.Add(singleFile)
Next
End Sub
End Class

Lastly I created an MDI form that contains an instance of the FileWatcher class and creates a new Instance of the subject form every time a tool strip button is clicked. When ever a file in my documents is update all the child forms of the mdi are updated.

Imports System.Windows.Forms
Imports fileWatcher
Public Class MDIParent1
Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewToolStripButton.Click
Dim FormObserver As New Form1
FormObserver.MdiParent = Me
FormObserver.Path = My.Computer.FileSystem.SpecialDirectories.MyDocuments
_fileWatcherSubject.AddObserver(FormObserver)
FormObserver.Show()
End Sub
Private Sub MDIParent1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
_fileWatcherSubject.Path = My.Computer.FileSystem.SpecialDirectories.MyDocuments
End Sub
End Class

For complete Observer pattern code download at the following link.

fileWatcher.zip (116.6 KB)
#     Comments [3]  
kick it on DotNetKicks.com
 Saturday, January 27, 2007

I' m Learning Design Patterns

I received a great book from my girl friend this Christmas called Head First Design Patterns. I have been reading this book and it is really getting me excited (about coding patterns in case you needed clarification). To better understand these patterns I am going to try and code examples of each one and post my experience as well as the code on my blog. I will list the patterns so I can keep track of them as well as giving my one or two readers a heads up on what to expect.

All of these patterns and definitions are described in Head First Design Patterns by Eric Freeman & Elisabeth Freeman with Kathy Sierra & Bert Bates from O'Reilly

Design patterns

  • The Strategy Pattern (p24) - Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
  • The Observer Pattern (p51) - Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
  • The Decorator Pattern (p91) - Attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
  • The factory Method Pattern (p134) - Defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
  • The Abstract Factory Pattern(p156) - Provides an interface for creating families of related of dependent objects without specifying their concrete classes.
  • The Singleton Pattern (p177) - Ensures a class has only one instance, and provides a global point of access to it.
  • The Command Pattern (p206) - Encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.
  • The Adapter Pattern (p243) - Converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
  • The Template Method Pattern(p289) - Defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Template Methods lets subclasses redefined certain steps of an algorithm without changing the algorithm's structure.
  • The Interator Pattern (p336) - Provides a way to access the elements of an aggregate object sequentially without exposing the underlying representation.
  • The Composite Pattern(p356) - Allows you to compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
  • The State Pattern(p410) - Allows an object to alter its behavior when its internal state changes. The object will appear to change its class.
  • The proxy pattern(p460) -  Provides a surrogate or placeholder for another object to control access to it.

#     Comments [0]  
kick it on DotNetKicks.com
 Friday, December 22, 2006

My Wish List

I think one of the hardest parts of becoming a successful and educated programmer (besides just sitting down and coding) is finding good tools and resources to learn from and use. I put a lot of effort into finding these. In order to find these tools and recourses I look toward programmers I consider successful, most of which are listed under the Developer and Technologist Journals on my site. So far I have found frequent references to the following books and tools, these are on my to read/buy list.

Book Wish List
Tools Wish List
Tools and Resources I Own & Recommend
  • Reflector for .NET - Reflector is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows you to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.