<?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>Skypher &#187; Cipher</title>
	<atom:link href="http://skypher.com/index.php/author/Cipher/feed/" rel="self" type="application/rss+xml" />
	<link>http://skypher.com</link>
	<description>The blog for absolutely nothing!</description>
	<lastBuildDate>Sat, 25 Feb 2012 11:27:57 +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>Web Development on a Chromebook (2)</title>
		<link>http://skypher.com/index.php/2012/02/25/web-development-on-a-chromebook-2/</link>
		<comments>http://skypher.com/index.php/2012/02/25/web-development-on-a-chromebook-2/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 11:27:57 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=704</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago I posted about a web based IDE. And said I&#8217;d continue the work. So I did. It took a bit longer than expected (I was busy) but I&#8217;ve completed the following improvements:</p>
<ul>
<li>added jQuery, some JS abstraction</li>
<li>removed more unused code</li>
<li>fixed edit field height (but promptly broke it again)</li>
<li>added new file option</li>
<li>added open/add: made changes detection</li>
<li>added feedback bar</li>
<li>folder support (opening a file in a folder loses the status though <img src='http://skypher.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> , fix soon. )</li>
<li>ctrl+s saves your file</li>
</ul>
<div>It&#8217;s still <strong>extremely unsecured</strong>. Please use a htaccess file or another form of security which you find usefull.</div>
<p>You can read more about it on <a href="http://dippety.com/ide">dippety.com</a>! The download is also there.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2012/02/25/web-development-on-a-chromebook-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Development on a Chromebook</title>
		<link>http://skypher.com/index.php/2012/02/12/web-development-on-a-chromebook/</link>
		<comments>http://skypher.com/index.php/2012/02/12/web-development-on-a-chromebook/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 23:05:26 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[notepad++]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=699</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>In December I bought a chromebook. I really love it. It&#8217;s quick and simple. However, it does have some stuff to get used to. One of the things is, it&#8217;s hard to develop websites with it. During  a hackathon at <a href="http://en.wikipedia.org/wiki/Hyves">Hyves</a> (where I work) I really wanted to use my chromebook.</p>
<p>So I started looking for a web based editor. There are a couple and <a href="http://c9.io/">cloud9</a> looks really good. The only problem I have with it is that it doesn&#8217;t have an &#8216;offline&#8217; version (eg. for developing on your local network). Nor can you work privately without paying them.</p>
<p>So I found an older project of <a href="http://www.ekenberg.se/php/ide/">Johan Ekenberg</a> under GNU license. It covered the absolute basics. So I decided to take it.</p>
<p>First I started to (dirty) fix all PHP5 related issues, then I removed some features and the old table layout.<br />
Then I added a file list, syntax highlighting (<a href="http://codemirror.net/">CodeMirror</a>) and made the layout bigger, more usable. Right now I have a pretty stable version which is free to download under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU GPL license</a>.</p>
<p>Download it <a href="http://bit.ly/web_ide">here</a></p>
<p>Use is really simple. Just upload it to your server. It works from the data/ folder but you can change this in the config file. There is no security layer, so keep it somewhere safe and be smart!</p>
<p>I have a huge to do/wish list: ajax, some version system, security, you name it. Idea&#8217;s, suggestions and patches are welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2012/02/12/web-development-on-a-chromebook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting your email in</title>
		<link>http://skypher.com/index.php/2010/11/04/getting-your-email-in/</link>
		<comments>http://skypher.com/index.php/2010/11/04/getting-your-email-in/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 11:42:09 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[Returnpath]]></category>
		<category><![CDATA[SenderScore]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=190</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>At <a title="Hyves.nl" href="http://hyves.nl" target="_blank">Hyves</a> [<a title="Hyves on Wikipedia" href="http://en.wikipedia.org/wiki/Hyves" target="_blank">wikipedia</a>] we sent out about 13 million emails a day. Considering the vast amount of email, we had a high risk of ending up in the spam box, which we did. Here&#8217;s how we solved this problem.</p>
<p>Due to our rapid growth and limited number of developers, the neatness of our database was, well, not that good. And as a result the reputation of our mail servers was on the same level. Since May 2009 we (<a title="Jeffrey" href="http://skyler.hyves.nl" target="_blank">Jeffrey</a> and me) have been working on cleaning up the email database.</p>
<p>In the past, just about anything could be entered in the email field and confirmation of email adresses did not exist. As a result we would sent 12 million emails a day and got 7,5% in bounce messages back. Quick investigation learned that most were send to non existent domains, mailboxes or were plainly wrong (some funny examples like hotmale.com) but we also had some people filling in wrong data on purpose, adding addresses like &#8216;spam@me-not.com&#8217; or the likes.</p>
<p>As a result we had bad email deliverability and were in a lot of spam boxes and we wanted this to change. Let me set out a rough situation sketch:</p>
<ul>
<li>12 million emails/day</li>
<li>900.000 bouncers</li>
<li>SenderScore (<a title="Returnpath" href="http://www.returnpath.net/" target="_blank">Returnpath</a>) of ~70</li>
<li>1300 trapbox hits (@ live.com)</li>
<li>complaint rate ~ 1%</li>
<li>RCTP/DATA difference ~500.000</li>
</ul>
<p>To solve this we had 2 options:</p>
<ol>
<li>Get whitelisted with ReturnPath</li>
<li>Solve the problem ourselves.</li>
</ol>
<p>If you consider that most of the problem was our fault, and personally I live by Google&#8217;s motto &#8216;Don&#8217;t be evil&#8217;, cleaning up your own act really was the way to go. At least it deserved a chance, plus we needed to change it if we wanted whitelisting anyway.</p>
<p><strong>Getting to work</strong></p>
<p>Further analyzing the bounced emails learned that not every host is using the standards. So we needed a host-based rule system. Normally you can see by the status code what is happening. But not exactly, mostly they are right, but not all the time. The code might not match the message, or is plainly wrong (eg. full box with a non existent status code). Our system allows us to single out hosts and we can create specific rulesets for them, or use generic rules for a range or all servers.<br />
To stop sending emails we also introduced a new state, which was &#8216;disabled&#8217;. So we did not send any emails to the addresses caught by our system, otherwise our work would be useless.</p>
<p>Because e-mail is important for us and our users, we also needed to communicate this to our users somehow. With 52.7% of the Netherlands (from <a href="http://www.stir.nl/english/" target="_blank">STIR</a>) coming in at least once a month, this was a nice opportunity to notify them of their e-mail status. When somebody&#8217;s e-mail had been disabled we placed a small &#8216;nag-board&#8217; above their pages. In this message we explained what happened, why having a correct e-mail address is important and that they can set their e-mail notifications off. Considering we actively disabled 2.3 million email addresses in the past 18 months and only 1.4 million are still disabled, this worked well. Members can have multiple email addresses, so we&#8217;re not to worried about that.</p>
<p>By creating the rule based system, we didn&#8217;t filter out all the clients, but we started with the largest slices of the pie. Live/Hotmail and Gmail were first because they take roughly 80 percent of all our email addresses. After tackling Yahoo and the local dutch providers we saw significant increase in our deliverability, a significant drop in bouncers and a rise in score (this took a long time thou!).</p>
<p>The biggest step left to take was not to send email to any unconfirmed email adresses. We were really scared of taking this step. But since our database got cleaner, we were confident to take it. It turned out to be the final step as after this change, the numbers got even better!</p>
<p><strong>September 2009</strong></p>
<ul>
<li>~13 million emails</li>
<li>140.000 bouncers/day</li>
<li>SenderScores of ~90</li>
<li>100 trapbox hits.</li>
<li>complaint rate &lt; 0,1%</li>
<li>RCTP/DATA difference of ~ 100.000</li>
</ul>
<p><strong>August 2010</strong></p>
<ul>
<li>13 million emails</li>
<li>avg. 45.000 bouncers/day</li>
<li>SenderScores of ~98</li>
<li> &lt; 100 trapbox hits.</li>
<li>complaint rate &lt; 0,1%</li>
<li>RCTP/DATA difference of &lt; 100.000</li>
</ul>
<p><strong>In conclusion</strong></p>
<p>Looking back on the project we are proud of the result. Overall we scored better than we had first set as our goals to. One was to have less than 200.000 bounces a day, which we do, another was to get our sender score up, which it did. Up from 70 to 98. This is, in all honesty, amazing.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/11/04/getting-your-email-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video Playback on Android 2</title>
		<link>http://skypher.com/index.php/2010/05/21/video-playback-on-android-2/</link>
		<comments>http://skypher.com/index.php/2010/05/21/video-playback-on-android-2/#comments</comments>
		<pubDate>Fri, 21 May 2010 14:56:48 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=469</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>After my <a href="http://skypher.com/index.php/2009/03/29/video-playback-on-android/">first post on the subject</a> I got the tip for a better, cleaner and faster encoder.</p>
<p>Kudos to Henk and Todd for the tip!</p>
<p>For the complete story on how to play your own video&#8217;s on android:</p>
<p><em>Install Jeff Hamilton’s ‘Video Player’ from the market.<br />
This is a simple, no BS video player which supports playing MP4 or 3GPP with H.264, H.263 encoding and MP3, AAC or AMR Audio from your SD card.</p>
<p>Now that was easy.</em></p>
<p>Download iPodMe (either google it or go to to Softpedia  <a href="http://www.softpedia.com/progDownload/iPodME-Download-119389.html">http://www.softpedia.com/progDownload/iPodME-Download-119389.html</a>)</p>
<p>iPodMe is so straight forward that I&#8217;m not going into that program, you can&#8217;t go wrong, it&#8217;s too easy!<br />
Only tip: Look at the resolution you are setting it to, try and match your phone.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/05/21/video-playback-on-android-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Strings &#8216; vs &#8220;</title>
		<link>http://skypher.com/index.php/2010/05/17/php-strings-vs/</link>
		<comments>http://skypher.com/index.php/2010/05/17/php-strings-vs/#comments</comments>
		<pubDate>Mon, 17 May 2010 19:45:22 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=464</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s wideley known that PHP supports both &#8216; (single quote) and &#8221; (double qoute) for string delimiting.<br />
It&#8217;s also widely known that PHP evaluates the DQ (Double Quote) Strings and replaces variables with their actual value. But not a lot has been written about what is actually faster.</p>
<p>Its quite simple: SQ (Single Quotes) is faster. Hands down.</p>
<p>It&#8217;s even faster when adding the variable by concatenating multiple strings. Please look at the following code: <code><br />
//variable used in DQ<br />
$time = microtime();<br />
for($i=0;$i<1000;++$i){<br />
	$$i = "Some Random String $i with a number";<br />
}<br />
echo microtime()-$time;<br />
//Variable used in concatenation with DQ<br />
echo '<br/>';<br />
for($i=0;$i<1000;++$i){<br />
	$$i = "Some Random String ".$i." with a number";<br />
}<br />
echo microtime()-$time;<br />
//variable used in concatenation with SQ<br />
echo '<br/>';<br />
$time = microtime();<br />
for($i=0;$i<1000;++$i){<br />
	$$i = 'Some Random String '.$i.' with a number';<br />
}<br />
echo microtime()-$time;<br />
</code></p>
<p>Code speaks for itself. In order of speed:<br />
1. SQ<br />
2. DQ without concat.<br />
3. DQ with concat.</p>
<p>Why, easy: Single quotes does not require evaluating. DQ without concat requires 1 evaluate. DQ with concat requires 2 evaluations of the string.<br />
So, in conclusion: double quotes are evil!</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/05/17/php-strings-vs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Video Playback on Android</title>
		<link>http://skypher.com/index.php/2009/03/29/video-playback-on-android/</link>
		<comments>http://skypher.com/index.php/2009/03/29/video-playback-on-android/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 16:25:32 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[divx]]></category>
		<category><![CDATA[Film]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[mp4]]></category>
		<category><![CDATA[watch]]></category>
		<category><![CDATA[xvid]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=139</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:There is a new post on this subject here:<br />
<a href="http://skypher.com/index.php/2010/05/21/video-playback-on-android-2">http://skypher.com/index.php/2010/05/21/video-playback-on-android-2</a>/</strong></p>
<p>Since a couple of months I have a new Android Phone. Ever since I got it I&#8217;ve been searching on how to play videos on the device.</p>
<p>When push comes to shove, it&#8217;s actually quite simple.</p>
<p>First: Install Jeff Hamilton&#8217;s &#8216;Video Player&#8217; from the market.<br />
This is a simple, no BS video player which supports playing MP4 or 3GPP with H.264, H.263 encoding and MP3, AAC or AMR Audio from your SD card.</p>
<p>Now that was easy.</p>
<p>Since the player does not support DivX XviD or anything else than stated above you might want to convert your video files. Luckily that is quite easy as well.</p>
<p>The Videora iPod converter works excellent it can be found here:<br />
<a href="http://www.videora.com/en-us/Converter/iPod/" target="_blank">http://www.videora.com/en-us/Converter/iPod/</a></p>
<p>After installation, it&#8217;s somewhat &#8216;weird&#8217; in my perception on how it works. But it does the job.</p>
<p>After installing, open up the settings &#8216;tab&#8217; and select &#8216;encoding&#8217;.<br />
Take iPod Classic (6th generation) from the dropdown and then select create a new profile, which you can dub &#8216;Android&#8217; or something in the name field.</p>
<p>Under Video, take these settings (click for large):</p>
<p><a href="/Cipher/images/videora_profile_general.jpg" target="_blank"><img class="alignleft" title="Videora Profile" src="/Cipher/images/videora_profile_general.jpg" alt="" width="415" height="250" /></a></p>
<p><a href="/Cipher/images/videora_settings.jpg" target="_blank"><img class="alignleft" title="Videora Settings" src="/Cipher/images/videora_settings.jpg" alt="Videora Settings for Android" width="414" height="252" /></a></p>
<p>Then click &#8216;OK&#8217; and &#8216;Save Settings&#8217;.</p>
<p>Next up is starting an encoding job.</p>
<p>Go to convert<br />
<a href="/Cipher/images/videora_convert.jpg" target="_blank"><img class="alignleft" title="Convert Menu" src="/Cipher/images/videora_convert.jpg" alt="" width="272" height="89" /></a></p>
<p>And then, this is the odd part. Select &#8216;Power Mode&#8217; from the center block, ignore the annoying advertisements:</p>
<p><a href="/Cipher/images/videora_power_mode.jpg" target="_blank"><img class="aligncenter" title="Videora Powermode" src="/Cipher/images/videora_power_mode.jpg" alt="" width="510" height="326" /></a></p>
<p>Ok that done, now, in the bottom part of the application you can see the next step.</p>
<p>You need to select the file you wish to encode and be sure to select the profile we just created as such:</p>
<p><a href="/Cipher/images/videora_start_convert.jpg" target="_blank"><img class="aligncenter" title="Videora Start converting!" src="/Cipher/images/videora_start_convert.jpg" alt="" width="483" height="136" /></a>You can choose to enqueue it or start encoding right away!</p>
<p>When done, which may take quite some time, you only have to copy your freshly created file to your phone&#8217;s SD card and start the Video Player. It will find the file by itself and you can watch straight away!</p>
<p>Any comment is welcome if you know a better application for the job, please tell me!</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2009/03/29/video-playback-on-android/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>String concatenation vs. Array joins</title>
		<link>http://skypher.com/index.php/2008/09/30/string-concatenation-vs-array-joins/</link>
		<comments>http://skypher.com/index.php/2008/09/30/string-concatenation-vs-array-joins/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 19:05:22 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[array join]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[string concatenation]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=54</guid>
		<description><![CDATA[I've read several websites which claim that string concatenation is outperformed by array joining in PHP. I know from firsthand that this certainly is a fact in ASP. And it's considered a 'best practice' in Javascript and probably several other languages. But PHP has always been a bit different on some parts, so I decided to test this and came to some interesting conclusions.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve read several websites which claim that string concatenation is outperformed by array joining in PHP. I know from firsthand that this certainly is a fact in ASP. And it&#8217;s considered a &#8216;best practice&#8217; in Javascript and probably several other languages. But PHP has always been a bit different on some parts, so I decided to test this and came to some interesting conclusions.</p>
<p>The following tests were performed 50 times with PHP 5.2.6.</p>
<p>First I tested the following pieces of code for parse time, $iConcats was set to 5000:</p>
<p style="background-color: #dadada; font-family: Courier;">for($i=0; $i&lt;$iConcats; ++$i)<br />
{<br />
$o .= &#8216;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&#8217;;<br />
}</p>
<p>This parsed on avarage in <strong>0.0065</strong> seconds.<br />
Next up was the array equivalent:</p>
<p style="background-color: #dadada; font-family: Courier;">for($i=0; $i&lt;$iConcats; ++$i)<br />
{<br />
$a[] = &#8216;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&#8217;;<br />
}<br />
$a = join(&#8221;, $a);</p>
<p>This parsed on average in about <strong>0.0187</strong> seconds. That&#8217;s almost 3 times slower!<br />
I deliberately added the join statement as it completes the comparison. And dor the more visually oriented amongst us, google provides nice graphs:</p>
<p style="text-align: center;">
<img class="aligncenter" src="http://chart.apis.google.com/chart?chs=500x200&amp;chd=t:0.00470614433289,0.00564002990723,0.00468802452087,0.0044960975647,0.00556802749634,0.00672197341919,0.00454592704773,0.0051600933075,0.00535488128662,0.00454187393188,0.00635504722595,0.00609087944031,0.00536584854126,0.00536298751831,0.00517606735229,0.00724506378174,0.00739192962646,0.00564193725586,0.00616383552551,0.00612497329712,0.00667095184326,0.00691294670105,0.00757193565369,0.00617218017578,0.00629806518555,0.00727605819702,0.00642204284668,0.00821805000305,0.00648093223572,0.00948882102966,0.00612497329712,0.00698709487915,0.00582408905029,0.00612592697144,0.0068621635437,0.00661897659302,0.00851392745972,0.0065929889679,0.00689792633057,0.00656199455261,0.00774216651917,0.0059220790863,0.005854845047,0.00877094268799,0.00671696662903,0.00802493095398,0.00566697120667,0.00665879249573,0.00682306289673,0.00703406333923,0.00642085075378|0.0150489807129,0.0178120136261,0.013365983963,0.0120301246643,0.0124061107635,0.0122818946838,0.0108051300049,0.0140759944916,0.0118789672852,0.0134541988373,0.0175681114197,0.0260560512543,0.0253939628601,0.0266220569611,0.0711159706116,0.0152308940887,0.0150091648102,0.0224511623383,0.0174009799957,0.073380947113,0.0262751579285,0.0150461196899,0.0156948566437,0.0278759002686,0.0239629745483,0.0178570747375,0.0188171863556,0.0134708881378,0.0161991119385,0.0270309448242,0.0226180553436,0.0188419818878,0.0169649124146,0.016037940979,0.011234998703,0.012237071991,0.0118451118469,0.0125539302826,0.0106329917908,0.0123829841614,0.0126929283142,0.012542963028,0.0130019187927,0.0125479698181,0.0149660110474,0.0128901004791,0.0132501125336,0.0116021633148,0.0139989852905,0.0148987770081,0.0136260986328&amp;cht=lc&amp;chds=0,0.00948882102966,0,0.073380947113&amp;chco=CFE17E,90B821" alt="" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://chart.apis.google.com/chart?chs=250x100&amp;chd=t:0.00653198719025,0.0187397384644&amp;cht=p3&amp;chl=Test%201|Test%202&amp;chco=90B821,CFE17E" alt="Who doesn't like pie?" /></p>
<p>During the measurements I also tracked the memory usage, which had the same outcome, concatenation wins again.</p>
<p>For string concatenation memory usage was ~56Mb. The array version used up ~155Mb. Again the three times! And again, let&#8217;s look at some graphs:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://chart.apis.google.com/chart?chs=500x200&amp;chd=t:-1,48,48,48,48,48,48,48,48,48,48,48,224,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,312,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48|-1,536,144,144,144,144,144,144,144,216,144,144,144,144,144,144,144,280,176,64,144,152,144,144,144,144,144,144,144,144,144,144,144,136,144,152,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144&amp;cht=lc&amp;chds=0,312,0,536&amp;chco=90B821,CFE17E" alt="" width="500" height="200" /></p>
<p>And in pie:</p>
<p style="text-align: center;"><img class="aligncenter" title="More pie!" src="http://chart.apis.google.com/chart?chs=250x100&amp;chd=t:56.78,155.18&amp;cht=p3&amp;chl=Test%201|Test%202&amp;chco=90B821,CFE17E" alt="" width="250" height="100" /></p>
<p>So in conclusion (at least for PHP 5.2.6) string concatenation is faster than array joins!</p>
<p>Strings vs Arrays: 2-0.</p>
<p>If you have some test resutls you want to share, please respond below or send me an email, you can reach me at: korneelwever. I&#8217;m with the Google mail service <img src='http://skypher.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2008/09/30/string-concatenation-vs-array-joins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Enhancements</title>
		<link>http://skypher.com/index.php/2008/08/15/google-enhancements/</link>
		<comments>http://skypher.com/index.php/2008/08/15/google-enhancements/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 13:43:48 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Greasemonkey]]></category>
		<category><![CDATA[hl]]></category>
		<category><![CDATA[iGoogle]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=36</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated <a href="http://userscripts.org/users/49212/scripts">my userscripts</a> for Google with Greasemonkey.</p>
<p><strong><a class="title" title="Google Instant Type" href="http://userscripts.org/scripts/show/25596">Google Instant Type</a></strong></p>
<p>I added the Classic homepage to the list where it should add the buttons. I also added a button to search Google News.</p>
<p><strong><a class="title" title="Google Own Language" href="http://userscripts.org/scripts/show/24756">Google Own Language</a></strong></p>
<p>Fixed the layout crash due to Google&#8217;s tiny HTML adjustment. Also added support for Google News and Images.</p>
<p>Please feel free to respond if you have a request!</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2008/08/15/google-enhancements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Function list for PHP</title>
		<link>http://skypher.com/index.php/2008/07/28/function-list-for-php/</link>
		<comments>http://skypher.com/index.php/2008/07/28/function-list-for-php/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 10:18:36 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[notepad++]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[function list]]></category>
		<category><![CDATA[n++]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=28</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>Jens Lorenz&#8217; function list plugin is a very handy tool!</p>
<p>After installation, there are a few things you need to customize. For php this is what I did:</p>
<ol>
<li>Open a php file with some functions</li>
<li>Go to Plugins-&gt;Function List-&gt;Language Parsing Rules</li>
<li>Click PHP and the &#8216;add group&#8217; button</li>
<li>Under group rules add the following (without the quotes):
<ol>
<li>function start: &#8220;[\t]*function &#8220;</li>
<li>function name: &#8220;[\w]*&#8221;</li>
<li>function end: &#8220;\(&#8220;</li>
</ol>
</li>
<li> and click &#8216;Try&#8217; and view your list being created.</li>
<li>If you like what you see, click ok if not, you can fiddle with the regex.</li>
</ol>
<p>Keep in mind that this might be different with your code convention, in that case, you&#8217;ll have to adjust the second (function name) regex.</p>
<p>At my current job we don&#8217;t have that much objects and classes, so I&#8217;ll see if i can whiff up a class based regex later.</p>
<p><strong>[edit]</strong><br />
More posts about Notepad++ can be found here: <a title="Notepad++ tag on Skypher.com" href="http://skypher.com/index.php/tag/notepad/">Notepad++  customization</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2008/07/28/function-list-for-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Notepad++ 5.0</title>
		<link>http://skypher.com/index.php/2008/07/11/notepad-50/</link>
		<comments>http://skypher.com/index.php/2008/07/11/notepad-50/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 13:16:08 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[completion]]></category>
		<category><![CDATA[ctrl+enter]]></category>
		<category><![CDATA[notepad++]]></category>
		<category><![CDATA[quicktext]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=25</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>Notepad++ released 5.0 some time ago, and recently a rebuffed version. It&#8217;s looking good!</p>
<p>I have some small adjustments for myself and maybe for you.</p>
<p>[ctrl]+[enter] now opens the function suggest by default which was the QuickText Replacer. Look in the shortcutmapper for this one (#36), just clear it and you&#8217;re back to normal.</p>
<p>The new function hinting system is great. I wish there was a way to add () when inserting a function name, and move the cursor in the brackets. Additionally, some comment on the function&#8217;s use would be helpful on hovering.</p>
<p>I noticed some people were coming to my site to find out how to change the font size, well, this is easy, just hit [ctrl] and scroll your mouse!</p>
<p>For entering some Quicktext please see my <a href="http://skypher.com/wiki/index.php?title=Quicktext.ini">Quicktext Wiki</a>.</p>
<p><strong>[edit]<br />
</strong>Don&#8217;t forget to install the Quicktext plugin which you can find <a title="Quicktext plugin by alphpt." href="http://sourceforge.net/project/downloading.php?group_id=183263&amp;use_mirror=heanet&amp;filename=QuickText-0.2-win32dll.rar&amp;90736719" target="_blank">here</a>.</p>
<p>More posts about Notepad++ can be found here: <a title="Notepad++ tag on Skypher.com" href="http://skypher.com/index.php/tag/notepad/">Notepad++  customization</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2008/07/11/notepad-50/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

