<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://jpiche.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Joseph Piché</title>
 <link>http://jpiche.com</link>
 <description></description>
 <language>en</language>
<item>
 <title>5 years of achievements </title>
 <link>http://jpiche.com/blog/5-years-achievements</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;Friday, May 13th marked an important milestone in my life: 5 years of being married to my beautiful wife. And while those five years were filled with both excitement and hardship, they have gone too fast. Here&#039;s a snippet of what happened in the last 5 years: I got married, graduated with a BA after only 3 years of college, got promoted to Director of IT at that college, witnessed the birth of my son, got credentialed as a minister in the Assemblies of God, bought a car, moved from North Dakota to Minnesota for my first job as a full-time programmer, gave up my ministerial credentials, peaked at $92k of debt, got a new job, paid off almost $20k of debt in one year, and witnessed the birth of my daughter.&lt;/p&gt;

&lt;p&gt;After reminiscing on all that, I feel a bit nostalgic and remember that I will probably never go back into the classroom for another degree and that I have already worked in Technology much longer than the average. However, I know I have so much to look forward to in the next five. Watching my son grow up brings me more joy than anything else, and I can&#039;t wait to see both my kids play and grow together.&lt;/p&gt;

&lt;p&gt;As for future achievements, I am proud to say that after years of talking about writing a book&amp;mdash;and not doing anything serious about it, I finally found a good topic with enough material, and officially started outlining. A couple weeks ago, I had a bit of a &amp;ldquo;lightbulb&amp;rdquo; moment when I really understood that I will not be able to pursue anything more in academics&amp;mdash;probably ever. But who says I have to? The mountain of writing I did in college should have taught me at least that I am capable of writing a book if I simply sit down and do it; and if I&#039;m able to write a book already, why would I need a master&#039;s degree? And you know what? Biblical exegesis, translating ancient Greek, and reading entire philosophy books in a day is much more fun than I remember.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;Tags: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/38&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;philosophy&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 18 May 2011 03:42:40 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">60 at http://jpiche.com</guid>
 <comments>http://jpiche.com/blog/5-years-achievements#comments</comments>
</item>
<item>
 <title>Shutdown from the system menu in Ubuntu</title>
 <link>http://jpiche.com/2011/02/shutdown-from-the-system-menu-in-ubuntu</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;My introduction to GNU/Linux came when GNOME 2.10 was still in development and Gentoo still seemed like a good idea. I still get nostalgic thinking about the hours I wasted compiling X on a 256MB RAM laptop with a 1.2GHz Celeron, so it is no wonder that tiny changes to the GNOME user experience can bother me immensely.&lt;/p&gt;&lt;p&gt;Most recently, changes in Ubuntu like defaulting the border button layout to the left or not allowing rhythmbox to have a tray icon have just about made me scream, but both are easily solved: gconf-editor and banshee. However, the one issue which has been a thorn in my side for over a year is moving the shutdown and logout functions from the system menu to the indicator applet. Shutting down, suspending, logging out&amp;mdash;those are all essential tasks which have been located in the same place since long before I started using GNOME. As soon as I noticed this change, two questions arose: &quot;why?&quot; and &quot;how do I put them back?&quot;&lt;/p&gt;&lt;p&gt;As annoying as the change was, I eventually got used to it, as neither of my questions were answered. However, that changed this week when I was reminded of this dilemma and decided to take a second look. To my surprise, the functions are easily moved back by simply removing Indicator Applet Session from the panel. I don&#039;t know why I never thought of doing that before instead of digging through endless control panels and configuration files. Now I wonder if I will keep it this way since I&#039;ve been using the session applet for so long.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;Tags: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/22&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;gnome&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/48&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;UX&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 21 Feb 2011 16:58:03 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">55 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2011/02/shutdown-from-the-system-menu-in-ubuntu#comments</comments>
</item>
<item>
 <title>Single-threaded pancake flipping</title>
 <link>http://jpiche.com/2011/01/single-threaded-pancake-flipping</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;Having an educational background in Philosophy, I tend to think about trivial tasks more than I should. Sometimes this gets me into trouble, like when I waste endless hours studying the Python &lt;a href=&quot;http://wiki.python.org/moin/GlobalInterpreterLock&quot; target=&quot;_blank&quot;&gt;GIL&lt;/a&gt; or study code used in &lt;a href=&quot;http://shootout.alioth.debian.org/&quot; target=&quot;_blank&quot;&gt;The Computer Language Benchmarks Game&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This week while looking at code, I ran across the &lt;a href=&quot;http://shootout.alioth.debian.org/u32/performance.php?test=fannkuchredux&quot;&gt;Fannkuch-redux&lt;/a&gt; benchmark, and was instantly intrigued. The problem being solved by the benchmark can be described as brute-forcing a conjecture of the limit of &amp;ldquo;flips&amp;rdquo; of a certain set of numbers. The task is relatively simple (taken directly from link above):&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Take a permutation of {1,...,n}, for example: {4,2,1,5,3}.&lt;/li&gt;&lt;li&gt;Take the first element, here 4, and reverse the order of the first 4 elements: {5,1,2,4,3}.&lt;/li&gt;&lt;li&gt;Repeat this until the first element is a 1, so flipping won&#039;t change anything more: {3,4,2,1,5}, {2,4,3,1,5}, {4,2,3,1,5}, {1,3,2,4,5}.&lt;/li&gt;&lt;li&gt;Count the number of flips, here 5.&lt;/li&gt;&lt;li&gt;Keep a checksum.&lt;/li&gt;&lt;li&gt;Do this for all n! permutations, and record the maximum number of flips needed for any permutation.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The name of the benchmark comes from the German word for pancakes, and is used because the analogy of pancake flipping sort-of fits (and sort-of doesn&#039;t).&lt;/p&gt;&lt;p&gt;After studying both single-threaded and multi-threaded implementations of the benchmark in a number of languages, I found that the &lt;a href=&quot;http://shootout.alioth.debian.org/u32/program.php?test=fannkuchredux&amp;amp;lang=java&amp;amp;id=2&quot;&gt;Java&lt;/a&gt;, &lt;a href=&quot;http://shootout.alioth.debian.org/u32/program.php?test=fannkuchredux&amp;amp;lang=python&amp;amp;id=6&quot;&gt;Python&lt;/a&gt;, and &lt;a href=&quot;http://shootout.alioth.debian.org/u32/program.php?test=fannkuchredux&amp;amp;lang=php&amp;amp;id=1&quot;&gt;PHP&lt;/a&gt; versions told the most interesting stories. When running for input &lt;kbd&gt;12&lt;/kbd&gt;, these programs took 68.99 seconds, 43 minutes, and 1 hour 26 minutes respectively on a single-core x86 machine.&lt;/p&gt;&lt;p&gt;While an extremely small portion of web programming relies on pure number-crunching, these numbers are a bit unsettling nevertheless. Each version of the benchmark runs almost identical code and yet the time taken to run the code varies by over an hour. I&#039;ve always known that PHP is a joke and should not be considered a &amp;ldquo;real&amp;rdquo; language, but this is a bit ridiculous.&lt;/p&gt;&lt;p&gt;Of course since the C implementation was missing, I translated the Java version and submitted it. &lt;a href=&quot;http://shootout.alioth.debian.org/u32/program.php?test=fannkuchredux&amp;amp;lang=gcc&amp;amp;id=1&quot;&gt;The result&lt;/a&gt; is rather intriguing: it only ran for 57.79 seconds. Then I noticed the memory usage. My C version only used 256 KB of RAM, where the Java version used 12MB, Python used 3MB, and PHP used 5MB.&lt;/p&gt;&lt;p&gt;Drawing conclusions from benchmarks like these is probably a bad idea; different programming languages are built for different purposes. For example, I am very glad PHP does not have a &lt;code&gt;volatile&lt;/code&gt; keyword or similar nasty things Java and C have, because PHP is built as a simple language that anyone can pick up and start programming in with no experience. However, I am sad that Python&amp;mdash;in its zen of language and &amp;ldquo;batteries included&amp;rdquo; philosophy&amp;mdash;does not have a simple method for compilation to machine code; interpreted code can be harmful at times.&lt;/p&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 22 Jan 2011 01:23:24 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">54 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2011/01/single-threaded-pancake-flipping#comments</comments>
</item>
<item>
 <title>The risk of third-party code</title>
 <link>http://jpiche.com/2011/01/the-risk-of-third-party-code</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;In business, the purpose of programming is to solve problems. Some problems are simple, and even if time consuming, have solutions which are easily discernible. These types of problems encompass the majority of what makes up &lt;i&gt;web development&lt;/i&gt;, like if one or more programmers are given the task of implementing a design into a fully-functioning website.&lt;/p&gt;

&lt;p&gt;Large and complex problems for a web developer are few and far between. Examples might include persistently tracking user clicks on a page without the use of cookies, or performing data processing on hundreds of millions of records in a database and sending the results across the continent in under 0.1 seconds. These are the types of problems I thrive on; give me something seemingly impossible, and I will obsess over it until I find a solution.&lt;/p&gt;

&lt;p&gt;In real life though, the dollar drives the workload. And if someone wants just a plain old website like everyone else on the internet, I then have a simple problem with an easily discernible solution. So easy in fact, that my job is no longer writing code, but re-purposing already existing code. And due to the plethora of code already written by other programmers&amp;mdash;both open source and proprietary&amp;mdash;chances are that a simple cost-benefit analysis of the available options reveal that using code someone else has already written will yield better results. This is codified in the principle &amp;ldquo;Don&#039;t repeat yourself.&amp;rdquo;&lt;/p&gt;

&lt;p&gt;And here is the warning: if you use someone else&amp;rsquo;s code, always research the risks involved. If the project is to implement a cookie-cutter brochure-like website, using Drupal as a Content Management tool probably has a small amount of risk. However, if the line is starting to be blurred between the simple problem and the complex, make sure to analyze the situation correctly. The risk of using third-party code may be larger than you realize.&lt;/p&gt;

&lt;p&gt;This may not be as obvious as it sounds. The quick case-study is inheriting a project from another developer in your company where the project has a small budget&amp;mdash;or no budget. Every minute spent on the project is time lost, so taking 10 minutes or an hour to review the codebase may not seem like a good idea. The project launches. Then 3 months go by and everything breaks at a crucial moment and your company loses $100,000. You spend hours on end frantically searching the code and eventually discover a bug in an untested third-party module in which &lt;a href=&quot;http://stackoverflow.com/questions/1978051/zend-datetostring-outputs-the-wrong-year-bug-in-my-code-or-zend-date&quot; target=&quot;_blank&quot;&gt;someone used &amp;ldquo;YYYY&amp;rdquo; instead of &amp;ldquo;yyyy&amp;rdquo;&lt;/a&gt;. Not good.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 11 Jan 2011 07:34:24 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">53 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2011/01/the-risk-of-third-party-code#comments</comments>
</item>
<item>
 <title>TinyFeed, rewritten</title>
 <link>http://jpiche.com/2011/01/tinyfeed-rewritten</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;Today marks the release of &lt;a href=&quot;http://wordpress.org/extend/plugins/tinyfeed/&quot; target=&quot;_blank&quot;&gt;TinyFeed 2.0&lt;/a&gt; (and subsequently 2.0.1 because of svn issues). Version 2 is a rewrite of the plugin, and while the features are the same as the original, the way the plugin functions has been greatly improved.&lt;/p&gt;

&lt;p&gt;TinyFeed was the first Wordpress plugin I ever wrote and was initially released September 2009. Wordpress has changed a bit since then, however not enough that anything impacted how TinyFeed works. I was new to Wordpress, and didn&#039;t take enough time to figure out how tactics like inline loading of jQuery might effect other plugins. My Wordpress-ing has matured a bit and I have now taken the time to research how TinyFeed might interact with other plugins, and have rebuilt how javascript is loaded, and all the scripting itself.&lt;/p&gt;

&lt;p&gt;For future enhancements, I plan on adding &lt;a href=&quot;http://status.net&quot; target=&quot;_blank&quot;&gt;StatusNet&lt;/a&gt; support, customizable timestamps from the Wordpress admin, and linking within status text.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 08 Jan 2011 03:59:35 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">52 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2011/01/tinyfeed-rewritten#comments</comments>
</item>
<item>
 <title>File Descriptors vs Threads</title>
 <link>http://jpiche.com/2011/01/file-descriptors-vs-threads</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;Being an obsessive computer programmer, I spend the majority of my time on a computer. Not all of it is work&amp;mdash;in fact, in an average week I spend about 10-15 hours researching and teaching myself new things. A few weeks ago, I spent some time reading code from a few HTTP servers, and researching they handle upwards of 10000 simultaneous connections (&lt;a href=&quot;http://en.wikipedia.org/wiki/C10k_problem&quot; target=&quot;_blank&quot;&gt;the c10k problem&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Almost all of the sites I put out run on Apache. Most PHP hosting providers use Apache as the web server of choice, Magento &lt;a href=&quot;http://www.magentocommerce.com/system-requirements&quot; target=&quot;_blank&quot;&gt;requires Apache&lt;/a&gt;, and Django documentation recommends &lt;a href=&quot;http://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/&quot; target=&quot;_blank&quot;&gt;Apache + mod_wsgi&lt;/a&gt;. I don&#039;t run any sites that get near to c10k, but after attending a seminar on Javascript which talked about events vs threads, I started to think I was setting myself up for failure by using a web server which is restricted to a static number of connections.&lt;/p&gt;

&lt;p&gt;The two web servers I spent the most time analyzing were Apache and Nginx. After hours of pouring over code, learning the difference between &lt;code&gt;epoll&lt;/code&gt; and &lt;code&gt;/dev/poll&lt;/code&gt;, and finding new benchmark tools (&lt;a href=&quot;http://httpd.apache.org/docs/2.2/programs/ab.html&quot; target=&quot;_blank&quot;&gt;ab&lt;/a&gt; is amazing), I came to the conclusion that the web server is not the bottleneck: &lt;del&gt;CGI&lt;/del&gt; dynamic content through scripting languages is the bottleneck. If Apache is configured correctly, c10k is achievable, but only as long as you keep web scripting away from it. If fact, because of the way Debian builds mod_php, Apache is forced to run by &lt;a href=&quot;http://en.wikipedia.org/wiki/Fork_(operating_system)&quot; target=&quot;_blank&quot;&gt;forking&lt;/a&gt; and is unable to use threads or event-based connection handling.&lt;/p&gt;

&lt;p&gt;On the other hand, while Nginx uses the event model to solve the c10k problem, it does not directly allow scripting at all. Dynamic content can only be served by proxying content from solutions like &lt;a href=&quot;http://php-fpm.org/&quot; target=&quot;_blank&quot;&gt;PHP-FPM&lt;/a&gt;, WSGI modules, or another web server like Apache. So if your webserver only has 256MB of RAM, serving thousands of simultaneous connections is possible if your site is completely static, but as soon as you make something dynamic, your machine just might explode.&lt;/p&gt;

&lt;p&gt;So is there a solution to this mess? If you are using PHP, opcode caching solutions like APC will help you keep your server from swapping. It is a bit like cheating, but if you have a solution to keep your cache fresh, it might just help you sleep at night.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;Tags: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/11&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;c10k&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/37&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;performance&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/50&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;web-servers&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description>
 <pubDate>Thu, 06 Jan 2011 05:15:17 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">51 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2011/01/file-descriptors-vs-threads#comments</comments>
</item>
<item>
 <title>Free Software, not Open Source</title>
 <link>http://jpiche.com/2010/09/free-software-not-open-source</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;Being an advocate of Free Software of all kinds, I often resort to using colloquial terms. &amp;ldquo;Open Source&amp;rdquo; is much easier to say, and I thought is more understood, than &amp;ldquo;Free Software&amp;rdquo;, &amp;ldquo;Free/Libre Software&amp;rdquo;, or &amp;ldquo;Freedom Software&amp;rdquo;. I understand that &amp;ldquo;Open Source&amp;rdquo; &lt;a href=&quot;http://www.gnu.org/philosophy/open-source-misses-the-point.html&quot;&gt;misses the point&lt;/a&gt;, but I recently discovered that some people are instead using the phrase to mean &amp;ldquo;you can view the source code even though you have no rights to do anything with it.&amp;rdquo; Two &lt;a href=&quot;http://www.magentocommerce.com/&quot; target=&quot;_blank&quot;&gt;Magento&lt;/a&gt; extension development companies, AITOC and AheadWorks, both advertise their products as such: &amp;ldquo;&lt;a href=&quot;http://ecommerce.aheadworks.com/subscriptions-and-recurring-payments.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;100% Open Source&lt;/a&gt;.&amp;rdquo; This is smart advertising for them, as it is true: the source code can be easily viewed (unlike other Magento extensions with obfuscated or compiled source). But as a promoter of Free Software, I now have the added responsibility of explaining to people how those companies are false advertising.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;Tags: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/20&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;freedom&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/21&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;frustrations&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 14 Sep 2010 13:48:23 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">50 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2010/09/free-software-not-open-source#comments</comments>
</item>
<item>
 <title>“Over half of the web is flash”</title>
 <link>http://jpiche.com/2010/07/over-half-of-the-web-is-flash</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;Out of nowhere I hear someone at the other end of the office (we share with two other companies) blurt out, &amp;ldquo;over half of the web is flash.&amp;rdquo; This person always leaves his door open and talks loudly, so I&#039;ve learned to tune him out, but this line grabbed me. First, I feel this number is wrong. Second, there is no way to know with a good amount of certainty what the percentage is. From the continuing context, I learned that he was talking about the iPad and its lack of Flash support, criticizing Apple for becoming &amp;ldquo;the next Microsoft&amp;rdquo;&amp;mdash;whatever that means. He concludes with saying an increasing amount of developers are starting to program for android.&lt;/p&gt;&lt;p&gt;This whole conversation triggered feelings of anger and frustration at this person. I hate Flash; I hate Flash a lot. But this is not because Flash is not supported on the iPad, or that it is full of security holes, or that distributing unchecked byte-code is an inherently bad idea. I hate Flash because it is closed source, anti-freedom software controlled by a single entity interested only in financial gain.&lt;/p&gt;&lt;p&gt;Do I have Flash installed? Yes, and according to &lt;a href=&quot;http://www.adobe.com/products/player_census/flashplayer/&quot; rel=&quot;nofollow&quot;&gt;certain surveys&lt;/a&gt;, up to 99% of internet users have Flash installed. And it disgusts me. I try to not install it, or run it only in controlled virtual environments, but it is ubiquitous. Many &amp;ldquo;social marketing&amp;rdquo; companies promote using sites like YouTube, which almost exclusively uses Flash for its videos, so when clients ask for YouTube, I reluctantly grant.&lt;/p&gt;&lt;p&gt;But while I concede to its use when necessary, I never create new material using Flash and whenever possible evangelize open technologies and Free/Libre alternatives. And I beseech you, reader, to also stop developing for or using Flash.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 20 Jul 2010 04:04:51 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">49 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2010/07/over-half-of-the-web-is-flash#comments</comments>
</item>
<item>
 <title>Getting Paid to Write AI</title>
 <link>http://jpiche.com/2010/06/getting-paid-to-write-ai</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;One of the best parts of my previous job&amp;mdash;and also the part that kept me going for so long&amp;mdash;is that I had the chance to work on a variety of projects, in many cases for completely different business ventures. One week I had been privileged with the task of writing a small program which ended up being semi-intelligent (of course artificially, thus AI). As it so happens I also seemed to have stretched PHP to its limits.&lt;/p&gt;&lt;p&gt;When originally typing up this post, I kept the details to a minimum, but now that I&#039;ve moved on I can freely discuss it. This program&amp;mdash;code-named &amp;ldquo;twitterbot&amp;rdquo;&amp;mdash;was tasked with searching Twitter for tweets with certain keywords within a radius of a location, like for tweets containing &quot;hungry&quot; within 30 miles of Minneapolis, and &lt;a href=&quot;http://help.twitter.com/entries/13920-frequently-asked-questions#replies&quot;&gt;@reply&lt;/a&gt; to that person within an hour of their tweet about ... a website I probably shouldn&#039;t name. However this becomes tricky since Twitter is really good at detecting spam, and a lot of Twitter users really hate spam (like me). To get around it, I made a bunch of twitter accounts using anonymous email addresses, created bios, set profile pictures, and set color schemes, all to make them look like real people.&lt;/p&gt;&lt;p&gt;However, just because a Twitter account has a profile picture, it does not mean it will be treated like a human: the account has to have realistic-looking posts. No problem. First I set a limit to the number of posts an account can make per day, make sure all the posts are within normal waking hours (like 6am to 10pm), have 30-50% of the tweets be the spamming tweets, and the rest be copies of tweets from a different search that none of the accounts will be replying to. Then since the spam tweets themselves are also randomized, the sum of it all equals twitter accounts that even people are sometimes not able to recognize that the account is a bot.&lt;p&gt;For the technical, I wrote this program in PHP both because we had thousands and thousands of lines of legacy code in other programs that we didn&#039;t want to touch, and second because it is extremely simple and quick to code and deploy. With a semi-AI bot though, the scene changes and suddenly both opportunities and concerns that weren&#039;t there before suddenly are. Example opportunity: &lt;a href=&quot;http://www.php.net/manual/en/function.pcntl-fork.php&quot;&gt;pcntl-fork&lt;/a&gt; becomes available. Example concern: the PHP program will probably be running as a daemon on a server, use up all your RAM and explode.&lt;/p&gt;&lt;p&gt;In the end, the bot ran strong for about 2 weeks before management changed their minds and had it shut down&amp;mdash;spamming people does not make for good press. I felt terrible having to write such a program; I really don&#039;t like spam, let alone being the one doing the spamming. But since then I&#039;ve moved on to a position at a &lt;a href=&quot;http://http://www.irishtitan.com/&quot; title=&quot;Irish Titan&quot;&gt;different company&lt;/a&gt; and write ethical code now.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;Tags: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/9&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;ai&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/13&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;code&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot; rel=&quot;dc:subject&quot;&gt;&lt;a href=&quot;/taxonomy/term/39&quot; typeof=&quot;skos:Concept&quot; property=&quot;rdfs:label skos:prefLabel&quot;&gt;php&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 05 Jun 2010 01:01:17 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">48 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2010/06/getting-paid-to-write-ai#comments</comments>
</item>
<item>
 <title>Tabs or Spaces</title>
 <link>http://jpiche.com/2010/04/tabs-or-spaces</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot; property=&quot;content:encoded&quot;&gt;&lt;p&gt;Any programming environment with more than one person working on the same project requires communication; it is an essential part of getting a job done efficiently, and it is common sense. But while normal business communication includes writing, speaking and body language, programming communication also includes readability of code along with good documentation.&lt;/p&gt;&lt;p&gt;Having experience with coding in a large project with other people, I clearly see that indentation is a large part of readability of code. It is extremely important to be consistent with spacing regardless of the language. However, whether to use tabs or spaces for indentation is up for debate. In fact, the issue of tabs versus spaces is a highly debated issue; a simple search will show that. Even so, it is important to have a clearly defined rule when engaging in a project with other people.&lt;/p&gt;&lt;p&gt;To show the importance of this many different open source projects define strict guidelines for indentation. To list a few:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.python.org/dev/peps/pep-0008/&quot;&gt;Style Guide for Python Code&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.python.org/dev/peps/pep-0007/&quot;&gt;Python Style Guide for C Code&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://framework.zend.com/manual/en/coding-standard.coding-style.html&quot;&gt;Zend Framework Coding Standard for PHP&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://codex.wordpress.org/WordPress_Coding_Standards&quot;&gt;WordPress Coding Standards&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://webkit.org/coding/coding-style.html&quot;&gt;WebKit Coding Style Guidelines&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions&quot;&gt;Flex SDK coding conventions and best practices&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Most of these say 4 spaces for per indentation level, and all say to never mix tabs and spaces. I do 4 spaces; my programming team at work has agreed on 4 spaces&amp;mdash;it works really well in pretty much all cases. All good editors have ways to make this easy to do using the tab key too.&lt;/p&gt;&lt;p&gt;More than likely the language you code in already has some guide already. Please follow it, and remember what the Zen of Python states: &amp;ldquo;&lt;b&gt;Readability counts&lt;/b&gt;.&amp;rdquo;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 14 Apr 2010 18:34:52 +0000</pubDate>
 <dc:creator>jpiche</dc:creator>
 <guid isPermaLink="false">47 at http://jpiche.com</guid>
 <comments>http://jpiche.com/2010/04/tabs-or-spaces#comments</comments>
</item>
</channel>
</rss>
