<?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 &#187; Essays</title>
	<atom:link href="http://www.codesimplicity.com/post/category/essays/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codesimplicity.com</link>
	<description></description>
	<lastBuildDate>Thu, 13 May 2010 19:00:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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 would [...]]]></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 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 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 [...]]]></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: 47</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/why-programmers-suck/feed/</wfw:commentRss>
		<slash:comments>47</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 [...]]]></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: 12</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-singular-secret-of-the-rockstar-programmer/feed/</wfw:commentRss>
		<slash:comments>12</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 way is [...]]]></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 way 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: 37</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/the-engineer-attitude/feed/</wfw:commentRss>
		<slash:comments>37</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 sucks.
Usually [...]]]></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 new [...]]]></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>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, [...]]]></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&#8217;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 matter how good [...]]]></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, I&#8217;m opposed, [...]]]></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 unless [...]]]></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>In 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>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 [...]]]></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&#8217;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>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 problem&#8211;if [...]]]></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>There Is No Science Of Software</title>
		<link>http://www.codesimplicity.com/post/there-is-no-science-of-software/</link>
		<comments>http://www.codesimplicity.com/post/there-is-no-science-of-software/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 23:15:57 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[Laws of Software]]></category>
		<category><![CDATA[agile software development]]></category>
		<category><![CDATA[bill]]></category>
		<category><![CDATA[cmmi]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[mythical man month]]></category>
		<category><![CDATA[rup]]></category>
		<category><![CDATA[turing machine]]></category>
		<category><![CDATA[univac]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/16</guid>
		<description><![CDATA[What we think of today as being &#8220;computers&#8221; started out in the minds of mathematicians as purely abstract devices&#8211;thoughts about how to solve math problems using machines instead of the mind.
These mathematicians are the people we would consider the modern founders of &#8220;computer science.&#8221; Computer Science is actually the mathematical study of information processing. It [...]]]></description>
			<content:encoded><![CDATA[<p>What we think of today as being &#8220;computers&#8221; started out in the minds of mathematicians as <a href="http://web.bvu.edu/faculty/schweller/Turing/Turing.html">purely abstract devices</a>&#8211;thoughts about how to solve math problems using machines instead of the mind.</p>
<p>These mathematicians are the people we would consider the modern founders of &#8220;computer science.&#8221; Computer Science is actually the mathematical study of information processing. It is not, as some people believe it to be, the study of computer programming. In fact, <em>there is no <strong>science</strong> of computer programming</em>. To understand how that could possibly be true, and what I mean, you have to know the history of programming.</p>
<p>The earliest computers were built under the supervision of computer scientists by highly skilled electronic engineers. <span id="more-16"></span> They were run by highly-trained operators in tightly-controlled environments. They were all custom-built by the organizations that needed them (mostly governments, to aim missiles and crack codes), and there were only one or two copies of any given model.</p>
<p>Then, along comes <a href="http://www.thocp.net/hardware/univac.htm">UNIVAC</a> and the whole notion of &#8220;commercial&#8221; computers. Now, there&#8217;s only so many advanced theoretical mathematicians in the world. If you start shipping out computers to <em>everybody</em>, you can&#8217;t ship a mathematician along with each one. So although some organizations, such as the United States Census Bureau, almost certainly had some highly-trained operators for their machinery, other organizations undoubtedly got their machine and said, &#8220;Okay, Bill from Accounting, this is yours! Read the manual and have at it!&#8221; And there went Bill, diving into this complex machine and doing his best to make it work.</p>
<p>Bill there is our first &#8220;working programmer.&#8221; He might have studied math in school, but he almost certainly didn&#8217;t study the sort of advanced theory needed to <em>conceive and design</em> the machine itself. But he can read the manual and understand it, and by trial and error, make the machine do what he wants.</p>
<p>Of course, the more commercial computers you ship, the more Bills you have and the fewer highly-trained operators you have. And if there&#8217;s one thing that Bill has, it&#8217;s job pressure. He has demands from management to &#8220;Get that task done now!&#8221; and &#8220;We don&#8217;t care how it&#8217;s done, just do it!&#8221; He figures out how to make the thing work according to its manual, and it works, even if it crashes every two hours.</p>
<p>Eventually Bill gets a whole team of programmers to work with him. He has to figure out how to design a system and split up the tasks between different people. Instead of being studied and mapped out like a standard science, the whole art of practical programming grows organically, more like college students teaching themselves to cook than like NASA engineers building a space shuttle.</p>
<p>So there&#8217;s this hodge-podge system for software development, and it&#8217;s all very complex and hard to manage, but everybody gets along somehow. Then along comes <em><a href="http://www.robelle.com/smugbook/manmonth.html">The Mythical Man Month</a></em>, a book by a guy who actually <em>looked</em> at the process of software development and pointed out some things about it&#8211;most famously that adding more programmers to a project doesn&#8217;t necessarily make it faster. He didn&#8217;t come up with a whole science, but he did make some good observations about programming and managing software development.</p>
<p>Of course, then came a flurry of software development methods: the <a href="http://www-306.ibm.com/software/awdtools/rup/">Rational Unified Process</a>, the <a href="http://www.sei.cmu.edu/cmmi/">Capability Maturity Model</a>, <a href="http://agilemanifesto.org/">Agile Software Development</a>, and others. None of these claim to be a science, just a way of <em>managing</em> the complexity of software development.</p>
<p>And that, basically, brings us up to where we are today: lots of &#8220;methods,&#8221; but no real <em>science</em>.</p>
<p>A science is composed of observations, experiments, and <em>laws</em>. Although we have hundreds of books of observations about practical programming, and &#8220;the world is our laboratory&#8221;, all of that has resulted in very few <em>laws</em>, which are the most important part of a science. That is, instead of coming up with methods to work around complexity, there ought to be some fundamental rules to follow that would lead to simplicity&#8211;ways to avoid complexity entirely and explain <em>why</em> what &#8220;works&#8221; in software development <em>does</em> work.</p>
<p>In reality, there are two missing sciences here. The first one is being worked on actively, and includes the various methods I mentioned above. That&#8217;s the science of managing software development. The fact that conflicting, equally-valid &#8220;opinions&#8221; seem to exist within the field indicates that the fundamental laws of software management have not been worked out. However, there is at least attention being given to the problem.</p>
<p>The other science, though, gets very little attention in the practical world of programming: the science of writing software. Very few people are taught that there is a <em>science</em> to writing software, in school. Instead, they are just shown &#8220;This is how it works in this programming language, now go write some software!&#8221;</p>
<p>The science I&#8217;m talking about is <em>not Computer Science</em>. That&#8217;s a mathematical study. I&#8217;m talking about a science for the &#8220;working programmer&#8221;&#8211;something that gives fundamental laws and rules to follow when writing a program in <em>any</em> language. One that&#8217;s as reliable as physics or chemistry in telling you how to create an application.</p>
<p>Some people might say that such a science is not possible, that software development is too variable to ever be described by simple, fundamental laws. Some people also once said that understanding the physical universe was impossible because &#8220;it is the creation of God and God is unknowable.&#8221; So unless you&#8217;re telling me computers are unknowable, I think that making such a science would be entirely possible.</p>
<p>Actually, I&#8217;ve started to collect some basic hypotheses for such a science, and I&#8217;m writing a book about it. I might post some of them here, but actually, all of what I&#8217;ve written in the blog so far actually comes from those hypotheses. That is, I haven&#8217;t really posted any of my hypothetical &#8220;laws&#8221; yet, but I have been posting data that I&#8217;ve derived <em>from</em> them.</p>
<p>Anyhow, I think that the primary source of complexity in software is actually the fact that this science is lacking. If programmers actually had a science for simplicity in software, there wouldn&#8217;t be nearly so much complexity, and we wouldn&#8217;t need crazy processes to manage that complexity.</p>
<p>Whenever there&#8217;s a problem with something, my instinct is to go philosophically <em>above</em> the level of the problem and look at it from there. If there&#8217;s some &#8220;unsolvable&#8221; effect happening to something, there must be some unknown <em>cause</em> on a higher level. So there you go&#8211;if the problem is complexity, then maybe it&#8217;s because there was no science of simplicity in the first place.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/there-is-no-science-of-software/#comments">Comments: 11</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/there-is-no-science-of-software/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Simplicity and Strictness</title>
		<link>http://www.codesimplicity.com/post/simplicity-and-strictness/</link>
		<comments>http://www.codesimplicity.com/post/simplicity-and-strictness/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 21:17:26 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[strictness]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/15</guid>
		<description><![CDATA[As a general rule, the stricter your application is, the simpler it is to write.
For example, imagine a program that accepts only the numbers 1 and 2 as input and rejects everything else. Even a tiny variation in the input, like adding a space before or after &#8220;1&#8243; would cause the program to throw an [...]]]></description>
			<content:encoded><![CDATA[<p>As a general rule, the stricter your application is, the simpler it is to write.</p>
<p>For example, imagine a program that accepts <em>only</em> the numbers 1 and 2 as input and rejects everything else. Even a tiny variation in the input, like adding a space before or after &#8220;1&#8243; would cause the program to throw an error. That would be very &#8220;strict&#8221; and extremely simple to write. All you&#8217;d have to do is check, &#8220;Did they enter exactly 1 or exactly 2? If not, throw an error.&#8221; </p>
<p>In most situations, though, such a program would be so strict as to be impractical. If the user doesn&#8217;t know the exact format you expect your input in, or if they accidentally hit the spacebar or some other key when entering a number, the program will frustrate the user by not &#8220;doing what they mean.&#8221;</p>
<p>That&#8217;s a case where there is a trade-off between simplicity (strictness) and usability. Not all cases of strictness have that trade-off, but many do. If I allow the user to type in <kbd>1</kbd>, <kbd>One</kbd>, or <kbd>" 1"</kbd> as input, that allows for a lot more user mistakes and makes life easier for them, but also adds code and complexity to my program. Less-strict programs often take more code than strict ones, which is really directly where the complexity comes from.</p>
<p>(By the way, if you&#8217;re writing frameworks or languages for programmers, one of the best things you can do is make this type of &#8220;non-strictness&#8221; as simple as possible, to eliminate the trade-off between usability and complexity, and let them have the best of both worlds.)</p>
<p>Of course, on the other side of things, if I allowed the user to type in <kbd>O1n1e1</kbd> and still have that be accepted as &#8220;1&#8243;, that would just add needless complexity to my code. We have to be more strict than that.</p>
<p>Strictness is mostly about what input you allow, like the examples above. I suppose in some applications (like, say, a <a href="http://www.w3schools.com/soap/default.asp">SOAP</a> library), you could have output strictness, too&#8211;output that always conforms to a particular, exact standard. But usually, it&#8217;s about what input you accept and what input causes an error.</p>
<p>Probably the best-known strictness disaster is HTML. <span id="more-15"></span> It wasn&#8217;t designed to be very strict in the beginning, and as it grew over the years, processing it became a nightmare for the designers of web browsers. Of course, it was eventually standardized, but by that time most of the HTML out there was pretty horrific, and still is. And because it wasn&#8217;t strict from the beginning, now nobody can <a href="/archives/14">break backwards compatibility</a> and make it strict.</p>
<p>Some people argue that HTML is commonly used because it&#8217;s not strict. That the non-strictness of its design makes it popular. That if web browsers had always just <em>thrown an error</em> instead of accepting invalid HTML, somehow people would not have used HTML.</p>
<p>That is a patently ridiculous argument. Imagine a restaurant where the waiter could never say, &#8220;Oh, we don&#8217;t have that.&#8221; So I ask for a &#8220;fresh chicken salad&#8221;, and I get a <em>live chicken</em>, because that&#8217;s &#8220;the closest they have.&#8221; I would get pretty frustrated with that restaurant. Similarly, if I tell the web browser to do something, and instead of throwing an error it tries to <em>guess</em> what I meant, I get frustrated with the web browser. It can be pretty hard to figure out why my page &#8220;doesn&#8217;t look right&#8221;, now.</p>
<p>So why didn&#8217;t the browser just tell me I&#8217;d done something wrong, and make life easy for me? Well, because HTML is so un-strict that it&#8217;s impossible for the web browser to know that I <em>have</em> done something wrong! It just goes ahead and drops a live chicken on my table without any lettuce.</p>
<p>Granted, I know that at this point that you can&#8217;t make HTML strict without &#8220;<a href="http://blogs.msdn.com/ie/archive/2008/01/21/compatibility-and-ie8.aspx">breaking the web</a>.&#8221; My point is that we got into that situation because HTML wasn&#8217;t strict <em>from the beginning</em>. I&#8217;m not saying that it should suddenly become strict now, when it would be almost impossible. (Though there&#8217;s nothing wrong with slowly taking incremental steps in that direction.)</p>
<p>In general, I am strongly of the opinion that computers should never &#8220;guess&#8221; or &#8220;try to do their best&#8221; with input. That leads to a nightmare of complexity that can easily spiral out of control. The only good guessing is in things like Google&#8217;s spelling suggestions&#8211;where it gives you the <em>option</em> of doing something, but doesn&#8217;t just go ahead and <em>do</em> something for you based on that guess. This is an important part of what I mean by strictness&#8211;input is either right or wrong, it&#8217;s never a &#8220;maybe.&#8221; If one input could possibly have two meanings, then you should either present the user with a choice or throw an error.</p>
<p>I could go on about this all day&#8211;the world of computers is full of things that should have been strict from the beginning, and became ridiculously complex because they weren&#8217;t.</p>
<p>Now, some applications are forced to be non-strict. For example, anything that takes voice commands has to be pretty un-strict about how people talk, or it just won&#8217;t work at all. But those sorts of applications are the exception. Keyboards are very accurate input devices, mouses slightly less so but still pretty good. You can require input from those to be in a certain format, as long as you aren&#8217;t making life too difficult for the user.</p>
<p>Of course, it&#8217;s still important to strive for usability&#8211;after all, computers are here to help humans do things. But you don&#8217;t necessarily have to accept every input under the sun just to be usable. All that does is get you into a maze of complexity, and good luck finding your way out&#8211;they never strictly standardized on any way to write maps for the maze. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/simplicity-and-strictness/#comments">Comments: 13</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/simplicity-and-strictness/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>When Is Backwards-Compatibility Not Worth It?</title>
		<link>http://www.codesimplicity.com/post/when-is-backwards-compatibility-not-worth-it/</link>
		<comments>http://www.codesimplicity.com/post/when-is-backwards-compatibility-not-worth-it/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 02:24:29 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[checksetup]]></category>
		<category><![CDATA[indirect object syntax]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/14</guid>
		<description><![CDATA[This title might seem a bit like a contradiction to my last post! Well, you really shouldn&#8217;t break your API, if you can help it. But sometimes, maintaining backwards compatibility for any area of your application can lead to a point of diminishing returns. This applies to everything about a program, not just its API.
A [...]]]></description>
			<content:encoded><![CDATA[<p>This title might seem a bit like a contradiction to my last post! Well, you really <a href="/archives/13"><em>shouldn&#8217;t</em> break your API</a>, if you can help it. But sometimes, maintaining backwards compatibility for <em>any</em> area of your application can lead to a point of diminishing returns. This applies to everything about a program, not just its API.</p>
<p>A great example of the backwards-compatibility problem is Perl. If you read the <a href="http://use.perl.org/search.pl?tid=12">perl5-porters summaries</a> with any regularity, or if you&#8217;re familiar with the history of the Perl internals in general, you&#8217;ll have some idea of what I mean.</p>
<p>Perl is full of support for strange syntaxes that really, nobody should be using anymore. For example, in Perl, you&#8217;re supposed to call methods on an object like <code>$object->method()</code>. But there&#8217;s <em>also</em> a syntax called the &#8220;indirect object syntax&#8221; where you can do <code>method $object</code>. <em>Not</em> <code>method($object)</code>&#8211;only the case without the parenthesis is the indirect object syntax.</p>
<p>Really, nobody should be using that syntax, and it&#8217;s not that hard to fix applications to call their methods the right way. And yet that syntax is maintained and supported in the Perl binary to keep <em>backwards compatibility</em>.</p>
<p>Perl is full of things like this that block <em>forward progress</em> because of <em>historical problems</em>.</p>
<p>Now obviously, this is a balancing act. <span id="more-14"></span> When there are a huge number of people using something, and it would be really difficult for them to change, you pretty much have to maintain backwards compatibility. But if maintaining that backwards-compatibility is really <em>stopping</em> forward progress, you need to warn people that the &#8220;old cruft&#8221; is going away and <em>ditch it</em>. The alternative is infinite backwards-compatibility and <em>no</em> forward progress, which means total death for your product.</p>
<p>This also gives one good reason why you shouldn&#8217;t just add features willy-nilly to your program. One day you might have to support <em>backwards-compatibility</em> for that feature that you added &#8220;because it was easy to add even though it&#8217;s not very useful.&#8221; This is an important thing to think about when adding new features&#8211;are you going to have to support that feature forever, now that it&#8217;s in your system? The answer is: <em>you probably are</em>.</p>
<p>If you&#8217;ve never maintained a large system that&#8217;s used by lots of people, you might not have a good idea of: (a) How many people can be screwed if you break backwards-compatibility, and (b) How much you can screw yourself over by <em>having</em> to maintain backwards-compatibility. The ideal solution there is: just don&#8217;t add features if you don&#8217;t want to support them for many, many future versions to come. Sometimes it takes a lot of programming experience to make that sort of decision effectively, but you can also just look at the feature and think, &#8220;Is it <em>really</em> so useful that I want to spend at least 10 hours on it in the next three or four years?&#8221; That&#8217;s a good estimate of how much effort you&#8217;re going to put into backwards-compatibility, QA, and everything else for even the smallest feature.</p>
<p>Once you&#8217;ve got a feature, then maintaining backwards-compatibility is generally the thing to do. Modern Bugzilla can still upgrade from 2.8, released in <em>1999</em>. But it can do that because we wrote the upgrader in such a way that old upgrader code doesn&#8217;t require any maintenance&#8211;that is, we get that backwards-compatibility for <em>free</em>. We only have to add new code as time goes on for new versions of Bugzilla, we almost never have to change old code. <em>Free</em> backwards-compatibility like that should always be maintained.</p>
<p>The only time you should seriously consider ditching backwards-compatibility is when keeping it is preventing you from adding obviously useful and important new features. But when that&#8217;s the case, you&#8217;ve really got to ditch it.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/when-is-backwards-compatibility-not-worth-it/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/when-is-backwards-compatibility-not-worth-it/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What Is Overengineering?</title>
		<link>http://www.codesimplicity.com/post/what-is-overengineering/</link>
		<comments>http://www.codesimplicity.com/post/what-is-overengineering/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 07:57:38 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[overengineering]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/12</guid>
		<description><![CDATA[Software developers throw around this word, &#8220;overengineering,&#8221; quite a bit. &#8220;That code was overengineered.&#8221; &#8220;This is an overengineered solution.&#8221; Strangely enough, though, it&#8217;s hard to find an actual definition for the word online! People are always giving examples of overengineered code, but rarely do they say what the word actually means.
The dictionary just defines it [...]]]></description>
			<content:encoded><![CDATA[<p>Software developers throw around this word, &#8220;overengineering,&#8221; quite a bit. &#8220;That code was overengineered.&#8221; &#8220;This is an overengineered solution.&#8221; Strangely enough, though, it&#8217;s hard to find an actual <em>definition</em> for the word online! People are always giving examples of overengineered code, but rarely do they say what the word actually means.</p>
<p>The dictionary just defines it as a combination of &#8220;over&#8221; (meaning &#8220;too much&#8221;) and &#8220;engineer&#8221; (meaning &#8220;design and build&#8221;). So per the dictionary, it would mean that you designed or built too much.</p>
<p>Wait, designed or built <em>too much</em>? What&#8217;s &#8220;too much&#8221;? And isn&#8217;t design a good thing?</p>
<p>Well, yeah, most projects could use <em>more</em> design. They suffer from <em>underengineering</em>. But once in a while, somebody really gets into it and just designs <em>too much</em>. Basically, this is like when somebody builds an orbital laser to destroy an anthill. An orbital laser is really cool, but it (a) costs too much (b) takes too much time and (c) is a maintenance nightmare. I mean, <em>somebody&#8217;s</em> going to have to go up there and fix it when it breaks.</p>
<p>The tricky part is&#8211;how do you know when you&#8217;re overengineering? What&#8217;s the line between good design and <em>too much</em> design?</p>
<p>Well, my criteria is this: When your design actually makes things <em>more complex</em> instead of simplifying things, you&#8217;re overengineering. <span id="more-12"></span> An orbital laser would hugely complicate the life of somebody who just needed to destroy some anthills, whereas some simple ant poison would greatly simplify their life by removing their ant problem (if it worked).</p>
<p>This isn&#8217;t to say that all complexity is caused by overengineering. In fact, most complexity is caused by underengineering. If you have to choose, the <em>safer</em> side to be on is overengineering. But that&#8217;s kind of like saying it&#8217;s safer to be facing <em>away</em> from an atom bomb blast than toward it. It&#8217;s true (because it protects your eyes more), but really, either way, it&#8217;s going to suck pretty bad.</p>
<p>The best way to avoid overengineering is just <a href="/archives/6">don&#8217;t design too far into the future</a>. Overengineering tends to happen like this: &#8220;Okay, I need some code to reverse a string. Well, might as well make a whole sytem for rearranging and modifying the letters in a string, since we might need that some day.&#8221; Essentially, somebody <em>imagined</em> a requirement that they had <em>no idea</em> whether or not was actually needed. They designed too far into the future, without actually <em>knowing</em> the future.</p>
<p>Now, if that developer really <em>did</em> know he&#8217;d need such a system in the future, it would be a mistake to design the code in such a way that the system couldn&#8217;t be <em>added</em> later. It doesn&#8217;t need to be there now, but you&#8217;d be underengineering if you made it impossible to add it later.</p>
<p>With overengineering, the big problem is that it makes it difficult for people to understand your code. There&#8217;s some piece built into the system that doesn&#8217;t really need to be there, and the person reading the code can&#8217;t figure out why it&#8217;s there, or even how the whole system works (since it&#8217;s now so complicated). It also has all the other flaws that designing too far into the future has, such as locking you into a particular design before you can actually be certain it&#8217;s the right one.</p>
<p>There are lots of common ways to overengineer. Probably the most common ways are: making something extensible that won&#8217;t ever need to be extended, and making something way more generic than it needs to be.</p>
<p>A good example of the first (making something extensible that doesn&#8217;t need to be) would be making a web server that could support an unlimited number of other protocols in addition to HTTP. That&#8217;s kind of silly, because if you&#8217;re a <em>web server</em>, then you&#8217;re sending HTTP. You&#8217;re not an &#8220;every possible protocol&#8221; server. </p>
<p>However, in that same situation, <em>underengineering</em> would be not allowing for any future extension of the HTTP standard. That&#8217;s something that <em>does</em> need to be extensible, because it really might change.</p>
<p>The issue here is &#8220;How likely it is that this thing&#8217;s going to change?&#8221; If you can be 99.999% certain that some part of your system is <em>never</em> going to change (for example, the letters available in the English language probably won&#8217;t be changing much&#8211;that&#8217;s a fairly good certainty) you don&#8217;t need to make that part of the system very extensible. (Even so, it&#8217;s still good to leave a tiny little room to expand, in the very rare chance that somebody adds something like, say, the Euro symbol to the language.)</p>
<p>There are just some things you have to assume won&#8217;t change (like, &#8220;We will never be serving any other protocol than HTTP&#8221;)&#8211;otherwise your system just gets too complex, trying to take into account every possible unknown future change, when there probably won&#8217;t even <em>be</em> any future differences. This is the exception, rather than the rule (you should assume most things will change), but you have to have a few stable, unchanging things to build your system around.</p>
<p>The second way (making something too generic) goes like this: Imagine that the Bugzilla Project suddenly went insane, and instead of saying that Bugzilla was a &#8220;bug tracking system&#8221;, we decided to make it into a &#8220;generic system for managing data in a database through forms.&#8221; It would become terribly complex, and it would also stop being a very good bug tracker, because it would be trying to be &#8220;everything to everyone&#8221; instead of just focusing on adding good bug-tracking features. That would definitely be overengineering&#8211;we&#8217;re just trying to track bugs, but suddenly we&#8217;re a generic form system? Yep, sounds like &#8220;orbital lasers&#8221; to me. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>In addition to being too generic on the whole-program level, individual components of the program can also be too generic. A function that processes strings doesn&#8217;t also have to process integers and arrays, if you&#8217;re never going to be getting arrays and integers as input.</p>
<p>You don&#8217;t have to overengineer in a huge way, either, to mess up your system. Little by little, tiny bits of overengineering can stack up into one huge complex mass.</p>
<p><em>Good</em> design is design that leads to simplicity in implementation and maintenance, and makes it easy to understand the code. Overengineered design is design that leads to difficulty in implementation, makes maintenance a nightmare, and turns otherwise simple code into a twisty maze of complexity. It&#8217;s not nearly as common as underengineering, but it&#8217;s still important to watch out for.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/what-is-overengineering/#comments">Comments: 11</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/what-is-overengineering/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How Simple Do You Have To Be?</title>
		<link>http://www.codesimplicity.com/post/how-simple-do-you-have-to-be/</link>
		<comments>http://www.codesimplicity.com/post/how-simple-do-you-have-to-be/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 04:11:15 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mall]]></category>
		<category><![CDATA[stupid dumb simple]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/8</guid>
		<description><![CDATA[Sometimes, when you&#8217;re working on a project, there&#8217;s a question of, &#8220;How simple do we really have to be?&#8221; &#8220;How much do we have to simplify this thing?&#8221; &#8220;Is it simple enough?&#8221;
Well, of course, simplicity is relative. But even so, you can still be more or less simple. From the relative viewpoint of your user, [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, when you&#8217;re working on a project, there&#8217;s a question of, &#8220;<em>How</em> simple do we really have to be?&#8221; &#8220;How much do we have to simplify this thing?&#8221; &#8220;Is it simple <em>enough</em>?&#8221;</p>
<p>Well, of course, <a href="/archives/9">simplicity is relative</a>. But even so, you can still be <em>more</em> or <em>less</em> simple. From the relative viewpoint of your user, your product can be hard to use, easy to use, or somewhere in between.</p>
<p>So, how simple do you have to be?</p>
<p>Honestly?</p>
<p>If you really want to succeed? <span id="more-8"></span></p>
<p><em>Stupid, Dumb Simple</em>.</p>
<p>Apple knows this, one hundred percent. They make products that are so simple they&#8217;re practically idiotic. They aren&#8217;t the most technically advanced products (there are lots of phones that beat the pants off the iPhone in terms of features, for example), but they&#8217;re all usable by total morons. Big bright buttons, no clutter, straightforward interfaces, big text that explains everything&#8211;it&#8217;s like an elementary school textbook, but prettier and more expensive.</p>
<p>That&#8217;s the level of simplicity I&#8217;m talking about&#8211;the kind where you&#8217;d say, &#8220;Hey, my <em>whole family</em> could use this thing!&#8221;</p>
<p>But often, people really just don&#8217;t understand how stupid, dumb simple they have to be, to get to that level. For example:</p>
<p>When I&#8217;m at the mall, there are maps that tell me where everything is. On these maps, I want a <strong>huge red dot</strong>, with the words &#8220;YOU ARE HERE&#8221; in gigantic letters <em>right there</em>. Usually, though, I get a tiny red (or green, or yellow) dot (or triangle, or square) in the middle of the map that I really have to <em>search</em> for to see it. And then, off to the side there&#8217;s some text that explains, &#8220;The tiny green triangle means &#8216;You are here!&#8217;&#8221; Add this up to the general confusion of trying to find anything on these maps, and I could be spending five or six minutes just standing in front of this thing, trying to figure out how to get where I&#8217;m going.</p>
<p>To the guy that designed the map, this is all totally reasonable. He spent lots of time designing this map, so it was important enough to <em>him</em> that <em>he</em> would spend several minutes on it, learn all about it, figure it out, etc. But to me, the map is a very, very minor part of my existence. I just want it to be as simple <em>as humanly possible</em>, so that I can use it quickly and get on with my life!</p>
<p>Many programmers are particularly bad about this with their <em>code</em>. They assume that other programmers will spend a lot of time learning all about their code, because after all, it took a lot of time to write it! The code is that important to <em>them</em>, so isn&#8217;t it that important to everybody?</p>
<p>Now, the programmers I know are generally an intelligent bunch. There&#8217;s always a few exceptions, but mostly they&#8217;re very bright. But it&#8217;s still always a mistake to think, &#8220;Oh, other programmers will understand everything I&#8217;ve done here without any simplification or explanation of my code.&#8221; It&#8217;s not a matter of intelligence&#8211;it&#8217;s a matter of <em>knowledge</em>. That programmer who is new to your code doesn&#8217;t <em>know</em> anything about it. He has to learn! The easier you make it for him to learn, the faster he&#8217;s going to figure it out, and the easier it will be for him to use it.</p>
<p>There&#8217;s lots of ways to make your code easy to use&#8211;simple documentation, simple design, step-by-step tutorials, etc.</p>
<p>But, if your code <em>isn&#8217;t</em> stupid, dumb simple to use, people are going to have trouble with it. They&#8217;re going to use it wrongly, create bugs, and generally muck things up.  And when all this happens, who are they going to come ask about it? Yes, you! <em>You</em> are going to be spending time answering <em>all their questions</em>&#8230;. (Mmmmmmm, sounds fun, doesn&#8217;t it?)</p>
<p>I know that none of us like being talked down to, or treated like we&#8217;re idiots. And sometimes that leads to creating things that are a little complicated, so that we feel like we aren&#8217;t &#8220;talking down to&#8221; to the user or the other programmer. We throw in some big words, make it a little less than simple, and people respect our intelligence but <em>feel kind of stupid because they <strong>don&#8217;t get it</strong></em>. They might think we&#8217;re way smarter than they could ever be, and that is kind of flattering. But really, is that helping <em>them</em>?</p>
<p>On the other hand, when you make things stupidly simple, you&#8217;re allowing the user to <em>understand</em> your product. That makes them feel smart, lets them use the program, and doesn&#8217;t reflect badly on you at all. In fact, your users will probably admire you <em>more</em> if you make things simple than if you make them complex.</p>
<p>So when this question comes up of &#8220;How simple do we have to be,&#8221; you might as well ask yourself, &#8220;Do we want people to understand this and be happy, or do we want them to hate us and be frustrated?&#8221; And if you pick the former, then there&#8217;s only one level of simplicity that will <em>assure</em> your success:</p>
<p><em>Stupid, Dumb Simple</em>.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/how-simple-do-you-have-to-be/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/how-simple-do-you-have-to-be/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Complexity Is a Prison</title>
		<link>http://www.codesimplicity.com/post/complexity-is-a-prison/</link>
		<comments>http://www.codesimplicity.com/post/complexity-is-a-prison/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 06:44:10 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[job security]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/11</guid>
		<description><![CDATA[Sometimes, I think, people are worried that if they make their code too simple, then either:

Somehow they&#8217;re not demonstrating how intelligent they are, or how valuable they are, to their managers, or
The project will become so simple to work on that anybody can just steal their job!

It&#8217;s almost as though if they actually did their [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, I think, people are worried that if they make their code too simple, then either:</p>
<ul>
<li>Somehow they&#8217;re not demonstrating how intelligent they are, or how valuable they are, to their managers, or</li>
<li>The project will become so simple to work on that anybody can just steal their job!</li>
</ul>
<p>It&#8217;s almost as though if they actually did their job right, then they&#8217;d lose it. Now, stated that way, that&#8217;s obviously a nonsensical viewpoint. But, if you&#8217;ve ever worried about it, here&#8217;s something to think about: </p>
<p>What if your code is so complex that you&#8217;ll never be able to <em>leave</em> your job? <span id="more-11"></span></p>
<p>What if you made something <em>so</em> complicated that nobody else could understand it? Well, then <em>you personally</em> would be tied to <em>that project</em> forever and ever. If you wanted to work on some other project at your organization, your managers would protest, &#8220;But who else will maintain this code?&#8221; Whoever was assigned after you to work on your code would constantly be walking into your new office, saying, &#8220;Hey, how does this part work?&#8221;</p>
<p>Maybe you have no conscience, and you&#8217;ll just leave the code to some hopeless replacement and ditch the company. However, I&#8217;m guessing that <em>most</em> people would feel tied to a project if they were sure that nobody else could ever take it over successfully. And really, even if you just take off and leave, somebody&#8217;s going to be calling you up and saying, &#8220;Um, hey, you know that one piece of code where&#8230;&#8221; You&#8217;ll get emails from &#8220;the new guy&#8221;: &#8220;Hey, I hear you wrote this code, and I have this <em>problem</em>&#8230;&#8221; If you can&#8217;t make somebody else understand your code and have them truly take it over, then you&#8217;re going to be stuck with a piece of that job <em>forever</em>.</p>
<p>In the <a href="http://www.bugzilla.org/">Bugzilla Project</a>, I am doing the best I can to work myself out of a job. I love working on Bugzilla, but I don&#8217;t want to be tied to it every moment of my life. I want to go on vacation sometimes. I want to <a href="http://www.imagine80.com/">write music</a>! I want to be able to leave my computer for a month, and not have the whole world collapse. So I work to make Bugzilla simple enough and well-designed enough that somebody else can <em>take over</em> the parts I work on, some day. Maybe then I can go on and work on other things in Bugzilla, or some other programming project that I have, or maybe I could go make an album! Who knows! I just don&#8217;t want to be imprisoned by my own code.</p>
<p>If job security is so important to you that you&#8217;d tie yourself to a single job forever just to get it, then maybe you should re-evaluate your priorities in life! Otherwise, when you&#8217;re making decisions about your project, one thing to remember is this: complexity is a prison; simplicity is freedom.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/complexity-is-a-prison/#comments">Comments: 6</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/complexity-is-a-prison/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Purpose and Simplicity</title>
		<link>http://www.codesimplicity.com/post/purpose-and-simplicity/</link>
		<comments>http://www.codesimplicity.com/post/purpose-and-simplicity/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 22:49:37 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[purpose]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/7</guid>
		<description><![CDATA[A fast way to get complicated is to violate the purpose of what you&#8217;re doing.
For example, what&#8217;s the purpose of a web page? To give and receive information. Mostly to give information, and then some websites also take information, such as when you&#8217;re buying something.
How many complicated web pages have you seen that think they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>A fast way to get complicated is to violate the purpose of what you&#8217;re doing.</p>
<p>For example, what&#8217;s the purpose of a web page? To give and receive information. Mostly to give information, and then some websites also take information, such as when you&#8217;re buying something.</p>
<p>How many complicated web pages have you seen that think they&#8217;re doing something else than giving or receiving information? Maybe they think they&#8217;re being entertaining, or something. I don&#8217;t know what their designers were thinking, but they probably weren&#8217;t thinking about giving or receiving information. Instead they&#8217;re <em>hiding</em> their information in a complicated mass of pictures and shapes.</p>
<p>Usually, the basic purpose of any given thing you&#8217;re working on is pretty simple. But if you <em>add</em> to that purpose, things can get complex pretty fast! For example, the basic purpose of Bugzilla is to store and organize bug reports. If we suddenly made Bugzilla also able to read your email, it would get <em>ridiculously</em> complicated. (Not that Bugzilla is the simplest program in the world, but we&#8217;re working on it.) Can you imagine what the UI would look like? Where would we <em>put</em> all the buttons? That would be a violation of Bugzilla&#8217;s purpose.</p>
<p>It&#8217;s also important to think about <em>user&#8217;s</em> purpose. <span id="more-7"></span> Your user is trying to <em>do something</em>. Ideally, the purpose of a program should be <em>very close</em> (in the exact words you&#8217;d use to describe it) to the user&#8217;s purpose. For example, I&#8217;m trying to blog, and Wordpress is blogging software. That&#8217;s a pretty good match. Wordpress is good about not trying to do everything under the sun&#8211;it&#8217;s just blogging software, and that&#8217;s it, which I like.</p>
<p>Now, if your purpose and the user&#8217;s purpose don&#8217;t match up, you&#8217;re probably making their life difficult. For example, they want to read their email, but your manager&#8217;s purpose is to <a href="http://www.myspace.com/">show them ads</a>. Those don&#8217;t sound like quite the same purpose to me. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Want to see a user get angry really fast? Make it difficult for them to accomplish their purpose. Pop up windows in their face when they&#8217;re trying to do something, add so many features to your program that they can&#8217;t find the right one, use lots of cute little icons that have no meaning&#8211;there&#8217;s all kinds of ways to do it. But they all boil down to interfering with the user&#8217;s purpose or violating the basic purpose of the program itself.</p>
<p>Sometimes, marketers or managers have goals for a program that are not really aligned with the basic purpose of the program: &#8220;Be cute&#8221;, &#8220;Have an edgy design&#8221;, &#8220;Become popular with the news media&#8221;, &#8220;Use the latest technologies&#8221;&#8211;on and on. But marketers are <em>not</em> the people who should be deciding what your program does! As an engineer or technical manager, it&#8217;s <em>your</em> job to see that the program stays on track and never violates its basic purpose. Nobody else is going to hold that responsibility. Sometimes you might really have to fight for it, but it&#8217;s well-worth-it in the long run.</p>
<p>And it&#8217;s not like you&#8217;d come to a marketing failure with that philosophy. I mean, look at the iPod. That&#8217;s a device that sticks to a simple purpose, and it doesn&#8217;t have <em>any</em> marketing difficulty. You don&#8217;t have to have a complicated product to have good marketing. You just have to have <em>good marketing</em>.</p>
<p>There&#8217;s no need to get fancy and complex and try to do five hundred things at once in a single program. Users are usually happiest with a focused, simple product that never violates its basic purpose.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/purpose-and-simplicity/#comments">Comments: 0</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/purpose-and-simplicity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplicity Is Relative</title>
		<link>http://www.codesimplicity.com/post/simplicity-is-relative/</link>
		<comments>http://www.codesimplicity.com/post/simplicity-is-relative/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 05:39:49 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[context]]></category>
		<category><![CDATA[relative]]></category>
		<category><![CDATA[vci]]></category>
		<category><![CDATA[viewpoint]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/9</guid>
		<description><![CDATA[Defining &#8220;simple&#8221; really depends on your target audience. What is simple to me might not be simple to my mother, or my friends. Also, when I create something, it&#8217;s always relatively &#8220;simple&#8221; to me, because I understand it inside and out. But to somebody who&#8217;s never seen it before, it might be very complicated.
This is [...]]]></description>
			<content:encoded><![CDATA[<p>Defining &#8220;simple&#8221; really depends on your target audience. What is simple to me might not be simple to my mother, or my friends. Also, when <em>I</em> create something, it&#8217;s always relatively &#8220;simple&#8221; to me, because I understand it inside and out. But to somebody who&#8217;s never seen it before, it might be very complicated.</p>
<p>This is why in <a href="http://search.cpan.org/dist/VCI/lib/VCI.pm">VCI</a> I put a big, obvious section of documentation near the top called &#8220;New To VCI?&#8221; And then it contains some simple, obvious steps to take. It&#8217;s written as if the reader knows <em>nothing</em> about VCI, because if you&#8217;re new to something, <em>you probably don&#8217;t know anything about it</em>.</p>
<p>I see way too many software projects mess this up. You go to read the documentation, and you&#8217;re presented with a huge mass of links and no direction. This is <em>simple</em> to the long-time developer of the project, because a page with lots of links lets that developer quickly go to the part they&#8217;re looking for. But for the new person, it&#8217;s complicated. On the other hand, for the <em>long-time developer</em>, adding a page with big, simple buttons and eliminating that list of links would add to the <em>complexity</em> of his task, because he&#8217;s just trying to find a very specific thing very fast in the documentation.</p>
<p>The only thing worse than complex documentation is <em>no</em> documentation, where you&#8217;re just expected to figure it out for yourself or &#8220;already know.&#8221; To the developer, the way his program works is <em>obvious</em>, but to the new user, it&#8217;s totally unknown.</p>
<p>With software, there are all sorts of different viewpoints. Just a few would be: Programmer, QA Engineer, Manager, Support Technician, User, Power User&#8211;to all of these people, &#8220;simple&#8221; will be different.</p>
<p><em>Context</em> has a lot to do with this too. <span id="more-9"></span> For example, in the context of a program, object-oriented architectures usually lead to simplicity, if done right. But imagine displaying that structure directly on a web page as the only interface to your program! That wouldn&#8217;t be that simple <em>in that context</em>, even if you were the developer!</p>
<p>You can be a little less bad than that, and still be complex. Some programmers design their user interfaces in a way that&#8217;s very closely tied to the backend architecture of the program. There&#8217;s three fields in the database, so they display three fields on the page, even if, for the user, one field containing three values would be simpler. This is &#8220;simple&#8221; to the developer, because (a) it&#8217;s easy to write and (b) it closely maps to how he or she imagines the program working internally. But when you go and try to actually use the program, it would be simpler for everybody if it was all just one field instead of three. (A classic example of this is how we display &#8220;status&#8221; and &#8220;resolution&#8221; as separate fields in Bugzilla&#8217;s user interface, when users couldn&#8217;t care less that they&#8217;re separate fields.)</p>
<p>Also, sometimes what seems complex is actually simple in the right context. On a billboard by the side of the road, a lot of explanatory text would be very complex! There&#8217;s just no time to read all that text, it would be stupid to put it there. But in a manual for a computer program, lots of text would probably be a lot simpler than just a one-sentence description of something. That&#8217;s why people don&#8217;t just write one-line blogs. It wouldn&#8217;t really be all that simple to just say something and then not give any description of it.</p>
<p>So&#8230;man! All these different viewpoints and contexts! Does this mean that simplicity is impossible, and that everything is hopeless? No! Not at all. <img src='http://www.codesimplicity.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  There are specific target audiences for everything, and the context of any indvidual thing you&#8217;re doing is usually pretty limited. The problem is always solvable. It&#8217;s just important to take these things into account, so that when your work comes out the other end and it&#8217;s actually being used by somebody, it really is simple for that person.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/simplicity-is-relative/#comments">Comments: 4</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/simplicity-is-relative/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Designing Too Far Into The Future</title>
		<link>http://www.codesimplicity.com/post/designing-too-far-into-the-future/</link>
		<comments>http://www.codesimplicity.com/post/designing-too-far-into-the-future/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 06:20:25 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[classic]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[future]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/6</guid>
		<description><![CDATA[There is only a certain amount of the future you can know. You can know with some certainty that you&#8217;ll be breathing in the next few minutes. You can know with some certainty that if you go out to your car and push the gas pedal, the car will probably go somewhere.
The brighter somebody is, [...]]]></description>
			<content:encoded><![CDATA[<p>There is only a certain amount of the future you can know. You can know with some certainty that you&#8217;ll be breathing in the next few minutes. You can know with some certainty that if you go out to your car and push the gas pedal, the car will probably go somewhere.</p>
<p>The brighter somebody is, the better they can accurately predict the future.</p>
<p>However, no matter how smart somebody is or how much they know, there are some things about the future that you <em>can not know</em>.</p>
<p>In programming, the biggest thing you can&#8217;t know is <em>how</em> your program will change in the future. You can know that it <em>will</em> change&#8211;that&#8217;s guaranteed. But <em>how</em> it will change five, ten, or twenty years from now, we just don&#8217;t know.</p>
<p>A common mistake that developers make is designing <em>too far</em> into that unknown future, making too many assumptions about it. Everybody&#8217;s done it, probably. I&#8217;ve done it. You set up some huge, rigid framework and plan, and you get started setting it up, and either:</p>
<ul>
<li>It doesn&#8217;t work and you have to re-write it all, or</li>
<li>Large parts of it never get finished, and then there are little useless pieces sitting around in the code that were &#8220;going to be used&#8221; but never were, or</li>
<li>After years of work you find that you&#8217;ve designed yourself into a hole and have to re-write the whole thing.</li>
</ul>
<p>I did that once, in Bugzilla, in a simple but stupid way. <span id="more-6"></span> In Bugzilla, there are drop-downs where the user can make selections. The list of choices can be customized by the Bugzilla administrator. I added an <kbd>is_active</kbd> column to the database, which was <em>eventually</em> going to allow the administrator to disable the selection of certain choices.</p>
<p>Well, that was three years ago, and you still can&#8217;t disable those choices in Bugzilla. But that database column is still sitting there, confusing everybody.</p>
<p>The right way to go about development, particularly in an open source project, is to design for the specific requirement (singular) that you know is broadly needed, and implement that on top of the system you already have. If that can&#8217;t be done, or can&#8217;t be done with simple code, then you do re-architecture. Rinse and repeat.</p>
<p>Violations of that principle lead to crazy, messy code that nobody wants to maintain after a few years. People design massive changes that do everything in some extremely specific way, based on a nearsighted design. Then, much later when somebody comes up with some feature that you never thought of but would be extremely useful, you can&#8217;t implement it because you&#8217;ve got this unwieldy very-specific design that handled only what you needed at the time, and can&#8217;t be extended to do what you need now.</p>
<p>What do I mean by &#8220;nearsighted design?&#8221; Basically, code should be designed on what you have, not on what you <em>think</em> you&#8217;ll have in the future. It should be designed for the requirement that you have right now, without excluding the possibility of future requirements. If you <em>know</em> for a fact that you need it to do X, and just X, then <strong>just design it to do X</strong>. </p>
<p>A general example of this problem is Bugzilla&#8217;s <a href="http://lxr.mozilla.org/mozilla/source/webtools/bugzilla/Bugzilla/BugMail.pm">BugMail.pm</a> file. It does everything and the kitchen sink, and was pulled out of an old script called &#8220;processmail&#8221; which basically did the same thing. Instead of being carefully designed and engineered piece by piece, it was designed way back when as a single, massive whole. As a result, nobody fully understands it today, and it&#8217;s pretty difficult to add new features there. Want to make Bugzilla send HTML mail? Ohhh, good luck. As a result, I&#8217;m going to have to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=301447">redesign the module</a>, when it should have just been <em>designed</em> in the first place.</p>
<p>The original authors could have designed it simply, piece by piece, the <em>first</em> time, and entirely saved me the time I&#8217;m going to spend fixing it. <em>The amount of extra time required to get it right the first time would have been less than the time it will now take me to fix it.</em></p>
<p>It&#8217;s fine to design for what you need at the time, as long as it&#8217;s a small design. So, I just make all designs into small designs, and we&#8217;re fine. That&#8217;s why I&#8217;m so adamant about &#8220;one bug report for one issue.&#8221; Because it encourages small designs, and it keeps code maintainable.</p>
<p>Maybe for some developers it&#8217;s just a misunderstanding of what the word &#8220;design&#8221; means in programming:</p>
<p>When you have a brand-new product that you haven&#8217;t even made yet, first you find out what its requirements are. Then you write a program that fulfills those requirements. You write it in a way that it can be updated in the future for unknown requirements. That&#8217;s where design falls in. You look at an individual requirement and you say, &#8220;Okay, how can we make this so that it works perfectly, and we can also extend it for unknown requirements in the future?&#8221; If you&#8217;re at the point of the initial product design (that is, you don&#8217;t have a product yet), you&#8217;ll probably also want to look at the other requirements and make sure that your design isn&#8217;t going to impede those. However, if you actually design any individual requirement correctly (or any piece of your program correctly), it&#8217;s unlikely that you&#8217;ll interfere too much with other requirements.</p>
<p>This is how many, many people can be working on an open source project simultaneously without knowing what the others are doing. They design their code so that it doesn&#8217;t matter what&#8217;s going on anywhere else. The code just works, and can be modified and extended easily by anybody. There are lots of ways to do this&#8211;they mostly fall under the rules for good object-oriented design. You can find those elsewhere, so I&#8217;m not going to go into them here.</p>
<p>Some people think design means, &#8220;Write down exactly how you&#8217;re going to implement an entire project, from here until 2010.&#8221; That won&#8217;t work, brother. That design is too rigid&#8211;it doesn&#8217;t allow your requirements to change. And believe me, your requirements are going to change.</p>
<p>Planning is good. I should probably do more planning myself, when it comes to writing code.</p>
<p>But even if you don&#8217;t write out detailed plans, you&#8217;ll be fine as long as your changes are <em>always small</em> and easily extendable for that unknown future.</p>
<p>-Max</p>
<p><a href="http://www.codesimplicity.com/post/designing-too-far-into-the-future/#comments">Comments: 8</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/designing-too-far-into-the-future/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Wrong With Computers</title>
		<link>http://www.codesimplicity.com/post/whats-wrong-with-computers/</link>
		<comments>http://www.codesimplicity.com/post/whats-wrong-with-computers/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 05:37:08 +0000</pubDate>
		<dc:creator>Max Kanat-Alexander</dc:creator>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[classic]]></category>
		<category><![CDATA[theory]]></category>

		<guid isPermaLink="false">http://www.codesimplicity.com/archives/4</guid>
		<description><![CDATA[  Note: This is a &#8220;classic&#8221; article from my old blog, but with some new revisions. This article was where I started with the idea of simplicity in computing, and I&#8217;ve been going on that idea ever since.
	Computers have created a major societal change. The reason is that you can do more work with [...]]]></description>
			<content:encoded><![CDATA[<p>  <em>Note: This is a &#8220;classic&#8221; article from my old blog, but with some new revisions. This article was where I started with the idea of simplicity in computing, and I&#8217;ve been going on that idea ever since.</em></p>
<p>	Computers have created a major societal change. The reason is that you can do more work with fewer people. That&#8217;s really the entire value of a computer—it can do a lot of work, really fast. If a person was to do, by hand, all the math that a computer does just when it starts up, it would probably take the rest of that person&#8217;s life.</p>
<p>	So that&#8217;s great.</p>
<p>	Problem is, they break. They break all the time. If anything in my house broke as frequently as my computer, I would return it. Most of the people that I know, their computer crashes at least once a day. Almost every day, I see a computer break in a way that I&#8217;ve never seen before. That&#8217;s been pretty much every day since I was about eight years old, so I&#8217;ve probably seen a computer break over 41,000 different ways, now.</p>
<p>	That&#8217;s not great.</p>
<p>	Why do computers break so much? For software, there&#8217;s one reason, and one reason only. <em>Bad programmers.</em></p>
<p>	Now, I didn&#8217;t used to be a programmer, and so I wondered about this sort of thing. I suspected that there were bad programmers, but it was sort of like blaming &#8220;witches&#8221; for a bad crop harvest. I didn&#8217;t really know anything about the subject, so there was some reasonable doubt.</p>
<p>	Now that I am a programmer, and I have worked for a long time in a professional setting, and have talked extensively to other people who have been professional programmers for a long time, I can confirm that it really is bad programmers.</p>
<p>	So, what is a bad programmer and why would somebody be one? This term, &#8220;bad programmer,&#8221; is pretty ambiguous. Also, most of the people I&#8217;ve ever met aren&#8217;t totally illogical, so there must be some <em>reason</em> why they would do “bad” programming.</p>
<p>	Basically, it all revolves around complexity.<span id="more-4"></span></p>
<p>	A computer is probably the most complex device that we can make in a factory today. It does <em>billions</em> of things a second. It has hundreds &#8212; if not thousands &#8212; of tiny parts that all must function correctly in order for it to work.</p>
<p>	A program written on that computer is equally as complex. For example, when it was written, Microsoft Windows 2000 was the longest program ever created, at somewhere around 20 million lines. That&#8217;s something like writing a book of 150,000,000 words—nearly four times the size of the Encyclopedia Britannica.</p>
<p>	The complexity of a program can be particularly confounding, because there isn&#8217;t anything to put your <em>hands</em> on. When it breaks, you can&#8217;t pick up something solid and look around inside it. It&#8217;s all abstract, and that can be really hard to deal with. In fact, the average computer program is so complex that probably no person could actually comprehend the entirety of how all the code works, all at once. The bigger they get, the more this is the case.</p>
<p>	Thus, programming has to become the act of <strong>reducing complexity to simplicity</strong>. Otherwise, nobody could keep working on a program after it reached a certain level of complexity. The complex pieces have to be organized in some simple way so that a programmer can work on it without godlike mental abilities.</p>
<p>	That is the art and talent involved in programming—reducing complexity to simplicity.</p>
<p>	A &#8220;bad programmer&#8221; is just somebody who fails to reduce the complexity. Many times this happens because people believe that they <em>are</em> reducing the complexity of <em>just writing in the programming language</em> (which is definitely a complexity all in itself) by writing things that just &#8220;work,&#8221; without thinking about reducing the complexity for <em>other programmers</em> that they are working with.</p>
<p>	It&#8217;s sort of like this: </p>
<p>	Imagine you have an engineer, who, in need of something to pound a nail into the ground with, invents a device involving pulleys, strings, and a large magnet. Well, you&#8217;d probably think that was pretty silly.</p>
<p>	Now imagine that I tell you: &#8220;I need some code that I can use in <em>any program, anywhere</em>, that will communicate between <em>any</em> computer and <em>any</em> other computer, using any medium imaginable.&#8221; That&#8217;s definitely harder to reduce to something simple. So, some programmers in that situation (and I might even say <em>most</em> programmers, but I don&#8217;t know all of them, so I can&#8217;t say) come up with something that involves strings and pulleys and a large magnet, that is only barely comprehensible to other people. They&#8217;re not irrational, and there&#8217;s nothing wrong with them. They were faced with a really difficult task, and they did what they could in the short time that they had. And what they made <em>works</em>, as far as they&#8217;re concerned. It does what it&#8217;s supposed to do. That&#8217;s what their boss wants, and that&#8217;s what their customers seem to want, as well.</p>
<p>	But one way or another, they still failed to reduce the complexity to a simplicity. Then they passed this device off to another programmer, and that programmer also added to the complexity by using that device as part of his/her device. The more people who don&#8217;t reduce complexity, the more incomprehensible the program becomes.</p>
<p>	As the program approaches infinite complexity, it is impossible to find all the problems with it. Jet planes cost millions or billions of dollars because they are <em>close</em> to this complex and <em>were</em> &#8220;de-bugged.&#8221; But software only costs about 50 or 100 bucks, usually, and is more complicated. There&#8217;s no way to spend time shaking all of the problems out of this infinitely complex device that&#8217;s being created.</p>
<p>	So, a &#8220;good programmer&#8221; will do everything in his/her power to make what he writes as simple as possible <em>to other programmers</em>. A &#8220;good&#8221; programmer creates things that are easy to understand, so that it&#8217;s really easy to shake all the bugs out.</p>
<p>	Now, sometimes this simplicity is misunderstood to mean that programs should not have a lot of code. Or that programs shouldn&#8217;t use advanced technologies. But that&#8217;s not true. Sometimes a lot of code actually leads to simplicity; it just means more writing and more reading, which is okay. You have to make sure that you have some short document explaining the big mass of code, but that&#8217;s all part of reducing complexity. Also, usually more advanced technologies lead to <em>more</em> simplicity, even though you have to learn about them first, which can be some trouble.</p>
<p>	Some people believe that writing in a simple way takes more time than quickly writing something that &#8220;does the job.&#8221; Actually, it turns out that it&#8217;s faster to spend a little more time making things simple, as compared to writing things quickly at the beginning and then spending a lot of time trying to understand them later. That&#8217;s a pretty big simplification of the issue, but it turns out to be the case by programming-industry history. Many great programs have stagnated in their development over the years just because it took so long to add a feature to the complex beast that they had become.</p>
<p>	And that is why computers break so often, because in most major programs out there, many of the programmers on the team failed to reduce the complexity of the part they were writing. Yes, it&#8217;s difficult. But that doesn&#8217;t make it okay to write complex software.</p>
<p><a href="http://www.codesimplicity.com/post/whats-wrong-with-computers/#comments">Comments: 2</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.codesimplicity.com/post/whats-wrong-with-computers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
