<?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>laplace&#039;s demon &#187; Programming</title>
	<atom:link href="http://www.laplacesdemon.com/cat/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laplacesdemon.com</link>
	<description>Süleyman Melikoğlu</description>
	<lastBuildDate>Thu, 26 Jan 2012 10:26:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Zend Framework 2 comparison</title>
		<link>http://www.laplacesdemon.com/2012/01/19/zend-framework-2-comparison/</link>
		<comments>http://www.laplacesdemon.com/2012/01/19/zend-framework-2-comparison/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 13:36:31 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=416</guid>
		<description><![CDATA[I&#8217;ve been using Zend Framework 1.x for quite a long time. It is a stable framework with a lot of features. But I always have some performance issues in terms of memory/cpu usage and page load time. I have looked at the new version of Zend Framework which is under active development. As my first [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Zend Framework 1.x for quite a long time. It is a stable framework with a lot of features. But I always have some performance issues in terms of memory/cpu usage and page load time. I have looked at the new version of Zend Framework which is under active <a href="https://github.com/zendframework/zf2" title="Zend Framework Source code" target="_blank">development</a>. As my first impressions, I have astonished by their new design. Removing require_once statements, using namespaces and lazy loading of components should boost the performance drastically. In addition, the new module system will be very flexible especially for 3rd party component developers. </p>
<p>To see it in action, I have decided to do a quick benchmark. I have used the <a href="https://github.com/zendframework/ZendSkeletonApplication" title="zend framework 2 skeleton application" target="_blank">zf2 skeleton application</a>, and my current zend framework 1.11 setting which I use in any of my PHP projects. The comparison is totally subjective and the aim is to have an overall impression. </p>
<p>I have used the apache benchmarking tool. The number of requests are 100 and the concurrency level is 5.<br />
<code>ab -c 5 -n 100 http://myUrl</code> </p>
<p>Here are the results</p>
<p>Zend Framework 2<br />
<code><br />
Server Software:        Apache/2.2.20<br />
Server Hostname:        localhost<br />
Server Port:            80</p>
<p>Document Path:          /zf2-sample/public<br />
Document Length:        351 bytes</p>
<p>Concurrency Level:      5<br />
Time taken for tests:   0.214 seconds<br />
Complete requests:      100<br />
Failed requests:        0<br />
Write errors:           0<br />
Non-2xx responses:      100<br />
Total transferred:      61900 bytes<br />
HTML transferred:       35100 bytes<br />
Requests per second:    466.58 [#/sec] (mean)<br />
Time per request:       10.716 [ms] (mean)<br />
Time per request:       2.143 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          282.04 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0   10   6.3     11      33<br />
Processing:     0    1   2.6      0      15<br />
Waiting:        0    0   2.6      0      15<br />
Total:          1   11   6.1     11      33</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%     11<br />
  66%     12<br />
  75%     13<br />
  80%     14<br />
  90%     16<br />
  95%     23<br />
  98%     32<br />
  99%     33<br />
 100%     33 (longest request)<br />
</code></p>
<p>Zend Framework 1.11</p>
<p><code><br />
Server Software:        Apache/2.2.20<br />
Server Hostname:        localhost<br />
Server Port:            80</p>
<p>Document Path:          /ad<br />
Document Length:        336 bytes</p>
<p>Concurrency Level:      5<br />
Time taken for tests:   0.410 seconds<br />
Complete requests:      100<br />
Failed requests:        0<br />
Write errors:           0<br />
Non-2xx responses:      100<br />
Total transferred:      58900 bytes<br />
HTML transferred:       33600 bytes<br />
Requests per second:    243.98 [#/sec] (mean)<br />
Time per request:       20.494 [ms] (mean)<br />
Time per request:       4.099 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          140.33 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0   20  14.7     16      53<br />
Processing:     0    1   3.6      0      28<br />
Waiting:        0    1   3.5      0      28<br />
Total:          1   20  14.4     17      53</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%     17<br />
  66%     29<br />
  75%     33<br />
  80%     34<br />
  90%     40<br />
  95%     46<br />
  98%     51<br />
  99%     53<br />
 100%     53 (longest request)<br />
</code></p>
<p>Conclusion: New version of Zend Framework is nearly double times faster that the current version.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2012/01/19/zend-framework-2-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unit Testing Asynchronous Operations with OCTest</title>
		<link>http://www.laplacesdemon.com/2011/09/21/unit-testing-asynchronous-operations-with-octest/</link>
		<comments>http://www.laplacesdemon.com/2011/09/21/unit-testing-asynchronous-operations-with-octest/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 11:24:16 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[unit-testing]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=385</guid>
		<description><![CDATA[I have experienced problems while I write the unit tests for a RESTLike web service client. The client class is basically a wrapper around NSURLConnection which asynchronously fetch/download data from a server. Unit tests are synchronously operations and will not work in this context. The test case is the following: connect to a server via its [...]]]></description>
			<content:encoded><![CDATA[<p>I have experienced problems while I write the unit tests for a RESTLike web service client. The client class is basically a wrapper around NSURLConnection which asynchronously fetch/download data from a server. Unit tests are synchronously operations and will not work in this context.</p>
<p>The test case is the following: connect to a server via its URL and fetches some data from it. I have used a loop while the downloading operation continues to force the test method to wait for the connection class to finish its job. Following is the test case method:</p>
<pre class="brush:cpp">
- (void)testConnection {
    // the custom strategy class to encapsulate the behavior of the rest client
    WSRestClientDefaultStrategy* strategy = [[WSRestClientDefaultStrategy alloc] init];
    // create the rest client under testing
    WSRestClient* client = [WSRestClient restClientWithStrategy:strategy withMethodName:@"anymethod" andParams:nil andHttpMethod:@"GET"];
    [client execute];
    [strategy release];

    // this is a workaround in order to test async requests
    NSRunLoop* runLoop = [NSRunLoop currentRunLoop];

    // wait while the connection class does its job
    while ([client loading] &amp;amp;amp;&amp;amp;amp; [runLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]);
}
</pre>
<p>Please note that the unit test normally should not fetch any data from any external service. Please consider to use mock classes to reduce the dependency. You can use a framework like <a href="http://ocmock.org/">OSMock</a> for creating the mock classes</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2011/09/21/unit-testing-asynchronous-operations-with-octest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a netbeans bug on jax-rpc</title>
		<link>http://www.laplacesdemon.com/2011/04/19/a-netbeans-bug-on-jax-rpc/</link>
		<comments>http://www.laplacesdemon.com/2011/04/19/a-netbeans-bug-on-jax-rpc/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 14:26:02 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=371</guid>
		<description><![CDATA[I have tried to write a rpc web service client in java using a wsdl file on netbeans, but a ittle bug drives me crazy. If you come across the following error during the compilation, then the following solution might save your time. taskdef class com.sun.xml.rpc.tools.ant.Wscompile cannot be found open up /nbproject/project.properties Change: wscompile.classpath=${wscompile.tools.classpath}:${j2ee.platform.wscompile.classpath} To: [...]]]></description>
			<content:encoded><![CDATA[<p>I have tried to write a rpc web service client in java using a wsdl file on netbeans, but a ittle bug drives me crazy. If you come across the following error during the compilation, then the following solution might save your time.</p>
<pre>taskdef class com.sun.xml.rpc.tools.ant.Wscompile cannot be found</pre>
<p>open up <code>/nbproject/project.properties</code><br />
Change:</p>
<pre>wscompile.classpath=${wscompile.tools.classpath}:${j2ee.platform.wscompile.classpath}</pre>
<p>To:</p>
<pre>wscompile.classpath=${wscompile.tools.classpath}:${j2ee.platform.wscompile.classpath}:${javac.classpath}</pre>
<p>woila</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2011/04/19/a-netbeans-bug-on-jax-rpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rest vs rpc</title>
		<link>http://www.laplacesdemon.com/2011/04/01/rest-vs-rpc/</link>
		<comments>http://www.laplacesdemon.com/2011/04/01/rest-vs-rpc/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 12:48:19 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=368</guid>
		<description><![CDATA[Well, i came across a great comparison article and i want to share it. Well this is because my bookmarking system sucks. So when i need to save a document, i post it in my blog. Yeah it sucks. http://md314159265.wordpress.com/2006/10/30/comparison-of-rest-vs-xml-rpc/]]></description>
			<content:encoded><![CDATA[<p>Well, i came across a great comparison article and i want to share it. Well this is because my bookmarking system sucks. So when i need to save a document, i post it in my blog. Yeah it sucks.</p>
<p><a href="http://md314159265.wordpress.com/2006/10/30/comparison-of-rest-vs-xml-rpc/" target="_blank">http://md314159265.wordpress.com/2006/10/30/comparison-of-rest-vs-xml-rpc/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2011/04/01/rest-vs-rpc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting PHP headers without apache mod headers</title>
		<link>http://www.laplacesdemon.com/2011/02/08/getting-php-headers-without-apache-mod-headers/</link>
		<comments>http://www.laplacesdemon.com/2011/02/08/getting-php-headers-without-apache-mod-headers/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 08:50:52 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=352</guid>
		<description><![CDATA[It sometimes happen. You are in a restricted environment -like a shared hosting- and somehow you want to reach the custom headers without enabling the apache module &#8220;mod_headers&#8221;. Than following little function will do your job. function getHeaders() { $headers = array(); foreach ($_SERVER as $k =&#62; $v) { if (substr($k, 0, 5) == "HTTP_") [...]]]></description>
			<content:encoded><![CDATA[<p>It sometimes happen. You are in a restricted environment -like a shared hosting- and somehow you want to reach the custom headers without enabling the apache module &#8220;mod_headers&#8221;. Than following little function will do your job.</p>
<pre class="brush:php">function getHeaders()
    {
        $headers = array();
        foreach ($_SERVER as $k =&gt; $v)
        {
            if (substr($k, 0, 5) == "HTTP_")
            {
                $k = str_replace('_', ' ', substr($k, 5));
                $k = str_replace(' ', '_', strtolower($k));
                $headers[$k] = $v;
            }
        }
        return $headers;
    }</pre>
<p>P.S. If you have the possibility to use the mod_headers, than you&#8217;re free to use apache_get_headers() function.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2011/02/08/getting-php-headers-without-apache-mod-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Maintenance Scripts</title>
		<link>http://www.laplacesdemon.com/2011/01/03/mac-maintenance-scripts/</link>
		<comments>http://www.laplacesdemon.com/2011/01/03/mac-maintenance-scripts/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 18:23:56 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=341</guid>
		<description><![CDATA[Mac OSX schedules and runs some kind of maintenance scripts. Those scripts only removes some invisible system log files that is not a big deal. But the thing is, it schedules the scripts at 3:30 am of the day, week or month. But off course you can manually run them via following command sudo periodic [...]]]></description>
			<content:encoded><![CDATA[<p>Mac OSX schedules and runs some kind of maintenance scripts. Those scripts only removes some invisible system log files that is not a big deal. But the thing is, it schedules the scripts at 3:30 am of the day, week or month. But off course you can manually run them via following command</p>
<pre class="brush:bash">
sudo periodic daily weekly monthly
</pre>
<p>It&#8217;s ok not to see a output when you run the command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2011/01/03/mac-maintenance-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Think beyond DB</title>
		<link>http://www.laplacesdemon.com/2010/11/12/think-beyond-db/</link>
		<comments>http://www.laplacesdemon.com/2010/11/12/think-beyond-db/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 08:31:11 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=330</guid>
		<description><![CDATA[I found a good presentation by the project lead of Zend Framework. He explains the data persistance and why good OO programming instead of refactoring is saves a lot of time. Architecting Your Models View more presentations from Matthew Weier O&#8217;Phinney.]]></description>
			<content:encoded><![CDATA[<p>I found a good presentation by the project lead of Zend Framework. He explains the data persistance and why good OO programming instead of refactoring is saves a lot of time.</p>
<div style="width:425px" id="__ss_2316754"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/weierophinney/architecting-your-models" title="Architecting Your Models">Architecting Your Models</a></strong><object id="__sse2316754" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=architecting-your-models-091022014453-phpapp02&#038;stripped_title=architecting-your-models&#038;userName=weierophinney" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse2316754" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=architecting-your-models-091022014453-phpapp02&#038;stripped_title=architecting-your-models&#038;userName=weierophinney" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/weierophinney">Matthew Weier O&rsquo;Phinney</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/11/12/think-beyond-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to re-locate SVN repository</title>
		<link>http://www.laplacesdemon.com/2010/11/01/how-to-re-locate-svn-repository/</link>
		<comments>http://www.laplacesdemon.com/2010/11/01/how-to-re-locate-svn-repository/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 08:23:37 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=325</guid>
		<description><![CDATA[Recently our local svn server location is changed. We use ip-address rather than a domain name for the svn server, so we needed to change the repository location in our working copies. To change the svn location, use the following syntax: svn switch --relocate svn://oldhostname/myrepository svn://newhostname/myrepository Edit: I&#8217;m so lost that i forgot to exclude [...]]]></description>
			<content:encoded><![CDATA[<p>Recently our local svn server location is changed. We use ip-address rather than a domain name for the svn server, so we needed to change the repository location in our working copies. </p>
<p>To change the svn location, use the following syntax:</p>
<p><code><br />
svn switch --relocate svn://oldhostname/myrepository svn://newhostname/myrepository<br />
</code></p>
<p>Edit: I&#8217;m so lost that i forgot to exclude the username and password variables from the code above <img src='http://www.laplacesdemon.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/11/01/how-to-re-locate-svn-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sroups is coming out</title>
		<link>http://www.laplacesdemon.com/2010/08/27/sroups-is-coming-out/</link>
		<comments>http://www.laplacesdemon.com/2010/08/27/sroups-is-coming-out/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 19:29:29 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[oyun stüdyosu]]></category>
		<category><![CDATA[sroups]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=278</guid>
		<description><![CDATA[Yeah it&#8217;s coming soon. We&#8217;re developing a social network application at OyunStudyosu where you can turn your website into a virtual world. In sroups (which is a flash application), users will step into a virtual isometric world and interact with other people who visit the website at the same time. The idea, somehow, reminds me [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah it&#8217;s coming soon. We&#8217;re developing a social network application at <a href="http://www.oyunstudyosu.com/">OyunStudyosu</a> where you can turn your website into a virtual world. In sroups (which is a flash application), users will step into a virtual isometric world and interact with other people who visit the website at the same time.</p>
<p>The idea, somehow, reminds me <a href="http://www.imdb.com/title/tt0133093/">the matrix</a> movie which is by far the most influenced movie for a programmer. In matrix, people log into the virtual world called matrix (not using flash application though <img src='http://www.laplacesdemon.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), and interact with other &#8220;virtual&#8221; people. Everything is software, everything is obkject in that world but the experience is real. I really wish that I have a world like that. Sroups gives us an opportunity to use the matrix (imo). But it&#8217;s a pity that we can&#8217;t bind our body to that world physically.</p>
<p>Well, I should mention that there are plenty of virtual worlds around, like warcraft (which is awesome), but the main difference is, sroups is like a simulation of the containig website, not a game, not a fantasy. At least it should. Of course the project is in (closed) beta now and it&#8217;s too primitive to make an analysis. </p>
<p>But yeah, for me, the idea is very excited.</p>
<p>Btw, I&#8217;ve decided to write my posts in english from now on. Will explain the reasons later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/08/27/sroups-is-coming-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac&#8217;de port kullanımını görmek</title>
		<link>http://www.laplacesdemon.com/2010/06/09/macde-port-kullanimini-gormek/</link>
		<comments>http://www.laplacesdemon.com/2010/06/09/macde-port-kullanimini-gormek/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 20:54:46 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=270</guid>
		<description><![CDATA[için güzide bir komut var. işte şu: sudo lsof -i -P Ubuntu için de şu kullanışlı sudo netstat -lntp]]></description>
			<content:encoded><![CDATA[<p>için güzide bir komut var. işte şu:</p>
<pre class="brush:bash">sudo lsof -i -P</pre>
<p>Ubuntu için de şu kullanışlı</p>
<pre class="brush:bash">sudo netstat -lntp</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/06/09/macde-port-kullanimini-gormek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.laplacesdemon.com/cat/programming/feed/ ) in 0.12418 seconds, on Feb 6th, 2012 at 4:18 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 6th, 2012 at 5:18 pm UTC -->
