<?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>Code Simplicity</title>
	<atom:link href="http://www.codesimplicity.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codesimplicity.com</link>
	<description></description>
	<lastBuildDate>Sun, 13 May 2012 05:38:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Software as Knowledge</title>
		<link>http://www.codesimplicity.com/post/software-as-knowledge/</link>
		<comments>http://www.codesimplicity.com/post/software-as-knowledge/#comments</comments>
		<pubDate>Thu, 10 May 2012 19:00:15 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=1071</guid>
		<description><![CDATA[I don&#8217;t often dive deep into the philosophical underpinnings of Code Simplicity, but I&#8217;ve been realizing more and more that there are a few philosophical principles behind the writings that would be valuable to share. Also, some of these philosophies haven&#8217;t been fully formed until I sat with the work for a long time, applied &#8230; <a href="http://www.codesimplicity.com/post/software-as-knowledge/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t often dive deep into the philosophical underpinnings of <em>Code Simplicity</em>, but I&#8217;ve been realizing more and more that there are a few philosophical principles behind the writings that would be valuable to share. Also, some of these philosophies haven&#8217;t been fully formed until I sat with the work for a long time, applied it in a lot of situations, and talked about it with many people. This one&#8211;a theory that I have developed over time about how software can be thought of and worked with in the mind&#8211;has sort of been percolating with me for quite a while now. It&#8217;s time to get at least least part of it out on &#8220;paper,&#8221; in a blog post. So here you go:</p>
<p>Software is, fundamentally, a solid object that is made of knowledge. It follows all the rules and laws of knowledge. It behaves exactly as knowledge behaves in just about any given situation, except that it&#8217;s in concrete form. For example, when software is complex it tends to be mis-used. When software is wrong (i.e., has a bug), it tends to cause harm or problems. When people don&#8217;t understand some code, they tend to alter it incorrectly. One could say these things of knowledge just as one could say them of software. Bad data causes people to misbehave; bad code causes computers to misbehave. I&#8217;m not saying that computers and people can be compared&#8211;I&#8217;m saying that software and knowledge can be.</p>
<p>One wishes to have knowledge in a sensible and logical form. Similarly, <span id="more-1071"></span> one should also desire to have software&#8211;particularly the code&#8211;in a sensible and logical form. Because code <em>is</em> knowledge, it should translate to knowledge in one&#8217;s mind almost immediately upon viewing it. If it doesn&#8217;t, then some part of it is too complex&#8211;perhaps the underlying programming language or systems, but more likely the structure of the code as created by its designer.</p>
<p>When we desire knowledge, there are numerous ways to acquire it. One could read about it, think about it, perform observations, do experiments, talk about it, etc. In general, we could divide these methods into acquiring the data for ourselves (via observation, experiment, thought, etc.) or getting data from somebody else (reading, talking, etc.). </p>
<p>There are some situations in which we <em>must</em> get data for ourselves, particularly when it applies to us in some unique way that we couldn&#8217;t rely on others to work out correctly. As an extreme example, walking on my own legs likely took tremendous amounts of personal experimentation when my body was much smaller. I probably had some assistance, but that knowledge <em>had</em> to be developed by me.</p>
<p>There are far more situations, however, in which we must rely on secondhand data. If one wants to do a good job at living, there&#8217;s a lot to know&#8211;one simply could not acquire so much information on their own. This is where the help of others comes in: the data they know, the lessons they&#8217;ve learned and can teach us.</p>
<p>It seems likely that these same principles describe when one should write code themselves or use existing code. You pretty much <em>couldn&#8217;t</em> write all the code yourself down to the hardware level and come up with some of the most useful software we have today. For sure, there are some things that only we are uniquely qualified to write&#8211;usually the specific logic of the product that we&#8217;re working on. But there are many more things that we must rely on existing code for, just like we must rely on existing secondhand knowledge to survive as individuals.</p>
<p>It&#8217;s also possible we could use this principle somewhat for deciding how to divide up work between developers. Would it be faster for somebody to create a piece of code out of their firsthand knowledge, or would it be faster for a group of people to look at the existing system (secondhand knowledge) and start to contribute their own parts (which will, in time, essentially become their firsthand knowledge)? The answer depends on the situation, obviously, and though the basic idea here may not be too novel (some programmers already know the system better than others and so they&#8217;re faster) the way we <em>came</em> to the idea is what matters. We first theorize that software is knowledge, and then suddenly we can see a clear logical line down to some existing principle that is already known to be generally true. Pretty handy, and indicates we could likely derive other, more useful information from this principle.</p>
<p>Of course, this is not, by itself, a science or a scientific system. It&#8217;s just an idea, one that seems to work well for deriving principles about development. I would say it is one of the broadest philosophical theories that I&#8217;ve been able to develop about software, in fact. It seems to cover all aspects and explain all behaviors. I could actually sit here and theorize about this idea all day, but I&#8217;m not here to ramble, just to give a brief summary and then see what you have to say about it.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/software-as-knowledge/#comments">Comments: 1</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/software-as-knowledge/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Code Simplicity: The Science of Software Development</title>
		<link>http://www.codesimplicity.com/post/code-simplicity-the-science-of-software-development/</link>
		<comments>http://www.codesimplicity.com/post/code-simplicity-the-science-of-software-development/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 21:05:51 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=1089</guid>
		<description><![CDATA[What if every software developer could gain the knowledge of long experience without having to go through the pain of repeated failure? What if, instead of being a continuous chaos of complexity and argument, the process of software development could be a sane, orderly progression that was well-understood by every single programmer involved? What if &#8230; <a href="http://www.codesimplicity.com/post/code-simplicity-the-science-of-software-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="/book/"><img id="bookcover" src="http://akamaicovers.oreilly.com/images/0636920022251/cat.gif" /></a> What if every software developer could gain the knowledge of long experience without having to go through the pain of repeated failure? What if, instead of being a continuous chaos of complexity and argument, the process of software development could be a sane, orderly progression that was well-understood by every single programmer involved? What if all programmers and their managers shared a common ground for discussing software development decisions&#8211;a common ground that was based on <em>facts</em> instead of opinion or authority, and that was actually helpful in deciding what to do on a day-to-day basis with your software project?</p>
<p>What if software development was a <em>science</em>&#8211;one with laws, rules, facts, and definitions that told you with certainty which directions to take and which directions to avoid? Not a dogmatic system which restricted you only to some particular methodology, but a series of principles that freed you to think for yourself and make the right decisions for <em>your</em> situation?</p>
<p>What if then, all of this was in a book, that book was only 90 pages long, and it was understandable by every single person working in the software industry, programmer or not? Would it make the world a different place? Find out for yourself: <span id="more-1089"></span></p>
<p><em><a href="http://shop.oreilly.com/product/0636920022251.do">Code Simplicity: The Science of Software Development</a></em>.</p>
<p>I&#8217;ve spent the last several years developing, testing, and refining a series of scientific laws for software development. Some of what I&#8217;ve been doing, you&#8217;ve seen in this blog, but the book isn&#8217;t just a regurgitation of these articles here. It&#8217;s a complete, organized treatise on this new science&#8211;a series of principles that I hope will not just change your software, but also bring sanity, order, and happiness to your life as a software developer. Then, once your team reads it, it will bring understanding and insight to your group&#8217;s direction and discussions. And finally, when every software developer has read it, it will change the world of software development.</p>
<p>But it all starts here, with you. Help me change the world. All you have to do is read a book, and then if you think you got something out of it, tell other people about it, so maybe they will read it too.</p>
<ul>
<li><a href="http://shop.oreilly.com/product/0636920022251.do">Direct from O&#8217;Reilly</a>, available in print and for all e-readers, on sale for 50% off until April 4.</li>
<li><a href="http://www.amazon.com/Code-Simplicity-Software-Development-ebook/dp/B007NZU848">In the Kindle Store</a></li>
<li>And available in print at <a href="http://www.google.com/products/catalog?hl=en&#038;q=code+simplicity&#038;bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&#038;ion=1&#038;biw=1347&#038;bih=898&#038;um=1&#038;ie=UTF-8&#038;tbm=shop&#038;cid=16678302526764495909&#038;sa=X&#038;ei=ZXRzT_PWLM_TiAKL1_yLCw&#038;ved=0CGEQ8wIwAA">numerous other online bookstores</a>, as well.</li>
</ul>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/code-simplicity-the-science-of-software-development/#comments">Comments: 15</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/code-simplicity-the-science-of-software-development/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Clues to Complexity</title>
		<link>http://www.codesimplicity.com/post/clues-to-complexity/</link>
		<comments>http://www.codesimplicity.com/post/clues-to-complexity/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 19:00:52 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=1056</guid>
		<description><![CDATA[Here are some clues that tell you that your code may be too complex: You have to add &#8220;hacks&#8221; to make things keep working. Other developers keep asking you how some part of the code works. Other developers keep mis-using your code, and causing bugs. Reading a line of code takes longer than an instant &#8230; <a href="http://www.codesimplicity.com/post/clues-to-complexity/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are some clues that tell you that your code may be too complex: <span id="more-1056"></span></p>
<ul>
<li>You have to add &#8220;hacks&#8221; to make things keep working.</li>
<li>Other developers keep asking you how some part of the code works.</li>
<li>Other developers keep mis-using your code, and causing bugs.</li>
<li>Reading a line of code takes longer than an instant for an experienced developer.</li>
<li>You feel scared to modify this part of the code.</li>
<li>Management seriously considers hiring more than one developer to work on a single class or file.</li>
<li>It&#8217;s hard to figure out how to add a feature.</li>
<li>Developers often argue about how things should be implemented in this part of the code.</li>
<li>People make utterly nonsensical changes to this part of the code very often, which you catch only during code review, or only after the change has been checked in.</li>
</ul>
<p>That&#8217;s what I can come up with off the top of my head. What are some others?</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/clues-to-complexity/#comments">Comments: 13</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/clues-to-complexity/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Developer Hubris</title>
		<link>http://www.codesimplicity.com/post/developer-hubris/</link>
		<comments>http://www.codesimplicity.com/post/developer-hubris/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 19:00:03 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=1033</guid>
		<description><![CDATA[Your program is not important to me. I don&#8217;t care about its user interface. I don&#8217;t care what its name is. I don&#8217;t care that you made it, or what version it is. The only thing I care about is that your program helps me accomplish my purpose. That&#8217;s a truly remarkable feat, and if &#8230; <a href="http://www.codesimplicity.com/post/developer-hubris/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Your program is not important to me. I don&#8217;t care about its user interface. I don&#8217;t care what its name is. I don&#8217;t care that you made it, or what version it is.</p>
<p>The only thing I care about is that your program helps me accomplish my purpose. That&#8217;s a truly remarkable feat, and if your program does it, you should be proud. There&#8217;s no need to make your program take up more of my attention just because you think it&#8217;s important.</p>
<p>Now of course, your program important to you! When you work on code for a long time, it&#8217;s easy to become attached to it. It was <em>so</em> hard to write. Your cleverness is unbounded, shadowing lesser mortals in the mountain of your intellect. You have overcome some of the greatest mental obstacles man has ever faced. Truly, you must shout this from the tops of every tower, through the streets of every city, and even unto the caves of the Earth.</p>
<p>But don&#8217;t. Because your users <em>do not care</em>. Your fellow developers might be interested, but your users are <em>not</em>.</p>
<p>When you&#8217;re truly clever, what will show up for users is that program is awesome. It&#8217;s so awesome, the user hardly notices it&#8217;s there. That is true brilliance.</p>
<p>The worst offenders against this ideal are programs that pop up a window every time my computer starts. I know your software is there. I installed it. You really don&#8217;t need to remind me. If my purpose is to start up my computer so I can use it, how is your pop up window helping me accomplish that? It&#8217;s not, so get rid of it.</p>
<p>There are smaller ways to cause problems, too, that all revolve around asking for too much time or attention from the user:</p>
<ul>
<li>&#8220;Users will definitely be okay with clicking through three screens of forms before they can use my product.&#8221; </li>
<li>&#8220;I&#8217;m sure that users will want to learn all the icons I <em>invented</em> for this program, so taking away the text labels for those icons is fine!&#8221;</li>
<li>&#8220;I&#8217;m sure it&#8217;s okay to stop the user from working by popping up these dialog boxes.&#8221;</li>
<li>&#8220;Users will totally want to search through this huge page for a tiny little piece of text so they can click on it.&#8221;</li>
<li>&#8220;Why should we make this simpler? That would be a lot of work, and it&#8217;s already pretty easy&#8230;for me.&#8221;</li>
</ul>
<p>And so on.</p>
<p>The true humility required of a developer is the willingness to remove their identity from the user&#8217;s world. Stop telling the user the program is there. Don&#8217;t think that the user cares about your program, wants to spend time using its interface, or wants to learn about it. It&#8217;s not your program that they care about&#8211;it&#8217;s their <em>purpose</em>. Help them accomplish that perfectly, and you will have created the perfect program for them.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/developer-hubris/#comments">Comments: 9</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/developer-hubris/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Open Source Community, Simplified</title>
		<link>http://www.codesimplicity.com/post/open-source-community-simplified/</link>
		<comments>http://www.codesimplicity.com/post/open-source-community-simplified/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 19:00:01 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=572</guid>
		<description><![CDATA[Growing and maintaining an open-source community depends essentially on three things: Getting people interested in contributing Removing the barriers to entering the project and contributing Retaining contributors so that they keep contributing If you can get people interested, then have them actually contribute, and then have them stick around, you have a community. Otherwise, you &#8230; <a href="http://www.codesimplicity.com/post/open-source-community-simplified/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Growing and maintaining an open-source community depends essentially on three things:</p>
<ol>
<li>Getting people interested in contributing</li>
<li>Removing the barriers to entering the project and contributing</li>
<li>Retaining contributors so that they keep contributing</li>
</ol>
<p>If you can get people interested, then have them actually contribute, and then have them stick around, you have a community. Otherwise, you don&#8217;t.</p>
<p>If you are just starting a project or need to improve the community of an existing project, you should address these points in reverse order. If you get people interested in a project before you do the later two steps, then people won&#8217;t be able to enter and won&#8217;t stick around when they do enter. You won&#8217;t actually expand your community. So first, we want to be sure that we can retain both existing and new contributors. Once we&#8217;ve done that, then we want to remove the barriers to entry, so that interested people can actually start contributing. Only <em>then</em> do we start worrying about getting people interested. </p>
<p>So let&#8217;s talk about how you accomplish each step in reverse order: <span id="more-572"></span></p>
<h3>Retaining Contributors</h3>
<p>For the <a href="http://www.bugzilla.org/">Bugzilla Project</a>, this was our biggest challenge. Once somebody started contributing, what made them <em>keep</em> contributing? How did we keep people around?</p>
<p>Well, we had an interesting advantage in answering these questions, in that we are one of the older open-source projects in existence, having been around since late 1998. So we had a tremendous wealth of actual data to work with. We mined this data in two ways: First, we did a survey of all our past developers who had left the project, asking them why they had left. This was just a free-form survey, allowing people to answer any way they wanted. Then, we created a graph of the number of contributors over time, for the whole ten years of the project, and correlated the rise and fall of the graphs to various actions we took or didn&#8217;t take over time.</p>
<p>Once all this was done, I sent <a href="http://groups.google.com/group/mozilla.dev.apps.bugzilla/browse_thread/thread/520f5aa32917a517/bb7c1a42bcc400d9">an email</a> that out to the developers Bugzilla Project, describing the results of the research. You can read the whole email if you&#8217;d like, but I&#8217;ll summarize the findings here:</p>
<ul>
<li><strong>Don&#8217;t freeze the trunk for long periods.</strong>
<p>The Bugzilla Project has a fairly-standard system of having stable branches that receive little change (for example, the &#8220;3.4&#8243; branch where we commit bug fixes and do minor releases like 3.4.1, 3.4.2, etc.), and a main-line &#8220;trunk&#8221; repository where all new features go, and which eventually becomes our next <em>major</em> release.</p>
<p>In the past, before a major release, we would &#8220;freeze&#8221; the trunk. This meant that no new features could be developed for several weeks or months until we felt that trunk was stable enough to call a &#8220;release candidate.&#8221; Then we would create a new stable branch from the trunk and re-open the main-line trunk for features. However, while trunk was frozen, there was no feature development happening <em>anywhere</em> in the Bugzilla Project.</p>
<p>Graph analysis showed <em>very clearly</em> that every time we would freeze, the community would shrink drastically and it would take <em>several months</em> after we un-froze for the size of the community to recover. It happened uniformly, every single time we would freeze, over many years and many releases.</p>
<p>Traditional wisdom in open-source is that people like to work on features and don&#8217;t like to fix bugs. I wouldn&#8217;t say that that&#8217;s <em>exactly</em> true, but I would say that if you <em>only</em> let people fix bugs, then most of them won&#8217;t stay around.</p>
<p>We addressed this issue by never freezing the trunk. Instead, we branch immediately at the point that we normally would have &#8220;frozen&#8221; the trunk. The trunk <em>always</em> stays open for new feature development. Yes, this means that for a while, our attention becomes split between the trunk and the latest branch. We&#8217;re committing the same bug fixes to the branch and the trunk. We are also doing feature development on the trunk simultaneously with those bug fixes. However, we&#8217;ve found that not only does the community expand more rapidly this way, but we also actually get our releases out <em>more quickly</em> than we used to. So it&#8217;s a win-win situation.</p>
</li>
<li><strong>Turnover is inevitable.</strong>
<p>The survey found that the number one reason that contributors leave is that they no longer have time to contribute, or that they were contributing as part of their job and now they have changed jobs. Essentially, it is inevitable that most contributors eventually leave.</p>
<p>So if it community members are definitely going to be leaving, the only way to consistently expand the community is to figure out how to retain <strong>new</strong> contributors. If you don&#8217;t get new members to stick around, then the community will continuously shrink as old contributors leave, no matter what else you do.</p>
<p>So while retaining existing contributors is important&#8211;after all, you want people to stick around and contribute for as long as reasonably possible&#8211;what matters the most is retaining new contributors. How do you do that? Well, that&#8217;s a lot of what the rest of these points are about.</p>
</li>
<li><strong>Respond to contributions immediately.</strong>
<p>The Bugzilla Project has a system of code reviews that requires that all new contributions be reviewed by an experienced developer before they can become part of Bugzilla. There have been various complaints about the system over the years, but analyzing the survey data showed that people leave the project because getting a review takes <em>too long</em>, not because the reviews are too <em>hard</em>. In fact, the reviews can be as hard as you want as long as they happen almost <em>instantly</em> after somebody submits a contribution.</p>
<p>People don&#8217;t (usually) mind having to revise a contribution. They even generally don&#8217;t mind revising it several times. But they <em>do</em> mind if they post a patch, don&#8217;t get a review for three months, and <em>then</em> they have to revise it, only to wait another three months to be told that they have to revise it again. It&#8217;s the delay that matters, not the level of quality control.</p>
<p>There are other ways of responding rapidly to contributions, too. For example, immediately thanking somebody for posting a patch can go a long way toward retaining new contributors and &#8220;converting&#8221; them into long-term developers.</p>
</li>
<li><strong>Be extremely kind and visibly appreciative.</strong>
<p>For nearly every person who responded to our survey, the factors involved in not staying&#8211;beyond &#8220;my job changed&#8221; or &#8220;I didn&#8217;t have time&#8221;&#8211;were surprisingly personal. I know that we all work with computers, and perhaps we&#8217;d like to think that engineering should be a totally cold scientific profession where we all do our jobs correctly according to the requirements of the machine, and not worry about our emotional or personal involvements. However, nothing could be further from the truth&#8211;the personal interactions that people have with community members, the amount they feel appreciated, and the amount they feel assaulted, are actually the <strong>most important aspects of retaining community members</strong>.</p>
<p>When people contribute on a volunteer basis, they aren&#8217;t getting paid in money, they are getting paid in admiration, appreciation, the sense of a job well done, and the knowledge that they are helping create a product that affects millions of people. When somebody has contributed a patch, <strong>you need to thank them</strong>. It doesn&#8217;t matter if the patch is total crap and has to be re-written entirely, <strong>you need to thank them</strong>. They have put some work into this, and if you don&#8217;t appreciate that, <strong>they will leave before they even start</strong>. After all, most people get little enough appreciation at their workplace&#8211;they stay there because they get paid in money! They don&#8217;t need to work <em>for free</em> with some other organization if it also doesn&#8217;t appreciate their work, or even worse, assaults every aspect of their contribution before even thanking them for it.</p>
<p>Of course, you still need to correct people on the faults in their contributions. &#8220;Kindness&#8221; does not include putting bad code into your system. That isn&#8217;t kind to anybody, including the contributor whose skills probably need to improve, and who may go on believing that something they did in error was in fact correct. You have to still be careful reviewers and very good coders.</p>
<p>What this <em>does</em> mean is that in addition to telling people what&#8217;s <em>wrong</em> with their contribution, it&#8217;s important to appreciate what&#8217;s <em>right</em> about their contribution, even if it&#8217;s simply the fact that they took the time to contribute. And you have to <strong>actually tell the contributor that you appreciate the  contribution</strong>. The more frequently and genuinely that you do this, the more likely you are to retain the contributor.</p>
</li>
<li><strong>Encourage a total absence of personal negativity.</strong>
<p>One thing that drives people away from a project with lightning speed is when they get personally attacked for attempting to do something positive. A &#8220;personal attack&#8221; can be as little as an unpleasant joke about their code, instead of just a straightforward technical description of what is wrong. Saying something like, &#8220;What is wrong with you?&#8221; instead of actually leaving some helpful comment. Disguising personal criticism as &#8220;an attempt to help them code better&#8221; or &#8220;help them get along with others.&#8221; No matter how well-justified these actions may seem to be, they are all personal attacks that are extremely dangerous to your community.</p>
<p>Now truthfully, coding and working on a collaborative project with people who have different viewpoints can get really frustrating sometimes, and I&#8217;ve been an offender in this area just as much as anybody has been. But we all have to learn that it&#8217;s not okay to insult other developers as people just because we&#8217;re personally frustrated with them.</p>
<p>The solution isn&#8217;t just to say &#8220;everybody, now bottle up your frustrations until you explode,&#8221; though. There are lots of practical solutions. One of the best is to set up some specific system for handling problematic contributors. If there&#8217;s some contributor that Bob just can&#8217;t live with, there needs to be somebody in the community who Bob can go to to help work things out. We&#8217;ll call this go-to person the &#8220;community moderator.&#8221; So Bob tells the moderator about the problem, and maybe the moderator sees that other contributor really was being a terrible person or bad coder, and so this &#8220;community moderator&#8221; gently corrects that contributor. But it&#8217;s also possible that there was some communication problem between Bob and the other contributor that the moderator just needs to help resolve.</p>
<p>This &#8220;moderator&#8221; system isn&#8217;t the only way to deal with the problem. You can resolve the problem in numerous ways&#8211;the most important thing is that you <em>do</em> resolve it. Without some channel or method for dealing with personal frustrations, individual contributors will take these frustrations out on each other. You will in fact foster an environment where it&#8217;s <em>okay</em> for one contributor to personally attack another contributor, because that&#8217;s the only avenue they have to resolve their problems, and nobody&#8217;s stopping them.</p>
</ul>
<p>Basically, those last two points can be summed up as: <strong>be really, abnormally, really, really kind, and don&#8217;t be mean</strong>.</p>
<p>We&#8217;ve been applying all of these principles in the Bugzilla Project for the past several months, and we saw an increase in the number of retained contributors almost immediately after we started applying them. I&#8217;m finally starting to feel like the community is <em>growing</em> again, after shrinking almost continuously since 2005 due to violations of all of the above points.</p>
<h3>Removing the Barriers</h3>
<p>The next step is to remove the <em>barriers to entry</em>. What prevents people from getting started on the project?</p>
<p>Usually, the biggest barrier is a lack of documentation and direction. When people already <em>want</em> to contribute, their next step is figuring out <em>how</em> to contribute. They will go to your project&#8217;s website and look around. They will wonder, &#8220;Who do I talk to about this? How do I start contributing? What do you guys want me to work on?&#8221;</p>
<p>For the Bugzilla Project, we solved this problem in several ways:</p>
<ol>
<li><strong>A list of easy starting projects.</strong>
<p>Whenever we see a bug or feature request that looks like it would be easy for a newcomer to solve, we tag it as a &#8220;good intro bug&#8221; in our bug tracker. This gives us a <a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=prod:Bugzilla+whiteboard:%22[Good+Intro+Bug]%22">list of good introductory projects</a> that anybody can come and look at without having to ask us &#8220;where do I get started?&#8221;</p>
</li>
<li><strong>Create and document communication channels.</strong>
<p>People will almost immediately want to <em>talk</em> to somebody else about the project. You should have email lists and also some method of instantaneous communication like an IRC channel. For example, we have an email list for Bugzilla developers and also an <a href="http://landfill.bugzilla.org/irc/">IRC channel</a> where almost all our contributors hang out. In fact, we don&#8217;t just have a normal IRC channel&#8211;we also have a web page that people can use to chat in that IRC channel. That way, people don&#8217;t have to install an IRC client just to come talk to us. Setting up that web page enormously increased the number of new people coming into the channel and communicating with us. (And the increase was entirely positive&#8211;I can&#8217;t think of a single person who used the web gateway to cause us trouble.)</p>
<p>Then once you have these channels, they need to be documented! People have to know how to get into them, they need to know that they exist. We have a <a href="http://wiki.mozilla.org/Bugzilla:Communicate">wiki page</a> that explains how to talk to us if you want to contribute. (Note that this is separate from our <a href="http://www.bugzilla.org/support/">support</a> page that describes how to get <em>support</em> for the project.)</p>
<p>Also, as a final but perhaps obvious point, the existing community has to <em>use</em> the communication channels. If the main contributors do all their work in an office and just talk to the people next to then and you don&#8217;t use the mailing lists or IRC channels, then the community members aren&#8217;t going to want to use those communication systems either. After all, the new contributors aren&#8217;t there to talk to each other&#8211;they&#8217;re there to talk to <em>you</em>!</p>
</li>
<li><strong>Excellent, complete, and simple documentation describing exactly how a contribution should be done.</strong>
<p>Fully document every step of your development process, and put that documentation onto a public web site. Don&#8217;t invent a new process, just document out what the existing actual process is. How do people get the code? How can they submit patches or other contributions to you? How do those contributions become an official part of the system?</p>
<p>We have a <a href="http://wiki.mozilla.org/Bugzilla:Developers">very simple page</a> that describes the basic steps of our whole process, and links to documents that describe each step in more detail. It also specifically encourages people to get into communication with us, so that we know that they are there and want to help.</p>
</li>
<li><strong>Make all this documentation easy to find.</strong>
<p>This is a simple final step, but sometimes projects forget it! You can have all the wonderful developer documentation in the world, but if new contributors can&#8217;t find it <em>super-easily</em>, then you&#8217;re not actually removing any barriers to entry! We have a big &#8220;Contribute!&#8221; button on <a href="http://www.bugzilla.org/">our website</a> that describes all the different ways that people can contribute (not just code!) and links to more information about each of those.</p>
</ol>
<p>We saw a definite upswing in the number and quality of contributions once we completed all these steps. Also, having everything documented and clearly stated on a public website meant that we no longer had to personally explain it all, every time, to every new contributor.</p>
<p>Direction and documentation aren&#8217;t the <em>only</em> things you can do though. Ask yourself, &#8220;What is stopping people from contributing?&#8221; and remove all the barriers there that you reasonably can.</p>
<h3>Getting People Interested</h3>
<p>How do you make people think, &#8220;Gee, I want to contribute to this project?&#8221; That&#8217;s the first step they have to take before they can become become contributors. Well, traditional wisdom states that people contribute to open-source projects because:</p>
<ul>
<li>They like helping.</li>
<li>They enjoy being part of a community.</li>
<li>They want to give back.</li>
<li>They think that something is wrong and they need/want to fix it.</li>
</ul>
<p>So you may want to make it apparent that help is needed, that an enjoyable community is there, that giving back is appropriate and appreciated, and that there are problems that need solving.</p>
<p>Now, to be fair, this is an area that I don&#8217;t have fully mapped out or figured out for the Bugzilla Project, yet. So I don&#8217;t have a lot of personal experience to draw on. But if we analyze other projects, we can see that some good ways of getting contributors are:</p>
<ul>
<li><strong>Be a super-popular product.</strong>
<p>This may seem obvious, but it is indeed the primary way of getting new contributors. If a zillion people use your product, it&#8217;s statistically likely that many of them will want to contribute. The Linux Kernel and <a href="http://wordpress.org/">WordPress</a> are good examples of this&#8211;they have millions of users, so there&#8217;s just bound to be a lot of contributors, provided that the &#8220;barriers to entry&#8221; and the &#8220;retaining contributors&#8221; aspects of the project have also been handled.</p>
<p>One way to <em>become</em> a super-popular product&#8211;even if you&#8217;re just starting out&#8211;is to be <em>heavily needed</em>. The Linux Kernel was very much needed when it was first written, which is probably one of the reasons that it became popular as quickly as it did. It desperately needed to exist and didn&#8217;t exist yet.</p>
</li>
<li><strong>Be written in a popular programming language.</strong>
<p>Generally, people are more likely to contribute to a project if it&#8217;s written in a language that they already know.  WordPress has a <em>huge</em> contributor community, and it&#8217;s in PHP. Say what you will about PHP, it is extremely popular. There&#8217;s a large number of people who already know the language, which increases the likelihood that some of them will start supplying patches for your code.</p>
<p>This not the only reason you should choose a particular programming language, but it&#8217;s certainly a major motivator if you&#8217;re going to have an open-source project. I may think that <a href="http://en.wikipedia.org/wiki/Eiffel_(programming_language)">Eiffel</a> is a remarkable language, but if I wrote an open-source project in it, I would have a <em>very</em> hard time getting contributors.</p>
</li>
</ul>
<p>Beyond those points, there are lots of clever ways of getting people interested in contributing to your projects, including speaking at conferences, publishing blogs, encouraging people on a one-to-one basis, and other methods that basically add up to &#8220;contact and encourage.&#8221;</p>
<p>I&#8217;d love to hear some of your ideas in this area, though. How do you get new people interested in contributing to your project? Has anything been particularly successful?</p>
<h3>Summary</h3>
<p>An open-source community is somewhat of a fluid thing&#8211;there are always going to be people coming and going for one reason or another. What&#8217;s important is that the rate of people entering and staying is <em>greater</em> than the rate of people leaving. All of these points help assure that, and hopefully they also make our communities productive and enjoyable places to be for everybody, even ourselves!</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/open-source-community-simplified/#comments">Comments: 39</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/open-source-community-simplified/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Readability and Naming Things</title>
		<link>http://www.codesimplicity.com/post/readability-and-naming-things/</link>
		<comments>http://www.codesimplicity.com/post/readability-and-naming-things/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 19:00:38 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=797</guid>
		<description><![CDATA[Many people think that the readability of code has to do with the letters and symbols used. They believe it is the adding, removing, or changing of those symbols that makes code more readable. In some sense, they&#8217;re right. However, the underlying principle is: Readability of code depends primarily on how space is occupied by &#8230; <a href="http://www.codesimplicity.com/post/readability-and-naming-things/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Many people think that the readability of code has to do with the letters and symbols used. They believe it is the adding, removing, or changing of those symbols that makes code more readable. In some sense, they&#8217;re right. However, the underlying principle is:</p>
<blockquote><p>
  <strong>Readability of code depends primarily on how <em>space</em> is occupied by letters and symbols.</strong>
</p></blockquote>
<p>What does that mean? Well, it means two things: <span id="more-797"></span></p>
<h3>Code should have the proper amount of white space around it. Not too much, not too little.</h3>
<p>There should be the proper amount of space within a line of code to separate out the different parts. Separate actions should generally be on separate lines. Indentation should be used appropriately to group blocks of code.</p>
<p>With this principle, it&#8217;s actually the <em>absence of code</em> that makes things readable. This is a general principle of life&#8211;for example, if there was no space <em>at all</em> between letters and words in a book, it would be hard to read. On the other hand, it&#8217;s easy to see the moon against the clear night, because there&#8217;s a lot of clear black space that <em>isn&#8217;t</em> the moon. Similarly, when your code has the right amount of space in it, you can tell where and what the code is easily.</p>
<p>For example, this code is hard to read:</p>
<pre>x=1+2;y=3+4;z=x+y;print"hello world";print"z is"+z;if(z>y+x){print"error";}</pre>
<p>Whereas with the proper spacing in, around, and between the lines, it becomes easy to read:</p>
<pre>x = 1 + 2;
y = 3 + 4;
z = x + y;
print "hello world";
print "z is" + z;
if (z > y + x) {
    print "error";
}</pre>
<p>There can also be <em>too much</em> or <em>wrong</em> space, however. This code is also hard to read:</p>
<pre>    x            =          1+        2;
y = 3            +4;

  z = x    +      y;
print    "hello world"         ;
 print "z is " + z;
if (z  >     y+x)
 {        print "error" ;
        }</pre>
<h3>Code itself should take up space in proportion to how much meaning it has.</h3>
<p>Basically, tiny symbols that mean a <em>lot</em> make code hard to read. Very long names that don&#8217;t mean much also make code hard to read. The <em>amount</em> of meaning and the space taken up should be closely related to each other.</p>
<p>For example, this code is unreadable because the names are too small:</p>
<pre>q = s(j, f, m);
p(q);</pre>
<p>The space those names take up is very little compared to how much meaning they have. However, with appropriately-sized names, it becomes more apparent what that block of code is doing:</p>
<pre>quarterly_total = sum(january, february, march);
print(quarterly_total);</pre>
<p>On the other hand, if the names are too long compared to how much meaning they represent, then the code becomes hard to read again:</p>
<pre>quarterly_total_for_company_x_in_2011_as_of_today = add_all_of_these_together_and_return_the_result(january_total_amount, february_total_amount, march_total_amount);
send_to_screen_and_dont_wait_for_user_to_respond(quarterly_total_for_company_x_in_2011_as_of_today);</pre>
<p>This principle applies just as well to entire blocks of code as it does to individual names. We could replace the entire block of code above with a single function call:</p>
<pre>print_quarterly_total();</pre>
<p>And that is even more readable than any of the previous examples. Even though the name we used&#8211;<code>print_quarterly_total</code>&#8211;is a bit longer than our other names for things, that&#8217;s okay because it represents <em>more</em> meaning than other pieces of code do. In fact, it&#8217;s even <em>more</em> readable than our block of code was, by itself. Why is that? Because the code block took up a lot of space for, effectively, very little meaning, and the function takes up a more reasonable amount of space for the same meaning.</p>
<p>If a block of code takes up a lot of space but doesn&#8217;t actually have much meaning, then it&#8217;s a good candidate for refactoring. For example, here&#8217;s a block of code that handles some user input:</p>
<pre>x_pressed = false;
y_pressed = false;
if (input == "x") {
    print "You pressed x!";
    x_pressed = true;
}
else if (input == "y") {
    if (not y_pressed) {
        print "You pressed y for the first time!";
        y_pressed = true;
        if (x_pressed) {
            print "You pressed x and then y!";
        }
    }
}</pre>
<p>If that were our whole program, that would probably be readable enough. However, if this is within a lot of other code, we could make it more readable like this:</p>
<pre>x_pressed = false;
y_pressed = false;
if (input == "x") {
    handle_x(x_pressed);
}
else if (input == "y") {
    handle_y(x_pressed, y_pressed);
}</pre>
<p>And we could make it even more readable by reducing it to this:</p>
<pre>handle_input(input);</pre>
<p>Reading &#8220;handle_input&#8221; in the middle of our code is much easier than trying to read that whole first block, above, because &#8220;handle_input&#8221; is taking up the right amount of space, and the block is taking up too much space. Note, however, if we&#8217;d done something like <code>h(input)</code> instead, that would be confusing and unreadable because &#8220;h&#8221; is too short to properly tell us what the code is doing. Also, <code>handle_this_input_and_figure_out_if_it_is_x_or_y_and_then_do_the_right_thing(input)</code> would not only be annoying for a programmer to type, but would also make for unreadable code.</p>
<h3>Naming Things</h3>
<p>It was once said by a famous programmer that naming things was one of the hardest problems in computer science. These principles of readability give us some good clues on how to name things, though. Basically, the name of a variable, function, etc. should be long enough to fully communicate what it is or does, without being so long that it becomes hard to read.</p>
<p>It&#8217;s also important to think about how the function or variable is going to be used. Once we start putting it into lines of code, will it make those lines of code <em>too long</em> for how much meaning they actually have? For example, if you have a function that is only called once, on one line all by itself, with no other code in that line, then it can have a fairly long name. However, a function that you&#8217;re going to use frequently in complex expressions should probably have a name that is short (though still long enough to fully communicate what it does).</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/readability-and-naming-things/#comments">Comments: 27</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/readability-and-naming-things/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>The Power Of No</title>
		<link>http://www.codesimplicity.com/post/the-power-of-no/</link>
		<comments>http://www.codesimplicity.com/post/the-power-of-no/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 19:00:29 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=616</guid>
		<description><![CDATA[How many times have you used a piece of software that was full of incredibly convoluted features, strange decisions, and unusable interfaces? Have you ever wanted to physically or verbally abuse a computer because it just wouldn&#8217;t do things right, or you couldn&#8217;t figure out how to make it function properly? And how often have &#8230; <a href="http://www.codesimplicity.com/post/the-power-of-no/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>How many times have you used a piece of software that was full of incredibly convoluted features, strange decisions, and unusable interfaces? Have you ever wanted to physically or verbally abuse a computer because it just wouldn&#8217;t do things right, or you couldn&#8217;t figure out how to make it function properly? And how often have you thought, &#8220;How could any programmer think this was a sane idea?&#8221;</p>
<p>Well if you&#8217;ve ever experienced any of those things, your next thought might have been something like &#8220;**** this computer&#8221; or &#8220;**** the silly programmer who made it behave this way&#8221;. After all, aren&#8217;t programmers and hardware designers to blame for the crazy behavior of the system? Well, yes, to some extent they are. But after being intimately involved in software design for many years, I now have another reaction to poorly-implemented features. Instead of becoming angry with the programmer who implemented the system, I ask myself, &#8220;Who was the software designer who <em>authorized</em> this feature?&#8221; Who stood by silently and let this feature happen when they had the power to stop it?</p>
<p>Granted, sometimes there is no software designer at all, in which case you&#8217;re practically guaranteed to have a broken system. But when there is a software designer, they are ultimately responsible for how the system is put together. Now, quite a bit of this job involves designing the structure of features before they go into the system. But there&#8217;s also another part of the job of a software designer&#8211;preventing bad ideas from being implemented. In fact, if there&#8217;s any lesson I&#8217;ve learned from my years in the software industry, it&#8217;s this:</p>
<blockquote><p>
  <strong>The most important word in a software designer&#8217;s vocabulary is &#8220;no&#8221;.</strong>
</p></blockquote>
<p><span id="more-616"></span><br />
The problem is that if you give a group of humans total freedom to implement any random idea that comes into their mind, then nearly every time they will implement bad ideas. This isn&#8217;t a criticism of developers, it&#8217;s more of a fact of life. I have great faith in the intelligence and capability of individual developers. I admire developers&#8217; struggles and achievements in software development. It&#8217;s just an unfortunate fact of existence that without some central guidance, people in a group tend to evolve complex systems that don&#8217;t help their users as well as they could.</p>
<p>An individual designer, however, is usually capable of creating a consistent and enjoyable experience for the users and developers both. But if that individual designer never steps up and say &#8220;no&#8221; when another developer starts to do something the wrong way, then the system will collapse on itself and become a chaotic mess of bad ideas. So it is very important to have a software designer who has the power to say &#8220;no&#8221;, and then it&#8217;s important for that designer to actually <em>use</em> that power whenever it is appropriate. </p>
<p>It is truly amazing how much you can improve your product just by saying &#8220;no&#8221; to any idea that really deserves a &#8220;no&#8221;.</p>
<h3>Recognizing Bad Ideas</h3>
<p>Before you can apply this principle, there is one thing that you have to know: how to recognize bad ideas. Thankfully, there are a lot of software design principles that help clue you in on what is a bad idea, and lead you to saying &#8220;no&#8221; when it&#8217;s truly needed. For example:</p>
<ul>
<li>If the implementation of the feature violates the laws of software design (for example, it&#8217;s too complex, it can&#8217;t be maintained, it won&#8217;t be easily changeable, etc.) then that implementation is a bad idea.</li>
<li>If the feature doesn&#8217;t <a href="/post/the-purpose-of-software/">help the users</a>, it&#8217;s a bad idea.</li>
<li>If the proposal is <em>obviously stupid</em>, it&#8217;s a bad idea.</li>
<li>If  some change doesn&#8217;t fix a <a href="/post/if-it-aint-broken/">proven problem</a>, it&#8217;s a bad idea.</li>
<li>If you <a href="/post/features-simplicity-and-the-purpose-of-software/">aren&#8217;t certain that it&#8217;s a good idea</a>, it&#8217;s a bad idea.</li>
</ul>
<p>Also, one tends to learn over time what is and isn&#8217;t a good idea, particularly if you use the above as guidelines and understand the laws of software design.</p>
<h3>Having No Better Idea</h3>
<p>Now, sometimes a designer <em>can</em> recognize a bad idea, but they still implement it because they can&#8217;t think of a better idea right now. This is a mistake. If you can think up only one solution to a problem but it is obviously stupid, then you <em>still need to say no to it.</em></p>
<p>At first this may seem counter-intuitive&#8211;don&#8217;t problems need to be solved? Shouldn&#8217;t we solve this problem in any way we can?</p>
<p>Well, here&#8217;s the problem: if you implement a &#8220;bad idea&#8221;, your &#8220;solution&#8221; will rapidly become a worse disaster than the original problem ever was. When you implement something terrible, it &#8220;works&#8221;, but the users complain, the other programmers all sigh, the system is broken, and the popularity of your software starts to decrease. Eventually, the &#8220;solution&#8221; becomes such a problem that it requires <em>other</em> bad &#8220;solutions&#8221; to &#8220;fix&#8221; it. These &#8220;fixes&#8221; then become enormous problems in themselves. Continue down this path, and eventually you end up with a system that is bloated, confused, and difficult to maintain, just like many existing software systems today.</p>
<p>If you often find yourself in a situation where you feel forced to accept bad ideas, it&#8217;s likely that you&#8217;re actually near the <em>end</em> of this chain of events&#8211;that is, you&#8217;re actually building on a series of <em>pre-existing</em> bad ideas from the system&#8217;s past. In that case, the solution is <em>not</em> to keep &#8220;patching&#8221; over the bad ideas, but to instead find the most fundamental, underlying bad ideas of the system and redesign them to be good, over time.</p>
<p>Now <em>ideally</em>, when you reject a bad idea, you should provide an alternate, good idea in its place&#8211;that way you&#8217;re being constructive and moving the project forward, instead of being viewed as a roadblock on the path of development. But even if you <em>can&#8217;t</em> come up with a better idea right now, it&#8217;s still important to say no to bad ideas. A good idea <em>will come</em> eventually. Maybe it will take some study, or perhaps it will suddenly come to you while you&#8217;re standing in the shower one day. I have no idea where the idea will come from or what it will be. But don&#8217;t worry too much about it. Just trust that there is <em>always</em> some good way to solve every problem, and keep looking for it until you find it. Don&#8217;t give up and accept bad ideas.</p>
<h3>Clarifications: Acceptance and Politeness</h3>
<p>So it&#8217;s important to say &#8220;no&#8221;, but there are a few clarifications required on what I really mean, there. I&#8217;m not saying that every suggestion is wrong. In fact, developers are usually very bright people, and sometimes they really do nail it. Many developers make perfect suggestions and do excellent implementations. And even the worst solutions can have good parts, despite not being excellent as a whole. So many times, instead of actually saying &#8220;no&#8221;, what you&#8217;ll be saying is something more like, &#8220;Wow, there&#8217;s a part of this idea that <em>is</em> really good, but the rest of it is not so great. We should take the best parts of this idea and build them up into something awesome by doing more work on them.&#8221; You <em>do</em> have say no to the parts of an idea that are bad, though. Just because one part of the idea is good doesn&#8217;t mean that the whole idea is good. Take what&#8217;s intelligent about the idea, refine it, and build good ideas around it until the solution you&#8217;ve designed really is great.</p>
<p>Also, it is still critically important that you communicate <em>well</em> with the rest of your team&#8211;having the responsibility of saying &#8220;no&#8221; doesn&#8217;t give you the right to be rude or inconsiderate. If you continuously say &#8220;no&#8221; without any hint of kindness, you are going to fracture your team, cause upsets, and ultimately end up wasting hours of your time in argument with the people you&#8217;ve upset. So when you have to say &#8220;no&#8221;, it&#8217;s best to find a polite way to communicate it&#8211;a way that expresses appreciation for the input, positive suggestions of how to improve things, and lets the person down easily. I understand how frustrating it can be to have to slow down and explain things&#8211;and even <em>more</em> frustrating to repeat the explanation over and over to somebody who doesn&#8217;t get it the first time&#8211;but if that&#8217;s what it takes to have an effective development team while still saying &#8220;no&#8221; to bad features, then that&#8217;s what you have to do.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/the-power-of-no/#comments">Comments: 3</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-power-of-no/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Before You Begin&#8230;.</title>
		<link>http://www.codesimplicity.com/post/before-you-begin/</link>
		<comments>http://www.codesimplicity.com/post/before-you-begin/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 19:00:55 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=260</guid>
		<description><![CDATA[One of the major goals that I have with researching software design is the hope that we can take people who are &#8220;bad programmers&#8221; or mediocre programmers and, with some simple education and only a little experience, bring them into being good programmers or great programmers. I want to know&#8211;what are the fundamental things you &#8230; <a href="http://www.codesimplicity.com/post/before-you-begin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the major goals that I have with researching software design is the hope that we can take people who are &#8220;bad programmers&#8221; or mediocre programmers and, with some simple education and only a little experience, bring them into being good programmers or great programmers. I want to know&#8211;what are the fundamental things you have to teach somebody to make them into a great programmer? What if somebody&#8217;s been programming for years and hasn&#8217;t gotten any better&#8211;how can you help them? What are they missing? So I&#8217;ve written quite a bit about that, particularly in some of my <a href="/post/why-programmers-suck">recent articles</a>.</p>
<p>However, before somebody can even <em>start</em> on the path of becoming a better software developer, one thing has to be true:</p>
<blockquote><p>
In order to become an excellent programmer, you must first <em>want</em> to become an excellent programmer. No amount of training will turn somebody who does not <em>want</em> to be excellent into an excellent programmer.
</p></blockquote>
<p>If you are a person who is passionate about software development&#8211;or even just somebody who likes being good at their job&#8211;it may be hard to understand the viewpoint of somebody who simply doesn&#8217;t want to get any better. <span id="more-260"></span> To fully grasp it, it can be helpful to imagine yourself trying to learn about some area that you personally have no desire to be great in.</p>
<p>For example, although I admire athletes, enjoy playing soccer, and sometimes enjoy watching sports in general, I&#8217;ve never had a desire to be a great athlete. There&#8217;s no amount of <em>reading</em> or <em>education</em> that will ever turn me into a great athlete, because I simply don&#8217;t want to be one. I wouldn&#8217;t even read the books in the first place. If you forced me to take some classes or go to some seminar, it would leave my mind as soon as I took it in, because I would simply have no desire to know the data. Even if I was playing sports every day for a living, I&#8217;d think, &#8220;Ah well, I don&#8217;t have any passion for athletics, so this information simply isn&#8217;t important to me. Someday I will be doing some other job, or some day I will retire and not have to care, and until then I&#8217;m just going to do this because they pay me and it&#8217;s better than starving.&#8221;</p>
<p>As hard as this can be to imagine, that is what happens in the minds of many &#8220;bad&#8221; programmers when you tell them how or why they should write better code. If they don&#8217;t sincerely want to be the best programmers that they can be, it <em>does not matter</em> how much education you give them, how many times you correct them, or how many seminars they go to, they <em>will not get better</em>.</p>
<p>So what do you do? To be fair, I may not be the best person to ask&#8211;if I&#8217;m going to do something, I feel that I should do my best to excel in it. Perhaps the best thing you can do is encourage people to follow that concept. You could say to them something like: &#8220;If you&#8217;re going to be doing it anyway, why not do it well? Wouldn&#8217;t it at least be more enjoyable to be doing this if you were more skilled at it? What if some other people were impressed with your work, how would that feel? Would it be nice to go home at the end of the day and feel that you had done something well? Would your life be better than it is now, even if only a little? Would your life get <em>worse</em>?&#8221; </p>
<p>At the very worst, you could ask somebody to list off all of the consequences of &#8220;being a great programmer&#8221; until they felt some relief on the subject or started to see the idea differently. You could ask them something like, &#8220;What would happen if you were a great programmer?&#8221; and keep asking for more answers to that question until they felt better about it or started really seeing how good it could be to be excellent. You don&#8217;t have to respond to their answers with any positive or negative comments, just listen and politely acknowledge the things they&#8217;re saying. The idea is to give them the chance to really examine the possibility for themselves, and maybe come to some new and interesting conclusions, by themselves&#8211;not by you telling them what to think or disagreeing with their answers, but just by communicating to you what <em>would</em> really happen if they became great.</p>
<p>However you do it, the bottom line is that people must be interested in improving themselves before they can get better. How you bring them up to that level of interest doesn&#8217;t really matter, as long as they get there <em>before</em> you waste a lot of time giving them an education that they&#8217;re just going to throw away as soon as they hear it.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/before-you-begin/#comments">Comments: 5</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/before-you-begin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Software Design, In Two Sentences</title>
		<link>http://www.codesimplicity.com/post/software-design-in-two-sentence/</link>
		<comments>http://www.codesimplicity.com/post/software-design-in-two-sentence/#comments</comments>
		<pubDate>Thu, 13 May 2010 19:00:29 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=495</guid>
		<description><![CDATA[In the context of The Equation of Software Design, it is now possible to reduce the primary principles of software design into just two statements: It is more important to reduce the Effort of Maintenance than it is to reduce the Effort of Implementation. The Effort of Maintenance is proportional to the complexity of the &#8230; <a href="http://www.codesimplicity.com/post/software-design-in-two-sentence/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the context of <a href="/post/the-equation-of-software-design/">The Equation of Software Design</a>, it is now possible to reduce the primary principles of software design into just two statements:</p>
<ol style="font-weight: bold; font-size: 120%">
<li style="margin-bottom: 1em">It is more important to reduce the Effort of Maintenance than it is to reduce the Effort of Implementation.</li>
<li>The Effort of Maintenance is proportional to the complexity of the system.</li>
</ol>
<p>And that is pretty much <em>it</em>. If all you knew about software design were those two principles and <a href="/post/the-purpose-of-software/">the purpose of software</a>, you could evolve every other general principle of software development.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/software-design-in-two-sentence/#comments">Comments: 9</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/software-design-in-two-sentence/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The Equation of Software Design</title>
		<link>http://www.codesimplicity.com/post/the-equation-of-software-design/</link>
		<comments>http://www.codesimplicity.com/post/the-equation-of-software-design/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 20:31:53 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=463</guid>
		<description><![CDATA[So today I was playing around with a little equation that may in fact explain nearly all of the principles of software design. I don&#8217;t know that it&#8217;s actually mathematically solvable in terms of numbers, but it does demonstrate the factors present in software development decisions and how they relate to each other. Before I &#8230; <a href="http://www.codesimplicity.com/post/the-equation-of-software-design/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So today I was playing around with a little equation that may in fact explain nearly all of the principles of software design. <span id="more-463"></span> I don&#8217;t know that it&#8217;s actually mathematically solvable in terms of numbers, but it does demonstrate the factors present in software development decisions and how they relate to each other. Before I go into the equation, though, I have to define the factors that are present when a designer is deciding whether or not to implement something, or how to implement it:</p>
<ul>
<li><strong>Potential Value of Implementation</strong> (V<sub>i</sub> for short): How &#8220;valuable&#8221; <em>could</em> it be to implement this? For example, if we add something to the program that <em>could</em> directly prevent somebody from dying, that&#8217;s very valuable. If it simply <em>might</em> prevent a future  typo in a single error message, that&#8217;s hardly valuable at all.
<p>The &#8220;value&#8221; can be for the end user or for other programmers. When we&#8217;re talking about design decisions that affect only code, and not the end user, <em>flexibility</em> is one of the major values&#8211;how important <em>could</em> this flexibility be?</p>
<p>The potential value is separate from how <em>likely</em> it is that the situation will occur where you will need it. That&#8217;s the next issue.</p>
</li>
<li><strong>Probability of Value</strong> (P<sub>v</sub> for short): What is the chance that this value will be, in fact, realized by an end user (for a feature or functional change) or by another developer (for some design decision)? If we&#8217;re adding in code flexibility to allow for potential contact with extraterrestrial apes, that&#8217;s not a very <em>probable</em> occurrence. If we&#8217;re adding in a feature that is immediately useful to every single user, that&#8217;s 100% probability. (The number of users that a feature will be useful to is also part of the Probability of Value.)</li>
<li><strong>Effort of Implementation</strong> (E<sub>i</sub> for short): How hard will it be to implement this? This is a one-time cost&#8211;the immediate difficulty of performing the work required to create this thing the very first time. This would probably be measured in person-hours.</li>
<li><strong>Effort of Maintenance</strong> (E<sub>m</sub> for short): How much effort will it require to maintain this in the future? (This includes any effort added to maintaining the entire program by implementing this.) Will this complicate maintenance for the whole system? This is an amount that increases over time. Similar to Effort of Implementation, this would be most likely measured in person-hours.</li>
</ul>
<p>What we&#8217;re trying to determine is the <strong>Desirability Of Implementation</strong> (D for short). This answers the questions &#8220;Is this something we should do or not?&#8221; and &#8220;What should the priority of implementing this be?&#8221;</p>
<p>The simplest form of the equation is:</p>
<blockquote><p>
D = (P<sub>v</sub> * V<sub>i</sub>) / (E<sub>i</sub> + E<sub>m</sub>)
</p></blockquote>
<p>Or, in English:</p>
<blockquote><p>
The Desirability of Implementation is directly proportional to the Probability of Value and the Potential Value of Implementation, and inversely proportional to the total effort, consisting of the Effort of Implementation plus the Effort of Maintenance.
</p></blockquote>
<p>However, there is a critical factor missing from the simple form of this equation: <em>time</em>. What we actually want to know is <strong>the limit of this equation as time approaches infinity</strong>, and that gives us the true Desirability of Implementation. So let&#8217;s look at this from a logical standpoint:</p>
<p>The Effort of Implementation is a one-time cost, and never changes, so is mostly unaffected by time.</p>
<p>The Value of Implementation may increase or decrease over time, depending on the feature. It&#8217;s not predictable, and so we can assume for the sake of this equation that it is a static value that does not change with time (though if that&#8217;s not the case in your situation, keep this factor in mind as well). One could even consider that the Effort of Maintenance is actually &#8220;the effort required to maintain this exact level of Value,&#8221; so that the Value would indeed remain totally fixed over time.</p>
<p>The Probability of Value, being a probability, approaches 1 (100%) as time goes to infinity.</p>
<p>The Effort of Maintenance, being based on time, approaches infinity as time goes to infinity.</p>
<p>At first glance, that might sound as though design is hopeless, because maintenance becomes infinite effort&#8211;an amount that no Potential Value could surpass&#8211;and it seems like <em>every</em> possibility must be accounted for, because given infinite time the probability seems to indicate that every possibility will occur. Those are not true statements, though, because you have to think about the <em>rate</em> at which both of those items increase. If the fundamental effort of maintenance is very small, then even as time goes on, it will remain small. You could say that there is a &#8220;coefficient of maintenance&#8221; on any design decision or feature, and that that determines how rapidly maintenance effort will accumulate over time. As far as the Probability of Value goes, if it is a very tiny number, it may remain tiny until thousands or millions of years have passed&#8211;so if the Effort of Maintenance increases at a great rate, then it will easily outstrip the Probability of Value and the Desirability of Implementation will approach zero as time approaches infinity.</p>
<p>What this equation <em>actually</em> tells us is that the most important factors to balance, in terms of time, are probability of value vs. effort of maintenance. If the probability of value is high and the effort of maintenance is low, the desirability is then dependent only upon the Potential Value of Implementation vs. the Effort of Implementation&#8211;a decision that a product manager can easily make. If the probability of value is low and the effort of maintenance is high, the only justification for implementation would be a near-infinite Potential Value of Implementation.</p>
<p>This interestingly indicates why small improvements in programming languages and development frameworks result in such enormous changes in the resulting products&#8211;because tiny reductions in the Effort of Maintenance can make tremendous changes in the Desirability of Implementation. Features that otherwise would be thrown away by a product manager as impossible become part of the basic design plan. Polishing the UI becomes more desirable, because it requires less effort for both implementation and maintenance.</p>
<p>And finally, I think that this communicates most exactly and truthfully why simplicity is so important&#8211;because <em>simplicity</em> is what determines the &#8220;coefficient of maintenance&#8221; that I talked about above. The effort involved in maintaining simple code increases very slowly over time&#8211;sometimes so slowly that you <em>never</em> will have to put any maintenance effort into it in your lifetime.</p>
<p>There&#8217;s a lot more that could be said about this equation. What are your thoughts on it? Anybody have any ideas of how Value of Implementation could be numerically calculated, or if it might break down into a set of other numerically-calculable factors? Anything you have to say about it, I&#8217;m interested.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/the-equation-of-software-design/#comments">Comments: 24</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-equation-of-software-design/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Privacy, Simplified</title>
		<link>http://www.codesimplicity.com/post/privacy-simplified/</link>
		<comments>http://www.codesimplicity.com/post/privacy-simplified/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 19:00:11 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=415</guid>
		<description><![CDATA[So, there&#8217;s a lot of talk on the Internet about privacy. Some people say that privacy is only desired by those who have something to hide. Some people insist that privacy is a human right that should never be violated without consent. There&#8217;s only one problem with this whole debate: what is privacy, and why &#8230; <a href="http://www.codesimplicity.com/post/privacy-simplified/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, there&#8217;s a lot of talk on the Internet about privacy. Some people say that privacy is only desired by those who have something to hide. Some people insist that privacy is a human right that should never be violated without consent.</p>
<p>There&#8217;s only one problem with this whole debate: what is privacy, and why would anybody want it? This is rarely defined&#8211;most people just seem to assume that &#8220;everybody knows&#8221; that privacy is, so why would it have to be explained?</p>
<p>Well, I&#8217;m not a big fan of &#8220;everybody knows.&#8221; And in fact, it turns out that privacy actually means two different things, which many people use interchangeably without specifying what they&#8217;re actually talking about. So to help clear up some of the debate online, and to hopefully shed some light on how it can all be resolved, here are some clear definitions and discussions of what privacy is, and why people would want it.</p>
<h3>Privacy of Space</h3>
<p>The first type of privacy is &#8220;privacy of space&#8221;. <span id="more-415"></span> This is the ability to control who does and does not enter a particular physical space, probably because you&#8217;re in the space and you don&#8217;t want certain others in that space. &#8220;Enter the space&#8221; in that definition includes any method of being able to perceive the space&#8211;so, for example, if somebody stands outside the door with their ear pressed to it, they&#8217;re violating your privacy. If somebody installs a camera in your room without your consent, they&#8217;re violating your privacy.</p>
<p>This form of privacy is not metaphorical. It does not apply to anything other than physical space. It literally means, &#8220;I do or do not want you to be perceiving this physical location, and I have the choice and ability to control that.&#8221;</p>
<p>The most common reason that we want this form of privacy is that we want to protect somebody or something from harm, most commonly ourselves. This harm can be minor (we don&#8217;t want to be annoyed by people walking through our house all the time), it can be purely social (we close the door when we go to the bathroom because we know others don&#8217;t want to perceive us going to the bathroom, and we may also not want to be perceived in such a state), or it can be extreme  (a man with a mask and a chainsaw should not be in my closet).</p>
<p>One interesting thing about this form of privacy is that we don&#8217;t usually consider animals, plants, or material objects to be capable of violating it, even if they enter a space without our permission. It might be <em>annoying</em> if the cat comes in the room when you don&#8217;t want it to, but you&#8217;re not going to complain that the cat is &#8220;violating your privacy&#8221;, right?</p>
<p>So, when it comes to computer programs, this is <em>not</em> the form of privacy we&#8217;re talking about, since we don&#8217;t consider that a computer program being in the same room with us is a violation of our privacy of space. My word processor is not violating my physical privacy of space, even though it&#8217;s &#8220;in the room&#8221; with me, because it does not, itself, perceive. The only exception would be a computer program that was transmitting perceptions (sound or sight) to some location that we didn&#8217;t want to send it to&#8211;that would be a privacy violation, because someone could perceive our space through it when we didn&#8217;t want them to. When it comes to that sort of privacy, violations are pretty pretty cut-and-dry. If a computer program sends perceptions of my space anywhere without my permission, it is absolutely violating my privacy, it&#8217;s not useful to me, and it should stop immediately.</p>
<p>But on the Internet, that&#8217;s not usually the type of privacy we&#8217;re talking about.</p>
<h3>Privacy of Information</h3>
<p>The second type of privacy is &#8220;privacy of information.&#8221; This is the ability to control who <em>knows</em> certain things. When we talk about computer programs and the Internet, <em>this</em> is the most common type of privacy we&#8217;re talking about.</p>
<p>So why would somebody want privacy of information? Is it just because they&#8217;re doing something that they want to hide from others? Is it just for committing crimes or for hiding harmful acts? Well, sometimes it is, yes. There are many people who use the concept of &#8220;privacy&#8221; to protect themselves from the law or the moral rejection of others. It is probably because of these individuals that the concept of privacy is a muddy subject&#8211;as long as it&#8217;s unclear quite what &#8220;privacy&#8221; is, it&#8217;s much easier for those who have have committed harmful acts to invoke &#8220;privacy&#8221; as a defense.</p>
<p>But is that the <em>only</em> reason that somebody would want privacy of information? What about a normal person, who isn&#8217;t doing anything harmful&#8211;would they ever want to keep certain information private?</p>
<p>Well, there is absolutely a rational reason that people would want privacy of information, and interestingly, it&#8217;s the same reason that people want privacy of space:</p>
<blockquote><p>
An individual or group desires privacy of information because they believe that other people knowing that information could or would be more harmful than them not knowing it.
</p></blockquote>
<p>Here&#8217;s a very straightforward example: I consider that a criminal knowing my credit card number would be harmful&#8211;far more harmful than them not knowing it.</p>
<p>In certain countries, the fact that I read a certain website or talked to certain people on the Internet could get me killed or put in jail. So, in that situation, other people knowing my browser history could be very harmful, no question about it.</p>
<p>Of course, if one kept everything private, one could not live. If you pay for a piece of candy with a quarter, the person receiving that quarter now knows that you had a quarter. They may know that you kept it in a waller, or that you pulled it out of your pants. They probably know what you look like, if you&#8217;re not wearing a mask. They most likely also know that you have five fingers, and that you were in their store at a certain time. In short, no matter what you do, in order to live, you must exchange information with other people. The more things you do, the more information you will have to exchange. </p>
<p>In fact, usually, the more information that others know about you, the more helpful they can be. The bank knows all the transactions that I made, so they can help me by creating an online system that shows me my transactions and lets me search them. That information can be seen by bank employees, but I don&#8217;t consider that to be potentially harmful <em>enough</em> to outweigh the obvious benefits of the bank having it.</p>
<p>The web browsers that I use know my passwords to certain sites, so they can help me by putting those passwords into the box, saving me some typing. Potentially, somebody could steal that information from my computer, but the chance of that happening is small enough, and the benefit is significant enough, so I consider it acceptable to save my passwords in the browser.</p>
<p>The examples like this go on and on&#8211;the appropriate use of information is extremely beneficial. The <em>inappropriate</em> use is what&#8217;s harmful.</p>
<p>So who decides what what&#8217;s an appropriate use and what&#8217;s an inappropriate use? What information should be sent and stored, and what information should be kept private? Well, these are the fundamental questions being asked when people debate privacy issues&#8211;who gets to choose whether my knowledge becomes somebody else&#8217;s knowledge? Should I be asked before my information is sent, or should I just be given the option to opt-out and delete the information? Is there some information that should never be sent? What information is more important to keep private than other information?</p>
<p>Though this is all far less cut-and-dry than &#8220;privacy of space&#8221; issues, these questions can generally be answered by the &#8220;help vs harm&#8221; equation. The basic sort of questions one might want to ask would be:</p>
<ul>
<li>Will sending and storing this information harm <em>any</em> users, immediately or potentially? (Remember, &#8220;potentially&#8221; is pretty broad&#8211;what happens if somebody with bad intentions steals that information from you? What happens if somebody buys your company and decides to use that information in a way that you think is bad?)</li>
<li>Would it help your users more than harm them to take this information?</li>
<li>Taking all the above into account, should sending this information be optional? (This is largely determined by how broadly it <em>could</em> be harmful to collect the information.)</li>
<li>If sending the information is optional, should it be opt-out or opt-in? (That is, should it automatically be on, and people have to turn it off if they don&#8217;t want to send the info, or should it be off and people have to choose to turn it on?)</li>
<li>If it&#8217;s opt-in, will the feature still be helpful to enough of your users to justify implementing it?</li>
</ul>
<p>There are some people who will claim that no information should ever be sent or stored about the user, that all privacy options should always be opt-in, and that all information is so potentially harmful that no debate about this can be accepted. That is, frankly, a ridiculous proposition. It&#8217;s so obviously untrue that there&#8217;s almost no way to argue with it, because it&#8217;s such a shocking irrationality. Just like the fact that somehow, liquids could harm somebody (so you can&#8217;t bring liquids on an airplane in the USA) it&#8217;s true that there are situations in which almost any piece of information <em>could</em> be dangerous. That doesn&#8217;t mean that all information <em>is</em> dangerous, though. </p>
<p>My martial artist friends have frequently joked that they shouldn&#8217;t be allowed to bring <em>any</em> object on an airplane, because they could kill somebody with any of them. Similarly, given almost <em>any</em> piece of information, somebody could do <em>something</em> harmful with it, somewhere, at some point. If I know you have a quarter in your pocket, I&#8217;m sure there&#8217;s some situation in which I could use that information to get you in some serious trouble. But that doesn&#8217;t make that information realistically harmful, even potentially.</p>
<p>Even the idea of &#8220;every single piece of information should be opt-in&#8221; is ridiculous. Do you want the web browser to ask you, &#8220;May I send this page your IP address?&#8221; every time you load a web page? Well, if you&#8217;re a spy in a hostile country, maybe you do. But if you&#8217;re like most people, that would probably just annoy you&#8211;you&#8217;d stop using that web browser and switch to another one. And if you <em>are</em> a spy or a resistance fighter, then you probably know how to use <a href="http://www.torproject.org/">Tor</a> to avoid being tracked.</p>
<p>So when we&#8217;re talking about privacy, it&#8217;s not an issue of &#8220;in some incredibly unlikely situation, this information could be very harmful,&#8221; it&#8217;s an issue of <em>balancing help vs. harm in real-world situations</em>. Real-world situations can be pretty strange and unexpected, but they at least are <em>real</em>, and can be balanced and talked about. Doing so, you can make good decisions about how to protect your users&#8217; privacy&#8211;how much information to take, how you inform them about the information you&#8217;re taking, and what you do with that information when you have it.</p>
<p>So no, this is not a casual issue or something that we should brush-off and just ignore the dangerous implications of, but it&#8217;s also not an extreme unsolvable situation where we have to decide to keep everything private because we can&#8217;t make up our minds about it. Privacy is simply something that we should be able to analyze factually, based on real-world situations and data, and come to some practical and useful decision about.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/privacy-simplified/#comments">Comments: 22</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/privacy-simplified/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Why Programmers Suck</title>
		<link>http://www.codesimplicity.com/post/why-programmers-suck/</link>
		<comments>http://www.codesimplicity.com/post/why-programmers-suck/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 19:00:33 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=274</guid>
		<description><![CDATA[A long time ago, I wrote an essay called &#8220;Why Computers Suck&#8221; (it was given the title &#8220;Computers&#8221; and &#8220;What&#8217;s Wrong With Computers&#8221; in two later revisions, and the original title never saw the light of day). The article was fairly long, but it basically came down to the idea that computers suck because programmers &#8230; <a href="http://www.codesimplicity.com/post/why-programmers-suck/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>  A long time ago, I wrote an essay called &#8220;Why Computers Suck&#8221; (it was given the title &#8220;Computers&#8221; and &#8220;<a href="/post/whats-wrong-with-computers/">What&#8217;s Wrong With Computers</a>&#8221; in two later revisions, and the original title never saw the light of day). The article was fairly long, but it basically came down to the idea that computers suck because programmers create crazy complicated stuff that nobody else can understand, and complexity builds on complexity until every aspect of a program becomes unmanageable.</p>
<p>  What I <em>didn&#8217;t</em> know at the time was <em>why</em> programmers did this. It was obvious that they <em>did</em> do it, but why would the software development industry produce so <em>many</em> crazy, complex masses of unreadable code? Why did it <em>keep happening</em>, even when developers should have learned their lesson after their first bad experience? What was it that made programmers not just make bad code, but keep on making bad code?</p>
<p>  Well, this was a mystery, but I didn&#8217;t worry too much about it at first. Just the revelation that &#8220;bad programs are caused entirely by bad programmers&#8221;, as simple and obvious as it may seem, was enough to fuel an entire investigation and study into the field of programming, one which had some pretty good results (that&#8217;s mostly what I&#8217;ve written about on this blog, and it&#8217;s also the subject of a book that&#8217;s in development). The problem had been defined (bad programmers who create complexity), it seemingly had a solution (describe laws of software design that would prevent this), and that was enough for me.</p>
<p>  But it still baffled me that the world&#8217;s universities, technical schools, and training programs could turn out such terrible programmers, even with all of the decades of advancement in software development techniques. Sure, a lot of the principles of software design hadn&#8217;t been codified, but a lot of good advice was floating around, a lot of it very common. Even if people hadn&#8217;t gone to school, didn&#8217;t they <em>read</em> any of this advice?</p>
<p>  Well, the truth was beyond my imagination, and it took almost five years of working on the Bugzilla Project with a vast number of separate contributors until one day I suddenly realized an appalling fact:</p>
<blockquote><p>
  <strong>The vast majority (90% or more) of programmers have absolutely no idea what they are doing.</strong>
</p></blockquote>
<p><span id="more-274"></span></p>
<p>It&#8217;s not that they haven&#8217;t read about software design (though they likely haven&#8217;t). It&#8217;s not that the programming languages are too complex (though they are). It&#8217;s that the vast majority of programmers didn&#8217;t have the first clue what they were really doing. They were just mimicking the mistakes of other programmers&#8211;copying code and typing more-or-less meaningless incantations at the machine in the hope that it would behave like they wanted, without any real understanding of the mechanics of the computer, the principles of software design, or the meanings of each individual word and symbol they were typing into the computer.</p>
<p>That is a bold, shocking, and offensive statement, but it has held up in my experience. I have personally reviewed and given feedback on the code of scores of programmers. I have read the  code of many others. I have talked to many, many programmers about software development, and I&#8217;ve read the writings of hundreds of developers. The number of programmers who <em>really</em> understand what they are doing comprise only about 10% of all the programmers I&#8217;ve ever talked to, worked with, or heard about.</p>
<p>  In open source, we get the cream of the crop&#8211;people who want to program in their spare time. And even then, I&#8217;d say only about 20% of open source programmers have a really good handle on what they are doing.</p>
<p>  So why is this? What&#8217;s the problem? How could there be so many people working in this field who have absolutely no clue what they&#8217;re doing?</p>
<p>  Well, that sounds a bit like they&#8217;re somehow &#8220;stupid.&#8221; But what <em>is</em> stupidity? People are not stupid simply for <em>not knowing</em> something. There&#8217;s a lot of stuff that <em>everybody</em> doesn&#8217;t know. That doesn&#8217;t make them stupid. That may make them <em>ignorant</em> about certain things, but it doesn&#8217;t make them stupid. No, stupidity, real stupidity, is <em>not knowing that you don&#8217;t know</em>. Stupid people <em>think they know something when they don&#8217;t</em>, or they <em>have no idea that there is something more to know</em>.</p>
<p>  This sort of stupidity is something that can be found in nearly every field, and software development is no exception. Many programmers simply don&#8217;t know that there <em>could be</em> laws or general guidelines for software development, and so they don&#8217;t even go looking for them. At many software companies, there&#8217;s no attempt to improve developers&#8217; understanding of the programming language they&#8217;re using&#8211;perhaps simply because they think that the programmers must &#8220;already know it if they were hired to do it&#8221;.</p>
<p>  Unfortunately, it&#8217;s particularly harmful to have this sort of mindset in software development, because there is <em>so much to know</em> if you really want to be good. Anybody who thinks they already know everything (or who has a &#8220;blind spot&#8221; where they can&#8217;t see that there&#8217;s more to learn) is having their ability to produce excellent code crippled by a lack of knowledge&#8211;knowledge they <em>don&#8217;t even know exists</em> and that they <em>don&#8217;t even know they lack</em>.</p>
<p>  No matter how much you know, there is almost always more to know about <em>any</em> field, and computer programming is no exception. So it&#8217;s always wrong to think you know everything.</p>
<p>  Sometimes it&#8217;s hard to figure out <em>what</em> one should be learning about, though. There&#8217;s so much data, where does one start? Well, to help you out, I&#8217;ve come up with a few questions you can ask yourself or others to help figure out what areas might need more study:</p>
<ul>
<li>Do you know as much as possible about every single word and symbol on every page of code you&#8217;re writing?</li>
<li>Did you read and completely understand the documentation of every single function you&#8217;re using?</li>
<li>Do you have an excellent grasp of the fundamental principles of software development&#8211;such a good grasp that you could explain them flawlessly to novice programmers at your organization?</li>
<li>Do you understand how each component of the computer functions, and how they all work together?</li>
<li>Do you understand the history of computers, and where they&#8217;re going in the future, so that you can understand how your code will function on the computers that will be built in the future?</li>
<li>Do you know the history of programming languages, so that you can understand how the language you&#8217;re using evolved and <em>why</em> it works like it does?</li>
<li>Do you understand other programming languages, other methods of programming, and other types of computers than the one you&#8217;re using, so that you know what the <em>actual</em> best tool for each job is?</li>
</ul>
<p>From top to bottom, those are the most important things for any programmer to know about the code they&#8217;re writing. If you can truthfully answer &#8220;yes&#8221; to all those questions, then you are an excellent programmer.</p>
<p>It may seem like an overwhelming list. &#8220;Wow, the documentation for <em>every single function</em>? Reading that is going to take too long!&#8221; Well, you know what else takes a long time? Becoming a good programmer if you <em>don&#8217;t</em> read the documentation. You know how long it takes? <em>Forever,</em> because it never happens.</p>
<p>  You will <em>never</em> become a good programmer simply by copying other people&#8217;s code and praying that it works right for you. But even more importantly, investing time into <em>learning</em> is what it takes to become good. Taking the time <em>now</em> will make you a <em>much</em> faster programmer later. If you spend a lot of time reading up on stuff for the first three months that you&#8217;re learning a new technology, you&#8217;ll probably be 10 times faster with it for the next 10 years than if you&#8217;d just dived into it and then never read anything at all.</p>
<p>I do want to put a certain limiter on that, though&#8211;you can&#8217;t <em>just</em> read for three months and expect to become a good programmer. First of all, that&#8217;s just too boring&#8211;nobody wants to just study theory for three months and not get any actual practice in. Very few people would keep up with that for long enough to become programmers at all, let alone good programmers. So I want to point out that understanding comes also from <em>practice</em>, not just from study. But <em>without the study</em>, understanding may <em>never</em> come. So it&#8217;s important to balance both the study and the practice of programming.</p>
<p>  This is not an attack on any programmer that I&#8217;ve worked with personally, or even an attack on any individual programmer at all. I admire almost every programmer I&#8217;ve ever known, as a person, and I expect I&#8217;d admire the rest were I to meet them, as well. Instead, this is an open invitation to <em>all</em> programmers to open your mind to the thought that there might always be more to know, that both knowledge and practice are the key to skill, and that it&#8217;s not shameful at all to <em>not know</em> something&#8211;as long as you <em>know</em> that you don&#8217;t know it, and take the time to learn it when necessary.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/why-programmers-suck/#comments">Comments: 52</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/why-programmers-suck/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>The Singular Secret of the Rockstar Programmer</title>
		<link>http://www.codesimplicity.com/post/the-singular-secret-of-the-rockstar-programmer/</link>
		<comments>http://www.codesimplicity.com/post/the-singular-secret-of-the-rockstar-programmer/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 19:00:02 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=227</guid>
		<description><![CDATA[Before all the laws of software, before the purpose of software, before the science of software design itself, there is a singular fact that determines the success or failure of a software developer. This fact makes the difference between the senior engineer who can seem to pick up new languages in a day and the &#8230; <a href="http://www.codesimplicity.com/post/the-singular-secret-of-the-rockstar-programmer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Before all the <a href="/category/laws-of-software/">laws of software</a>, before <a href="/post/the-purpose-of-software/">the purpose of software</a>, before <a href="/post/what-is-software-design/">the science of software design itself</a>, there is a singular fact that determines the success or failure of a software developer. This fact makes the difference between the senior engineer who can seem to pick up new languages in a day and the junior developer who struggles for ten years just to get a paycheck, programming other people&#8217;s designs and never improving enough to get a promotion. It differentiates the poor programmers from the good ones, the good programmers from the great ones, and the great ones from the &#8220;rockstar&#8221; programmers who have founded whole multi-billion dollar empires on their skill.</p>
<p>It&#8217;s not anything complicated, and it&#8217;s not something that&#8217;s hard to know. It&#8217;s not something that you can only do if you&#8217;re born with a special talent or a &#8220;magical ability to program well.&#8221; There is nothing about the <em>nature of the individual</em> that determines whether or not they will become an excellent programmer or a poor one.</p>
<p>There is only one, singular fact:</p>
<blockquote><p>
  <strong>The better you understand what you are doing, the better you will do it.</strong>
</p></blockquote>
<p><span id="more-227"></span></p>
<p>Rockstar programmers understand what they are doing far, far better than average or mediocre programmers. And that is it. </p>
<p>All you have to do in order to become an excellent programmer is fully understand what you are doing.</p>
<p>Some may say that they already understand everything. The <em>test</em> is whether or not they can <em>apply</em> it. Do they produce beautifully architected systems that are a joy to maintain? Do they plow through programming problems at a rate almost unimaginable to the average programmer? Do they explain everything clearly and in simple concepts when they are asked for help? Then they are an excellent programmer, and they understand things well.</p>
<p>However, far more commonly than believing that they &#8220;know it all&#8221;, many programmers (including myself) often feel as though they are locked in an epic battle with an overwhelming sea of information. There is so much to know that one could literally spend the rest of his life studying and still come out with only 90% of all the data there is to know about computers.</p>
<p>The secret weapon in the epic battle, the Excalibur of computing knowledge, is <em>understanding</em>. The better that you understand the <em>most fundamental</em> level of your field, the easier it will be to learn the next level. The better you understand <em>that</em> level, the easier the next one after that will be, and so on. Then once you&#8217;ve gone from the most fundamental simplicities to the highest complexities, you can start all over again and find amazingly that there is so much more to know at the very, very bottom.</p>
<p>It seems almost too simple to be true, but it is in fact the case. The path to becoming an excellent programmer is simply full and complete understanding, starting with a profound grasp of the basics and working up to a solid control of the most advanced data available. </p>
<p>I won&#8217;t lie to you&#8211;it sometimes is a long path. But it is worthwhile. And at the end of it, you may find yourself suddenly the amazing senior engineer who everyone comes to for advice. You may be the incredible programmer who solves everything and is admired by all his peers. You might even come out a &#8220;rock star&#8221; with millions of dollars and a fantastically successful product. Who knows? I can&#8217;t tell you what to do or what to become. I can only point out some information that I&#8217;ve found to be truthful and valuable. What you do with it is up to you.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/the-singular-secret-of-the-rockstar-programmer/#comments">Comments: 32</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-singular-secret-of-the-rockstar-programmer/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>The Engineer Attitude</title>
		<link>http://www.codesimplicity.com/post/the-engineer-attitude/</link>
		<comments>http://www.codesimplicity.com/post/the-engineer-attitude/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 18:00:01 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=187</guid>
		<description><![CDATA[The attitude that every engineer should have, in every field of engineering, is: I can solve this problem the right way. Whatever the problem is, there&#8217;s always a right way to solve it. The right way can be known, and it can be implemented. The only valid reason ever to not implement something the right &#8230; <a href="http://www.codesimplicity.com/post/the-engineer-attitude/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The attitude that every engineer should have, in every field of engineering, is:</p>
<blockquote><p>
I can solve this problem the right way.
</p></blockquote>
<p><span id="more-187"></span></p>
<p>Whatever the problem is, there&#8217;s always a <em>right way</em> to solve it. The right way can be known, and it <em>can be</em> implemented. The only valid reason ever to not implement something the right way is <em>lack of resources</em>. However, you should always consider that the right way does exist, you are <em>able</em> to solve the problem the right way, and that given enough resources, you <em>would</em> solve the problem the right way.</p>
<p>The &#8220;right way&#8221; usually means &#8220;the way that accounts for all reasonably possible future occurrences, even unknown and unimaginable occurrences.&#8221;</p>
<p>A bridge that could stand up to any reasonably possible environmental condition or any reasonably possible amount of traffic without constant maintenance would be built the &#8220;right way.&#8221;</p>
<p>Software code that maintained its simplicity while providing the flexibility needed for reasonably possible future enhancements would be designed the &#8220;right way.&#8221;</p>
<p>There are lots of invalid reasons for not solving a problem the right way:</p>
<ul>
<li><strong>I don&#8217;t know the right way.</strong> Often this just requires more understanding or study, to figure out the right way. When I run into this situation, I walk away from the problem for a while, and then often I&#8217;ll come up with the solution when I&#8217;m just out walking, or the next day when I come back to it. I try not to compromise on something that isn&#8217;t the right way just because I don&#8217;t know what the right way is yet.</li>
<li><strong>The group cannot agree on what the right way would be.</strong> Sometimes a group of people have argued about what would be the &#8220;right way&#8221; and the subject has gotten very confused. Groups are not very good at making decisions. As we all know, you don&#8217;t design software by committee, and I suspect that &#8220;design by committee&#8221; in other fields of engineering is just as bad. The solution here is to assign an experienced and trusted engineer who understands the basic laws of the subject you&#8217;re working in to determine the right way by himself or herself, probably after carefully studying the existing arguments and collecting relevant information, following standard, valid engineering procedures.</li>
<li><strong>I am too lazy/tired/hungry/discombobulated to do this the right way, right now.</strong> This happens to everybody from time to time. It&#8217;s 1 in the morning, you&#8217;ve been working on the project for 15 hours straight, and you just need the damn thing to <em>work</em>, right now! Give it a rest, though, and come back later. The world isn&#8217;t ending, and the problem will still be here and solvable later. Go to sleep, go eat something, take a walk&#8211;do whatever it takes to get into a mental space where you&#8217;re willing to solve the problem the right way, and then come back. If you&#8217;re in a state where you can&#8217;t solve the problem the right way, then it&#8217;s really time to take a break. You&#8217;re not being delinquent in your duties if you do so&#8211;you&#8217;re actually correctly taking responsibility for the success of the project by saying &#8220;this needs to be done right, and the way to do it right, right now, is to take a break and come back later&#8221;.</li>
</ul>
<p>Mostly, it all just takes the constant and continual belief in yourself that <em>you can solve the problem the right way</em>.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/the-engineer-attitude/#comments">Comments: 38</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-engineer-attitude/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>How We Figured Out What Sucked</title>
		<link>http://www.codesimplicity.com/post/how-we-figured-out-what-sucked/</link>
		<comments>http://www.codesimplicity.com/post/how-we-figured-out-what-sucked/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 18:00:24 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=200</guid>
		<description><![CDATA[So, after my last post, a few people asked, &#8220;Okay, but how do you figure out what sucks?&#8221; Well, some of it&#8217;s really obvious. You press a button and the program takes 10 minutes to respond. That sucks pretty bad. You get 100 complaints a week about the UI of a particular page&#8211;okay, so that &#8230; <a href="http://www.codesimplicity.com/post/how-we-figured-out-what-sucked/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, after my <a href="/archives/137">last post</a>, a few people asked, &#8220;Okay, but how do you figure out what sucks?&#8221;</p>
<p><span id="more-200"></span></p>
<p>Well, some of it&#8217;s really obvious. You press a button and the program takes 10 minutes to respond. That sucks pretty bad. You get 100 complaints a week about the UI of a particular page&#8211;okay, so that sucks.</p>
<p>Usually there are one or two HUGE things that really suck, and they&#8217;re really obvious&#8211;those are the things to focus on first, even if they require a tremendous amount of work. For example, before Bugzilla 3.0, Bugzilla had to compile every single library and the entire script it was about to run, every time you loaded a page. This added several seconds to each page load, on slower machines, and at least 1 second on faster machines. So <em>performance</em> was one big obvious thing that sucked about Bugzilla. But even more importantly, the <em>code</em> of Bugzilla sucked. It was being read by <em>everybody</em>&#8211;because people were frequently customizing Bugzilla at their company&#8211;and it was an unreadable, garbled mess.</p>
<p>Thankfully, both of those problems had the same solution. The performance problem was solved by allowing people to run Bugzilla in a way that would pre-compile all our scripts when the web server started, instead of every time somebody loads a page. And to enable that pre-compiling, we had to do enormous amounts of refactoring. So, we actually ended up handling our performance problem <em>by</em> handling our code problem.</p>
<p>However, it took <em>four major releases</em> (Bugzilla 2.18, 2.20, 2.22, and finally 3.0) to get all this done! We fixed a lot of little issues for each release along the way, too, so each release really did suck less than the previous one. But handling the <em>major</em> issues was a tremendous effort&#8211;it wasn&#8217;t just something we could code up in one night and have it be done with.</p>
<p>I think sometimes the big issues in a software project don&#8217;t get handled because they <em>do</em> require that much work to fix. That doesn&#8217;t mean you can ignore them, though. It just means that you have to plan for a long project, and figure out how you can keep getting releases out in the mean time. </p>
<p>After all that was fixed, then we could turn our attention elsewhere, and wow! It turned out that elsewhere, there were still a bunch of things that sucked! All of the sudden, there were a new batch of &#8220;totally obvious&#8221; things to fix&#8211;things that had been there all the time, but were just overshadowed by the previous set of &#8220;totally obvious&#8221; things.</p>
<p>Now, we could have just gone on like this forever&#8211;fixing one set of &#8220;totally obvious&#8221; problems and then going on to the next set of &#8220;totally obvious&#8221; problems. But we ran into an issue&#8211;what happens when suddenly, you get to the point where there there are <em>fifty</em> &#8220;totally obvious&#8221; things that need fixing, and you can&#8217;t get them all done for one release? Well, that&#8217;s when you suddenly need some method of prioritizing what you&#8217;re going to fix.</p>
<p>For the Bugzilla Project, there were two things that we did that <em>really</em> helped us prioritize: the <a href="http://wiki.mozilla.org/Bugzilla:Survey">Bugzilla Survey</a> and the <a href="https://wiki.mozilla.org/Bugzilla:CMU_HCI_Research_2008">Bugzilla Usability Study</a>. </p>
<p>With the survey, the most important part was allowing people to respond in free-form text, to questions asked to <em>them personally</em>. That is, I sent the questions from me personally to Bugzilla administrators personally, often customizing the message for their exact situation. And there were no multiple-choice questions, only questions that prompted them to tell us what was bothering them and what they wanted to see. They were actually really happy to get my emails&#8211;lots of them thanked me for just doing the survey. </p>
<p>Once they had all responded, I read everything and compiled a list of major issues that were reported&#8211;overall a surprisingly small list! We&#8217;re focusing on those issues pretty heavily nowadays, and I think it&#8217;s making people happier with Bugzilla in general.</p>
<p>With the usability study, surprisingly the most helpful part was when the researchers (who were usability experts) just sat down in front of Bugzilla and pointed out things that violated usability principles. That is, even more valuable than the actual <em>research</em> they did was just <em>their observations</em> as experts, using the standard principles of usability engineering. The fact that they were fresh eyes&#8211;people who&#8217;d never worked on Bugzilla and thus didn&#8217;t just think &#8220;well that&#8217;s the way it is&#8221;&#8211;also was important, I think.</p>
<p>So we took all this data, and it really helped us prioritize. However, it&#8217;s important that we did the survey and research <em>when we did them</em> and not earlier. Back before we fixed the top few major issues, the usability and survey results would have just been overwhelming to us&#8211;they would have pointed out a million things we already knew, or a lot of things that we just didn&#8217;t have the time to work on at that point, and we would have had to re-do the survey and research again later, making it all a bunch of wasted time. So we had to wait until we were at the point of asking ourselves, &#8220;Okay, what&#8217;s most important now?&#8221;, and that was when gathering data became tremendously important and incredibly useful.</p>
<p>So overall, I&#8217;d say that when you&#8217;re trying to make things suck less, first go with what you <em>know</em> are the top few big obvious issues, and handle those, no matter what it takes. Then things will calm down a little, and you&#8217;ll have a huge pile of stuff that all needs fixing. That&#8217;s when you go and <em>gather data</em> from your users, and work to fix whatever they tell you <a href="/archives/24">actually sucks</a>.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/how-we-figured-out-what-sucked/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/how-we-figured-out-what-sucked/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Secret of Success: Suck Less</title>
		<link>http://www.codesimplicity.com/post/suck-less/</link>
		<comments>http://www.codesimplicity.com/post/suck-less/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 18:00:40 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=137</guid>
		<description><![CDATA[When I started working on Bugzilla in 2004, it was a difficult time for the whole project. There were tremendous problems with the code, we hadn&#8217;t gotten a major release out in two years, and a lot of the main developers had left to go do paid work. But eventually, thanks to a bunch of &#8230; <a href="http://www.codesimplicity.com/post/suck-less/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I started working on <a href="http://www.bugzilla.org/">Bugzilla</a> in 2004, it was a difficult time for the whole project. There were tremendous problems with the code, we hadn&#8217;t gotten a major release out in two years, and a lot of the main developers had left to go do paid work.</p>
<p>But eventually, thanks to a bunch of new members in the Bugzilla community, we released Bugzilla 2.18. Hooray! Bells rang, birds sang, and there was much rejoicing.</p>
<p>However, in the space between Bugzilla 2.16 (which was before my time) and Bugzilla 2.18 (which was the first release that I helped get out), something very strange happened&#8211;we developed <em>serious competition</em>. All of the sudden there were a bunch of new bug-tracking systems, some of them open-source and some of them not, that people were actually <em>using</em>.</p>
<p>At first it wasn&#8217;t too worrisome. Bugzilla was pretty dominant in its field, and it&#8217;s hard to lose that kind of position. But as time went on, there was more and more competition, and some people were predicting doom and gloom for Bugzilla. We were a tiny group of completely unpaid volunteers, and some of these competing products were being made by companies whose marketing and development resources absolutely <em>dwarfed</em> us. </p>
<p>And yet, with every release, our download numbers kept going up. And always significantly&#8211;30-50% more than the previous release, every time.</p>
<p>And then we hit Bugzilla 3.0, and our download numbers nearly <em>doubled</em>. And they&#8217;ve kept going up with every release from there. Nowadays we get over 10 times the number of downloads per release that we did in 2004.</p>
<p>So how did we pull this off? Well, as far as I can tell:</p>
<blockquote><p>
<strong>All you have to do to succeed in software is to consistently suck less with every release.</strong>
</p></blockquote>
<p><span id="more-137"></span></p>
<p>Nobody would say that Bugzilla 2.18 was <em>awesome</em>, but <em>everybody</em> would say that it <em>sucked less</em> than Bugzilla 2.16 did. Bugzilla 2.20 wasn&#8217;t <em>perfect</em>, but without a doubt, it <em>sucked less</em> than Bugzilla 2.18. And then Bugzilla 3.0 fixed a <em>whole lot of sucking</em> in Bugzilla, and it got a <em>whole lot more downloads</em>.</p>
<p>Why is it that this worked?</p>
<p>Well, when people are deciding <em>at first</em> what software to use, they have varying criteria. Sometimes they just use what&#8217;s presented to them by default on the computer. Sometimes they have a whole list of requirements and they do lots of research and pick the software that has all the features they need. But once they&#8217;ve picked a program, they will stick with it unless there is some compelling reason to leave. It&#8217;s not like people constantly are looking for new software to replace yours&#8211;they only start looking when your software <em>just won&#8217;t stop sucking</em>.</p>
<p>As long as you consistently suck less with every release, you will retain most of your users. You&#8217;re fixing the things that bother them, so there&#8217;s no reason for them to switch away. Even if you didn&#8217;t fix <em>everything</em> in <em>this</em> release, if you <em>sucked less</em>, your users will have faith that <em>eventually</em>, the things that bother them will be fixed. New users will find your software, and they&#8217;ll stick with it too. And in this way, your user count will increase steadily over time.</p>
<p>You have to get out releases frequently enough that people believe that you really <em>will</em> suck less, of course. If your new release never comes out, then effectively, your current release never stops sucking.</p>
<p>But what happens if you do release frequently, but instead of fixing the things in your software that suck, you just add new features that don&#8217;t fix the sucking? Well, eventually the patience of the individual user is going to run out. They&#8217;re not going to wait <em>forever</em> for your software to stop sucking.</p>
<p>I remember a particular piece of software that I used every day for years. It had a lot of great features and a nice user interface, but it it would crash two or three times a week. I really liked the software in general, but man, the crashing <em>sucked</em>. I reported a bug about it, and the bug was ignored. I kept using it through <em>10 new releases</em>, and it still crashed. The upgrades brought lots of new features, but I didn&#8217;t care about them. Remember, the feature set only mattered to me when I <em>first</em> picked the software. Now I just needed it to <em>suck less</em>.</p>
<p>But it never did.</p>
<p>So eventually, I went and looked for another piece of software that did the same thing, switched over, and I was happy with that one for a while. But guess what? It had a bug that <em>really sucked</em>. It didn&#8217;t happen very often, but when it did, boy was it a problem. But it sucked <em>less</em> than my old software, so I kept using it. Until one day, my patience ran out (after maybe 7 upgrades of the software), and I switched again.</p>
<p>Now I&#8217;m using a program that has half the feature set of either of the previous two programs. But, as a user, I&#8217;m the happiest I&#8217;ve ever been with this type of software. Because you know what? My new program sucks <em>hardly at all</em>. I mean, there are little things about it that suck, but supposedly a new release is coming out soon that will fix some of that sucking, and so I&#8217;m okay with it for now.</p>
<p>Would I have guessed this secret of success before I started working on Bugzilla? No. I would have told you the traditional wisdom&#8211;that a product succeeds or fails based on its feature set and user interface. But after 5 years on this project, managing our releases and watching our download count, I can tell you from my factual experience this strange thing: all you have to do to succeed as a software project is to <em>suck less</em> with every release. It doesn&#8217;t matter how much competition you have, or how many buzzword-friendly features you can cram into your interface. Just suck less, and you&#8217;ll succeed.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/suck-less/#comments">Comments: 57</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/suck-less/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>&#8220;Consistency&#8221; Does Not Mean &#8220;Uniformity&#8221;</title>
		<link>http://www.codesimplicity.com/post/consistency-does-not-mean-uniformity/</link>
		<comments>http://www.codesimplicity.com/post/consistency-does-not-mean-uniformity/#comments</comments>
		<pubDate>Thu, 14 May 2009 19:00:47 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=127</guid>
		<description><![CDATA[In a user interface, similar things should look the same. But different things should look different. Why do over 75% of Facebook&#8217;s users think that the new Facebook UI is bad? Because it makes different things look similar to each other. Nobody can tell if they&#8217;re updating their status or writing on somebody else&#8217;s wall, &#8230; <a href="http://www.codesimplicity.com/post/consistency-does-not-mean-uniformity/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In a user interface, similar things should look the same. But <em>different</em> things should look <strong>different</strong>.</p>
<p>Why do over 75% of Facebook&#8217;s users think that the new Facebook UI is bad? Because it makes <em>different</em> things look <em>similar</em> to each other. Nobody can tell if they&#8217;re updating their status or writing on somebody else&#8217;s wall, because even though the text is slightly different in the box depending on what you&#8217;re doing, the box itself <em>looks the same</em>. The new Chat UI (introduced a few days ago) makes idle users look basically identical to active users, except for a tiny icon difference. (It&#8217;s also important that different things are different <em>enough</em>, not just a little different, because people often won&#8217;t notice little differences.)</p>
<p>This is an easy pitfall for developers to fall into because developers love <em>consistency</em>. Everything should be based on a single framework, in the backend of an application. But that doesn&#8217;t mean that everything has to be <em>displayed</em> the same in the UI.</p>
<p>This fact&#8211;that different things should look different&#8211;is actually true with code, too, but people rarely think about it, because developers are actually pretty good about it. For example, accessing a value of an object should look different than calling a method on it, and in most programs, it does. For example, in Bugzilla&#8217;s code, accessing a value on an object looks like <code>$object-&gt;value</code> whereas calling a method on the object looks like <code>$object-&gt;method()</code>. It&#8217;s not all <em>that</em> different, but the <code>()</code> at the end is enough difference for the average programmer to notice &#8220;Oh, that&#8217;s a method call that <em>does something</em>&#8211;it&#8217;s not just accessing a value in the object.&#8221;</p>
<p>All in all, consistency is really important in both the backend and the frontend of an application. But that doesn&#8217;t mean that every single thing should look exactly the same&#8211;if we took that to extremes, we&#8217;d just have a solid white page, and that doesn&#8217;t seem all that usable (frontend) or readable (backend), does it?</p>
<p><a href="http://www.codesimplicity.com/post/consistency-does-not-mean-uniformity/#comments">Comments: 7</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/consistency-does-not-mean-uniformity/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Features, Simplicity, and the Purpose of Software</title>
		<link>http://www.codesimplicity.com/post/features-simplicity-and-the-purpose-of-software/</link>
		<comments>http://www.codesimplicity.com/post/features-simplicity-and-the-purpose-of-software/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 18:50:25 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=98</guid>
		<description><![CDATA[One of the best ways to keep an app simple is, of course, to limit how many features you implement. Twitter, for example, has very few features, but is enormously successful. The limited number of features of Twitter make it really easy to keep the application simple, which lets the developers focus a lot on &#8230; <a href="http://www.codesimplicity.com/post/features-simplicity-and-the-purpose-of-software/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the best ways to keep an app simple is, of course, to limit how many features you implement. <a href="http://twitter.com/">Twitter</a>, for example, has very few features, but is enormously successful. The limited number of features of Twitter make it really easy to keep the application simple, which lets the developers focus a lot on the quality of the system, the polish of each individual feature, etc.</p>
<p>Twitter&#8217;s just one of the many proofs that you don&#8217;t have to have lots of features to be successful. In fact, many successful apps have <em>fewer</em> features than their less-successful competitors.</p>
<p>Still, you&#8217;ve got to have <em>some</em> features. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  After all, it&#8217;d be pretty silly to be programming, otherwise. But how do you decide which features you <em>should</em> have? Is it just up to the Chief Architect&#8217;s intuition, or how many users demand that you give them &#8220;feature X&#8221;? Does whoever shouts the loudest in the development meeting get their feature implemented first? </p>
<p>Well, no, there is a way to decide whether or not you should implement a feature, and it comes out of one of our most basic principles: the <a href="/archives/21">purpose of software</a>. This principle (that the purpose of software is &#8220;to help people&#8221;) isn&#8217;t just some fancy-sounding gibberish I made up to make myself happy&#8211;I wrote it because it&#8217;s something that can actually be really useful to think about in everyday programming, and this question of &#8220;Should we implement this feature?&#8221; gives us a great opportunity to show how it can be applied.  <span id="more-98"></span></p>
<p>So, let&#8217;s say that the purpose of your software is &#8220;to help people learn to type,&#8221; and you have to decide, &#8220;Should we add New Feature X?&#8221; Well, here&#8217;s what you can ask yourself about the feature: &#8220;Does this <em>help people learn to type</em>?&#8221; Simple. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  If the answer is no, then you don&#8217;t implement the feature. Also, &#8220;Does this harm people learning to type, or get in the way of learning to type?&#8221; If it harms people more than it helps them, then it shouldn&#8217;t be implemented.</p>
<p>Now, quite often, you&#8217;ll find that you can&#8217;t really say whether or not a proposed feature actually helps your users (or helps them more than it hinders them). You can&#8217;t stand there with certainty and say, &#8220;Yes, this absolutely helps people learn to type.&#8221; In that case, just skip it. Don&#8217;t implement the feature. There are plenty of features out there in the world where you can be <em>sure</em> that it will help your users&#8211;implement those instead. Perhaps some more data will come along in time that will make your decision clearer about this uncertain feature, but until then, you don&#8217;t have to implement it. Just wait (or go collect data to make your decision easier).</p>
<p>This whole idea is also very handy for prioritizing features. You ask yourself, &#8220;Out of all these features, which ones will <em>most</em> help people learn to type?&#8221; That sounds perhaps like an overly-simple suggestion, but I think that for <a href="http://www.bugzilla.org/">Bugzilla</a>, if we really looked at all our requested features and said, &#8220;Which one of these will most help people <em>track bugs</em>?&#8221; we&#8217;d come up with a pretty good priority list, and probably have some interesting discussions, too.</p>
<p>The higher you set the bar for certainty on these questions, the fewer features you will have, and the simpler your application will be. That is, you could say, &#8220;We have to only be kinda certain it will help people,&#8221; and that&#8217;s your standard (or &#8220;bar&#8221;) for helpfulness. Or you could say, &#8220;We only implement features that we are <em>totally certain</em> will help people,&#8221; and you&#8217;d probably have an enormously simple and very well-designed application. But it&#8217;s  a judgment call&#8211;sometimes it&#8217;s hard to get data, and you have to implement features that you&#8217;re only <em>pretty sure</em> will be helpful. That can be the right decision, though, sometimes&#8211;different situations require different solutions.</p>
<p>Overall, <em>how</em> you make these decisions is up to you. What really matters is that you <em>ask the questions</em>. That&#8217;s one of the keys to keeping your product focused, simple, and polished.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/features-simplicity-and-the-purpose-of-software/#comments">Comments: 5</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/features-simplicity-and-the-purpose-of-software/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>(I)SAR Clarified</title>
		<link>http://www.codesimplicity.com/post/isar-clarified/</link>
		<comments>http://www.codesimplicity.com/post/isar-clarified/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 20:00:43 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=75</guid>
		<description><![CDATA[In my previous post, I said that there are three major parts to any computer program: Structure, Action, and Results. Also, a program has Input, which could be considered a fourth part of the program, although usually it&#8217;s not the programmer who&#8217;s creating the input, but the user. So we can either abbreviate this as &#8230; <a href="http://www.codesimplicity.com/post/isar-clarified/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my <a href="/archives/49">previous post</a>, I said that there are three major parts to any computer program: <em>Structure</em>, <em>Action</em>, and <em>Results</em>. Also, a program has <em>Input</em>, which could be considered a fourth part of the program, although usually it&#8217;s not the <em>programmer</em> who&#8217;s creating the input, but the user. So we can either abbreviate this as <abbr title="Structure, Action, Results">SAR</abbr> or <abbr title="Input, Structure, Action, Results">ISAR</abbr>, depending on whether or not we want to include &#8220;Input.&#8221;</p>
<p>Now, some people misunderstood me and said, &#8220;Oh, SAR is just another name for <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a>.&#8221; No, I used MVC as an example of SAR, but SAR is a much, much broader concept than MVC&#8211;they are not comparable theories. MVC is a pattern for designing software, whereas SAR (or ISAR) is a statement of the three (or four) components that are present in <em>all software</em>.</p>
<p>The fascinating thing about SAR is that it applies not only to a whole program, but also to any <em>piece</em> of that program. A whole program has a Structure, just as a function or single line of code has a Structure. Same for Action and Results.</p>
<p>Here&#8217;s a little more about each of the pieces, and some examples to help explain:</p>
<h3>Structure</h3>
<p>Here are some examples of things that would be considered &#8220;Structure&#8221; for the whole program:<span id="more-75"></span></p>
<ul>
<li>The directory layout of your code.</li>
<li>All of the classes and how they relate to each other.</li>
<li>The structure (schema) of the database, if your program uses a database.
<p>    Note here that the actual data <em>in</em> the database isn&#8217;t part of the Structure, though. If your program is <em>producing</em> the data and then sticking it into the database, then that&#8217;s part of the <em>Result</em>. If the data is sitting in the database and your program is supposed to process it, then that data is part of the <em>Input</em>.
  </li>
</ul>
<p>Then an individual class (and I mean a &#8220;class&#8221; in the object-oriented sense) would also have a Structure:</p>
<ul>
<li>The names of methods in the class and the types/names of parameters that they take.</li>
<li>The names and types of variables (member variables) in the class.</li>
</ul>
<p>Whether or not a function (or variable) is private or public would also be part of the Structure, because Structure describes what something <em>is</em> (as opposed to what it <em>does</em> or <em>produces</em>), and &#8220;private&#8221; or &#8220;public&#8221; are words that describe what something <em>is</em>.</p>
<p>A Structure is sort of &#8220;the components of the program&#8221; or &#8220;the pieces you make the program out of.&#8221; Function names and types, variable names and types, classes&#8211;these things are all <em>Structure</em>.</p>
<p>Structure just &#8220;sits there.&#8221; It doesn&#8217;t <em>do</em> anything unless there&#8217;s some part of your program that <em>uses</em> it. For example, a method doesn&#8217;t call <em>itself</em>, it just sits there waiting to be called. A variable doesn&#8217;t put data into itself, it just sits there waiting for you to do something with it.</p>
<h3>Action</h3>
<p>The <em>Action</em> of a whole program is very easy to understand. A tax program &#8220;does taxes.&#8221; A calculator program &#8220;does math.&#8221;</p>
<p>An Action is always a <em>verb</em> of some sort. &#8220;Calculates.&#8221; &#8220;Fixes.&#8221; &#8220;Adds.&#8221; &#8220;Removes.&#8221; Those are <em>actions</em>. Usually they&#8217;re a little more descriptive and specific, though, like, &#8220;Calculates how much rainfall there will be in Africa next year,&#8221; or &#8220;Fixes broken hard drives.&#8221;</p>
<p>Inside of a class, the <em>Action</em> is the code <em>inside</em> of the methods. That&#8217;s all some sort of <em>action</em>&#8211;something going on, something happening. In many programming languages, you can also have code outside of any class or function&#8211;code that just <em>runs</em> when you start the program. That&#8217;s <em>Action</em>.</p>
<h3>Results</h3>
<p>Every program, every function, and every line of code has some <em>effect</em>. It produces some <em>result</em>. </p>
<p>A Result can always be talked about in the <em>past tense</em>&#8211;it&#8217;s something that <em>has been</em> done or created. &#8220;Calculated rainfall,&#8221; or &#8220;Fixed hard drives.&#8221;  In a tax program, we&#8217;d call the Result either <em>filed taxes</em> or <em>filled-out tax forms</em>. As you can see, it sounds a lot like the Action, just <em>completed</em>.</p>
<p>You don&#8217;t <em>have</em> to describe a Result in the past tense, though. I&#8217;m just saying it always <em>can be</em> described that way. For example, in a calculator program, normally we&#8217;d call the Result of addition &#8220;the sum,&#8221; (not past-tense, just a noun) but you could also say that the Result is &#8220;added numbers&#8221; (which is past-tense). Same thing, just a different way of describing it.</p>
<p>Individual pieces of your program have Results, too. When you call a method or function, it has a very specific Result. It gives you back some data, or it causes some data to be changed.</p>
<p>Whatever your program (or any part of your program) <em>produces</em>, that&#8217;s the Result.</p>
<h3>ISAR in a Single Line of Code</h3>
<p>So, I said that SAR applies to a single line of code, but I didn&#8217;t give you any examples. So here&#8217;s a single line of code:</p>
<blockquote><p>
  <code>x = y + z</code>
</p></blockquote>
<p><code>y</code> and <code>z</code> in that line are part of the Structure. They&#8217;re variables that hold some data. To make an analogy: A jug is a structure that holds water. A variable is a structure that holds data. </p>
<p>The numbers that are stored inside <code>y</code> and <code>z</code> are the <em>Input</em>. That&#8217;s the data that we&#8217;re doing something with.</p>
<p><code>+</code> is an Action: &#8220;Add these two numbers.&#8221; <code>=</code> is also an Action: &#8220;Store the result in <code>x</code>.&#8221;</p>
<p>And, of course, the Result is the sum of <code>y</code> and <code>z</code> that gets stored in <code>x</code>. If <code>y</code> is 1 and <code>z</code> is 2, then the Result is the number 3, which gets stored in <code>x</code>. (Also note that <code>x</code> is a itself variable and thus also part of the Structure, but that&#8217;s getting pretty technical.)</p>
<h3>Wrapping It Up</h3>
<p>So anyhow, I hope that explains SAR a bit better. It&#8217;s a concept that applies to any kind of programming, whether you&#8217;re building a big application or just writing a single-line script. And it&#8217;s not something that you have to think about in-depth every time you write a piece of code, but it&#8217;s something that can help us analyze and understand a program, particularly when we&#8217;re looking at how we can improve its design.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/isar-clarified/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/isar-clarified/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Structure, Action, and Results</title>
		<link>http://www.codesimplicity.com/post/structure-action-and-results/</link>
		<comments>http://www.codesimplicity.com/post/structure-action-and-results/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 22:38:30 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=49</guid>
		<description><![CDATA[There&#8217;s a very popular model for designing software that we&#8217;ve all heard of if we&#8217;re web developers, and probably most desktop developers have heard of too: our old friend MVC. This works well because it reflects the basic nature of a computer program: a series of actions taken on a structure of data to produce &#8230; <a href="http://www.codesimplicity.com/post/structure-action-and-results/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a very popular model for designing software that we&#8217;ve all heard of if we&#8217;re web developers, and probably most desktop developers have heard of too: our old friend <abbr title="Model, View, Controller">MVC</abbr>. This works well because it reflects the basic nature of a computer program: a series of <strong>actions</strong> taken on a <strong>structure</strong> of data to produce a <strong>result</strong>. Programs also take input, and so you could possibly argue that input was a fourth part of a program, but usually I just think of a computer program as the first three parts: Structure, Action, and Results.</p>
<p>In the MVC sense, the Model is the Structure, the Controller is what does the Actions, and the View is the Result. I think the analogy (and the words) Structure, Action, and Results are more widely and accurately applicable to the operation of every program in existence, though, moreso than MVC, though MVC is a perfectly good way of looking at it for GUI applications.</p>
<p>Really, Structure, Action, and Results probably describes almost any machine in existence. A machine has some parts that don&#8217;t move, a framework&#8211;that&#8217;s the structure. Some parts move and do something&#8211;that motion is the action. And of course the machine produces something (otherwise we wouldn&#8217;t care much about it) so that&#8217;s the result.</p>
<p>Computer programs are unusual machines in that they can modify their own structure. However, it&#8217;s important that some part of the program be stable, that they &#8220;not move&#8221; in a logical sense. The way that object classes relate to each other, the names of methods and variables&#8211;these are all parts of the structure that usually don&#8217;t change while you&#8217;re running. (Sometimes you make new classes, methods, or variables while you&#8217;re running, but they usually follow some pre-set plan, so there&#8217;s still a lot of &#8220;not moving&#8221; involved.)</p>
<p>When I&#8217;m writing software, I usually build the Structure first, then I work on the Actions, and then I work on the displaying of the Result. Some people work backwards from the Results, that&#8217;s fine too. Probably the only inadvisable thing to do is to start with the Actions, since it&#8217;s kind of confusing to be performing Actions without a Structure and with no defined Result.</p>
<p>There&#8217;s so much to this concept that I could probably write a whole book just on this one topic, but I think this is a decent introduction, and I&#8217;m sure that given this, you can think of lots of other useful applications of it.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/structure-action-and-results/#comments">Comments: 0</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/structure-action-and-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplicity and Security</title>
		<link>http://www.codesimplicity.com/post/simplicity-and-security/</link>
		<comments>http://www.codesimplicity.com/post/simplicity-and-security/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 20:00:52 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=48</guid>
		<description><![CDATA[A big part of writing secure software (probably the biggest part) is simplicity. When we think about software security, the first question that we ask is, &#8220;How many different ways could this program possibly be attacked?&#8221; That is, how many &#8220;ways in&#8221; are there? It&#8217;s a bit like asking &#8220;How many doors and windows are &#8230; <a href="http://www.codesimplicity.com/post/simplicity-and-security/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A big part of writing secure software (probably the biggest part) is simplicity.</p>
<p>When we think about software security, the first question that we ask is, &#8220;How many different ways could this program possibly be attacked?&#8221; That is, how many &#8220;ways in&#8221; are there? It&#8217;s a bit like asking &#8220;How many doors and windows are there on this building?&#8221; If your building has 1 exterior door, it&#8217;s very easy to protect that door. If it has 1000, it will be impossible to keep the building secure, no matter how good the doors are or how many security guards you have.</p>
<p>So we need to limit the &#8220;ways in&#8221; to our software to some reasonable number, or it won&#8217;t ever be secure. That&#8217;s accomplished by making the <em>overall system</em> relatively simple, or breaking it down into very simple and totally separate component parts. </p>
<p>Then, once we&#8217;ve limited the ways in, we need to start thinking about &#8220;How many different possible attacks are there against each way in?&#8221; We limit that by making the ways in <em>themselves</em> very simple. Like a door with only one unique key, instead of a door that can take five different keys, all of which individually will open the door.</p>
<p>Once that&#8217;s done, we limit how much damage any attack could do if it got through. For example, in a building, we&#8217;d make any given door only allow access to one room.</p>
<p>All of this explains, for example, why Windows is fundamentally flawed and will <em>never</em> be secure, and why UNIX-based systems have a better reputation for security. <span id="more-48"></span></p>
<p>Standard UNIX has a very small number of system calls that are used to implement the vast majority of all UNIX programs out there. (Even the extended list is only about 140 system calls, though most of those are never used by the average program.) Each system call is extremely specific and does one very limited thing.</p>
<p>Windows, on the other hand, has a <a href="http://www.metasploit.com/users/opcode/syscalls.html">ridiculous set of system calls</a> that are confusing, take too many arguments, and do too much.</p>
<p>Going up to a higher level in the system, the <a href="http://msdn.microsoft.com/en-us/library/aa383686(VS.85).aspx">Windows API</a> is massive and complex. It&#8217;s a strange beast that controls both the OS and the GUI. There&#8217;s really no equivalent thing in UNIX (because the OS and the GUI are separate), but we can at least compare parts of it. Here&#8217;s <a href="http://msdn.microsoft.com/en-us/library/bb540361(VS.85).aspx">The Windows Logging API</a>. Here&#8217;s <a href="http://www.gnu.org/software/libc/manual/html_node/Submitting-Syslog-Messages.html#Submitting-Syslog-Messages">the Linux Logging API</a>. There&#8217;s just no comparison. It&#8217;s like a joke. There&#8217;s so many &#8220;ways in&#8221; to any part of Windows that it will <em>never</em> be fundamentally secure.</p>
<p>You might say, &#8220;Well, I haven&#8217;t had a virus on my Windows machine in a long time.&#8221; That&#8217;s not what I&#8217;m talking about&#8211;I&#8217;m talking about <em>fundamental</em> security. In order to have a secure Windows machine, you have to have a firewall that asks you every time a program wants to make an outbound connection. You have to have a spyware scanner. You have to have <a href="http://www.thepcspy.com/read/what_really_slows_windows_down/5">antivirus software that slows down your computer by as much as 2000%</a>. If Windows was <em>secure</em>, you wouldn&#8217;t need those things.</p>
<p>When we design our own systems, keeping them simple is the only real guarantee of security. We keep each &#8220;way in&#8221; to the system as simple as possible, and we never add more &#8220;ways in&#8221; than we absolutely need. These are compatible things, too, because the simpler each &#8220;way in&#8221; is, the <em>fewer</em> we&#8217;ll actually need. That may not make sense until you think about it this way: If all actions on the system can be reduced to, say, 13 fundamental function calls, then the user can do <em>everything</em> with those 13 calls, even if they&#8217;re not very powerful individually. If instead we only let them do 100 different specific tasks, and <em>don&#8217;t</em> allow them to use the 13 fundamental calls, we have to add a new function for <em>every specific task</em>.</p>
<p>There are lots of other &#8220;ways in&#8221; to a program than just its public API, too. How the user interface interacts with the backend&#8211;that involves various &#8220;ways in&#8221;. Can we access this program&#8217;s internal structure from another program? That would be another &#8220;way in.&#8221; There&#8217;s <em>lots</em> of ways to apply this principle. </p>
<p>Any way you slice it, though, the best way to get real security in things is <em>simplicity</em>. We shouldn&#8217;t have to put a small army in front of our software just to keep it secure. It should just fundamentally have so few &#8220;ways in&#8221; that it doesn&#8217;t need the protection, and those &#8220;ways in&#8221; should be so streamlined and simple that they&#8217;re impossible to exploit.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/simplicity-and-security/#comments">Comments: 14</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/simplicity-and-security/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>What Is A Computer?</title>
		<link>http://www.codesimplicity.com/post/what-is-a-computer/</link>
		<comments>http://www.codesimplicity.com/post/what-is-a-computer/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 18:00:49 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=47</guid>
		<description><![CDATA[What is a computer? You&#8217;d think that would be a fairly simple question. After all, I&#8217;m using one to type this up, I ought to know what it is, right? I mean obviously, it&#8217;s a&#8230;computer! I mean, it&#8217;s got a keyboard, and a monitor, and there&#8217;s that box down there&#8230; But what is it that &#8230; <a href="http://www.codesimplicity.com/post/what-is-a-computer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>What is a computer? You&#8217;d think that would be a fairly simple question. After all, I&#8217;m using one to type this up, I ought to know what it is, right? I mean obviously, it&#8217;s a&#8230;computer! I mean, it&#8217;s got a keyboard, and a monitor, and there&#8217;s that box down there&#8230;</p>
<p>But what is it that makes all that stuff a <em>computer</em>? Why do we look at it and go, &#8220;Oh yeah, that&#8217;s a computer,&#8221; as opposed to, say, &#8220;Oh, that&#8217;s just a TV,&#8221; or &#8220;That&#8217;s where I keep the leprechauns at night.&#8221;?</p>
<p>Some people try to define the word &#8220;computer&#8221; just by saying &#8220;it&#8217;s got such and such parts and they all work this way,&#8221; but that&#8217;s like saying &#8220;airplanes have two wings and jet engines.&#8221; It&#8217;s true, but I could build an airplane that <em>didn&#8217;t</em> have two wings or jet engines. The way something <em>works</em> is not a <em>definition</em> for that thing.</p>
<p>Others try to define it mathematically, but that can also be somewhat limiting, because then only the devices that fit into your mathematical scheme are computers, and there are multiple mathematical models that would all be considered &#8220;computers.&#8221;</p>
<p>So I turned to the dictionary. That was fun for me&#8211;I&#8217;m a dictionary fanatic. I&#8217;ve got lots of great dictionaries, and there are even more online. The Compact Oxford English Dictionary had <a href="http://www.askoxford.com/concise_oed/computer?view=uk">the best definition</a>, as it turned out.. I was very happy with it at first, but when I started to think about it, it didn&#8217;t quite work. For example, it calls computers &#8220;an electronic device,&#8221; and we know that <a href="http://www.maxmon.com/1830ad.htm">computers can be built without electronics</a>.</p>
<p>So I worked to come up with a definition of my own. Strangely enough, the key question that it boiled down to was &#8220;Why is a player piano <em>not</em> a computer?&#8221; It &#8220;processes information&#8221; by playing notes from its roll. If you gave it an etching machine, it could &#8220;store information&#8221; back on to the roll. But despite all that, it&#8217;s clearly not a computer. What is a computer doing that is fundamentally different from a player piano, that a player piano could <em>never</em> do? <span id="more-47"></span></p>
<p>After about two years, I finally came up with an answer that was both simple and all-encompassing. A computer is:</p>
<blockquote><p>
Any piece of matter which can carry out symbolic instructions and compare data in assistance of a human goal.
</p></blockquote>
<p>And that, my friends, is really it. My only thought left is whether I should say &#8220;<em>a series</em> of symbolic instructions&#8221; to more clearly differentiate it from a calculator. What do you think?</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/what-is-a-computer/#comments">Comments: 35</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/what-is-a-computer/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Top 10 Reasons To Work On Open Source (In a California Accent)</title>
		<link>http://www.codesimplicity.com/post/top-10-reasons-to-work-on-open-source-in-a-california-accent/</link>
		<comments>http://www.codesimplicity.com/post/top-10-reasons-to-work-on-open-source-in-a-california-accent/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 18:00:39 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=46</guid>
		<description><![CDATA[So, as a little digression from our normal content, I felt like writing a list of the top 10 reasons to work on open-source software&#8230;but being a born Californian, I felt I had to pay a little respect to my roots. So here we have the top 10 reasons to work on open-source&#8230;as said by, &#8230; <a href="http://www.codesimplicity.com/post/top-10-reasons-to-work-on-open-source-in-a-california-accent/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, as a little digression from our normal content, I felt like writing a list of the top 10 reasons to work on open-source software&#8230;but being a born Californian, I felt I had to pay a little respect to my roots. So here we have the top 10 reasons to work on open-source&#8230;as said by, like, a dude from Cali (with translations underneath <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ).<span id="more-46"></span></p>
<ol>
<li value="10"><strong>Dudes at Silicon Valley parties will think you&#8217;re, like, cool.</strong>
<p>Impress people you don&#8217;t know! You can say, &#8220;I work on an <em>open source</em> project,&#8221; and nod your head like you&#8217;re cool. But no, more seriously, about 50% of all the people I meet at Silicon Valley parties are totally amazed that I&#8217;m one of the primary developers of Bugzilla, something that they use every day.</p>
<p>This doesn&#8217;t work so well with the <em>ladies</em>, though, usually. &#8220;Yeah, I&#8217;m an <em>extremely intense</em> programmer, oh yeah.&#8221;</p>
<p>No, but more seriously: How many girls did <em>you</em> see at OSCON? If anybody has a scheme to get more girls involved or interested in open source, the whole open-source <em>world</em> (the current girls included, I&#8217;m sure) would be thrilled.</p>
</li>
<li value="9"><strong>It totally has nothing to do with whether or not you&#8217;re a &#8220;hottie.&#8221; Just be yourself, man, just be yourself.</strong>
<p>Open Source is definitely one place where you&#8217;ll be respected for your intelligence and ability, not how expensive your clothes are or how much you paid for your haircut. Nobody cares what you look like. We only care how good your ideas are.</p>
</li>
<li value="8"><strong>It&#8217;s hella <em>sick</em> when you&#8217;re interviewing!</strong>
<p>When you&#8217;re interviewing and you worked on some open-source project, it&#8217;s completely valid job experience. Sometimes it even makes you <em>more</em> valuable than normal job experience, if the project is well-known. Also, if you worked on open-source in your spare time, that shows the kind of passion for software engineering that employers are really looking for.</p>
</li>
<li value="7"><strong>You can, like, totally freelance. Seriously? Ya, like totally seriously.</strong>
<p>There&#8217;s a lot of need for contractors for certain open-source projects. If you become a prominent contributor to a project and get your name on its Consultants List, then you can make a living doing consulting for people who use the software!</p>
</li>
<li value="6"><strong>Dude, we&#8217;ll like, laugh at your jokes and stuff, dude.</strong>
<p>I have laughed harder while listening to some conversations on IRC than I have at almost anything else in the world. There&#8217;s something about shared experience and understanding that makes things much funnier than jokes that &#8220;everybody&#8221; is supposed to get. And where else can you make jokes about programming languages and have <em>multiple people</em> actually <em>get</em> them?</p>
</li>
<li value="5"><strong>You can say how, like, stuff <em>goes</em> and people will actually <em>listen</em> to you. Whoa.</strong>
<p>When you write a feature, to a large degree you&#8217;re the one who&#8217;s going to decide how it works! Don&#8217;t like how a particular program works? Well, maybe you could have been the one who wrote that feature instead! Don&#8217;t like some documentation? What if you had written it instead?</p>
<p>And if you don&#8217;t like how something works now, the more you contribute to an open-source project, the more say you&#8217;ll have in fixing that thing. Have an itch to just make things work <em>right</em>? Open Source is the place to be.</p>
</li>
<li value="4"><strong>You learn, like, so much stuff, like seriously.</strong>
<p>Are you looking for something new, some way to expand your horizons and learn something new instead of just mechanically doing the same thing over and over at work? No matter what your interest is, there&#8217;s going to be some open-source project out there that uses the things you want to learn about. And it won&#8217;t just be some tiny project just for yourself, but something that people really use!</p>
</li>
<li value="3"><strong>You can like, <em>belong</em> to something, and stuff. That&#8217;s some cosmic stuff, man.</strong>
<p>When you contribute to an open-source project, you&#8217;re not just a cog in a great machine, or just a worker at a job. You become part of a larger community, with its own in-jokes, culture, and people.</p>
<p>I used to think that was just some marketing gibberish, but it&#8217;s really true. It may not be the best way to find people who you can &#8220;hang out&#8221; with every day, but you&#8217;ll get to know a lot of new people and become part of a group in a very definite way.</p>
<p>It&#8217;s even more true if you go to conventions like OSCON or the more specific ones for the various open-source projects, where you can meet and hang out with lots of other developers &#8220;In Real Life&#8221;, most of whom are really great (and intelligent) people.</p>
</li>
<li value="2"><strong>You get to feel like a revolutionary (a revolutionary <em>nerd</em>, but&#8230;hey, s&#8217;all good, s&#8217;all good).</strong>
<p>Yeah! Down with The Man! We don&#8217;t need any stinkin&#8217; proprietary software!</p>
<p>You can even get to <em>protest</em> things, like software patents! You&#8217;ll be almost as cool as your <em>parents</em> were in the 60&#8242;s. Kind of.</p>
<p>No, but seriously: Open Source is still a relatively new thing in the world, and you can be a part of blazing its trail. It&#8217;s not the &#8220;normal&#8221; way to do things quite just yet, so if you like being a little different than the swarming masses, open source is the place to be.</p>
</li>
<li value="1"><strong>It seriously helps out, man.</strong>
<p>Working on open-source software helps out a lot of people:</p>
<ul>
<li>The people who use the software. Millions of people use open-source software around the world every day to do their job, handle their problems, or just have fun! You could be affecting the lives of all those people.</li>
<li>The people who write the software. Open-source projects almost all <em>really</em> want your assistance! If a project is at <em>all</em> popular, they probably have more feature requests than they can handle. Don&#8217;t come to an open-source project and say, &#8220;This is what I&#8217;m going to do for you,&#8221; but do come and say, &#8220;How can I help you guys out?&#8221; We all need some help, and competent help is much appreciated.</li>
<li>All the people who <em>won&#8217;t have to</em> write the software that you write. Sometimes you just want to download a program to do a task for you. You don&#8217;t want to have to write a program for <em>everything</em> you want to do. You&#8217;re saving the time of millions of users and computer programmers, by creating something that everybody can use and modify!</li>
</ul>
</li>
</ol>
<p>And that&#8217;s my list! Hope you had totally chill time, brah.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/top-10-reasons-to-work-on-open-source-in-a-california-accent/#comments">Comments: 30</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/top-10-reasons-to-work-on-open-source-in-a-california-accent/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Success Comes From Execution, not Innovation</title>
		<link>http://www.codesimplicity.com/post/success-comes-from-execution-not-innovation/</link>
		<comments>http://www.codesimplicity.com/post/success-comes-from-execution-not-innovation/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 18:00:05 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=45</guid>
		<description><![CDATA[There&#8217;s a strange sort of social disease going around in technology circles today, and it all centers around this word &#8220;innovation.&#8221; Everybody wants to &#8220;innovate.&#8221; The news talks about &#8220;who&#8217;s being the most innovative.&#8221; Marketing for companies insists that they are &#8220;innovating.&#8221; Except actually, it&#8217;s not innovation that leads to success. It&#8217;s execution. It doesn&#8217;t &#8230; <a href="http://www.codesimplicity.com/post/success-comes-from-execution-not-innovation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a strange sort of social disease going around in technology circles today, and it all centers around this word &#8220;<a href="http://www.merriam-webster.com/cgi-bin/dictionary?book=Dictionary&#038;va=innovation">innovation</a>.&#8221;</p>
<p>Everybody wants to &#8220;innovate.&#8221; The news talks about &#8220;who&#8217;s being the most innovative.&#8221; Marketing for companies insists that they are &#8220;innovating.&#8221;</p>
<p>Except actually, it&#8217;s not innovation that leads to success. It&#8217;s <em>execution</em>.</p>
<p>It doesn&#8217;t matter how good or how new my idea is. It matters how well I carry it out in the real world.</p>
<p>Now, our history books worship the inventors, not the executors. We are taught all about the people who invent new things, come up with new ideas, and plough new trails. But look around you in present time and in the recent past, and you&#8217;ll see that the most successful people are the ones who <em>carried out the idea really well</em>, not the people who came up with the idea.</p>
<p>Elvis didn&#8217;t invent rock and roll. Ford didn&#8217;t invent the automobile <em>or</em> the assembly line. Apple didn&#8217;t invent the GUI. Webster didn&#8217;t invent dictionaries. Maytag didn&#8217;t invent the washing machine. Google didn&#8217;t invent web searching. I could go on and on and <strong>on</strong>.</p>
<p>Granted, sometimes the innovator also is an excellent executor (Alexander Graham Bell being an example), but usually that&#8217;s not the case. Most inventors don&#8217;t turn out to be the most successful people in their field (or even successful at all).</p>
<p>So stop worrying about &#8220;coming up with something new.&#8221; You don&#8217;t have to do that. You just have to execute an <em>already existing</em> idea really, really well. You can add your own flair to it, maybe, or fix it up a little, but you don&#8217;t have to have something brand new.</p>
<p>There are so many examples that prove this that it&#8217;s hard <em>not</em> to see one if you move your eyes <em>anywhere</em>. Just look, you&#8217;ll see.</p>
<p>Now, I&#8217;m not saying that people shouldn&#8217;t innovate. You should! It&#8217;s fun, and it advances the whole human race a tiny step every time you do. But it&#8217;s not the path to long-term success for you or for any group you belong to. That&#8217;s all in execution.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/success-comes-from-execution-not-innovation/#comments">Comments: 39</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/success-comes-from-execution-not-innovation/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Designing for Performance, and the Future of Computing</title>
		<link>http://www.codesimplicity.com/post/designing-for-perfomance-and-the-future-of-computing/</link>
		<comments>http://www.codesimplicity.com/post/designing-for-perfomance-and-the-future-of-computing/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 18:00:29 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=44</guid>
		<description><![CDATA[So, you might have heard that Google released a web browser. One of the features of this web browser is its JavaScript engine, called v8, which is designed for performance. Designing for performance is something that Google does often. Now, designing for performance usually leads to complexity. So, being a major supporter of software simplicity, &#8230; <a href="http://www.codesimplicity.com/post/designing-for-perfomance-and-the-future-of-computing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, you might have heard that Google released <a href="http://www.google.com/chrome">a web browser</a>.</p>
<p>One of the features of this web browser is its JavaScript engine, called <a href="http://code.google.com/p/v8/">v8</a>, which is <a href="http://code.google.com/apis/v8/design.html">designed for performance</a>.</p>
<p>Designing for performance is something that Google does often. Now, designing for performance usually leads to complexity. So, being a major supporter of software simplicity, I&#8217;m opposed, in a theoretical sense, to designing for performance. </p>
<p>However, Google is in an interesting situation. Essentially, we live in the Bronze Age of computing (or perhaps the Silicon Age, as I suspect future historians may call this period of history). Our computers are primitive, compared to what we are likely to have 50 to 100 (or 1000!) years from now. That may seem hard to believe, but it&#8217;s always hard to imagine the far future. Google is operating on a level far exceeding our current hardware technology, really, and so their design methods unfortunately can&#8217;t live in a theoretical fairy-land where hardware is always &#8220;good enough.&#8221; (However, I personally <em>like</em> to live in that land, when possible, because hardware will improve as time goes on&#8211;an important fact to understand if you&#8217;re going to have a long-lived software project).</p>
<p>What is it about our computers that makes them so primitive? Well, usually I don&#8217;t go about predicting the future in this blog, or even talking about too many specifics, because I want to keep things generally applicable (and also because the future is hard to predict, particularly the far future). But I will talk about some of my thoughts here on this, and you can agree with them or not, as you please. <span id="more-44"></span></p>
<h3>Our Current Computers</h3>
<p>First, you have to understand that to me, anything that could be running this web browser right now, that could be showing me my desktop, and that I could be typing into right now&#8211;I&#8217;d consider that a computer. It actually doesn&#8217;t matter what it&#8217;s doing underneath, or <em>how</em> it works. A good, offhand definition then of a computer would be:</p>
<blockquote><p>
  Any piece of matter which can carry out symbolic instructions and compare data in assistance of a human goal.
</p></blockquote>
<p>Currently computers do this using math, which they do with <a href="http://nobelprize.org/educational_games/physics/transistor/history/">transistors</a>, <em>digitally</em>. The word &#8220;digital&#8221; comes from &#8220;digit&#8221;, a word meaning, basically, &#8220;fingers or toes.&#8221; For most people, your fingers and toes are separate, individual items. They don&#8217;t blend into each other. &#8220;Digitally&#8221; means, basically, &#8220;done with separate, individual numbers.&#8221; You know, like 1, 2, 3, 4&#8211;not 1.1, 1.2, 1.3. People (normally) have 1 or 2 fingers, not 1.5 fingers.</p>
<p>Said another way, current computers change from one fixed state to another, very fast. They follow instructions that change their state. I don&#8217;t really care if we say that the state is &#8220;transistor one is on, transistor two is off, transistor three is on&#8230;&#8221; or &#8220;Bob has a cat, Mary has a dog, Jim has a cat&#8230;&#8221; it&#8217;s all a description of a state. What we care about ultimately is the total current state. If there are 1,000,000 possible states (and there are far, far, <strong>far</strong> more in a current computer), then we can say that &#8220;we are at state 10,456&#8243; and that&#8217;s all we really need to know.</p>
<p>The problem with current computers is <a href="http://www.intel.com/technology/mooreslaw/index.htm">Moore&#8217;s Law</a>. We don&#8217;t need computers that are twice as fast. We need computers that are about a million times faster than the ones we have. We need computers so fast that software engineers never have to worry about performance ever again, and can just design their code to be the sanest, most maintainable thing possible. With that kind of performance, we could design almost any software imaginable.</p>
<p>The problem is that with Moore&#8217;s Law, we&#8217;re not going to get computers 1000 times faster for about 20 years. We&#8217;re going to get to 1,000,000 times faster in about 40 years. And there&#8217;s a chance that the laws of physics will stop us dead in our tracks before that point, anyhow.</p>
<h3>Future Computers</h3>
<p>So, let&#8217;s stick with the idea of a machine that changes states for the near future, because I can&#8217;t think of any other clever way to make a computer that would follow my definition from above. There are three problems, then:</p>
<ol>
<li>How many states can we represent?</li>
<li>How many physical resources does it require to represent all those states (including space, power, etc.)?</li>
<li>How quickly can we change between states?</li>
</ol>
<p>And then &#8220;How many states can we represent at once?&#8221; might also be a good question&#8211;we&#8217;re seeing this come up more and more with dual-core and quad-core processors (and other technologies before that, but I don&#8217;t want to assume that everybody reading my blog is an expert in hardware architecture, and I don&#8217;t want to explain those technologies).</p>
<p>So the ideal answers are:</p>
<ol>
<li>We can represent an infinite number of states.</li>
<li>It requires no physical resources to represent them.</li>
<li>We can change between them without time.</li>
</ol>
<p>And then also &#8220;We can represent an infinite number of different states at once.&#8221;</p>
<p>Currently we theoretically <em>could</em> represent an infinite number of states, we&#8217;d just have to add more transistors to our chip. So really, the question becomes, &#8220;How many states can we represent with how many physical resources?&#8221; Currently we can fit two states into 32 <a href="http://www.nanooze.org/english/articles/article4_howbigisananometer.html">nanometers</a>. (That&#8217;s one transistor.)</p>
<p>My <em>suspicion</em> is that the future is <em>not</em> in fitting two states into a continually smaller space, but in fitting a <em>near-infinite</em> number of states into a slightly larger space. Electricity and other force waves can be &#8220;on&#8221; or &#8220;off&#8221;, but they also have lots of other properties, many of which are sufficient to represent an infinity (or near-infinity). Frequency of any wave represents an infinity, for example&#8211;you can have a 1 Hz wave, a 1.1 Hz wave, a 1.15 Hz wave, a 1.151 Hz wave, etc. So, that basically answers Question 1 ideally&#8211;you can have an infinite number of states, you just have to have some device which is sufficiently small, in which a wave can have its properties modified and measured by electronics, optics, or some other such technology.</p>
<p>You&#8217;ll notice that we&#8217;ve also conveniently answered our bonus question, because we can represent quite a few different states at once, once each individual component of our system can represent an infinity all by itself.</p>
<p>If we want to look a bit further into the future, our second question can be answered by the fact that waves take up essentially <em>no space</em> (only the medium that they vibrate takes up space). Our understanding of physics is not (as far as I know) currently good enough to create structures out of pure force just yet, but such structures would come quite close to taking up &#8220;no physical resources.&#8221;</p>
<p>And beyond that (how we get the state changes to happen without time), I have no idea. That question may be unanswerable, and may only be resolvable by changing computers to being something other than mathematical devices. (That is, not be involved with states at all, but some other method of following instructions and comparing data.) But the better our components become, the closer we can get to &#8220;no time.&#8221;</p>
<h3>The Roundup</h3>
<p>So there&#8217;s my thoughts for the day on the future of computing. Sometimes designing software for performance is a necessary evil (but really only in the case where it&#8217;s an extreme issue, like with Google&#8217;s products, or the great new need for speed in JavaScript nowadays, or in other low-level places), but I hope that future changes in the fundamental architecture of computers will obsolete that necessity.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/designing-for-perfomance-and-the-future-of-computing/#comments">Comments: 14</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/designing-for-perfomance-and-the-future-of-computing/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Design From The Start</title>
		<link>http://www.codesimplicity.com/post/design-from-the-start/</link>
		<comments>http://www.codesimplicity.com/post/design-from-the-start/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 18:00:38 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=43</guid>
		<description><![CDATA[I don&#8217;t know if this has become clear to everybody yet, but you really need to design from the start. You need to be working on simplicity and the other Laws of Software Design from the very beginning of your project. My policy on projects that I control is that we never add a feature &#8230; <a href="http://www.codesimplicity.com/post/design-from-the-start/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if this has become clear to everybody yet, but you really need to design <em>from the start</em>. You need to be working on simplicity and the other <a href="/category/laws-of-software">Laws of Software Design</a> from the very beginning of your project.</p>
<p>My policy on projects that I control is that we <em>never</em> add a feature unless the design can support it simply. This drives some people crazy, notably people who have no concept of the <a href="/archives/17">future</a>. They start to foam at the mouth and say things like, &#8220;We can&#8217;t wait! This feature is <em>so important</em>!&#8221; or &#8220;Just put it in now and we&#8217;ll just clean it up later!&#8221; They don&#8217;t realize that this is their <em>normal attitude</em>. They&#8217;re going to say the same thing about the next feature. If you give in to them, then <em>all</em> of your code will be poorly designed and much too complex. It&#8217;ll be Frankenstein&#8217;s monster, jammed together out of broken parts. And just like the friendly green giant, it&#8217;ll be big, ugly, unstable, and harmful to your health. <span id="more-43"></span></p>
<p>Adding a tiny little piece and refactoring it afterward is fine. Landing a huge feature that the architecture can&#8217;t support and then trying to clean it up afterward is a terrible task. Size matters.</p>
<p>The worst situation, however, is when you let people keep adding features with no design for months or years, and then one day you wake up and realize that <a href="http://uk.youtube.com/watch?v=iFIMxZVaSzk">something is not right</a>. Now you have to fix your <em>whole codebase</em>. This is a terrible task, because just like adding a new feature, it can&#8217;t be done all at once, unless you want to <a href="http://www.joelonsoftware.com/articles/fog0000000069.html">re-write</a>. If you want to start doing things the right way, you have to start doing things the <em>right way</em>. And that means that you have to fix the design piece by piece, in simple steps. That usually requires months or <em>years</em> of effort&#8211;totally wasted effort, because you should have just designed <em>from the start</em>. You should have <a href="/archives/17">thought about the future</a>.</p>
<p>If your project lacks a strict design, and it continues to grow, then you will eventually end up over your head in complexity. I understand that this is hard for some people to imagine. Some folks can&#8217;t imagine that there is a future beyond lunch. Other folks just haven&#8217;t had enough experience to understand how complex things can get. And I understand that there can be a corporate culture that says, &#8220;Oh, we just hack in new features, and we should do things the right way, but we can&#8217;t because <em>blah blah blah</em>.&#8221; But one day your project will fail. And no matter how many <em>reasons</em> you can give for that failure, it won&#8217;t change the fact that your project <em>failed</em>.</p>
<p>Often, when you&#8217;ve done your design right, there&#8217;s not a whole lot of credit that comes your way. Catastrophic failures in design are big and noticeable, small increments of work toward a good design are invisible to people who aren&#8217;t intimately connected with the code. So this can make it difficult&#8211;handling a big failure gets you a lot of thanks, preventing one in the first place, well, nobody noticed.</p>
<p>So I&#8217;ll congratulate you myself. Did you design from the start? That was awesome. You absolutely did the right thing. Have you started designing now? Well, you should have started earlier, but congratulations on starting to move in the right direction. Your users and fellow developers will see the benefits&#8211;working software, on-time releases, and a clear, understandable codebase. Will they know how much work it took to get it that way? Maybe not. But that&#8217;s OK. Sometimes doing things the right way is really its own reward.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/design-from-the-start/#comments">Comments: 8</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/design-from-the-start/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Sane Software Design</title>
		<link>http://www.codesimplicity.com/post/sane-software-design/</link>
		<comments>http://www.codesimplicity.com/post/sane-software-design/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 19:30:31 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=41</guid>
		<description><![CDATA[I have come up with an analogy that should make the basic principles of software design understandable to everybody. The great thing about this analogy is that it covers basically everything there is to know about software design. Imagine that you are building a structure out of lead bars. The final structure will look like &#8230; <a href="http://www.codesimplicity.com/post/sane-software-design/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have come up with an analogy that should make the basic principles of software design understandable to everybody. The great thing about this analogy is that it covers basically everything there is to know about software design. <span id="more-41"></span></p>
<p>Imagine that you are building a structure out of lead bars. The final structure will look like this:</p>
<pre>
   |
_|_|_|_
   |
   |
   |</pre>
<p>You have to build the structure and put it up at a certain location, so that people can use it (for this example, we don&#8217;t care what they need it for, but assume that they need it for some specific reason).</p>
<p>The lead bars represent the individual pieces of your software. Putting it up at the location is like putting your software into production (or sending it out to your users). Everything else should be fairly clear as to how it translates to software, if you think about it. You don&#8217;t have to translate everything to software in your mind as you read, though. Everything should be quite clear if you just imagine that you really are just building a structure out of lead bars.</p>
<h3>The Wrong Way</h3>
<p>Imagine that you were building this all by yourself, and that you had to make the bars out of raw metal. Here&#8217;s the wrong way to build it:</p>
<ol>
<li>Make one tall lead bar, and lay it flat on the ground in your workshop:
<pre>
|
|
|
|
|</pre>
</li>
<li>Cut a hole through the tall bar, and measure that hole.</li>
<li>Make a new bar that will fit through that hole:
<pre>_____</pre>
</li>
<li>Put that new bar through the hole and weld them together permanently:
<pre>
  |
__|__
  |
  |
  |</pre>
</li>
<li>Cut two holes in the horizontal bar, measure them, and make two new lead bars that will fit in those individual holes:
<pre>|   |</pre>
</li>
<li>Insert the two bars into the horizontal bar, and weld them together permanently:
<pre>
   |
_|_|_|_
   |
   |
   |</pre>
</li>
<li>With a forklift, put this into a truck to move it to the location where it&#8217;s supposed to be (It&#8217;s too heavy to move by yourself.)</li>
<li>With a pulley, make the construction stand upright and put it into the ground.</li>
<li>Discover that it won&#8217;t stay up by itself, but if you put some blocks next to it as an emergency solution, it doesn&#8217;t fall over:
<pre>
   |
_|_|_|_
   |
  _|_
 | | |</pre>
</li>
<li>Three days later, watch the structure fall over and break because the blocks aren&#8217;t actually a permanent solution.</li>
<li>Unfortunately, part of the horizontal bar has snapped, and you have to fix it. This is difficult because the bars are all welded together, so you can&#8217;t easily take out the bar and replace it with another one. You either have to build a whole new structure or weld together the broken bar. Welding the broken halves together creates a weak bond, but it&#8217;s cheaper than building a whole new structure, so you just weld them.</li>
<li>Put stronger blocks next to the structure to keep it up.</li>
<li>Next week, the weather breaks the welded bars. Weld them back together again.</li>
<li>In six days, watch the structure fall over because blocks are not a permanent solution.</li>
<li>Repeat the last few steps until you run out of money or time.</li>
</ol>
<h3>Analysis of The Wrong Way</h3>
<p>So, what was <em>good</em> about the above process? Well, it did allow one person to successfully complete a structure. In software terms, that one person &#8220;made something that works.&#8221; It also created a lot of work for one person, which is good if that one person wanted a lot of work.</p>
<p>What was bad about it?</p>
<ul>
<li>The bars all had to be made in sequence, individually.</li>
<li>Problems with the final structure (that it wouldn&#8217;t stay up) were only discovered after it was entirely built and in place.</li>
<li>When problems were discovered, they were just &#8220;quick fixed&#8221; without planning for the future.</li>
<li>It took enormous effort to move the completed structure into place.</li>
<li>If we ever had to change the configuration of the bars, we couldn&#8217;t, because they&#8217;re welded together. We&#8217;d have to build a whole new structure.</li>
<li>The completed structure requires frequent attention.</li>
</ul>
<p>And I&#8217;m sure we could come up with other faults. This whole analogy (including the parts below) could be analyzed all day.</p>
<h3>Bringing It To a Group</h3>
<p>The biggest problem with the Wrong Way process is that it wouldn&#8217;t work <em>at all</em> if there were multiple people working on the project (as there usually are in real-world software projects). The main problem is that you had to measure all the holes before you built a bar, so everything had to be done by one person, in order.</p>
<p>There are, generally, two ways to solve this problem:</p>
<ol>
<li>Write a specification for the sizes of all the individual holes beforehand, and then spread out the work of making all the different bars for each hole.
<p>This is problematic because one person has to write this specification, and if this were a large project (imagine thousands of holes instead of just three or four), it would take a lot of time. Nobody else on the team can be working until the specification is completed. The spec could be full of mistakes&#8211;there are as many chances for mistakes as there are holes specified, so if there are thousands of holes, that&#8217;s a lot of chances for errors to be made.</p>
</li>
<li>Just say, &#8220;All bar holes will always be the same size and in the same places on the bars. Bars can be screwed together.&#8221; Then set everybody to making bars with standardized holes (or go buy them from the store).
<p>That is simple, and it gets everybody working at once. Because you&#8217;ve standardized your bars, you&#8217;ve lost a little flexibility in dealing with any special cases that come up (maybe a half-width hole would be more useful in some part of the structure). However, you should be able to build a decent structure entirely with standard holes, so that&#8217;s not too much of a problem. And when you have a standard, you can make specific exceptions in some places more easily than if things are not standardized.</p>
<p>Of course, with this method it is very important that you do a little research to pick a good hole size and good bars.</p>
</li>
</ol>
<h3>The Right Way</h3>
<p>So, what would our process look like for many people all using standardized bars that screw together? (This is the right way to build something.)</p>
<ol>
<li>Have your team all go build (or buy) their individual bars. You can have as many people working simultaneously as there are bars in the structure.</li>
<li>Have them test their individual bars to make sure that they won&#8217;t break.</li>
<li>Have them carry their individual bars to the place where the structure needs to be.</li>
<li>Put the first bar into the ground, standing upright:
<pre>|</pre>
</li>
<li>Push on the first bar from all angles to see if it is going to fall over.</li>
<li>Screw in a second bar to the first one:
<pre>|
|</pre>
</li>
<li>Test the complete structure now, only to find that it&#8217;s not strong enough to stand by itself.</li>
<li>Attach unbreakable steel ropes to the sides of the structure, like so:
<pre>
  /|\
 / | \</pre>
<p>These ropes should be able to withstand anything within reason, or even well beyond reason.</p>
</li>
<li>Test it again and find out that it now can stay up no matter how hard you push on it.</li>
<li>Add a third bar, and put new ropes on so that it looks like this:
<pre>
   /|\
  //|\\
 // | \\</pre>
</li>
<li>Remove the lower ropes:
<pre>
   /|\
  / | \
 /  |  \</pre>
<p>(Anybody who&#8217;s been involved in refactoring Bugzilla can remember doing a lot of things that sound <em>just like</em> these last two steps. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
</li>
<li>Test it again.</li>
<li>Continue these steps until you have a completed structure:
<pre>
      |
   _|_|_|_
  /   |   \
 /    |    \
/     |     \</pre>
</li>
<li>When a pipe breaks in three months, figure out what was wrong with that pipe, fix the problem, and replace it with a new pipe that fits into the same holes. The structure is just as strong as it was before.</li>
<li>Continue the above process until you no longer have to pay attention to the structure and it just stays up all by itself.</li>
<li>Adjust the structure as necessary for the changing requirements of the users of the structure, which is easy because the holes are all standardized.</li>
</ol>
<p>So, did you notice that we followed all the Laws Of Software Design?</p>
<ul>
<li>We <a href="/archives/17">thought about the future</a>. We did that for the entire process, but we particularly did it when we put on unbreakable steel ropes that would last no matter what happened in the future.
<p>Also note that we <a href="/archives/32">didn&#8217;t try to predict the future</a>, we just followed our principles so that no matter what happened, our structure was going to stay together and be easy to build.</li>
<li>We <a href="/archives/18">allowed for change</a> by screwing the bars together instead of welding them. We also put standardized holes in all the bars, even if we didn&#8217;t need them, in case we needed to add more bars in the future.</li>
<li>In every step of creating the structure, we <a href="/archives/19">kept our changes small</a> and tested everything as we went. Creating each individual bar was a small task, and we put them together in small steps.</li>
<li>And of course, the most important decision we made was to <a href="/archives/23">keep it simple</a> by making all the holes consistent and standard, and keeping each piece small and simple.</li>
</ul>
<p>Whether you are one person or a thousand, whether your project is 10 lines of code or 10 million, this process will work.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/sane-software-design/#comments">Comments: 2</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/sane-software-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slides From My Talk</title>
		<link>http://www.codesimplicity.com/post/slides-from-my-talk/</link>
		<comments>http://www.codesimplicity.com/post/slides-from-my-talk/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 00:35:55 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Administrative]]></category>
		<category><![CDATA[code simplicity]]></category>
		<category><![CDATA[oscon]]></category>
		<category><![CDATA[slides]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=38</guid>
		<description><![CDATA[So, I just had my talk, Code Simplicity: Software Design In Open Source Projects at OSCON 2008. It went really well! Here&#8217;s the slides from my talk (also available in PDF Format). -Max Comments: 0]]></description>
			<content:encoded><![CDATA[<p>So, I just had my talk, <a href="http://fosscoach.wikia.com/wiki/Code_Simplicity:_Software_Design_In_Open_Source_Projects">Code Simplicity: Software Design In Open Source Projects</a> at <a href="http://en.oreilly.com/oscon2008">OSCON 2008</a>. It went really well!</p>
<p>Here&#8217;s the <a href="/wp-content/uploads/2008/07/code-simplicity-open-source-design.odp">slides from my talk</a> (also available in <a href="/wp-content/uploads/2008/07/code-simplicity-open-source-design.pdf">PDF Format</a>).</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/slides-from-my-talk/#comments">Comments: 0</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/slides-from-my-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Talking at OSCON</title>
		<link>http://www.codesimplicity.com/post/talking-at-oscon/</link>
		<comments>http://www.codesimplicity.com/post/talking-at-oscon/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 12:15:45 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Administrative]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=37</guid>
		<description><![CDATA[I&#8217;m going to be talking at FOSSCoach, a free series of lectures at OSCON. You don&#8217;t need a session pass to attend, but you do need to register (for free). I&#8217;ll be talking on Thursday, July 24, at 3:25pm, in either room E143 or E144 at the Oregon Convention Center. I&#8217;ll tell you basically everything &#8230; <a href="http://www.codesimplicity.com/post/talking-at-oscon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to be talking at <a href="http://fosscoach.wikia.com/wiki/FOSSCoach_at_OSCON_2008">FOSSCoach</a>, a free series of lectures at OSCON. You don&#8217;t need a session pass to attend, but you do need to <a href="http://fosscoach.wikia.com/wiki/OSCON08:How_To_Register">register</a> (for free).</p>
<p>I&#8217;ll be talking on Thursday, July 24, at 3:25pm, in either room E143 or E144 at the <a href="http://maps.google.com/maps?f=q&#038;hl=en&#038;geocode=&#038;q=777+NE+Martin+Luther+King,+Jr.+Blvd.+Portland,+Oregon+97232&#038;sll=37.0625,-95.677068&#038;sspn=35.494074,81.035156&#038;ie=UTF8&#038;ll=45.529591,-122.66171&#038;spn=0.007666,0.019784&#038;z=16">Oregon Convention Center</a>.</p>
<p>I&#8217;ll tell you basically everything I know and have learned about software design, and then how it applies to Open Source software, all in about 45 minutes. Should be fun and interesting!</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/talking-at-oscon/#comments">Comments: 0</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/talking-at-oscon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Source of Bugs</title>
		<link>http://www.codesimplicity.com/post/the-source-of-bugs/</link>
		<comments>http://www.codesimplicity.com/post/the-source-of-bugs/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 19:00:44 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[simplicity]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=35</guid>
		<description><![CDATA[Bugs most commonly come from somebody&#8217;s failure to reduce complexity. Less commonly, they come from the programmer&#8217;s misunderstanding of something that was actually simple. Other than typos, I&#8217;m pretty sure that those two things are the source of all bugs, though I haven&#8217;t yet done extensive research to prove it. When something is complex, it&#8217;s &#8230; <a href="http://www.codesimplicity.com/post/the-source-of-bugs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p>
<strong>Bugs most commonly come from somebody&#8217;s failure to reduce complexity. Less commonly, they come from the programmer&#8217;s misunderstanding of something that was actually simple.</strong>
</p></blockquote>
<p>Other than typos, I&#8217;m pretty sure that those two things are the source of all bugs, though I haven&#8217;t yet done extensive research to prove it.</p>
<p>When something is complex, it&#8217;s far too easy to misuse it. If there&#8217;s a black box with millions of unlabeled buttons on it, and 16 of them blow up the world, somebody&#8217;s going to blow up the world. Similarly, in programming, if you can&#8217;t easily understand the documentation of a language, or the actual language itself, you&#8217;re going to mis-use it somehow.</p>
<p>There&#8217;s no <em>right</em> way to use a box with millions of unlabeled buttons, really. You could never figure it out, and even if you wanted to read the 1000-page manual, you probably couldn&#8217;t remember the whole thing well enough to use the box correctly. Similarly, if you make anything complex enough, people are more likely to use it wrongly than to use it correctly. If you have 50, 100, or 1000 of these complex parts all put together, they&#8217;ll never work right, no matter how brilliant an engineer puts them together.</p>
<p>So do you start to see here where bugs come from? Every time you added some complexity, somebody (and “somebody” could even be you, yourself) was more likely to mis-use your complex code. Every time it wasn&#8217;t <em>crystal clear</em> <strong>exactly</strong> what should be done and how your code should be used, somebody could have made a mistake. Then you put your code together with some other code, and there was another chance for mistakes or mis-use. Then we put more pieces together, etc.</p>
<p>Often, this sort of situation happens: the hardware designer made the hardware really complicated. So it had to have a complicated assembly language. This made the programming language and the compiler really complicated. By the time you got on the scene, you had no hope of writing bug-free code without ingenious testing and design. And if your design was <em>less than perfect</em>, well&#8230;suddenly you have lots of bugs.</p>
<p>This is also a matter of understanding the viewpoint of other programmers. After all, something might be simple to <em>you</em>, but it might be complex to somebody who isn&#8217;t you. </p>
<p>If you want to understand the viewpoint of somebody who doesn&#8217;t know anything about your code, find the documentation of a library that you&#8217;ve never used, and read it.</p>
<p>Also, find some code you&#8217;ve never read, and read it. Try to understand not just the individual lines, but what the whole program is doing and how you would modify it if you had to. That&#8217;s the same experience people are having reading your code. You might notice that the complexity doesn&#8217;t have to get very high before it becomes frustrating to read other people&#8217;s code.</p>
<p>Now, once in a while, something is really simple, and the programmer just misunderstood it. That&#8217;s another thing to watch for. If you catch a programmer explaining something to you in a way that makes no sense, perhaps that programmer misunderstood something somewhere along the line. Of course, if the thing he was studying was extremely complex, he had basically no hope of fully understanding it without a PhD in <em>that thing</em>.</p>
<p>So these two things are very closely related. When you write code, it&#8217;s partially your responsibility that the programmer who reads your code in the future understands it, and understands it easily. Now, he could have some critical misunderstanding—maybe he never understood what “if” meant. That&#8217;s not your responsibility. Your responsibility is writing clear code, with the expectation that the future programmer reading your code understands the basics of programming and the language you&#8217;re using.</p>
<p>So, there are a few interesting rules that you can get out of this one:</p>
<blockquote><p>
The simpler your code is, the fewer bugs you will have.
</p></blockquote>
<blockquote><p>
Always work to simplify everything about your program.
</p></blockquote>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/the-source-of-bugs/#comments">Comments: 9</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-source-of-bugs/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>What Is A Bug?</title>
		<link>http://www.codesimplicity.com/post/what-is-a-bug/</link>
		<comments>http://www.codesimplicity.com/post/what-is-a-bug/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 19:00:21 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=36</guid>
		<description><![CDATA[Okay, most programmers know the story—way back when, somebody found an actual insect inside a computer that was causing a problem. (Actually, apparently engineers have been calling problems “bugs” since earlier than that, but that story is fun.) But really, when we say “bug” what exactly do we mean? Here&#8217;s the precise definition of what &#8230; <a href="http://www.codesimplicity.com/post/what-is-a-bug/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>  Okay, most programmers know the story—way back when, somebody found an actual insect inside a computer that was causing a problem. (Actually, apparently engineers have been calling problems “bugs” since earlier than that, but that story is fun.)</p>
<p>  But really, when we say “bug” what <em>exactly</em> do we mean?</p>
<p>  Here&#8217;s the precise definition of what constitutes a bug. Either:</p>
<ol>
<li>The program did not behave according to the <strong>programmer&#8217;s intentions</strong>.<br/>or<br/></li>
<li>The programmer&#8217;s intentions did not fulfill common and reasonable <strong>user expectations</strong>.</li>
</ol>
<p><span id="more-36"></span>So usually, as long as the program is doing what the programmer intended it to do, it&#8217;s working correctly. Sometimes what the programmer intended it to do is totally surprising to a user and causes him some problem, so that&#8217;s a bug.</p>
<p>  Anything else is a <em>new feature</em>. That is, if the program does exactly what was intended in exactly the expected fashion, but it doesn&#8217;t do <em>enough</em>, that means it needs a new “feature.” That&#8217;s the difference between the definition of “feature” and “bug.”</p>
<p>  Note that hardware can have bugs too. The programmer&#8217;s intention is rarely “the computer now explodes.” So if the programmer writes a program and the computer explodes, that&#8217;s probably a bug in the hardware. There can be other, less dramatic bugs in the hardware, too.</p>
<p>  Essentially, anything that causes the programmer&#8217;s intentions to not be fully carried out can be considered a bug, unless the programmer is trying to make the computer do something it wasn&#8217;t designed to do. For example, if the programmer tells the computer “take over the world” and it wasn&#8217;t designed to be able to take over the world, then the computer would need a new “take over the world” feature. That wouldn&#8217;t be a bug. </p>
<p>  With hardware, you also have to think about the <em>hardware designer&#8217;s</em> intentions, and common and reasonable <em>programmer</em> expectations. At that level, software programmers are actually the main “users”, and hardware designers are the people whose intentions we care about. (Of course, we  also care about the normal user&#8217;s expectations, especially for hardware that users interact with directly like printers, monitors, keyboards, etc.)</p>
<p>  -Max</p>
<p><a href="http://www.codesimplicity.com/post/what-is-a-bug/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/what-is-a-bug/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Creating Complexity: Lock-In To Bad Technologies</title>
		<link>http://www.codesimplicity.com/post/creating-complexity-lock-in-to-bad-technologies/</link>
		<comments>http://www.codesimplicity.com/post/creating-complexity-lock-in-to-bad-technologies/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 19:00:23 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Creating Complexity]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=31</guid>
		<description><![CDATA[In The Never-Shipping Product, I mentioned seven ways to add complexity, and one of them was &#8220;Lock-In To Bad Technologies.&#8221; But what&#8217;s a &#8220;bad&#8221; technology? Is it all just based on opinion? Should we throw our hands up in the air and give in to the whims of our junior developer who thinks writing the &#8230; <a href="http://www.codesimplicity.com/post/creating-complexity-lock-in-to-bad-technologies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>  In <a href="/archives/30">The Never-Shipping Product</a>, I mentioned seven ways to add complexity, and one of them was &#8220;Lock-In To Bad Technologies.&#8221; But what&#8217;s a &#8220;bad&#8221; technology? Is it all just based on opinion? Should we throw our hands up in the air and give in to the whims of our junior developer who thinks writing the application in BASIC is a great idea?</p>
<p>  Well, okay, maybe it&#8217;s not <em>all</em> opinion. There must be some way to tell a good technology from a bad one (besides looking back after five years of development and saying, &#8220;Wow, we really shouldn&#8217;t have decided to base our product off of <a href="http://toastytech.com/guis/bob.html">Microsoft Bob</a>.&#8221;)</p>
<p>When I&#8217;m evaluating a technology for inclusion in one of my projects, I look particularly at the technology&#8217;s <em>survival potential</em>, <em>interoperability</em>, and <em>attention to quality</em>. <span id="more-31"></span></p>
<p>  By &#8220;survival potential&#8221; I mean &#8220;how long is this software going to continue to be maintained?&#8221; If you get stuck with libraries or some dependency that becomes obsolete, you&#8217;re really in for some trouble. You can get some idea of the survival potential of the software by seeing how often they&#8217;ve released recently. Also, how responsive are they to bug reports? Do they have a mailing list that&#8217;s very active with users and developers? Are there lots of people online talking about this technology? If a technology has a <em>lot</em> of momentum now, you can be fairly sure that it&#8217;s not going to die any time soon.</p>
<p>  By &#8220;interoperability&#8221; I mean, &#8220;Does this system use some standard that would allow us to switch to a different system if we want, in the future?&#8221; For example, some database systems support <a href="http://savage.net.au/SQL/">standard SQL</a> very well. Some other ones aren&#8217;t as good about that&#8211;they have strange behaviors that don&#8217;t agree with the standard, or they just don&#8217;t support it at all. Using a database with standard-SQL support would allow you to switch to any other standard-SQL database in the future, whereas using a less-standard database would lock you in.</p>
<p>  The final one, &#8220;attention to quality,&#8221; is more of a subjective measurement, but the idea is to see if the product is getting <em>better</em> in its recent releases. If it&#8217;s open-source, check if they&#8217;re refactoring and cleaning up the code base. Is it becoming easier to use or more complex? Do the people who maintain the technology actually care about the quality of their product, or are they just code monkeys working for the pay? Are there are a lot of serious security vulnerabilities in the software that have been published lately?</p>
<p>  Lock-in is a worse problem when you&#8217;re using proprietary software than when your dependencies are open-source. Proprietary vendors can just stop supporting something (or go out of business), whereas in the open-source world anybody is free to pick up a codebase and maintain it if the original maintainers drop it. Granted, open-source projects are just as likely to fall out of existence as proprietary projects are, but at least there&#8217;s the hope (particularly if the project was very popular) that somebody will come around to maintain it again, with open-source.</p>
<p>Proprietary vendors also have a monetary incentive to lock you into their technologies&#8211;even their free technologies. Once you start using their free technologies, they can sell you services and products related to them. Open-source vendors usually lack that monetary incentive, and so are more <em>likely</em> to be &#8220;friendly&#8221; when you want to switch away from them. This isn&#8217;t always true (some proprietary vendors beat the pants off of open-source vendors in terms of interoperability, and some open-source products will still lock you in), but it&#8217;s enough the case that I automatically think &#8220;let&#8217;s use open-source&#8221; when I&#8217;m looking for interoperability.</p>
<p>  There are other aspects to look at when you&#8217;re choosing a technology, and some of it really is opinion. Some people like the way Ruby <em>looks</em> better than the way Python looks. That&#8217;s a valid reason to choose a technology sometimes&#8211;if you just <em>like</em> some technology more than another one, and everything else seems equal according to the criteria above, go with the one that makes you happy. After all, <em>you&#8217;re</em> the one who&#8217;s going to be using it&#8211;your opinion matters! All I&#8217;ve tried to do here is give some <em>universal</em> guidelines that can be used to weed out the definitely bad choices, and the rest is up to your personal research, needs, and desires.</p>
<p> -Max</p>
<p><a href="http://www.codesimplicity.com/post/creating-complexity-lock-in-to-bad-technologies/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/creating-complexity-lock-in-to-bad-technologies/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Unforseeable Consequences: Why We Have Principles</title>
		<link>http://www.codesimplicity.com/post/unforseeable-consequences-why-we-have-principles/</link>
		<comments>http://www.codesimplicity.com/post/unforseeable-consequences-why-we-have-principles/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 19:00:51 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=32</guid>
		<description><![CDATA[One of the most important things to know about any kind of engineering is: There are some things about the future that you do not know. Obviously it&#8217;d be ideal if we were all-knowing and could perfectly predict every consequence of every decision we&#8217;ll ever make. But that&#8217;s impossible. In fact, it&#8217;s so far from &#8230; <a href="http://www.codesimplicity.com/post/unforseeable-consequences-why-we-have-principles/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the most important things to know about <em>any</em> kind of engineering is:</p>
<blockquote><p>
  There are some things about the future that you <strong>do not know</strong>.
</p></blockquote>
<p>Obviously it&#8217;d be ideal if we were all-knowing and could perfectly predict every consequence of every decision we&#8217;ll ever make. But that&#8217;s impossible. In fact, it&#8217;s so far from possible that if you predict more than half of the consequences of your engineering decisions, you&#8217;re godlike or just <em>really</em> lucky.</p>
<p>Let&#8217;s take an example outside of the realm of programming: <span id="more-32"></span> CDs, which were designed in 1979 to replace cassette tapes as the primary method of listening to music. Who could have predicted that 20 years later, DVDs would be made the same size and shape so that manufacturers could make CD/DVD drives for computers? Did anybody imagine the problems of spinning a CD <em>fifty times</em> faster than it was supposed to be spun, for reading in a CD-ROM drive?</p>
<p>This is why, in engineering, we have &#8220;guiding principles.&#8221; There are certain rules that, when we follow them, keep things working well no matter <em>what</em> happens in the future. </p>
<p>In the case of software, I&#8217;ve summed up the most basic guiding principles as the <a href="/archives/category/laws-of-software">Laws Of Software</a>. The very first (and most important) law is that <a href="/archives/17">the future is more important than the present</a> (because it&#8217;s very big and the present is very small). But here&#8217;s the thing to know about that: <strong>that doesn&#8217;t mean you have to predict everything about the future</strong>. Instead, it explains why you should be making decisions according to the laws of software&#8211;because those laws make for good <em>future</em> software, no matter <em>what</em> that future is.</p>
<p>Sometimes it can be hard to understand why you should be <a href="/archives/8">stupid, dumb simple</a>, if you&#8217;re only thinking about the present. And it can be impossible to predict exactly <em>why</em> or <em>how</em> simplicity will help you in the future. I can tell you that it <em>will</em> help, and you&#8217;ll be glad you did it, and if you don&#8217;t believe me (which you are welcome to do&#8211;your mind is yours!) you&#8217;re going to end up in mess of trouble somewhere down the line, in a future you <em>can&#8217;t predict</em>.</p>
<p>I&#8217;m not singling you out, here. You&#8217;re not dumb. It&#8217;s just that <em>nobody</em> can predict the total future of a piece of software, except to know that certain decisions <em>now</em> will make that future better, and that other decisions will make that future worse. We know this from decades of experience in the software development industry&#8211;certain basic principles invariably lead us in the right direction, and certain &#8220;<a href="http://c2.com/cgi/wiki?AntiPattern">anti-patterns</a>&#8220;, if followed consistently, <em>invariably</em> lead us into trouble.</p>
<p>To be a successful software developer, you have to be willing to <em>not know</em> some things about the future, and trust that following your principles is the right thing to do. Sometimes it can take years to see that you were right, but it&#8217;s a glorious day when you finally realize that your product still exists because you made the right decision <em>three years ago</em>, when you couldn&#8217;t even prove to anybody that it <em>was</em> the right decision, but forged ahead anyway with your &#8220;excessive simplicity&#8221; because you knew it was the right thing to do.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/unforseeable-consequences-why-we-have-principles/#comments">Comments: 5</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/unforseeable-consequences-why-we-have-principles/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FOSSCoach 2008</title>
		<link>http://www.codesimplicity.com/post/fosscoach-2008/</link>
		<comments>http://www.codesimplicity.com/post/fosscoach-2008/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 21:14:53 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Administrative]]></category>
		<category><![CDATA[fosscoach]]></category>
		<category><![CDATA[oscon]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=33</guid>
		<description><![CDATA[If you&#8217;re going to be in Portland, Oregon or attending OSCON and you want to hear me talk, I&#8217;ve proposed a session for FOSSCoach called Code Simplicity: Software Design In Open Source Projects. Registration for FOSSCoach is free, but is limited to 100 people, so sign up if you want to come. -Max Comments: 0]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re going to be in Portland, Oregon or attending OSCON and you want to hear me talk, I&#8217;ve proposed a session for <a href="http://fosscoach.wikia.com/">FOSSCoach</a> called <a href="http://fosscoach.wikia.com/wiki/Code_Simplicity:_Software_Design_In_Open_Source_Projects">Code Simplicity: Software Design In Open Source Projects</a>.</p>
<p><a href="http://fosscoach.wikia.com/wiki/OSCON08:How_To_Register">Registration</a> for FOSSCoach is free, but is limited to 100 people, so sign up if you want to come.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/fosscoach-2008/#comments">Comments: 0</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/fosscoach-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Never-Shipping Product</title>
		<link>http://www.codesimplicity.com/post/the-never-shipping-product/</link>
		<comments>http://www.codesimplicity.com/post/the-never-shipping-product/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 19:00:51 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Creating Complexity]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/?p=30</guid>
		<description><![CDATA[When you work as a professional programmer, you almost always know somebody (or are somebody) who&#8217;s going through one of the most common development horror stories in the book: &#8220;We started working on this project five years ago, and the technology we were using/making was modern then, but it&#8217;s obsolete now. Things keep getting more &#8230; <a href="http://www.codesimplicity.com/post/the-never-shipping-product/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you work as a professional programmer, you almost always know somebody (or are somebody) who&#8217;s going through one of the most common development horror stories in the book:</p>
<p>&#8220;We started working on this project five years ago, and the technology we were using/making was modern then, but it&#8217;s obsolete now. Things keep getting more and more complex with this obsolete technology, so it keeps getting less and less likely that we&#8217;ll ever finish the project. But if we re-write, we could be here for another five years!&#8221;</p>
<p>Another popular one is: &#8220;We can&#8217;t develop fast enough to keep up with modern user needs.&#8221; Or, &#8220;While we were developing, Google wrote a product better than ours much faster than us.&#8221;</p>
<p>When I hear things like that, the first thing I ask myself is &#8220;How did that happen? Why did it take so long for them to finish their product that they ran into that problem?&#8221;</p>
<p>The answer lies in <em>complexity</em>. <span id="more-30"></span> The more complex a task is, the harder it is to complete it. So you start out with something simple that can be completed in one month. Then you add complexity, and the task will take three months. Then you take each piece of that and make it more complex, and the task will take <em>nine</em> months. </p>
<p>Complexity <em>builds</em> on complexity&#8211;it&#8217;s not just a linear thing. It&#8217;s not like, &#8220;We have ten features, and so adding one more will only add 10% more time.&#8221; No, one new feature will have to be coordinated with all ten of your existing features. So if just the feature itself takes 10 hours of coding time, there will be another hour of coding time for that feature interacting with each other feature. The more features there are, the higher the cost gets of adding a feature.</p>
<p>Some projects start out with such a complex set of requirements that they never get a first version out. If you&#8217;re in this situation, you should just trim features. Don&#8217;t shoot for the moon in your first release&#8211;get out something that works and make it work <em>better</em> over time.</p>
<p>There are other ways to add complexity than just adding features, too. The most common other ways are:</p>
<ul>
<li><strong>Expanding the <a href="/archives/7">purpose of the software</a></strong>. Generally, just don&#8217;t ever do that. Your marketing droids might be drooling over the idea of &#8220;making a single piece of software that does your taxes and cooks dinner&#8221;, but you should be <em>screaming</em> as loud as you can whenever any suggestion like that comes near your desk. Stick to your purpose&#8211;your software just has to do what it does <em>well</em>, and you will succeed, if that purpose is something people need.</li>
<li><strong>Adding programmers.</strong> Yes, that&#8217;s right&#8211;adding more people to the team adds <em>complexity</em>, it does not make things simpler. Remember <em><a href="http://www.robelle.com/smugbook/manmonth.html">The Mythical Man Month</a></em>? What he says in there is true because of the complexity equation I explained higher up in this article&#8211;if you have ten programmers, adding an eleventh means spending time to groove in that one programmer, plus the time to groove in the existing ten programmers to the new guy, plus the time spent by the new guy interacting with the existing ten programmers.</li>
<li><strong>Change things</strong>: Any time you change something, you&#8217;re adding complexity. Whether it&#8217;s a requirement, a design, or just a piece of code, you&#8217;re introducing the possibility of bugs, the time required to implement the change, the time required to validate that the new change works with all the other pieces of the software, the time required to decide upon the change, and the time required to track the change, and the time required to test the change. Each change builds on the last in terms of all this complexity, so the more you change, the more and more time each new change is going to take. It&#8217;s still important to make certain changes, but you should be making informed decisions about it, not just changing everything on a whim.</li>
<li><strong>Lock-In to bad technologies</strong>. This is where you make a bad decision about your backend or libraries and then are stuck with it for a long time because you&#8217;re so dependent on it. Obviously &#8220;bad technology&#8221; is very subjective, but sometimes there are obvious good choices and obvious bad ones. For example, if you need an embedded scripting language, <a href="http://www.lua.org/">Lua</a> is generally considered to be a good choice, and &#8220;write our own&#8221; would probably be one of the worse choices, depending on the situation. It&#8217;s definitely relative&#8211;it&#8217;s not like there&#8217;s only one good choice and all the rest are bad, but some choices might make your life easier than others.</li>
<li><strong>Poor design or no design</strong>. Basically, this just means &#8220;a failure to <a href="/archives/19">plan for change</a>.&#8221; Things are going to change, and that requires design work, to maintain simplicity while the project grows. Failing to do this can introduce massive complexity very fast, because suddenly each new feature <em>quadruples</em> the complexity of the code instead of just adding a little bit to the complexity.</li>
<li><strong>Re-inventing the wheel</strong>. For example, if you invent your own protocol when a perfectly good one exists, you&#8217;re going to be spending a <em>lot of time</em> working on the protocol, when you could just be working on your software. You should basically <em>never</em> have any huge invented-in-house dependency, like a webserver, a protocol, or a major library, unless that <em>is</em> your product.</li>
</ul>
<p>The thing about all of these is that they&#8217;re <em>insidious</em>. Most of them only do long-term damage&#8211;something you won&#8217;t see for a year or more. So when somebody proposes them, often they sound harmless! And even when you start implementing them, maybe they seem fine. But as time goes on&#8211;and particularly as more and more of these stack up&#8211;the complexity becomes more apparent and grows and grows and grows, until you&#8217;re another victim of that ever-so-common horror story: &#8220;The Never-Shipping Product.&#8221; (Which is nowhere near as cool as <em>The Neverending Story</em>, believe me.)</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/the-never-shipping-product/#comments">Comments: 1</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-never-shipping-product/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Specific Solutions</title>
		<link>http://www.codesimplicity.com/post/specific-solutions/</link>
		<comments>http://www.codesimplicity.com/post/specific-solutions/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 14:36:34 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[colossus]]></category>
		<category><![CDATA[kyle xy]]></category>
		<category><![CDATA[second life]]></category>
		<category><![CDATA[the sims]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/28</guid>
		<description><![CDATA[So, I&#8217;m a huge Kyle XY fan, and I was entertaining myself this morning by watching the various &#8220;behind the scenes&#8221; clips that they have on the website. Of course, before each clip was an ad&#8211;the same ad every time&#8211;for The Sims. No matter how silly the ad may be, being forced to watch it &#8230; <a href="http://www.codesimplicity.com/post/specific-solutions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>  So, I&#8217;m a huge <a href="http://abcfamily.go.com/abcfamily/path/section_Shows+Kyle-XY/page_Video-Kyle_Full_1001">Kyle XY</a> fan, and I was entertaining myself this morning by watching the various &#8220;behind the scenes&#8221; clips that they have on the website. Of course, before each clip was an ad&#8211;the same ad every time&#8211;for <a href="http://thesims.ea.com/">The Sims</a>. No matter how silly the ad may be, being forced to watch it over and over did eventually get me thinking&#8211;although not about buying The Sims:</p>
<p>  Why has The Sims sold 100 million copies, while <a href="http://secondlife.com/">Second Life</a>, an ostensibly much more flexible and powerful universe, only has about 2 million active users? They look pretty similar, and you might guess at first glance that they&#8217;d have somewhat similar audiences. But, although 2 million users is nothing to scoff at, 100 million absolutely trounces it. So why the big difference?</p>
<p>  Well, of course, The Sims has EA Games behind them, who have a massive distribution channel and a lot of marketing power, but the Internet buzz and general promotion of Second Life is pretty good too, so although EA has the edge, that doesn&#8217;t explain a 50-to-1 difference in sales. There must be something actually different about the products themselves.</p>
<p>  Well, at first glance, The Sims is very user-friendly and Second Life is (from what I&#8217;ve heard) hard to use. The Sims does a limited scope of things very well, and Second Life does an unlimited number of things through a difficult interface, with mediocre results.</p>
<p>  But fundamentally, why is it that products like The Sims succeed so much more than things like Second Life? And why <em>does</em> The Sims have a better interface, why <em>do</em> people want to play The Sims more than they want to play Second Life? <span id="more-28"></span> Well:</p>
<blockquote><p>
    It&#8217;s easy to make a system that does something specific, and hard to make a system that does everything.
  </p></blockquote>
<p>  When something is easy to make, you can spend a lot more time focusing on the little details&#8211;the polish. When something is hard to make, you spend all your efforts just making it work, and there&#8217;s no time left to sand off the rough edges. Specific solutions allow you to handle a problem with a level of grace, efficiency, and quality that could never be achieved by a generic, do-it-all solution.</p>
<p>  A great example is the <a href="http://www.codesandciphers.org.uk/lorenz/colossus.htm">Colossus</a> computer, built in 1943 to break <a href="http://www.codesandciphers.org.uk/lorenz/fish.htm">encrypted German radio messages</a> in World War II. That was <em>all</em> the Colossus did&#8211;it was fundamentally incapable of doing any other task. However, it would have taken a 5 MHz general-purpose computer to break that code at the same rate as the Colossus&#8211;a level of speed that desktop computers didn&#8217;t reach until the 1970&#8242;s, <em>30 years later</em>.</p>
<p>  This is something that I have been trying to get across to programmers for quite some time&#8211;you don&#8217;t need to solve <em>all</em> the world&#8217;s problems with one piece of code, you only need to solve <em>the problem you&#8217;re solving</em>. Whether you&#8217;re designing a whole system or just a tiny piece, your code doesn&#8217;t need to do any more than is called for by the known requirements. Sure, keep it extendable for the future&#8211;that&#8217;s part of making a quality solution. But all solutions should be <em>specific</em> solutions to <a href="/archives/24">known problems</a>.</p>
<p>  The Sims satisfies a specific, known need&#8211;the desire of people to play out <em>specific types</em> of fantasy lives. It succeeds because it&#8217;s <em>not</em> infinitely flexible. Second Life is a nightmare of complexity because it tries to be &#8220;everything to everyone&#8221;&#8211;a situation in which you almost always end up being not enough to anyone.</p>
<p>  When people have problems with complexities or confusions in their software, I encourage them to be The Sims. Be <a href="http://en.wikipedia.org/wiki/Notepad">Notepad</a>. Be the <a href="http://www.google.com/">Google main page</a>. Don&#8217;t try to anticipate every need in the world, just solve the ones you <em>know</em> exist. Everything tends to fall into place when you really know your requirements and just go to solve <em>them</em>.</p>
<p>  -Max</p>
<p><a href="http://www.codesimplicity.com/post/specific-solutions/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/specific-solutions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Complexity and the Wrong Solution</title>
		<link>http://www.codesimplicity.com/post/complexity-and-the-wrong-solution/</link>
		<comments>http://www.codesimplicity.com/post/complexity-and-the-wrong-solution/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 20:00:20 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[refactoring]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/27</guid>
		<description><![CDATA[Often, if something is getting very complex, that means that there is an error somewhere far below the level that things are getting complex on. For example, it&#8217;s very difficult to make a car move if it has square wheels. You&#8217;re going to be spending lots and lots of time figuring out how to make &#8230; <a href="http://www.codesimplicity.com/post/complexity-and-the-wrong-solution/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>  Often, if something is getting very complex, that means that there is an error somewhere far below the level that things are getting complex on.</p>
<p>  For example, it&#8217;s very difficult to make a car move if it has square wheels. You&#8217;re going to be spending lots and lots of time figuring out how to make the car work, when really it should just have round wheels.</p>
<p>  Any time there&#8217;s an “unsolvable complexity” in your program, it&#8217;s because there&#8217;s something fundamentally wrong with it. If the problem is “unsolvable” at one level, maybe you should back up and look at what&#8217;s underlying the problem. Maybe you put square wheels on the car, and now you&#8217;re trying to figure out how to make it go fast.</p>
<p>  Programmers actually do this quite often. For example, “I have this terribly messy code, now it&#8217;s really complex to add a new feature!” Well, your fundamental problem there is the that code is messy. Clean it up, make the already-existing code simple, and suddenly adding the new feature will be simple.</p>
<p><strong>What Problem Are You Trying To Solve?</strong></p>
<p>  If somebody comes up to you and says something like, “How do I make this pony fly to the moon?”, the question you need to ask is, “What problem are you trying to solve?” You&#8217;ll find out that they really need to collect gray rocks. Why they thought they had to fly to the moon, and use a <em>pony</em> to do it, only they know. People <em>do</em> get confused like this.</p>
<p>  So when things get complex, back up and you look at the problem that you&#8217;re trying to solve. Take a <em>really big</em> step back. You are allowed to question <em>everything</em>. Maybe you thought that adding 2 and 2 was the only way to get 4, and you didn&#8217;t think about adding 1 and 3 instead, or just skipping the addition entirely and just <em>putting</em> “4” there.  The “problem” is “How do I get 4?” <em>Any</em> method of solving that problem is acceptable, so figure out what the <em>best</em> method would be, for the situation that you&#8217;re in.</p>
<p>  Discard your assumptions. Really <em>look</em> at the <em>problem</em> that you&#8217;re trying to solve, and think about the simplest way to solve that problem. Not “How do I solve this problem using my current code?” Not “How did Professor Bob solve this problem in his program?” No, just how, <em>in general</em>, in a perfect world, should that problem be solved? From there, you might see how your code needs to be re-worked. Then you can re-work your code. <em>Then</em> you can solve the problem.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/complexity-and-the-wrong-solution/#comments">Comments: 18</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/complexity-and-the-wrong-solution/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Truncated Posts in RSS?</title>
		<link>http://www.codesimplicity.com/post/truncated-posts-in-rss/</link>
		<comments>http://www.codesimplicity.com/post/truncated-posts-in-rss/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 21:45:10 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Administrative]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/26</guid>
		<description><![CDATA[Hey everybody. So, some of my posts are rather long, and so I truncate them with a (Read More&#8230;) link that takes you to the full post. That link also shows up in the RSS, as a (more&#8230;) link. For the frontpage of codesimplicity.com, I think that&#8217;s pretty useful&#8211;it makes it a lot easier to &#8230; <a href="http://www.codesimplicity.com/post/truncated-posts-in-rss/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>  Hey everybody. So, some of my posts are rather long, and so I truncate them with a (Read More&#8230;) link that takes you to the full post. That link also shows up in the RSS, as a (more&#8230;) link.</p>
<p>  For the frontpage of codesimplicity.com, I think that&#8217;s pretty useful&#8211;it makes it a lot easier to browse the various articles. But I was wondering, for those who read this in an aggregator or via RSS&#8211;for the long posts, do you prefer getting only the short version (with the &#8220;more&#8230;&#8221; link) or would you rather just have the whole post?</p>
<p><strong>Update:</strong> It looks like, from the comments, that full text in the feed is the clear winner! That&#8217;s actually my preference too, when reading sites, but I usually am not reading posts as long as the ones I write. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I&#8217;ve installed and activated the <a href="http://cavemonkey50.com/code/full-feed/">Full Text Feed</a> plugin for WordPress, so in the future the feeds will contain the full text even though the front page and email notifications will still be cut by the &#8220;more&#8221; link.</p>
<p>  -Max</p>
<p><a href="http://www.codesimplicity.com/post/truncated-posts-in-rss/#comments">Comments: 13</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/truncated-posts-in-rss/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Instant Gratification = Instant Failure</title>
		<link>http://www.codesimplicity.com/post/instant-gratification-instant-failure/</link>
		<comments>http://www.codesimplicity.com/post/instant-gratification-instant-failure/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 20:09:38 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[vci]]></category>
		<category><![CDATA[VCs]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/25</guid>
		<description><![CDATA[The broadest problem that I see in the software industry is that companies are unwilling to engage in strategies that only show results in the long term. Or, more specifically, that organizations are unaware that there is any such thing as a long-term strategy. In the US, it&#8217;s probably a symptom of a general cultural &#8230; <a href="http://www.codesimplicity.com/post/instant-gratification-instant-failure/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The broadest problem that I see in the software industry is that companies are unwilling to engage in strategies that only show results in the long term. Or, more specifically, that organizations are unaware that there <em>is</em> any such thing as a long-term strategy.</p>
<p>In the US, it&#8217;s probably a symptom of a general cultural problem&#8211;if an American can&#8217;t see an instant result from something, they think it doesn&#8217;t work. This leads to fast food, french fries, and fat people. The healthy way to eat (protein and vegetables) has a <em>delayed</em> effect on the body (you don&#8217;t get the energy for over an hour), and the bad way to eat (endless carbohydrates without nutritional value) has an instant result&#8211;immediate energy.</p>
<p>Software is always a <em>long-term process</em>. I wrote the first version of <a href="http://vci.everythingsolved.com/">VCI</a> in about three weeks, and that was <em>insanely fast</em>. Any actual application (VCI&#8217;s just a library) takes months or years of person-hours, even if you keep it small. So you&#8217;d think that organizations would be far-sighted about their development strategies, right?</p>
<p>Unfortunately, it just doesn&#8217;t happen. Competitor X comes out with &#8220;Shiny New Feature&#8221; and The Company says &#8220;we must have Shiny New Feature RIGHT NOW!&#8221; That&#8217;s not a long-term winning strategy, that&#8217;s just short-sighted panic. If you have users, they&#8217;re not all going to get up and go away in the next five minutes just because somebody else has one feature that you don&#8217;t. You should be looking at <em>trends</em> of how many users you&#8217;re gaining or losing, not just responding mindlessly to the immediate environment.</p>
<p>So what&#8217;s a good long-term strategy? Well, refactoring your code so that you will still be able to add features in the future, that&#8217;s a good one. Or spending some extra time putting some polish on your features and UI so that when the product is released, users are actually happy with it. <em>Not</em> adding features that you don&#8217;t want to maintain, if they&#8217;re not important enough&#8211;that&#8217;s another one.</p>
<p>Remember that <a href="http://www.mozilla.org/">Mozilla</a> did poorly for years, only to finally start gaining dominance in a market that Netscape had lost, because they had a <em>long-term</em> plan. Granted, Mozilla made some decisions early on that caused some things to take longer than they should have, but they still won out in the long term, despite failing in the short term.</p>
<p>Of course, it can be hard to convince people that your long-term plan is right, sometimes, because it takes so long to show results! When I started refactoring <a href="http://www.bugzilla.org/">Bugzilla</a> about four years ago, there was pretty constant resistance, particularly when I would review patches and say, &#8220;You need to wait for the new architecture before this can go in,&#8221; or &#8220;This needs to be fixed to not be <a href="http://www.computerhope.com/jargon/s/spaghett.htm">spaghetti code</a>.&#8221; But once the refactoring really got rolling (after about two and a half years), it suddenly became <a href="http://www.bugzilla.org/releases/3.0/new-features.html">way easier to add new features</a> and nearly all the developers became big supporters of refactoring.</p>
<p>I read so much &#8220;advice&#8221; on &#8220;how to run your software business&#8221; that just focuses on instant gratification&#8211;what you can get done <em>right now</em>. &#8220;Add features!&#8221; &#8220;Get millions of dollars instantly from <abbr title="Venture Capitalists">VCs</abbr>!&#8221; Unfortunately, the way the universe seems to work is that you can destroy something in an instant, but it takes <em>time</em> to create something. So in reality, the closer you get to &#8220;instant gratification&#8221;, the closer you get to destruction of your product, your business, and your future.</p>
<p>If you want a good plan, pick one that admits that <em>creation takes time</em>. It doesn&#8217;t have to take <em>forever</em>, but it&#8217;s never <em>instant</em>.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/instant-gratification-instant-failure/#comments">Comments: 11</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/instant-gratification-instant-failure/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>If It Ain&#8217;t Broken&#8230;</title>
		<link>http://www.codesimplicity.com/post/if-it-aint-broken/</link>
		<comments>http://www.codesimplicity.com/post/if-it-aint-broken/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 19:00:06 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Laws of Software]]></category>
		<category><![CDATA[third law]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/24</guid>
		<description><![CDATA[Okay, so remember our third law? (You can&#8217;t break things if you don&#8217;t change them.) Well, that has a very important related rule, that every engineer on Earth knows, but sometimes forgets: Never “fix” anything unless it&#8217;s a problem, and you have evidence showing that the problem really exists. Of course, most of us know &#8230; <a href="http://www.codesimplicity.com/post/if-it-aint-broken/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay, so remember our <a href="/archives/19">third law</a>? (You can&#8217;t break things if you don&#8217;t change them.) Well, that has a very important related rule, that every engineer on Earth knows, but sometimes forgets:</p>
<blockquote><p>
<strong>Never “fix” anything unless it&#8217;s a problem, and you have evidence showing that the problem really exists.</strong>
</p></blockquote>
<p>Of course, most of us know this as &#8220;If it ain&#8217;t broken, don&#8217;t fix it.&#8221; However, these wise words are frequently ignored, because many developers don&#8217;t have a good understanding of what &#8220;broken&#8221; means. Often, developers just <em>imagine</em> that users have a problem with something, and start fixing it. Or they go off and develop features that don&#8217;t solve anybody&#8217;s problem. This is <em>far, far</em> more common than you might think.</p>
<p>So that&#8217;s why I say you should have <em>evidence</em> that there&#8217;s a problem. Without that evidence, you could just be fixing things that aren&#8217;t actually problems, and if you go around fixing things that aren&#8217;t broken, you&#8217;re going to <em>break things</em>. And not only could you be generating bugs, but you&#8217;re wasting your time and adding complexity to your program for no reason. You need <em>evidence</em> that there&#8217;s a problem, before you start coming up with a solution.</p>
<p>What do I mean by “evidence”? <span id="more-24"></span> Well, five users report that when they push the red button, your program explodes. Okay, that&#8217;s good enough for me! Or <em>you</em> push the red button, and you notice that the program explodes.</p>
<p>However, just because a user reports something doesn&#8217;t mean it&#8217;s a problem. Sometimes a user just didn&#8217;t realize that your program had some feature already, and so asked you to implement something else silly. For example, you write a program that sorts a list of words alphabetically, and a user asks you to add a feature that sorts a list of <em>letters</em> alphabetically. Your program <em>already does that</em>. (Actually, it already does more than that. This is often the case, with this sort of confused request.) So in this case, the user thought there was a problem, but there wasn&#8217;t even really a problem, even though he could maybe present “evidence” that he couldn&#8217;t sort a list of letters. (He just didn&#8217;t realize that he should use the <em>word</em>-sorting feature.)</p>
<p>Note that if you get a lot of requests like the above, it probably means that users can&#8217;t easily figure out how to find what they need. There&#8217;s some complexity that needs to be reduced on your end.</p>
<p>Finally, sometimes a user will report that there&#8217;s a bug, but actually that&#8217;s the program behaving exactly as you intended it to. In this case, it&#8217;s a matter of “majority rules.” If a significant number of users think that the behavior is a bug, it&#8217;s a bug. If only a tiny minority (like one or two) think it&#8217;s a bug, it&#8217;s not a bug.</p>
<p>The most famous error in this area is what we call “premature optimization”. That is, some developers seem to like to “make things go fast”.  But they do it before they know that it&#8217;s slow! This is like a charity sending food to rich people. “We just wanted to help people!” Right—illogical, isn&#8217;t it? They&#8217;re solving a problem that doesn&#8217;t exist.</p>
<p>The only parts of your program where you should be concerned about speed are the exact parts that you can show cause a real performance problem for the users. The rest of the code, the primary concern is simplicity, not “make things go fast”.</p>
<p>There are infinite ways of violating this rule, but the way to follow it is <em>so simple</em>: just get real evidence that the problem is <em>valid</em> before you fix it.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/if-it-aint-broken/#comments">Comments: 0</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/if-it-aint-broken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

