<?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>Got Ruby?</title>
	<atom:link href="http://janosmucsi.thruhere.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://janosmucsi.thruhere.net</link>
	<description>Things can be done betteR</description>
	<lastBuildDate>Wed, 18 Nov 2009 21:59:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Phusion Passenger on Ubuntu 9.10</title>
		<link>http://janosmucsi.thruhere.net/2009/11/phusion-passenger-on-ubuntu-9-10/</link>
		<comments>http://janosmucsi.thruhere.net/2009/11/phusion-passenger-on-ubuntu-9-10/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 06:31:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://janosmucsi.thruhere.net/?p=19</guid>
		<description><![CDATA[These notes describe how to run a Rails application on a dedicated port.
Your environment will be different, so some of the following steps will be unnecessary for you and other steps may be missing.
Since we are going to build native extensions, we need to get this module:

sudo apt-get install build-essential

First, we need to install Passenger [...]]]></description>
			<content:encoded><![CDATA[<p>These notes describe how to run a Rails application on a dedicated port.</p>
<p>Your environment will be different, so some of the following steps will be unnecessary for you and other steps may be missing.<br />
Since we are going to build native extensions, we need to get this module:</p>
<pre>
sudo apt-get install build-essential
</pre>
<p>First, we need to install Passenger as a Apache module.</p>
<pre>
sudo apt-get install libopenssl-ruby
sudo gem install passenger
sudo apt-get install apache2-dev libapr1-dev libaprutil1-dev apache2-prefork-dev
sudo passenger-install-apache2-module
</pre>
<p>Now edit apache2.conf adding the following:</p>
<pre>
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5
PassengerRuby /usr/bin/ruby1.8
</pre>
<p>If you want to run your Rails application on a different port, add the following to ports.conf:</p>
<pre>
NameVirtualHost *:3000
Listen 3000
</pre>
<p>You need to let Apache know where the Rails application is in /etc/apache2/sites-available/default:</p>
<pre>
&lt;VirtualHost *:3000&gt;
  ServerName myapp.mycompany.com
  DocumentRoot /apps/myapp/public
&lt;/VirtualHost&gt;
</pre>
<p>The last step is to restart Apache:</p>
<pre>
sudo /etc/init.d/apache2 restart
</pre>
]]></content:encoded>
			<wfw:commentRss>http://janosmucsi.thruhere.net/2009/11/phusion-passenger-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Utility functions in Flex</title>
		<link>http://janosmucsi.thruhere.net/2009/11/utility-functions-in-flex/</link>
		<comments>http://janosmucsi.thruhere.net/2009/11/utility-functions-in-flex/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 21:02:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://janosmucsi.thruhere.net/?p=13</guid>
		<description><![CDATA[I wanted to use some functions that do not belong to any visual component. I did not want to use the Java-style syntax in ActionScript (with classes and interfaces). Since ActionScript is closely related to JavaScript, I created a JavaScript-like object and put the utility functions there. The file is in src/com/mycompany/util/MYCO.as:

package com.myco.util {

	import flash.events.Event;

	public [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to use some functions that do not belong to any visual component. I did not want to use the Java-style syntax in ActionScript (with classes and interfaces). Since ActionScript is closely related to JavaScript, I created a JavaScript-like object and put the utility functions there. The file is in src/com/mycompany/util/MYCO.as:</p>
<pre>
package com.myco.util {

	import flash.events.Event;

	public function MYCO():Object {

		this.safeNull=function(instr:String):String {
	    	return instr==null?'':instr;
	    }
}
</pre>
<p>I can reference methods in this object from other files like this:</p>
<pre>
 var blah:Function= com.myco.util.MYCO().safeNull;
 var ret:String=blah.apply(this, ['hello']);
</pre>
<p>Suppose I need access to other functions in the MYCO object, I define a locally visible variable called Myco and assign it to this:</p>
<pre>
package com.myco.util {

	import flash.events.Event;

	public function MYCO():Object {
		var Myco:Object=this;
		this.safeNull=function(instr:String):String {
                Myco.sayHelloFirst();
	    	return instr==null?'':instr;
	    },

	    this.sayHelloFirst=function():void {
	    	// saying hello
	    }
    };
}
</pre>
<p>This is because I can not just use &#8216;this&#8217;. &#8216;this&#8217; could point to some other object, according to the rules of JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://janosmucsi.thruhere.net/2009/11/utility-functions-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Today</title>
		<link>http://janosmucsi.thruhere.net/2009/10/test/</link>
		<comments>http://janosmucsi.thruhere.net/2009/10/test/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 07:36:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://janosmucsi.thruhere.net/?p=3</guid>
		<description><![CDATA[Playing with Redis and MongoDB.
]]></description>
			<content:encoded><![CDATA[<p>Playing with Redis and MongoDB.</p>
]]></content:encoded>
			<wfw:commentRss>http://janosmucsi.thruhere.net/2009/10/test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile versus waterfall development</title>
		<link>http://janosmucsi.thruhere.net/2008/11/agile-versus-waterfallcomment-page-1/</link>
		<comments>http://janosmucsi.thruhere.net/2008/11/agile-versus-waterfallcomment-page-1/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 06:20:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://janosmucsi.thruhere.net/?p=37</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://janosmucsi.thruhere.net/2008/11/agile-versus-waterfallcomment-page-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duck typing vs. strong typing</title>
		<link>http://janosmucsi.thruhere.net/2008/10/duck-typing-vs-strong-typingduck-typing-vs-strong-typing/</link>
		<comments>http://janosmucsi.thruhere.net/2008/10/duck-typing-vs-strong-typingduck-typing-vs-strong-typing/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 06:23:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://janosmucsi.thruhere.net/?p=40</guid>
		<description><![CDATA[One year ago I wrote the original of this article after an interview. That article was lost when I reinstalled my server and did not bother to back up the database. But this time I should write better since I had time to reflect on the issue in the intervening one year.
It started when I [...]]]></description>
			<content:encoded><![CDATA[<p>One year ago I wrote the original of this article after an interview. That article was lost when I reinstalled my server and did not bother to back up the database. But this time I should write better since I had time to reflect on the issue in the intervening one year.<br />
It started when I was talking to this person who asked me whether strongly typed languages are better than duck-typed languages. That person was a manager at a company that used ActionScript. I told him both families of languages had their uses. In other cases, simply we do not have a choice. This person was shocked that I did not take sides. He had the impression that ActionScript was strongly typed (that&#8217;s what his programmers told him). He tried to convince me that strongly typed languages are better.<br />
Compile-time checking makes sense with low-level languages, when certain statements can be checked to detect runtime problems. For example, copying from a byte array to a string (or similar) would not make sense because it would result in corruption in memory. When you go to a higher level, detection becomes harder because the compiler needs to know so much about objects at runtime. Such checks are either impossible to program or would make the compiler slow or useless.<br />
Having no compilation errors does inspire some confidence as far as the quality of the code goes but experienced programmers know that problems occur at runtime.<br />
Compilation of strongly-typed languages created generations of programmers who simply do not write test for their code.</p>
]]></content:encoded>
			<wfw:commentRss>http://janosmucsi.thruhere.net/2008/10/duck-typing-vs-strong-typingduck-typing-vs-strong-typing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
