<?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>Technology Kills &#187; code</title>
	<atom:link href="http://technologykills.com/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://technologykills.com</link>
	<description>Deconstructing technology, one piece at a time...</description>
	<lastBuildDate>Fri, 13 Jan 2012 19:56:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Choosing an Open Source License</title>
		<link>http://technologykills.com/2010/12/14/choosing-an-open-source-license/</link>
		<comments>http://technologykills.com/2010/12/14/choosing-an-open-source-license/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 05:27:07 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commercial libraries]]></category>
		<category><![CDATA[Common Development and Distribution License]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[development model]]></category>
		<category><![CDATA[dual license]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[GNU General Public License]]></category>
		<category><![CDATA[GNU Lesser General Public License]]></category>
		<category><![CDATA[gpl v3]]></category>
		<category><![CDATA[LGPL]]></category>
		<category><![CDATA[lgpl license]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[MIT]]></category>
		<category><![CDATA[MIT License]]></category>
		<category><![CDATA[Multi-licensing]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[open source code]]></category>
		<category><![CDATA[open source developers]]></category>
		<category><![CDATA[Open Source License]]></category>
		<category><![CDATA[open source licenses]]></category>
		<category><![CDATA[proprietary code]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://technologykills.com/?p=205</guid>
		<description><![CDATA[There really isn't a right answer. The GPL v3 is great for developers of GPL'd software, but requires that all derived software keep the same GPL license. That simply won't fit my development model. I don't want every product I create that uses the libraries to have to be GPL as well, nor do I [...]]]></description>
			<content:encoded><![CDATA[<p>There really isn't a right answer. The <a class="zem_slink" title="GNU General Public License" rel="wikipedia" href="http://en.wikipedia.org/wiki/GNU_General_Public_License">GPL v3</a> is great for developers of GPL'd <a class="zem_slink" title="Computer software" rel="wikipedia" href="http://en.wikipedia.org/wiki/Computer_software">software</a>, but requires that all derived <a href="http://technologykills.com/tag/software/" class="st_tag internal_tag" rel="tag" title="Posts tagged with software">software</a> keep the same GPL license. That simply won't fit my <a href="http://technologykills.com/tag/development-model/" class="st_tag internal_tag" rel="tag" title="Posts tagged with development model">development model</a>. I don't want every product I create that uses the <a class="zem_slink" title="Library" rel="wikipedia" href="http://en.wikipedia.org/wiki/Library">libraries</a> to have to be GPL as well, nor do I want that for other developers using the <a href="http://technologykills.com/tag/code/" class="st_tag internal_tag" rel="tag" title="Posts tagged with code">code</a>.</p>
<p>So there is the <a class="zem_slink" title="GNU Lesser General Public License" rel="wikipedia" href="http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License">LGPL</a>, which might be a good choice for my libraries, but has similar restrictions to the GPL that I simply don't want to require people to adhere to.</p>
<p>I then found the <a class="zem_slink" title="Common Development and Distribution License" rel="wikipedia" href="http://en.wikipedia.org/wiki/Common_Development_and_Distribution_License">CDDL</a>, and I really liked the way it was written. It's unfortunate that it's <a class="zem_slink" title="License compatibility" rel="wikipedia" href="http://en.wikipedia.org/wiki/License_compatibility">incompatible</a> with the GPL or it would be my top choice for pretty much everything. But it's not compatible, and I don't want to keep my software out of the hands of developers of GPL'd software.</p>
<p>None-the-less, the CDDL is one of the few file-based <a class="zem_slink" title="Open Source" rel="wikinvest" href="http://www.wikinvest.com/concept/Open_Source">open source</a> <a class="zem_slink" title="License" rel="wikipedia" href="http://en.wikipedia.org/wiki/License">licenses</a>, and one of my requirements for some of my software is that I need to mix in some commercial libraries which are obviously not open source. The best answer might be a <a class="zem_slink" title="Multi-licensing" rel="wikipedia" href="http://en.wikipedia.org/wiki/Multi-licensing">dual-license model</a>, but as far as I can tell, I wouldn't be able to mix in proprietary code with a GPL license, so the GPL version of those products would need to be severely crippled, which might not make sense to do at all.</p>
<p>The only course I can see clearly working is releasing the following:</p>
<ul>
<li>For libraries containing only <a class="zem_slink" title="Open-source software" rel="wikipedia" href="http://en.wikipedia.org/wiki/Open-source_software">open source code</a>, dual-licensing the CDDL and LGPL (allowing GPL developers to choose the LGPL license, making it compatible)</li>
<li>For applications containing only <a href="http://technologykills.com/tag/open-source-code/" class="st_tag internal_tag" rel="tag" title="Posts tagged with open source code">open source code</a>, dual-licensing the CDDL and GPL, for the same reason as above</li>
<li>For libraries or applications containing open source and proprietary code, licensing only under the CDDL is the only option. Nothing compatible with the GPL can contain proprietary code in my understanding.</li>
</ul>
<p>For this reason, I will try to keep as much of my code as possible in the dual-licensed projects and available for all <a href="http://technologykills.com/tag/open-source-developers/" class="st_tag internal_tag" rel="tag" title="Posts tagged with open source developers">open source developers</a>. However, many of my applications themselves will be mixed in with proprietary code, and this will be released only under the CDDL (with the proprietary code released under its own license, all fully documented).</p>
<p>Of course, all of my past work up until this point is still available and can continue to be used under the <a class="zem_slink" title="MIT License" rel="wikipedia" href="http://en.wikipedia.org/wiki/MIT_License">MIT license</a> it came with. Most of my future code, however, will not be released under an <a href="http://technologykills.com/tag/mit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MIT">MIT</a> license. None-the-less, if you opt for the CDDL license on my future projects, it has the handy addition of allowing you to mix it in with any proprietary, <a class="zem_slink" title="Proprietary software" rel="wikipedia" href="http://en.wikipedia.org/wiki/Proprietary_software">closed source</a> code that you want, as long as you keep the original code and any modified files based off of the original code under the CDDL.</p>
<p>Due to all the confusion and incompatibilities surrounding the current crop of <a class="zem_slink" title="Open-source license" rel="wikipedia" href="http://en.wikipedia.org/wiki/Open-source_license">open source licenses</a>, I was very tempted to simply write my own. But that would just add to the confusion, so the best choice right now seems to be to play along while being as open as possible.</p>
<p>I will be sure to fully document on each project homepage the licensing model of the project and what it means for others wishing to redistribute the <a class="zem_slink" title="Source code" rel="wikipedia" href="http://en.wikipedia.org/wiki/Source_code">source code</a>.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://intridea.com/posts/is-copyleft-really-right-for-open-source">Is Copyleft Really Right for Open Source?</a> (intridea.com)</li>
<li class="zemanta-article-ul-li"><a href="http://spf13.com/post/my-take-on-open-source-licenses">My take on open source licenses</a> (spf13.com)</li>
<li class="zemanta-article-ul-li"><a href="http://avdi.org/devblog/2010/12/08/why-the-gpl-matters/">Why the GPL Matters</a> (avdi.org)</li>
<li class="zemanta-article-ul-li"><a href="http://www.gnu.org/philosophy/open-source-misses-the-point.html">Why Open Source misses the point of Free Software</a> (gnu.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=7361c628-79e3-4be6-8d17-c1631fc9e024" alt="Enhanced by Zemanta" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://technologykills.com/2010/12/14/choosing-an-open-source-license/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Object-Oriented Scripting (OOP or OOS)</title>
		<link>http://technologykills.com/2009/03/02/object-oriented-scripting-oop-or-oos/</link>
		<comments>http://technologykills.com/2009/03/02/object-oriented-scripting-oop-or-oos/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 09:40:37 +0000</pubDate>
		<dc:creator>madzoombax</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Empty Space]]></category>
		<category><![CDATA[Factories]]></category>
		<category><![CDATA[Falling From The Sky]]></category>
		<category><![CDATA[Fender]]></category>
		<category><![CDATA[Look At It This Way]]></category>
		<category><![CDATA[Newcomer]]></category>
		<category><![CDATA[Object Oriented Programming]]></category>
		<category><![CDATA[Oop]]></category>
		<category><![CDATA[Oos]]></category>
		<category><![CDATA[Power Button]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Quite Some Time]]></category>
		<category><![CDATA[Rain Drop]]></category>
		<category><![CDATA[Ray Of Light]]></category>
		<category><![CDATA[Scripters]]></category>
		<category><![CDATA[Scripting Languages]]></category>
		<category><![CDATA[Short Answer]]></category>
		<category><![CDATA[Single Thing]]></category>
		<category><![CDATA[Snowflake]]></category>
		<category><![CDATA[Space Debris]]></category>

		<guid isPermaLink="false">http://technologykills.com/?p=48</guid>
		<description><![CDATA[Programming languages have been using Objects for quite some time. Popular languages like Java are heavily based on the concept. Lately, scripting languages have also been swooping in and picking up aspects of Object-Oriented Programming, integrating them into their own language.
The problem is that many scripters don't have a good grasp of what OOP (Object-Oriented Programming) [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://technologykills.com/tag/programming-languages/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Programming Languages">Programming languages</a> have been using Objects for quite some time. Popular languages like Java are heavily based on the concept. Lately, <a href="http://technologykills.com/tag/scripting-languages/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Scripting Languages">scripting languages</a> have also been swooping in and picking up aspects of Object-Oriented Programming, integrating them into their own language.</p>
<p>The problem is that many scripters don't have a good grasp of what OOP (Object-Oriented Programming) really involves, and admittedly it can seem like a daunting concept to the newcomer. This short explanation and tutorial will explain exactly what OOP means, and how to use it in everyday scripting tasks.</p>
<p>--</p>
<p><strong>What is an object in real terms?</strong></p>
<p><strong></strong>The <a href="http://technologykills.com/tag/short-answer/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Short Answer">short answer</a>: anything and everything</p>
<p>I like objects. The world is built with objects. In fact, you could think of <strong>every <a href="http://technologykills.com/tag/single-thing/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Single Thing">single thing</a></strong> in the world, including the world itself, as an object. In fact, this is the basis of OOP. It is modeled around the concept of objects and their interactions with each other.</p>
<p>Look at it this way: The screen you're reading this on is an object; so it its <a href="http://technologykills.com/tag/power-button/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Power Button">Power button</a>. So is the chair you're sitting in. You're an object, and so is your nose, and your left thumbnail. The <a href="http://technologykills.com/tag/ray-of-light/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Ray Of Light">ray of light</a> that is (or was) shining in your window is (or was) an object. That car driving by by was a passing object. So were its wheels, and its left fender, and its passengers. Each rain-drop, snowflake, or ice-ball <a href="http://technologykills.com/tag/falling-from-the-sky/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Falling From The Sky">falling from the sky</a> is an object.</p>
<p>Factories manufacture objects. But the factory itself is an object, too. So is each piece of machinery used to create the objects, and each of the workers that run the machinery. The ground the factory is built on is an object, and the whole planet itself is an object, along with each of the other planets, stars, and <a href="http://technologykills.com/tag/space-debris/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Space Debris">space debris</a> out there. Hell, you can even think of <a href="http://technologykills.com/tag/empty-space/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Empty Space">empty space</a> as an object.</p>
<p> </p>
<p><strong>But if they're all objects, what makes them different?</strong></p>
<p><strong></strong>The short answer: attributes</p>
<p><strong></strong>Simply put, each object has certain properties, or attributes, which describe it. For this document, attributes and properties can be considered the same thing.</p>
<p>Think about a person's attributes. They might have brown hair--that's an attribute (a property that describes them). Their hair may be long--that's another attribute. They may be generally nice (a property that describes their behavior). They may prefer a certain brand of clothing, or enjoy a certain type of food. They might have high aspirations for the future, or think that we're doomed because of today's financial crisis. Those are <em>all</em> properties which describe a person.</p>
<p>Every object has properties. A car has a color, a shape, a number of cylinders, certain features are either available or unavailable in certain models... the list goes on. The planets are round. The sun is bright. The sky is blue. The winter wind is cold. The rain is wet, and transparent. Every object can by described by listing all of its properties.</p>
<p>Obviously, for real world objects this list of properties can be ridiculously extensive. In programming terms, it is usually manageable. But this is how objects in OOP are described.</p>
<p>If you have an Invoice object, it might have the following properties:</p>
<ul>
<li>seller</li>
<li>buyer</li>
<li>items</li>
<li>subtotal</li>
<li>tax</li>
<li>shipping</li>
</ul>
<p>Notice that most of the things you would normally see on an invoice are there. That's because they're part of the invoice--they describe it. That invoice wouldn't be that invoice if it didn't have that exact seller, or that exact buyer, or subtotal. That's what makes it a unique invoice.</p>
<p>But not everything on the invoice is necessarily a property. Notice there is no <strong>total</strong> property defined. That's because the total changes depending on other things--<strong>subtotal, tax, </strong>and<strong> shipping</strong>. Since you already know those three things, you can instead instruct the invoice to add the three fields together and calculate the total. We'll cover that next.</p>
<p> </p>
<p><strong>So you have all these colorful objects, how do they actually do what they do?</strong></p>
<p><strong></strong>The short answer: methods</p>
<p>Your neighbor's drive to work every day is a method, or function. Their car merging into another lane in traffic is a method. Every action performed anywhere can be thought of as a method. In fact, often the term <strong>action</strong> is used instead of method, which makes the concept even easier to understand.</p>
<p>Every object has (or doesn't have) one or more methods (actions) it can perform which allow it to do what it does.</p>
<p>When you walk to the store, it could be described in programming terms by a call to a mythical walkTo("Corner grocery store") function. The sun might be performing a shineOn("Earth") function right now, just as the earth may be performing it's rotateOn("Axis") and rotateAround("Sun") functions at this very moment. NASA has been performing a goTo("Mars") method for an extraordinarily long time.</p>
<p>You see, a method, or function, could describe every action performed--anywhere--by anyone--ever.</p>
<p>This is how objects in OOP perform actions. Let's take our Invoice object example from above. It needs some actions, too:</p>
<p> </p>
<ul>
<li>calculateTotal() - this will figure out the total to print on the invoice</li>
<li>send() - This will send the invoice</li>
</ul>
<p> </p>
<p><strong>So what the hell's a Class?</strong></p>
<p><strong></strong>Think of it as a template for a single object. A wrapper that describes a generic object. It defines what properties an object has, and what methods an object can perform.</p>
<p>The class is how your program or script and make use of the object. For our Invoice object, we would have an Invoice class that defines what an invoice is.</p>
<p>When your program creates an invoice, it might look something like this, in pseudo-code:</p>
<p style="padding-left: 30px; ">myInvoice = new Invoice</p>
<p>We now have created an <strong>instance</strong> of the Invoice class, meaning we have created a new object that represents a single Invoice. </p>
<p>Now, let's set the invoice properties:</p>
<p style="padding-left: 30px; ">myInvoice-&gt;seller = bob smith<br />
myInvoice-&gt;buyer = gordon freeman <br />
myInvoice-&gt;subtotal = 10.00<br />
myInvoice-&gt;tax = 0.00<br />
myInvoice-&gt;shipping = 5.00</p>
<p>The invoice is no longer a generic invoice. This is now a unique object that has the properties youv'e given it.</p>
<p>So now you have an object sitting there. How do you use it? You access its methods. Again, in pseudo-code, you might do something like this:
</p>
<p style="padding-left: 30px; ">myInvoice-&gt;calculate() <em>- determine and save the total<br />
<span style="font-style: normal;">myInvoice-&gt;validate() </span>- make sure the invoice is proper<br />
<span style="font-style: normal;">myInvoice-&gt;send() </span>- send the invoice to the recipient. </em></p>
<p>Normally there would be more, and more useful, actions than this, but hopefully you get the gist.</p>
<p><strong>Is that it?</strong></p>
<p>That can be it. With that concept of objects, you can start with a tutorial in your OOP language or package of choice. There are many, many more advanced topics to get into, but that is for you to discover as a new Object-Oriented <a href="http://technologykills.com/tag/programmer/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Programmer">programmer</a>.</p>
<p><strong>So go program with objects, you object!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://technologykills.com/2009/03/02/object-oriented-scripting-oop-or-oos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP 1.2 RC3 upgrades coming</title>
		<link>http://technologykills.com/2008/10/23/cakephp-13-upgrades-coming/</link>
		<comments>http://technologykills.com/2008/10/23/cakephp-13-upgrades-coming/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 16:28:01 +0000</pubDate>
		<dc:creator>madzoombax</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Cake]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[caveats]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fingers]]></category>
		<category><![CDATA[inconsistencies]]></category>
		<category><![CDATA[speed improvements]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://technologykills.com/?p=20</guid>
		<description><![CDATA[Luckily all of my Cake projects are still under development, because I'm going to be upgrading them all to CakePHP 1.2 RC3 over the weekend.
I'll report any caveats I find during the upgrade process here for others if interested; I don't anticipate many problems, however, as I am not using deprecated functions and I believe [...]]]></description>
			<content:encoded><![CDATA[<p>Luckily all of my <a href="http://technologykills.com/tag/cake/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Cake">Cake</a> projects are still under <a href="http://technologykills.com/tag/development/" class="st_tag internal_tag" rel="tag" title="Posts tagged with development">development</a>, because I'm going to be upgrading them all to <a href="http://technologykills.com/tag/cakephp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with CakePHP">CakePHP</a> 1.2 RC3 over the weekend.</p>
<p>I'll report any <a href="http://technologykills.com/tag/caveats/" class="st_tag internal_tag" rel="tag" title="Posts tagged with caveats">caveats</a> I find during the <a href="http://technologykills.com/tag/upgrade/" class="st_tag internal_tag" rel="tag" title="Posts tagged with upgrade">upgrade</a> process here for others if interested; I don't anticipate many problems, however, as I am not using deprecated functions and I believe my <a href="http://technologykills.com/tag/code/" class="st_tag internal_tag" rel="tag" title="Posts tagged with code">code</a> is clean enough to track down any <a href="http://technologykills.com/tag/inconsistencies/" class="st_tag internal_tag" rel="tag" title="Posts tagged with inconsistencies">inconsistencies</a> quickly.</p>
<p>Here's crossing my <a href="http://technologykills.com/tag/fingers/" class="st_tag internal_tag" rel="tag" title="Posts tagged with fingers">fingers</a>, and hoping that the upgrade to RC3 brings the promised <a href="http://technologykills.com/tag/speed-improvements/" class="st_tag internal_tag" rel="tag" title="Posts tagged with speed improvements">speed improvements</a> to my projects!</p>
]]></content:encoded>
			<wfw:commentRss>http://technologykills.com/2008/10/23/cakephp-13-upgrades-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 954/1131 objects using disk: basic

Served from: technologykills.com @ 2012-02-06 23:54:20 -->
