<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>There&#039;s no place like 127.0.0.1</title>
	<atom:link href="http://trinisoftinc.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://trinisoftinc.wordpress.com</link>
	<description>My Personal Blog</description>
	<lastBuildDate>Tue, 03 Jan 2012 11:11:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='trinisoftinc.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>There&#039;s no place like 127.0.0.1</title>
		<link>http://trinisoftinc.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://trinisoftinc.wordpress.com/osd.xml" title="There&#039;s no place like 127.0.0.1" />
	<atom:link rel='hub' href='http://trinisoftinc.wordpress.com/?pushpress=hub'/>
		<item>
		<title>2011 in review</title>
		<link>http://trinisoftinc.wordpress.com/2012/01/03/2011-in-review/</link>
		<comments>http://trinisoftinc.wordpress.com/2012/01/03/2011-in-review/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 11:11:16 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=269</guid>
		<description><![CDATA[The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog. Here&#8217;s an excerpt: The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 14,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 5 sold-out performances for that many [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=269&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.</p>
<p><a href="/2011/annual-report/"><img src="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg" alt="" width="100%" /></a></p>
<p>Here&#8217;s an excerpt:</p>
<blockquote><p>The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about <strong>14,000</strong> times in 2011. If it were a concert at Sydney Opera House, it would take about 5 sold-out performances for that many people to see it.</p></blockquote>
<p><a href="/2011/annual-report/">Click here to see the complete report.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/269/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=269&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2012/01/03/2011-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>

		<media:content url="http://www.wordpress.com/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg" medium="image" />
	</item>
		<item>
		<title>Book Review: Java the Complete Reference, 8th Edition</title>
		<link>http://trinisoftinc.wordpress.com/2011/11/05/book-review-java-the-complete-reference-8th-edition/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/11/05/book-review-java-the-complete-reference-8th-edition/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 19:09:57 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[best practises]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[book review]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java the complete reference 8th edition]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=262</guid>
		<description><![CDATA[Java, the Complete Reference, 8th Edition has been updated according to changes in Java 7. For those not willing to read the whole review, I will say my conclusion is, be you a beginner or an expert Java developer, you need to read this book. This book is an in-depth guide to the Java language. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=262&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<p>Java, the Complete Reference, 8th Edition has been updated according to changes in Java 7. For those not willing to read the whole review, I will say my conclusion is, be you a beginner or an expert Java developer, you need to read this book.</p>
<p>This book is an in-depth guide to the Java language. A very large portion of the core Java APIs are discussed comprehensively. The book has four parts, plus appendix and index.</p>
<p><strong>PART 1: The Java Language</strong></p>
<p>This part has 14 chapters and comprises discussions ranging from the simplest to the fairly complex. It starts with a history of Java and ends with a discussion on Generics, touching topics like Annotations, IO, Threading and Exceptions along the way. I particularly like the part that talks about C programming language, extolling the virtues of the language. Of course no Java book is complete without talking about OOP (Object oriented Programming) and chapter 2 of part 1 did justice to this. One good thing for beginners is that you start writing code straight from chapter 2. If you are an experienced programmer, you can safely skip to chapter 10. Although I recommend reading everything.</p>
<p><strong>Chapter 1: <em>The Introduction and Evolution of Java</em></strong></p>
<p><strong>Chapter: 2: <em>An Overview of Java</em></strong></p>
<p><strong>Chapter: 3: <em>Data Types, Variables and Arrays</em></strong></p>
<p><strong>Chapter: 4: <em>Operators</em></strong></p>
<p><strong><em></em></strong><strong>Chapter: 5: <em>Control Statements</em></strong></p>
<p><strong><em></em></strong><strong>Chapter: 6: <em>Introducing Classes</em></strong></p>
<p><strong><strong>Chapter: 7: <em>A closer look at methods and classes</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 8: <em>Inheritance</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 9: <em>Packages and Interfaces</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 10: <em>Exception Handling</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 11: <em>Multithreaded Programming</em></strong></strong></p>
<p><strong><strong><em></em></strong>Chapter 12: <em>Enumerations, Autoboxing, and Annotations (metadata)</em></strong></p>
<p><strong>Chapter 13: <em>I/O, Applets and Other topics</em></strong></p>
<p><strong>Chapter 14: <em>Generics</em></strong></p>
<p>&nbsp;</p>
<p><strong>PART 2: The Java Library</strong></p>
<p>This part also has 14 chapters, taking the chapters count to 28. Here the book discusses the core Java Library; which includes Strings, NIO, Networking, java.util package, AWT, concurrency and Regular Expressions. This is the chapter for you if you are an experienced developer. Here, the book discusses the new Java 7 Features and more. I&#8217;ll advice beginners to read the Part 1 at least twice before diving into Part 2.</p>
<p><strong>Chapter 15: <em>String Handling</em></strong></p>
<p><strong>Chapter: 16: <em>Exploring java.lang</em></strong></p>
<p><strong>Chapter: 17: <em>java.util Part 1: The collections framework</em></strong></p>
<p><strong>Chapter: 18: <em>java.util Part 2: More Utility Classes</em></strong></p>
<p><strong><em></em></strong><strong>Chapter: 19: <em>Input/Output: Exploring java.io</em></strong></p>
<p><strong><em></em></strong><strong>Chapter: 20: <em>Exploring NIO</em></strong></p>
<p><strong><strong>Chapter: 21: <em>Networking</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 22: <em>The Applet Class</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 23: <em>Event Handling</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 24: <em>Introducing the AWT: Working with Windows, Graphics and Text</em></strong></strong></p>
<p><strong><strong><em></em></strong><strong>Chapter: 25: <em>Using AWT Controls: Layout Managers and Menus</em></strong></strong></p>
<p><strong><strong><em></em></strong>Chapter 26: <em>Images</em></strong></p>
<p><strong>Chapter 27: <em>The Concurrent Utilities</em></strong></p>
<p><strong>Chapter 28: <em>Regular Expressions and Other Packages</em></strong></p>
<p>&nbsp;</p>
<p><strong>PART 3:  Software Development Using Java</strong></p>
<p>This part discusses some really very import ant Java concepts. It contains just 4 fully packed chapters, recommended for both beginners and experts alike</p>
<p><strong>Chapter 29: <em>Java Beans</em></strong></p>
<p><strong>Chapter 30: <em>Introducing Swing</em></strong></p>
<p><strong>Chapter 31: <em>Exploring Swing</em></strong></p>
<p><strong>Chapter 32: <em>Servlets</em></strong></p>
<p>&nbsp;</p>
<p><strong>PART 4: Applying Java</strong></p>
<p>In this part, we have two chapters. Each chapter picks a real world Java application. describes and implemented it. A note to beginners here, because of the volume of code you will be required to type, you might want to do copy-and-paste, but I strongly recommended against that. Doing the typing will definitely help you in more ways than one. This chapter concludes this book, bringing the number of chapters to 34.</p>
<p><strong>Chapter 33: <em>Financial Applets and Servlets</em></strong></p>
<p><strong>Chapter 34: <em>Creating a download manager in Java</em></strong></p>
<p>&nbsp;</p>
<p><strong>Appendix and Index.</strong></p>
<p>In the appendix, javadoc is discussed. I particularly like and recommend this part to all. Documenting code is very important and should be embraced by all.</p>
<p>&nbsp;</p>
<p>In summary, this is a good book, read it, study it, use it as a reference, whatever you decided to do with this book, you will find out it is more than equal to the task.</p>
<p>Great thanks to Faltermeier Bettina for providing me the preview copy.</p>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=262&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/11/05/book-review-java-the-complete-reference-8th-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>Defying the Odds: Setting up Oracle NoSQL DB on MAC, using VMs for replication</title>
		<link>http://trinisoftinc.wordpress.com/2011/10/22/defying-the-odds-setting-up-oracle-nosql-db-on-mac-using-vms-for-replication/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/10/22/defying-the-odds-setting-up-oracle-nosql-db-on-mac-using-vms-for-replication/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 22:35:33 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[best practises]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[bigdata]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=255</guid>
		<description><![CDATA[I have a Macbook Pro, 2010 Model with 8GB of RAM. While reading the Admin Guide for the Oracle BigData release, it says that only linux and Solaris OSes are supported for now. I hissed and went ahead anyway. Next It said I shouldn&#8217;t setup multiple nodes using a Virtual Machine, another hiss. The reason [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=255&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a><br />
I have a Macbook Pro, 2010 Model with 8GB of RAM. While reading the Admin Guide for the Oracle BigData release, it says that only linux and Solaris OSes are supported for now. I hissed and went ahead anyway. Next It said I shouldn&#8217;t setup multiple nodes using a Virtual Machine, another hiss.</p>
<p>The reason why I hissed was I was pissed, why Linux and Solaris, and now I couldn&#8217;t use VM? I went back to the Guide to see why, but the reasons given wasn&#8217;t convincing, so I went ahead and started the deployment on my mac. My disobedience paid off, not only did it work on a Mac, I was able to setup other Nodes using VM running on the same Box.</p>
<p>I have two VMs running headless. The type of Networking is Bridged. I have a wireless router that also has ethernet port, I hooked my Mac up on both the wireless and the LAN. I use the LAN for the Brigded networking on the VMs and the WIFI for my MAC.</p>
<p>This is all the setup you will need. Note that of you have read the Admin guide, you will see things like node1, node2 etc used to name the systems on which the different instances of the NoSQL DB is running, to avoid having to go into naming and hosts file and that, we will just use the IP addresses, they also work.</p>
<p>I am going to assume that my MAC ip address is 192.168.1.4, and the VMs are 192.168.1.5 and 192.168.1.6 respectively.</p>
<p>After installing the NoSQL DB on all three machines (My MAC and the two VMs.), I run the below commands in the same directory as where the NoSQL DB is installed.</p>
<p><pre class="brush: bash;">
mkdir Data
./bin/kvctl makebootconfig -root Data -port 5000 -admin 5001 -host 192.168.1.[4,5 or 6] -harange 5010,5020
./bin/kvctl start -host 192.168.1.[4,5 or 6] -root Data
</pre></p>
<p>The above will create a config in /Data and start the NoSQL DB.</p>
<p>Next, you need to run the below command on 192.168.1.4 only</p>
<p><pre class="brush: bash;">
./bin/kvctl runadmin -port 5000 -host 192.168.1.4 -script script.plan.txt
</pre></p>
<p>The content of script.plan.txt is</p>
<p><pre class="brush: bash;">
configure mystore
plan -execute -name &quot;Deploy Boston DC&quot; deploy-datacenter &quot;Boston&quot; &quot;Savvis&quot;
plan -execute -name &quot;Deploy Node1&quot; deploy-sn 1 192.168.1.4 5000
plan -execute -name &quot;Deploy Admin&quot; deploy-admin 1 5001
addpool BostonPool
joinpool BostonPool 1
plan -execute -name &quot;Deploy Node2&quot; deploy-sn 1 192.168.1.5 5000
joinpool BostonPool 2
plan -execute -name &quot;Deploy Node3&quot; deploy-sn 1 192.168.1.6 5000
joinpool BostonPool 3
plan -execute -name &quot;Deploy the Store&quot; deploy-store BostonPool 3 300
quit
</pre></p>
<p>If all went well, visit 192.168.1.4:5001 from you browser and click on topology.</p>
<p>For a description of the commands in the script.plan.txt see the Adming Guide.</p>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/255/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=255&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/10/22/defying-the-odds-setting-up-oracle-nosql-db-on-mac-using-vms-for-replication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>And the winner is&#8230;.Netbeans!!!</title>
		<link>http://trinisoftinc.wordpress.com/2011/10/10/and-the-winner-is-netbeans/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/10/10/and-the-winner-is-netbeans/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 11:36:03 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[best practises]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[jbuilder]]></category>
		<category><![CDATA[kawa]]></category>
		<category><![CDATA[jdeveloper]]></category>
		<category><![CDATA[jedit]]></category>
		<category><![CDATA[javafx]]></category>
		<category><![CDATA[java 7]]></category>
		<category><![CDATA[java 8]]></category>
		<category><![CDATA[java me]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=252</guid>
		<description><![CDATA[I am one of those developers that started writing Java using a Notepad. I later switched to Edit, a windows command line program because it has better indentation. I have developed some complex UI without the help of mattise. The earliest one I can imagine is a Telephone Number Pad, and an Engineering Drawing Desktop [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=252&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a><br />
I am one of those developers that started writing Java using a Notepad. I later switched to Edit, a windows command line program because it has better indentation. I have developed some complex UI without the help of mattise. The earliest one I can imagine is a Telephone Number Pad, and an Engineering Drawing Desktop App. This was around the same time that Visual Basic 6 (VB) was the predominant way to write apps for Windows. I was easily the brunt of many jokes from my other classmates who chose to code in VB. They call me a code addict. I didn&#8217;t have to write Java, I was just opinionated and maybe stubborn. Java was difficult to write then, especially for Desktop apps compared to ease of drag and drop you get with VB. But I also have a bigger picture in mind. The textbooks I have read said Java is the future. Your Java code can run on anything that has a Memory and a Micro-processor, that for me was the big winner.</p>
<p>My first attempt at using an IDE was KAWA, It was heaven. After a bit of tinkering here and there, I can finally get code completion to work. And the code completion has javadocs embedded. It was fun. I loved KAWA, but I knew I needed more. I tried several other IDEs and Editors, but KAWA was the clear winner then. At least until I met JBuilder.</p>
<p>JBuilder was the hallmark of my programming career. At last I can get syntax coloration, code completion, javadocs, on the fly error checking (unlike KAWA, I still have to compile to see errors), etc etc. I can even set it up for JavaME, which then didn&#8217;t have any integration with any IDE. At last I wasn&#8217;t the brunt of those jokes anymore. I now have a worthy IDE. We found another sucker, a classmate that uses McAfee Antivirus. We usually taunt him that McAfee can catch itself as a virus if given the proper settings.</p>
<p>A few months later, I was introduced to Netbeans. And a few weeks down the line, eclipse. To be sincere, at this time none of these IDEs can compete with JBuilder, But I have a choice to make, Netbeans, Eclipse or JBuilder. Once again I chose Netbeans. And sincerely, Eclipse was better at this time. Eclipse had more community behind it than Netbeans, and JBuilder was the best of all. What informed my decision was two questions.</p>
<ul>
<li>Who is the custodian of Java?</li>
<li>Who made Netbeans?</li>
</ul>
<p>I saw that one day, there would be new features in Java that only Netbeans will support, at least for a while. I saw that someday, The other IDEs would have to play catchup since Netbeans will always be one step ahead. And that day has come. Netbeans was the first to support Java 7, the first to support Java EE 6, the first to support JavaFX 2.0, and now with Netbeans 7.1 beta, Netbeans is finally one step ahead of all other IDEs. With several features that most IDEs still dream to have, my choice finally made sense.</p>
<p>After JavaOne 2011, I see the other IDEs still playing catchup. JavaFX Roadmap is cool, which will be the first IDE to support the new features? JavaME roadmap is cool, which will be the first IDE to support all the new features? Java 8 is also in the works. There wasn&#8217;t even a mention of Oracle JDeveloper in JavaOne, it is a clear message as to the commitment of Oracle to Netbeans. In my mind, I see the IDE wars as being won, at least for another 3 to 4 years.<br />
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/252/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=252&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/10/10/and-the-winner-is-netbeans/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>JSF In Action &#8211; U-Notify Behind The Scenes.</title>
		<link>http://trinisoftinc.wordpress.com/2011/08/29/jsf-in-action-u-notify-behind-the-scenes/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/08/29/jsf-in-action-u-notify-behind-the-scenes/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 09:58:41 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[best practises]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[jpa]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[notifier]]></category>
		<category><![CDATA[Persistence]]></category>
		<category><![CDATA[u-notifier]]></category>
		<category><![CDATA[u-notify]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=241</guid>
		<description><![CDATA[Recently I made a website, http://www.unotifier.com. It is a single hub for sending notification alerts via email and/or SMS. The website is built using JSF and Java EE (Web). These series of posts will take a look at the code powering it and try to use it to explain JSF and Java EE. Be warned [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=241&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<p style="text-align:left;" align="CENTER"><span class="Apple-style-span" style="font-size:small;">Recently I made a website, <a title="U-Notify" href="http://www.unotifier.com." target="_blank">http://www.unotifier.com.</a> It is a single hub for sending notification alerts via email and/or SMS. The website is built using JSF and Java EE (Web). These series of posts will take a look at the code powering it and try to use it to explain JSF and Java EE. Be warned that this is not an in-depth discussion about JSF/Java EE, I will just highlight some parts of JSF/Java EE that I used in designing the site.</span></p>
<p align="LEFT"> <span class="Apple-style-span" style="font-size:small;">The architecture is simple, the views are JSF pages, Managed Beans and Servlets, the persistence layer is pure JPA (I have since given up on Hibernate for personal reasons). I use session beans for all persistence logic, e.g create, delete, update, search etc. Most of the code in the session beans are generated by Netbeans. No worries if you don&#8217;t understand these buzz words, It is just JEE way of saying MVC.</span></p>
<p align="LEFT"> <span class="Apple-style-span" style="font-size:small;">So back to unotifier, in this post I will be taking a look at the front end, in subsequent posts I will talk about the back-end. As I said earlier the front-end is basically JSF and some servlets, I also use components from the Primefaces component framework.</span></p>
<p align="LEFT"> <span class="Apple-style-span" style="font-size:small;"><strong>THE TEMPLATE</strong></span></p>
<p align="LEFT"><span style="font-size:small;">JSF allows you to define a template file that can then be used through out your website. The template file define names for particular parts of the page and the page using the template file can then define contents for these parts. Take a look at a sample template file</span></p>
<p align="LEFT"><span style="font-size:small;">layout.xhtml</span></p>
<p><pre class="brush: xml;">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:h=&quot;http://java.sun.com/jsf/html&quot; xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot;&gt;

&lt;head&gt;
	&lt;ui:insert name='title'&gt;
		Default Title
	&lt;/ui:insert&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div id='head'&gt;
		Default top contents
	&lt;/div&gt;
	&lt;div id='center'&gt;
		Default center contents
	&lt;/div&gt;
	&lt;div id='foot'&gt;
		Default foot contents
	&lt;/div&gt;
	&lt;div id='right'&gt;
		Default right contents
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p align="LEFT"><span style="font-size:small;">This is basically what the unotifier template file looks like. If you take a look at the website again you can see each of the ui:insert defined right?</span></p>
<p align="LEFT"><span style="font-size:small;">The head is the logo part of the site</span></p>
<p align="LEFT"><span style="font-size:small;">The footer is where you have the contact informations</span></p>
<p align="LEFT"><span style="font-size:small;">The center is the main contents area</span></p>
<p align="LEFT"><span style="font-size:small;">The right is the place where you have the register and login forms.</span></p>
<p align="LEFT"><span style="font-size:small;">Now since the header is never going to change for this website, I included the contents in the template file, and same as the footer. So in my web pages I only override the right hand side and the center.</span></p>
<p align="LEFT"><span style="font-size:small;">A page that uses the above template file can look like this.</span></p>
<p align="LEFT"><span style="font-size:small;">Home.xhtml</span></p>
<p><pre class="brush: xml;">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:h=&quot;http://java.sun.com/jsf/html&quot; xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot;&gt;
	&lt;ui:composition template='layout.xhtml'&gt;
		&lt;ui:define name='title'&gt;Unotifier - Home Page&lt;/ui:define&gt;
		&lt;ui:define name='center'&gt;
			Hello all, this is the center area
		&lt;/ui:define&gt;
		…............
	&lt;/ui:composition
&lt;/html&gt;
</pre></p>
<p align="LEFT"><span class="Apple-style-span" style="font-size:small;">Any part of the template file that you define using ui:define will have a content different from what you specified in the template, else the default contents in the template file are used.</span></p>
<p align="LEFT"><span style="font-size:x-small;"><span style="font-size:small;">Take a look at <a title="Index" href="http://www.unotifier.com/sent/views/index.xhtml" target="_blank">http://www.unotifier.com/sent/views/index.xhtml</a> for a sample file that shows the default template for unotifier. The page did not override any of the contents in the template file.</span></span></p>
<p align="LEFT"><span style="font-size:small;">The ability to define templates like this is very important. You can define a part of your page that doesn&#8217;t change much in the template file and you are sure not going to have to do the dirty copy and paste every time you need this content. It also keeps your code clean and easy to maintain.</span></p>
<p align="LEFT"><span style="font-size:small;"><strong>THE PAGES.</strong></span></p>
<p align="LEFT"><span style="font-size:small;">If you had taken time to register on the website, you will notice that you are always on a single page, home.xhtml even though not all the pages uses ajax. This is not to say that the code for unotifier is in a single page, no. I use another useful technique in JSF, includes and renders.</span></p>
<p align="LEFT"><span style="font-size:small;">On the home page, the register form is a different JSF page, the login form is another page and the main contents is another JSF page. After login in, each of the parts of the page are different JSF pages, for example I have a settings.xhtml, add_client.xhtml, dialogs.xhtml, etc etc. JSF allows you to include these other JSF pages all in one page. JSF also have a render attribute for it&#8217;s components that takes a boolean value. This attribute tells the components either to show or not when the page loads, it&#8217;s like the css attribute display:none or display:block.</span></p>
<p align="LEFT"><span style="font-size:small;">So to include another page in your page you say</span></p>
<p><pre class="brush: xml;">
&lt;ui:include src='another_page.xhtml' /&gt;
</pre></p>
<p align="LEFT"><span style="font-size:small;">and to do selective rendering</span></p>
<p><pre class="brush: xml;">
&lt;h:form render=&quot;false&quot;&gt;
&lt;/h:form&gt;
</pre></p>
<p align="LEFT"><span style="font-size:small;">That is all. This also helps a lot in keeping your code base organized.</span></p>
<p align="LEFT"><span style="font-size:small;"><strong>THE COMPONENTS.</strong></span></p>
<p align="LEFT"><span style="font-size:x-small;"><span style="font-size:small;">I can&#8217;t really say much about the components, all I can say is head to <a title="Showcase" href="http://primefaces.org/showcase" target="_blank">http://primefaces.org/showcase</a> and see the wonders of primefaces for yourself.</span></span></p>
<p align="LEFT"><span style="font-size:small;">What I can say though is this. The page uses a primefaces component called layout. If you are a Java Swing developer, this component is similar to your border layout. It has the North, South, Left, Right and Center sub-components that you can use to neatly and painlessly layout your website. </span></p>
<p align="LEFT"><span style="font-size:small;"><strong>BACKING BEANS</strong></span></p>
<p align="LEFT"><span style="font-size:small;">Every other thing on the UI are basic JSF components, and primefaces components. JSF Components require backing beans to come alive, else they are just dummies, they won&#8217;t respond to you. A backing bean is also very simple. It is a POJO that contains methods, private variables and getters and setters. So for example the login form on unotifier have a backing bean that looks like this</span></p>
<p><pre class="brush: java;">
/**
* @author trinisoftinc
*/
@ManagedBean(name = &quot;loginController&quot;)
@SessionScoped
public class LoginController {

@EJB
private AdminFacade adminFacade;

private String l_email, l_password;
private static Logger logger = null;

/** Creates a new instance of LoginController */
public LoginController() {

}

public void doLogin() throws IOException {
   FacesContext context = FacesContext.getCurrentInstance();
   Admin admin = adminFacade.findByEmailAndPassword(l_email, l_password);
   if (admin == null) {
      context.addMessage(null, Main.doErrorMessage(&quot;Login Parameters incorrect&quot;));
   } else if (!admin.isConfirmed()) {
      context.addMessage(null, Main.doErrorMessage(&quot;Please click the confirmation link in your email first.&quot;));
   } else {
      Map session = context.getExternalContext().getSessionMap();
      Main main = (Main) session.get(&quot;main&quot;);
      main.setLoggedInUser(admin);
   }
   l_email = &quot;&quot;;
   l_password = &quot;&quot;;
}

public String getL_email() {
   return l_email;
}

public void setL_email(String l_email) {
   this.l_email = l_email;
}

public String getL_password() {
   return l_password;
}

public void setL_password(String l_password) {
   this.l_password = l_password;
}
</pre></p>
<p align="LEFT"><span style="font-size:small;"> and the JSF page itself looks like this</span></p>
<p><pre class="brush: xml;">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
      xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
      xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot;
      xmlns:p=&quot;http://primefaces.prime.com.tr/ui&quot;&gt;
    &lt;h:form prependId=&quot;false&quot; styleClass=&quot;login_form&quot;&gt;
        &lt;h:panelGrid columns=&quot;1&quot;&gt;
            &lt;p:inputText id=&quot;login_email&quot; value=&quot;#{loginController.l_email}&quot; requiredMessage=&quot;email can not be empty&quot; required=&quot;true&quot; /&gt;
            &lt;p:watermark value=&quot;email&quot; for=&quot;login_email&quot;/&gt;
            &lt;p:password id=&quot;login_password&quot; feedback=&quot;*&quot; minLength=&quot;6&quot; value=&quot;#{loginController.l_password}&quot; required=&quot;true&quot; requiredMessage=&quot;password can not be null&quot; /&gt;
            &lt;p:watermark for=&quot;login_password&quot; value=&quot;password&quot; /&gt;
            &lt;p:commandButton value=&quot;Login&quot; actionListener=&quot;#{loginController.doLogin()}&quot; ajax=&quot;false&quot;/&gt;
            &lt;h:commandLink value=&quot;forgot password?&quot; onclick=&quot;forgot_password.show(); return false;&quot; /&gt;
        &lt;/h:panelGrid&gt;
    &lt;/h:form&gt;
&lt;/html&gt;
</pre></p>
<p align="LEFT"><span style="font-size:small;">So the inputTexts (TextFields) have values that are tied to variables in the backing beans and the commandButton have actionListener that is a method in the backing beans. When the button is clicked, the variables take the values from the textfields and the method doLogin() is called. ajax=false says page should refresh and ajax should not be used. If you forget to specify getters and setters for the private variables, the JSF page won&#8217;t see them.</span></p>
<p align="LEFT"><span style="font-size:small;">This is how most simple JSF pages look like. Of course there are some complex ones that use phase listeners, validators, converters etc. All these are simple concepts that can be easily grasped if/when you need them.</span></p>
<p align="LEFT"><span style="font-size:small;">And that is the UI for unotifier.</span></p>
<p style="text-align:left;" align="CENTER"><span style="font-size:xx-small;"><br />
</span></p>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=241&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/08/29/jsf-in-action-u-notify-behind-the-scenes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>Captcha</title>
		<link>http://trinisoftinc.wordpress.com/2011/07/19/captcha/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/07/19/captcha/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 20:41:45 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[best practises]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[simple captcha]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=232</guid>
		<description><![CDATA[I needed a captcha for a Java Web Project, I tried SimpleCaptha and ReCaptha&#8230;.both worked fine. And then out of curiosity I checked wikipedia what a captcha is and this is what I got.  It is an acronym based on the word &#8220;capture&#8221; and standing for &#8220;Completely Automated PublicTuring test to tell Computers and Humans Apart&#8221; So basically, we want to be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=232&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<p>I needed a captcha for a Java Web Project, I tried SimpleCaptha and ReCaptha&#8230;.both worked fine. And then out of curiosity I checked wikipedia what a captcha is and this is what I got.</p>
<blockquote><p> It is an <a title="Acronym" href="http://en.wikipedia.org/wiki/Acronym">acronym</a> based on the word &#8220;capture&#8221; and standing for &#8220;<strong>C</strong>ompletely <strong>A</strong>utomated <strong>P</strong>ublic<strong>T</strong>uring test to tell <strong>C</strong>omputers and <strong>H</strong>umans <strong>A</strong>part&#8221;</p></blockquote>
<p>So basically, we want to be able to tell computers (or bots) trying to use our service from humans. So I thought to myself, is it really necessary to use all these mangled, difficult to read, sometimes very funny images? We can just ask the user a simple question we think only a human can know, make this question random enough that <strong>guessing</strong>(which is what most brute force attacks rely on) will be difficult.</p>
<p>For example, I am yet to see someone who says he/she has successfully guessed a recharge voucher pin. Even if there are maybe one or two. And this pin is just numbers, sometimes as few as 10 digits. Your ATM Pin is most times 4 Digits.</p>
<p>I remember seeing on a website a very simple captcha, they ask you a mathematical question, (+, -, *) and you give an answer. That simple. No mangled image, no mangled audio, nothing fancy.</p>
<p>So I started writing down ideas for what we can really call SimpleCaptcha.</p>
<ol>
<li>Present five random characters and ask the user what is the n-th character, of course the n-th character is also random</li>
<li>Present the user a simple arithmetic expression, and ask for the answer. The two operands and the operator are random.</li>
<li>Ask Date based questions like today is thursday, two days before today is ?, yesterday was Friday, 9 days from now is, etc</li>
</ol>
<div>I actually set out to implement the three above, but the project I am working on is also pressing, so I decided to pick the most basic one. No 2. Just as a proof of concept.</div>
<p>Now these captcha ideas <strong>MAY or MAY NOT</strong> have very very serious security holes. I am not an expert in web security and captcha, I am just a guy who likes simple things.</p>
<p>Below is some part of the Single File Java Class that does No. 2.</p>
<blockquote>
<pre>    public String getQuestion() {
        Random r = new Random(System.currentTimeMillis());

        int operationRandInt = r.nextInt(3);
        String operationString = operations[operationRandInt];

        int q1Rand = r.nextInt(100) + 10;
        int q2Rand = r.nextInt(100) + 10;

        //we don't want answers to have -negative results
        if (operationString.equals("-")) {
            while (q2Rand &gt;= q1Rand) {
                q2Rand = r.nextInt(100) + 10;
            }
        }

        /*
            if you want to implement for division, be my guest.
            A few thoughts though.
         * 1. It will be easier if there are no reminders in answers. i.e q1/q2 = Whole Number
         * 2. It will be safer if q1 != q2.
         */

        q1 = q1Rand;
        q2 = q2Rand;
        operation = operationString;

        return q1 + " " + operation + " " + q2;
    }
    public boolean solve(int answer) {
        if (operation.equals("+")) {
            return q1 + q2 == answer;
        } else if (operation.equals("-")) {
            return q1 - q2 == answer;
        } else if (operation.equals("*")) {
            return q1 * q2 == answer;
        }
        return false;
    }</pre>
</blockquote>
<p>The full source is here <a title="A Very Simple Captcha" href="http://pastebin.com/Rd320geQ" target="_blank">Captcha.java</a></p>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=232&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/07/19/captcha/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>This is what computer science home-works should look like</title>
		<link>http://trinisoftinc.wordpress.com/2011/06/30/this-is-what-computer-science-home-works-should-look-like/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/06/30/this-is-what-computer-science-home-works-should-look-like/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 17:55:14 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[best practises]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[home-work]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming languages]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=222</guid>
		<description><![CDATA[We have a Spooler S, and a Processor P. S spools jobs and P processes them. S can spool 3 jobs per second, while P can process 1 job per second. We can only have one S but as many Ps as possible. Since S is three times faster than P, we can assume that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=222&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<p>We have a Spooler S, and a Processor P.</p>
<p>S spools jobs and P processes them.</p>
<p>S can spool 3 jobs per second, while P can process 1 job per second.</p>
<p>We can only have one S but as many Ps as possible.</p>
<p>Since S is three times faster than P, we can assume that for every S start, we need to start 3P. This assumption is WRONG.</p>
<p>If we start S and 3P at the same time, 3P will actually sit idle for a second before they start processing records.</p>
<p>So we need to start 3P after S has spooled the first job. While each of the P is processing the job, S can spool another 3. So every one is happy.</p>
<p>Since we can have as many Ps as we want, we decide to have 9Ps.</p>
<p>We can also assume that we should start 9P after S has completed 3 jobs. WRONG AGAIN</p>
<p>If we go by the above assumption, 9P will process 9 jobs while S fetches 3 jobs.</p>
<p>On the next second, there will be 9P but 3 jobs, so oly 3Ps will be working, 6Ps will be idle, this happens all the time after the first second.</p>
<p>We don&#8217;t like idle Ps. So we decided to allow S run 90 times before we start 9P, so that each the Ps have 10 jobs waiting for them before they start.</p>
<p>If you are following me, you know that there will be a point where the Ps will catch up with S.</p>
<p>Questions:</p>
<ol>
<li>Determine for 20Million jobs if the Ps will ever catch up with S</li>
<li>If the answer above is YES, then determine amount of jobs each P needs to be waiting for them before they start so that they can never catch up with s.</li>
<li>If answer above is NO, then determine how many jobs was needed for the Ps to catch up with S</li>
<li>Write a program that takes the number of Ps and The total amount of jobs needed as input. Your program should output how many jobs S needs to spool before we start the Ps such that they will never catch up with S.</li>
</ol>
<p>e.g If we have 18 jobs and 6P, then S needs to spool 9 jobs before we start the Ps.</p>
<p>| seconds | jobs | processed | total rema |<br />
| 1 | 3 | 0 | 3 |<br />
| 2 | 3 | 0 | 6 |<br />
| 3 | 3 | 0 | 9 |<br />
| 4 | 3 | 6 | 6 |<br />
| 5 | 3 | 6 | 3 |<br />
| 6 | 3 | 6 | 3 |</p>
<p>Get answer in the comments <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=222&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/06/30/this-is-what-computer-science-home-works-should-look-like/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>Open letter to Scala</title>
		<link>http://trinisoftinc.wordpress.com/2011/06/28/open-letter-to-scala/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/06/28/open-letter-to-scala/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 14:53:02 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[best practises]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[comparisons]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[flame wars]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[scala vs java]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=214</guid>
		<description><![CDATA[This post was inspired by Make Love Not Flame Wars Hi Scala and the other &#8220;wannabes&#8221;, This is a quote I heard somewhere. You can know people with convoluted self esteems by how much they try to put other people down The truth is I hate people like that. I know you can do some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=214&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<p>This post was inspired by <a href="http://bitquabit.com/post/make-love-not-flamewars/" title="Make Love" target="_blank">Make Love Not Flame Wars</a></p>
<p>Hi Scala and the other &#8220;wannabes&#8221;,</p>
<p>This is a quote I heard somewhere.</p>
<blockquote><p>You can know people with convoluted self esteems by how much they try to put other people down</p></blockquote>
<p>The truth is I hate people like that. I know you can do some things better than I can, but please tell me what you can do, not how you are better than me.</p>
<p>This contractor walked into my office and talked for 30 mins, for 25 out of those 30 mins, he was telling me about his competitor and how he was better than him. The remaining 5 mins he told me some bollocks about how happy he would be if he got the job. What I did? I called the competitor and gave them the job. Why? He already told me what the competitor can do.</p>
<p>Dear Scala, please stop telling me how Java is retarded, I know. Stop showing me how you can do X in 1 LOC in Scala, but it will take a gazillion LOC in Java, I know. The problem I have with you is that you seem to be unable to successfully present yourself to me IN YOUR OWN LIGHT, but you just must find a way to trash Java so as to make you look good.</p>
<p>This was the attitude your distant cousin Ruby too some years past, where is she now? I hate her, not the kind of passionate hatred I have for PHP, or the kind of &#8220;dining with a long spoon&#8221; hatred I have for Python, but the kind of hatred that made me see Ruby as incompetent in herself. In fact, I am sure I might NEVER write another LOC in Ruby.</p>
<p>And your other half cousin Python, always wanting to be everything. Last time he was telling me how he is also functional and object oriented at the same time. I heard him trashing C, my old faithful and he was saying he is here to replace bash and shell the first time I met him.</p>
<p>Look Scala, I like you, and that is why I am writing you this letter. Tell me what you can do, and leave me to Judge if you can do it better than X or Y. Look at perl, he is not trying to be anything but perl. Look at erlang, he is not competing with anyone but himself, he tells you what he can do, and leaves you to decide. I love erlang. I want to love you too, but please stop being annoying. You are better than that. Tell me about how &#8220;functional&#8221; you are. Tell me about how you up hold &#8220;Object Orientation&#8221; in your core. Tell me the beauty of building a language on the JVM, let us know why it is so elegant to combine OOP with functional programing. You see all those wonderful things people have achieved through you, like Lift and AKKA and SPEC, tell me more about them. That is the stuffs I want to hear. If I see another LOC comparison again, that is it between us.</p>
<p>The truth is most of the boiler plate codes you show me in your LOC comparisons are rubbish. I never ever have to write those codes myself, that is the work of my IDE, netbeans handles those well. I also hear about IntelliJ and eclipse and how wonderful they are, so quit talking out of your ass, tell me something you know, not something you heard.</p>
<p>That is it, I hope this letter reaches you on time.</p>
<p>I am not hoping to hear from you soon, but if you deem it fit to respond, then fine, you know where to get me.</p>
<p>Your Sincere Admirer and Learner.</p>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=214&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/06/28/open-letter-to-scala/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>Programming is for boys</title>
		<link>http://trinisoftinc.wordpress.com/2011/06/15/programming-is-for-boys/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/06/15/programming-is-for-boys/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 11:22:05 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[best practises]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=211</guid>
		<description><![CDATA[Programming is for boys. This is a response to Alfred Thompson&#8217;s post Programming is for girls. That men are logical women are emotional is a standard fact. MSNBC Report Programming is all about mathematics, mathematics is logic. The reason men thrived more in coding is because of their innate logical nature. For a man, 1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=211&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<p>Programming is for boys.</p>
<p>This is a response to Alfred Thompson&#8217;s post</p>
<p><a href="http://blogs.msdn.com/b/alfredth/archive/2011/06/07/programming-is-for-girls.aspx">Programming is for girls.</a></p>
<p>That men are logical women are emotional is a standard fact.<br />
<a href="http://www.msnbc.msn.com/id/6849058/ns/technology_and_science-science/">MSNBC Report</a></p>
<p>Programming is all about mathematics, mathematics is logic. The reason men thrived more in coding is because of their innate logical nature. For a man, 1 + 1 is always equal 2. For a woman, well&#8230;it depends. The first mathematicians are programmers or vice versa, which makes sense to find more women in coding back then, but over time, we didn&#8217;t push them off, they left themselves. </p>
<p>This is the same reason there are more men in mathematics now than women.</p>
<p>Women have been competing with men in quite a number of fields, but not in programming. The few here are rather leaving. </p>
<p>The reason why boys spent more hours in the computer center and still have lower grades was because of pacman. I remembered my experience, while we (boys) spent a lot of time on pacman, the girls just come on, do their assignments and leave. Then after hours of pacman, 30mins to the close of the lab, we hurriedly put something together and we get a B instead of an A. Some geniuses among us even manage to get an A.</p>
<p>But pacman was good. At a point we began to think, wouldn&#8217;t it be nice to have a pacman that can shoot bombs or guns at the enemy indefinetly? oh, this pacman is becoming boring, there should be a way to build walls so that enemies can&#8217;t come close, etc etc. These kind of thoughts gave birth to our interests in computer programming. One of the reasons I decided to learn how to program was because I wanted to play nintendo gameboy on  my computer (I couldn&#8217;t afford one). Of course we often don&#8217;t get to complete such projects, but they birth the interests in us. Today it is still difficult to find a woman who is very good at computer games, for boys, it is almost natural.</p>
<p>For me it is pacman, for some other boys, it is some other form of distractions, but the key point here is, if the boys attack their projects the same way the girls do, they definitely will also have good grades. In school, I know of guys who don&#8217;t attend classes and still do well, do very well at academics. I don&#8217;t know of such women. The funny thing is those boys who don&#8217;t attend classes might not do well like the girls at academics, but at practicals, which is what coding is all about, they do very very well. They might not be able to define a turing machine like the course manual defines it, or tell you what normalization is, but they can code well.</p>
<p>Boys are not planners, most of us are like that. Women are natural planners, but boys are logical. Planning will get you past R&amp;D, logic will build the code. People who plan generally become managers, not programmers. Planning will help you write a program that conforms to specs, not generally a good program. Planning is good, but not all that there is to programming. All good programmers are inquisitive (daring) which is generally not a woman&#8217;s thing. Focus is another key, most programmers can transfer that same focus that make them excel at pacman to their code. A man could focus on the TV so much that he won&#8217;t hear the kids fighting, a woman couldn&#8217;t. This un-divided attention contributes to some of the things that make men good/better programmers than women. There are other things that make a good programmer and planning is one of them, but not planning is not ALL.</p>
<p>Of course there is always a midpoint, where you find a good programmer who is a woman and a good planner who is a man. But generally, I think women should be more of managers than programmers.</p>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=211&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/06/15/programming-is-for-boys/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
		<item>
		<title>The Easy life of a Programmer</title>
		<link>http://trinisoftinc.wordpress.com/2011/05/17/the-easy-life-of-a-programmer/</link>
		<comments>http://trinisoftinc.wordpress.com/2011/05/17/the-easy-life-of-a-programmer/#comments</comments>
		<pubDate>Tue, 17 May 2011 14:21:45 +0000</pubDate>
		<dc:creator>Akintayo Olusegun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[What If]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[general talks]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Just talking]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[best practises]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[candies]]></category>
		<category><![CDATA[easy life]]></category>

		<guid isPermaLink="false">http://trinisoftinc.wordpress.com/?p=201</guid>
		<description><![CDATA[A friend of mine have a saying Even if you will never write a line a code in your LIFETIME, learn how to program so that your LIFETIME can be easier. I confirmed this saying today when another friend gave us a problem, according to him most people got it wrong, but all the programmers [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=201&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a><br />
A friend of mine have a saying</p>
<p><em><strong>Even if you will never write a line a code in your LIFETIME, learn how to program so that your LIFETIME can be easier.</strong></em></p>
<p>I confirmed this saying today when another friend gave us a problem, according to him most people got it wrong, but all the programmers got it right. It is a very simple real life problem</p>
<p><strong>The problem:</strong></p>
<p><strong></strong> A shop sells candies for 10 NGN each. You can exchange 3 candy wrappers for 1 candy. If you have 150NGN, how many candies can you totally get.</p>
<p><strong>Manual Solution:</strong></p>
<p>First how many candies can you get with 150NGN. 15candies, so we start from 15 candies. 3 candies or 3 candy wrappers are the same, since you can&#8217;t steal candy wrappers from your friends, so 15 candies will give you an additional 5 candies when you exchange the wrappers for candies. But your 5 candies are also eligible for the candy wrappers promo, therefore your 5 candies will give you an additional 1 candy and you will have 2 candies (or 2 candy wrappers) left. In total you now have 3 candy wrappers. These last three can give you 1 more candy and then you can&#8217;t have more candies because you are left with only one candy wrapper.</p>
<p>Going back from above, you now have 15 + 5 + 1 + 1 candies = 22 candies. You can have 22 candies from 150NGN.</p>
<p><strong>Automated Solution:</strong></p>
<p>I will assume that you know your multiplication tables very well, therefore you know how many candies you can get for the X amount of NGN that you have. So starting from N candies</p>
<ol>
<li>Lets define Q as number of candies / 3 (Quotient after division)</li>
<li>Lets define R as number of candies % 3 (Remainder after division)</li>
<li>At every point in time, the number of candies you have is Q + R, NOC = Q + R.</li>
<li>Lets define ACC as the accumulated number of candies you have, in the above ACC = 15, ACC = 20, ACC = 21, ACC = 22.</li>
<li>Starting from Q = 15, and R = 0 and ACC = 0 we can have the below procedure</li>
</ol>
<ol type="i">
<li>NOC = Q + R</li>
<li>if NOC &lt; 3, ANSWER=ACC</li>
<li>if ACC = 0, ACC = NOC</li>
<li>Q = NOC / 3</li>
<li>R = NOC % 3</li>
<li>ACC = ACC + Q</li>
<li>ANSWER = back_to_step(i)</li>
</ol>
<p>In step 7, we recursively call the procedure again until we get an answer. So Starting at Q = 15, R = 0, ACC = 0</p>
<pre style="font-size:12px;">NOC = 15 + 0 = 15

NOC &gt; 3, noACtion

ACC = 0, ACC = 15

Q = 15 / 3 = 5

R = 15 % 3 = 0

ACC = 15 + 5 = 20

ANSWER =
      NOC = 5 + 0 = 5 
      NOC &gt; 3, noAction
      ACC != 0, noAction 
      Q = 5 / 3 = 1 
      R = 5 / 3 = 2 
      ACC = 20 + 1 = 21 
      ANSWER = 
            NOC = 1 + 2 = 3 
            NOC = 3, noAction 
            ACC != 0, noAction 
            Q = 3 / 3 = 1 
            R = 3 / 3 = 0 
            ACC = 21 + 1 = 22 
            ANSWER = 
                  NOC = 1 + 0 = 1 
                  NOC = 1, ANSWER = 22</pre>
<p>ANSWER = 22.</p>
<p>The beautiful thing is the automated solution can now be used to solve for ANY amount of initial candies. To complete this post, I will post the python script that I used to solve it.</p>
<blockquote>
<pre style="font-size:12px;">
def hmc(q, r, acc):
      noc = q + r
      if(noc &lt; 3):
            return acc
      if(acc == 0):
            acc = noc
      newQ = noc / 3
      newR = noc % 3
      acc = acc + newQ
      return hmc(newQ, newR, acc)
</pre>
</blockquote>
<a href='http://twitter.com/trinisoftinc' class='twitter-follow-button' data-text-color='#000000' data-link-color='#E58712'>Follow @trinisoftinc</a>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trinisoftinc.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trinisoftinc.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trinisoftinc.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trinisoftinc.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trinisoftinc.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trinisoftinc.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trinisoftinc.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trinisoftinc.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trinisoftinc.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trinisoftinc.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trinisoftinc.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trinisoftinc.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trinisoftinc.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trinisoftinc.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trinisoftinc.wordpress.com&amp;blog=3613185&amp;post=201&amp;subd=trinisoftinc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trinisoftinc.wordpress.com/2011/05/17/the-easy-life-of-a-programmer/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/890b9be69ec21f3f098ffb85dd9ad502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Da Don</media:title>
		</media:content>
	</item>
	</channel>
</rss>
