<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>JoelPadot.com</title>
	<link>http://joelpadot.com</link>
	<description></description>
	<pubDate>Sat, 03 May 2008 06:53:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>
	<language>en</language>
			<item>
		<title>Programming Interfaces in C#</title>
		<link>http://joelpadot.com/2008/05/03/13/</link>
		<comments>http://joelpadot.com/2008/05/03/13/#comments</comments>
		<pubDate>Sat, 03 May 2008 06:51:04 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2008/05/03/13/</guid>
		<description><![CDATA[What is an Interface? An interface is a encapsulator, for lack of a better term (Its 2:30 am). It contains the signatures of methods, events or delegates. The best way for me explain a good use for an interface is through example.
Say, you have a superclass that describes your object. This superclass contains properties that [...]]]></description>
			<content:encoded><![CDATA[<p>What is an Interface? An interface is a encapsulator, for lack of a better term (Its 2:30 am). It contains the signatures of methods, events or delegates. The best way for me explain a good use for an interface is through example.</p>
<p>Say, you have a superclass that describes your object. This superclass contains properties that from it, all inherited classes will possess. Now say some of these properties or behaviors that every single inherited class will have to override because it needs to be slightly different. Enter the interface. Assume you have a finite array of behaviors that any of these inherited classes will need to override to. An interface can be used to  implement these behaviors.</p>
<p>So what does an Interface look like? Let me demonstrate using the hello world scenario.</p>
<pre>interface IHelloWorld

     {

     string HelloWorld();

     }</pre>
<p>You notice, that I apprear to be simply declaring the HelloWorld() method.  That is because an Interface is a skeleton of a the class(es) that will implement it. Now say that in program, we know that we will need to get a string &#8220;Hello World&#8221; in all caps and all lower cases. But of course, we also want to ensure that we can accomodate additional requirements that may come along in the future. we could then write the following to classes to implement this interface.</p>
<pre>class HelloWorldCAPS : IHelloWorld

    {

        public string HelloWorld()

        {

            return "HELLO WORLD!";

        }

    }

class HelloWorldLOWER : IHelloWorld

    {

        public string HelloWorld()

        {

            return "hello world!";

        }

    }</pre>
<p>Each of the above classes &#8220;implements&#8221; our interface.  Now, through the use of a single interface, we can instaciate an object that will perform one of two behaviors.</p>
<p>To actually instaciate an object we simply perform the following:</p>
<pre>            IHelloWorld Message = new HelloWorldCAPS();

            Console.WriteLine(Message.HelloWorld());</pre>
<p>&#8211; or &#8211;</p>
<pre>            IHelloWorld Message = new HelloWorldLOWER();

            Console.WriteLine(Message.HelloWorld());</pre>
<p>Notice that when instanciating the object, we decide which class to implement.  In the future, you may need to create additional behaviors, or in this case, print &#8220;Hello World&#8221; differently.  You can simply create a new class from which to implement your IHelloWorld interface and you&#8217;re on your way.  This is a good alternative to straight up inheriting from and overriding methods of a superclass.</p>
<ul>
<li>So, what he have to learn from this is, only build into your base class or superclass methods that will persist accross all inherited classes.</li>
<li>Use an interface to encapsulate code that will vary amongst your inherited classes.</li>
<li>Using interfaces is a good way to build easily maintainable code as it allows you to add new functionality without affecting the need for reworking loads of code.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2008/05/03/13/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My new Verizon Blackberry 8830</title>
		<link>http://joelpadot.com/2008/02/28/my-new-verizon-blackberry-8830/</link>
		<comments>http://joelpadot.com/2008/02/28/my-new-verizon-blackberry-8830/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 03:42:48 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2008/02/28/my-new-verizon-blackberry-8830/</guid>
		<description><![CDATA[After a few months, I thought, &#8220;hey, I might as well dust off this blog thing and write something.&#8221;  So, to that extent, I picked up a Blackberry 8830 a couple weeks ago.  I picked up the Blackberry Enterprise Server plan to go along with it so I could connect to my work exchange server.  [...]]]></description>
			<content:encoded><![CDATA[<p>After a few months, I thought, &#8220;hey, I might as well dust off this blog thing and write something.&#8221;  So, to that extent, I picked up a Blackberry 8830 a couple weeks ago.  I picked up the Blackberry Enterprise Server plan to go along with it so I could connect to my work exchange server.  I must admit I know why folks get addicted to these things.  I picked up some good applications that elevate the Blackberry from a nice-to-have tool to a can&#8217;t-live-without device that controls your life.</p>
<p>The list of apps&#8230;</p>
<ul>
<li>Google Talk - I downloaded this from <a href="http://mobile.blackberry.com" target="_blank">mobile.blackberry.com</a>.  It is a must have.  As far as I&#8217;m concerned, there is no better mobile instant messaging app available for the Blackberry.</li>
<li>Mig33 Messenger - I picked this up from <a href="http://mig33.com" target="_blank">mig33.com</a>.  Mig33 is a service that sells sms and international voip calls.  However, the messenger that you can download for free allows you to connect to AIM, MSN, GoogleTalk, and Yahoo.  I only use it for MSN because Google Talk is a better application and most of my contacts use it.  I keep mig33 around for my work contacts since we use MSN Messenger at work.</li>
<li>Beyond411 -You can pick this little app up from <a href="http://thebogles.com/blog/projects/berry411/" target="_blank">http://thebogles.com/blog/projects/berry411</a>.  This application is a virtual replacement for dialing 411 and paying the free every time you need a phone number.</li>
</ul>
<p>Thought I&#8217;d share.  Peace out.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2008/02/28/my-new-verizon-blackberry-8830/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C# Code to Help Identify a Computer</title>
		<link>http://joelpadot.com/2007/11/21/c-code-to-help-identify-a-computer/</link>
		<comments>http://joelpadot.com/2007/11/21/c-code-to-help-identify-a-computer/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 12:14:27 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2007/11/21/c-code-to-help-identify-a-computer/</guid>
		<description><![CDATA[A few weeks ago, I was looking over the shoulder of one of security analysts at work getting the low down on some of the stuff he does to help protect the PC&#8217;s on our network when he mentioned it would be nice to have an app that would identify a computer and their IP [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I was looking over the shoulder of one of security analysts at work getting the low down on some of the stuff he does to help protect the PC&#8217;s on our network when he mentioned it would be nice to have an app that would identify a computer and their IP address for the helpdesk and the network.  Immediately I thought, &#8220;give me a break.  We don&#8217;t already have access to something like that?&#8221;  He went on to explain that a previous employee said something like that couldn&#8217;t be created.  So, I accepted the challenge and discovered that it wasn&#8217;t much of a challenge at all.</p>
<p>First, lets look at what we needed to accomplish.  Presently, our helpdesk has to talk many users through the whole right-click on My Computer select properties, etc. thing.  Having worked helpdesk before, I know that repeating that 5 - 10 times a day gets old.  Secondly, we had no good way of getting a PC&#8217;s IP address quickly.</p>
<p>The solution&#8211;A small windows application that simply lists that information.</p>
<p>The Code:<br />
For this demonstration, you&#8217;ll need to include the following:</p>
<pre>using System.Security.Principal;

using System.Net;</pre>
<p>To reveal a computer&#8217;s name, the following code is all you need.</p>
<pre> string host = Dns.GetHostName();</pre>
<p>To grab the IP address of the computer we build off of the host name by doing the following:</p>
<pre>IPHostEntry ipHost = Dns.GetHostEntry(host);

IPAddress[] addy = ipHost.AddressList;

string ip = addy[0].ToString()</pre>
<p>And there you have it.  I took these four lines of code and made a quick little windows forms app so that all a user has to do is double click an icon on their PC and read the info to the helpdesk tech.</p>
<p>One thing to note&#8230;  Windows Vista will return the IPv6 IP using the method demonstrated above.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2007/11/21/c-code-to-help-identify-a-computer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Training and my Discovery</title>
		<link>http://joelpadot.com/2007/09/19/training-and-my-discovery/</link>
		<comments>http://joelpadot.com/2007/09/19/training-and-my-discovery/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 01:05:31 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2007/09/19/training-and-my-discovery/</guid>
		<description><![CDATA[How about that title for ambiguity?
Today I was in SQL Server Programming training.  I was attending the class, referred to as &#8220;mentored learning&#8221; where you sit behind a computer and watch instructional videos while being babysat by a person who makes a living scouring the content of various training courses so as to complete [...]]]></description>
			<content:encoded><![CDATA[<p>How about that title for ambiguity?</p>
<p>Today I was in SQL Server Programming training.  I was attending the class, referred to as &#8220;mentored learning&#8221; where you sit behind a computer and watch instructional videos while being babysat by a person who makes a living scouring the content of various training courses so as to complete certification tests in order to gain a reputable credential that will qualify him to instruct the course material in exchange for enough money to buy an A.S. degree, (love this sentence huh?), picking up some interesting information and filling the holes in my self-taught/on-the-job knowledge of SQL server programming when I had the urge to pause the monotoned recorded video and make a quick search for some good database ideas.  I stumbled upon a <a href="http://www.databaseanswers.org/data_models/index.htm" title="Free Data Models" target="_blank">library of free data models from databaseanswers.org</a>.  Please keep in mind that when I say &#8220;library,&#8221; I mean it.  There is a huge repository of practical and fun data models designed for various purposes.  It is definitely worth the bookmark.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2007/09/19/training-and-my-discovery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C# Snippet that Always has a Place in Business</title>
		<link>http://joelpadot.com/2007/09/07/c-snippet-that-always-has-a-place-in-business/</link>
		<comments>http://joelpadot.com/2007/09/07/c-snippet-that-always-has-a-place-in-business/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 11:33:01 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2007/09/07/c-snippet-that-always-has-a-place-in-business/</guid>
		<description><![CDATA[With a title so profound you probably think that this is going to be an enormously complicated little slice of code.  We&#8217;ll see&#8230;
In business one thing nearly every analyst type, accounting type and manager type needs to see quantitative data represented in table format.  Often times, they even want to manipulate that data [...]]]></description>
			<content:encoded><![CDATA[<p>With a title so profound you probably think that this is going to be an enormously complicated little slice of code.  We&#8217;ll see&#8230;</p>
<p>In business one thing nearly every analyst type, accounting type and manager type needs to see quantitative data represented in table format.  Often times, they even want to manipulate that data through their analysis of it.  As a developer, you must report data to the user (those types mentioned above) and how better to do that than to give them the ability to save a file off in Excel format containing the record set they need?  Enter my snippet&#8230;</p>
<pre>protected void ExcelExport()     {

	Response.Clear();
	Response.AddHeader("content-disposition",
		"attachment;filename=caberecsearch.xls");

        Response.Charset = "";
        Response.Cache.SetCacheability(HttpCacheability.Public);

	Response.ContentType = "application/vnd.xls";
	System.IO.StringWriter stringWrite =
		new System.IO.StringWriter();

	System.Web.UI.HtmlTextWriter htmlWrite =
		new HtmlTextWriter(stringWrite);

	// Set formatting to something Excel friendly

	GridView1.RowStyle.BackColor =
		System.Drawing.Color.WhiteSmoke;

	GridView1.RowStyle.HorizontalAlign =
		HorizontalAlign.NotSet;
        GridView1.RenderControl(htmlWrite);

        Response.Write(stringWrite.ToString());

        Response.End();    }

public override void VerifyRenderingInServerForm(Control control)    {

// Confirms that an HtmlForm control is rendered for the
// specified ASP.NET server control at run time.    }</pre>
<p>I guess its actually two methodes.  As of .Net 2.0 the VerifyRenderingInServerForm() override needs to be in there as well.</p>
<p>Often times, I find myself not using the GridView control to represent tabular data.  Working at a Section 508 compliant shop, we tend make a lot of our own xhtml rather than let .Net do it.  But, that doesn&#8217;t mean you can&#8217;t hide a gridview with this data and generate your excel file from it view a button to execute the above method.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2007/09/07/c-snippet-that-always-has-a-place-in-business/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ah, the move&#8230;</title>
		<link>http://joelpadot.com/2007/09/04/hello-world/</link>
		<comments>http://joelpadot.com/2007/09/04/hello-world/#comments</comments>
		<pubDate>Wed, 05 Sep 2007 03:18:12 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Greetings and welcome to joelpadot.com 2.2. whatever&#8230;  After more than a year since the release of the wordpress 2.x version blog software, I&#8217;ve finally made the upgrade from 1.5.  While I was at it, I also moved it to a different server.  Regardless, this little beauty will likely undergo numerous changes until I&#8217;ve got it [...]]]></description>
			<content:encoded><![CDATA[<p>Greetings and welcome to joelpadot.com 2.2. whatever&#8230;  After more than a year since the release of the wordpress 2.x version blog software, I&#8217;ve finally made the upgrade from 1.5.  While I was at it, I also moved it to a different server.  Regardless, this little beauty will likely undergo numerous changes until I&#8217;ve got it done up the way I want it.  Welcome and thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2007/09/04/hello-world/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Search is Cool!</title>
		<link>http://joelpadot.com/2007/08/29/search-is-cool/</link>
		<comments>http://joelpadot.com/2007/08/29/search-is-cool/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 09:51:39 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2007/08/29/search-is-cool/</guid>
		<description><![CDATA[Wow! Its been a long time&#8230;  I apologize for the hidas, I&#8217;ve been swamped with graduating college, starting a new job and chasing an ever increasingly mobile baby.  But, enough of that.  Today I&#8217;d like to talk about Search.
Over the last few months, I&#8217;ve found myself doing more and more database programming. [...]]]></description>
			<content:encoded><![CDATA[<p>Wow! Its been a long time&#8230;  I apologize for the hidas, I&#8217;ve been swamped with graduating college, starting a new job and chasing an ever increasingly mobile baby.  But, enough of that.  Today I&#8217;d like to talk about Search.</p>
<p>Over the last few months, I&#8217;ve found myself doing more and more database programming.  One thing I was challenged with was the development of a search engine for a very large project I&#8217;m involved in at work.  Having read on the subject before, I new immediately that I wanted to have an indexed search engine that used a porter stemming algorithm to stem words down to their natural form and then compare the stemmed version of each word in the query against a table that mapped words to their record ids (<a href="http://www.tartarus.org/martin/PorterStemmer/def.txt" target="_blank">more information on the porter stemmer algorithm</a>).</p>
<p>Long story short, I managed to make a pretty effective search engine built entirely using T-SQL.  Thankfully, the most time consuming part of the task was done for me by the <a href="http://www.tartarus.org/martin/PorterStemmer/" target="_blank">contributors of a T-SQL version of the porter algorithm at tartarus.org</a>.</p>
<p>After including the UDF&#8217;s (user-defined functions) provided via tartarus.org, I needed to index my content using the algorithm.  This was fairly simple.  I parsed each word in the record set I wanted to search and assigned each stemmed word an id and stored the stemmed word and its id in a table.  Next I created a mapping table that contained the record id and the word id.</p>
<p>Of course there are several words you don&#8217;t want to consider in the search.  I believe the official term for these words are &#8220;stop words.&#8221; I referred to them as &#8220;drop words&#8221; when building this little baby.  I created a table that contained words I want to ignore, like &#8220;I,&#8221; &#8220;me,&#8221; &#8220;they,&#8221; etc.  So, when indexing or searching any word appearing in my drop words table are excluded.</p>
<p>Now my index is in place. I need to search it.  I created a stored procedure that parses a search phrase and compares each stemmed word to the word index and constructed a tally of hits each word received.  Once all words were parsed, I count up the hits and return the results.</p>
<p>So far I have 5 successful implementations of this search engine.  I&#8217;ve modified it to include weighting criteria in one of those implementations and I also want to implement a word position constraint to match exact phrases to records and give them greater weight than simple hits, but that is for the future.  My intention is to port this to MySQL 5, but that will be a little work.  Once ported, I&#8217;ll probably show off some of the code.</p>
<p>Peace out&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2007/08/29/search-is-cool/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dear Portable Apps:  I love you.</title>
		<link>http://joelpadot.com/2007/05/15/dear-portable-apps-i-love-you/</link>
		<comments>http://joelpadot.com/2007/05/15/dear-portable-apps-i-love-you/#comments</comments>
		<pubDate>Tue, 15 May 2007 10:37:44 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[General Computers]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2007/05/15/dear-portable-apps-i-love-you/</guid>
		<description><![CDATA[Recently I&#8217;ve been on a quest to not only secure my data while I transport it from point A to point B, but also ways to transport useful applications that aren&#8217;t necessarily capable of being used over the web.  A web browser, for example.  I&#8217;ve found the solution I&#8217;ve been looking for.  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/images/appsmenu.png" target="_blannk"><img src="/images/appsmenu_sm.png" style="float:right; margin-left:10px;border:0px;" /></a>Recently I&#8217;ve been on a quest to not only secure my data while I transport it from point A to point B, but also ways to transport useful applications that aren&#8217;t necessarily capable of being used over the web.  A web browser, for example.  I&#8217;ve found the solution I&#8217;ve been looking for.  <a href="http://www.portableapps.com" target="_blank">PortableApps</a> is a package of portable applications that you can install to a USB flash drive, a compact flash card, or an portable mountable device.  I&#8217;m currently running it on a pocket 6GB Seagate hard drive.  It&#8217;s a real blessing.  The package comes with a mobile version of Firefox, Thunderbird, Open Office.org, your choice of messengers and others.  What makes this product even better is the fact that you can add other applications developed for PortableApps like Putty.  All-in-all, I consider this a great find and I&#8217;ve been using it for a couple of weeks now.<br />
<br />
But, how does this tie into my quest to secure the information I carry with me?  Once you install PortableApps, you can encrypt the device you&#8217;ve installed in using TrueCrypt and Boom!  You have your portable applications with all the settings you&#8217;ve saved, bookmarks you made, and email you&#8217;ve downloaded encrypted in and safe from the prying eyes of other.  Unfortunately, this is only for Windows, but since I use Windows at work, and on my Laptop, this is a very useful combination of products.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2007/05/15/dear-portable-apps-i-love-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TrueCrypt</title>
		<link>http://joelpadot.com/2007/04/29/truecrypt/</link>
		<comments>http://joelpadot.com/2007/04/29/truecrypt/#comments</comments>
		<pubDate>Sun, 29 Apr 2007 10:36:44 +0000</pubDate>
		<dc:creator>padotj</dc:creator>
		
		<category><![CDATA[General Computers]]></category>

		<guid isPermaLink="false">http://joelpadot.com/2007/05/17/truecrypt/</guid>
		<description><![CDATA[I lost my cell phone last week.  Unfortunately, I had a 2GB mini-SD card loaded with somewhere between 400 and 600 photos of my infant daughter and other less important, but nevertheless private, experiences.  In addition, I had a few notes that were for my eyes only.  I was unable to recover [...]]]></description>
			<content:encoded><![CDATA[<p>I lost my cell phone last week.  Unfortunately, I had a 2GB mini-SD card loaded with somewhere between 400 and 600 photos of my infant daughter and other less important, but nevertheless private, experiences.  In addition, I had a few notes that were for my eyes only.  I was unable to recover my lost phone, and was forced to file an insurance claim to have it replaced.</p>
<p>I bring this whole thing up because I also carry around portable storage devices that tend to also store sensitive information.  I never worried about it because they were always on my person.  The reality is that you will probably lose a portable storage device.  And Murphy states that you will lose it at the worst possible time.  With this truth in mind, I went searching for a method to protect my crap in the event I lose a portable hard drive or flash drive.</p>
<p>As you may have guessed I did, in fact, find something worth while.  <a href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a>.  What I like about TrueCrypt is that it will encrypt partitions, entire devices, or even create encrypted files that mount as partitions.  I&#8217;ve put these features tot he test and I must admit that I&#8217;m happy with this utility.  At present, I have a portable device storing my mp3&#8217;s, documents, project files and photos.  I encrypted the device and back its data up to an truecrypt file so that If I lose it, I can copy the file over to a replacement, or encrypt the device itself and copy the data from my mounted backup file.  The possibilities for protecting your privacy are endless.</p>
]]></content:encoded>
			<wfw:commentRss>http://joelpadot.com/2007/04/29/truecrypt/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
