Click here to Skip to main content
11,479,412 members (58,296 online)

Leslie Sanford - Professional Profile





Summary

    Blog RSS
68,827
Author
2,564
Authority
3,901
Debator
121
Enquirer
248
Organiser
2,196
Participant
0
Editor
Aside from dabbling in BASIC on his old Atari 1040ST years ago, Leslie's programming experience didn't really begin until he discovered the Internet in the late 90s. There he found a treasure trove of information about two of his favorite interests: MIDI and sound synthesis.

After spending a good deal of time calculating formulas he found on the Internet for creating new sounds by hand, he decided that an easier way would be to program the computer to do the work for him. This led him to learn C. He discovered that beyond using programming as a tool for synthesizing sound, he loved programming in and of itself.

Eventually he taught himself C++ and C#, and along the way he immersed himself in the ideas of object oriented programming. Like many of us, he gotten bitten by the design patterns bug and a copy of GOF is never far from his hands.

Now his primary interest is in creating a complete MIDI toolkit using the C# language. He hopes to create something that will become an indispensable tool for those wanting to write MIDI applications for the .NET framework.

Besides programming, his other interests are photography and playing his Les Paul guitars.

Reputation

For more information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege, and the given member types also gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilverAdmin
Store personal files in your account areaplatinumplatinumSitebuilder, Subeditor, Supporter, Editor, Staff
Have live hyperlinks in your biographybronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Edit a Question in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Edit an Answer in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Delete a Question in Q&AYesSubeditor, Protector, Editor, Admin
Delete an Answer in Q&AYesSubeditor, Protector, Editor, Admin
Report an ArticlesilversilversilversilverSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubeditor, Mentor, Protector, Editor, Staff, Admin
Edit other members' articlesSubeditor, Protector, Editor, Admin
Create an article without requiring moderationplatinumSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending QuestionProtector, Admin
Approve/Disapprove a pending AnswerProtector, Admin
Report a forum messagesilversilverbronzeProtector, Editor, Admin
Approve/Disapprove a pending Forum MessageProtector, Admin
Create a new tagsilversilversilversilverAdmin
Modify a tagsilversilversilversilverAdmin

Actions with a green tick can be performed by this member.


 
GeneralApplying Generic Programming to Runtime Polymorphism Pin
Leslie Sanford22-Feb-10 11:28
memberLeslie Sanford22-Feb-10 11:28 
GeneralGeneric Programming [modified] Pin
Leslie Sanford19-Jul-08 6:53
memberLeslie Sanford19-Jul-08 6:53 
GeneralOff-topic Pin
Rajesh R Subramanian19-Jun-09 13:48
mvpRajesh R Subramanian19-Jun-09 13:48 
GeneralRe: Off-topic Pin
Leslie Sanford19-Jun-09 20:06
memberLeslie Sanford19-Jun-09 20:06 
GeneralEnsuring Object State [modified] Pin
Leslie Sanford27-Jun-07 9:00
memberLeslie Sanford27-Jun-07 9:00 
GeneralEvolution of Messaging Pin
Leslie Sanford19-Oct-06 6:15
memberLeslie Sanford19-Oct-06 6:15 
This is a post[^] I made to the Lounge. I wanted to give a basic overview of the concept of messaging in object oriented programming. Specifically, I wanted to show how anonymous methods help facilitate passing one message from one object to another in a decoupled way. This is similar to my "Anonymous Methods as Glue"[^] entry.

The post got a little long; I really enjoy talking about these concepts. So I thought I would repost it here:


From a theoretical point of view, invoking a method on an object can be considered sending it a message:

SomeObject obj = new SomeObject();
 
// Sending object message to do something.
obj.DoSomething();
The challenge becomes implementing this in such a way as to make it extensible and flexible to change. Polymorphism helps by lowering the coupling between objects:

public interface ISomeInterface
{    
    void DoSomething();
}
ISomeInterface obj = new SomeObject();
 
// Sending object message to do something.
obj.DoSomething();
Now we can substitute types that implement ISomeInterface and it won't break the rest of our code. Just basic polymorphism.

It would be nice to have objects communicate peer-to-peer through a more explicit messaging system:

public interface ISink
{    
    void Send(Message msg);
}
Then we can set up relationships between objects when they are created and allow them to send messages directly to each other via the ISink interface:

// SomeObject implements the ISink interface.
ISink obj1 = new SomeObject();
 
AnotherObject obj2 = new AnotherObject(obj1);
 
obj2.Go();
obj2 can send messages directly to obj1 and does so through the ISink interface.

The problem with this approach is that we have to straightjacket objects into the ISink interface in order to allow our messaging system to work. We can use .NET events to decouple objects even further and use anonymous methods as a means of facilitating communication. Take your typical .NET class that raises an event:

public class ClassWithEvents
{    
    public event EventHandler SomethingHappened;    
    // ...
}
Take a class with a method that returns void and takes no parameters:

public class SomeObject
{    
    public void DoSomething()    
    {        
        // ...    
    }
}
Anonymous methods glue the objects together allowing them to communicate:

ClassWithEvents obj1 = new ClassWithEvents();
 
SomeObject obj2 = new SomeObject();
 
ob1.SomethingHappened += delegate(object sender, EventArgs e)
{    
    ob2.DoSomething();
};
The objects are completely decoupled. The anonymous method provides a way for events raised by one object to be delegated to another object. Things can get fancier if our anonymous method adapts the event raised by one object by transforming the message into something the receiving object can understand.

From my point of view, since taking up C#, messaging has become a ubiquitous to my programming. And I think it's improved as a result.

GeneralEnumerators as Synthesizer Components Pin
Leslie Sanford20-Sep-06 21:53
memberLeslie Sanford20-Sep-06 21:53 
GeneralAnonymous Methods as Glue Pin
Leslie Sanford17-Sep-06 15:30
memberLeslie Sanford17-Sep-06 15:30 
GeneralRefining the approach Pin
Leslie Sanford22-Jan-06 8:52
memberLeslie Sanford22-Jan-06 8:52 
GeneralFlowing down the Sink Pin
Leslie Sanford21-Jan-06 17:45
memberLeslie Sanford21-Jan-06 17:45 
GeneralFlow-Based Programming in C# Pin
Leslie Sanford29-Dec-05 14:07
memberLeslie Sanford29-Dec-05 14:07 
GeneralCombining Visitor, Observer, and Iterator Pin
Leslie Sanford25-Dec-05 22:29
memberLeslie Sanford25-Dec-05 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 23 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid