<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>YankeeDeuce.com &#187; coding</title>
	<atom:link href="http://yankeedeuce.com/tag/coding/feed" rel="self" type="application/rss+xml" />
	<link>http://yankeedeuce.com</link>
	<description>–·–– ·– –· –·– · · –·· · ··– –·–· ·</description>
	<lastBuildDate>Sat, 28 Aug 2010 14:50:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Hello World!</title>
		<link>http://yankeedeuce.com/news/hello-world.html</link>
		<comments>http://yankeedeuce.com/news/hello-world.html#comments</comments>
		<pubDate>Sat, 03 Mar 2007 16:25:49 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[straferight]]></category>

		<guid isPermaLink="false">http://dev.yankeedeuce.com/?p=315</guid>
		<description><![CDATA[<p>Teck posted this over on strafeRight and I thought it was pretty good, so I'm putting it here as well. It is a funny look at how people code "Hello World" depending on their age and job. You can find the original article on GNU.org (http://www.gnu.org/fun/jokes/helloworld.html). Read more to see some of the ways people print Hello World.</p>]]></description>
			<content:encoded><![CDATA[<p>Teck posted this over on strafeRight and I thought it was pretty good, so I&#8217;m putting it here as well. It is a funny look at how people code &#8220;Hello World&#8221; depending on their age and job. You can find the original article on GNU.org (http://www.gnu.org/fun/jokes/helloworld.html). </p>
<p></pre>
<h4>High School/Jr.High</h4>
<pre>
 10 PRINT &quot;HELLO WORLD&quot;
 20 END
</pre>
<h4>First year in College</h4>
<pre>
 program Hello(input, output)
 begin
 writeln(&#x27;Hello World&#x27;)
 end.
</pre>
<h4>Senior year in College</h4>
<pre>
 (defun hello
 (print
 (cons &#x27;Hello (list &#x27;World))))
</pre>
<h4>New professional</h4>
<pre>
 #include &lt;stdio.h&gt;

 void main(void)
 {
  char *message[] = {&quot;Hello &quot;, &quot;World&quot;};
  int i;
  for(i = 0; i &lt; 2; ++i)
  printf(&quot;%s&quot;, message[i]);
  printf(&quot;\n&quot;);
 }
</pre>
<h4>Seasoned professional</h4>
<pre>
 #include &lt;iostream.h&gt;
 #include &lt;string.h&gt;
 class string
 {
  private:
   int size;
   char *ptr;
  public:
   string() : size(0), ptr(new char(&#x27;\0&#x27;)) {}
   string(const string &amp;s) : size(s.size)
   {
     ptr = new char[size + 1];
     strcpy(ptr, s.ptr);
   }
   ~string()
   {
     delete [] ptr;
   }
   friend ostream &amp;operator &lt;&lt;(ostream &amp;, const string &amp;);
   string &amp;operator=(const char *);
 };

 ostream &amp;operator&lt;&lt;(ostream &amp;stream, const string &amp;s)
 {
   return(stream &lt;&lt; s.ptr);
 }
 string &amp;string::operator=(const char *chrs)
 {
   if (this != &amp;chrs)
   {
     delete [] ptr;
     size = strlen(chrs);
     ptr = new char[size + 1];
     strcpy(ptr, chrs);
   }
   return(*this);
 }
 int main()
 {
   string str;
   str = &quot;Hello World&quot;;
   cout &lt;&lt; str &lt;&lt; endl;
   return(0);
 }
</pre>
<h4>System Administrator</h4>
<pre>
 #include &lt;stdio.h&gt;
 #include &lt;stdlib.h&gt;
 main()
 {
  char *tmp;
  int i=0;
  /* on y va bourin */
  tmp=(char *)malloc(1024*sizeof(char));
  while (tmp[i]=&quot;Hello Wolrd&quot;[i++]);
  /* Ooopps y&#x27;a une infusion ! */
  i=(int)tmp[8];
  tmp[8]=tmp[9];
  tmp[9]=(char)i;
  printf(&quot;%s\n&quot;,tmp);
 }
</pre>
<h4>Apprentice Hacker</h4>
<pre>
 #!/usr/local/bin/perl
 $msg=&quot;Hello, world.\n&quot;;
 if ($#ARGV &gt;= 0) {
     while(defined($arg=shift(@ARGV))) {
         $outfilename = $arg;
         open(FILE, &quot;&gt;&quot; . $outfilename) || die &quot;Can&#x27;t write $arg: $!\n&quot;;
         print (FILE $msg);
         close(FILE) || die &quot;Can&#x27;t close $arg: $!\n&quot;;
     }
 } else {
     print ($msg);
 }
 1;
</pre>
<h4>Experienced Hacker</h4>
<pre>
 #include &lt;stdio.h&gt;
 #include &lt;string.h&gt;
 #define S &quot;Hello, World\n&quot;
 main(){exit(printf(S) == strlen(S) ? 0 : 1);}
</pre>
<h4>Seasoned Hacker</h4>
<pre>
 % cc -o a.out ~/src/misc/hw/hw.c
 % a.out
 Hello, world.
</pre>
<h4>Guru Hacker</h4>
<pre>
 % cat
 Hello, world.
</pre>
<h4>New Manager (do you remember?)</h4>
<pre>
 10 PRINT &quot;HELLO WORLD&quot;
 20 END
</pre>
<h4>Middle Manager</h4>
<pre>
 mail -s &quot;Hello, world.&quot; bob@b12
 Bob, could you please write me a program that prints &quot;Hello, world.&quot;?
 I need it by tomorrow.
 ^D
</pre>
<h4>Senior Manager</h4>
<pre>
 % zmail jim
 I need a &quot;Hello, world.&quot; program by this afternoon.
</pre>
<h4>Chief Executive</h4>
<pre>
% letter
 letter: Command not found.
 % mail
 To: ^X ^F ^C
 % help mail
 help: Command not found.
 % damn!
 !: Event unrecognized
 % logout
</pre>
<h4>Research Scientist</h4>
<pre>
        PROGRAM HELLO
	PRINT *, &#x27;Hello World&#x27;
	END
</pre>
<h4>Older research Scientist</h4>
<pre>
	WRITE (6, 100)
    100 FORMAT (1H ,11HHELLO WORLD)
	CALL EXIT
	END
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yankeedeuce.com/news/hello-world.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search Engine Plugins</title>
		<link>http://yankeedeuce.com/news/search-engine-plugins.html</link>
		<comments>http://yankeedeuce.com/news/search-engine-plugins.html#comments</comments>
		<pubDate>Tue, 13 Feb 2007 01:31:17 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://dev.yankeedeuce.com/?p=318</guid>
		<description><![CDATA[<p> I'm sure most of you know about the integrated search bars in Firefox and IE7 - Just select the search engine you want to use and enter your search. You can also create new plugins for any site you want. For example, right now I have Notebookforums, strafeRight forums, 5 different STEAMID lookup searches, YouTube, and a couple more to go along with Google and the other default engines.</p>]]></description>
			<content:encoded><![CDATA[<p> I&#8217;m sure most of you know about the integrated search bars in Firefox and IE7 &#8211; Just select the search engine you want to use and enter your search. You can also create new plugins for any site you want. For example, right now I have Notebookforums, strafeRight forums, 5 different STEAMID lookup searches, YouTube, and a couple more to go along with Google and the other default engines.</p>
<p> Both browsers take advantage of the OpenSearch format to create the plugins. OpenSearch plugins are simple to create and use. You can either use the search string from the actual site you want, or you can use Google and make it only search the site you want. I prefer using the actual site that I want to look at. If you have your own site you can use autodiscovery so everyone can use your plugin. When you set up the autodiscovery, when you go to your site it will have <strong>Add &quot;Your Search Here&quot;</strong>   below your other plugins in the search drop down box. Just select it and you are ready to go.</p>
<p> I got started working with OpenSearch when someone on Notebookforums wanted to search a site. I decided to give it a try and it worked, so I made a few other ones. They are easy to create once you have done a few, and even easier if you have a basic template to start from. The last plugin I created was to look up STEAMID&#8217;s from CAL, ESEA, and a few other sites. Here is an example of what the CAL Search plugin looks like:</p>
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;OpenSearchDescription xmlns=&quot;http://a9.com/-/spec/opensearch/1.1/&quot;&gt;
&lt;ShortName&gt;CAL SteamID&lt;/ShortName&gt;
&lt;Image width=&quot;16&quot; height=&quot;16&quot; type=&quot;image/x-icon&quot;&gt;http://www.caleague.com/favicon.ico&lt;/Image&gt;
&lt;InputEncoding&gt;UTF-8&lt;/InputEncoding&gt;
&lt;Url type=&quot;text/html&quot; template=&quot;http://caleague.com/?page=history&amp;type=roster&amp;uniqueid={searchTerms}&quot; /&gt;
&lt;/OpenSearchDescription&gt;</pre>
<p> When you select the CAL STEAMID search and enter your query, it will replace <span style="font-family: 'courier new', courier">     {searchTerms}</span> with whatever you entered, for example 0:1:3219890, bringing you to the CAL page showing you my STEAMID history. There are quite a bit more options and features you can use, but for the basics this will work. (I use a base64 encoded string for the icon image, however I don&#8217;t want to break the page, so I entered it this way.) To use your plugin you&#8217;ll need to upload it to your site and add the following to your template header:</p>
<pre>&lt;link rel=&quot;search&quot; href=&quot;CAL-Search.xml&quot; title=&quot;CAL STEAMID&quot;
type=&quot;application/opensearchdescription+xml&quot; /&gt;</pre>
<p> Now when you navigate to your page it will find you search plugin and you are able to add it from the drop down list.</p>
<p> If you have a site that you want a search made for, let me know and I&#8217;ll make one for you when I have a few minutes to spare. Or if you make your own but do not have any webspace, I&#8217;ll host it on mine for you and others to use. For more information head over to the <a href="http://www.opensearch.org/">OpenSearch home page</a>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://yankeedeuce.com/news/search-engine-plugins.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
