<?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>hugomonteiro.net &#187; en</title>
	<atom:link href="http://hugomonteiro.net/tag/en/feed/" rel="self" type="application/rss+xml" />
	<link>http://hugomonteiro.net</link>
	<description>&#34;When two men in business always agree, one of them is unnecessary.&#34; - William Wrigley Jr.</description>
	<lastBuildDate>Wed, 14 Dec 2011 00:12:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Leadership Lessons from Dancing Guy</title>
		<link>http://hugomonteiro.net/2010/02/14/leadership-lessons-from-dancing-guy/</link>
		<comments>http://hugomonteiro.net/2010/02/14/leadership-lessons-from-dancing-guy/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 19:02:44 +0000</pubDate>
		<dc:creator>Hugo Monteiro</dc:creator>
				<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[followers]]></category>
		<category><![CDATA[leadership]]></category>

		<guid isPermaLink="false">http://hugomonteiro.net/?p=288</guid>
		<description><![CDATA[Read transcrip at http://sivers.org/ff . Great Lesson!]]></description>
			<content:encoded><![CDATA[<p>Read transcrip at <a href="http://sivers.org/ff">http://sivers.org/ff </a>.</p>
<p>Great Lesson!</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/fW8amMCVAJQ&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/fW8amMCVAJQ&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://hugomonteiro.net/2010/02/14/leadership-lessons-from-dancing-guy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Play Framework + Oracle = EASY!</title>
		<link>http://hugomonteiro.net/2010/01/28/oracle-play-framework-easy/</link>
		<comments>http://hugomonteiro.net/2010/01/28/oracle-play-framework-easy/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 12:18:02 +0000</pubDate>
		<dc:creator>Hugo Monteiro</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[play]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://hugomonteiro.net/?p=277</guid>
		<description><![CDATA[To configure your oracle database using the play framework you need to follow the following steps: Choose the JAR with the drivers according to your oracle&#8217;s database version and put in the lib/ directory of your web application Configure your application.conf file,  located inside the conf/ directory In the JPA Configuration Section you have to [...]]]></description>
			<content:encoded><![CDATA[<p>To configure your oracle database using the <a href="http://www.playframework.org/">play framework</a> you need to follow the following steps:</p>
<ol>
<li>Choose the <a href="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html">JAR</a> with the drivers according to your oracle&#8217;s database version and put in the <em>lib/</em> directory of your web application</li>
<li>Configure your application.conf file,  located inside the <em>conf/</em> directory
<ul>
<li>In the JPA Configuration Section you have to choose the <a href="http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html#configuration-optional-dialects">JPA (Hibernate) dialect</a>. In my case I was working with oracle10g so i had to insert in the configuration file:
<ul>
<li>
<pre>jpa.dialect=org.hibernate.dialect.Oracle10gDialect</pre>
</li>
</ul>
</li>
<li>Now you just need to add the following lines, according to your database (including username and password).
<ul>
<li>
<pre>db.url=jdbc:oracle:thin:@yourdatabaseserver:1521:dbname
db.driver=oracle.jdbc.driver.OracleDriver
db.user=yourusername
db.pass=yourpassword</pre>
</li>
</ul>
</li>
</ul>
</li>
<li>Now you just need to restart the server. He adds the database drivers automatically to the classpath of the project.</li>
<li>If you want, you can generate <a href="http://www.netbeans.org">Netbeans</a> or <a href="http://www.eclipse.org">Eclipse</a> projects, so you can open this projects with everything configured.</li>
</ol>
<p>Really easy with no XMLs!</p>
]]></content:encoded>
			<wfw:commentRss>http://hugomonteiro.net/2010/01/28/oracle-play-framework-easy/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>[Play] Iterate over objects using jQuery</title>
		<link>http://hugomonteiro.net/2010/01/12/how-to-navigate-into-each-html-element-using-jquery/</link>
		<comments>http://hugomonteiro.net/2010/01/12/how-to-navigate-into-each-html-element-using-jquery/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 14:13:49 +0000</pubDate>
		<dc:creator>Hugo Monteiro</dc:creator>
				<category><![CDATA[play]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://hugomonteiro.net/?p=208</guid>
		<description><![CDATA[What if I want to navigate into each checkbox, radio of my html? You can do it pretty easily using jQuery.each function. In every checkbox element I want to send a post message to my Play Framework. ﻿﻿jQuery.each($(':checkbox'), function() { $﻿.post('@{myPlayMethod()}', { itemValue: $(this).val() }) });﻿ This code sends the html element value property to [...]]]></description>
			<content:encoded><![CDATA[<p>What if I want to navigate into each checkbox, radio of my html? You can do it pretty easily using <a href="http://docs.jquery.com/Utilities/jQuery.each">jQuery.each function</a>.</p>
<p>In every checkbox element I want to send a post message to my Play Framework.</p>
<pre>﻿﻿jQuery.each($(':checkbox'), function() {
    $﻿.post('@{myPlayMethod()}', { itemValue: $(this).val() })
});﻿</pre>
<p>This code sends the html element value property to method &#8220;<em>myPlayMethod(String itemValue)</em>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://hugomonteiro.net/2010/01/12/how-to-navigate-into-each-html-element-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to divide your GUI from your processing code?</title>
		<link>http://hugomonteiro.net/2009/11/06/how-to-divide-your-gui-from-your-processing-code/</link>
		<comments>http://hugomonteiro.net/2009/11/06/how-to-divide-your-gui-from-your-processing-code/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 14:53:43 +0000</pubDate>
		<dc:creator>Hugo Monteiro</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://hugomonteiro.net/?p=157</guid>
		<description><![CDATA[Many students don't know how to organize their code. Abstractions and Interfaces makes a difference when developing Java applications. What if your code was divided? For instance, if you have created a network application with a GUI (Graphical User Interface). The first approach is to put the code all together because it's easier from the beginning. That's wrong because it's harder to find an error and you have to read a lot of garbage code like <em>textBox.setValue</em>...]]></description>
			<content:encoded><![CDATA[<p>Many students don&#8217;t know how to organize their code. Abstractions and Interfaces make a difference when developing Java applications. What if your code was divided? For instance, if you built a network application with a GUI (Graphical User Interface). The first approach is to put the code all together because it&#8217;s easier from the beginning. That&#8217;s wrong because it&#8217;s harder to find an error, and you have to read a lot of garbage code like <em>textBox.setValue</em>&#8230;</p>
<p>What about dividing this network application in two layers? One layer, with all the network code and the top layer with only the GUI? How is this possible? Using Java interfaces and the notion of events.</p>
<p>We can start by creating our event interface that will be waken up, when for instance we are receiving a message from the network:</p>
<pre>public interface EventNetworkInterface {
	void receiveMessage(String msg);
}</pre>
<p>Now it&#8217;s time to build our simplified network layer:</p>
<pre>
public class NetworkLayer {
	EventNetworkInterface gui = null;

	public NetworkLayer(EventNetworkInterface gui) {
		this.gui = gui;
	}

	public void receiveMessageNetwork() {
		//simulates receiving a message from the network
                String msg_received = "Hello World!";
		//wake up event in the GUI
		gui.receiveMessage(msg_received);
	}
}
</pre>
<p>Now with the network layer created you have to create the GUI:</p>
<pre>
public class GUI implements EventNetworkInterface {

	public static void main(String[] args) {
		new GUI();
	}

	private NetworkLayer nl;

	public GUI() {
		nl = new NetworkLayer(this);
		//issue a receiveMessage event:
		nl.receiveMessageNetwork();
	}

	@Override
	public void receiveMessage(String msg) {
		System.out.println("I sent the message: " + msg);
	}

}
</pre>
<p>In the GUI constructor we are simulating a <em>receivedMessage</em> event after we build the network layer and send the GUI that implements the events that will be waken up when a <em>receiveMessage</em> (in this case) happens.</p>
<p>With this approach you can separate the design code, from the processing code and simplify when you are adding more features to the layers beneath you.</p>
<p>If you want to have multiple classes to execute the same events, see more about the <a href="http://en.wikipedia.org/wiki/Observer_pattern">observer pattern</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://hugomonteiro.net/2009/11/06/how-to-divide-your-gui-from-your-processing-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Singleton Design Pattern problems?</title>
		<link>http://hugomonteiro.net/2009/10/24/singleton-design-pattern-problems/</link>
		<comments>http://hugomonteiro.net/2009/10/24/singleton-design-pattern-problems/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 12:46:23 +0000</pubDate>
		<dc:creator>Hugo Monteiro</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://hugomonteiro.net/?p=123</guid>
		<description><![CDATA[The Singleton Pattern ensures a class has only one instance that provides a global point to access it. This design pattern is perfect for maintaining a set of configurations or other variables always available at run-time in your software. public static Singleton getInstance() { if (uniqueInstance == null) { uniqueInstance = new Singleton(); } return [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton Pattern</a> ensures a class has only one instance that provides a global point to access it. This design pattern is perfect for maintaining a set of configurations or other variables always available at run-time in your software.</p>
<pre>public static Singleton getInstance() {
    if (uniqueInstance == null) {
       uniqueInstance = new Singleton();
    }
    return uniqueInstance;
}</pre>
<p>In this code snippet, if you have a multithreaded application that executes the same class, some concurrency problems can occur. For instance if the two threads accesses to the condition at the same time, creates two different Singleton instances. How can you fix this problem? Newer virtual machines (like JVM 1.5) ensures this when you create the Singleton instance in a static variable outside of any method. The JVM guarantees that the instance will be created before any thread accesses the static uniqueInstance variable. The solution for this is:</p>
<pre>public class Singleton {
    private static Singleton uniqueInstance = new Singleton ();

    private Singleton() {}

    public static Singleton getInstance () {
       return uniqueInstance;
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://hugomonteiro.net/2009/10/24/singleton-design-pattern-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entrepreneur, remember what you thought when you were a kid?</title>
		<link>http://hugomonteiro.net/2009/09/07/entrepreneur-remember-what-you-thought-when-you-were-a-kid/</link>
		<comments>http://hugomonteiro.net/2009/09/07/entrepreneur-remember-what-you-thought-when-you-were-a-kid/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 23:10:42 +0000</pubDate>
		<dc:creator>Hugo Monteiro</dc:creator>
				<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[inovation]]></category>
		<category><![CDATA[motivation]]></category>

		<guid isPermaLink="false">http://hugomonteiro.net/?p=57</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/T6MhAwQ64c0&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/T6MhAwQ64c0&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://hugomonteiro.net/2009/09/07/entrepreneur-remember-what-you-thought-when-you-were-a-kid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>80/20 rule for entrepreneurs</title>
		<link>http://hugomonteiro.net/2009/09/05/8020-rule-for-entrepreneurs/</link>
		<comments>http://hugomonteiro.net/2009/09/05/8020-rule-for-entrepreneurs/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 12:18:29 +0000</pubDate>
		<dc:creator>Hugo Monteiro</dc:creator>
				<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[en]]></category>

		<guid isPermaLink="false">http://hugomonteiro.net/?p=36</guid>
		<description><![CDATA[What is the 80/20 rule and why is it so important to entrepreneurs? Wikipedia says: &#8220;The principle was suggested by management thinker Joseph M. Juran. It was named after the Italian economist Vilfredo Pareto, who observed that 80% of income in Italy was received by 20% of the Italian population. The assumption is that most [...]]]></description>
			<content:encoded><![CDATA[<p>What is the 80/20 rule and why is it so important to entrepreneurs? <a href="http://en.wikipedia.org/wiki/Pareto_principle">Wikipedia</a> says:</p>
<blockquote><p>&#8220;The principle was suggested by management thinker Joseph M. Juran. It was named after the Italian economist Vilfredo Pareto, who observed that 80% of income in Italy was received by 20% of the Italian population. The assumption is that most of the results in any situation are determined by a small number of causes.&#8221;</p></blockquote>
<p><img class="size-full wp-image-40 alignright" title="80-20-rule" src="http://hugomonteiro.net/wp-content/uploads/2009/09/80-20-rule.jpg" alt="80-20-rule" width="200" height="183" />This rule says that 80% of your outcomes come from 20% of your inputs. For instance, in your life, there are certain activities that you do (your 20%) that account for the majority (your 80%) of your happiness and outputs.</p>
<p>The 80/20 rule can be applied to your life and your business, where being happy and satisfied for what you do, is the most important thing. Off course that money is important, but it shouldn&#8217;t be so important compared to your happiness.</p>
<p>Live your life following the 80/20 rule. Follow your dream!</p>
<p>(<a href="http://www.entrepreneurs-journey.com/397/80-20-rule-pareto-principle/">more information about the 80/20 rule</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://hugomonteiro.net/2009/09/05/8020-rule-for-entrepreneurs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

