Codeine .Net RSS 2.0
# Wednesday, 28 November 2007

    Back in July I posted up a brief entry about Twitter which is basically a social networking site that allows you to submit short postings (140 characters) to your own personal page. (You can follow mine here.) The posting are meant to be short comments or updates throughout the day that you add via the website, IM, or cell phone text messages. The social networking comes into play when other members of Twitter begin following you postings and can subscribe to receive your updates over IM and text messages. You can also send direct messages to individuals using a special syntax.

    I've heard Twitter referred to as a human side bus, the ability to put your message on the wire and anyone who is subscribing to it can see it and everyone else doesn't even know it exists. The question is, is this ability useful? I've went over a couple scenarios in my head where I could see a benefit. One nice time when I could see it useful is, for example, if you want to go to a bar and you are interested in seeing who else wants to go. If you could get your friends to subscribe to your Twitter feed (which would most likely be a feat in itself) you could through it out on the wire and see if you get any responses. In this particular case you don't care who doesn't want to go, you only want to ping everyone at once and see if you get any interest. It's immediate and saves you the time of randomly calling people in a hit and miss fashion. I could also see it being beneficial if you are having a problem with something and want to throw it out to see if anyone can help. You don't care about who's not available and who doesn't know the answer; you just want a response back if someone can help you out.

    As with any technology it can also be abused and Twitter, in my humble opinion has been turned into the Turrets of the Internet. Individuals are using it to throw out every idea in their head and a play by play update on what they are doing each day. "I ate lunch"….. "I'm in a meeting"…."I'm going to the restroom". Random nonsense blurted out that is irrelevant to the listener. The postings turn into Turrets when they don't benefit any of the readers and in most cases don't benefit the writer as well. Who benefits from your posting that you were in a meeting or went to lunch?

Just my two cents. Get the human side bus a bus driver (or at least some category filters).

Wednesday, 28 November 2007 21:29:59 (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback - Save to del.icio.us - Digg This! - Follow me on Twitter

# Sunday, 25 November 2007

The other day I ran into the need to access a nested property on an object with the actual name and path to the property stored in a string variable. For example I had a mail object and wanted to access "From.DisplayName" which was stored in a string. If I was access just the from I could have used something like this:

using System.Reflection;

PropertyInfo[] pi = myObject.GetType().GetProperties();

foreach (PropertyInfo item in pi)

{

if (item.Name = "From")

{

object o = item.GetValue(myObject, null);

}

}

 

In this example myObject is the mail object and we first get the type of it, and then get an array of the properties for that type. Finally we find the From property and get the value for that property on our object.

Unfortunately this doesn't work for nested properties and I could not find a built in way to do it so I built a recursive function to handle getting the property for me and returning it. I then packaged it into a handy .Net 3.5 extension method. Let me know if you know of a built in method to get a nested property, otherwise feel free to using the extension method I put together, though it probably needs a bit of refactoring before you put it into production.

namespace Common.ExtensionMethods

{

public static class TypeExtensionMethods

{

public static object GetNestedProperty(this Type t, Object o, String Property)

{

object myObject = null;

PropertyInfo[] pi = t.GetProperties();

 

 

 

if (Property.IndexOf(".") != -1)

{

 

foreach (PropertyInfo item in pi)

{

 

if (item.Name == Property.Substring(0, Property.IndexOf(".")))

{

object tmpObj = item.GetValue(o, null);

 

myObject = tmpObj.GetType().GetNestedProperty(tmpObj, Property.Substring(Property.IndexOf(".") + 1));

 

}

 

}

 

}

else

{

foreach (PropertyInfo item in pi)

{

if (item.Name == Property)

{

myObject = item.GetValue(o, null);

}

 

}

}

 

return myObject;

 

}

}

}

Sunday, 25 November 2007 10:03:26 (Central Standard Time, UTC-06:00)  #    Comments [1] - Trackback - Save to del.icio.us - Digg This! - Follow me on Twitter
Development | Extension Methods
# Sunday, 11 November 2007

Awhile back I got a little too aggressive with the mouse and accidently dragged my show desktop shortcut from the Quick Launch Bar onto the desktop. I tried to correct it by dragging it back onto the Quick Launch Bar, but of course this didn't work. What it did was create a shortcut on the Quick Launch Bar to the shortcut that was now on my desktop that then actually handled showing the desktop. Here's how to get things back to normal:

  1. If you happen to have completely lost the Show Desktop shortcut create a text file called "Show Desktop.scf" and add the following text to it:

     

    [Shell]
    Command=2
    IconFile=explorer.exe,3
    [Taskbar]
    Command=ToggleDesktop

     

  2. Finally open up the following folder "C:\Documents and Settings\{Your User Name}\Application Data\Microsoft\Internet Explorer\Quick Launch" and drag the file into the folder.
Sunday, 11 November 2007 17:27:38 (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback - Save to del.icio.us - Digg This! - Follow me on Twitter


Navigation
Archive
<2007 December>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2024
David A. Osborn
Sign In
Statistics
Total Posts: 70
This Year: 0
This Month: 0
This Week: 0
Comments: 33
Themes
Pick a theme:
All Content © 2024, David A. Osborn
DasBlog theme 'Business' created by Christoph De Baene (delarou)