<?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>TURBU Tech &#187; Programming Ethics</title>
	<atom:link href="http://tech.turbu-rpg.com/tag/programming-ethics/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.turbu-rpg.com</link>
	<description>My thoughts on Delphi programming in general, and particularly on the technical aspects of developing the TURBU engine and editor.</description>
	<lastBuildDate>Wed, 01 Sep 2010 21:11:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Personal property and computing</title>
		<link>http://tech.turbu-rpg.com/116/personal-property-and-computing</link>
		<comments>http://tech.turbu-rpg.com/116/personal-property-and-computing#comments</comments>
		<pubDate>Fri, 09 Apr 2010 21:50:02 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Programming Ethics]]></category>
		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=116</guid>
		<description><![CDATA[I&#8217;ve always been a big fan of Apple&#8217;s.  My first computer was an Apple IIe, and finding a copy of BASIC on there was what first got me into programming.  A good percentage of the modern user interface concepts we take for granted today were invented by Apple back in the 1980s.  (Yes, I know, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been a big fan of Apple&#8217;s.  My first computer was an Apple IIe, and finding a copy of BASIC on there was what first got me into programming.  A good percentage of the modern user interface concepts we take for granted today were invented by Apple back in the 1980s.  (Yes, I know, they got the basic concepts from Xeroc PARC, but a lot of their work was <em>their work</em>, not Xerox&#8217;s.)  They&#8217;ve always been one of the major drivers of innovation in the computer industry, and they&#8217;ve done a lot to hold the line against Microsoft&#8217;s campaign for complete domination of the computer industry.  They&#8217;re one of a <em>very</em> few companies that have actually had any real success in that area, and we all owe them a debt of gratitude for that, if nothing else.</p>
<p>Apple released the latest iPhone development license yesterday, and I suddenly find myself a lot less grateful.</p>
<p><span id="more-116"></span>In case you haven&#8217;t already seen, it contains the following provision:</p>
<blockquote><p>Applications must be originally written in Objective-C, C, C++, or  JavaScript as executed by the iPhone OS WebKit engine, and only code  written in C, C++, and Objective-C may compile and directly link against  the Documented APIs (e.g., Applications that link to Documented APIs  through an intermediary translation or compatibility layer or tool are  prohibited).</p></blockquote>
<p>Among other things, that means no Object Pascal for the iPhone.  At Delphi Live last year, the Embarcadero folks talked about &#8220;Native Delphi everywhere.&#8221;  Everywhere but the iPhone and the iPad, apparently.  Oh, and not on any phone that runs on Windows Phone 7 either; <a href="http://www.networkworld.com/news/2010/031510-windows-phone-apps.html">only .NET apps that use Silverlight or XNA are allowed there</a>.  Google&#8217;s Android is only slightly better.  You&#8217;re &#8220;officially discouraged&#8221; from using anything but Java, but not outright prohibited.  (Language choice is alive and well on Palm&#8217;s WebOS, but phones that run on it aren&#8217;t doing so well in the market.)</p>
<p>This also slams the door hard right in the face of all the folks at the Lazarus project and the fascinating work they&#8217;ve done on <a href="http://wiki.freepascal.org/FPC_PasCocoa#Enabling_Objective-C.2FObjective-Pascal">Objective-Pascal</a>, and it calls the future of the Delphi team&#8217;s cross-platform work into question.  With all of the blog posts about Delphi for the Mac in the upcoming &#8220;Fulcrum&#8221; project, it&#8217;s clear that Embarcadero is putting a lot of effort into making Delphi work on the Mac, and does anyone doubt that they had the iPhone/iPad in their sights as part of the long-term plan?</p>
<p>I spent a lot of time thinking about what makes this new policy so offensive to me.  Apple has every right to build the iPhone however they want to.  The design of the phone is their own intellectual property.  And they have the right to build an App Store as a centralized place to buy and sell iPhone content.  And if they own the App Store, it logically follows that they have every right to decide what apps people can offer on it.  The store&#8217;s their property, after all.  I&#8217;ve seen plenty of brick-and-mortar stores with signs that say &#8220;we reserve the right to refuse service to anyone for any reason,&#8221; and this is just the electronic version of that.</p>
<p>But here&#8217;s where we come to a problem.  The design of the iPhone is Apple&#8217;s property.  The App Store is Apple&#8217;s property.  But <em>the individual phones and iPads are not</em>.  If Apple sells an iPhone to me, it is transferring ownership of the device from Apple to me in exchange for an agreed-upon sum of money, and once this transfer has taken place, they no longer own it.  It becomes my property, to do with as I please.  That&#8217;s a very simple, intuitive concept that anyone can grasp, and it&#8217;s been a fundamental principle of capitalism since before Adam Smith wrote the how-to guide:  as long as I do not use a personal possession in such a way as to cause actual harm to others, I can do whatever I want to with it.</p>
<p>This principle&#8217;s under attack now.  The only way to get a new app on your iPhone is through the App Store, or by uploading it directly from your Mac if you have a Mac and the iPhone SDK.  On my PC, I can go to some random website, download a new program and install it, but you can&#8217;t do that on an iPhone, even though it has a built-in Internet connection.  In effect, Apple has decreed you only theoretically own the iPhone; you don&#8217;t own the part of it that receives new applications.  That still belongs to Apple 100%.</p>
<p>Well, to be frank, that&#8217;s a bunch of crap.  Apple has no right to tell me that I can&#8217;t download an iPhone app from some random website and install it on an iPhone if I want to, and Microsoft has no right to say that I can&#8217;t write non-.NET apps for the Windows Phone 7 OS if I can figure out the bindings.  <a href="http://en.wikipedia.org/wiki/Digital_Millennium_Copyright_Act">Any law that says they do have such a right</a> is evil and needs to be repealed.</p>
<p>This isn&#8217;t just about the iPhone, or even phones in general.  This is about the future of personal computing itself.  What Apple&#8217;s managed to pull off with the iPhone looks a whole lot like Microsoft&#8217;s vision of the future, in which every computer contains a <a href="http://en.wikipedia.org/wiki/Trusted_Platform_Module">TPM chip</a> that will place the ultimate control of the system&#8217;s functionality under the control of the owners of the software that runs on it, not the owner of the computer.  This isn&#8217;t some hypothetical bad future bogeyman that Richard Stallman is cooking up to scare people into using Free Software, folks.  This is what is really happening, right in front of us, today.</p>
<p>In any other context, taking control of the functionality of a computer away from the computer&#8217;s owner and using it against his will and against his interests is known as hacking that computer.  It&#8217;s universally regarded as a form of computer crime, and rightfully so.  But when DRM technology is involved, it&#8217;s not a crime; instead it&#8217;s a legally-protected &#8220;access control.&#8221;  That&#8217;s what the DMCA and similar laws in other countries are all about: they explicitly give copyright owners the right to hack your computer, at any time and for any reason, if your computer runs their copyrighted material.  And until this notion is reversed, and the use of DRM technology is legally recognized as the crime it is, we can expect to see the future of computing looking more and more like the iPhone.</p>
<p>It would seem that Apple has come full circle.  <a href="http://www.youtube.com/watch?v=OYecfV3ubP8">Thanks to Apple Macintosh, 1984 was not like &#8220;1984&#8243;.</a> But thanks to Apple iPhone, 2010 might be.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/116/personal-property-and-computing/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Programming Ethics 101</title>
		<link>http://tech.turbu-rpg.com/75/programming-ethics-101</link>
		<comments>http://tech.turbu-rpg.com/75/programming-ethics-101#comments</comments>
		<pubDate>Tue, 05 Jan 2010 01:43:47 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Programming Ethics]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=75</guid>
		<description><![CDATA[A few days ago on StackOverflow, someone posted the question, How can I keep Task Manager from killing my program? The first comment asks a very good question:  &#8220;What legitimate reason do you have for doing this?&#8221; It reminded me of the guy who wanted to know how to make a file that can&#8217;t be [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago on StackOverflow, someone posted the question, <a href="http://stackoverflow.com/questions/1983564/how-can-i-keep-task-manager-from-killing-my-program">How can I keep Task Manager from killing my program?</a> The first comment asks a very good question:  &#8220;What legitimate reason do you have for doing this?&#8221;<br />
It reminded me of the guy who wanted to know how to <a href="http://stackoverflow.com/questions/1333807/how-can-i-make-a-file-trully-immutable-non-deletable-and-read-only">make a file that can&#8217;t be edited or deleted by any means.</a> Both of these guys seemed to have honorable intentions, but just hadn&#8217;t thought the ramifications through all that well.<span id="more-75"></span></p>
<p>As programmers, we often have near-absolute power on a computer.  We have access to everything that&#8217;s not specifically denied to us by system security, and with that much power comes great responsibility.  It&#8217;s important to remember what I consider the first principle of programming ethics: <em> </em><strong>When you write a program for someone else to use, the computer they are running it on is their property, not yours, and your program needs to behave itself accordingly.</strong></p>
<p>There&#8217;s a negative corollary to the Golden Rule that applies here.  <em>Do not unto others as you would not have them do unto you.</em> Much like a surgeon whose power over a patient in his care is similarly near-absolute, we have the implicit responsibility to &#8220;<a href="http://en.wikipedia.org/wiki/Primum_non_nocere">first, do no harm</a>.&#8221;  Your program needs to behave itself as an invited guest in someone else&#8217;s home.  You do not walk in and act like you own the place, and this has implications far beyond simply avoiding virus-like behavior.</p>
<p>For example, unless you&#8217;re writing for a very old computer, or for a few particularly backwards modern devices, such as the iPhone or most game consoles, your program is going to have to share the system with a bunch of other programs, and they need to execute too.  This means that you need to be careful to accomplish your task while using as few system resources as possible so you don&#8217;t end up hogging resources that another program may need.  If possible, keep your CPU and memory usage low.  This also means, for example, that it&#8217;s a very bad idea to use <a href="http://blog.barrkel.com/2009/12/commonly-confused-tidbits-re-net.html">a garbage collector that&#8217;s designed to build up as much garbage as possible before collecting.</a> That&#8217;s like never putting anything in the dishwasher until you have no clean dishes left in the house.  (And I&#8217;m sure some of you out there have kids that do exactly that.  Doesn&#8217;t it drive you up the wall?  Do you really want a program doing that on your computer?  If not, don&#8217;t do it to other people&#8217;s computers.)</p>
<p>Then there&#8217;s &#8220;protection.&#8221;  Most programmers tend to be pretty good about this sort of issue, until the idea of someone doing unauthorized things with their program comes up, and then all rational thought, not to mention consideration for ethics, goes right out the window, seemingly replaced by testosterone-driven outrage from coders who are usually rather mild and easygoing.  &#8220;What?!?  They&#8217;ll <em>never</em> get away with stealing <strong>my</strong> program!&#8221;  And then they proceed to do <a href="http://en.wikipedia.org/wiki/Sony_BMG_CD_copy_protection_scandal">all sorts of</a> <a href="http://www.boingboing.net/2006/01/30/anticopying_malware_.html">blatantly evil things</a> <a href="http://www.myce.com/news/Settec-Alpha-DVD-protection-used-on-German-Mr_-Mrs_Smith-11468/">to other people&#8217;s computers</a>.</p>
<p>Like most emotional knee-jerk reactions, this approach ignores the actual facts of the matter.  For example, empirical evidence suggests that, <a href="http://www.nytimes.com/2004/06/06/magazine/what-the-bagel-man-saw.html">in the absence of any enforcement, almost 90% of people tend to be basically honest.</a> That&#8217;s pretty darn good, even before you figure in the additional cost of actually providing the enforcement.</p>
<p>Also, copy protection <em>simply does not work</em>, due to a combination of two factors.  First, in order for the program to actually run, or for protected data to be read by a program, there has to be a &#8220;door&#8221; in the copy protection someplace.  Not a secret &#8220;backdoor,&#8221; just the ordinary variety that lets the authorized user through.  Thing is, if that exists in a computer-readable format, some user can find it and figure out how it works.  There are some coders out there who can read assembly as easily as you and I can read the language of our choice, and if one of them tries to find a hole in your protection, it won&#8217;t last long, and this is a very important point.</p>
<p>DRM proponents often say that a copy-protection scheme doesn&#8217;t have to be perfect; just good enough to discourage casual hackers and &#8220;keep honest people honest.&#8221;  The part about keeping honest people honest is nonsense, of course.  Either someone is honest or they aren&#8217;t.  But the thing is, so is the part about it not having to be perfect.  That might have been true twenty years ago, but today a copy-protection scheme has to be absolutely perfect, because if it&#8217;s cracked once, by anyone anywhere, it&#8217;s all over.  The crack will be posted online and any of those 13% or so of dishonest people out there who wants to use your program for free will have immediate access to it at the cost of just a little bit of searching.</p>
<p>And then there are the ethical issues involved.  In any other context, an external programmer taking control of the functionality of a computer away from the computer&#8217;s owner and using it against the owner&#8217;s interests is known as computer hacking, (or <em>cracking</em> if you prefer to use the term &#8220;hacker&#8221; in its original, positive context,) and is quite illegal.  Why all the special pleading in the case of DRM?  Because there&#8217;s lost revenue involved?  When did ensuring revenue become more a important consideration than not committing a crime?  Follow that line of reasoning far enough and you end up with Enron and Bernie Madoff, or the Sony rootkit.</p>
<p>We&#8217;re beginning a new year, and it&#8217;s traditional to set resolutions.  I hope everyone involved in programming will resolve to try to hold ourselves to the high standard of not writing code to do anything on another person&#8217;s computer that we wouldn&#8217;t want done on ours, and also to the even higher standard of actually thinking through the implications of what we try to do to figure out whether or not it would end up doing something bad.  Then maybe we&#8217;ll end up with a few less questions like that on StackOverflow, and I won&#8217;t have to keep posting the same answer to them. <img src='http://tech.turbu-rpg.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Happy New Year, everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/75/programming-ethics-101/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
