<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>They call me Big Papa</title>
        <link>http://geekswithblogs.net/bigpapa/Default.aspx</link>
        <description>4 kids and counting</description>
        <language>en-US</language>
        <copyright>baileyrt</copyright>
        <managingEditor>baileyrt@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>They call me Big Papa</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/bigpapa/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Life Goal: Never Stop Learning</title>
            <link>http://geekswithblogs.net/bigpapa/archive/2008/02/29/life-goal-never-stop-learning.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;Several months ago I learned how to use LogParser. I put away my normal responsibilities for part of a day and focused on that neat little tool. Check my previous posts if you want to learn more about that experience.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Last week I wanted to know exactly what I'd need to do to move some of my web services to WCF. So, I pushed aside my duties, turned off Outlook, and spent the day delving into WCF. I don't think I have to tell you how sweet that day was!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Today I went to launch DBArtisan and a feeling of dread came over me. I didn't want to wait for the thing to load just so I could run a very simple query on a database. And SQL Management Studio isn't any better performance-wise. They're both great tools and I take full advantage of both regularly. But I wanted something light-weight. I had heard about SQL*PLUS for Oracle, but we're an MS shop, so I needed something for SQL Server. A little digging around uncovered sqlcmd- a command line tool for SQL Server. It's simple, very light-weight, and already installed. That little utility only took a matter of minutes to muddle through and appreciate.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;In the next week or so I plan to get in up to my elbows in WF and I expect a great adventure. I've done a thing or two with LINQ, but one of these days I'm going to have to block off the distractions and plug my brain in on that.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Maybe (through no fault of my own, I assure you) I'm a little behind on some of these technologies, but I'll get to them when I get to them. The point is that I will never stop learning. I promise myself never to stagnate because I don't want to suck. We don't all need to be on the bleeding edge of things, but people who say "the heavens are closed" and that the world needs no new programming advancements should just hurry up and retire. Ha!&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120089"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120089" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/120089.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2008/02/29/life-goal-never-stop-learning.aspx</guid>
            <pubDate>Fri, 29 Feb 2008 21:35:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/120089.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2008/02/29/life-goal-never-stop-learning.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/120089.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/120089.aspx</trackback:ping>
        </item>
        <item>
            <title>Career Planning</title>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/11/20/Career-Planning.aspx</link>
            <description>&lt;p&gt;I'm a generally trusting soul, although I have a feeling that will do me harm some day- perhaps even today (oh well, trust anyway). I know nearly nothing about Steve Pavlina, but I choose to link to one of his posts.&lt;/p&gt;
&lt;p&gt;I found a &lt;a href="http://www.stevepavlina.com/blog/2007/11/career-planning/"&gt;very interesting post&lt;/a&gt; on Steve's site. It talks about looking at your career goals from a "top-down" perspective by discovering your underlying abilities and strengths. I'm going to put that into action- right now, in fact.&lt;/p&gt;
&lt;p&gt;I enjoy teaching- but the term "teaching" doesn't really express what I really mean by the term. I love demonstrating how to do things and seeing how someone's confidence grows from having earned a new skill. I love to share what I know- not to promote myself and not to cheat others from being able to learn, but to save time and thus get more accomplished.&lt;/p&gt;
&lt;p&gt;Maybe I'll be a professor some day. Maybe I'll be a trainer some day. Maybe I'll continue to be a senior-level developer and collaborate with my team members. Regardless of what job I hold, I want to work to make sure my career is always focused around sharing information (especially practical, useful information) with others.&lt;/p&gt;
&lt;p&gt;Thank you, Steve. That was insightful.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116999"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116999" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/116999.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/11/20/Career-Planning.aspx</guid>
            <pubDate>Tue, 20 Nov 2007 20:05:06 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/116999.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/11/20/Career-Planning.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/116999.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/116999.aspx</trackback:ping>
        </item>
        <item>
            <title>C# (heart) RAW FTP</title>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/11/05/C-heart-RAW-FTP.aspx</link>
            <description>&lt;p&gt;Just like with the previous entry on C# and telnet, creating an FTP session using C# is not as scary as it sounds. And even if you have to connect to a server that only understands RAW commands, that's not too bad either. Here's how:&lt;/p&gt;
&lt;p&gt;Create a socket on port 21:&lt;br /&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;    //resolve IP address from DNS&lt;br /&gt;
    IPHostEntry dns = Dns.GetHostEntry(serverName);&lt;br /&gt;
    //create an endpoint to the server on port 21 (ftp default)&lt;br /&gt;
    IPEndPoint serverIP = new IPEndPoint(dns.AddressList[0], 21);&lt;br /&gt;
    //create a socket to that endpoint&lt;br /&gt;
    Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);&lt;br /&gt;
    //connect using the socket&lt;br /&gt;
    sock.Connect(serverIP);&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;If you want to, you can set some other properties of the socket:&lt;br /&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;    sock.SendTimeout = 2000; //2 seconds to send&lt;br /&gt;
    sock.ReceiveTimeout = 10000; //10 seconds to receive&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Sending a message (string) and receiving a response through the socket goes like this (I chose to use the Thread.Sleep call because my server couldn't finish responding to my request in time for me to read the response immediately):&lt;br /&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;    //placeholder for response&lt;br /&gt;
    string resp = string.Empty;&lt;br /&gt;
    //placeholder for data to be received&lt;br /&gt;
    Byte[] bytesReceived = new Byte[1024];&lt;br /&gt;
    //track bytes&lt;br /&gt;
    int bytes = 0;&lt;br /&gt;
    //encode message into clear text&lt;br /&gt;
    Byte[] bytesSent = Encoding.ASCII.GetBytes(request);&lt;br /&gt;
    //send message&lt;br /&gt;
    sock.Send(bytesSent, bytesSent.Length, 0);&lt;br /&gt;
    //wait a while&lt;br /&gt;
    Thread.Sleep(1000);&lt;br /&gt;
    //listen for a response&lt;br /&gt;
    bytes = sock.Receive(bytesReceived, bytesReceived.Length, 0);&lt;br /&gt;
    //decode the response&lt;br /&gt;
    resp = Encoding.ASCII.GetString(bytesReceived, 0, bytes);&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Next, here are the strings that I stored in the object "request". Order matters- mostly. And the "\n" parts are the carriage returns to tell the server to process the command. They may not be necessary in your case, they were in mine:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;"USER [username]\n"&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;"PASS [password]\n"&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;"CWD [path of the folder containing the file I want]\n"&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;"TYPE I\n"&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;"PASV\n"&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;"RETR [file name]\n"&lt;/font&gt; &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Explanation:&lt;br /&gt;
Steps 1 and 2: Simply transmitting credentials. The user name must be a user LOCAL TO THE SERVER, which may or may not be a network or domain account.&lt;br /&gt;
Step 3: Change the current directory to the folder containing the file you're going to download.&lt;br /&gt;
Step 4: Type I means we're dealing with binary- I want the file, not just the text inside the file. There are also Type A and probably some others. Search if you need them.&lt;br /&gt;
Step 5: PASV tells the server to get ready to send or receive. The server opens a port and gets ready for a connection. It then sends a response that looks like this: &lt;font face="Arial"&gt;227 Entering Passive Mode (127,0,0,1,172,209). The first four numbers (separated by commas) are the IP address of the server: 127.0.0.1, in this case. Then you take the 5th element in the list, multiply it by 256 and then add the 6th element to find the port number.&lt;br /&gt;
Between steps 5 and 6, you'll need to create a second socket to the server, this time on the port that you just calculated from the response.&lt;br /&gt;
Step 6: Send RETR to the first socket. As soon as you do, the second socket will begin to receive data from the server.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Finally, here's how to receive the file from the ftp server via the second socket.&lt;br /&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;    byte[] buffer = new byte[25000];&lt;br /&gt;
    int bytes = 0; //number of bytes received finally&lt;br /&gt;
    bytes = sock2.Receive(buffer);&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;There is a property of the socket called "Available" and it'll tell you how many bytes are ready to be read from the socket. But from moment to moment that should change as more data is transmitted across the wire. Basically, you can keep checking it until the number stops changing or you can wait a pre-specified amount of time and start receiving from the socket whether it's done or not.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116613"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116613" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/116613.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/11/05/C-heart-RAW-FTP.aspx</guid>
            <pubDate>Mon, 05 Nov 2007 21:12:17 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/116613.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/11/05/C-heart-RAW-FTP.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/116613.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/116613.aspx</trackback:ping>
        </item>
        <item>
            <title>Renewed commitment</title>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/11/05/Renewed-commitment.aspx</link>
            <description>&lt;p&gt;I subscribe to about 20 feeds (nowhere close to someone like &lt;a href="http://scobleizer.com"&gt;Scoble&lt;/a&gt;) and on several of them, I'd noticed the advice to set a rate of posting that is reasonable and can be maintained and then &lt;a href="http://www.codinghorror.com/blog/archives/000983.html"&gt;stick with it&lt;/a&gt; (Atwood). I'm not trying to gain readership and I'm not trying to compare myself to any of the 20 experts I follow. I am, however, trying to improve myself. So, I'm going to follow the advice- my starting rate (through the end of the year) will be to post at least once every two weeks.&lt;/p&gt;
&lt;p&gt;Maybe that seems like a wussy goal to some of you, and I would agree- to a certain extent. But I'm new to blogging, collaboration is not a huge priority where I work (a mistake, I agree) so I'm working against the tide here, and I have 4 kids at home under the age of 6 so I don't have a great deal of computer time at home. Wussy or not, that's my goal.&lt;/p&gt;
&lt;p&gt;The post I'm working on now (which I hope to publish by tomorrow) is similar to my &lt;a href="http://geekswithblogs.net/bigpapa/archive/2007/10/08/C-2.0-and-Telnet---Not-As-Painful-As-It.aspx"&gt;last one&lt;/a&gt;. C# and telnet can be friends, and so can C# and ftp- in the raw, no less. I had to connect to an ftp server and use RAW FTP commands (RECV, PASV, etc) so I thought I'd pass on a few helpful hints.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116611"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=116611" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/116611.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/11/05/Renewed-commitment.aspx</guid>
            <pubDate>Mon, 05 Nov 2007 20:12:26 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/116611.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/11/05/Renewed-commitment.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/116611.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/116611.aspx</trackback:ping>
        </item>
        <item>
            <title>C# 2.0* and Telnet - Not As Painful As It Sounds</title>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/10/08/C-2.0-and-Telnet---Not-As-Painful-As-It.aspx</link>
            <description>&lt;p&gt;*The concepts in this article apply to .NET 1.1 and 3.0 as well, but my links below are for 2.0.&lt;/p&gt;
&lt;p&gt;From what I found recently, there are lots of sites that attempt to describe what goes into creating a Telnet session using .NET in general, C# specifically. But not many of them are truly helpful. There are several sites that point you to custom classes, libraries, or even controls that you can download and use blindly. Those leave me feeling like I left the house not wearing any pants.&lt;/p&gt;
&lt;p&gt;When you boil down the discussion, it's really just a Socket to some server on port 23, which is the default port for Telnet. So I'm going to try to describe what needs to happen simply and then point you to the site I used to create my own code. I might even post my own code, but it really is mostly a copy-and-paste job from the MSDN site.&lt;/p&gt;
&lt;p&gt;A socket is simply a connection to a server. How data gets passed back and forth is just detail info that only the "founding fathers" care about any more. That statement will probably come back and haunt me some day, hopefully not today. Anyway, that's about it. Create a socket on port 23 to a specified server, open it, do your business, and close it.&lt;/p&gt;
&lt;p&gt;If you're going to use the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.net.sockets.socket(VS.80).aspx"&gt;System.Net.Sockets&lt;/a&gt; class, here's what you do:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Create an IPEndpoint, which points to the specified server and port. You can query DNS.GetHostEntry to change a computer name to an IPHostEntry object.&lt;/li&gt;
    &lt;li&gt;Create a socket object with the following parameters: AddressFamily.InterNetwork (IP version 4), SocketType.Stream (rides on InterNetwork and Tcp parameters), ProtocolType.Tcp (reliable, two-way connection)&lt;/li&gt;
    &lt;li&gt;Open the socket like this: socket.Connect(endpoint); //yup, it's that simple&lt;/li&gt;
    &lt;li&gt;Send your data using socket.Send(... wait, I forgot something. You have to encode the data first so it can fly across them wires.&lt;/li&gt;
    &lt;li&gt;Use Encoding.ASCII.GetBytes to convert the nice message you have for the server into bytes.&lt;/li&gt;
    &lt;li&gt;Then use socket.Send to send those bytes on their way.&lt;/li&gt;
    &lt;li&gt;Listen for a response (one byte at a time, or into a byte array) using socket.Receive&lt;/li&gt;
    &lt;li&gt;Don't forget to clean up by calling socket.Close()&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;That's all that's really required. There are neat little tricks like asynchronous calls which will allow you to send your data and then pick up the response from the local post office when it's ready (NOT literally, in case you're gullible). Very cool stuff, but I'm trying to present the "quick and dirty, but correct and simple" solution.&lt;/p&gt;
&lt;p&gt;Let's look at it another way. You can use a &lt;a href="http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcpclient(VS.80).aspx"&gt;System.Net.Sockets.TcpClient&lt;/a&gt; object instead of a socket object, which already has the socket parameters configured to use ProtocolType.Tcp. So let's walk through that option:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Create a new TcpClient object, which takes a server name and a port (no IPEndPoint necessary, nice).&lt;/li&gt;
    &lt;li&gt;Pull a NetworkStream out of the TcpClient by calling GetStream()&lt;/li&gt;
    &lt;li&gt;Convert your message into bytes using Encoding.ASCII.GetBytes(string)&lt;/li&gt;
    &lt;li&gt;Now you can send and receive data using the stream.Write and stream.Read methods, respectively. The stream.Read method returns the number of bytes written to your receiving array, by the way.&lt;/li&gt;
    &lt;li&gt;Put the data back into human-readable format using Encoding.ASCII.GetString(byte array).&lt;/li&gt;
    &lt;li&gt;Clean up your mess before the network admins get mad by calling stream.Close() and client.Close().&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;See, wasn't that simple? I knew you could do it. Oh, one little note: If you're trying to log into the machine (first thing, usually), don't forget to send the next-line character "\n" after your user name and password (one each) so that your credentials are submitted. That darn Socket just plan overlooks the fact that it was supposed to hit Enter for you. Incompetent, I know. But be patient, we're all friends here.&lt;/p&gt;
&lt;p&gt;If any of you need a challenge to get you through the day, here's one. I was able to connect to one server using this technique but another server passed back a response that appeared to be encoded differently. It had characters like an arrow pointing up and a solid black triangle pointing down. I'm assuming that's Unicode, but I'm unable to read Unicode and I haven't figured out how to get .NET to translate it for me. Yes, I've tried Convert.ToBase64String and Encoding.*.GetString (BigEndian, UTF7, UTF32, etc). Come on now, I hope I'm smarter than that.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115929"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115929" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/115929.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/10/08/C-2.0-and-Telnet---Not-As-Painful-As-It.aspx</guid>
            <pubDate>Mon, 08 Oct 2007 18:43:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/115929.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/10/08/C-2.0-and-Telnet---Not-As-Painful-As-It.aspx#feedback</comments>
            <slash:comments>16</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/115929.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/115929.aspx</trackback:ping>
        </item>
        <item>
            <title>Who is this BigPapa guy?</title>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/10/02/Who-is-this-BigPapa-guy.aspx</link>
            <description>&lt;p&gt;For anyone wondering "Who is this guy and where did he come from?" I have an answer. I have been posting for a few months on Blogger but didn't really see any fruits of my labor- no comments, no way of knowing how many hits I was getting, etc. So, I found GWB and have relocated my stuff here.&lt;/p&gt;
&lt;p&gt;So that brings me back to the original question. Part 1: Who am I? I'm a developer with the power company in SC. I love to teach and hope to be able to move into an instructor/evangelist position some day.&lt;/p&gt;
&lt;p&gt;Part 2: Where did I come from? I actually opened this account close to a month ago but was trying to figure out how to get my postings migrated nicely. I realized that I was spending more time planning and thinking and scheming than it was going to take me to move the posts themselves. So yesterday I just moved them by hand. There are only about 8, so it didn't take long. But if you were just looking at which posts were new, I probably showed up a time or 8 yesterday. I doubt I'll continue such a marathon pace, but you never know...&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115778"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115778" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/115778.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/10/02/Who-is-this-BigPapa-guy.aspx</guid>
            <pubDate>Tue, 02 Oct 2007 16:49:58 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/115778.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/10/02/Who-is-this-BigPapa-guy.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/115778.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/115778.aspx</trackback:ping>
        </item>
        <item>
            <title>Coding Challenge - Date Me</title>
            <category>Coding Challenge</category>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Date-Me.aspx</link>
            <description>&lt;p&gt;Given the day of the year and the year (both as ints), return the date in “m/d/yyyy” (string) format without using the System.DateTime namespace or any other built-in date/time handler.&lt;br /&gt;
&lt;br /&gt;
One solution (1858 IL characters)&lt;br /&gt;
&lt;/p&gt;
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;static string g(int d, int y)&lt;br /&gt;
{&lt;br /&gt;
int l;&lt;br /&gt;
int i = 0;&lt;br /&gt;
if (d &amp;lt; 0) { i = 13; }&lt;br /&gt;
l = ((y % 400 == 0) | ((y % 100 != 0) &amp;amp; (y % 4 == 0))) ? 1 : 0;&lt;br /&gt;
int[] m = new int[13] { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 };&lt;br /&gt;
while (i &amp;lt; 13)&lt;br /&gt;
{&lt;br /&gt;
if (i &amp;gt; 1) { m[i] = m[i] + l; }&lt;br /&gt;
if (d &amp;lt;= (m[i])) { return i + "/" + (d - m[i - 1]) + "/" + y; }&lt;br /&gt;
i++;&lt;br /&gt;
}&lt;br /&gt;
return "e";&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
Another solution (1814 IL characters):
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;public string G(int d, int y)&lt;br /&gt;
{&lt;br /&gt;
if (d &amp;lt; 1 || y &amp;lt; 1)&lt;br /&gt;
return "e";&lt;br /&gt;
bool l = y % 4 == 0 &amp;amp;&amp;amp; (y % 100 != 0 || y % 400 == 0) ? true : false;&lt;br /&gt;
d = l ? d - 1 : d;&lt;br /&gt;
int[] m = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };&lt;br /&gt;
int i = 0;&lt;br /&gt;
do&lt;br /&gt;
{&lt;br /&gt;
if (d &amp;gt; m[i])&lt;br /&gt;
d -= m[i];&lt;br /&gt;
else&lt;br /&gt;
break;&lt;br /&gt;
} while (++i &amp;lt; 12);&lt;br /&gt;
d = l ? i &amp;lt; 2 ? d + 1 : d : d;&lt;br /&gt;
return i &amp;gt; 11 ? "e" : String.Format("{0}/{1}/{2}", i + 1, d, y);&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
Another (1718 IL characters):&lt;br /&gt;
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;static string r(int d, int y)&lt;br /&gt;
{&lt;br /&gt;
int m = 0;&lt;br /&gt;
bool l = y % 4 == 0 &amp;amp;&amp;amp; (y % 100 != 0 || y % 400 == 0) ? true : false;&lt;br /&gt;
int[] c = { 31, l ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };&lt;br /&gt;
while (d &amp;gt; c[m &amp;lt; 11 ? m : 11])&lt;br /&gt;
{&lt;br /&gt;
d -= c[m &amp;lt; 11 ? m : 11];&lt;br /&gt;
m++;&lt;br /&gt;
}&lt;br /&gt;
return d &amp;lt; 1 || y &amp;lt; 1 || m &amp;gt; 11 ? "E" : String.Format("{0}/{1}/{2}", m + 1, d, y);&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
Winner (1538 IL characters)&lt;br /&gt;
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;static string D(int d, int y)&lt;br /&gt;
{&lt;br /&gt;
bool L = y % 4 == 0 &amp;amp;&amp;amp; y % 100 != 0 || y % 400 == 0;&lt;br /&gt;
if (d &amp;gt; (L ? 366 : 365) || d &amp;lt;= 0 || y &amp;lt;= 0)&lt;br /&gt;
return null;&lt;br /&gt;
int x = 0, t = 3;&lt;br /&gt;
string i = string.Format("3{0}3232332323", L ? "1" : "0");&lt;br /&gt;
string s = "JFMAMJJASOND";&lt;br /&gt;
while (d &amp;gt; t + 28)&lt;br /&gt;
{&lt;br /&gt;
d -= t + 28;&lt;br /&gt;
t = int.Parse(i[++x].ToString());&lt;br /&gt;
}&lt;br /&gt;
return string.Format("{0}/{1}/{2}", s[x], d, y);&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115741"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115741" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/115741.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Date-Me.aspx</guid>
            <pubDate>Mon, 01 Oct 2007 13:09:54 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/115741.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Date-Me.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/115741.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/115741.aspx</trackback:ping>
        </item>
        <item>
            <title>Coding Challenge - Color My World</title>
            <category>Coding Challenge</category>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Color-My-World.aspx</link>
            <description>&lt;p&gt;Given a color string in one of the formats listed below, return an array of the RGB elements that make it up.&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
"RGB(255,255,255)"&lt;br /&gt;
"#FFFFFF"&lt;br /&gt;
"#FFF"&lt;br /&gt;
&lt;br /&gt;
All of these examples return [255, 255, 255]&lt;br /&gt;
&lt;br /&gt;
- Case does not matter&lt;br /&gt;
- #abc translates to #aabbcc&lt;br /&gt;
- There will be no spaces in the string&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
One solution (73 IL):
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;s = s.Replace("RGB(", "").Replace(")", "").Replace("#", "");&lt;br /&gt;
if (s.Contains(",")) { return s.Split(','); }&lt;br /&gt;
int[] a = new int[3];&lt;br /&gt;
int i = 0;&lt;br /&gt;
do { a[i] = (s.Length == 3 ? 17 : 1) * Convert.ToInt32(s.Substring(i * s.Length / 3, s.Length / 3), 16); } while (++i &amp;lt; 3);&lt;br /&gt;
return a;&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
Another (68 IL, I think):
&lt;div style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BACKGROUND-COLOR: #ffffcc"&gt;&lt;code&gt;object[] colorMyWorld(string htmlColor)&lt;br /&gt;
{&lt;br /&gt;
if (htmlColor.StartsWith("#"))&lt;br /&gt;
{&lt;br /&gt;
Color myColor = ColorTranslator.FromHtml(htmlColor);&lt;br /&gt;
return new object[] { myColor.R, myColor.G, myColor.B };&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
string[] components = htmlColor.Split("(),".ToCharArray());&lt;br /&gt;
return new object[] { components[1], components[2], components[3] };&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115740"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115740" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/115740.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Color-My-World.aspx</guid>
            <pubDate>Mon, 01 Oct 2007 13:09:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/115740.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Color-My-World.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/115740.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/115740.aspx</trackback:ping>
        </item>
        <item>
            <title>Coding Challenge - String 'Em Up</title>
            <category>Coding Challenge</category>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---String-Em-Up.aspx</link>
            <description>&lt;p&gt;Implement 2 algorithms and place them in separate methods.&lt;br /&gt;
1) Given a sentence, write an algorithm to reverse the order of the words.&lt;br /&gt;
Example: “My name is Chris” becomes “Chris name is My”.&lt;br /&gt;
2) Given the same sentence as in #1, write an algorithm to reverse each individual word, but not their order.&lt;br /&gt;
Example: “My name is Chris” becomes “yM eman si sirhC”.&lt;br /&gt;
&lt;br /&gt;
Winner:&lt;br /&gt;
&lt;code&gt;public static string W(string s){&lt;br /&gt;
char[] c = s.ToCharArray();&lt;br /&gt;
Array.Reverse(c);&lt;br /&gt;
return O(new string(c));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static string O(string s){&lt;br /&gt;
string[] t = s.Split(' ');&lt;br /&gt;
Array.Reverse(t);&lt;br /&gt;
return string.Join(" ", t);&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Another:&lt;br /&gt;
&lt;code&gt;static void a(string s) &lt;br /&gt;
{&lt;br /&gt;
int i = s.LastIndexOf(' ');&lt;br /&gt;
c.Write(s.Substring(i + 1) + " ");&lt;br /&gt;
if (i &amp;lt; 0)&lt;br /&gt;
return;&lt;br /&gt;
a(s.Remove(i)); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static void b(string s) &lt;br /&gt;
{&lt;br /&gt;
int i = s.LastIndexOf(' ');&lt;br /&gt;
if(i &amp;gt; 0)&lt;br /&gt;
b(s.Remove(i));&lt;br /&gt;
s = s.Substring(i + 1);&lt;br /&gt;
i = s.Length;&lt;br /&gt;
do&lt;br /&gt;
{&lt;br /&gt;
c.Write(s[--i]);&lt;br /&gt;
} while(i &amp;gt; 0)&lt;br /&gt;
c.Write(" "); &lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Another:&lt;br /&gt;
&lt;code&gt;static void x(string l)&lt;br /&gt;
{&lt;br /&gt;
d[] b = l.ToCharArray();&lt;br /&gt;
a.Reverse(b);&lt;br /&gt;
y(new s(b));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static void y(string l)&lt;br /&gt;
{&lt;br /&gt;
s[] f = l.Split(new d[] { ' ' });&lt;br /&gt;
int i = f.Length - 1;&lt;br /&gt;
do&lt;br /&gt;
{&lt;br /&gt;
c.Write(f[i] + " ");&lt;br /&gt;
} while (--i &amp;gt; -1);&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115739"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115739" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/115739.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---String-Em-Up.aspx</guid>
            <pubDate>Mon, 01 Oct 2007 13:08:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/115739.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---String-Em-Up.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/115739.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/115739.aspx</trackback:ping>
        </item>
        <item>
            <title>Coding Challenge - Can I get a dollar?</title>
            <category>Coding Challenge</category>
            <link>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Can-I-get-a-dollar.aspx</link>
            <description>&lt;p&gt;Given an arbitrary number of coins to use, print out a combination using that number that will add up to a dollar.&lt;br /&gt;
For instance, using the number 4:&lt;br /&gt;
Q : 4&lt;br /&gt;
D : 0&lt;br /&gt;
N : 0&lt;br /&gt;
P : 0&lt;br /&gt;
If the number is invalid, such as 5:&lt;br /&gt;
Invalid Number&lt;br /&gt;
&lt;br /&gt;
- The method must take an Integer value with no restrictions.&lt;br /&gt;
- All data structures must be instantiated within the method.&lt;br /&gt;
- Only Pennies, Nickels, Dimes, and Quarters can be used. (No Half Dollars)&lt;br /&gt;
- The lowest IL wins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One solution (103 IL)&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
static void Amount(int total)&lt;br /&gt;
{&lt;br /&gt;
bool invalid = true;&lt;br /&gt;
for (int quarters = 0; quarters &amp;lt;= 4; quarters++)&lt;br /&gt;
{&lt;br /&gt;
for (int dimes = 0; dimes &amp;lt;= 10; dimes++)&lt;br /&gt;
{&lt;br /&gt;
for (int nickels = 0; nickels &amp;lt;= 20; nickels++)&lt;br /&gt;
{&lt;br /&gt;
for (int pennies = 0; pennies &amp;lt;= 100; pennies++)&lt;br /&gt;
{&lt;br /&gt;
if ((quarters*25 + dimes * 10 + nickels * 5 + pennies == 100) &amp;amp;&amp;amp;&lt;br /&gt;
(total == quarters + dimes + nickels + pennies))&lt;br /&gt;
{&lt;br /&gt;
Console.WriteLine("Q: " + quarters);&lt;br /&gt;
Console.WriteLine("D: " + dimes);&lt;br /&gt;
Console.WriteLine("N: " + nickels);&lt;br /&gt;
Console.WriteLine("P: " + pennies);&lt;br /&gt;
invalid = false;&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Winner (84 IL):&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
void getADollar(int coinCount)&lt;br /&gt;
{&lt;br /&gt;
int d, n, p, q = 0;&lt;br /&gt;
bool solution = true;&lt;br /&gt;
do&lt;br /&gt;
{&lt;br /&gt;
d = 0;&lt;br /&gt;
do&lt;br /&gt;
{&lt;br /&gt;
n = 0;&lt;br /&gt;
do&lt;br /&gt;
{&lt;br /&gt;
p = coinCount - q - d - n;&lt;br /&gt;
if ((((q * 25) + (d * 10) + (n * 5) + p) == 100) &amp;amp;&amp;amp; p &amp;gt;= 0)&lt;br /&gt;
{&lt;br /&gt;
Console.WriteLine(String.Format("Q : {0}\nD : {1}\nN : {2}\nP : " + p, q, d, n));&lt;br /&gt;
solution = false;&lt;br /&gt;
}&lt;br /&gt;
n++;&lt;br /&gt;
} while (n &amp;lt;= coinCount);&lt;br /&gt;
d++;&lt;br /&gt;
} while (d &amp;lt;= coinCount);&lt;br /&gt;
q++;&lt;br /&gt;
} while (q &amp;lt;= coinCount);&lt;br /&gt;
if (solution)&lt;br /&gt;
Console.WriteLine("Invalid Number");&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115738"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115738" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/bigpapa/aggbug/115738.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rob Bailey</dc:creator>
            <guid>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Can-I-get-a-dollar.aspx</guid>
            <pubDate>Mon, 01 Oct 2007 13:07:31 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/bigpapa/comments/115738.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/bigpapa/archive/2007/10/01/Coding-Challenge---Can-I-get-a-dollar.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/bigpapa/comments/commentRss/115738.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/bigpapa/services/trackbacks/115738.aspx</trackback:ping>
        </item>
    </channel>
</rss>