<?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>Jonathan Wijaya Loe&#039;s blog &#187; software</title>
	<atom:link href="http://blog.jloe.net/tag/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jloe.net</link>
	<description>A blog about technology blogging, tips and tricks, troubleshooting, and step by step tutorial with specialties in Microsoft .NET, C#, Zend, and PHP. Also includes wonderful and inspiring stories and jokes.</description>
	<lastBuildDate>Mon, 02 May 2011 00:05:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Download Torrent from Web</title>
		<link>http://blog.jloe.net/2009/05/23/download-torrent-from-web/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=download-torrent-from-web</link>
		<comments>http://blog.jloe.net/2009/05/23/download-torrent-from-web/#comments</comments>
		<pubDate>Sat, 23 May 2009 05:29:40 +0000</pubDate>
		<dc:creator>Jonathan Loe</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[bitlet]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[torrent]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=573</guid>
		<description><![CDATA[Good News! (or perhaps Old News) For torrent leechers this could be an alternative. But for those who do not like to have BitTorrent client fill up your hard disk space but still love to use torrent when needed, then BitLet is definitely the answer for you. BitLet is a cute web-based Java applet that [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_574" class="wp-caption alignleft" style="width: 149px"><a href="http://blog.jloe.net/wp-content/uploads/2009/05/bitlet-logo.jpg"><img class="size-full wp-image-574" title="BitLet.org" src="http://blog.jloe.net/wp-content/uploads/2009/05/bitlet-logo.jpg" alt="BitLet.org thumbnail" width="139" height="38" /></a><p class="wp-caption-text">BitLet.org</p></div>
<p>Good News! (or perhaps Old News) For torrent leechers this could be an alternative. But for those who do not like to have BitTorrent client fill up your hard disk space but still love to use torrent when needed, then BitLet is definitely the answer for you. <a title="Check out the site" href="http://www.bitlet.org/" target="_blank">BitLet</a> is a cute web-based Java applet that allows you to download torrent files on a computer that doesn’t have a BitTorrent client installed.</p>
<p>Downloading a torrent from this applet is simple. All that is needed is to copy the torrent URL you wish to download and paste it into a box as shown below. Or select your local .torrent and then click download torrent.</p>
<div id="attachment_575" class="wp-caption aligncenter" style="width: 628px"><a href="http://blog.jloe.net/wp-content/uploads/2009/05/bitlet-start.jpg"><img class="size-full wp-image-575" title="BitLet download" src="http://blog.jloe.net/wp-content/uploads/2009/05/bitlet-start.jpg" alt="BitLet - Type torrent url" width="618" height="99" /></a><p class="wp-caption-text">BitLet - Type torrent url</p></div>
<p>Click the download button to start torrent-ing and you will be prompted to allow downloading the applet if this is your first time using this. Simply download this and unblock the installed applet if you have active Windows Firewall. And a small dialog will pop up showing the status of the torrent.</p>
<div id="attachment_577" class="wp-caption aligncenter" style="width: 410px"><a href="http://blog.jloe.net/wp-content/uploads/2009/05/bitlet-download.jpg"><img class="size-full wp-image-577" title="BitLet - Download Status" src="http://blog.jloe.net/wp-content/uploads/2009/05/bitlet-download.jpg" alt="BitLet - Download Status" width="400" height="125" /></a><p class="wp-caption-text">BitLet - Download Status</p></div>
<p>As depicted above, most of relevant information is shown on the box: transfer rate, downloaded size, file name (shh&#8230; censored <img src='http://blog.jloe.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), number of current seeders, number of current leechers, and also edit your settings. But that&#8217;s not all, you can also upload your file to BitLet and share it to your friends to leech or even consume video streaming. Check out the blog <a title="Click to see more updates" href="http://blog.bitlet.org/" target="_blank">here</a> for development updates. Happy leeching! <img src='http://blog.jloe.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/05/23/download-torrent-from-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick and Easy Way to Create Model Class in PHP</title>
		<link>http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quick-and-easy-way-to-create-model-class-in-php</link>
		<comments>http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/#comments</comments>
		<pubDate>Wed, 20 May 2009 15:59:17 +0000</pubDate>
		<dc:creator>Jonathan Loe</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=511</guid>
		<description><![CDATA[Ever experienced a boring and time-consuming task where you have to create a new class for your model object: declaring list of variables and creating the getter and setter functions? &#8220;Always&#8221; is my answer. Imagine if you have a long list of variables. &#8220;Shoot! NOT AGAIN&#8221; may be the first exclamation came out from you. [...]]]></description>
			<content:encoded><![CDATA[<p>Ever experienced a boring and time-consuming task where you have to create a new class for your model object: declaring list of variables and creating the getter and setter functions? &#8220;Always&#8221; is my answer. Imagine if you have a long list of variables. &#8220;Shoot! NOT AGAIN&#8221; may be the first exclamation came out from you. And for the sake of a good software design, the creation of these functions is essential. Blessed if you have excellent <a title="Click to find out more" href="http://en.wikipedia.org/wiki/Integrated_development_environment" target="_blank">IDE</a> to generate these for you.</p>
<p>So far I&#8217;ve been working with some IDEs out there like Microsoft Visual Studio (including Express edition), Eclipse for PHP, Zend Studio, and PHP Designer, and to me Visual Studio is the most developer-friendly IDE. But this task is still repetitive to me and personally I am into the notion of DRY (Don&#8217;t Repeat Yourself).</p>
<p>Well, I finally found a way to resolve this in <strong>PHP</strong> and I&#8217;m going to share this. The code is extended based on a sample file from <a title="Click to read more." href="http://framework.zend.com/docs/quickstart" target="_blank">Zend QuickStart</a>.</p>
<pre name="code" class="php">
/**
 * This class is a helper class that allows developer to
 * create an object model easily by simply inheriting and
 * declaring their desired variables as public in the child class
 * and seamlessly creates a pair of getter and setter functions.
 */
class JLoe_Model_Object
{
  /**
   * The regular expression for get method name.
   *
   * @var string
   */
  const REGEX_GET = '/get.*/';

  /**
   * The regular expression for set method name.
   *
   * @var string
   */
  const REGEX_SET = '/set.*/';

  /**
   * Get the value of a property with method syntax.
   *
   * Map method calls to get and set the declared public variables.
   * This is used to help to create magic get and set functions seamlessly.
   *
   * @param  string $method method name
   * @param  mixed  $param  parameter values to be passed
   * @return property value or this object
   */
  public function __call( $method, $param )
  {
    // Check whether it's a get or set method, else throw exception
    if ( preg_match( self::REGEX_GET, $method ) ) {
      $isGet = true;
      $propName = str_replace( 'get', '', $method );
    }
    elseif ( preg_match( self::REGEX_SET, $method ) ) {
      $isGet = false;
      $propName = str_replace( 'set', '', $method );
    }
    else { throw new JLoe_Model_Exception( 'Invalid method' ); }

    // Check whether property name exists
    $propName = ucfirst( $propName );
    if ( ! property_exists( $this, $propName ) ) {
      throw new JLoe_Model_Exception( 'Invalid method' );
    }

    // Perform respective method call
    if ( $isGet ) { return $this-&gt;$propName; }
    else
    {
      $this-&gt;$propName = $param[0];
      return $this;
    }
  }

  /**
   * Map variable access onto the underlying method representation.
   *
   * Allow to map the variable access with the respective get method.
   *
   * @param  string $name the property name to access
   * @return mixed value depending on the underlying method called
   */
  public function __get( $name )
  {
    $method = 'get' . $name;
    if ( ('mapper' == $name) || !method_exists($this, $method) )
    {
      throw new JLoe_Model_Exception( 'Invalid property' );
    }
    return $this-&gt;$method();
  }

  /**
   * Map variable access onto the underlying method representation.
   *
   * Allow to map the variable access with the respective set method.
   *
   * @param  string $name the property name to access
   * @return instance of the inherited class
   */
  public function __set( $name, $value )
  {
    $method = 'set' . $name;
    if ( ('mapper' == $name) || !method_exists($this, $method) )
    {
      throw new JLoe_Model_Exception( 'Invalid property' );
    }
    $this-&gt;$method( $value );
  }
}
</pre>
<p>And with this, you can code your model class with just a few lines. Here goes a sample.</p>
<pre name="code" class="php">
class Quot_Model_Quote extends JLoe_Model_Object
{
  /**
   * Quote id.
   *
   * @var int
   */
  public $Id;

  /**
   * The quote
   *
   * @var string
   */
  public $Quote;

  /**
   * Tags for this quote.
   *
   * @var array
   */
  protected $_tags;
  public function getTags() { return $this-&gt;_tags; }
  public function setTags( $tags )
  {
    // Put your own logic here
    $this-&gt;_tags = $tags;
  }
}
</pre>
<p><!--adsense#co-1-->Here if you wish to allow other class to access it via its variable name, getter, or setter functions, you just need to declare the variable as public as depicted on line 8 and 15. On the other hand, if you wish to limit access to a variable, you can always declare the variable as protected and create your desired getter or setter functions associated with the variable as shown on line 22 to 27.</p>
<p>And now you may access the class as follows.</p>
<pre name="code" class="php">
$quote = new JLoe_Model_Quote();

$quote-&gt;Id   = $id;
$quote-&gt;Name = $name;
$quote-&gt;Tags = $tags;
// You may also use this
$quote
  -&gt;setId( $id )
  -&gt;setName( $name )
  -&gt;setTags( $tags )

$id   = $quote-&gt;Id;
$name = $quote-&gt;Name;
$tags = $quote-&gt;tags;
// Similar with
$id   = $quote-&gt;getId();
$name = $quote-&gt;getName();
$tags = $quote-&gt;getTags();
</pre>
<p>It&#8217;s that easy. Now I can write my model class quickly and easily for other PHP projects. Yey! <img src='http://blog.jloe.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Software Testing</title>
		<link>http://blog.jloe.net/2009/04/17/software-testing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=software-testing</link>
		<comments>http://blog.jloe.net/2009/04/17/software-testing/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 03:39:44 +0000</pubDate>
		<dc:creator>Jonathan Loe</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[manual testing]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software testing]]></category>
		<category><![CDATA[TADLC]]></category>
		<category><![CDATA[TDLC]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=77</guid>
		<description><![CDATA[Testing, testing, and testing&#8230; this may be a monotonous task to perform as a tester. In software, testing is clearly necessary to deliver a good product or solution to make your clients or bosses pleased and satisfied with the product. As a developer, I have no experience at all hence have no clue where to [...]]]></description>
			<content:encoded><![CDATA[<p>Testing, testing, and testing&#8230; this may be a monotonous task to perform as a tester.</p>
<p>In software, testing is clearly necessary to deliver a good product or solution to make your clients or bosses pleased and satisfied with the product. As a developer, I have no experience at all hence have no clue where to start and how to begin with. So again, I have to use my googling skill to look for some clue out there. Please read on and I hope I can help you understand abit.</p>
<p>First you need to understand the difference between Black box and White box testing. This isn&#8217;t about the colour but rather to the ideology of the testing. Here&#8217;s the definition of Black box testing taken from wiki.</p>
<blockquote><p><a title="Click to read more about black box testing" href="http://en.wikipedia.org/wiki/Black_box_testing" target="_blank"><strong>Black box testing</strong></a> takes an external perspective of the test object to derive test cases. These tests can be functional or non-functional, though usually functional. The test designer selects valid and invalid inputs and determines the correct output. There is no knowledge of the test object&#8217;s internal structure.</p></blockquote>
<p>This means that the purpose of the testing is merely to simplify your testing process by specifying input and expecting some output without any knowledge of the what the function is supposed to do. Think of black box as opaque box or closed box. To help you better understand, i<span class="Text">magine you are testing an electronics system and it is housed in a black box with lights, switches, and dials on the outside. You must test it without opening it up, and you can’t see beyond its surface. You are only able to see if it works just by flipping switches (inputs) and seeing what happens to the lights and dials (outputs).</span> On the other hand,</p>
<blockquote><p><a title="Click to read more about white box testing" href="http://en.wikipedia.org/wiki/White_box_testing" target="_blank"><strong>White box testing</strong></a> uses an internal perspective of the system to design test cases based on internal structure. It requires programming skills to identify all paths through the software. The tester chooses test case inputs to exercise paths through the code and determines the appropriate outputs.</p></blockquote>
<p>People refers white box testing to clear box testing, glass box testing, transparent box testing, translucent box testing or structural testing. <span class="Text">An opposite test approach would be to open up the electronics system, see how the circuits are wired, apply probes internally and maybe even disassemble parts of it.</span> White box testing may also refer as unit testing, integration testing, or system testing.</p>
<p><!--adsense#co-1-->First statement in your mind may be &#8220;Ok, I get it now&#8221; but the question still remains &#8220;How do I test?&#8221;, &#8220;Where should I start?&#8221;. Next what you need to do is to gather your customer&#8217;s requirements and use them to produce your test cases. A <a title="Click to read more about test case" href="http://en.wikipedia.org/wiki/Test_case" target="_blank">test case</a> is a set of conditions or variables under which a tester will determine whether an <span class="mw-redirect">application</span> or software system meets documented specifications or requirements. After the list of test cases are produced, testing is then performed based on the list. To help you with test cases, you may refer to <a title="Click to see samples of test cases" href="http://it.toolbox.com/blogs/enterprise-solutions/sample-of-test-case-creation-17155" target="_blank">this site</a> which provides a good sample of test cases.</p>
<p>There are two approaches in performing your testing: Manual and Automated testing.</p>
<p>Manual testing is is the process of manually testing software for defects. It requires a tester to play the role of an end user, and use most of all features of the application to ensure correct behavior. To ensure completeness of testing, the tester often follows a written test plan that leads them through a set of important test cases.</p>
<p><!--adsense#az-edeal-->Whereas Automated testing is the technique of testing software using software rather than people. A test program is written that exercises the software and identifies its defects. These test programs may be written from scratch, or they may be written utilizing a generic Test automation framework. As it is considered to be a very expensive technique hence it requires careful planning and effective testing strategy as explained in &#8220;<a title="Best Practives in Software Test Automation" href="http://www.testfocus.co.za/featurearticles/july2005.htm" target="_blank">Best Practices in Software Test Automation</a>&#8220;. <a title="What's your test automation strategy?" href="http://blogs.msdn.com/imtesty/archive/2006/05/08/593395.aspx" target="_blank">I.M. Testy</a> also highlights that the goal of automated testing has to be Specific, Measurable, Achievable, Realistic, and Timely (SMART).</p>
<p>If you find this post useful, please leave your rating below. Or if you still have doubt, leave your comment below. Thank you!</p>
<p>Sources:</p>
<ul>
<li><a title="What is black box/white box testing?" href="http://www.faqs.org/faqs/software-eng/testing-faq/section-13.html" target="_blank">What is black box/white box testing?</a></li>
<li><a title="Click to read more about the article" href="http://www.stickyminds.com/sitewide.asp?Function=edetail&amp;ObjectType=COL&amp;ObjectId=2968" target="_blank">Five Ways to Think about Black Box Testing</a></li>
<li><a title="Test Focus" href="http://www.testfocus.co.za/" target="_blank">Test Focus</a>: This site contains some usefull featured articles about testing.</li>
<li><a title="I. M. Testy : What's your test automation strategy?" href="http://blogs.msdn.com/imtesty/archive/2006/05/08/593395.aspx" target="_blank">I. M. Testy : What&#8217;s your test automation strategy?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/04/17/software-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

