<?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"
	>

<channel>
	<title>Silicon Chisel &#187; Articles</title>
	<atom:link href="http://www.siliconchisel.com/category/articles/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.siliconchisel.com</link>
	<description>Open-Source Web Development</description>
	<pubDate>Mon, 29 Sep 2008 11:38:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Web 2.0 and AJAX - Everything Old Is New Again</title>
		<link>http://www.siliconchisel.com/articles/web-20-and-ajax-everything-old-is-new-again/</link>
		<comments>http://www.siliconchisel.com/articles/web-20-and-ajax-everything-old-is-new-again/#comments</comments>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<dc:creator>Silicon Chisel</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://siliconchisel.textdriven.com/blog/web-20-and-ajax-everything-old-is-new-again/</guid>
		<description><![CDATA[After the dot-com bubble burst, it seems like all things Internet fell into a kind of malaise. Investors were scared to take risks, jobs were  few and far between, and in general the Internet was being treated like a utility - a step below phone service, but above trash pickup.But some new AJAX-based offerings [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-139" style="float: right;" title="web20" src="http://www.siliconchisel.com/wp-content/uploads/2008/04/web20.png" alt="" width="210" height="90" />After the dot-com bubble burst, it seems like all things Internet fell into a kind of malaise. Investors were scared to take risks, jobs were  few and far between, and in general the Internet was being treated like a utility - a step below phone service, but above trash pickup.But some new AJAX-based offerings are bringing some of the old excitement back. You can start to see where the &#8216;Net can change the way we live, work, and interact again. Five in particular are in beta phase and well worth looking at: Meebo (unified IM and chat), NetVibes (aggregator and web-top console), BlinkList (bookmark manager and sharing), RoundCube (email), and Writely (word processing and document collaboration).</p>
<p><span id="more-7"></span><br />
But first, a little history.</p>
<p>Back in the early 1990&#8217;s <a href="http://www.sun.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sun.com');">Sun Microsystems</a>&#8216; motto was &#8220;The Network Is The Computer.&#8221; The idea was you could log into any machine and get at your working environment. The concept of the desktop PC becoming more of an appliance than a place to put things was novel and &#8230; well &#8230; ahead of its time.</p>
<p>Now fast-forward about ten years. With the new Web 2.0 applications you can write documents, do online research, have a complete desktop, and so on all from within a browser window. The browser doesn&#8217;t care where you are, what kind of machine you&#8217;re on, or any of the things which fueled the various Platform Wars of the last couple of decades.</p>
<p>Which is why I sub-titled this: <em>&#8220;Everything Old Is New Again.&#8221;</em></p>
<hr style="width: 100%; height: 2px" />
<p>The applications listed below certainly aren&#8217;t the only ones of their kind. In fact, competition in some of these spaces is fierce. These are simply the ones which in my analysis look the most promising or show the most innovative and well-thought out functionality.<br />
<a href="http://www.meebo.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.meebo.com');"></a></p>
<h3><a href="http://www.meebo.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.meebo.com');">Meebo (www.meebo.com)</a></h3>
<p><a href="http://www.meebo.com"><br />
</a><br />
Meebo at its core is a multi-protocol instant messaging client. With it you can connect to Yahoo, GoogleTalk, AOL, ICQ, Jabber, and MSN networks - with multiple accounts on each - and view all these IM sessions through one web page. The system more or less treats the page as an MDI (mutiple document interface) container, so your actual desktop isn&#8217;t getting cluttered with a zillion chat windows (or all the ads which IM clients now seem to be geared around putting in your face). And your actual computer isn&#8217;t getting loaded up with a heavy application.The system remembers your account settings and has complete logging of all chat sessions. You can&#8217;t do some advanced things like a native IM client - file transfer, video, voice, etc. But who cares? The purpose of IM is sending messages.</p>
<p>in August, Meebo also launched their MeeboMe widget. This is a Flash-based widget you can embed on any web site. Anyone visiting that site will appear in your Meebo IM as an anonymous buddy. While this is still a little raw, you can&#8217;t help but see where this could lead in areas such as customer service and community building.</p>
<h3><a href="http://www.netvibes.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.netvibes.com');" target="_blank">NetVibes (www.netvibes.com)</a></h3>
<p>NetVibes is a web-top application and aggregator. You can group your content into tabs. You can also publish your tabs in the &#8220;NetVibes ecosystem&#8221; so anyone who shares your interest can share your news. The system has an API so folks are always writing new modules for everything from weather to managing other Web 2.0 applications.</p>
<p>When I first saw NetVibes my immediate reaction was that &#8220;they out-Googled Google.&#8221; NetVibes has the same clean look and efficiency of interface that Google has, but it&#8217;s better looking and somehow more &#8220;fun&#8221; than a Google application. It&#8217;s hard to qualify, but the user experience just seems better than what other similar systems are offering.</p>
<h3><a href="http://www.blinklist.com/" target="_blank"><br />
{mosimage} BlinkList (www.blinklist.com) </a></h3>
<p>Think of BlinkList as kind of a &#8220;next generation&#8221; of del.icio.us. The big difference is AJAX. BlinkList uses all the Web 2.0 design methodology to produce a bookmark manager which in some respects is better than native desktop applications of the same genre.</p>
<p>BlinkList offers the same tagging and browser integration as the wide array of other such services. Plus you can share your bookmarks if you wish, and look for other things people on BlinkList have bookmarked. Again, nothing new. But when used through the AJAX-based interface a lot of the clumsiness of working with so much imformation (how many 1000&#8217;s of bookmarks do <em>you </em>have?) is made more manageable.</p>
<p>Also, BlinkList provides thumbnails for the sites in your lists which is more helpful than you&#8217;d think. Many times when looking for a site that was visited months, or years, ago one will remember what it looked like more than what it said. Thumbails help out in this regard.</p>
<p>A boomark manager is a pretty important application for anyone who works on or with the Web on a regular basis. Your bookmarks are your knowledge base and previously you had to rely on your browser or an application to  keep track of them all. Which also meant the headache of synchronizing these from machine to machine. And, what happens if you&#8217;re at work and need a bookmark that&#8217;s on your PC at home? With a service like BlinkList you have all that information available from anywhere on the web.</p>
<p align="justify"> </p>
<h3><a href="http://www.roundcube.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.roundcube.net');" target="_blank">RoundCube (www.roundcube.net)</a></h3>
<p>RoundCube is an AJAX-based IMAP webmail client. This means you can do a lot of the things you would do through a native application like drag-and-drop messages into folders. In short, it provides a nicer email experience for web users.</p>
<p align="justify"> <br />
What makes RoundCube more interesting is that it&#8217;s Open-Source, where as the other offerings described in this article are free services, RoundCube is free code. Already it has been integrated into the Drupal CMS, and no doubt into a few other similar systems as well. The &#8220;big picture&#8221; on this is that users are no longer beholden to Google or Yahoo to be able to get a nice, easy-to-use webmail client.</p>
<p align="justify"> </p>
<h3><a href="http://www.writely.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.writely.com');" target="_blank">Writely (www.writely.com)</a></h3>
<p>Writely is a web-based word processor on steroids. The boost isn&#8217;t from fancy formatting feature - this is not a web-based version of MS Word. In fact, the formatting is pretty much limited to basic HTML kinds of constructs. Writely&#8217;s juice comes from the ability to have a revision history of your documents; to be able to share your documents with individuals or the whole world; and to be able to collaborate on a document with other people on the &#8216;Net.<br />
Writely does a decent job importing things like MS Word, so it is possible to migrate content to Writely from your desktop. But you still do not want to use this to write your next novel - it simply isn&#8217;t built for that. But for things like keeping your resume online (and up to date) or working on a business plan with someone over the &#8216;Net, Writely is ideal.</p>
<p align="justify"> <br />
The &#8220;big picture,&#8221; though is seen when one considers how much of business is based on text documents. A service like Writely opens the door for the kind of remote workplace that previously requires a fairly significant corporate IT infrastructure to maintain.</p>
<p align="justify"> </p>
<p align="justify"> </p>
<hr />
<p align="justify"> </p>
<h3>Summary</h3>
<p>All of the products mentioned here are in beta as of the time of this writing. But the quality of the products - from functionality to user experience - is some of the best work I&#8217;ve seen in a long while. And as far as trends go, another on which is reasuring is that these companies are getting multi-million-dollar venture capital investments. A few years ago a VC would not even take a meeting with someone doing &#8220;another dot-com.&#8221; So hopefully Web 2.0 will also revive the business of building things for the Internet.</p>
<!--<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="http://creativecommons.org/licenses/by-nc/3.0/" /></Work><License rdf:about="http://creativecommons.org/licenses/by-nc/3.0/"><requires rdf:resource="http://creativecommons.org/ns#Attribution" /><permits rdf:resource="http://creativecommons.org/ns#Reproduction" /><permits rdf:resource="http://creativecommons.org/ns#Distribution" /><permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><prohibits rdf:resource="http://creativecommons.org/ns#CommercialUse" /><requires rdf:resource="http://creativecommons.org/ns#Notice" /></License></rdf:RDF>-->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.siliconchisel.com/articles/web-20-and-ajax-everything-old-is-new-again/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Version Control - Its Not Just For Hackers Anymore</title>
		<link>http://www.siliconchisel.com/articles/version-control-its-not-just-for-hackers-anymore/</link>
		<comments>http://www.siliconchisel.com/articles/version-control-its-not-just-for-hackers-anymore/#comments</comments>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<dc:creator>Mark Miller</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[subversion]]></category>

		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://siliconchisel.textdriven.com/blog/version-control-its-not-just-for-hackers-anymore/</guid>
		<description><![CDATA[You&#8217;re working on a Photoshop template and 7 versions ago you had a layer in it with the client&#8217;s logo with just the right shadow effect. But since then you&#8217;ve cleaned up all the unused layers and can&#8217;t find it anymore.
Or you&#8217;re working on a site and your CSS used to work and now it&#8217;s [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-180 alignright" style="float: right;" title="tortoisesvn" src="http://www.siliconchisel.com/wp-content/uploads/2008/04/tortoisesvn.jpg" alt="" width="77" height="77" />You&#8217;re working on a Photoshop template and 7 versions ago you had a layer in it with the client&#8217;s logo with just the right shadow effect. But since then you&#8217;ve cleaned up all the unused layers and can&#8217;t find it anymore.</p>
<p>Or you&#8217;re working on a site and your CSS <em>used</em> to work and now it&#8217;s broken and you need to roll back. But did you save a complete copy of the site from that time someplace on your drive?</p>
<p>Version control used to be something only software developers used. But with the complexity of web site design, temnplate design, and Flash design, it can be a real boon to anyone who developers for the Web. Fortunately,  version control now integrates right into the Windows XP desktop thanks to free programs like <a href="http://tortoisesvn.tigris.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/tortoisesvn.tigris.org');" target="_blank">Tortoise SVN</a>.</p>
<p><span id="more-6"></span></p>
<p>Tortoise SVN is a fully integrated client for the ((Subversion)) version control system. Subversion is what many of the current crop of software development IDE&#8217;s use to manage their code. It&#8217;s a very robust system which allows for multiple projects, checking files in and out, backtracking to old versions, and reconstituting entire development areas on other disks, or even other PC&#8217;s.</p>
<p><img class="alignnone size-full wp-image-179 alignright" style="float: right;" title="tortoisemenu" src="http://www.siliconchisel.com/wp-content/uploads/2008/04/tortoisemenu.jpg" alt="" width="281" height="387" />The system is pretty easy to use. Easy enough that there&#8217;s no excuse not to. For local use, simply designate a folder on a drive to be the Subversion repository and create a folder hierarchy in whatever manner works for the work at hand. One folder per web site or one per client or one per project. Whatever fits. Which is nice because it means the user does not need to change the way they work with their files in order to use version control.</p>
<p>It is also a good idea to set the repository directory to be on a drive other than the main working drive. Doing so basically provides a back-up of the primary drive as well as version control. Another option is to use a service like <a title="CVS Dude" href="http://www.cvsdude.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cvsdude.com');" target="_blank">cvs-dude.com</a>. This is  a nice, well run service which provides Subversion space and other services on their servers. The price is reasonable and if off-site data storage is a concern, then this is a way to kill two birds with one stone.</p>
<p>Note that Subversion repositories can be (and on Windows XP, should be) saved in native file format. Which allows the Subversion repository to be synchronized between PC&#8217;s (I do so between my desktop PC and my laptop) or archived onto removable media for back-up.</p>
<p>Once Tortoise is installed on user&#8217;s PC a new menU (shown here) becomes available to manage the version control. For the most part, the &#8220;Check Out,&#8221; &#8220;Add,&#8221; and &#8220;Commit&#8221; commands will be what gets used most. Desktop icons will have overlays which show the check-in state of each file, so it is easy to see if changes have been commited to Subversion. And, of course, each check-in allows for comments - so if a big Photoshop file is being checked in as &#8220;final art&#8221; the comment can indicate this, and then be searched for later within the repository if it is needed to be recalled.</p>
<p>The real trick to version control is actually <em>using </em>it. The good thing is that the TortoisSVN menu is so inobtrussive that its very easy to do so. Much easier than creating back-ups which require handing removable media and lengthy wait times while large amounts of data are spooled. By contrast, a Subversion check-in of even large files take only a few seconds. And while not as bullet-proof as backing up to a CD-RW, it is still a back-up.</p>
<p>More than a back-up. The Subversion repository holds a complete history of every file checked in, in whatever level of detail the owner sets for it. So when a client says they want a feature back that a month ago they said they wanted removed, that code is still in the repository. Or if you accidentally delete a layer from a Photoshop file that held the styles needed for a mennu bar; that too is still in the repository.</p>
<p>Version control can be the best friend of a web developer. And best of all: it&#8217;s all free.</p>
<!--<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="http://creativecommons.org/licenses/by-nc/3.0/" /></Work><License rdf:about="http://creativecommons.org/licenses/by-nc/3.0/"><requires rdf:resource="http://creativecommons.org/ns#Attribution" /><permits rdf:resource="http://creativecommons.org/ns#Reproduction" /><permits rdf:resource="http://creativecommons.org/ns#Distribution" /><permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><prohibits rdf:resource="http://creativecommons.org/ns#CommercialUse" /><requires rdf:resource="http://creativecommons.org/ns#Notice" /></License></rdf:RDF>-->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.siliconchisel.com/articles/version-control-its-not-just-for-hackers-anymore/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The War on Spam</title>
		<link>http://www.siliconchisel.com/articles/the-war-on-spam/</link>
		<comments>http://www.siliconchisel.com/articles/the-war-on-spam/#comments</comments>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<dc:creator>Mark Miller</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[email]]></category>

		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[The flow of spam (&#8221;Unsolicited Commercial Email&#8221; or &#8220;UCE&#8221;) into Internet citizen&#8217;s email accounts is seemingly endless and boundless. Email users and corporations are forced to use server-side and client-side filters, challenge systems, and other means to protect their server assets from the deluge. There have been various attempts at legislation as well, which want [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-181 alignleft" style="float: left;" title="spam-war" src="http://www.siliconchisel.com/wp-content/uploads/2008/04/spam-war.jpg" alt="" width="130" height="100" />The flow of spam (&#8221;Unsolicited Commercial Email&#8221; or &#8220;UCE&#8221;) into Internet citizen&#8217;s email accounts is seemingly endless and boundless. Email users and corporations are forced to use server-side and client-side filters, challenge systems, and other means to protect their server assets from the deluge. There have been various attempts at legislation as well, which want to attack the problem from different angles.</p>
<p style="text-align: justify">But this is a war. And one of the most effective ways to win a war is through logistics. Cut off the enemy&#8217;s ability to wage war. In the case of spammers (and phishers, for that matter) the means to this end are actually available.</p>
<p><span id="more-5"></span></p>
<p style="text-align: justify">Probably the largest reason that UCE is so prevalent is that it is virtually free. It costs the sender next to nothing to send out tens of thousands of emails. Worst case they need to hire a few people to hijack some identities and/or pirate some unsuspecting sendmail servers. But compared to the actual work of real marketing organizations, the costs are negligible. If each unwanted piece of spam mail cost the sender some amount of money, then this would change the dynamic.</p>
<p style="text-align: justify">The origin of the spam also provide the key to attacking it. In order for spam to be a useful marketing tool, it must send the reader to a web site. This site will be hosted on a commercial ISP and if the site wishes to take volume orders it will need some kind of commercial banking. The key word here is &#8220;commercial&#8221; - go after the corporation ultimately responsible for sending the spam instead of the minions who do the sending.</p>
<p style="font-weight: bold; text-align: justify">The Proposal</p>
<p style="text-align: justify">The US already has a &#8220;do not call&#8221; list for telemarketing. What is needed is something similar for email, but with more teeth, and tied into the Internal Revenue System. The system would begin with a &#8220;do not email&#8221; list which people could sign up for. This would give the signee a code with which to register complaints. Note that ISP&#8217;s would also be able to sign up for such a list to report traffic which crossed its servers.</p>
<p style="text-align: justify">Complaints about spam would be handled through an automated system which would accept forwarded email messages, along with the signee&#8217;s code. The originating compaint email address and headers would have to mach the signee&#8217;s email or the complaint would be rejected.</p>
<p style="text-align: justify">What the IRS would do is gather these complaints and when a certain message hit some threshhold of frequency they would drill down to the body of the message and isolate the corporation which sent it, as well as their ISP. US corporations would be fined 1 penny per email complained about. Offshore corporations, immune to such taxes, would be attacked through their ISP&#8217;s. The carrying ISP would be advised to no discontinue hosting the offending corporation or all traffic from their service would be blacklisted from the US backbone. Or deal with the bank where the offshore corporation holds its accounts.</p>
<p style="text-align: justify">Sure, this would foster the growth of &#8220;underground&#8221; banks and ISP&#8217;s who make their dollar from hosting spam farms and the corporations who rely on them. And they would charge a hefty fee for the service. Which is fine. It makes doing business via spam mail more expensive, more difficult. It attacks the line of supply. Eventually the cost of doing business through such means will get to the point where if it is a legitimate corporation they will decide they may as well play by the rules.</p>
<p style="font-weight: bold; text-align: justify">Growing Pains</p>
<p style="text-align: justify">The hardest part of implimenting this plan is the beginning. It requires a critical mass of people to sign up for the &#8220;do not spam&#8221; list, and to send in complaints. It also requires ISP&#8217;s to get on board. And there will need to be a grace period when legitimate companies are given a chance to re-authenticate their mailing lists to avoid unwarranted fines.</p>
<p style="text-align: justify">There will also be difficulties in that the spammers will spend time searching for new techniques with which to defeat the system. So be it. The IRS will have plenty of incentive to make sure that the system is enforced. If only a million email users participate, and complain about only 20 spam emails a day, that&#8217;s a potential revenue stream of $200,000 per day that the IRS could gather. And if they get the major ISP&#8217;s to register as well, then multiply that by the hops the UCE takes on it&#8217;s way to the recipient.</p>
<p style="text-align: justify">Some legitimate companies will no doubt get caught in the nets by mistake. Either because of out of date mailing lists or hackers doing things which spoof the system into levying erroneous fines. But since more email is spam than is not, the odds are that more &#8220;bad guys&#8221; will get caught than good.</p>
<p style="text-align: justify; font-weight: bold">Conclusion</p>
<p style="text-align: justify">Whether this plan would work or not is not really the point. The real point is that the war is currently not being fought on the right battlefield. Filter- and challenge-based systems are defenses to protect the end user. Black-lists are defenses to protect end users and ISP&#8217;s. What is needed is a way to <span style="font-weight: bold">attack </span>the companies responsible for the spam. The ones who want us to buy their products. And the best way to attack them is financially. Make it cost to do business this way and it will end.</p>
<!--<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="http://creativecommons.org/licenses/by-nc/3.0/" /></Work><License rdf:about="http://creativecommons.org/licenses/by-nc/3.0/"><requires rdf:resource="http://creativecommons.org/ns#Attribution" /><permits rdf:resource="http://creativecommons.org/ns#Reproduction" /><permits rdf:resource="http://creativecommons.org/ns#Distribution" /><permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><prohibits rdf:resource="http://creativecommons.org/ns#CommercialUse" /><requires rdf:resource="http://creativecommons.org/ns#Notice" /></License></rdf:RDF>-->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.siliconchisel.com/articles/the-war-on-spam/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fast Window Overlap Checking Algorithm</title>
		<link>http://www.siliconchisel.com/articles/fast-window-overlap-checking-algorithm/</link>
		<comments>http://www.siliconchisel.com/articles/fast-window-overlap-checking-algorithm/#comments</comments>
		<pubDate>Mon, 11 Jul 2005 12:56:48 +0000</pubDate>
		<dc:creator>Mark Miller</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[algorithms]]></category>

		<category><![CDATA[window occlusion]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Many algorithms to check if two windows overlap (a very common activity in window system and interface design) rely on doing multiple comparisons of the positions of the sides of the two rectangular areas in question. This is usually fine for most instances, especially in these days of multi-gigahertz desktop PC&#8217;s. But sometimes you need [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-182 alignleft" style="float: left;" title="rects" src="http://www.siliconchisel.com/wp-content/uploads/2008/04/rects.gif" alt="" width="128" height="96" />Many algorithms to check if two windows overlap (a very common activity in window system and interface design) rely on doing multiple comparisons of the positions of the sides of the two rectangular areas in question. This is usually fine for most instances, especially in these days of multi-gigahertz desktop PC&#8217;s. But sometimes you need to do so many such comparisons that speed becomes the paramount concern. And sometimes you do not have a super fast processor to rely on - such as on small hand-held devices or cell-phones.</p>
<p>The algorithm described here is one I wrote back in 1988 for a graphics workstation product. It relies on some interesting relationships between the sign of the result of subtracting opposite sides of two rectangles. By taking advantage of this, it is possible to write few lines of C code which will compile down to 20 or fewer assembly instructions.</p>
<p><span id="more-52"></span>Simply put, if you subtract opposite sides of two rectangles the signs of the results will be the same if they do not overlap along that axis. So in pseudocode that comes out to:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>sign<span style="color: #009900;">&#40;</span>top1 <span style="color: #339933;">-</span> bottom2<span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> sign<span style="color: #009900;">&#40;</span>bottom1 <span style="color: #339933;">-</span> top2<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp;&amp;amp;
    <span style="color: #009900;">&#40;</span>sign<span style="color: #009900;">&#40;</span>left1 <span style="color: #339933;">-</span> right2<span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> sign<span style="color: #009900;">&#40;</span>right1 <span style="color: #339933;">-</span> left2<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span>;</pre></td></tr></table></div>

<p>This can be further optimized by using the XOR function, which allows the entire algorithm to be reduced to a 1-line preprocessor macro which has only one logical comparison - everything else is integer or bit-wise math. In this case all we are trying to do is get the high-order bit (which determines sign of the integer) to be set based on the subtractions, and then test it for the occlusion.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="c c" style="font-family:monospace;"><span style="color: #993333;">typedef</span> <span style="color: #993333;">struct</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #993333;">int</span> t<span style="color: #339933;">,</span> l<span style="color: #339933;">,</span> r<span style="color: #339933;">,</span> b;
<span style="color: #009900;">&#125;</span> rect;   
&nbsp;
<span style="color: #339933;">#define test_olap (_r1, _r2) </span>
    <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>_r1.<span style="color: #202020;">t</span> <span style="color: #339933;">-</span> _r2.<span style="color: #202020;">b</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">^</span> <span style="color: #009900;">&#40;</span>_r1.<span style="color: #202020;">b</span> <span style="color: #339933;">-</span> _r2.<span style="color: #202020;">t</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp;
    <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>_r1.<span style="color: #202020;">l</span> <span style="color: #339933;">-</span> _r2.<span style="color: #202020;">r</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">^</span> <span style="color: #009900;">&#40;</span>_r1.<span style="color: #202020;">r</span> <span style="color: #339933;">-</span> _r2.<span style="color: #202020;">l</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt; <span style="color:#800080;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #0000dd;">1</span> <span style="color: #339933;">:</span> <span style="color:#800080;">0</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>Further optimizations could be done for a C/C++ coded version for early rejection based a negative return from the top/bottom or left/right comparison. But the gain would be negligable since that would require kicking out to logical operations and comparisons. The macro above compiled down to around 20 instructions on SPARC/680X0 series chips, and loading the registers for an early compare would not shave much off that.</p>
<p>If this has been of use to you, please let me know where and how you used it.</p>
<!--<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="http://creativecommons.org/licenses/by-nc/3.0/" /></Work><License rdf:about="http://creativecommons.org/licenses/by-nc/3.0/"><requires rdf:resource="http://creativecommons.org/ns#Attribution" /><permits rdf:resource="http://creativecommons.org/ns#Reproduction" /><permits rdf:resource="http://creativecommons.org/ns#Distribution" /><permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><prohibits rdf:resource="http://creativecommons.org/ns#CommercialUse" /><requires rdf:resource="http://creativecommons.org/ns#Notice" /></License></rdf:RDF>-->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.siliconchisel.com/articles/fast-window-overlap-checking-algorithm/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Investing in Open-Source Part 1 - Small Business</title>
		<link>http://www.siliconchisel.com/articles/investing-in-open-source-part-1-small-business/</link>
		<comments>http://www.siliconchisel.com/articles/investing-in-open-source-part-1-small-business/#comments</comments>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<dc:creator>Mark Miller</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Very few business can get by without some kind of a web site. This has become a simple fact of the modern business world. But getting a web presence built can be a difficult and costly undertaking for the small business owner who may not be as technically savvy as a corporate type.
The most common [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-183 alignleft" style="float: left;" title="articles" src="http://www.siliconchisel.com/wp-content/uploads/2008/04/articles.jpg" alt="" width="128" height="96" />Very few business can get by without some kind of a web site. This has become a simple fact of the modern business world. But getting a web presence built can be a difficult and costly undertaking for the small business owner who may not be as technically savvy as a corporate type.</p>
<p>The most common approach taken to getting a site built is to hire a &#8220;web designer/webmaster,&#8221; often from the classifieds (such as craigslist.org). Unfortunately, and I hear this story a lot from people who become my clients, this usually goes badly. The percentage of people who claim they are &#8220;designers&#8221; versus those who have actual design skills is quite poor. Knowing how to use the tools does not necessarily mean someone knows how to create a good design. Anyone can paint a house, far fewer can paint a portrait. The same metaphor applies to web design.</p>
<p><span id="more-3"></span><br />
Then there are secondary issues. For instance, since the work is billed hourly it is usually not done in the most efficient manner. This is a double-hit - first the client gets hit with the cost of doing this busywork the first time, and then it all needs to be undone if the site needs to be changed or moved. Some web designers also feel they can claim ownership of sites they build. Claiming design credit is not the same as having ownership of content.</p>
<p>Sometimes small businesses will see various scripts in use on other sites and ask that these be used on their own sites. The first step towards open-source adoptance. But here again, because the scripts are disconnected, only the webmaster who hooked it all together knows how to run the system. The business owner does not feel like he owns his own content.</p>
<p><strong>The Open Source Solution</strong></p>
<p>So why is ((open-source)) a solution for the small business?</p>
<p>First consider that an open-source content management system (CMS) is a self-contained entity. That is, there is one script, one control panel, and one database to interact with and maintain. These adminstrative control panels are now quite easy to use - anyone who can order a pizza online can run a CMS. This gives the small business owner <span style="font-weight: bold; font-style: italic">control </span>over his or her own content. The need to contact the webmaster every time a new article needs to be added or some item modified is removed. True, some people do not want to manage their own web sites. But for the most part anyone who has been through the &#8220;webmaster experience&#8221; once is looking for a way to &#8220;do it themselves&#8221; next time.</p>
<p>Another important thing that open-source systems buy for the small business owner is flexibility. The entire site can be given a new look by using a different theme. Theme customization can be done by a good web designer in a matter or days, or even hours. A fraction of what it takes to re-author a traditional site. This allows the small business to keep their site&#8217;s look and feel current with design trends without a huge cash outlay for design services. Most &#8220;template clubs&#8221; are under $100 for a year and those are usually 95% of what a site needs.</p>
<p>Flexibility also includes modularity. Open-source CMS are designed to allow new features - calendars, galleries, appointment forms, forums, etc. - to all be plugged in without requiring additional development or authoring. Worst case the site owner needs to add a menu item somewhere. And this task is just a web form, like everything else involved in the admin console of a CMS.</p>
<p>Going further down the flexibility track, since an open-source CMS keeps all the content, user accounts, calendar events, etc. in a database it becomes more or less a mechanical task of data conversion to move the entire site to a new framework, should that be desired. This is not a simple task, of course, but any web developer capable of deploying a CMS is more than likely capable of converting content from one system to another.</p>
<p>And since the content - the real value of any site - is in the database, it is easy to back-up and archive for safety. In these days of rampant hacking and server exploitation, this is an important issue. Most current CMS have a back-up module available, allowing the site owner to do his or her own back-ups of the data that comprises their site. Here again, the site owner is given more control of their own site.</p>
<p><strong>Drawbacks</strong></p>
<p>This all sounds great, but there must be a down side? And why isn&#8217;t everyone building sites this way if it is so great? Lets start with the drawbacks. There are really only three that deserve attention. One is that it requires a more complex hosting package to run a CMS-driven site. A traditional site just needs some space on a server and FTP access and that&#8217;s enough to host even a large site. CMS&#8217;s require mySQL and PHP, and in some cases the ability to change security settings in the Apache web server. However, since the cost of web hosting has dropped so radically in the last five years, one can usually find a hosting solution capable of running a CMS for little more than a standard &#8220;business hosting&#8221; web-page only package.</p>
<p>Next, a CMS is a structured content system. Some of the wild web page designs a person may see and want to emulate require a style of formatting which is anything but structured. So some kinds of site designs are simply impossible, or more trouble than they&#8217;re worth, on a CMS. For some kinds of businesses, this is a deal-killer; they want their site to look a certain way no matter what, and if the CMS is unable to produce that look and feel they do not want it.</p>
<p>The last drawback is that it does require finding a web designer who knows how to do this kind of work. There are far fewer web designers who have the skills than there are those who can use DreamWeaver or FrontPage. Developing a site with a CMS requires programming skills as well as design skills. Most &#8220;web designers&#8221; know the traditional tools and know how to install basic scripts into a traditional site. They can not deal with the programming logic required to develop or adapt components for a CMS, nor the abstract thinking needed to program a theme design. <span style="font-style: italic">(&#8221;Themes&#8221; or &#8220;skins&#8221; in a CMS define the way it looks. These are actually small programs themselves which decide how the page should be arranged intp columns and blocks, and how to apply formatting elements.)</span></p>
<p>And the last drawback mentioned also answers the second question. The reason more sites are not built this way is largely that there are significantly more developers who design traditional sites. So the small business owner looking for a site to be built will likely not know they want a CMS driven site, and will not likely find a web designer capable of building one - or even asking if a CMS is desired.</p>
<p><strong>The Investment</strong></p>
<p>For a small business, deciding to go with an open-source CMS-based solution is an investment. A decision to run the company&#8217;s web presence from a CMS means committing to a content platform for several years to come. It means accepting the fact that this platform will likely be replaced by a newer and better one somewhere down the road due simply to the pace of development out on the Internet. And it also means making the investment in learning enough about one&#8217;s own site to administer it and add content to it.</p>
<p>The investment can also mean taking a little time to learn and explore the technology itself. I have had a number of clients self-educate themselves on the CMS I deployed for them, and within months they are asking for specific components to be installed or updated, sometimes within days of that component being announced on the development sites.</p>
<p>But there is always an investment in owning something beyond that of the actual purchase. When one buys a house, one is also accepting the responsibility of maintenance. When one rents an apartment, one is leaving that responsibility to someone else. The same parallel applies to a CMS site versus a webmaster-controlled site. If a small business pays a web designer/webmaster to build and operate their site, they are more or less renting their content. Someone else is actually publishing and maintaining it - someone else controls it. It is like renting an apartment.</p>
<p style="text-align: justify">With a CMS-driven site, the small business has paid someone to build a house for their online content. It is now the business owner&#8217;s job to fill it with life and maintain it. The web developer can be called back in to make changes or additions, and can even be the webmaster if the small business owner does not have the time to author content. But the difference is that the site owner does not need a webmaster once the site system is built.</p>
<p><strong>Conclusions</strong></p>
<p>Clearly an open-source CMS-driven site is not right for every small business. Some businesses are so small that a few pages is all that they need. In which case having a &#8220;friend who can build a site&#8221; is more than enough. But for a small business which needs to make frequent updates to their site, which needs to incorporate complex kinds of functionality, and which cannot afford the disruption to business of an unreliable webmaster, a CMS-based solution is a perfect match.</p>
<p>Yet even for the very-small business, there are now &#8220;lite&#8221; versions of content management systems which only require PHP. They do not need a database at all. And these offer similar features to their more robust counterparts without the higher hosting requirements</p>
<p>The first step towards investing in an open-source CMS-driven site is the knowledge that the option exists. Hopefully this article provides some of it.</p>
<!--<rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="http://creativecommons.org/licenses/by-nc/3.0/" /></Work><License rdf:about="http://creativecommons.org/licenses/by-nc/3.0/"><requires rdf:resource="http://creativecommons.org/ns#Attribution" /><permits rdf:resource="http://creativecommons.org/ns#Reproduction" /><permits rdf:resource="http://creativecommons.org/ns#Distribution" /><permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /><prohibits rdf:resource="http://creativecommons.org/ns#CommercialUse" /><requires rdf:resource="http://creativecommons.org/ns#Notice" /></License></rdf:RDF>-->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.siliconchisel.com/articles/investing-in-open-source-part-1-small-business/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
