<?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>Prodigy Productions, LLC</title>
	<atom:link href="http://www.prodigyproductionsllc.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.prodigyproductionsllc.com</link>
	<description>Learn software development, computer vision, and A.I. programming.</description>
	<lastBuildDate>Sat, 19 May 2012 05:05:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Learn Computer Vision Website</title>
		<link>http://www.prodigyproductionsllc.com/articles/misc/learn-computer-vision-website/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/misc/learn-computer-vision-website/#comments</comments>
		<pubDate>Sat, 19 May 2012 05:05:12 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2471</guid>
		<description><![CDATA[As I&#8217;ve mentioned before, my posts about computer vision are the most viewed articles on this site. Not a day goes by that I don&#8217;t receive 20+ emails asking for more information about computer vision. Even though the majority of the computer vision articles on this site discuss OpenCV only, there are all kinds of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/05/computer_vision_opencv_eye_tracker.jpg"><img class="alignleft  wp-image-2472" title="computer_vision_opencv_eye_tracker" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/05/computer_vision_opencv_eye_tracker.jpg" alt="Computer Vision - OpenCV Eye Tracker" width="141" height="110" /></a>As I&#8217;ve mentioned before, my posts about computer vision are the most viewed articles on this site. Not a day goes by that I don&#8217;t receive 20+ emails asking for more information about computer vision. Even though the majority of the computer vision articles on this site discuss OpenCV only, there are all kinds of other frameworks that augment computer vision development. There are also all kinds of other topics under the science of &#8220;computer vision&#8221; that I don&#8217;t discuss on this site. Therefore, I have decided to put together another website that will be completely dedicated to the science of computer vision and all that it has to offer. Currently, I only have articles that I have copied from this site. But, at some point, the new site will be where I post all things computer vision related. The new site does not currently allow for comments or new user registrations. But, that too will soon follow. For now, I just wanted to mention the new site so that everyone will know of its existence and hopefully provide some feedback about it. If you have anything related to computer vision you would like to get posted on the site, feel free to send it to me through the contact page on the site and I&#8217;ll see that it gets posted. Once I get the site setup for others to join, you&#8217;ll be able to post your own articles, ask questions, and begin discussions. Until then, I would like to introduce to you <a title="Learn Computer Vision" href="http://www.learncomputervision.com" target="_blank">LearnComputerVision.com</a> (<a title="Learn Computer Vision" href="http://www.learncomputervision.com" target="_blank">http://www.learncomputervision.com</a>)!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/misc/learn-computer-vision-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hype Mini Wireless Bluetooth Keyboard Review</title>
		<link>http://www.prodigyproductionsllc.com/articles/reviews/hype-mini-wireless-bluetooth-keyboard-review/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/reviews/hype-mini-wireless-bluetooth-keyboard-review/#comments</comments>
		<pubDate>Wed, 16 May 2012 05:05:47 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2465</guid>
		<description><![CDATA[I want to take a few minutes to talk about a new toy I recently bought. It&#8217;s a miniature wireless bluetooth keyboard that works with iPad, iPhone, Android cellphones and tablets, Windows Mobile, Symbian, and other devices that allow input from a bluetooth device. I came across this little guy on one of those daily [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Hype Mini Wireless Bluetooth Keyboard" href="http://www.amazon.com/gp/product/B0043862N4/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0043862N4" target="_blank"><img class="alignleft  wp-image-2466" title="hype_mini_bluetooth_keyboard" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/05/hype_mini_bluetooth_keyboard.jpg" alt="Hype Mini Wireless Bluetooth Keyboard" width="124" height="100" /></a>I want to take a few minutes to talk about a new toy I recently bought. It&#8217;s a <a title="Hype Mini Wireless Bluetooth Keyboard" href="http://www.amazon.com/gp/product/B0043862N4/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0043862N4" target="_blank">miniature wireless bluetooth keyboard</a> that works with iPad, iPhone, Android cellphones and tablets, Windows Mobile, Symbian, and other devices that allow input from a bluetooth device. I came across this little guy on one of those daily deal sites and decided to pick one up to see what it was about. The form factor is amazing. It&#8217;s a little smaller than my Droid Razr and a lot lighter. It has a keyboard with almost every key you can imagine. The only keys it doesn&#8217;t have are F1 &#8211; F12. However, it does provide a function &#8220;Fn&#8221; key that allows you to access other keys such as volume controls and playback controls (play, pause, stop, fastforward, rewind).</p>
<p><span id="more-2465"></span>As soon as I got mine, I pulled out the instruction manual and attempted to connect the <a title="Hype Mini Wireless Bluetooth Keyboard" href="http://www.amazon.com/gp/product/B0043862N4/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0043862N4" target="_blank">Hype</a> to my Droid Razr. Even though the instructions seemed straightforward, the instructions turned out to be horrible. The manual left out several steps that I had to figure out on my own. For example, the instructions say to go into Settings on the Android device, search for the <a title="Hype Mini Wireless Bluetooth Keyboard" href="http://www.amazon.com/gp/product/B0043862N4/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0043862N4" target="_blank">Hype</a>, and pair it by entering &#8220;0000&#8243; for the PIN when prompted. However, it failed to mention that immediately after you do that, you have to also type the same PIN on the keyboard. It took me several attempts to pair the devices before I figured this out.</p>
<p>Before you can pair the devices, you&#8217;ll need to press &amp; hold a small hidden button that is just above the &#8220;9&#8243; key. Only hold it for about a second. After you do that, a blue LED will begin to blink to the left of that button. This flashing light indicates that the keyboard is broadcasting its existence so that other devices can &#8220;see&#8221; it. As soon as you tell your other device to pair with the keyboard, this blue LED will turn off and your other device should indicate that the 2 are paired and connected.</p>
<p>The box for this keyboard includes a CD that contains applications that can be loaded onto Android, iPhone, iPad, and Windows Mobile. However, I never could get the app to work with my Droid Razr. To install it, you have to get the Android.apk file onto the SD card or internal storage of your device. I went with the approach of plugging my cellphone into my laptop via USB so that the storage devices in my cellphone would mount as drives, leaving me the ability to drag and drop the Android.apk file onto the SD card inside my cellphone. Once I had it on the device, all I had to do was click the app and the installer began.</p>
<p>After the installer completed, I tried to run the app. As soon as I run the app, I&#8217;m shown a message that says &#8220;To use this software, you must activate it. Activation is free, and must be done only once, but it requires an internet connection. Activate now?&#8221; Even though I have 4G &amp; WiFi and they are both connected, the activation always fails with the message &#8220;Activation failed. Please retry before using this software. Application will now close.&#8221; And, the application does indeed close every time I close the error message.</p>
<p>I never have been able to get the included software to work. But, that&#8217;s ok! The device still works even without the included software. I&#8217;ve paired the keyboard with my Droid Razr, iPad, my laptop, and a few of my different Android tablets and it&#8217;s worked great with all of them. It makes typing on things like cellphones and tablets a whole lot simpler than trying to type using the virtual keyboards on screen. I come from a long history of using Blackberries. So, moving to a touchscreen only keyboard is a pain. But, this little device has given me back the ability to type out emails, text messages, and even online articles with ease.</p>
<p>The battery life on this thing is amazing! According to the box (and other reviews I&#8217;ve read online), the keyboard contains a rechargable polymer li-on battery that provides around 560 hours of stand-by time and 45 hours of uninterrupted working time.</p>
<p>The range on the bluetooth seems to be fairly good as well. During my testing, I was able to stand almost 25ft away from my cellphone and the keyboard could still communicate with it just like I had the cellphone in my hand. Granted this was line-of-sight, it&#8217;s still possible that it can reach a little further. But, the bluetooth spec itself doesn&#8217;t allow for too far of a distance. That&#8217;s why I stopped testing at the 25ft mark. The box indicates the device works up to 30ft (10M).</p>
<p>All in all, I am extremely satisfied with my new <a title="Hype Mini Wireless Bluetooth Keyboard" href="http://www.amazon.com/gp/product/B0043862N4/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0043862N4" target="_blank">Hype mini wireless bluetooth keyboard</a>. If you&#8217;re interested in something that can help you type a little easier on your cellphone and / or tablets, I would definitely recommend picking up one of these little guys to take for a spin. Right now, you can snag one from Amazon for about $6.39. Not a bad price for something so cool. So, click the link below and pick one up from Amazon for yourself or for someone else. I&#8217;m already ordering a few of these guys to hand out as quick, easy gifts and stocking stuffers at Christmas.</p>
<div style="text-align: center;">
<iframe src="http://rcm.amazon.com/e/cm?t=proprollc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B0043862N4&#038;ref=qf_sp_asin_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0088CC&#038;bc1=FFFFFF&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/reviews/hype-mini-wireless-bluetooth-keyboard-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Similarities and Differences between PHP &amp; Ruby</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/similarities-and-differences-between-php-ruby/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/similarities-and-differences-between-php-ruby/#comments</comments>
		<pubDate>Mon, 14 May 2012 22:58:47 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2454</guid>
		<description><![CDATA[Basic Comparison PHP is a server-side programming language, used for creating dynamic web applications. It was released in the year 1994. In the present world enormous numbers of websites are developed on PHP. PHP is usually written inside an HTML page, but with *.php extension. Ruby was invented one year before PHP, i.e. in the [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/05/guest_post.jpg"><img class="wp-image-2457 alignright" title="Guest Post" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/05/guest_post.jpg" alt="Guest Post" width="121" height="90" /></a>Basic Comparison</strong><br />
PHP is a server-side programming language, used for creating dynamic web applications. It was released in the year 1994. In the present world enormous numbers of websites are developed on PHP. PHP is usually written inside an HTML page, but with *.php extension.</p>
<p>Ruby was invented one year before PHP, i.e. in the year 1993, but it was officially launched in the year 2005. The main target behind this invention was to create a new language which is stronger than Perl and based on Object Oriented Programming even more than Python. But Ruby is not currently a standalone language; it is tied with Rail Framework.</p>
<p><span id="more-2454"></span></p>
<p>In reality there is not any clear comparison between PHP and Ruby, as they are extremely useful in their own way with their own environment.</p>
<p>PHP is also a standalone Language, where Ruby relies with Rail Framework to perform. But in case of PHP with added Framework like CakePHP, brings them in a fair soil of comparison. In this scenario we can compare between these two languages.</p>
<p><strong>In Terms of Performance</strong><br />
In term of the processing speed PHP is faster than Ruby. It is said that three lines of Ruby code runs slower than ten lines of PHP code. But in other point of view speed does not always give a complete overview of a language. Ruby can perform similar job with fewer code than PHP, and that means less chances of bugs.</p>
<p><strong>In Terms of OOP</strong><br />
Ruby is totally object oriented language. In this programming environment developers can implement more powerful object oriented application. PHP also supports Object Oriented Programming concept, but it is not solely dependent on that. That means developers can use PHP to write their server-side scripting without implementing the object-class concept.</p>
<p><strong>In Term of Data Structure</strong><br />
In every data structure sequential data storage is extremely crucial. In these two languages there is a very significant difference in case implementing Arrays. In Ruby every Array starts from 0 Index. But is PHP there are no hard-bound rules for it. In PHP Array index can be anything. An Array can also hold only two data with index [2] &amp; [4]. And is can be retrieved by simple for each loop. But is Ruby Array must start with [0] and continues up to highest index?</p>
<p><strong>Server Support</strong><br />
The main advantage of PHP is its server support. PHP application can be hosted in any LAMP (Linux, Apache, MySQL, and PHP) server. Developers can also host their testing application in their local host. But Ruby application needs Rail Framework for processing Ruby Code. And it is not that cheaper like PHP. Ruby claims that every cPanel Hosting can host Ruby, but in reality very few cPanel Hosting server support Ruby and equipped with Rail 3.x.</p>
<p>Every language has its own specialty. Practically they differ from each other in various aspects. They may also share remarkably similar concepts. PHP and Ruby both are extremely powerful programming language for developing server-side programs or applications. They have many similarities, and also much variation. But in a practical scenario they both are immensely useful in their own aspects. PHP can be more useful than Ruby in any special situation and on the other hand Ruby may overpower PHP in its own domain.</p>
<p><em>About the author: Brianne is a blogger by profession. She loves writing on technology. Beside this she is fond of blogging. Recently an article on <a href="http://www.gizmowatch.com/nikon-d3x.html" target="_blank">gizmo watch</a> attracted her attention. These days she is busy in writing an article on <a href="http://www.cellphonebeat.com/samsung-c3011.html" target="_blank">cellphone</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/similarities-and-differences-between-php-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Your Own Programming Language</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/create-your-own-programming-language/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/create-your-own-programming-language/#comments</comments>
		<pubDate>Fri, 04 May 2012 18:07:22 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2445</guid>
		<description><![CDATA[I have something to share with you that you are going to love! Have you ever wondered what it would take to create your own programming language? Most people that have asked that question have usually given up on the idea of creating their own programming language because they believe it&#8217;s going to be way [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank"><img class="alignleft size-full wp-image-2446" title="create_your_own_programming_language" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/05/create_your_own_programming_language.png" alt="How to create your own freaking awesome programming language" width="131" height="169" /></a>I have something to share with you that you are going to love! Have you ever wondered what it would take to create your own programming language? Most people that have asked that question have usually given up on the idea of creating their own programming language because they believe it&#8217;s going to be way too hard or involve way too much programming. But, believe it or not, it&#8217;s actually really simple to do thanks to a great programmer named Marc-Andre Cournoyer. Marc-Andre has put together an amazing <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> for anyone that wants to create their own programming language or for anyone that wants to better understand how programming languages work. Unlike most of the stuff on my website, this <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> is not free. However, it is <em>DEFINITELY</em> worth the $17.95.</p>
<p>The <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> walks you through everything you need to know about creating your own programming language. It covers everything from creating parsers to interpreters. Heck, it even shows you how to build your own compiler. All of the example code in the <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> is written in Python, making it extremely easy to follow along. Since this is a digital download, it also includes all of the source code from the <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> including the new programming language you will create through each step of the book which Marc-Andre calls the &#8220;Awesome&#8221; programming language. Awesome is a mix of Ruby syntax and Python&#8217;s indentation.</p>
<p>So, if you&#8217;re interested in creating your own programming language, want a better understanding of programming languages, or just want a nice little read, you should seriously buy a copy of this <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a>. The download includes the <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> in the following formats: epub, mobi, pdf. By the way, this <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> is what inspired Jeremy Ashkenas to create CoffeeScript. Pickup your copy of &#8220;<a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">How to Create Your Own Freaking Awesome Programming Language</a>&#8220; <a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">ebook</a> now!!!</p>
<p><a title="Create your own programming language" href="http://ed7438z-zf5mbt3jl3u2s47ne0.hop.clickbank.net/" target="_blank">Purchase Now!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/create-your-own-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started with OpenCV and Python</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/getting-started-with-opencv-and-python/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/getting-started-with-opencv-and-python/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 20:16:15 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[OpenCV]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2434</guid>
		<description><![CDATA[Over the last several months, I have shown you all kinds of cool ways you can use OpenCV with C# to create some really cool applications. Today, at the request of a reader, I want to begin showing you how to create applications using OpenCV and Python. If you&#8217;ve ever taken a look at the [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/python_logo.jpg"><img class="alignleft  wp-image-2438" title="python_logo" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/python_logo.jpg" alt="Python Logo" width="102" height="101" /></a>Over the last several months, I have shown you all kinds of cool ways you can use OpenCV with C# to create some really cool applications. Today, at the request of a reader, I want to begin showing you how to create applications using OpenCV and Python. If you&#8217;ve ever taken a look at the OpenCV documentation with Python, you will know that it&#8217;s lacking in many ways. So, I want to take a few minutes and give you a crash course with getting OpenCV and Python to play nicely. Let&#8217;s begin.</p>
<p><span id="more-2434"></span>Before working with OpenCV and Python, you have an extra Python library you&#8217;ll need to download and install if you don&#8217;t have it already. I&#8217;m talking about &#8220;Numerical Python&#8221; or &#8220;NumPy&#8221; as it&#8217;s more commonly known. If you already have NumPy installed, make sure you are running at least version 1.6 as that is what our version of OpenCV for Python was compiled against. If you</p>
<p>don&#8217;t already have NumPy, open a browser and head over to <a title="Python NumPy" href="http://sourceforge.net/projects/numpy/files/NumPy/1.6.1rc3/" target="_blank">http://sourceforge.net/projects/numpy/files/NumPy/1.6.1rc3/</a>. There you will find a list of downloads for numpy-1.6. Since I&#8217;m running on 32bit Windows and using Python 2.7, I will be downloading numpy-1.6.1rc3-win32-superpack-python2.7.exe. Once you have downloaded NumPy, double-click the installer and follow the instruction screens. Note: You can usually keep clicking the Next button to fly right thru the installer.</p>
<p>After you have installed NumPy, you are ready to begin playing with OpenCV and Python. If you don&#8217;t already have OpenCV installed, you can find links to download it from my new website <a title="Learn Computer Vision" href="http://www.learncomputervision.com/resources/" target="_blank">http://www.learncomputervision.com/resources/</a>. Again, since we&#8217;re working with Windows, we will click the Windows link under OpenCV at the &#8220;Learn Computer Vision&#8221; website and that take us to a page on SourceForge where we can click to download OpenCV. However, if you do not want to download and install OpenCV at this time, it&#8217;s not required for this example to work. Besides, the current version of OpenCV is 214MB. So, it will take some time to download. If you choose not to install OpenCV at this time, make sure you download the zipped example at the end of this article as it contains the required OpenCV binary for Python.</p>
<p>Now that you have everything you need to use OpenCV with Python, it&#8217;s time to write some code. For this example, we are going to keep it very simple by demonstrating how to capture video from a standard webcam and display it in a window. To do that, we begin by adding a reference to the OpenCV binary that&#8217;s included with the zipped example at the end of this article.</p>
<p><span style="color: #ff6600;">import</span> cv2.cv <span style="color: #ff6600;">as</span> cv</p>
<p>Next, we need to setup our capture device by calling the &#8220;CaptureFromCAM&#8221; function in our cv2 library. The parameter passed is the index for the camera you will be capturing video from. This is helpful when you have multiple cameras connected to the same computer you&#8217;ll be running your application from. In my case, I only have 1 camera attached. So, I simply pass 0 (zero) as my parameter.</p>
<p>cap = cv.CaptureFromCAM(0)</p>
<p>The next thing we need to do is to tell OpenCV that we want a window created. For that, we will call the &#8220;NamedWindow&#8221; function and pass it a reference name and some flags that tell our window how to behave. As you can see below, I&#8217;m passing 1 (one) as my second parameter which tells my window to act as a normal window with normal behavior and size.</p>
<p>cv.NamedWindow(<span style="color: #008000;">&#8220;Camera&#8221;</span>, 1)</p>
<p>Now you&#8217;re ready to begin capturing video from your camera and display it in the window you just created. For that, you will need to create an endless loop. Why an endless loop? Well, in order for OpenCV to have the opportunity to process your video feed, each frame of the video needs to be captured and passed one frame at a time. Most readers think that OpenCV processes video in its entirety. But, like I said, it doesn&#8217;t work that way. Video processing is done one frame at a time. That&#8217;s why we need our endless loop.</p>
<p>However, what happens when you want the app to stop capturing frames from your video and exit? For that, we will tell OpenCV to listen for the Escape key to be pressed. Once the Escape key has been detected, OpenCV will stop capturing your video and will exit from the endless while-loop. Once you&#8217;re outside of the while-loop, you will need to tell OpenCV to close all windows that were created within the scope of your app.</p>
<p>Here is the complete code that makes all of this possible.</p>
<p><pre class="brush: python">import cv2.cv as cv

cap = cv.CaptureFromCAM(0)
cv.NamedWindow(&quot;Camera&quot;, 1)

while True:
    img = cv.QueryFrame(cap)
    cv.ShowImage(&quot;Camera&quot;, img)
    if cv.WaitKey(10) == 27:
        break
cv.DestroyAllWindows()
</pre></p>
<p>You can download this example, including the compiled OpenCV binary from <a href="http://www.prodigyproductionsllc.com/downloads/pyhon_camera_opencv.zip" title="Python OpenCV Camera" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/getting-started-with-opencv-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiprocessing Bug with Windows and Python Idle</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/multiprocessing-bug-with-windows-and-python-idle/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/multiprocessing-bug-with-windows-and-python-idle/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 05:06:25 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2428</guid>
		<description><![CDATA[Recently, a reader wrote in about a problem they were having with Multiprocessing in Windows and Python. Since I&#8217;ve actually had this come up several times before, I decided I would go ahead and write a quick explanation about it for others that might have the same problem. If you&#8217;ve ever done any kind of [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/02/python_logo.jpg"><img class="alignleft  wp-image-1326" title="python_logo" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/02/python_logo.jpg" alt="Python Programming Language" width="92" height="91" /></a>Recently, a reader wrote in about a problem they were having with Multiprocessing in Windows and Python. Since I&#8217;ve actually had this come up several times before, I decided I would go ahead and write a quick explanation about it for others that might have the same problem.</p>
<p><span id="more-2428"></span>If you&#8217;ve ever done any kind of parallel programming, you will know that it is especially easy to do with Python. All you have to do is define a function you want to handle some work and pass that function to the multiprocessing.Process method. Here is a quick example:</p>
<p><pre class="brush: python">from multiprocessing import Process

def child(i):
    print &quot;Child:&quot;, i

if __name__ == '__main__':
    for i in range(0, 5):
        p = Process(target = child, args = (i,))
        p.start()
        p.join()</pre></p>
<p>This code works exactly as it should. When ran, 5 new instances of &#8220;pythonw.exe&#8221; get spawned where each new instance prints &#8220;Child: X&#8221; where &#8220;X&#8221; is the instance number passed in as a parameter. However, if you run this code from Idle on Windows, nothing gets printed to the screen. It looks like the code is not working, but in reality it is. The reason nothing gets printed in Idle is because each instance gets spawned inside a new process (pythonw.exe). Since your console is attached to your currently running instance of Idle, the &#8220;Child: X&#8221; message gets printed on each of the hidden instances which you cannot see.</p>
<p>To test this code, you will need to run the application from a command prompt instead from inside Idle. So, go ahead and click on Start &gt; Run and type &#8220;cmd&#8221; and click the &#8220;OK&#8221; button. This will launch a new command prompt. Use the &#8220;cd&#8221; command to change directory into the directory that contains your Python script. Once there, type the name of your Python script and press enter. You should now see something like this:</p>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/python_multiprocessing_test.jpg"><img class="aligncenter size-full wp-image-2429" title="python_multiprocessing_test" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/python_multiprocessing_test.jpg" alt="Python Multiprocessing Test" width="509" height="76" /></a></p>
<p>That&#8217;s it. If you see something like above, then you have now successfully created a simple multiprocessing application using Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/multiprocessing-bug-with-windows-and-python-idle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let Me Rant</title>
		<link>http://www.prodigyproductionsllc.com/articles/general/let-me-rant/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/general/let-me-rant/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 12:24:22 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2422</guid>
		<description><![CDATA[If you know me in real life, you know that I hate stupid people. You also know that I hate pushy sales people. For example, a few years ago, I was walking into a restaurant for dinner when a salesman from a car dealership across the road came running up behind me in the parking [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/salesman.jpg"><img class="alignleft  wp-image-2423" title="salesman" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/salesman.jpg" alt="Salesman" width="131" height="103" /></a>If you know me in real life, you know that I hate stupid people. You also know that I hate pushy sales people. For example, a few years ago, I was walking into a restaurant for dinner when a salesman from a car dealership across the road came running up behind me in the parking lot. He introduced himself as, we&#8217;ll call him Bob, and immediately began asking me questions about my truck. In case you didn&#8217;t already know, I drive a Chevy Avalanche. Anyways, at the time, I had only had my truck for a couple of weeks. The sales guy started asking me if I like my truck and if I got it for a good price. At first, I thought this was just some guy that was also eating at the same restaurant and was genuinely interested in my truck. But, I was starving and quickly informed the guy that he was stopping me from eating. If he wanted to know more about my truck, I told him there was a Chevrolet dealership directly across the road and he could go there for more answers. That&#8217;s when the guy explained to me that he was a salesman from the dealership across the road. WTF?!?</p>
<p><span id="more-2422"></span>I told the guy again that I was hungry and that I wasn&#8217;t interested in anything he had to say. He kept insisting that I should give him a few minutes of my time. He said if I would step over to his car lot, he could show me all kinds of good deals and that he could accept my brand new truck as a trade-in on anything he had on the lot. I told him to get lost and proceeded to head into the restaurant. That&#8217;s when he really pushed me over the edge. The sales guy felt that I had invited him to come inside and join me for dinner. I NEVER said or did a thing to give him this idea. Apparently, this guy was messed up in the head and desperate for a sale. Having just bought a brand new truck only weeks before this, I was not interested in anything he had to offer. Again, I told the guy to get lost. He was pretty much begging me to stop by his dealership after I ate dinner. I eventually had to tell the guy to go back across the road before I drop-kicked him back across the road.</p>
<p>I am now in the market for a new truck. But, because of my experience with that annoying sales guy, I will not be buying my truck from that dealership. Plus, I&#8217;ve even shared my story with others who also have chosen not to purchase from there as well. That one ass hole has cost his dealership a lot of money and I hope that he no longer works there. He was completely wrong to run across a 4 lane highway just to piss me off while I was trying to eat dinner.</p>
<p>Aside from stupid people and pushy sales people, I also hate pushy recruiters. Every week, I get nearly 100 job offers from around the world. Many of those job offers originate from this website while others originate from sites like LinkedIn and Monster.com. I haven&#8217;t been in the hunt for a new job in several years, but that doesn&#8217;t stop people from making offers. The majority of the offers I receive are from Monster.com. After getting tired of receiving 100+ phone calls and emails every week from Monster.com, I decided to log into the site and change my status to indicate that I am not looking for a job and for recruiters to no longer contact me.</p>
<p>Well, that was a mistake. After I made those changes to my account, the calls and emails pretty much doubled. Even though I specifically selected in my account for recruiters to not call me, they still do. In fact, my account says not to contact me at all, but that doesn&#8217;t stop them. I guess I&#8217;m going to have to just delete the entire account. Apparently, recruiters don&#8217;t know how to read. Even though my account says &#8220;DO NOT CALL ME!!!&#8221;, they keep calling and calling and calling and calling.</p>
<p>For the last 5 days, I have been in bed sick. During that time, I decided to turn off my cellphone&#8217;s ringer so that I could relax and get some rest. Last night, I was messing around with my phone and got extremely pissed. Beginning Sunday morning around 4:30am, I began receiving calls from this one recruiter in particular. The guy called me 13 times on Sunday alone! Thirteen times! Every time he would call, he would leave me a voice mail and would mark it as urgent. The calls began before 5:00am every day and rolled in until well after midnight on Sunday, Monday, and again on Tuesday. Not only was he calling and leaving voicemails, he was also sending me emails. Needless to say, this was extremely annoying. But, it didn&#8217;t stop there. The ass hole even began sending text messages to my cellphone saying things like &#8220;Lucus, this is _HIS_NAME_HERE_. I&#8217;m trying to get in touch with you. It is extremely urgent that you call me back at XXX-XXX-XXXX&#8221;. He sent over 20 messages just like that.</p>
<p>I tried replying to his messages, telling him to never contact me again, but my reply messages were rejected saying the messages could not be delivered. Apparently this guy had setup some sort of bogus account that allowed him to send SMS messages. I knew it was the same guy because he included his name and phone number which were the same on my caller ID, in the voice mails he left, and in the emails he sent. I emailed him back telling him to lose my information and to never bother me again. This was becomming a harassment case.</p>
<p>Last night about 11:30pm, I got yet another phone call from him. This time I had my ringer on and heard it. When I answered, I was far from polite. I told him to go f&#8212; himself and to never contact me again. Here is his reply.</p>
<p>&#8220;Well, if you would have taken my phone calls to begin with, we wouldn&#8217;t be having this conversation now. I used my personal time to contact you with a great offer and this is how you repay me? I&#8217;ve been calling and emailing you for several days now. You could have and should have shown me the same respect by replying to me earlier. I have a job offer for you in New Jersey for a 1 month contract position with an upcoming company. I felt like you would be a great fit for this position. But after talking with you now, I think you&#8217;re not the right fit for this position. Thank you for wasting my time!&#8221; and he hung up.</p>
<p>Seriously?!?!? I wasted his time? Some people are completely clueless and should not have a job that involves interacting with other people. In fact, I think that some of the things this guy did is on the verge if not over the line of being illegal. But, that&#8217;s for someone else to decide. This morning, I submitted a complaint to the Better Business Bureau (BBB) along with all of the emails, text messages, and voicemails I received from this guy over the last few days. I better not hear from this guy again. If I do, things are going to get nasty.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/general/let-me-rant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block Spammers with WordPress, Contact Form 7, and CAPTCHA</title>
		<link>http://www.prodigyproductionsllc.com/articles/web-design/block-spammers-with-wordpress-contact-form-7-and-captcha/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/web-design/block-spammers-with-wordpress-contact-form-7-and-captcha/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 18:30:20 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2411</guid>
		<description><![CDATA[Some of the first articles I wrote for this blog showed you how to build a website using WordPress. As I&#8217;ve found out over the last year, many people have followed those articles and are now running successful blogs of their own. In fact, I just received an email from a reader that used the [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/stop_spam.jpg"><img class="alignleft  wp-image-2414" title="stop_spam" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/stop_spam.jpg" alt="Stop Spam" width="107" height="107" /></a>Some of the first articles I wrote for this blog showed you how to <a title="Building a Website" href="http://www.prodigyproductionsllc.com/articles/web-design/building-a-website/">build a website</a> <a title="Installing WordPress" href="http://www.prodigyproductionsllc.com/articles/web-design/installing-wordpress/">using WordPress</a>. As I&#8217;ve found out over the last year, many people have followed those articles and are now running successful blogs of their own. In fact, I just received an email from a reader that used the information I provided in those articles to create her own blog. She also followed another article of mine that listed some of the <a title="WordPress Plugins" href="http://www.prodigyproductionsllc.com/articles/general/wordpress-plugins/">WordPress plugins</a> I&#8217;m using on this site. One of the plugins she chose to use is a plugin called &#8220;<a title="Contact Form 7 - WordPress Plugin" href="http://contactform7.com/" target="_blank">Contact Form 7</a>&#8221; which provides you with a simple feedback form for your contact page.</p>
<p>Providing your visitors with an easy to use feedback form is a double-edged sword. Not only does it provide an easy way for your site visitors to contact you, it also makes it easy for bots (automated programs) to fill your inbox full of spam as the reader above recently found out. Over the weekend, she received over 500 emails from her site, all of which turned out to be junk mail and she wanted a way to keep this from happening again. So, she sent me an email explaining the situation and asked if I had any tricks that could help her. Lucky for her, I&#8217;ve already ran into this problem before and had a solution; a solution I&#8217;m going to share with you now.</p>
<p><span id="more-2411"></span>It&#8217;s called &#8220;CAPTCHA&#8221;. For an explanation of what CAPTCHA is and what it can do for you, be sure to checkout my article that shows you how to create CAPTCHA using PHP (<a title="PHP CAPTCHA Script" href="http://www.prodigyproductionsllc.com/articles/web-design/php-captcha-script/">http://www.prodigyproductionsllc.com/articles/web-design/php-captcha-script/</a>). The technique described in this article only works with the Contact Form 7 WordPress plugin. But, CAPTCHA is available for all other web applications and tools. Just do a quick Google search for &#8220;CAPTCHA&#8221; and the name of your tool or programming language to find information suited for your environment. If you&#8217;re not using the Contact Form 7 plugin for WordPress, but would like to, you can download it from <a title="Contact Form 7 - WordPress Plugin" href="http://contactform7.com" target="_blank">http://contactform7.com</a>. In order for this technique to work, you will also need to download and install the &#8220;Really Simple CAPTCHA&#8221; plugin from <a title="Really Simple CAPTCHA - WordPress Plugin" href="http://ideasilo.wordpress.com/2009/03/14/really-simple-captcha/" target="_blank">http://ideasilo.wordpress.com/2009/03/14/really-simple-captcha/</a></p>
<p>Once you have the Contact Form 7 (CF7) plugin downloaded and installed, log into your admin console and <a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/contact7_generate_captcha.jpg"><img class="alignright size-full wp-image-2413" title="contact7_generate_captcha" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/contact7_generate_captcha.jpg" alt="Contact Form 7 - Generate Captcha Tag" width="115" height="271" /></a>click on the &#8220;Contact&#8221; link in the menu on the left. This will take you to the CF7 settings page. At the top of the page, you&#8217;ll see the code you&#8217;ll copy and paste into the page that you want your CF7 form to appear in. Just below that, you&#8217;ll see a section called &#8220;Form&#8221; which will contain the HTML code for your CF7 form. To the right of that HTML form, you&#8217;ll see a button that says &#8220;Generate Tag&#8221;. Click that button to drop down a menu. Scroll down and click on &#8220;CAPTCHA&#8221;. When you do that, you&#8217;ll see another form appear labeled &#8220;CAPTCHA&#8221; which will contain several form fields. Don&#8217;t worry about entering anything in any of these fields at this time as those are all optional and we won&#8217;t be using them at this time.</p>
<p>At the bottom of this form, you should see 2 brown boxes with text in them. At first, the text appears to be the same. But, I promise you it&#8217;s not. Take a second look and you&#8217;ll notice that the first box has captcha<span style="color: #0000ff;"><strong>c</strong></span> where the second box has captcha<span style="color: #0000ff;"><strong>r</strong></span> (notice the ending &#8220;c&#8221; and &#8220;r&#8221;). These are the 2 fields you&#8217;ll need to copy into your form&#8217;s HTML which is the form to the left of the CAPTCHA form. The first box contains the code needed to generate an image that contains the random CAPTCHA string. The second box contains the code needed to allow the user to enter the text from the image into the contact form.</p>
<p>Copy the text from each brown box and paste it into the form on the left. I added mine to the end of my form, just above the &#8220;send&#8221; button. In the code for the image, you&#8217;ll notice that I added an extra parameter for &#8220;size&#8221; and passed it &#8220;l&#8221; (lowercase L) which tells the plugin to generate my CAPTCHA text as &#8220;large&#8221; so that it&#8217;s easier to read. You can also pass &#8220;s&#8221; for the size which will draw your text &#8220;small&#8221;. In the code for the input field, you&#8217;ll notice that I added some extra text for &#8220;4/4&#8243;. This tells the plugin to draw my input field just big enough for the 4 characters from my image to be typed into. You can change these parameters manually in the code or you can change them using the CAPTCHA form on the right as shown here.</p>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/contact7_captcha.jpg"><img class="aligncenter size-full wp-image-2412" title="contact7_captcha" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/contact7_captcha.jpg" alt="Contact Form 7 - WordPress Plugin" width="525" height="502" /></a><br />
Make sure you copy the code generated for you from the CAPTCHA tool since your numbers will be different than mine shown here.</p>
<p>That&#8217;s it. All you have left to do now is click the &#8220;Save&#8221; button at the top-right and your feedback form is now ready to block spammers. After you&#8217;ve saved your changes, go ahead and click on your contact form to test it out. If everything worked accordingly, you should see an extra input field with your CAPTCHA image above it. When you click the &#8220;send&#8221; button, the form should not validate and a message should appear next to your CAPTCHA input field. Here is what the code looks like for the <a title="Contact Us" href="http://www.prodigyproductionsllc.com/contact-us/">Contact Us</a> form for this site.</p>
<p>&lt;p&gt;Your Name (required)&lt;br /&gt;<br />
[text* your-name] &lt;/p&gt;<br />
&lt;p&gt;Your Email (required)&lt;br /&gt;<br />
[email* your-email] &lt;/p&gt;<br />
&lt;p&gt;Subject&lt;br /&gt;<br />
[text your-subject] &lt;/p&gt;<br />
&lt;p&gt;Your Message&lt;br /&gt;<br />
[textarea your-message] &lt;/p&gt;<br />
&lt;p&gt;[captchac captcha-561 size:l]<br />
&lt;span&gt;Enter the Above Text&lt;/span&gt;&lt;span&gt;(*)&lt;/span&gt;[captchar captcha-561 4/4]<br />
&lt;/p&gt;<br />
&lt;p&gt;[submit "Send"]&lt;/p&gt;</p>
<p>If you run into any problems, let me know in the comments below and I&#8217;ll try to help you out. Or, you can always head over to the <a title="Contact Form 7 - WordPress Plugin" href="http://contactform7.com" target="_blank">Contact Form 7 website</a> and ask for help there. Now go block those spammers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/web-design/block-spammers-with-wordpress-contact-form-7-and-captcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call a Webservice Using SOAP and Python</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/call-a-webservice-using-soap-and-python/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/call-a-webservice-using-soap-and-python/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 12:23:22 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2398</guid>
		<description><![CDATA[In the last couple of years, it seems like webservices have become more and more the standard for sharing data with multiple applications. System designers and architects are pushing back against the idea of connecting directly to a database to access data. Instead, they prefer applications to access data through a middle-ware solution such as [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/tin_cans.jpg"><img class="alignleft  wp-image-2399" title="tin_cans" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/tin_cans.jpg" alt="Tin Can Telephone" width="150" height="121" /></a>In the last couple of years, it seems like webservices have become more and more the standard for sharing data with multiple applications. System designers and architects are pushing back against the idea of connecting directly to a database to access data. Instead, they prefer applications to access data through a middle-ware solution such as webservices.</p>
<p>Most current programming languages have the ability call webservices as long as they can parse XML. Typically when one needs to call a webservice, they would use an already written and proven library to do the work for them. After all, why reinvent the wheel? But, what about technologies that don&#8217;t have an existing library for calling webservices? Or, what about those who want to create their own webservice libraries?</p>
<p>Well, I want to take a minute to show you a really simple way to call webservices with Python using a standard HTTP post. I recently needed something quick for testing a webservice I wrote in another language and want to share that with you now. However, I won&#8217;t be showing you how to to parse the response XML in this article. I&#8217;ll save that for another post. But, with this simple approach to calling webservices, you&#8217;ll be able to send a SOAP message to a webservice and get back the response XML as a string. At that point, you can search Google for hundreds or even thousands of other sites that will show you how to parse the returned string as XML, or you can wait until I have time to write the second piece to this article. <img src='http://www.prodigyproductionsllc.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Let&#8217;s get started.</p>
<p><span id="more-2398"></span>First off, all webservices that use the SOAP protocol expect what&#8217;s called a &#8220;SOAP envelope&#8221; to be passed to the service. The SOAP envelope is a simple XML structure that contains parameters that the webservice will be expecting. For this example, I have constructed a simple SOAP envelope that contains parameters for username and password. The webservice we&#8217;ll be calling is expecting these parameters for authentication purposes. Once the credentials have been authenticated, the webservice will simply return a list of other available services the host has to offer. Here is what my SOAP envelope looks like:</p>
<p>body = <span style="color: #008000;">&#8220;&#8221;"</span><br />
<span style="color: #008000;">&lt;soapenv:Envelope xmlns:soapenv=&#8221;http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:ns=&#8221;http://www.example.com/services/wsdl/2.0&#8243;&gt;</span><br />
<span style="color: #008000;">&lt;soapenv:Header/&gt;</span><br />
<span style="color: #008000;">&lt;soapenv:Body&gt;</span><br />
<span style="color: #008000;">&lt;ns:serviceListRequest&gt;</span><br />
<span style="color: #008000;">&lt;ns:userInfo&gt;</span><br />
<span style="color: #008000;">&lt;ns:username&gt;%s&lt;/ns:username&gt;</span><br />
<span style="color: #008000;">&lt;ns:password&gt;%s&lt;/ns:password&gt;</span><br />
<span style="color: #008000;">&lt;/ns:userInfo&gt;</span><br />
<span style="color: #008000;">&lt;/ns:serviceListRequest&gt;</span><br />
<span style="color: #008000;">&lt;/soapenv:Body&gt;</span><br />
<span style="color: #008000;">&lt;/soapenv:Envelope&gt;&#8221;"&#8221;</span> % (<span style="color: #008000;">&#8220;username&#8221;</span>, <span style="color: #008000;">&#8220;password&#8221;</span>)</p>
<p>Make sure you change the namespace URI (xmlns:ns=) in the envelope to match the namespace used in your webservice. You&#8217;ll also notice that I have added my username and password parameters to the end of my request body. For the purpose of this example, I have replaced my URLs and credentials with dummy data. So, make sure you change your parameters and URLs to match those of your webservice.</p>
<p>Next, you will need to construct the webservice request. For that, you can use the httplib class that comes with Python. Make sure you include an import for it at the top of your page. Then, build a &#8220;put&#8221; request and header as shown below. I&#8217;m not going to explain everything going on here as it&#8217;s pretty much self-explanatory. It&#8217;s just a standard HTTP POST like you would do from an HTML page.</p>
<p>request = httplib.HTTPConnection(server_addr)<br />
request.putrequest(<span style="color: #008000;">&#8220;POST&#8221;</span>, service_action)<br />
request.putheader(<span style="color: #008000;">&#8220;Accept&#8221;</span>, <span style="color: #008000;">&#8220;application/soap+xml, application/dime, multipart/related, text/*&#8221;</span>)<br />
request.putheader(<span style="color: #008000;">&#8220;Content-Type&#8221;</span>, <span style="color: #008000;">&#8220;text/xml; charset=utf-8&#8243;</span>)<br />
request.putheader(<span style="color: #008000;">&#8220;Cache-Control&#8221;</span>, <span style="color: #008000;">&#8220;no-cache&#8221;</span>)<br />
request.putheader(<span style="color: #008000;">&#8220;Pragma&#8221;</span>, <span style="color: #008000;">&#8220;no-cache&#8221;</span>)<br />
request.putheader(<span style="color: #008000;">&#8220;SOAPAction&#8221;</span>, <span style="color: #008000;">&#8220;http://&#8221;</span> + server_addr + service_action)<br />
request.putheader(<span style="color: #008000;">&#8220;Content-Length&#8221;</span>, <span style="color: #800080;">str</span>(<span style="color: #800080;">len</span>(body)))<br />
request.endheaders()</p>
<p>That&#8217;s it. That&#8217;s everything you need to call a webservice using SOAP and Python. The only thing you have left to do is submit your request and print the response. If you are submitting data to a webservice and not expecting a response (a fire-and-forget if you will), this code will work perfectly for you. As mentioned earlier, in a future article I will show you how to parse the response as XML instead of one giant string as it is right now. Here is all of the code I used for this example. As always, leave your questions and comments in the comments section below.</p>
<p><pre class="brush: python">import string, os, sys, httplib

server_addr = &quot;www.example.com&quot;
service_action = &quot;/services/getServiceListAction&quot;

body = &quot;&quot;&quot;
&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:ns=&quot;http://www.example.com/services/wsdl/2.0&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
&lt;ns:serviceListRequest&gt;
&lt;ns:userInfo&gt;
&lt;ns:username&gt;%s&lt;/ns:username&gt;
&lt;ns:password&gt;%s&lt;/ns:password&gt;
&lt;/ns:userInfo&gt;
&lt;/ns:serviceListRequest&gt;
&lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;&quot;&quot;&quot; % (&quot;username&quot;, &quot;password&quot;)

request = httplib.HTTPConnection(server_addr)
request.putrequest(&quot;POST&quot;, service_action)
request.putheader(&quot;Accept&quot;, &quot;application/soap+xml, application/dime, multipart/related, text/*&quot;)
request.putheader(&quot;Content-Type&quot;, &quot;text/xml; charset=utf-8&quot;)
request.putheader(&quot;Cache-Control&quot;, &quot;no-cache&quot;)
request.putheader(&quot;Pragma&quot;, &quot;no-cache&quot;)
request.putheader(&quot;SOAPAction&quot;, &quot;http://&quot; + server_addr + service_action)
request.putheader(&quot;Content-Length&quot;, str(len(body)))
request.endheaders()
request.send(body)
response = request.getresponse().read()

print response</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/call-a-webservice-using-soap-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Belkin Surge Protector with EMI &amp; RFI Filtration &#8211; Review</title>
		<link>http://www.prodigyproductionsllc.com/articles/reviews/belkin-surge-protector-with-emi-rfi-filtration-review/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/reviews/belkin-surge-protector-with-emi-rfi-filtration-review/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 12:31:00 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2381</guid>
		<description><![CDATA[Back in February, I bought my fiancee a new treadmill. The thing was extremely nice and worked great for about a week. Then, we started having problems with the treadmill tripping the circuit breaker. Every time we would reset the breaker, it would trip again as soon as we turned on the treadmill. Being that [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.amazon.com/gp/product/B002XJSDJQ/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002XJSDJQ"><img class="alignleft  wp-image-2387" title="belkin_surge_protector" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/04/belkin_surge_protector.jpg" alt="Belkin Professional Series SurgeMaster Surge Protector" width="140" height="140" /></a>Back in February, I bought my fiancee a new treadmill. The thing was extremely nice and worked great for about a week. Then, we started having problems with the treadmill tripping the circuit breaker. Every time we would reset the breaker, it would trip again as soon as we turned on the treadmill. Being that we live in a house that is barely 2 years old, I thought the wiring in the house was sufficient. However, we put the treadmill in one of our guest bedrooms which only had a 15 amp circuit for the entire room. I know 15 amps aren&#8217;t much, but other than the lights, the treadmill is the only other thing on that breaker when in use.</p>
<p>At first, my biggest worry was that the treadmill was defective. Instead of jumping to conclusions and going through all the trouble of sending the treadmill back, I did a little bit of research and found plenty of others having the same issue with similar and even identical treadmills. As a &#8220;fix&#8221;, many of the people I read reviews from said that simply swapping out their 15 amp breaker for a 20 amp resolved the issue. Personally, I wasn&#8217;t too pleased with this option as I&#8217;ve known others to do this in the past. For fear of causing a fire, I chose to look for another &#8220;solution&#8221;.</p>
<p><span id="more-2381"></span>The manual that came with the treadmill said that it was regulated at 14 amps. So, I thought that I could get away with buying a standard surge protector that had a switch which would trip instead of the circuit breaker. Surely this would do the trick. Even if the treadmill was defective, I thought a normal surge protector would work and it did &#8230; for about a week. Every time we turned on the treadmill, it would still trip the circuit breaker, but not the surge protector. WTF?? By this point, I was getting furious with this thing. I felt like it was time to return the treadmill. Before I did though, my fiancee pointed me to a website from a guy that had almost an identical experience as we did, but had 1 final suggestion to make which apparently worked for him. I decided to give it one more try and follow what the writer had to say.</p>
<p>As I mentioned before, my house is brand new and all of its wiring is up to code. As it turned out, this was what the problem was all along. All wiring is subjective to &#8220;noise&#8221;. Wiring that isn&#8217;t shielded properly can allow &#8220;noise&#8221; (external interference such as radio, microwave, and even wireless networking) to affect the load traveling through the wires. Apparently, new wiring is shielded so well that any &#8220;noise&#8221; that gets on the line has a hard time getting out. Since the treadmill has a huge motor powering it, this can add a lot of extra &#8220;noise&#8221; to the line which will ultimately trip the circuit breaker. To prevent this from happening, the author of the article above claimed that a surge protector with EMI (electromagnetic interference) and RFI (radio frequency interference) filtration was required.</p>
<p>So, I got online to see what I could find. Over at Amazon.com, I came across the <a title="Belk Professional Series SurgeMaster Surge Protector" href="http://www.amazon.com/gp/product/B002XJSDJQ/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002XJSDJQ" target="_blank">Belkin Professional Series SurgeMaster Surge Protector</a>. It includes 12 outlets and an extra long 10ft cord. Not only does it provide protection for standard AC outlets, it also provides protection for coax, ethernet, phone, and fax. It&#8217;s regulated for protection of up to 3996 joules. Best of all, it includes an EMI / RFI filter for noise for up to 75 dB reduction. My local Office Depot had this surge protector in stock for around $45. Belkin.com had the same product for around $65. But, good ol&#8217; Amazon.com had it in stock for about $27. So, I went ahead and ordered one from Amazon and also received free shipping.</p>
<p>When the product arrived, I plugged it up and fired up the treadmill. I was able to run the treadmill at max speed for about 30 minutes without any interruptions. As a test, I also turned on the TV, radio, ceiling fan, overhead light, and reading lamp in the room to make sure that the circuit wouldn&#8217;t be tripped. Woo hoo! It worked! My fiancee runs about 3+ miles every day on the treadmill and the circuit breaker hasn&#8217;t tripped once since we added the <a title="Belk Professional Series SurgeMaster Surge Protector" href="http://www.amazon.com/gp/product/B002XJSDJQ/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002XJSDJQ" target="_blank">Belkin SurgeMaster</a>. In fact, I&#8217;ve been so happy with this product that I&#8217;ve already purchased several more (one for each desk in the office, one for the entertainment system in the living room, and a few others for protection in the bedrooms).</p>
<p>To sum things up, if you&#8217;re having problems with treadmills, appliances, or other electronics in your house tripping your circuit breaker, try getting one of these <a title="Belk Professional Series SurgeMaster Surge Protector" href="http://www.amazon.com/gp/product/B002XJSDJQ/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002XJSDJQ" target="_blank">Belkin SurgeMaster</a> surge protectors and see if your problems go away. I tried resolving my issue with several different surge protectors (including other Belkin products). But, only the <a title="Belk Professional Series SurgeMaster Surge Protector" href="http://www.amazon.com/gp/product/B002XJSDJQ/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002XJSDJQ" target="_blank">SurgeMaster with the EMI/RFI</a> filter worked. If you find yourself having similar issues, you can order the same surge protector I mentioned here from the Amazon link below. Also, if you do have similar issues, tell us your story in the comments below. I&#8217;d love to see what others used as solutions.</p>
<div style="text-align: center; border: 0;"><iframe src="http://rcm.amazon.com/e/cm?t=proprollc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B002XJSDJQ&#038;ref=qf_sp_asin_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0088CC&#038;bc1=FFFFFF&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></div>
<p><br/><br />
<b>Disclaimer:</b> I am not responsible for any damages that might occur from using or not using this product. The information in this article is based solely on my own experience with the product. You should consult your electrician before attempting anything mentioned in this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/reviews/belkin-surge-protector-with-emi-rfi-filtration-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pandigital WikiReader Review</title>
		<link>http://www.prodigyproductionsllc.com/articles/reviews/pandigital-wikireader-review/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/reviews/pandigital-wikireader-review/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 12:31:27 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2375</guid>
		<description><![CDATA[Every time I visit my grandmother, she always bombards me with questions about what different things are. Every day, she&#8217;ll see something on TV or hear something, but not know what it is exactly. For things that peak her curiosity, she&#8217;ll jot them down in a note pad and ask the next person that walks [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.amazon.com/gp/product/B0039NLVB2/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0039NLVB2"><img class="alignleft  wp-image-2376" title="pandigital_wikireader" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/03/pandigital_wikireader.jpg" alt="Pandigital Wikireader" width="158" height="158" /></a>Every time I visit my grandmother, she always bombards me with questions about what different things are. Every day, she&#8217;ll see something on TV or hear something, but not know what it is exactly. For things that peak her curiosity, she&#8217;ll jot them down in a note pad and ask the next person that walks thru her door. For example, I stopped by her house about a month ago to do her taxes for her. As soon as I got there, out came her note pad and the questions began. I like to believe that I&#8217;m a fairly smart guy. But, she did have a few things on her list that really stumped me. Lucky for me, I had my kick-ass <a title="Motorola Droid Razr" href="http://www.amazon.com/gp/product/B0071G0KR4/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0071G0KR4" target="_blank">Motorola Droid Razr</a> smartphone which I pulled out, hopped on the local 4G network, and Googled the remained of her questions. Even though my grandmother has a computer, she doesn&#8217;t know how or want to learn how to use it for gathering information on something. She also has a cellphone, but it doesn&#8217;t have a data plan. So, I felt like she needed an alternative for getting answers no matter where she was. That&#8217;s when I came across the <a title="Pandigital WikiReader" href="http://www.amazon.com/gp/product/B0039NLVB2/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0039NLVB2" target="_blank">Wikireader by Pandigital</a>.</p>
<p><span id="more-2375"></span>I&#8217;ve purchased other Pandigital products before and have been extremely pleased with all of them (<a title="Pandigital Novel 7″ Color Multimedia eReader Review" href="http://www.prodigyproductionsllc.com/articles/misc/pandigital-novel-7-color-multimedia-ereader-review/" target="_blank">see my article about the Pandigital eReader / tablet here</a>). The <a title="Pandigital WikiReader" href="http://www.amazon.com/gp/product/B0039NLVB2/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0039NLVB2" target="_blank">Pandigital Wikireader</a> is a small palm-sized device (4.7in X 1.2in X 4.9in at 12.8oz) that contains the entire English <a title="Wikipedia" href="http://www.wikipedia.org" target="_blank">Wikipedia</a> which covers over 3 millions topics. That&#8217;s equivalent to more than 1000 volumes. It does not require an internet connection. Instead, it comes preloaded and ready to use right out of the box. It has an easy to use touchscreen for searching and navigating. it also includes 3 buttons on the front that allow you to quickly jump to the search screen, topic history, or to jump to any random topic.</p>
<p>The <a title="Pandigital WikiReader" href="http://www.amazon.com/gp/product/B0039NLVB2/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0039NLVB2" target="_blank">Wikireader</a> device runs on 2 AAA batteries (included) which they claim will last approximately 1 year. It contains a 4GB microSD card which stores the <a title="Wikipedia" href="http://www.wikipedia.org" target="_blank">Wikipedia</a> information. The content can be updated quarterly for free by downloading the new content and saving it to the included microSD card or onto any microSD card of your choosing. I haven&#8217;t looked at what the content of the microSD card looks like yet, but I will. If the content is in a decent accessible format, I&#8217;d like to copy it to my computer for use with some of my artificial intelligence / machine learning projects.</p>
<p>Overall, the device is pretty cool and extremely easy to use. The only downside I see so far to this device is that the screen is kind of hard to read, especially in low-light areas. The <a title="Pandigital WikiReader" href="http://www.amazon.com/gp/product/B0039NLVB2/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0039NLVB2" target="_blank">Wikireader</a> device does not include a backlight. If it did, this thing would be a whole lot cooler than what it is currently. But, I still believe that this device will work out great for my grandmother. Being as small as it is, she can easily throw it in her purse and have her information on-the-go. I think that this will allow her to get answers to her questions no matter where she&#8217;s at or who is around.</p>
<p>If you&#8217;re interested in the <a title="Pandigital WikiReader" href="http://www.amazon.com/gp/product/B0039NLVB2/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0039NLVB2" target="_blank">Pandigital Wikireader</a>, you can pick one up from Amazon using the link below for about $30.00 As of the time I&#8217;m writing this article, you can get this little guy at best price for less than $20.00 and with free super saving shipping. Personally, I think I&#8217;m going to pick up a few more of these guys to use as stocking stuffers at Christmas.</p>
<div style="text-align: center; width: 100%;"><iframe src="http://rcm.amazon.com/e/cm?t=proprollc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B0039NLVB2&#038;ref=qf_sp_asin_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0088CC&#038;bc1=FFFFFF&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></div>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/reviews/pandigital-wikireader-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Trip to Las Vegas</title>
		<link>http://www.prodigyproductionsllc.com/articles/general/another-trip-to-las-vegas/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/general/another-trip-to-las-vegas/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 20:16:47 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2364</guid>
		<description><![CDATA[For most of you, St. Patrick&#8217;s Day is a day for drinking green beer and pretending to be Irish. For me, it&#8217;s a day that marks the day I began dating the most amazing woman I&#8217;ve ever met. This St. Patrick&#8217;s Day happened to mark five years of our relationship. To celebrate (my fiancee putting [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/03/st_patricks_day.jpg"><img class="alignleft  wp-image-2369" title="st_patricks_day" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/03/st_patricks_day.jpg" alt="St. Patrick's Day Leprechaun" width="93" height="125" /></a>For most of you, St. Patrick&#8217;s Day is a day for drinking green beer and pretending to be Irish. For me, it&#8217;s a day that marks the day I began dating the most amazing woman I&#8217;ve ever met. This St. Patrick&#8217;s Day happened to mark five years of our relationship. To celebrate (my fiancee putting up with me for this long), I flew us out to Las Vegas for the weekend. I&#8217;ve been to Vegas several times before, but this was my fiancee&#8217;s first time there. In my usual style of writing, I waited until I got back to write this post. So, here are some words about my weekend excursion.</p>
<p><span id="more-2364"></span>Our trip began Friday morning with our early arrival at the Hartsfield Airport in Atlanta. I say &#8220;early arrival&#8221; because we actually got there 4 hours early so that we wouldn&#8217;t be driving in the hectic morning Atlanta commute. Our departing flight was actually scheduled to leave a little bit early. But, we had to wait on an incoming flight from Milwaukee which, if it arrived on time, would mean that we would be leaving on time instead of leaving early.</p>
<p>Well, the Milwaukee flight did arrive on time and like clockwork, our plane left the gate and headed for the tarmac. However, at the end of our taxi, our plane made an abrupt turn and headed back to the gate. Our captain came across the PA informing us that an error light came on when checking the flaps and that the issue should be resolved quickly. About an hour and a half later, our captain came back on the PA and told us that the problem was bigger than expected and that we would be moving to another plane a few gates down.</p>
<p>Anyways, much later than expected, we finally left the airport and headed for Vegas. Once there, we checked into the <a title="Aria Hotel, Resort, and Casino" href="http://www.arialasvegas.com/" target="_blank">Aria Hotel, Resort, and Casino</a>. I&#8217;ve stayed at the Aria before and really enjoyed it there (<a title="Back from Las Vegas" href="http://www.prodigyproductionsllc.com/articles/misc/back-from-las-vegas/">see article here</a>). It&#8217;s a bit overpriced, but was still a nice hotel and experience (especially for our 5th year anniversary). Unlike my last stay at the Aria, this experience was a little less enjoyable. Everything I enjoyed before seemed to be less par than before. Foods I ate last time didn&#8217;t taste as good this time. In fact, many of the same meals I ordered before had been changed since the last time I was there. Since we don&#8217;t drink or gamble, good food is the second reason we went to Vegas.</p>
<p>Other than trying out some nice restaurants, the other interest we had in Vegas was the shows. We love watching shows of all kinds. During this trip, one of the shows we got to see was the always exciting <a title="Blue Man Group" href="http://www.amazon.com/gp/product/B0000DBJ9P/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0000DBJ9P" target="_blank">Blue Man Group</a>. By the end of the show, we were crying because we were laughing so hard. If you&#8217;ve never seen the <a title="Blue Man Group" href="http://www.amazon.com/gp/product/B0000DBJ9P/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0000DBJ9P" target="_blank">Blue Man Group</a>, you definitely need to make sure you do next time you have the opportunity. My fiancee wasn&#8217;t really looking forward to seeing them when I purchased the tickets. But, by the end of the trip, she admitted that the <a title="Blue Man Group" href="http://www.amazon.com/gp/product/B0000DBJ9P/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=proprollc-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0000DBJ9P" target="_blank">Blue Man Group</a> was her favorite show out of all that we watched.</p>
<p>Another show we got to see was the <a title="Zumanity by Cirque du Soleil" href="http://www.newyorknewyork.com/zumanity/landing/" target="_blank">Zumanity &#8211; Cirque du Soleil</a> show. We&#8217;ve been to other Cirque du Soleil shows and have always enjoyed them. But, this one seemed more like an off-the-wall freak show than the acrobatic excitement we&#8217;ve come to love about Cirque du Soleil. Even though I&#8217;m glad I got to see the <a title="Zumanity by Cirque du Soleil" href="http://www.newyorknewyork.com/zumanity/landing/" target="_blank">Zumanity version of Cirque du Soleil</a>, I will never return to it and can&#8217;t recommend anyone else to waste their time or money with it either. Instead, you should spend your time and money on something like <a title="Mystere by Cirque du Soleil" href="http://www.treasureisland.com/shows/mystere_by_cirque_du_soleil.aspx" target="_blank">Mystere &#8211; Cirque du Soleil</a>.</p>
<p>One of the things I didn&#8217;t expect in Las Vegas was the weather. Las Vegas is in the middle of the desert and every time I&#8217;ve been, it&#8217;s always been hot!!! Well, not this time. The first 2 days of our trip the weather was perfect with the temperature coming in right at 70 degrees. However, the 3rd day of our trip brought something a lot different. The temperature didn&#8217;t get any higher than 43 degrees on the last 2 days of our trip. In fact, it even snowed a little! I&#8217;m not kidding! Apparently, northern California got slammed with more than a foot of snow on Saturday night. By Sunday, winds reached upwards of 50 MPH, pushing some of that snow into the desert. Needless to say, walking the strip isn&#8217;t something you want to do with winds that high and temperatures that low.</p>
<p>Another thing I didn&#8217;t like about this trip was the crowds. Not only was this St. Patrick&#8217;s Day weekend, it was also March Madness. Apparently, every basketball fanatic with a taste for gambling decided to visit Las Vegas this weekend to bet on their favorite teams. Every hotel on the strip was sold out. Every casino was packed. Every sidewalk was crowded. Because of this, this trip didn&#8217;t turn out to be the quiet, relaxing weekend we had hoped for.</p>
<p>Overall, we still had a great time. Unfortunately, it&#8217;s now back to the real world for both of us. But, that isn&#8217;t stopping us from planning our next vacation. It won&#8217;t be to Las Vegas. But, I can promise you that once we return I&#8217;ll be back on here telling you all about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/general/another-trip-to-las-vegas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control Firefox with Speech Recognition and C#</title>
		<link>http://www.prodigyproductionsllc.com/articles/automation/control-firefox-with-speech-recognition-and-c/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/automation/control-firefox-with-speech-recognition-and-c/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 12:44:19 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2355</guid>
		<description><![CDATA[It seems as though speech recognition is once again becoming a very popular topic. Over the last few weeks, I&#8217;ve received hundreds of emails from readers asking about how to do different things using speech recognition and C#. One of the requests I received was from a reader interested in controlling Firefox using speech recognition [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2010/09/firefox_logo.jpg"><img class="alignleft  wp-image-553" title="firefox_logo" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2010/09/firefox_logo.jpg" alt="Firefox" width="88" height="85" /></a>It seems as though speech recognition is once again becoming a very popular topic. Over the last few weeks, I&#8217;ve received hundreds of emails from readers asking about how to do different things using speech recognition and C#. One of the requests I received was from a reader interested in controlling Firefox using speech recognition and C#. Curious as to this myself, I put together a simple application to get him started and now I&#8217;m going to share that app with the rest of you. I&#8217;m not going to explain in detail how any of this works right now because I&#8217;ve already explained the basics in my other speech recognition articles (<a title="Simple Speech Recognition Using C#" href="http://www.prodigyproductionsllc.com/articles/programming/simple-speech-recognition-using-c/">1</a>, <a title="Simple Speech Recognition Using C# – Part 2" href="http://www.prodigyproductionsllc.com/articles/programming/simple-speech-recognition-using-c-part-2/">2</a>, <a title="Speech Recognition with C# and XML Grammars" href="http://www.prodigyproductionsllc.com/articles/programming/speech-recognition-with-c-and-xml-grammars/">3</a>). Instead, I&#8217;m just going to post the code here for the rest of you to enjoy. The only commands I have implemented so far are the &#8220;home&#8221; and &#8220;back&#8221; buttons. But, the example still provides you with enough information to implement more methods. And, as always, if you have any questions or comments, please leave them in the comments section below. You can download the complete project at <a title="Firefox Automation using Speech Recognition and C#" href="http://www.prodigyproductionsllc.com/downloads/FirefoxAutomation.zip">http://www.prodigyproductionsllc.com/downloads/FirefoxAutomation.zip</a>.</p>
<p><span id="more-2355"></span><pre class="brush: csharp">using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

using System.Windows.Automation;

using Automation = System.Windows.Automation;

using System.Speech.Recognition;

namespace FirefoxAutomation
{
    public partial class MainForm : Form
    {
        private SpeechRecognitionEngine recognitionEngine;

        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (recognitionEngine != null)
                recognitionEngine.RecognizeAsyncStop();
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            Initialize();
        }

        #region Cross Thread Control Delegates
        delegate void SetValueDelegate(Object obj, Object val, Object[] index);
        private void SetControlProperty(Control ctrl, String propName, Object val)
        {
            PropertyInfo propInfo = ctrl.GetType().GetProperty(propName);
            Delegate dgtSetValue = new SetValueDelegate(propInfo.SetValue);
            ctrl.Invoke(dgtSetValue, new Object[3] { ctrl, val, /*index*/ null });
        }

        delegate object GetText(Control ctrl, String propName);
        private object GetControlProperty(Control ctrl, String propName)
        {
            return ctrl.GetType().GetProperty(propName).GetValue(ctrl, null);
        }
        #endregion

        private void LogMessage(String message)
        {
            string tempText = txtConsole.Invoke(new GetText(GetControlProperty), txtConsole, &quot;Text&quot;).ToString();
            SetControlProperty(txtConsole, &quot;Text&quot;, tempText + message + Environment.NewLine);
        }

        private void Initialize()
        {
            AutomationElement rootElement = AutomationElement.RootElement;

            if (rootElement != null)
            {
                Automation.Condition condition = new PropertyCondition(AutomationElement.ClassNameProperty, &quot;MozillaWindowClass&quot;);

                LogMessage(&quot;Searching for Firefox Window...&quot;);
                AutomationElement appElement = rootElement.FindFirst(TreeScope.Children, condition);

                if (appElement != null)
                {
                    Automation.Condition btnBackCondition = new PropertyCondition(AutomationElement.NameProperty, &quot;Back&quot;);
                    LogMessage(&quot;Searching for the back button...&quot;);
                    AutomationElement btnBack = appElement.FindFirst(TreeScope.Subtree, btnBackCondition);
                    if (btnBack == null)
                    {
                        LogMessage(&quot;Error finding back button&quot;);
                        return;
                    }
                    InvokePattern btnBackPattern = btnBack.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern;
                    LogMessage(&quot;Found the back button&quot;);

                    Automation.Condition btnHomeCondition = new PropertyCondition(AutomationElement.NameProperty, &quot;Home&quot;);
                    LogMessage(&quot;Searching for the home button...&quot;);
                    AutomationElement btnHome = appElement.FindFirst(TreeScope.Subtree, btnHomeCondition);
                    if (btnHome == null)
                    {
                        LogMessage(&quot;Error finding Home button&quot;);
                        return;
                    }
                    InvokePattern btnHomePattern = btnHome.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern;
                    LogMessage(&quot;Found the home button&quot;);

                    LogMessage(&quot;Beginning speech recognition...&quot;);
                    recognitionEngine = new SpeechRecognitionEngine();
                    recognitionEngine.SetInputToDefaultAudioDevice();
                    recognitionEngine.SpeechRecognized += (s, args) =&gt;
                    {
                        string line = &quot;&quot;;
                        foreach (RecognizedWordUnit word in args.Result.Words)
                        {
                            if (word.Confidence &gt; 0.5f)
                                line += word.Text + &quot; &quot;;
                        }

                        string command = line.Trim();

                        switch (command)
                        {
                            case &quot;back&quot;:
                                LogMessage(&quot;Clicking the back button&quot;);
                                btnBackPattern.Invoke();
                                LogMessage(&quot;Clicked the back button&quot;);
                                break;
                            case &quot;home&quot;:
                                LogMessage(&quot;Clicking the home button&quot;);
                                btnHomePattern.Invoke();
                                LogMessage(&quot;Clicked the home button&quot;);
                                break;
                        }

                        LogMessage(line);
                    };

                    recognitionEngine.UnloadAllGrammars();
                    recognitionEngine.LoadGrammar(CreateGrammars());
                    recognitionEngine.RecognizeAsync(RecognizeMode.Multiple);
                }
                else
                {
                    LogMessage(&quot;Error locating Firefox window&quot;);
                }
            }
        }

        private Grammar CreateGrammars()
        {
            Choices commandChoices = new Choices(&quot;back&quot;, &quot;home&quot;);
            GrammarBuilder grammarBuilder = new GrammarBuilder();
            grammarBuilder.Append(commandChoices);
            return new Grammar(grammarBuilder);
        }
    }
}
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/automation/control-firefox-with-speech-recognition-and-c/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Control Your Mouse with Speech Recognition and C#</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/control-your-mouse-with-speech-recognition-and-c/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/control-your-mouse-with-speech-recognition-and-c/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 21:26:30 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2346</guid>
		<description><![CDATA[One of my readers recently asked if I would write an article explaining how to control a mouse pointer using speech recognition and C#. Unfortunately, I have been devoting every minute to my new startup and haven&#8217;t had time to write the article as the reader requested. I did however manage to squeeze in a [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/02/mouse.jpg"><img class="alignleft  wp-image-2349" title="mouse" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/02/mouse.jpg" alt="Mouse" width="161" height="108" /></a>One of my readers recently asked if I would write an article explaining how to control a mouse pointer using speech recognition and C#. Unfortunately, I have been devoting every minute to my new startup and haven&#8217;t had time to write the article as the reader requested. I did however manage to squeeze in a few minutes to throw together a simple Windows Form Application that should be a great starting point for a project like this. As soon as I get a few extra minutes, I will come back and write a complete article explaining how everything works and how to improve on it. Until then, I&#8217;m going to go ahead and provide you with the same source code I provided my other reader as I&#8217;m sure there are others out there interested in doing something similar. But, as always, if you have any questions or comments about the code below, feel free to leave me a message in the comments below and I&#8217;ll answer you as soon as possible.</p>
<p><span id="more-2346"></span>In order to make this code work, you will need to right-click on References in your Solution Explorer and choose &#8220;Add Reference&#8221;. Then, you will need to select &#8220;System.speech&#8221; and add it as a reference. Next, you will need to add a text control (I used a rich text box) to your form and name it &#8220;txtOutput&#8221;. You can rename this control to whatever you want as long as you also change the code below. Once you have your reference and text control added, you are ready to use some code. When you run the code, you can say the commands &#8220;up&#8221;, &#8220;down&#8221;, &#8220;left&#8221;, &#8220;right&#8221; and your mouse pointer will jump respectively in increments of 50. But, you can change that to whatever you want.</p>
<p>So, here is the code to make it all happen. Until next time, happy coding!</p>
<p><pre class="brush: csharp">using System;
using System.Drawing;
using System.Text.RegularExpressions;
using System.Windows.Forms;

using System.Speech.Recognition;

namespace MouseController
{
    public partial class Form1 : Form
    {
        SpeechRecognitionEngine recognitionEngine; 

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Initialize();
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            recognitionEngine.RecognizeAsyncStop();
        }

        private void Initialize()
        {
            recognitionEngine = new SpeechRecognitionEngine();
            recognitionEngine.SetInputToDefaultAudioDevice();
            recognitionEngine.SpeechRecognized += (s, args) =&gt;
            {
                string line = &quot;&quot;;
                foreach (RecognizedWordUnit word in args.Result.Words)
                {
                    if (word.Confidence &gt; 0.5f)
                        line += word.Text + &quot; &quot;;
                }

                string command = line.Trim();

                switch (command)
                {
                    case &quot;left&quot;:
                        MoveMouse(Cursor.Position.X - 50, Cursor.Position.Y);
                        break;
                    case &quot;right&quot;:
                        MoveMouse(Cursor.Position.X + 50, Cursor.Position.Y);
                        break;
                    case &quot;up&quot;:
                        MoveMouse(Cursor.Position.X, Cursor.Position.Y - 50);
                        break;
                    case &quot;down&quot;:
                        MoveMouse(Cursor.Position.X, Cursor.Position.Y + 50);
                        break;
                }

                txtOutput.Text += line;
                txtOutput.Text += Environment.NewLine;
            };

            recognitionEngine.UnloadAllGrammars();
            recognitionEngine.LoadGrammar(CreateGrammars());
            recognitionEngine.RecognizeAsync(RecognizeMode.Multiple);
        }

        private Grammar CreateGrammars()
        {
            Choices commandChoices = new Choices(&quot;left&quot;, &quot;right&quot;, &quot;up&quot;, &quot;down&quot;);
            GrammarBuilder grammarBuilder = new GrammarBuilder();
            grammarBuilder.Append(commandChoices);
            return new Grammar(grammarBuilder);
        }

        private void MoveMouse(int x, int y)
        {
            this.Cursor = new Cursor(Cursor.Current.Handle);
            Cursor.Position = new Point(x, y);
            Cursor.Clip = new Rectangle(this.Location, this.Size);
        }
    }
}
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/control-your-mouse-with-speech-recognition-and-c/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>AT&amp;T Unlimited Data Throttling</title>
		<link>http://www.prodigyproductionsllc.com/articles/misc/att-unlimited-data-throttling/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/misc/att-unlimited-data-throttling/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 20:47:02 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2340</guid>
		<description><![CDATA[I&#8217;m getting sick of hearing about AT&#38;T and other cellphone service providers bitch about how they have to throttle their networks because we, the consumers, are such bandwidth hogs. I just read an article written by John Donovan, a Senior EVP of AT&#38;T technology and network operations, on his own blog where he says that [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/02/no_more_atandt.png"><img class="alignleft  wp-image-2341" title="no_more_atandt" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/02/no_more_atandt.png" alt="No more AT&amp;T" width="120" height="108" /></a>I&#8217;m getting sick of hearing about AT&amp;T and other cellphone service providers bitch about how they have to throttle their networks because we, the consumers, are such bandwidth hogs. I just read an article written by John Donovan, a Senior EVP of AT&amp;T technology and network operations, on his own blog where he says that throttling unlimited data plans is necessary because smartphone owners consume too much data. Umm?!?!? WTF?!?!? If your network can&#8217;t support the massive amounts of data being consumed, you shouldn&#8217;t be selling as many cellphones and signing up so many users! Even though you know your network has issues with handling large volumes of data, you still have no problem collecting money from new member registrations and cellphone purchases!</p>
<p>I think of this just like airline ticket sells. Airlines know how many passengers their planes can hold. Even though they&#8217;re allowed to sell more tickets than they have seats for a given flight, they still have a max limit of how many tickets can be sold for that flight. If the plane can only hold 200 passengers per flight, they cannot sell 10,000 tickets for that flight. If your network can&#8217;t handle more users, don&#8217;t sell any more cellphones and don&#8217;t signup any new members! Instead, you&#8217;d rather point your dirty finger at us and say we&#8217;re the problem.</p>
<p>As long as you continue collecting our money, you have NO right to throttle unlimited data plans and then blame it on us. You are the reason for data throttling! AT&amp;T, you are the company that got in bed with Apple as the original exclusive carrier for the first iPhone. What did you think was going to happen? Now that we have even more smartphones to choose from, you should have known that your network would get crippled. You are bringing in billions of dollars every year from us, but you still blame us for your shortcomings.</p>
<p>Just do us all a favor and stop your bullshit about blaming us for your mistakes!</p>
<p>You can find the link to the original article over at <a title="Slashdot: AT&amp;T on data throttling. Blame yourselves." href="http://apple.slashdot.org/story/12/02/15/180258/att-on-data-throttling-blame-yourselves" target="_blank">Slashdot</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/misc/att-unlimited-data-throttling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RTC Platform Update</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/rtc-platform-update/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/rtc-platform-update/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 18:01:26 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2334</guid>
		<description><![CDATA[Recently, I&#8217;ve received several emails asking about the status of my real-time collaboration platform project. So, I decided to  take a few minutes to address this with a quick blog post. In case you aren&#8217;t familiar with my RTC platform, you can get an  idea of it here. Basically, I am working  on building a [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/02/update.jpg"><img class="alignleft  wp-image-2336" title="update" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/02/update.jpg" alt="Update Image" width="134" height="118" /></a>Recently, I&#8217;ve received several emails asking about the status of my real-time collaboration platform project. So, I decided to  take a few minutes to address this with a quick blog post. In case you aren&#8217;t familiar with my RTC platform, you can get an  idea of it <a title="Real-Time Collaboration Server" href="http://www.prodigyproductionsllc.com/articles/general/real-time-collaboration-server/">here</a>. Basically, I am working  on building a platform that will allow others to create any type of server that involves multiple users. For example, if you  wanted to create your own chat server, you could use my platform as a starting point and would only have to write a few lines  of code to make it work. If you wanted to create a streaming HTTP server, video conferencing server, or audio chat server,  again, you would use my platform as the base foundation for your application. My platform works by allowing anyone to quickly  and easily get a multi-user server up and running in no time. Let&#8217;s take a look at another real-world example of where my  platform could be used.</p>
<p><span id="more-2334"></span>Let&#8217;s pretend you&#8217;re interested in creating your own multi-player video game, but would rather focus on the actual gameplay  instead of writing code to juggle multiple users. To do that, you would implement my platform which allows you to create  &#8220;lobbies&#8221; where users can share information and data. For example, when a user first logs onto the server, they would not be in  a lobby. Instead, they could pass the &#8220;list lobbies&#8221; command which would return a list of all lobbies that are currently  registered on the server or they could issue the &#8220;join lobby&#8221; command to, well, join a lobby. If the user issues the &#8220;join  lobby&#8221; command by itself, the server will search for a lobby that has available room and will dump the user into that lobby. On  the other hand, a user could issue the &#8220;join lobby&#8221; command and pass it the name of a lobby. If the lobby the user specifies  has sufficient space, the user will be automatically dropped into that room, otherwise a &#8220;too many users exception&#8221; would be  returned. If a user passes a lobby name along with the &#8220;join lobby&#8221; command and that lobby doesn&#8217;t exist, it would be  auto-created and the user would become the &#8220;lobby leader&#8221;. Of course, the application designer could decide whether or not  users can create new lobbies or not.</p>
<p>Once a user joins a lobby, they can issue the &#8220;list users&#8221; command to see all of the other users within that lobby. Each user  in the lobby has a minimum of 4 channels to the server. The first channel is for text. The second channel is for audio. The  third channel is for video. And, the fourth channel is for raw data. To simplify this, a user gets 1 connection made back to  the server, but can send multiple / different data formats to the server over the same connection. It is up to the server  designer to decide which channels will be accessible to their users. Plus, by having separate channels for each data type,  channels can be turned on and off during runtime by the end user which would help with bandwidth issues.</p>
<p>I am designing my platform so that it&#8217;s completely asynchronous. This means that when a client sends a request to the server,  other clients don&#8217;t have to get in line and wait. Instead, they too can send server requests and get responses without the  server hanging up from things like I/O. With my platform, designers will be able to utilize my API for handling all of the  things that would normally take years for someone to design from scratch like event delegation and data-transfers.</p>
<p>With my platform, system designers don&#8217;t have to worry about writing the code to handle multiple users. Designers don&#8217;t have to  write code to take incoming packets from a client and redistribute them to all of the other clients within the same lobby.  Designers don&#8217;t have to worry about writing code to limit how many users can join a single lobby or how to handle different  data types such as audio, video, and text. Instead, designers can focus on the actual gameplay and can use my platform to  handle the rest.</p>
<p>So, as you can see from the example above, my platform will handle all of the pieces required to get up and running a  multi-user application. And, like the example above, I have already begun working with a few others for creating some  multiplayer games which will run on top of my platform. I have also already begun working on a few starter servers for things  like HTTP, FTP, real-time document collaboration, video conferencing, and tele-conferencing. I will also be providing example  client applications for each of the server types mentioned. I will try my best to provide examples in Python, Java, C#, and  PHP. I hope to have something ready to be released within the next few months. I wanted to have it ready sooner, but have found  myself adding more and more functionality before the first release will be ready. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/rtc-platform-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Avoid Using EventSource (Server-Sent Events)</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/javascript/avoid-using-eventsource-server-sent-events/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/javascript/avoid-using-eventsource-server-sent-events/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 05:05:47 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2317</guid>
		<description><![CDATA[Earlier this month, I told you about a new project I&#8217;m working on for a real-time collaboration platform. During the early stages of development, I tested several technologies to use for communicating with the platform from a web browser. Well, today I want to talk about one of those technologies and the reason it wasn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/google_chrome_logo.jpg"><img class="alignleft  wp-image-2325" title="google_chrome_logo" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/google_chrome_logo.jpg" alt="Google Chrome Logo" width="143" height="102" /></a>Earlier this month, I told you about a new project I&#8217;m working on for a real-time collaboration platform. During the early stages of development, I tested several technologies to use for communicating with the platform from a web browser. Well, today I want to talk about one of those technologies and the reason it wasn&#8217;t selected. I&#8217;m talking about &#8220;EventSource&#8221; (aka &#8220;Server-Sent Events&#8221; or &#8220;SSE&#8221; for short). Even though SSE is cool and fun to learn, I would highly recommend staying away from it for anything running in a production environment. Let me explain why.</p>
<p><span id="more-2317"></span>To begin with, what are &#8220;server-sent events&#8221;? Basically, SSE is a one-way technology used for streaming content from a server to the browser. Until recently, web browsers were not designed with the intent of listening for messages from a server. Instead, they were designed to call a server when they wanted something and disconnect once the data had been received. For today&#8217;s purposes, this isn&#8217;t enough. So, technologies like SSE were created that will &#8220;listen&#8221; for messages that are sent from the server.</p>
<p>Take chat rooms for example. Chat rooms are intended to allow multiple users to connect to a central server where messages can be posted and re-posted to all connected clients. Until recently, browsers would have to continuously refresh, making new requests each time, back to the server to check for messages posted from other users. As you can see, this is not a very efficient way of handling things like this. Instead, technologies like SSE will make one connection to a server and will listen for any message posted from any user.</p>
<p>But, like I said earlier, SSE is a &#8220;one-way&#8221; technology. Well, what does that mean? This means that SSE is only designed to &#8220;listen&#8221; for messages sent from the server. SSE is not designed to post messages back to the server. Technologies such as WebSockets allow for a two-way communication over a single connection. So, you can probably already see one of the reasons why SSE was not the technology of choice for my real-time collaboration platform.</p>
<p>Aside from the fact that SSE is a one-way technology, there are still a few other reasons why I suggest avoiding SSE. For example, SSE is not supported by all browsers. In fact, Chrome is the only browser I know of that fully supports EventSource. So, unless you plan on limiting your users to only using Chrome, you will have to write your own version of EventSource, which I did just for fun. But, that&#8217;s for another article. Ok. SSE is a one-way technology and isn&#8217;t cross-browser compatible. That makes 2 reasons why I suggest avoiding SSE. What else?</p>
<p>Even though SSE isn&#8217;t cross-browser compatible, I decided to make my own version which is. But still, that too isn&#8217;t enough. The next reason for avoiding SSE is probably the biggest. Apparently, EventSource has a huge memory leak. Now, before you start sending me hate mail claiming that the memory leak only exists in my hand-written version of EventSource, I have proven that the memory leak also exists in Chrome&#8217;s native EventSource and I provide a test case to prove that at the end of this article.</p>
<p>So, what is this memory leak I speak of? Well, in order to make SSE work, you have to bind a connection to the server that never closes. And this is where the memory leak comes in. Once you bind that persistent connection, the server will continuously pump down data thru that connection back to the client. If not handled properly, this will cause your browser to eat up all of your system resources until the browser crashes.</p>
<p>You&#8217;ll probably notice that I said &#8220;if not handled properly&#8221;. If done correctly, SSE can have less of an impact on your browser. For example, when you log into Facebook and sit there for a while, if someone else sends you a message, your browser will notify you without requiring any interaction from you such as refreshing your browser. To do that using SSE, you could store a variable for the last message sent or add an ID to your messages. Then, when a new message is ready to be sent, you can compare the 2 messages. If the messages or message IDs are alike, you can simply ignore the message and not send it to the client. If the messages are different, you can send the new message to the client and set the value of the last message to that of the new message so that upon the next iteration of your messages, the new message will not be duplicated and re-sent to the client.</p>
<p>But, what if you wanted to create a page that monitors the performance of your server? Maybe you want to have your server tell you how many clients it has connected to it or how much memory your server is consuming. Well, since these are variables that can and will most likely change quite often, this is where the memory leak comes in when working with SSE. Since that data will continuously be sent to the client, the browser will be constantly collecting data until it runs out of resources and &#8220;KABOOM!&#8221; The browser crashes. Let&#8217;s take a look at an example of this.</p>
<p>To prove this memory leak exists, I have created a simple HTTP server using Python and have created a test client using HTML and Javascript. Since I won&#8217;t be including my custom version of EventSource, the client used in this example will only work in Chrome. So, let&#8217;s begin.</p>
<p>In order for SSE to work, you have a couple of guidelines you must follow. The first is that you must return the content-type header as &#8220;text/event-stream&#8221;. Next, you must return a specific body structure to the client where each variable is written on a separate line. For example, one line must include the event your client will be listening for. In this example, my event is called &#8220;message&#8221;. So, I will return &#8220;event: message&#8221; in the response body. Then, on another line, I can include things such as message IDs or whatever I want. But, the last line needs to be a variable for &#8220;data&#8221;. This variable will contain any content you want posted to the client. For this example, my &#8220;data&#8221; variable will contain a timestamp which Python will provide me.</p>
<p><pre class="brush: python">from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import time

class RequestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(200)
        self.send_header('content-type', 'text/event-stream')
        self.end_headers()
        while True:
            self.wfile.write('event: message\nid: 1\ndata: {0}\ndata:\n\n'.format(time.time()))
        
serveraddr = ('', 9292)
srvr = HTTPServer(serveraddr, RequestHandler)
srvr.serve_forever()
</pre></p>
<p>As you can see, the server listens on all IP addresses on port 9292 for incoming requests. Once a connection is established, it returns a 200 success response with header &#8220;content-type&#8221; of &#8220;text/event-stream&#8221;. Then, it goes into a loop where it continuously sends the time to the client. It&#8217;s a very simple example. So, you shouldn&#8217;t have any problems figuring it out.</p>
<p>Next, we need to create a client that can listen for messages from the server. Again, this is a very simple example. So, you shouldn&#8217;t have any issues following it either. But,  I&#8217;ll still explain it anyways. First, you&#8217;ll see that I have a div with an id of &#8220;ticker&#8221;. This is where we will write the response from the server. Next, you&#8217;ll see that there&#8217;s a javascript variable for a new EventSource object. The only parameter required for EventSource is the URL to the server you will be calling. After that, I&#8217;ve added an event listener that will fire every time EventSource gets an event from the server. As I mentioned earlier, I am using the event name &#8220;message&#8221;. But, you can change this to whatever you want as long as you also change it in the server. Inside that event handler, I simply take the response from the server and plug that into the div we built earlier. So, when we run this example, the server will return the time which is written into the &#8220;data&#8221; variable. Once that&#8217;s received, the div that reads &#8220;[TIME]&#8221; will show the the server time instead of the placeholder &#8220;[TIME]&#8220;. Here is my client which I named &#8220;sseclient.html&#8221;:</p>
<p><pre class="brush: xml">&lt;html&gt;
&lt;body&gt;
&lt;div id=&quot;ticker&quot;&gt;[TIME]&lt;/div&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
   var source = new EventSource('http://localhost:9292/');
   source.addEventListener(&quot;message&quot;, eventHandler, false);
   function eventHandler(event)
   {
       document.querySelector('#ticker').innerHTML = event.data;
   }
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></p>
<p>Ok. Now we have our client built. However, if you run this from your filesystem as-is, you&#8217;re going to encounter the good &#8216;ol DOM Exception: &#8220;<span style="color: #ff0000;">Uncaught Error:SECURITY_ERR: DOM Exception 18</span>&#8220;. This occurs because you are attempting to use Javascript to call an external domain. Even if you run this example client from &#8220;localhost&#8221;, by changing the port number, the browser will see this as a different domain and will throw the DOM exception. In order to get around this, you will need to create some sort of proxy using something like PHP and Curl. However, instead of going thru all of that, I chose to go with a simpler approach and use some of the resources I already had available. Since I already had Apache installed on my computer, I opened Apache&#8217;s httpd.conf file (located in &#8220;Apache Install Folder/conf/&#8221;) and enabled &#8220;mod_proxy&#8221; and &#8220;mod_rewrite&#8221;. After I restarted Apache, I copied my sseclient.html example file into the root &#8220;htdocs&#8221; folder of Apache so that I could call my file from the URL &#8220;http://localhost/sseclient.html&#8221;.</p>
<p>But, that too isn&#8217;t enough to bypass the DOM exception. In the &#8220;htdocs&#8221; folder, I created a file called &#8220;.htaccess&#8221;. Make sure you include the beginning &#8220;.&#8221; (period) before the file name. Inside that file, I checked to make sure mod_rewrite was available and enabled the rewrite engine if it was. Next, I added my rewrite rule which pointed to my Python server running on localhost on port 9292. Here is the entire contents of my &#8220;.htaccess&#8221; file:</p>
<p><span style="color: #0000ff;">&lt;IfModule mod_rewrite.c&gt;</span><br />
<span style="color: #0000ff;"> RewriteEngine on</span><br />
<span style="color: #0000ff;"> RewriteRule client http://localhost:9292/ [NC,L,P]</span><br />
<span style="color: #0000ff;"> &lt;/IfModule&gt;</span></p>
<p>You&#8217;ll notice that my rewrite rule includes the word &#8220;client&#8221;. This is the URL pattern I want to watch for and proxy all requests to my Python server. So, back in sseclient.html,  I had to change the URL parameter of EventSource to match. Here is what that now looks like:</p>
<p><span style="color: #0000ff;">var source = new EventSource(&#8216;/client&#8217;);</span></p>
<p>Alrighty. That&#8217;s everything you need to test this memory leak. So, to test it, start your Python server. Then, open up Chrome and press the F12 key to open the debugger window. Next, click on the &#8220;Network&#8221; tab so that you can see all requests. Once you have the &#8220;Network&#8221; debugger window open, browse to &#8220;http://localhost/sseclient.html&#8221;. When you do that, you should see 2 requests in your Network window. One request should be for &#8220;sseclient.html&#8221; (or whatever you named your HTML client) and the other should be for &#8220;/client&#8221;. If everything worked correctly, you should not see &#8220;[TIME]&#8221; in your page. Instead, you should see a number that looks something like &#8220;1327935361.6&#8243;. You should also see the Timeline bar in your Network tab rising. At this point, you should also see the Size column for &#8220;/client&#8221; rising very quickly. In just a couple of seconds, the Size column for my &#8220;/client&#8221; jumped to over 10MB. If you open Task Manager, you will see the memory utilization go thru the roof for Chrome there as well. These are the indicators that tell me EventSource has a memory leak.</p>
<p>If you have any questions or suggestions, please let me know in the comments below. In another post, I will share with you the technology and approach I used in place of server-sent events and EventSource.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/javascript/avoid-using-eventsource-server-sent-events/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>I couldn&#8217;t agree more!</title>
		<link>http://www.prodigyproductionsllc.com/articles/general/i-couldnt-agree-more/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/general/i-couldnt-agree-more/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 17:33:13 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2312</guid>
		<description><![CDATA[I just read this on Slashdot and wanted to re-post it as I am totally 100% on board with the original author: &#8220;Obama&#8217;s State of the Union focused on the return of manufacturing jobs to America. This New Yorker story makes the case that the manufacturing jobs aren&#8217;t going to come back, and he should [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/state_of_the_union2012.jpg"><img class="alignleft  wp-image-2314" title="state_of_the_union2012" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/state_of_the_union2012.jpg" alt="2012 Presidential State of the Union" width="192" height="128" /></a>I just read this on <a title="Slashdot" href="http://tech.slashdot.org/story/12/01/27/1542207/americas-future-is-in-software-not-hardware" target="_blank">Slashdot</a> and wanted to re-post it as I am totally 100% on board with the original author:</p>
<p>&#8220;Obama&#8217;s <a title="State of the Union" href="http://www.whitehouse.gov/the-press-office/2012/01/24/remarks-president-state-union-address" target="_blank">State of the Union</a> focused on the return of manufacturing jobs to America. This New Yorker story makes the case that <a title="The manufacturing jobs aren't coming back" href="http://www.newyorker.com/online/blogs/newsdesk/2012/01/apple-and-obama.html" target="_blank">the manufacturing jobs aren&#8217;t going to come back, and he should be focusing on software</a>. Quoting: &#8216;Yes, there are industries where manufacturing jobs can be brought back to America through proper tax incentives and training programs. But maybe he should have talked more about the things that he could do to keep software jobs here. He spoke of federal funding for university and scientific research. But a real pro-software agenda would also include reforming patent law to stop trolling (and perhaps eliminating software patents altogether); increasing H-1B visas for highly skilled coders; stopping Congress from defunding DARPA, whose research helped create Siri, the iPhone’s talking assistant; and opening up the unused, federally owned wireless spectrum. That agenda wouldn’t bring Apple’s manufacturing jobs back, but it would help to keep the company’s coding jobs here. And it would certainly help develop &#8220;an economy that’s built to last.&#8221;&#8216;&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/general/i-couldnt-agree-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Woot! Off Notifier</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/c-woot-off-notifier/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/c-woot-off-notifier/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 05:04:27 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2293</guid>
		<description><![CDATA[Yesterday, I showed you how to create a Woot! Off notifier using Python. As promised, I&#8217;m now going to show you how to create a Woot! Off notifier using C#. In case you didn&#8217;t read yesterday&#8217;s article, it basically told how I love Woot! Off&#8217;s, but hate having to constantly refresh my browser to check [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2010/12/woot_logo.jpg"><img class="alignleft size-full wp-image-729" title="woot! Logo" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2010/12/woot_logo.jpg" alt="woot! Logo" width="151" height="53" /></a>Yesterday, I showed you <a title="Python Woot! Off Notifier" href="http://www.prodigyproductionsllc.com/articles/programming/python-woot-off-notifier/">how to create a Woot! Off notifier using Python</a>. As promised, I&#8217;m now going to show you how to create a <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> Off notifier using C#. In case you didn&#8217;t read yesterday&#8217;s article, it basically told how I love <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> Off&#8217;s, but hate having to constantly refresh my browser to check for new items. Instead, I decided to write a tool that does that for me. In the Python version I wrote, it only displays the item name and price. In today&#8217;s article, I&#8217;m taking it a bit further by showing you how to create a Windows Form that displays the item description along with the item name and price. And, I even show you how to display the item image and the progress bar that shows how many items are left just like on the <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> site. So, let&#8217;s get started.</p>
<p><span id="more-2293"></span>The first thing you need to do is to fire up Visual C# and create yourself a new Windows Form application. Once you have your application built, you will need to add a few controls to your form. So, go ahead and add a picture box control for displaying the item image, a rich text box control for displaying the item information such as name, price, and description, a progress bar for showing how many items are remaining, a numeric up / down control for setting the wait interval, and a button control for starting and stopping the thread that we&#8217;ll use for our timer. You can layout your form however you want. Here&#8217;s what my layout looks like:</p>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/csharp_woot_off_layout.png"><img class="aligncenter size-full wp-image-2297" title="csharp_woot_off_layout" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/csharp_woot_off_layout.png" alt="C# Woot! Off Form Layout" width="447" height="214" /></a>For this demo, I&#8217;ll be working with System.Threading.Thread to give our application a way to repeat the check for new items. But, you don&#8217;t have to use threads. If you&#8217;d prefer, you can use the Background Worker Control found in your toolbox. The reason you need to use either a Thread or a Background Worker is because your app will freeze, preventing you from changing your wait interval or clicking the Stop button while the application waits. Here are the dependencies I&#8217;m working with and the thread I&#8217;m using to do the work. You&#8217;ll also see that I&#8217;ve declared the <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> url as a global variable as well. This isn&#8217;t really needed, but I did it anyways.</p>
<p><span style="color: #0000ff;">using</span> System;<br />
<span style="color: #0000ff;">using</span> System.Drawing;<br />
<span style="color: #0000ff;">using</span> System.IO;<br />
<span style="color: #0000ff;">using</span> System.Net;<br />
<span style="color: #0000ff;">using</span> System.Text.RegularExpressions;<br />
<span style="color: #0000ff;">using</span> System.Threading;<br />
<span style="color: #0000ff;">using</span> System.Windows.Forms;</p>
<p><span style="color: #0000ff;">private</span> <span style="color: #008080;">Thread</span> _workerThread;<br />
<span style="color: #0000ff;">private string</span> _url = <span style="color: #800000;">&#8220;</span><span style="color: #0000ff;">http://www.woot.com</span><span style="color: #800000;">&#8220;</span>;</p>
<p>Typically, when working with threads, you will need to use delegates when accessing form components to prevent cross thread exceptions. But, to keep things simple, we&#8217;re just going to tell our app to not check for illegal cross thread calls. To do that, we only need to add one line to our form&#8217;s constructor.</p>
<p>CheckForIllegalCrossThreadCalls = <span style="color: #0000ff;">false</span>;</p>
<p>Next, you will need to add a click event listener to the button you added earlier. This event handler is where we will create and start our worker thread. When you build your new thread, you will need to pass it a function which will be where the work actually takes place. I called my thread function &#8220;Run&#8221; as shown below, but you can call yours whatever you want.</p>
<p>_workerThread = <span style="color: #0000ff;">new</span> <span style="color: #008080;">Thread</span>(<span style="color: #0000ff;">new</span> <span style="color: #008080;">ThreadStart</span>(Run));<br />
_workerThread.Start();</p>
<p>After you&#8217;ve setup your thread, make sure you have a function created with the same name as the name you passed to your ThreadStart above. That&#8217;s where we&#8217;ll be doing all of the heavy lifting. Instead of getting into all of the details about how to make your call to <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a>, I&#8217;m just going to go ahead and show you the code.</p>
<p><pre class="brush: csharp">        private void Run()
        {
            WebClient wc = new WebClient();
            wc.UseDefaultCredentials = true;
            wc.Proxy = WebRequest.DefaultWebProxy;
            wc.Proxy.Credentials = CredentialCache.DefaultCredentials;

            while (true)
            {
                txtDescription.Text = &quot;&quot;;
                pctImage.Image = null;
                pctImage.Invalidate();
                status.Value = 0;

                string html = wc.DownloadString(_url);
                Match m = Regex.Match(html, &quot;&lt;meta property=\&quot;og:title\&quot; content=\&quot;(.*?)\&quot; /&gt;&quot;);
                if (m.Success)
                {
                    string title = m.Groups[1].Value;
                    txtDescription.AppendText(title + &quot;\n\n&quot;);
                }
                m = Regex.Match(html, &quot;&lt;span class=\&quot;amount\&quot;&gt;(.*?)&lt;/span&gt;&quot;);
                if (m.Success)
                {
                    string amount = m.Groups[1].Value;
                    txtDescription.AppendText(&quot;$&quot; + amount + &quot;\n\n&quot;);
                }
                m = Regex.Match(html, &quot;&lt;meta property=\&quot;og:image\&quot; content=\&quot;(.*?)\&quot; /&gt;&quot;);
                if (m.Success)
                {
                    string imgUrl = m.Groups[1].Value;
                    pctImage.ImageLocation = imgUrl;
                }
                m = Regex.Match(html, &quot;&lt;div class='wootOffProgressBarValue' style='width:(.*?)%'&gt;&lt;/div&gt;&quot;);
                if (m.Success)
                {
                    int s = int.Parse(m.Groups[1].Value);
                    status.Value = s;
                }
                m = Regex.Match(html.Replace(&quot;\r&quot;, &quot;&quot;).Replace(&quot;\n&quot;, &quot;&quot;).Replace(&quot;\t&quot;, &quot;&quot;).Replace(&quot;  &quot;, &quot;&quot;), &quot;&lt;dt&gt;Product:&lt;/dt&gt;&lt;dd&gt;(.*?)&lt;/dd&gt;&quot;);
                if (m.Success)
                {
                    string description = m.Groups[1].Value.Trim();
                    txtDescription.AppendText(description + &quot;\n&quot;);
                }

                Thread.Sleep(Convert.ToInt32(interval.Value) * 1000);
            }
        }</pre></p>
<p>The most important piece to note here is that I&#8217;m using System.Net.WebClient to make the call to <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> to download the HTML which we&#8217;ll be scraping to find the important pieces. You&#8217;ll also notice that I&#8217;ve wrapped a good portion of this code with a &#8220;while&#8221; loop that never ends. That&#8217;s because I want this app to continuously check for new items either until I close the app or click the Stop button. I&#8217;m using System.Text.RegularExpressions.Regex to search for the item name, price, description, and image URL. Once found, that information gets appended to the rich text box we created earlier. If we hadn&#8217;t added the &#8220;CheckForIllegalCrossThreadCalls = false&#8221; line earlier, this is where we would&#8217;ve hit the Illegal Cross Thread Exception.</p>
<p>At the end of the function, you&#8217;ll see that I&#8217;m also System.Threading.Thread to tell the application to &#8220;wait&#8221; for a given amount of time. The Sleep method expects a time interval in milliseconds. Since our numeric up / down control only has the time in seconds, we simply multiply that value times 1000 to get the time into milliseconds.</p>
<p>Well, that&#8217;s pretty much it. If everything worked accordingly, you should be able to run your app and should see something like shown below. Keep in mind that this is only intended to be used on days that there&#8217;s a <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> Off happening. Even though it&#8217;ll probably work on other days, it hasn&#8217;t been tested and might not work as expected. If you are interested, I have provided the entire application solution available for download from <a title="C# Woot! Off Notifier" href="http://www.prodigyproductionsllc.com/downloads/CSharpWootOff.zip">http://www.prodigyproductionsllc.com/downloads/CSharpWootOff.zip</a>. It contains a couple of extra things not mentioned here that make the app complete such as checking if the worker thread is not null and is active and killing it if it is when closing the app.</p>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/csharp_woot_off.png"><img class="aligncenter size-full wp-image-2296" title="csharp_woot_off" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/csharp_woot_off.png" alt="C# Woot! Off Notifier Example" width="479" height="241" /></a>As always, please leave your comments, questions, and suggestions in the comments section below and I&#8217;ll answer you as soon as possible. Until next time, HAPPY CODING!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/c-woot-off-notifier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Woot! Off Notifier</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/python-woot-off-notifier/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/python-woot-off-notifier/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 05:05:54 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2285</guid>
		<description><![CDATA[If you&#8217;re like me, you enjoy the occasional Woot! Off. If you aren&#8217;t like me, there&#8217;s a good chance you don&#8217;t even know what a Woot! Off is. Hell, you probably don&#8217;t even know what Woot! is. If you aren&#8217;t familiar with Woot!, you should checkout an article I wrote a while back called &#8220;woot! woot! woot! [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2010/12/woot_logo.jpg"><img class="alignleft size-full wp-image-729" title="woot! Logo" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2010/12/woot_logo.jpg" alt="woot! Logo" width="151" height="53" /></a>If you&#8217;re like me, you enjoy the occasional <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> Off. If you aren&#8217;t like me, there&#8217;s a good chance you don&#8217;t even know what a <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> Off is. Hell, you probably don&#8217;t even know what <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> is. If you aren&#8217;t familiar with <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a>, you should checkout an article I wrote a while back called &#8220;<a title="woot! woot! woot! woot!" href="http://www.prodigyproductionsllc.com/articles/misc/woot-woot-woot-woot/">woot! woot! woot! woot!</a>&#8220;. Catchy title, huh? Anyways, a <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> Off is basically an event that happens periodically where the guys at <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> sell off their inventory one item after the other until everything is gone. Unlike their normal routine of only having one deal a day, a <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> Off can have several items in a short amount of time. It&#8217;s their way of cleaning house. But, you&#8217;ve gotta be quick if you want to land some of the good stuff as it goes quick! You have to constantly refresh your browser to see when something new has arrived. That&#8217;s what lead me to writing this article.</p>
<p><span id="more-2285"></span>Instead of constantly hitting the refresh button in your browser, waiting for something new to arrive, wouldn&#8217;t it just be easier to write a quick tool that would poll <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> for you? Yep. I thought so too. So, being the geek that I am, I fired up my Python Idle GUI and started hammering out some code to that will check with <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> every 60 seconds and print out each item. This tool is a simple screen scraper that downloads the HTML code from <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> and uses regular expressions to search for certain pieces of code, the pieces that contain things like item name and price.</p>
<p>I&#8217;ve written <a title="Write a Screen Scraper with Python" href="http://www.prodigyproductionsllc.com/articles/programming/write-a-screen-scraper-with-python/">other articles showing how to create screen scrapers using Python</a>. For this tool, I basically used the same thing, but added one extra class that provides me with a timer function which will be used to repeat the <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> check every minute. I&#8217;m sure there are other ways of creating timers and I know there are all kinds of modules out there that do this for me. But, this was a small chunk of code that I used in another project and decided it would be an easy fit here as well. So, without further ado, here is the Python code I wrote for scraping <a title="Woot!" href="http://www.woot.com" target="_blank">Woot!</a> and printing out the current item.</p>
<p><pre class="brush: python">import urllib, sgmllib
import re

from threading import Event, Thread

class RepeatTimer(Thread):
    def __init__(self, interval, function, iterations=0, args=[], kwargs={}):
        Thread.__init__(self)
        self.interval = interval
        self.function = function
        self.iterations = iterations
        self.args = args
        self.kwargs = kwargs
        self.finished = Event()
 
    def run(self):
        count = 0
        while not self.finished.is_set() and (self.iterations &lt;= 0 or count &lt; self.iterations):
            self.finished.wait(self.interval)
            if not self.finished.is_set():
                self.function(*self.args, **self.kwargs)
                count += 1
 
    def cancel(self):
        self.finished.set()

class Woot(sgmllib.SGMLParser):
    def __init__(self, verbose = 0):
        sgmllib.SGMLParser.__init__(self, verbose)
        self.url = &quot;http://www.woot.com&quot;
        self.content = &quot;&quot;

    def get_content(self):
        self.content = urllib.urlopen(self.url).read()
        self.close()
        return self.content

    def get_item_title(self):
        s = self.get_content()
        m = re.search('&lt;meta property=&quot;og:title&quot; content=&quot;(.*?)&quot; /&gt;', s)
        if m:
            return m.group(1)
        else:
            return &quot;&quot;

    def get_item_price(self):
        s = self.get_content()
        m = re.search('&lt;span class=&quot;amount&quot;&gt;(.*?)&lt;/span&gt;', s)
        if m:
            return &quot;${0}&quot;.format(m.group(1))
        else:
            return &quot;N/A&quot;

woot = Woot()

def check_woot():
    print &quot;n&quot;
    print woot.get_item_title()
    print woot.get_item_price()
    woot.close()

r = RepeatTimer(60.0, check_woot)
r.start()
</pre></p>
<p>If you run this code from your Idle GUI, you should see something that looks like this:</p>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/python_woot_off.png"><img class="aligncenter size-full wp-image-2288" title="python_woot_off" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/python_woot_off.png" alt="Python Woot! Off Notifier Example" width="555" height="321" /></a></p>
<p>You can change the wait time for the check to run by changing the first parameter passed to the RepeatTimer class at line 62 above. This parameter is defaulted to 60 seconds.</p>
<p>Feel free to extend this code by using IronPython or something similar to fire alerts when a new item is available. I was going to do that in this article, but decided against it as I&#8217;ve also created a C# version which I&#8217;ll be explaining in my next article. As always, please leave any questions, comments, and / or suggestions in the comments area below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/python-woot-off-notifier/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Strong Typing vs. Loose Typing</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/strong-typing-vs-loose-typing/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/strong-typing-vs-loose-typing/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 05:05:40 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2281</guid>
		<description><![CDATA[A few days ago, I told you about a conversation I had with some co-workers about the future of programming. One of the questions that was brought up in that conversation was should the &#8220;next programming language&#8221; be strong typed or loose typed? One of the others in the conversation completely believes that strong typing [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/strong_vs_weak.jpg"><img class="alignleft  wp-image-2282" title="strong_vs_weak" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/strong_vs_weak.jpg" alt="Strong vs Weak" width="128" height="96" /></a>A few days ago, I told you about a conversation I had with some co-workers about the future of programming. One of the questions that was brought up in that conversation was should the &#8220;next programming language&#8221; be strong typed or loose typed? One of the others in the conversation completely believes that strong typing is the only way to go. Being a student of all programming languages, I have mixed feelings about this. Before I get into that, let me explain the difference between strong typed and loose typed programming.</p>
<p><span id="more-2281"></span>To begin with, programming is nothing more than writing a list of commands that the computer must follow. To do that efficiently, the program needs to know what data type each object is. For example, the application needs to know if an object is a string or if it&#8217;s an integer. If it&#8217;s a string, the computer doesn&#8217;t know that &#8220;one plus one equals two&#8221;. Instead, the application needs to know that you have 2 objects, both of which are integers and can be added together. That way, when you want to add them, it can simply process 1 + 1 = 2. So, any object that has its object type explicitly defined is known as being &#8220;strong typed&#8221;. Anything that isn&#8217;t explicitly defined is known as being &#8220;loose typed&#8221;.</p>
<p>So, what does it matter which I use? Well, depending on which programming language you use, you will typically be forced to use one or the other. For example, if you&#8217;re programming in languages like Java or C#, you are required to tell the application what the data type is for each object used in your app. If you&#8217;re programming in languages like Perl, PHP, or Python, you don&#8217;t need to define your object types as the interpreters can figure it out on its own.</p>
<p>Ok. Then why should a developer prefer one over the other? Well, depending on who you ask, you will get different answers.  For example, one of my co-workers will only work with languages that rely on strong typing because he feels like it&#8217;s easier to look at a chunk of code, even when taken out of context, and know explicitly what type of object he&#8217;s looking at. While that&#8217;s true, an experienced coder can also look at a loose typed chunk of code and identify what type of objects he is looking at. Does the object value have quotes around it? Is it being used in an arithmetic formula? Does it include a decimal? These are some of the checks that interpreters follow when auto-identifying object types for loosely typed languages.</p>
<p>Even though I like the ability to explicitly tell my application what my object types are, I sometimes feel it time consuming to be required to do this for every object in my application. Take the code snippet below for example.</p>
<p>String name = &#8220;&#8221;;</p>
<p>The object type declaration makes up 35% of that line. Over time, this can add up to a lot of time wasted declaring data types for every object in an app.</p>
<p>There are plenty of other reasons to prefer one method over the other, but I won&#8217;t get into those right now. The examples listed above are enough to raise the question to other developers out there. What method do you prefer? In the comments below, let me know if you prefer strong typing or loose typing and let me know why. In the dicussion I had with my co-workers, we were split down the middle. But, for me, my answer is always based on the language needed for the job at hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/strong-typing-vs-loose-typing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Next for Software Development?</title>
		<link>http://www.prodigyproductionsllc.com/articles/programming/whats-next-for-software-development/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/programming/whats-next-for-software-development/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 18:13:55 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2275</guid>
		<description><![CDATA[Some co-workers and I recently had a conversation about programming and the question was asked, &#8220;what&#8217;s next?&#8221; The conversation started after reading an article about how Oracle is making a lot of changes that are effecting a huge crowd of developers and companies. I&#8217;ve said plenty of times before that i think Oracle will be [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/08/future_next_exit.jpg"><img class="alignleft  wp-image-2157" title="future_next_exit" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/08/future_next_exit.jpg" alt="The Future - Next Exit" width="143" height="114" /></a>Some co-workers and I recently had a conversation about programming and the question was asked, &#8220;what&#8217;s next?&#8221; The conversation started after reading an article about how Oracle is making a lot of changes that are effecting a huge crowd of developers and companies. I&#8217;ve said plenty of times before that i think Oracle will be the down fall of Java. However, one of my co-workers is wrapped up in Java that he feels like it is &#8220;the future&#8221; of programming. If he would have said that back in the &#8217;90s, I would&#8217;ve agreed. But, I don&#8217;t think that statement still stands true today. Let me explain why.</p>
<p><span id="more-2275"></span>Although I believe that Java is a great language, I believe that its time has come that something bigger and better will knock it down. For example, hardware is getting faster and faster with every passing moment. In fact, it&#8217;s pretty much impossible these days to find a processor that doesn&#8217;t have more than 1 core. In the programming world, this is a great thing as it means more speed! However, in the Java world, this is a bad thing as Java isn&#8217;t designed to work with multiple cores. So, you can throw parallel processing out the window when working with Java.</p>
<p>Even though it&#8217;s possible, Java also makes it very difficult to design applications that run distributed. Because of this, it&#8217;s extremely hard to design applications that can be separated onto multiple machines, but still share state or even play well with each other. So, if you want to get more performance out of the hardware itself, you find yourself throwing more memory at the server and adding a faster processor.</p>
<p>Ok. So Java doesn&#8217;t provide support for multi-core processors. It&#8217;s still a mature programming language that&#8217;s used widely enough to continue its growth. That&#8217;s true, but I believe that in about 5 years or so, we&#8217;re going to look back on Java the same way we do about languages like COBOL as we do today. Back in its day, COBOL was a good language. And, even though it&#8217;s still widely used, it&#8217;s still an old technology that people need to let go off and learn to embrace newer technologies. In a few years time, we will be saying the same thing about Java. &#8220;Back in its day, Java was a good language.&#8221; But, we need to stop using technologies just because &#8220;they&#8217;re good today&#8221;. We need to start looking at technologies of tomorrow.</p>
<p>Ok. So what about other languages? Well, there are some other languages out there right now that get just as much game-time as Java like C#. Being a developer of both Java and C#, I would definitely have to lean more toward C# for certain application types because of its willingness to work well with multi-core systems. For example, since the release of .NET 4, Microsoft has made parallel-processing much simpler. Before .NET 4, C# was still capable of working with multiple cores, but it was up to the developer to write their own parallel-processing modules, which were still relatively easy to do. However, even as big of a fan of C# as I am, I&#8217;m still doubting its ability to carry the title of &#8220;the programming language of the future&#8221;.</p>
<p>I know there are a number of other languages out there, languages that far exceed the performance and ease of use of Java and C#. In fact, there are hundreds of languages out there that better utilize multi-core processors and make the whole development process extremely simple. But, I still haven&#8217;t seen anything yet that I would learn towards as being the future of programming. Now, before I start getting hate mail from you guys, I will remind you that I write in almost every programming language you will write to me about. With that said, I am more than qualified to make that statement. So, don&#8217;t be hating on me because you think that I&#8217;m not being fair about any language (C# and Java included) imparticular because I&#8217;m not. I am a huge fan of other languages as well whether they are compiled or interpreted. And, although I will admit that there are some languages out there that fall pretty close to what I would consider the future of programming, I believe that those candidates are still a little too premature to award that title just yet. But, I&#8217;m hoping that over the next couple of years we will see some of those languages evolve into the greatest thing since sliced bread or that someone will come along with something even better than anything I&#8217;ve ever seen before, something that just rocks my socks! Until then, it&#8217;s back to my world of writing code in Java, C#, C++, Perl, PHP, Python, Scheme, Lisp, Ruby, R, etc&#8230;</p>
<p>Ok. Now you can start sending me hate mail. Or, you can just leave your comments below. <img src='http://www.prodigyproductionsllc.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>P.S. The last time I wrote about this, I received over 200 emails telling me I don&#8217;t know what I&#8217;m talking about. So, I&#8217;m looking forward to getting those again. It shows me that there are a lot of you out there asking the same questions I am. And, as always, your feedback is greatly appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/programming/whats-next-for-software-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Real-Time Collaboration Server</title>
		<link>http://www.prodigyproductionsllc.com/articles/general/real-time-collaboration-server/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/general/real-time-collaboration-server/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 02:22:54 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2268</guid>
		<description><![CDATA[As most of you have pointed out, I haven&#8217;t been actively posting articles on this site like I use to. You may also have read that&#8217;s because I am currently working on yet another startup. I can&#8217;t go into details about that startup just yet. But, I can tell you about one small piece of [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/team_collaboration.jpg"><img class="alignleft  wp-image-2269" title="team_collaboration" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2012/01/team_collaboration.jpg" alt="Team Collaboration" width="196" height="107" /></a>As most of you have pointed out, I haven&#8217;t been actively posting articles on this site like I use to. You may also have read that&#8217;s because I am currently working on yet another startup. I can&#8217;t go into details about that startup just yet. But, I can tell you about one small piece of it. In fact, it&#8217;s a piece that has actually spun off into its own side-project.</p>
<p><span id="more-2268"></span>One of the things that my new startup will be utilizing a great deal is real-time collaboration. If you don&#8217;t know what real-time collaboration (RTC) is, you should checkout <a title="Google Docs" href="http://docs.google.com" target="_blank">Google Docs</a>. Basically, RTC is a system that allows multiple users to work on the same document at the same time over the web from anywhere in the world. For example, I could be typing this very article into an RTC app and you could also have this same article pulled up at the same time. As I type, you would see everything I type within your screen. Plus, you could make modifications to this same document while I&#8217;m typing it. If you&#8217;ve never messed around with RTC, now would be a great time for you to as it&#8217;s a fast growing phenomenon that I believe is going to be the future for all of us.</p>
<p>If you&#8217;re interested in starting your own RTC server &amp; site, you should checkout <a title="Etherpad Real-time Collaboration Server" href="http://www.etherpad.org" target="_blank">Etherpad</a> (<a title="Etherpad Real-time Collaboration Server" href="http://www.etherpad.org" target="_blank">http://www.etherpad.org</a>). <a title="Etherpad Real-time Collaboration Server" href="http://www.etherpad.org" target="_blank">Etherpad</a> is an open source RTC server and client that provides everything you need for collaborating on documents in real-time. However, that&#8217;s where the buck stops. Although it&#8217;s great for editing text documents in real-time, it doesn&#8217;t provide anything more than that. <a title="Google Docs" href="http://docs.google.com" target="_blank">Google Docs</a> on the other hand provides support for collaborating on text documents, spreadsheets, presentations, and drawings. For my new startup, that&#8217;s not enough.</p>
<p>So, I&#8217;ve decided to build my own RTC system, but with more power. My new RTC system is more of a platform than an basic RTC system like <a title="Etherpad Real-time Collaboration Server" href="http://www.etherpad.org" target="_blank">Etherpad</a>. However, it does allow for the same functionality that <a title="Etherpad Real-time Collaboration Server" href="http://www.etherpad.org" target="_blank">Etherpad</a> and <a title="Google Docs" href="http://docs.google.com" target="_blank">Google Docs</a> have. A couple of days ago, I began creating a platform using Python and jQuery that allow you to build and bolt-on any type of collaboration mechanisms you want. The platform provides you with a fast and reliable server that can handle pretty much any time of multiple user collaboration. For example, to test the system, I built a plugin that does basically what <a title="Etherpad Real-time Collaboration Server" href="http://www.etherpad.org" target="_blank">Etherpad</a> does. It allows you to create and edit text documents in real-time. But, I didn&#8217;t stop there. I also built a plugin that allows you to collaborate on spreadsheets in real-time just like <a title="Google Docs" href="http://docs.google.com" target="_blank">Google Docs</a>. I even took things a little further by creating a plugin that allows you to quickly and easily build a real-time chatroom complete with video conferencing. Heck, I&#8217;ve even taken it one step further and began introducing a plugin that allows you to open and collaborate on drawings in real-time, again just like <a title="Google Docs" href="http://docs.google.com" target="_blank">Google Docs</a>.</p>
<p>Even though I&#8217;ve only spent a few days working on this real-time collaboration platform, I still have a lot to show for it. And, hopefully, I&#8217;ll have something stable to release into the open source community within the next couple of weeks. I want to iron out as many bugs as I can and build several more plugins before I release the platform into the wild. Once I do, the system is flexible enough that anyone can quickly and easily build more plugins to run on top of my platform that can handle any kind of real-time collaboration needs that users may require. For example, some of the other plugins I plan on building include a software application development module for any type of language (Java, C#, Javascript, Opa, PHP, Perl, Python, etc&#8230;) complete with compilers and version control. I also plan to include a web site designer / collaboration plugin.</p>
<p>Anyways, enough mumbling. I&#8217;ve gotta get back to work on the new project. Once it&#8217;s ready for the world, I&#8217;ll come back here and post a full article about it. So, stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/general/real-time-collaboration-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Droid Motorola RAZR Review</title>
		<link>http://www.prodigyproductionsllc.com/articles/reviews/droid-motorola-razr-review/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/reviews/droid-motorola-razr-review/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 15:18:15 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2263</guid>
		<description><![CDATA[I know that the 2 remaining Research In Motion customers are going to be pissed when they read this article. But, I&#8217;m writing it anyways. Yes, it is true. I have finally retired my Blackberry and moved over to the Droid side of the force. Being a (very very very) long time Blackberry user, it [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/droid_razr.jpg"><img class="alignleft  wp-image-2264" title="droid_razr" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/droid_razr.jpg" alt="Motorola Droid RAZR" width="120" height="105" /></a>I know that the 2 remaining Research In Motion customers are going to be pissed when they read this article. But, I&#8217;m writing it anyways. Yes, it is true. I have finally retired my Blackberry and moved over to the Droid side of the force. Being a (very very very) long time Blackberry user, it was a sad day when I decided I&#8217;d had enough. Even though the rest of the world had already accepted that RIM was on a downward spiral, I kept my faith in the company and their products. But recently, it seems like RIM wants to go out of business. First it was the premature release of their Blackberry Playbook (which was an over priced and under sized piece of crap). Then RIM suffered several world-wide network outages. And recently, RIM executives were the cause of international flights being grounded because they had a few too many drinks. All of that aside, I felt like the Blackberry products I once loved were gradually degrading. My last Blackberry was nice at first, but over time it seemed to literally fall apart. Even though I take great care of things I own (including my cellphone), my last Blackberry broke to a point that I couldn&#8217;t bare to use it any more. That&#8217;s when I decided to take the leap and purchase a new Droid device.</p>
<p><span id="more-2263"></span>First off, I hate Apple. So, the iPhone was not an option for a new cellphone for me. When deciding on a new phone, I compared several droid phones and even threw in the new Blackberry for good measure. But, I quickly dismissed the Blackberry as I don&#8217;t have confidence that RIM will exist much longer, not in its current form anyway. Since I would be signing a new 2 year contract with my carrier, I didn&#8217;t want to invest in a Blackberry, or any phone for that matter, that was manufactured by a company that might not be around for the remainder of my contract. With Google&#8217;s recent purchase of Motorola Mobility and Google already being the owner of Android, I felt like the I should put my money into a new Motorola Droid device and that&#8217;s when I found the Motorola RAZR.</p>
<p>The new Droid RAZR has a blazing fast dual core 1.2GHz processor and 1GB of LP DDR2 RAM. With it&#8217;s 16GB of internal memory and the additional pre-installed 16GB microSD card, this little guy provides me with plenty of storage. And, all of that storage can easily be filled up since this phone is 4G LTE compatible. The RAZR has an 8MP rear facing camera and a 1.3MP front facing camera which is nice for several reasons. The rear facing camera records HD video at 1080p while the front facing camera only records HD at 720p. This is plenty since I don&#8217;t plan on recording the next mega-movie with my phone anyways.</p>
<p>For video, the RAZR has a huge 4.3&#8243; Super AMOLED advanced display with qHD resolution of 960&#215;540. I dropped a couple of ripped HD videos onto the microSD card and watched them on the phone. Needless to say, the video playback was beautiful! The colors were nice and crisp. The contrast was perfect and the lighting was spot on. Even though the video playback of my Blackberry was sharp, it has nothing on the video and screen size of the RAZR.</p>
<p>I&#8217;ve only had my new RAZR for a week now. But, so far, the battery life has been pleasing. With this being a new &#8220;toy&#8221; for me, I&#8217;ve put it to some heavy use over the last week and the battery seems to only drop by a little. Every night before bed, I still plug my phone into the charger. So, the next day the phone is ready to rock &#8216;n roll all over again.</p>
<p>As for the things I don&#8217;t like about this phone, I only have a few. The first thing I noticed about this phone is that it comes with a lot of crapware pre-installed. Even though you can remove the majority of it, there are still several apps that you can&#8217;t get rid of. Everyone in the forums recommend using the application groups to create a group for apps I don&#8217;t want to see and then simply hide that group. Out of sight out of mind I guess. The second thing I don&#8217;t like about this phone is that it&#8217;s still running Android 2.3.5 (Gingerbread). With this being such a recent released phone, you would think that it would&#8217;ve at least been running Honeycomb or even better Ice Cream Sandwich. Hopefully there will be an update released in the very near future. The third and final thing I don&#8217;t like about this phone is that it does not have a &#8220;real&#8221; keyboard. Being completely touchscreen, the RAZR does have the virtual qwerty keyboard. So, going from the traditional Blackberry chicklet keyboard to a virtual keyboard is not fun for me.</p>
<p>Even though the RAZR is much bigger than my Blackberry, it feels like it&#8217;s a lot lighter. The body of the RAZR is made of KEVLAR &amp; carbon fiber and the screen is made of Gorilla Glass. So, this thing can also take a beating.</p>
<p>Overall, I&#8217;m very pleased with my new RAZR and think that I made a good purchase when deciding to go with it. Being the geek that I am, I&#8217;ve already started writing a few apps for it and hope to have them added to the Market Place some time around the beginning of the year. When I do get my apps in the Market Place, I&#8217;ll be sure to come back here and post some information about the apps, including links to them in the store.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/reviews/droid-motorola-razr-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book Builder</title>
		<link>http://www.prodigyproductionsllc.com/articles/books/book-builder/</link>
		<comments>http://www.prodigyproductionsllc.com/articles/books/book-builder/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 17:50:48 +0000</pubDate>
		<dc:creator>LuCuS</dc:creator>
				<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://www.prodigyproductionsllc.com/?p=2251</guid>
		<description><![CDATA[A while back, I mentioned that I was starting work on a new book called &#8220;Computer vision with OpenCV &#38; C#&#8221;. Since that announcement, I have received a lot of feedback from readers interested in the book. At the same time, I have also received almost as much interest in the tool I&#8217;m using to [...]]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPython.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
            <script type="text/javascript" src="http://www.prodigyproductionsllc.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/book_building.jpg"><img class="alignleft size-full wp-image-2252" title="book_building" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/book_building.jpg" alt="Book Building" width="141" height="115" /></a>A while back, I mentioned that I was starting work on a new book called &#8220;Computer vision with OpenCV &amp; C#&#8221;. Since that announcement, I have received a lot of feedback from readers interested in the book. At the same time, I have also received almost as much interest in the tool I&#8217;m using to write the book. Almost every person I have answered this question for was surprised to learn that I&#8217;m actually using an application I designed myself. That brings me to the purpose of this post. I want to take a minute to share with you my application as some of you might find it useful as well.</p>
<p><span id="more-2251"></span>For many writers, tools like Microsoft Office (Word) are more than enough for writing. However, I&#8217;m not a typical writer. I&#8217;m a programmer. I&#8217;m a true, natural born coder. And for that, I decided to write my own tool to help me with my writing. Now, I know that there are plenty of commercial and even some free applications already out there that are designed to to assist with writing books and such. But, I still felt like I needed a tool to call my own. That&#8217;s when the &#8220;Book Builder&#8221; was born.</p>
<p>Book Builder is a simple C# application that assists in the creation and maintenance of writing books, but can also be used for much more. The tool is a simple text editor complete with spell check and is currently capable of exporting to TXT, HTML, and PDF. In the near future, I will also be adding the ability to publish directly to WordPress. The tool begins with you creating a new book. Once you have your new book created, you can add as many chapters as you want in the list on the left. As you add new chapters, the Table of Contents is auto-updated to reflect each chapter. The TOC even updates in-real-time as you change the chapter names. You can re-order your chapters by simply dragging and dropping the chapters in the list on the left.</p>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/book_builder_screenshot.jpg"><img class="aligncenter size-full wp-image-2253" title="book_builder_screenshot" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/book_builder_screenshot.jpg" alt="Book Builder" width="403" height="350" /></a></p>
<p>When you export to PDF, each chapter is started on a new page. PDFs include a &#8220;first page&#8221; that includes the title of your book and the author&#8217;s name. Each page after the Table of Contents includes auto-generated page numbers and the time and date the PDF was generated. In a future release, these auto-generated timestamps and page numbers will be customizable and can be completely omitted if desired. In the next couple of days, I also plan on auto-linking chapters in the TOC directly to the pages that each chapter is on in the exported PDF. I will also be including an auto-generated Appendix that can be modified by the user, but will auto-update page numbers as you modify your book.</p>
<p>One of the cool features of the program as it stands is the ability to easily switch between chapters. When working in tools like Word, you have to scroll forever until you get to the chapter you want to work on. With this tool, you can jump between chapters by simply clicking the chapter name in the list on the left. You can even do this without having to save each chapter before navigating to another. In the next version, I will be including an indicator next to chapter names to signal chapters that have not been saved. I will also be allowing you to save individual chapters one at a time or all chapters at the same time.</p>
<p>As mentioned earlier, the tool comes complete with a spell checker. However, spell check currently only works for the chapter you currently have selected. In a future version, I will allow you to spell check the entire book and not have to check each chapter individually. The spell checker is a fully functional utility that even allows you to add new words to your dictionary. When words are flagged as being misspelled, the word is highlighted red as shown below.</p>
<p><a href="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/book_builder_spellcheck.jpg"><img class="aligncenter size-full wp-image-2254" title="book_builder_spellcheck" src="http://www.prodigyproductionsllc.com/wp-content/uploads/2011/12/book_builder_spellcheck.jpg" alt="Book Builder - Spell Check" width="542" height="333" /></a></p>
<p>I still have a lot of work to do before the tool is production ready. But, you can still download a copy of it as it is today to play around with. After I add the features already mentioned above, I still have to add some other basic functionality such as formatting. Once all of this is in place, I&#8217;ll come back here and post a link to the newest version and will also be providing the source code for others to work with. Until then, feel free to grab a copy of the tool from <a title="Book Builder Download" href="http://www.prodigyproductionsllc.com/downloads/BookBuilder.zip">http://www.prodigyproductionsllc.com/downloads/BookBuilder.zip</a>. And, as always, let me know what you think about it in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodigyproductionsllc.com/articles/books/book-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

