<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><!-- generator="wordpress/2.0.11" --><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jaslabs: High performance Software</title>
	<link>http://www.whenpenguinsattack.com</link>
	<description>High Performance Software</description>
	<pubDate>Tue, 24 Jun 2008 18:07:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.11</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/jaslabs" type="application/rss+xml" /><item>
		<title>5 ways to optimize mysql inserts</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/246169427/</link>
		<comments>http://www.whenpenguinsattack.com/2008/03/05/5-ways-to-optimize-mysql-inserts/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 15:10:05 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>php</category>

	<!-- AutoMeta Start -->
	<category>describe</category>
	<category>ways</category>
	<category>improve</category>
	<category>articles</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2008/03/05/5-ways-to-optimize-mysql-inserts/</guid>
		<description><![CDATA[by Justin Silverton

The following are five ways to improve queries involving table inserts:

1) use LOAD DATA INFILE when loading data from a text file
This is around 20 times faster than using insert statements.
2) use INSERT statements with multiple VALUES lists to insert several rows at a time
This is many times faster than using separate single-row [...]]]></description>
			<content:encoded><![CDATA[<p><strong>by Justin Silverton<br />
</strong></p>
<p>The following are five ways to improve queries involving table inserts:<br />
<strong><br />
1) use LOAD DATA INFILE when loading data from a text file</strong></p>
<p>This is around 20 times faster than using insert statements.</p>
<p><strong>2) use INSERT statements with multiple VALUES lists to insert several rows at a time</strong></p>
<p>This is many times faster than using separate single-row insert statements. Tuning the bulk_insert_buffer_size variable can also make inserts (to tables that contain rows) even faster.</p>
<p><strong>3) enable concurrent inserts for myisam tables<br />
</strong></p>
<p>The concurrent_insert system variable can be set to modify the concurrent-insert processing. By default, the variable is set to 1. If concurrent_inserts is set to 0, concurrent inserts are disabled. If the variable is set to 2, concurrent inserts at the end of the table are allowed even for tables that have deleted rows.</p>
<p><strong>4) use insert delayed</strong></p>
<p>This is useful if you have clients that cannot or need not wait for the insert to complete. This is a common situation when you use MySQL for logging and you also periodically run select and update  statements that take a long time to complete.   When a client uses insert delayed,  the server returns right away, and the row is queued to be inserted when the table is not in use by any other thread.  Another benefit of using insert delayed is that inserts from many clients are bundled together and written in one block. This is much faster than performing many separate inserts. </p>
<p><strong>5) lock your tables before inserting (for non-transactional tables)</strong></p>
<p>This benefits performance because the index buffer is flushed to disk only once, after all insert statements have completed. Normally, there would be as many index buffer flushes as there are insert statements. Explicit locking statements are not needed if you can insert all rows with a single insert.</p>
<p>To obtain faster insertions for transactional tables, you should use start transaction and commit instead of lock tables.
</p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/246169427" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2008/03/05/5-ways-to-optimize-mysql-inserts/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2008/03/05/5-ways-to-optimize-mysql-inserts/</feedburner:origLink></item>
		<item>
		<title>Wordpress seo: 5 tips for improving search engine visibility</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/190408755/</link>
		<comments>http://www.whenpenguinsattack.com/2007/11/25/wordpress-seo-5-tips-for-improving-search-engine-visibility/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 22:29:23 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>php</category>

	<!-- AutoMeta Start -->
	<category />
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/11/25/wordpress-seo-5-tips-for-improving-search-engine-visibility/</guid>
		<description><![CDATA[by Justin Silverton
The following are 5 changes you can make to your wordpress blog that can improve your search engine visibility.
1. Permalinks - changing your Wordpress permalinks to be search-engine friendly.  To change the default link type, go to options->permalinks.
The default link structure option looks like this:

Here is the more seo-friendly option:

2. Create a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>by Justin Silverton</strong></p>
<p>The following are 5 changes you can make to your wordpress blog that can improve your search engine visibility.</p>
<p><strong>1. Permalinks</strong> - changing your Wordpress permalinks to be search-engine friendly.  To change the default link type, go to options->permalinks.</p>
<p>The default link structure option looks like this:</p>
<p><img src="http://www.whenpenguinsattack.com/images/wordpress_seo/links_default.png"></p>
<p>Here is the more seo-friendly option:</p>
<p><img src="http://www.whenpenguinsattack.com/images/wordpress_seo/links_seo.png"></p>
<p><strong>2. Create a Sitemap</strong> - A Sitemap is an XML file that lists the URLs for a site. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site. This allows search engines to crawl the site more intelligently.  The sitemap file is supported by many search engines, including google.  A free plugin is available <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/" target="_blank">here</a></p>
<p><strong>3. Improve the titles of your articles</strong> - Title tags are arguably the most important of the on-page factors for search engine optimization.  A free plugin is available <a href="http://www.netconcepts.com/seo-title-tag-plugin/" target="_blank">here</a> that can help you optimize your titles.</p>
<p><strong>4. Site Submissions </strong> - Submit your articles to directories and RSS feed sites.  A good site is <a href="http://www.onlywire.com" target="_blank">onlywire.com</a>.  Here you can submit your blog articles to multiple social bookmarking sites at a time.</p>
<p><strong>5. Tagging &#038; Meta Keywords</strong> - implementing tags on your blog and how to use them as meta keywords.  This <a href="http://www.broobles.com/scripts/simpletags/" target="_blank">plugin</a>. Adds you to easily generate Technorati tags at the bottom of your blog entries.
</p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/190408755" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/11/25/wordpress-seo-5-tips-for-improving-search-engine-visibility/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/11/25/wordpress-seo-5-tips-for-improving-search-engine-visibility/</feedburner:origLink></item>
		<item>
		<title>How to turn a php script to an exe..for free</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/174816689/</link>
		<comments>http://www.whenpenguinsattack.com/2007/10/25/how-to-turn-a-php-script-to-an-exefor-free/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 12:08:57 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>php</category>

	<!-- AutoMeta Start -->
	<category>php</category>
	<category>exe</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/10/25/how-to-turn-a-php-script-to-an-exefor-free/</guid>
		<description><![CDATA[There are a few commercial products out there that allow you to turn your php scripts into an executable. While most of them work well, I have found a way to do it for free, using an open source application.  This application is called Wapache (based on the apache web server) and it is [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few commercial products out there that allow you to turn your php scripts into an executable. While most of them work well, I have found a way to do it for free, using an open source application.  This application is called Wapache (based on the apache web server) and it is open source (distributed under the Apache License 2.0).  </p>
<p>WApache doesn&#8217;t convert your script directly into an executable, it runs on the combination of a windows app (which uses an embedded IE control) and a stripped down version of apache.</p>
<p><strong>Features</strong></p>
<ul>
<li>No Internet Explorer menu, tool bar, or address bar.</li>
<li>Precise control over placement of windows</li>
<li>Three types of windows: basic, tool windows, and dialog boxes (modal and modeless)</li>
<li>Fully customizable drop-down and context menu</li>
<li>System Tray integration</li>
<li>Asynchronous data handling</li>
<li>Works with standard Apache modules like mod_php and mod_perl</li>
</ul>
<p><strong>screenshot</strong></p>
<p><img src="http://www.jaslabs.com/images/article_wapache/wapache_screen.jpg"><br />
(this is a screenshot of wapache running phpmyadmin)</p>
<p><strong>How to turn your php script into an executable</strong></p>
<p>1) copy all of your scripts/files into the htdocs directory (make sure that the main file is called index.php)<br />
2) launch bin/wapache.exe<br />
3) you will now see your php script in the application that is running</p>
<p>There is also many options that allow you to configure the app in many different ways.  This can be found on line 100 of conf/default.wcf (documentation for this config file can be found <a href="http://wapache.sourceforge.net/server_conf.html" target="_blank">here</a>):</p>
<p><em><code>&lt;StandardWindow Main&gt;<br />
	HorizontalAlign Center<br />
	VerticalAlign Middle<br />
	Height 60%<br />
	Width 60%<br />
	3DBorder Off<br />
	IconPath &quot;../icons/lightbulb.ico&quot;<br />
&lt;/StandardWindow&gt;</code></em></p>
<p>This could be used for a demo/trial of a web application.  A windows installer could also be used (<a href="http://nsis.sourceforge.net/Main_Page">NSIS</a> works well and is free)  to create a fully installable, desktop application.</p>
<p>Since this only relies on the apache web server, it&#8217;s also possible to use this with any type of supported scripts.</p>
<p><strong>Download</strong></p>
<p>The latest version of Wapache can be found <a href="http://internap.dl.sourceforge.net/sourceforge/wapache/wapache-2.0.0-php-5.0.3.zip">here</a></p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/174816689" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/10/25/how-to-turn-a-php-script-to-an-exefor-free/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/10/25/how-to-turn-a-php-script-to-an-exefor-free/</feedburner:origLink></item>
		<item>
		<title>A better way to Protect Your PHP/MySQL Queries from SQL Injection</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/173035318/</link>
		<comments>http://www.whenpenguinsattack.com/2007/10/21/a-better-way-to-protect-your-phpmysql-queries-from-sql-injection/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 21:39:45 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>php</category>

	<!-- AutoMeta Start -->
	<category>jmillion</category>
	<category>PHP</category>
	<category>jaslabs</category>
	<category>High Performance PHP</category>
	<category>advertising</category>
	<category>PHP advertising</category>
	<category>Payment</category>
	<category>paypal</category>
	<category>2Checkout</category>
	<category>Pixels</category>
	<category>PHP Pixels</category>
	<category>pixels</category>
	<category>milliondollarwebsite</category>
	<category>source code</category>
	<category>php source code</category>
	<category>wordpress</category>
	<category>wordpress SEO toolkit</category>
	<category>wordpress seo</category>
	<category>php seo</category>
	<category>seo</category>
	<category>easy to install</category>
	<category>easy to install php</category>
	<category>wordpress seo guide</category>
	<category>wordpress plugins</category>
	<category>jrotate</category>
	<category>php photo gallery</category>
	<category>php photo</category>
	<category>php display pictures</category>
	<category>photo customize</category>
	<category>gallery customize</category>
	<category>php chat</category>
	<category>chat</category>
	<category>php IM</category>
	<category>php instant message</category>
	<category>instant message</category>
	<category>jchat</category>
	<category>jchat php</category>
	<category>chat room</category>
	<category>php chat room</category>
	<category>flash music player</category>
	<category>flash mp3 player</category>
	<category>flash mp3</category>
	<category>flash music</category>
	<category>flash</category>
	<category>flash jukebox</category>
	<category>phpbb seo toolkit</category>
	<category>phpbb seo</category>
	<category>phpbb seo master</category>
	<category>php dating</category>
	<category>dating site</category>
	<category>php rating</category>
	<category>hotornot</category>
	<category>hotornot script</category>
	<category>php rating script</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/10/21/a-better-way-to-protect-your-phpmysql-queries-from-sql-injection/</guid>
		<description><![CDATA[By Justin Silverton
In a recent article I saw today about php/mysql security, called &#8220;protecting your php/mysql queries from sql injection&#8221;, The following method was described as a safe way to execute mysql queries (preventing what is known as a sql injection attack).
// This is a vulnerable query.
$query = &#34;SELECT * FROM products WHERE name='$productname'&#34;;
mysql_query($query);
// This [...]]]></description>
			<content:encoded><![CDATA[<p><strong>By Justin Silverton</strong></p>
<p>In a recent article I saw today about php/mysql security, called &#8220;protecting your php/mysql queries from sql injection&#8221;, The following method was described as a safe way to execute mysql queries (preventing what is known as a sql injection attack).</p>
<p><code>// This is a vulnerable query.<br />
$query = &quot;SELECT * FROM products WHERE name='$productname'&quot;;<br />
mysql_query($query);</p>
<p>// This just uses mysql_escape_string<br />
$query = sprintf(&quot;SELECT * FROM products WHERE name='%s'&quot;,<br />
mysql_real_escape_string($productname));<br />
mysql_query($query);</code></p>
<p>This will work, with select and insert statements, but will not work with statements such as: LIKE, GRANT, or REVOKE.  This is a more secure way of preventing SQL injection attacks.</p>
<p><code><br />
// This query is more secure<br />
$query = sprintf(&quot;SELECT * FROM products WHERE name='%s'&quot;,<br />
addcslashes(mysql_real_escape_string($productname),'%_'));<br />
mysql_query($query);<br />
</code></p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/173035318" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/10/21/a-better-way-to-protect-your-phpmysql-queries-from-sql-injection/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/10/21/a-better-way-to-protect-your-phpmysql-queries-from-sql-injection/</feedburner:origLink></item>
		<item>
		<title>How to create a self extracting PHP script</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/167415746/</link>
		<comments>http://www.whenpenguinsattack.com/2007/10/09/how-to-create-a-self-extracting-php-script/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 12:13:05 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>php</category>

	<!-- AutoMeta Start -->
	<category>jmillion</category>
	<category>PHP</category>
	<category>jaslabs</category>
	<category>High Performance PHP</category>
	<category>advertising</category>
	<category>PHP advertising</category>
	<category>Payment</category>
	<category>paypal</category>
	<category>2Checkout</category>
	<category>Pixels</category>
	<category>PHP Pixels</category>
	<category>pixels</category>
	<category>milliondollarwebsite</category>
	<category>source code</category>
	<category>php source code</category>
	<category>wordpress</category>
	<category>wordpress SEO toolkit</category>
	<category>wordpress seo</category>
	<category>php seo</category>
	<category>seo</category>
	<category>easy to install</category>
	<category>easy to install php</category>
	<category>wordpress seo guide</category>
	<category>wordpress plugins</category>
	<category>jrotate</category>
	<category>php photo gallery</category>
	<category>php photo</category>
	<category>php display pictures</category>
	<category>photo customize</category>
	<category>gallery customize</category>
	<category>php chat</category>
	<category>chat</category>
	<category>php IM</category>
	<category>php instant message</category>
	<category>instant message</category>
	<category>jchat</category>
	<category>jchat php</category>
	<category>chat room</category>
	<category>php chat room</category>
	<category>flash music player</category>
	<category>flash mp3 player</category>
	<category>flash mp3</category>
	<category>flash music</category>
	<category>flash</category>
	<category>flash jukebox</category>
	<category>phpbb seo toolkit</category>
	<category>phpbb seo</category>
	<category>phpbb seo master</category>
	<category>php dating</category>
	<category>dating site</category>
	<category>php rating</category>
	<category>hotornot</category>
	<category>hotornot script</category>
	<category>php rating script</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/10/09/how-to-create-a-self-extracting-php-script/</guid>
		<description><![CDATA[By Justin Silverton
PHP has a built-in command called __HALT_COMPILER__.  This command  Halts the execution of the compiler. This can be useful to embed data in PHP scripts.  Below is an example of a self-extracting php script.  When executed, a second php file will be extracted in the same directory called testscript1.php.
&#60;?php
//gzdecode [...]]]></description>
			<content:encoded><![CDATA[<p><strong>By Justin Silverton</strong></p>
<p>PHP has a built-in command called <strong>__HALT_COMPILER__</strong>.  This command  Halts the execution of the compiler. This can be useful to embed data in PHP scripts.  Below is an example of a self-extracting php script.  When executed, a second php file will be extracted in the same directory called testscript1.php.</p>
<p><code>&lt;?php</p>
<p>//gzdecode function<br />
function gzdecode ($data) {<br />
        $flags = ord(substr($data, 3, 1));<br />
        $headerlen = 10;<br />
        $extralen = 0;<br />
        $filenamelen = 0;<br />
        if ($flags &amp; 4) {<br />
            $extralen = unpack('v' ,substr($data, 10, 2));<br />
            $extralen = $extralen[1];<br />
            $headerlen += 2 + $extralen;<br />
        }<br />
        if ($flags &amp; 8 &nbsp;) // Filename<br />
            $headerlen = strpos($data, chr(0), $headerlen) + 1;<br />
        if ($flags &amp; 16) // Comment<br />
            $headerlen = strpos($data, chr(0), $headerlen) + 1;<br />
        if ($flags &amp; 2) // CRC at end of file<br />
            $headerlen += 2;<br />
        $unpacked = gzinflate(substr($data, $headerlen));<br />
        if ($unpacked === FALSE)<br />
              $unpacked = $data;<br />
        return $unpacked;<br />
     }</p>
<p>$fp = fopen(__FILE__, 'r');<br />
// seek file pointer to data<br />
fseek($fp, __COMPILER_HALT_OFFSET__);<br />
// and output it<br />
$buffer = fread($fp,8192);<br />
$decoded = gzdecode(base64_decode($buffer));<br />
//$uncompressed = gzdecode($decoded);</p>
<p>$filename = &quot;testscript1.php&quot;;<br />
$fd = fopen($filename,&quot;w&quot;);<br />
fwrite($fd,$decoded);<br />
fclose($fd);</p>
<p>__halt_compiler();H4sICKE9CEcAC3Rlc3RmaWxlMS5waHAAs<br />
7EvyCjg5eLlSk3OyFdQKsnILFYAopLU4hKFtMycVAVDJWteLns7AKhVcUooAAAA</code></p>
<p><strong>How it works</strong></p>
<p>The file that is extracted is gzipped, base64 encoded, and stored at the end of the the file (right after the __halt_compiler directive).  The script uses a custom function called gzdecode to gunzip the file, it is then base64 decoded and written to a file.  This is just a simple example to show what is possible with PHP.  A more advanced version could use a function to tar and gzip a file so multiple files can be extracted.</p>
<p>The code example from this article can be download <a href="http://www.whenpenguinsattack.com/online-demo/">here</a>
</p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/167415746" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/10/09/how-to-create-a-self-extracting-php-script/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/10/09/how-to-create-a-self-extracting-php-script/</feedburner:origLink></item>
		<item>
		<title>5 sins of ruby</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/166931665/</link>
		<comments>http://www.whenpenguinsattack.com/2007/10/08/5-sins-of-ruby/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 12:17:02 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>ruby</category>

	<!-- AutoMeta Start -->
	<category>jmillion</category>
	<category>PHP</category>
	<category>jaslabs</category>
	<category>High Performance PHP</category>
	<category>advertising</category>
	<category>PHP advertising</category>
	<category>Payment</category>
	<category>paypal</category>
	<category>2Checkout</category>
	<category>Pixels</category>
	<category>PHP Pixels</category>
	<category>pixels</category>
	<category>milliondollarwebsite</category>
	<category>source code</category>
	<category>php source code</category>
	<category>wordpress</category>
	<category>wordpress SEO toolkit</category>
	<category>wordpress seo</category>
	<category>php seo</category>
	<category>seo</category>
	<category>easy to install</category>
	<category>easy to install php</category>
	<category>wordpress seo guide</category>
	<category>wordpress plugins</category>
	<category>jrotate</category>
	<category>php photo gallery</category>
	<category>php photo</category>
	<category>php display pictures</category>
	<category>photo customize</category>
	<category>gallery customize</category>
	<category>php chat</category>
	<category>chat</category>
	<category>php IM</category>
	<category>php instant message</category>
	<category>instant message</category>
	<category>jchat</category>
	<category>jchat php</category>
	<category>chat room</category>
	<category>php chat room</category>
	<category>flash music player</category>
	<category>flash mp3 player</category>
	<category>flash mp3</category>
	<category>flash music</category>
	<category>flash</category>
	<category>flash jukebox</category>
	<category>phpbb seo toolkit</category>
	<category>phpbb seo</category>
	<category>phpbb seo master</category>
	<category>php dating</category>
	<category>dating site</category>
	<category>php rating</category>
	<category>hotornot</category>
	<category>hotornot script</category>
	<category>php rating script</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/10/08/5-sins-of-ruby/</guid>
		<description><![CDATA[By Justin Silverton
Introduction
Ruby has become more and more popular over the past couple of years. This month, I decided to start coding a few smaller apps to see if there was something I was missing.  The following are a few issues with ruby that I feel need to be changed, before it really becomes [...]]]></description>
			<content:encoded><![CDATA[<p><strong>By Justin Silverton</strong></p>
<p><strong>Introduction</strong></p>
<p>Ruby has become more and more popular over the past couple of years. This month, I decided to start coding a few smaller apps to see if there was something I was missing.  The following are a few issues with ruby that I feel need to be changed, before it really becomes a mainstream language.</p>
<p><strong>1) Horrible syntax</strong></p>
<p>It looks like a mix between Visual Basic and Pascal.  I can&#8217;t imagine coming back to a large project with hundreds of files and functions and trying to keep everything organized.  It would be even worse coming back to a project that someone else created.</p>
<p><strong>2) missing/lacking documentation</strong></p>
<p>Most popular languages are documented very well.  For instance, you can go to the main php website and find out how to do pretty much anything (in english or almost any other language).    Ruby&#8217;s documentation is available, but needs a lot of work to help out developers that are learning the language. </p>
<p><strong>3) slow</strong></p>
<p>Ruby is noticeably slower than other interpreted languages.  I am not the only one that has seen performance issues. More on this can be found <a href="http://www.joelonsoftware.com/items/2006/09/12.html">here</a>.  <a href="http://jruby.codehaus.org/">Jruby</a>, a pure-Java implementation of the Ruby programming language, might help increase execution speed.</p>
<p><strong>4) lack of libraries</strong></p>
<p>Just searching google for ruby libraries or extensions doesn&#8217;t return many results.  This also might be because it is a relatively new language compared to much older languages such as Java or PHP.</p>
<p><strong>5) poor unicode support</strong></p>
<p>Although there are <a href="http://redhanded.hobix.com/cult/stringCharsBlessedByRailsPapacyAsFingertipsWorkToDipRubySToesInTheUtf8Waters.html">Third party libraries</a> that enhance ruby unicode support, it should be built into the language itself.
</p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/166931665" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/10/08/5-sins-of-ruby/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/10/08/5-sins-of-ruby/</feedburner:origLink></item>
		<item>
		<title>How to store large amounts of data in Firefox</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/165177921/</link>
		<comments>http://www.whenpenguinsattack.com/2007/10/04/how-to-store-large-amounts-of-data-in-firefox/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 12:14:16 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>web dev</category>

		<category>firefox</category>

	<!-- AutoMeta Start -->
	<category>jmillion</category>
	<category>PHP</category>
	<category>jaslabs</category>
	<category>High Performance PHP</category>
	<category>advertising</category>
	<category>PHP advertising</category>
	<category>Payment</category>
	<category>paypal</category>
	<category>2Checkout</category>
	<category>Pixels</category>
	<category>PHP Pixels</category>
	<category>pixels</category>
	<category>milliondollarwebsite</category>
	<category>source code</category>
	<category>php source code</category>
	<category>wordpress</category>
	<category>wordpress SEO toolkit</category>
	<category>wordpress seo</category>
	<category>php seo</category>
	<category>seo</category>
	<category>easy to install</category>
	<category>easy to install php</category>
	<category>wordpress seo guide</category>
	<category>wordpress plugins</category>
	<category>jrotate</category>
	<category>php photo gallery</category>
	<category>php photo</category>
	<category>php display pictures</category>
	<category>photo customize</category>
	<category>gallery customize</category>
	<category>php chat</category>
	<category>chat</category>
	<category>php IM</category>
	<category>php instant message</category>
	<category>instant message</category>
	<category>jchat</category>
	<category>jchat php</category>
	<category>chat room</category>
	<category>php chat room</category>
	<category>flash music player</category>
	<category>flash mp3 player</category>
	<category>flash mp3</category>
	<category>flash music</category>
	<category>flash</category>
	<category>flash jukebox</category>
	<category>phpbb seo toolkit</category>
	<category>phpbb seo</category>
	<category>phpbb seo master</category>
	<category>php dating</category>
	<category>dating site</category>
	<category>php rating</category>
	<category>hotornot</category>
	<category>hotornot script</category>
	<category>php rating script</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/10/04/how-to-store-large-amounts-of-data-in-firefox/</guid>
		<description><![CDATA[by Justin Silverton
For most web applications, there are a couple of different options available for storing data on the client (within the web browser).
Flash allows the storage of up to 100 KB/domain without any user security prompts.  The data being stored is accessible across the user&#8217;s Flash Player instances, loading stored data into Internet [...]]]></description>
			<content:encoded><![CDATA[<p><strong>by Justin Silverton</strong></p>
<p>For most web applications, there are a couple of different options available for storing data on the client (within the web browser).</p>
<p>Flash allows the storage of up to 100 KB/domain without any user security prompts.  The data being stored is accessible across the user&#8217;s Flash Player instances, loading stored data into Internet Explorer, Firefox, or any other browser that supports it.</p>
<p>Cookies are another option.  A cookie stores user data across multiple browsing sessions.  They are limited to 4 KB of storage per domain and are a good way to store user data for convenience or tracking.  Web browsers contain cookie and privacy management features to wipe away stored cookies and their stored data and therefore have limited utility for continued persistence. Cookies are sent along with every request on a given domain, adding onto every message exchanged between an end-user&#8217;s browser and your site, even if the cookie data is only occasionally used.</p>
<p>Firefox has the ability to store an unlimited amount of data using DOM storage (This may be limited in future versions greater than 2.X).  </p>
<p>Here is an example of how use DOM storage:</p>
<p><code>&lt;script type=&quot;text/javascript&quot;&gt;</p>
<p>  //for security, this must be set to your domain<br />
  var storage = globalStorage['yourdomain.com'];<br />
  var pageCount;</p>
<p>  function setItem(key,value) { //store an item<br />
	storage.setItem(key,value);<br />
	}</p>
<p>  function getItem(key) { //retrieve an item and display it<br />
	alert(storage.getItem(key));<br />
	}</p>
<p>  function removeItem(key) { //remove an item<br />
	storage.removeItem(key)<br />
	alert(&quot;Key:&quot; +key +&quot; was removed.&quot;);<br />
	}<br />
&lt;/script&gt;<br />
</code></p>
<p>Here are some other options that can be used with the globalStorage object:</p>
<ul>
<li>globalStorage[&#8217;developer.mozilla.org&#8217;] - All web pages within the developer.mozilla.org sub-domain can both read and write data to this storage object.</li>
<li>globalStorage[&#8217;mozilla.org&#8217;] - All web pages with the mozilla.org domain can both read and write to this storage object.</li>
</ul>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/165177921" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/10/04/how-to-store-large-amounts-of-data-in-firefox/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/10/04/how-to-store-large-amounts-of-data-in-firefox/</feedburner:origLink></item>
		<item>
		<title>ajaxwindows: the next big thing?</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/161044515/</link>
		<comments>http://www.whenpenguinsattack.com/2007/09/25/a-review-of-ajaxwindows/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 12:08:57 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>ajax</category>

	<!-- AutoMeta Start -->
	<category>jmillion</category>
	<category>PHP</category>
	<category>jaslabs</category>
	<category>High Performance PHP</category>
	<category>advertising</category>
	<category>PHP advertising</category>
	<category>Payment</category>
	<category>paypal</category>
	<category>2Checkout</category>
	<category>Pixels</category>
	<category>PHP Pixels</category>
	<category>pixels</category>
	<category>milliondollarwebsite</category>
	<category>source code</category>
	<category>php source code</category>
	<category>wordpress</category>
	<category>wordpress SEO toolkit</category>
	<category>wordpress seo</category>
	<category>php seo</category>
	<category>seo</category>
	<category>easy to install</category>
	<category>easy to install php</category>
	<category>wordpress seo guide</category>
	<category>wordpress plugins</category>
	<category>jrotate</category>
	<category>php photo gallery</category>
	<category>php photo</category>
	<category>php display pictures</category>
	<category>photo customize</category>
	<category>gallery customize</category>
	<category>php chat</category>
	<category>chat</category>
	<category>php IM</category>
	<category>php instant message</category>
	<category>instant message</category>
	<category>jchat</category>
	<category>jchat php</category>
	<category>chat room</category>
	<category>php chat room</category>
	<category>flash music player</category>
	<category>flash mp3 player</category>
	<category>flash mp3</category>
	<category>flash music</category>
	<category>flash</category>
	<category>flash jukebox</category>
	<category>phpbb seo toolkit</category>
	<category>phpbb seo</category>
	<category>phpbb seo master</category>
	<category>php dating</category>
	<category>dating site</category>
	<category>php rating</category>
	<category>hotornot</category>
	<category>hotornot script</category>
	<category>php rating script</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/09/25/a-review-of-ajaxwindows/</guid>
		<description><![CDATA[By Justin Silverton

A virtual operating system in Ajax is an interesting idea.  Although it can&#8217;t completely replace a desktop operating system, it can allow you to access your documents and files from anywhere. 
Ajaxwindows allows you to do the following:

Backup your files, music, and pictures with one click.
Display, edit, and save popular file formats.
Access [...]]]></description>
			<content:encoded><![CDATA[<p><strong>By Justin Silverton</strong></p>
<p><img src="http://www.jaslabs.com/images/article_ajaxwindows/ajaxWindows.png"></p>
<p>A virtual operating system in Ajax is an interesting idea.  Although it can&#8217;t completely replace a desktop operating system, it can allow you to access your documents and files from anywhere. </p>
<p>Ajaxwindows allows you to do the following:</p>
<ul>
<li>Backup your files, music, and pictures with one click.</li>
<li>Display, edit, and save popular file formats.</li>
<li>Access your data remotely.</li>
</ul>
<p><strong>Some cool features</strong></p>
<ul>
<li>Firefox and IE support - Both Internet Explorer and Firefox are supported. (An activeX control needs to be downloaded for it to work with IE)</li>
<li>
synchronize desktop wallpaper, IE/firefox favorites, windows startup sounds, windows shutdown sounds, &#8220;my documents&#8221;, &#8220;my pictures&#8221;, and outlook express contacts.</p>
<p><img src="http://www.jaslabs.com/images/article_ajaxwindows/ajax_sync_sm.png">
</li>
<li>
Change the Theme/Desktop wallpaper (many built-in themes/wallpaper available).<br />
<img src="http://www.jaslabs.com/images/article_ajaxwindows/ajax_theme.png">
</li>
<li>
Store files using your gmail account.  This is an interesting feature.  An email is sent to your gmail account with the file as an attachment.</p>
<p><img src="http://www.jaslabs.com/images/article_ajaxwindows/ajax_gmail.png">
</li>
<li>
The ability to add remove programs/widgets.<br />
<img src="http://www.jaslabs.com/images/article_ajaxwindows/ajax_addremove.png">
</li>
</ul>
<p><strong>Conclusion</strong></p>
<p>Overall, I was impressed with ajaxwindows.  However, I did did get the following error a few times when I was within Firefox (IE also crashed whenever I tried to logout):</p>
<p><img src="http://www.jaslabs.com/images/article_ajaxwindows/ajax_error.png">
</p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/161044515" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/09/25/a-review-of-ajaxwindows/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/09/25/a-review-of-ajaxwindows/</feedburner:origLink></item>
		<item>
		<title>How to password protect a web directory</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/152006462/</link>
		<comments>http://www.whenpenguinsattack.com/2007/09/04/how-to-password-protect-a-web-directory/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 11:27:44 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>apache</category>

	<!-- AutoMeta Start -->
	<category>jmillion</category>
	<category>PHP</category>
	<category>jaslabs</category>
	<category>High Performance PHP</category>
	<category>advertising</category>
	<category>PHP advertising</category>
	<category>Payment</category>
	<category>paypal</category>
	<category>2Checkout</category>
	<category>Pixels</category>
	<category>PHP Pixels</category>
	<category>pixels</category>
	<category>milliondollarwebsite</category>
	<category>source code</category>
	<category>php source code</category>
	<category>wordpress</category>
	<category>wordpress SEO toolkit</category>
	<category>wordpress seo</category>
	<category>php seo</category>
	<category>seo</category>
	<category>easy to install</category>
	<category>easy to install php</category>
	<category>wordpress seo guide</category>
	<category>wordpress plugins</category>
	<category>jrotate</category>
	<category>php photo gallery</category>
	<category>php photo</category>
	<category>php display pictures</category>
	<category>photo customize</category>
	<category>gallery customize</category>
	<category>php chat</category>
	<category>chat</category>
	<category>php IM</category>
	<category>php instant message</category>
	<category>instant message</category>
	<category>jchat</category>
	<category>jchat php</category>
	<category>chat room</category>
	<category>php chat room</category>
	<category>flash music player</category>
	<category>flash mp3 player</category>
	<category>flash mp3</category>
	<category>flash music</category>
	<category>flash</category>
	<category>flash jukebox</category>
	<category>phpbb seo toolkit</category>
	<category>phpbb seo</category>
	<category>phpbb seo master</category>
	<category>php dating</category>
	<category>dating site</category>
	<category>php rating</category>
	<category>hotornot</category>
	<category>hotornot script</category>
	<category>php rating script</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/09/04/how-to-password-protect-a-web-directory/</guid>
		<description><![CDATA[by Justin Silverton
This article will show you how to password protect a directory using the apache web server  and a .htaccess file.
.htaccess file
The .htacess file should be in the directory that you would like to protect (everything below this directory will also be password protected).
AuthName &#8220;Password Protected Area&#8221;
AuthType Basic
AuthUserFile /full/path/to/.htpasswd
Require valid-user
Replace &#8220;Password protected Area&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>by Justin Silverton</strong></p>
<p>This article will show you how to password protect a directory using the apache web server  and a .htaccess file.</p>
<p><strong>.htaccess file</strong></p>
<p>The .htacess file should be in the directory that you would like to protect (everything below this directory will also be password protected).</p>
<p>AuthName &#8220;Password Protected Area&#8221;<br />
AuthType Basic<br />
AuthUserFile /full/path/to/.htpasswd<br />
Require valid-user</p>
<p>Replace &#8220;Password protected Area&#8221; with the name of the area that you would like to protect.  Also, the path needs to be changed to the path of the .htpasswd file (which will be explained further).</p>
<p><strong>Generating a .htpasswd file</strong></p>
<p>A program comes with apache for generating a .htpasswd file.  Here is how it works:</p>
<p><strong>htpasswd</strong> [ -c ] [ -m | -d | -s | -p ] passwdfile username<br />
<strong>htpasswd</strong> -b [ -c ] [ -m | -d | -s | -p ] passwdfile username password<br />
<strong>htpasswd</strong> -n [ -m | -d | -s | -p ] username<br />
<strong>htpasswd</strong> -nb [ -m | -d | -s | -p ] username password</p>
<p>A full explanation of htpasswd can be found <a href="http://httpd.apache.org/docs/1.3/programs/htpasswd.html">here</a></p>
<p>If everything is setup correctly you should see the following prompt when you try to access your newly protected directory (and the username/password combo created with htpasswd should allow access):</p>
<p><img src="http://www.whenpenguinsattack.com/images/auth.png">
</p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/152006462" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/09/04/how-to-password-protect-a-web-directory/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/09/04/how-to-password-protect-a-web-directory/</feedburner:origLink></item>
		<item>
		<title>5 ways to speedup javascript</title>
		<link>http://feeds.feedburner.com/~r/jaslabs/~3/146089307/</link>
		<comments>http://www.whenpenguinsattack.com/2007/08/20/5-ways-to-speedup-javascript/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 11:28:09 +0000</pubDate>
		<dc:creator>Justin Silverton</dc:creator>
		
		<category>php</category>

		<category>web dev</category>

		<category>javascript</category>

	<!-- AutoMeta Start -->
	<category>jmillion</category>
	<category>PHP</category>
	<category>jaslabs</category>
	<category>High Performance PHP</category>
	<category>advertising</category>
	<category>PHP advertising</category>
	<category>Payment</category>
	<category>paypal</category>
	<category>2Checkout</category>
	<category>Pixels</category>
	<category>PHP Pixels</category>
	<category>pixels</category>
	<category>milliondollarwebsite</category>
	<category>source code</category>
	<category>php source code</category>
	<category>wordpress</category>
	<category>wordpress SEO toolkit</category>
	<category>wordpress seo</category>
	<category>php seo</category>
	<category>seo</category>
	<category>easy to install</category>
	<category>easy to install php</category>
	<category>wordpress seo guide</category>
	<category>wordpress plugins</category>
	<category>jrotate</category>
	<category>php photo gallery</category>
	<category>php photo</category>
	<category>php display pictures</category>
	<category>photo customize</category>
	<category>gallery customize</category>
	<category>php chat</category>
	<category>chat</category>
	<category>php IM</category>
	<category>php instant message</category>
	<category>instant message</category>
	<category>jchat</category>
	<category>jchat php</category>
	<category>chat room</category>
	<category>php chat room</category>
	<category>flash music player</category>
	<category>flash mp3 player</category>
	<category>flash mp3</category>
	<category>flash music</category>
	<category>flash</category>
	<category>flash jukebox</category>
	<category>phpbb seo toolkit</category>
	<category>phpbb seo</category>
	<category>phpbb seo master</category>
	<category>php dating</category>
	<category>dating site</category>
	<category>php rating</category>
	<category>hotornot</category>
	<category>hotornot script</category>
	<category>php rating script</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.whenpenguinsattack.com/2007/08/20/5-ways-to-speedup-javascript/</guid>
		<description><![CDATA[by Justin Silverton
1) use a compressor
JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It typically reduces filesize by half, resulting in faster downloads. It also encourages a more expressive programming style because it eliminates the download cost of clean, literate self-documentation.
PHP version here
2) Minimize the number of .js files
Each .js [...]]]></description>
			<content:encoded><![CDATA[<p><strong>by Justin Silverton</strong></p>
<p><strong>1) use a compressor</strong></p>
<p>JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It typically reduces filesize by half, resulting in faster downloads. It also encourages a more expressive programming style because it eliminates the download cost of clean, literate self-documentation.</p>
<p>PHP version <a href="http://code.google.com/p/jsmin-php/">here</a></p>
<p><strong>2) Minimize the number of .js files</strong></p>
<p>Each .js file reference on a web page means another http request from a client&#8217;s browser.  Although it may decrease the readability/maintainability of your code, it is faster to have one larger .js file than multiple smaller ones.</p>
<p><strong>3) use profiler and timer tools</strong></p>
<p><a href="http://www.getfirebug.com/">Firebug</a> offers a suite of profiler and timing tools that allows you to see exactly how long your scripts take to execute and gives you the ability to tweak and optimize them.</p>
<p><strong>4) asynchronize your code</strong></p>
<p>Browsers run Javascript code synchronously.  This means that when a <code>&lt;script&gt;</code> tag has been found, everything on the page stops until the end script tag has been found.  If a script doesn’t finish executing within a certain amount of time, then the user gets a warning that says, “A script on this page is taking a long time to complete.”  </p>
<p><strong>example: </strong></p>
<p><code>function testfunc()<br />
{<br />
   var x1="test1";<br />
   var x2="test2";</p>
<p>   alert(x1+x2);<br />
}</p>
<p>testfunc();   //normal way to execute the function<br />
window.setTimeout(testfunc,0); //asynchronous execution of testfunc()</code></p>
<p>The setTimeout function takes 2 parameters.  The first is the name of the function that will be executed and the second is the number of milliseconds to wait until it is called.  Since 0 is used for the second parameter, the function is called immediately (it will be forked in the background and the rest of your page will continue to load).  This is useful for functions that take a long time to load.</p>
<p><strong>5) cache DOM variables</strong></p>
<p>Every binding in Javascript is late. This means each time you access a property, variable, or method a look-up is performed. Within the IE DOM, this could mean an extensive search of the element to find the same property over and over again, only to be returned to the JScript engine unchanged from the previous request.</p>
<p><strong>Here is an example of a function that can be optimized:</strong></p>
<p><code>function buildString()<br />
{<br />
      var newElement = document.getElementById("myitem");<br />
      newElement.innerHTML = &quot;&quot;; // Clear out the previous<br />
      newElement.innerHTML += addHeader();<br />
      newElement.innerHTML += addBody();<br />
}</p>
<p><strong><br />
Here is the optimized function:</strong></p>
<p>function buildString()<br />
{<br />
     var newText = addHeader() + addBody();<br />
     document.getElementById(&#8221;myitem&#8221;).innerHTML = newText;<br />
}</code>
</p>
<img src="http://feeds.feedburner.com/~r/jaslabs/~4/146089307" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.whenpenguinsattack.com/2007/08/20/5-ways-to-speedup-javascript/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.whenpenguinsattack.com/2007/08/20/5-ways-to-speedup-javascript/</feedburner:origLink></item>
	</channel>
</rss>
