<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Computer science and technology demystified.</description><title>Benjy Weinberger</title><generator>Tumblr (3.0; @benjyweinberger)</generator><link>http://benjyw.com/</link><item><title>10 Tech Concepts Everyone Should Know</title><description>&lt;p&gt;&lt;span&gt;If you work in the tech industry then your daily conversations are littered with tech terms. You&amp;#8217;ll probably have at least a vague idea of what these mean, b&lt;/span&gt;&lt;span&gt;ut if you&amp;#8217;re not in a technical role it&amp;#8217;s sometimes hard to put these concepts and buzzwords in precise context.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this post I&amp;#8217;ll briefly explain ten basic terms that engineers use every day. Whatever your role in the tech industry, you&amp;#8217;ll benefit from knowing exactly what these mean.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Brevity will require me to leave many important details out. If you&amp;#8217;d like me to elaborate further, or if there are other concepts you&amp;#8217;d like explained, let me know! I&amp;#8217;ll be happy to write another post in this vein in the future.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;!-- more --&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. API&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Like any other work we do, software needs to be organized. We typically organize software into distinct modules, each responsible for a different task.&lt;/p&gt;
&lt;p&gt;These components often need to talk to each other. &lt;span&gt;For example, a DISPLAY module that displays a web page can send a URL to a FETCHER module that pulls web pages from the internet and returns the contents of those pages.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;An &lt;em&gt;Application Programming Interface (API)&lt;/em&gt; is a formal specification of how one software module interacts with another. For example, the API of the FETCHER component might be something like:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;content = FETCHER.fetch(URL)&lt;/p&gt;
&lt;p&gt;Meaning, &amp;#8220;pass a URL into my &amp;#8216;fetch&amp;#8217; function, and I will return the content of the web page at that URL&amp;#8221;. The DISPLAY component can use this, but so can &lt;em&gt;any other module&lt;/em&gt; that needs to fetch web pages.&lt;/p&gt;
&lt;p&gt;In other words, APIs offer a simple, standardized way to provide functionality, without requiring a lot of intricate coordination. I explained APIs in detail &lt;a href="http://benjyw.com/post/26966201626/apis-explained" target="_blank"&gt;in a previous post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Technology Stack&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every engineering team works on unique problems: making tweets flow, mining check-ins for recommendations, sharing photos.&lt;/p&gt;
&lt;p&gt;However most engineering projects also have many problems in common: how to store and retrieve data efficiently, how to serve web pages over the network, how to handle user logins and so on.&lt;/p&gt;
&lt;p&gt;It would be a huge waste of resources to have every engineering team solve those common problems over and over again, re-inventing the wheel each time. Instead, we rely on standard components to do this general-purpose work. The set of standard components we choose are our&lt;em&gt; technology stack&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A common example of a technology stack is the &lt;em&gt;LAMP stack&lt;/em&gt;: Linux for the operating system, Apache for the web server, MySQL for the database and PHP (or Python) for the server coding environment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. DNS&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Computers love numbers, so servers on a network locate and identify each other using their IP addresses, which are dot-separated numbers, like 107.23.22.73. These are difficult for humans to work with, so servers are given human-readable domain names, like &lt;a href="http://www.foursquare.com" target="_blank"&gt;www.foursquare.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Domain Name Service&lt;/em&gt; (&lt;em&gt;DNS&lt;/em&gt;) is a distributed global directory that converts human-readable domain names into machine-friendly IP addresses. When you type &lt;a href="http://www.foursquare.com" target="_blank"&gt;www.foursquare.com&lt;/a&gt; into your browser&amp;#8217;s address bar, the browser contacts a DNS server to ask it to translate that name into an IP address, and then sends the original request to that IP address.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Open Source&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Software is written by developers in a high-level programming language like C++, Java or Python, and then converted into low-level machine instructions that computers understand. You can use software without access to the original &lt;em&gt;source code &lt;/em&gt;from which it was created, so in conventional commercial software projects, the source code is proprietary and secret.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Open source&lt;/em&gt; projects, however, make their source code publicly available. &lt;span&gt;This allows users to read the code in order to debug the software, to modify and improve it, and to re-use parts of the code for other purposes. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Open source software has the distinct advantage of being free, both &amp;#8220;as in speech&amp;#8221; and &amp;#8220;as in beer&amp;#8221;. It&amp;#8217;s this second type of free-ness that is most appealing: why pay for proprietary software if there&amp;#8217;s a free open-source alternative that&amp;#8217;s good enough?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Prominent open source projects include: The Linux operating system, the MySQL database server, the Apache web server, the Hadoop data analysis system and more.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Open source projects encourage sharing and inspiration. Most open source projects encourage people to contribute their changes back to the project, for everyone else to enjoy. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Machine Learning&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Computers are very good at doing mundane tasks, like sorting and searching, much faster than humans can. Whenever there&amp;#8217;s a straightforward algorithm for arriving at a solution, the computer&amp;#8217;s brute force can apply that algorithm with amazing speed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However there are tasks that humans are much better than computers at, such as converting speech to text, or identifying visible objects. These are tasks for which there are no known straightforward algorithms.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Humans, of course, aren&amp;#8217;t born with these abilities, but learn them early in life, doing poorly at first but then improving bit by bit. So one approach to getting computers to be able to perform these tasks is to devise algorithms that simulate learning.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;These &lt;em&gt;Machine learning algorithms&lt;/em&gt; infer general rules from a set of examples, in a manner superficially similar to human learning. They are useful for finding approximate solutions to those problems for which there are no known straightforward algorithms. Siri, for example, is the result of a machine learning algorithm that approximates human understanding of speech.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Version Control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In any engineering organization, multiple people collaborate on the same set of source code files. There is a constant danger of people stomping on each others&amp;#8217; work: If Alice and Bob work on the same file, unbeknownst to each other, then if Bob saves his work right after Alice does he&amp;#8217;ll overwrite her changes.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Version control systems &lt;/em&gt;&lt;span&gt;store source code and manage their versioning. They prohibit conflicting updates from multiple people. When Bob tries to save his work, the system will tell him that Alice has updated the file since he last read it, and force Bob to read Alice&amp;#8217;s version and re-apply his changes on top of that. The system provides file-merging tools to make this re-applying of changes easy.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Version control systems also store all previous versions of each file. This allows developers to make progress while still being able to debug servers running older versions of the code. Developers can temporarily &amp;#8220;roll back&amp;#8221; to an older, more stable version of the code, if a new version turns out to be buggy. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Git is a commonly used version control system, and &lt;/span&gt;&lt;a href="http://www.github.com/" target="_blank"&gt;github&lt;/a&gt;&lt;span&gt; is a SaaS version of git.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7. Algorithm&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;An &lt;em&gt;algorithm&lt;/em&gt; is like a recipe: it&amp;#8217;s a list of step-by-step instructions that can be unambiguously and mindlessly followed by a computer. Algorithms are &lt;em&gt;implemented&lt;/em&gt; by writing out those instructions in a particular programming language. All software development is, at its core, implementation of algorithms.&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Some algorithms produce an always-correct output, such as a sorted list of numbers. Others produce an estimated output that may only be approximately correct, such as a transcription of a voicemail message. Machine learning algorithms (see above) are examples of this class of approximating algorithms.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Some algorithms are deterministic: they produce the same result each time they are run on the same input. Others are probabilistic: they produce a different result each time they are run on the same input. An example of a probabilistic algorithm is one that simulates a coin tossing game. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I discuss algorithms in detail &lt;a href="http://benjyw.com/post/27780110644/algorithms-and-ai" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://benjyw.com/post/28326163501/algorithms-and-ai-part-2" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8. Client / Server&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When two computers interact over a network, the&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;em&gt;client&lt;/em&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;initiates the interaction by sending a request to the&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;em&gt;server&lt;/em&gt;&lt;span&gt;. The server performs some task and returns the results to the client.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is easiest to understand by analogy:&lt;/p&gt;
&lt;p&gt;Say, for example, your sister phones you and asks if you can give her a ride to the airport. You say you&amp;#8217;ll pick her up at 6. &lt;span&gt;In this scenario your sister is the &lt;/span&gt;&lt;em&gt;client&lt;/em&gt;&lt;span&gt;, making the request, and you are the &lt;/span&gt;&lt;em&gt;server,&lt;/em&gt;&lt;span&gt; responding to it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now say you were planning to go to a movie with a friend, so you put your sister on hold while you phone the friend and ask if he minds going to the later show. He doesn&amp;#8217;t mind, so you return to the call with your sister and tell her you&amp;#8217;ll pick her up at 6.&lt;/p&gt;
&lt;p&gt;In the first conversation, your sister is the client and you are the server. In the second conversation, you are the client and your friend is the server. Note that in a single &amp;#8220;roundtrip&amp;#8221; you were acting as the server in one interaction and the client in another.&lt;/p&gt;
&lt;p&gt;Web browsers and mobile devices are often referred to colloquially as &amp;#8220;the clients&amp;#8221;, because they are the first initiators of network requests, and so are always clients, never servers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9. UNIX / Linux&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An operating system is software that manages computer hardware and bridges between the machine and the programs that run on it. Two very familiar OSes are Microsoft Windows and Mac OS X (&lt;span&gt;I discuss operating systems in detail&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;a href="http://benjyw.com/post/47578880778/cs101-part-5-operating-systems-pt-1" target="_blank"&gt;here&lt;/a&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;and&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;a href="http://benjyw.com/post/48622305902/cs101-part-6-operating-systems-pt-2" target="_blank"&gt;here&lt;/a&gt;).&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Long before Bill Gates and Steve Jobs came along, however, there was &lt;em&gt;UNIX&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;UNIX is an operating system first developed at Bell Labs in the early 1970s. It&amp;#8217;s notable because many of its innovations strongly influenced the design of later operating systems, all the way to the present day. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Linux&lt;/em&gt; is an open source UNIX-like operating system that has been in continuous development since 1991.&lt;span&gt; Unlike Windows or OS X, Linux is free. This means that companies can install it on all their datacenter machines without it costing any money. And since companies can have hundreds, thousands or even tens of thousands of datacenter servers, this leads to huge savings, and helps explain why Linux is so phenomenally popular.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10. Distributed Systems&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Large-scale services like Google and Facebook have so much data, and serve so many requests, that no single server can possibly handle it all. A &lt;em&gt;distributed system&lt;/em&gt; is one that uses multiple computers, connected by a network, to perform a task or provide a service.&lt;/p&gt;
&lt;p&gt;The user of such a system has no idea of the details: how many computers are involved, how they&amp;#8217;re connected and what each one does. The system appears to the outside like one entity, even though internally it&amp;#8217;s composed of many parts.&lt;/p&gt;
&lt;p&gt;Distributed systems provide two advantages: they can handle far more data and far more traffic than any single machine, and they can be far more reliable: if a single machine in a distributed system fails, other machines step in to take over the broken machine&amp;#8217;s work. A distributed system is a reliable whole built out of unreliable parts. &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><link>http://benjyw.com/post/50031659939</link><guid>http://benjyw.com/post/50031659939</guid><pubDate>Thu, 16 May 2013 15:37:00 -0700</pubDate><category>feature</category></item><item><title>Is a CS Degree Worth It?</title><description>&lt;p&gt;As ReadWrite &lt;a href="http://readwrite.com/2013/04/19/make-money-teaching-to-code" target="_blank"&gt;noted recently&lt;/a&gt;, learning how to code has never been hotter. &lt;span&gt;Tech-education startups like &lt;/span&gt;&lt;a href="http://teamtreehouse.com/" target="_blank"&gt;Treehouse&lt;/a&gt;&lt;span&gt; and &lt;/span&gt;&lt;a href="http://www.codecademy.com/#!/exercises/0" target="_blank"&gt;Codeacademy&lt;/a&gt;&lt;span&gt; are booming; Non-profits such as &lt;/span&gt;&lt;a href="http://www.code.org/" target="_blank"&gt;code.org&lt;/a&gt;&lt;span&gt; are working to make programming education available in schools; &lt;/span&gt;&lt;a href="http://workshops.railsbridge.org/" target="_blank"&gt;Informal&lt;/a&gt;&lt;span&gt; &lt;/span&gt;&lt;a href="http://pystar.org/" target="_blank"&gt;workshops&lt;/a&gt;&lt;span&gt; abound, and more and more non-engineering &lt;/span&gt;&lt;a href="http://www.christinacacioppo.com/blog/2013/01/29/learning-to-make/" target="_blank"&gt;tech industry&lt;/a&gt;&lt;span&gt; &lt;/span&gt;&lt;a href="https://twitter.com/alexia/status/153604659616034816" target="_blank"&gt;insiders&lt;/a&gt;&lt;span&gt; are getting in on the action.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Anyone with access to the internet now has within reach an incredible array of informal programming education resources, including many specifically targeted at women (a demographic still underrepresented in CS departments). With that, and the availability of simple web application frameworks such as Ruby on Rails, you  can learn to create basic but real webapps in just a few weeks. What was once the province of the nerdy few is now available to many. &lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Should I go back to school?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Given all this, you might wonder if an academic Computer Science degree still has as much value as it used to.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Indeed, &lt;/span&gt;&lt;span&gt;ReadWrite recently published this &lt;/span&gt;&lt;a href="http://readwrite.com/2013/04/26/is-it-better-to-learn-to-code-at-school-or-at-home-infographic" target="_blank"&gt;infographic&lt;/a&gt;&lt;span&gt; under the question-begging headline &amp;#8220;Learning to Code: Get a Degree, or Just Teach Yourself?&amp;#8221;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However there is a rather large difference between &amp;#8220;coding&amp;#8221; and &amp;#8220;software engineering&amp;#8221; (*). &lt;/span&gt;&lt;span&gt;To use a rough and imperfect analogy: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;coding&amp;#160;: construction work :: &lt;span&gt;software engineering&amp;#160;: architecture&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After a few weeks or months of informal coding instruction you can acquire the skills to put together a small-scale, simple webapp, or to implement a small, isolated piece of logic. But you&amp;#8217;ll have only limited ability to design a large-scale system, to analyze performance, to implement algorithms or to choose appropriate data structures. Those abilities rely on a rigorous theoretical background.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Coding vs. Computer Science&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In fact, that ReadWrite headline is misleading, because you don&amp;#8217;t get a degree in order to &amp;#8220;learn how to code&amp;#8221; (**). You get a degree in order to learn computer science. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Undergraduate and graduate CS students learn algorithms, data structures, operating systems, computational complexity, programming language theory, machine learning and more, not to mention the math needed to properly master these topics: advanced calculus, linear algebra, mathematical logic, set and group theory, combinatorics and more.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This rigorous theoretical background gives a graduate the knowledge and experience necessary to solve a wide range of problems, and to reason about them from first principles.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In fact, in some CS departments, &lt;/span&gt;&lt;span&gt;coding is taught as an afterthought. For example, at my alma mater, Hebrew University in Israel, we had no required coding courses at all. We were taught C and C++ by the TAs of various classes just so we&amp;#8217;d be able to code up our coursework.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Some people can learn CS, or at least enough of it to be very successful software engineers, informally. I know people who have done this. But such autodidacts are the exception that proves the rule. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Then why learn to code?&lt;/strong&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If a CS degree is so important to a software engineering career, we might ask the opposite question: is there any value in learning how to code informally? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Absolutely there is!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;First of all, if you work in tech but are not an engineer, a basic grasp of coding will improve your understanding of your own industry. VCs, tech journalists and bloggers, in particular, can benefit greatly from leveraging their existing affinity for tech into learning how to code. A little programming experience helps you understand which technology problems are hard and which are easy, which is an important distinction to make when investing in, or reporting on, technology.&lt;/p&gt;
&lt;p&gt;But coding skills will also benefit people far outside the tech industry. &lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the past two decades computers became ubiquitous in homes and workplaces. In the past five years they&amp;#8217;ve become commonplace in our pockets, in the form of smartphones. In the next decade they&amp;#8217;ll enmesh even deeper: in our cars, our household appliances, our &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;a href="http://www.google.com/glass/start/" target="_blank"&gt;eyewear&lt;/a&gt;&lt;span&gt;&amp;#8230; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Increasingly, understanding computers will become important to understanding society. Computer literacy will be &lt;em&gt;the&lt;/em&gt; skill underlying all others in the next few decades, and learning how to code is by far the best way to acquire this skill. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Going inside the black box&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To use an analogy: you can drive a car reasonably well without knowing how it works. You press the gas pedal, it accelerates; You press the brake it stops. But if you want to be a really good driver, able to drive fast yet safely in non-ideal conditions, it&amp;#8217;s vital to know a little bit about how cars work, in order to understand, say, the relationship between engine torque and acceleration, or road conditions and braking. &lt;/p&gt;
&lt;p&gt;Similarly, if you don&amp;#8217;t know how to code, then you&amp;#8217;re mostly treating a computer as a black box: if I do X then I get result Y. But as we all know, sometimes you get Z instead, and boy are those times frustrating. If you know how to code you can reason about &lt;em&gt;why&lt;/em&gt; the computer behaves the way it does. You&amp;#8217;ll get a hell of a lot more out of using a computer if you understand it at that level.&lt;/p&gt;
&lt;p&gt;Very few people earn a Mathematics degree, but we still expect everyone to be able to do basic mental arithmetic. Similarly, not everyone can or should get a CS degree, but everyone can and should be able to do a little bit of coding.&lt;/p&gt;

&lt;p&gt;&lt;span&gt;(*) Full disclosure- the author of this post has a CS degree, and is therefore predisposed to believe that it&amp;#8217;s valuable&amp;#8230;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(**) The headline is also misleading for another reason: the article itself talks only about web design, which is a different discipline than software development.&lt;/span&gt;&lt;/p&gt;</description><link>http://benjyw.com/post/49269650638</link><guid>http://benjyw.com/post/49269650638</guid><pubDate>Tue, 30 Apr 2013 11:01:00 -0700</pubDate><category>feature</category></item><item><title>CS101 part 6: Operating Systems pt. 2</title><description>&lt;p&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;My &lt;a href="http://benjyw.com/post/47578880778/cs101-part-5-operating-systems-pt-1" target="_blank"&gt;previous&lt;/a&gt; CS101 post explained what operating systems are, and what services they provide. This post offers a &lt;span&gt;quick tour through some basic operating systems concepts, and explains in more detail how the OS provides certain services. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#8217;ll describe in turn how the OS manages each of the four basic resources: CPU, disk, memory and network. You&amp;#8217;ll probably have heard of some of the concepts before, but not known exactly what they referred to. So now you&amp;#8217;ll know!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;!-- more --&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CPU&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A running instance of a program is called a &lt;em&gt;process&lt;/em&gt;. A computer runs many processes at the same time. &lt;/p&gt;
&lt;p&gt;Modern CPUs have multiple &lt;em&gt;cores&lt;/em&gt;. Think of a core as a mini-processor within the main processing unit. If a CPU has 8 cores, it can perform 8 computations simultaneously.&lt;/p&gt;
&lt;p&gt;Programs take advantage of cores by having multiple &lt;em&gt;threads&lt;/em&gt; of execution. A thread is a sequence of computation in a process that can run concurrently with other threads in the same process or in other processes. The various processes running on a machine ask the OS to &lt;em&gt;schedule&lt;/em&gt; their threads for execution, and the OS allocates processing time fairly to all the threads in all the processes.&lt;/p&gt;
&lt;p&gt;Typically there might be hundreds of threads vying for 8 cores. The OS controls the time-sharing, so that each thread runs for a while, then stops, freeing up a core so that another thread can run. This all happens so rapidly that programs appear to execute smoothly, even though in reality they, or rather their threads, are constantly stopping and starting. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disk&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The OS organizes data on disk into &lt;em&gt;files&lt;/em&gt;. A file is a logical piece of data: your tax return in PDF format, or &amp;#8220;She Bangs the Drums&amp;#8221; by The Stone Roses in MP3 format (yes, I was at Coachella last weekend&amp;#8230;)&lt;/p&gt;
&lt;p&gt;Files are organized into &lt;em&gt;directories&lt;/em&gt;, and directories are ordered hierarchically in a &lt;em&gt;filesystem&lt;/em&gt;. This much is familiar to anyone who&amp;#8217;s used a computer.&lt;/p&gt;
&lt;p&gt;However the file/directory structure is just a convenience, and has little to do with how the data is actually stored on the physical disk. The filesystem carves up each file into fixed-size &lt;em&gt;blocks&lt;/em&gt;, scatters those blocks all over the physical disk, and remembers where they all are and how to reassemble them in order. There is no meaning to &amp;#8220;files&amp;#8221; or &amp;#8220;directories&amp;#8221; at the physical level - just data blocks.&lt;/p&gt;
&lt;p&gt;Thus, programs (and humans) can access disk using the convenient and simple &amp;#8220;file/directory&amp;#8221; idiom, while the OS, via the filesystem, provides the low-level disk management.&lt;/p&gt;
&lt;p&gt;The OS also provides &lt;em&gt;page caching&lt;/em&gt; - commonly or recently used data blocks are kept in memory, as well as on disk, so that they can be read much faster than if they had to be fetched from physical disk. This greatly improves the performance of the filesystem in many cases.&lt;/p&gt;
&lt;p&gt;Note that &amp;#8220;disk&amp;#8221; here means not just rotating disks but also solid-state drives, which are increasingly replacing those old-fashioned spinning magnetic platters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Memory is written to and read from via &lt;em&gt;addresses&lt;/em&gt;. Addresses are numbers that point to memory locations: location 0, 1, 2 &amp;#8230; etc. Each addressable location stores a single byte of data, so a machine with 4GB of RAM has around 4 billion addresses.&lt;/p&gt;
&lt;p&gt;That may sound like a lot, but it isn&amp;#8217;t. RAM is often the most scarce resource on a computer, and many processes must share it. The OS mediates the memory needs of different processes using the &lt;em&gt;virtual memory&lt;/em&gt; system.&lt;/p&gt;
&lt;p&gt;Virtual memory allows processes to pretend that they each have their own private memory &lt;em&gt;address space&lt;/em&gt;, in other words, each process has its own location 0, 1, 2 &amp;#8230; etc. The address space of each process is divided into &lt;em&gt;pages &lt;/em&gt;and the OS assigns these virtual pages to address pages in real physical memory. &lt;span&gt;The OS then handles the translation between the virtual and physical addresses.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For example, for process A, virtual locations 0-999 might be stored in physical locations 8000-8999, while virtual locations 1000-1999 might be stored in physical locations 5000-5999. At the same time, physical locations 6000-6999 might store locations 0-999 of process B.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="http://media.tumblr.com/d9bf9d83b84c3ecbeb974adb70b78199/tumblr_inline_mlo318O1ci1qz4rgp.png"/&gt;&lt;/p&gt;

&lt;p&gt;Virtual memory has several benefits:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;span&gt;Multiple processes can share physical memory without stepping on each others&amp;#8217; toes.&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;It&amp;#8217;s &lt;/span&gt;much&lt;span&gt; simpler to write programs with the assumption of exclusive access to a contiguous address space.&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;If demand for memory exceeds supply, the OS can &lt;/span&gt;&lt;em&gt;swap&lt;/em&gt;&lt;span&gt; less frequently used data out to disk, freeing up physical memory for a process that needs it. &lt;/span&gt;&lt;span&gt;When the original process whose data was swapped out needs it again, the OS reads it back in from disk, possibly to an entirely different physical memory page. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;span&gt;Swapping is a neat trick, but disk access is slow, so excessive use of swapping can slow the computer down tremendously. Swapping is typically more useful on desktop computers than on servers, where predictable performance is often crucial.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Network&lt;/strong&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many processes need to communicate with other computers, either locally over a local network in an office or datacenter, or globally over the Internet. &lt;/span&gt;&lt;span&gt;However a computer only has a fixed amount of network bandwidth. &lt;/span&gt;&lt;span&gt;As usual, the OS mediates fair access to this shared resource.  &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;A process sends a stream of data to the OS, instructing it to send it to some remote computer. In the almost universally used &lt;em&gt;Internet Protocol (IP)&lt;/em&gt;, the OS breaks the data into &lt;em&gt;packets&lt;/em&gt;, and sends those over the network, to a remote machine identified by an &lt;em&gt;IP address&lt;/em&gt;, such as 143.43.1.22.&lt;/p&gt;
&lt;p&gt;The OS at the far end receives those packets and reassembles the original data. &lt;span&gt;The commonly used &lt;/span&gt;&lt;em&gt;Transmission Control Protocol (TCP)&lt;/em&gt;&lt;span&gt; is a scheme for managing the flow of packets from a single sending process to a single receiving process. It numbers packets so they can be assembled in order on the receiving end, and provides a mechanism for confirming received packets or re-sending missing ones.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;T&lt;span&gt;he sending OS transmits packets sent by multiple processes on its machine, to multiple destinations. The receiving OS handles packets sent from multiple sources, to multiple processes on its machine. But a &lt;/span&gt;&lt;span&gt;machine typically only has a single IP address. So how does a receiving OS know which process is supposed to receive each incoming packet? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The answer is that each packet is sent to a specific &lt;em&gt;port&lt;/em&gt; on the remote machine. A port is just a number that identifies the ultimate address within the machine. It&amp;#8217;s like an apartment number within a large condo building that has a single street address.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So for example, when a sender sends data to 143.43.1.22:12954, it means &amp;#8220;send this packet to the process on machine 143.43.1.22 that is &lt;em&gt;listening&lt;/em&gt; on port 12954&amp;#8221;. Processes can listen on any port, but there are various conventions. For example, web servers typically listen on port 80. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In a future post we&amp;#8217;ll discuss networking in more detail, and describe the building blocks that make up the modern Internet.&lt;/span&gt;&lt;/p&gt;</description><link>http://benjyw.com/post/48622305902</link><guid>http://benjyw.com/post/48622305902</guid><pubDate>Mon, 22 Apr 2013 10:28:00 -0700</pubDate><category>CS101</category><category>feature</category></item><item><title>CS101 part 5: Operating Systems (pt. 1)</title><description>&lt;p&gt;It&amp;#8217;s been a while, but CS101 now resumes&amp;#8230; &lt;/p&gt;
&lt;p&gt;In a &lt;a href="http://benjyw.com/post/40626775943/cs-101-part-4-software" target="_blank"&gt;previous&lt;/a&gt; post I mentioned that modern computer systems consist of layer upon layer of increasingly complex building blocks. In this post I&amp;#8217;ll talk briefly about the most basic of these building blocks: the operating system. &lt;/p&gt;
&lt;p&gt;An &lt;em&gt;operating system&lt;/em&gt; (OS) is a piece of software that provides a set of common services to all the other software running on a computer. These services primarily involve managing shared resources, notably CPU, disk, memory and network. &lt;/p&gt;
&lt;p&gt;Two classes of OS dominate the desktop world: Microsoft Windows, and UNIX-like OSes. &lt;span&gt;UNIX was an OS originally developed over 40 years ago at Bell Labs. It inspired a host of descendants, and its design lives on to this day, including in popular OSes such as Linux, FreeBSD and Mac OS X.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Why are OS services important? For two main reasons: &lt;em&gt;interface&lt;/em&gt; and &lt;em&gt;coordination&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;System Interface&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Computers and their components are complicated beasts. At the lowest level, directly controlling hardware is a very intricate business.&lt;/p&gt;
&lt;p&gt;For example, to write some data to disk you have to find some free space on the disk. But you&amp;#8217;re unlikely to find enough consecutive free space for all your data, so you have to break the data up into chunks, and store each chunk at a different disk location. Then you have to remember where all those chunks are, so you can restore the original data later by reading the chunks from the right locations in the right order. &lt;/p&gt;
&lt;p&gt;The author of a program doesn&amp;#8217;t want to deal with this level of detail directly. How tedious that would be! Instead, the OS provides a simplified interface to the disk. A program says to the OS &amp;#8220;save this data to disk for me&amp;#8221;, and the OS does the gruntwork of chunking up the data and placing it on the physical disk. &lt;/p&gt;
&lt;p&gt;The OS provides similar simplified interfaces to memory, CPU, network and other resources. It allows programs to worry only about their specific logic (e.g., a browser can worry about how to display a web page) and not about the mundane but complicated tasks that all programs have in common.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Coordination&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On a modern computer, many programs run at the same time. For example, right now, on my macbook, I&amp;#8217;m running Chrome, iTunes, Finder, Dropbox and Preview. All these programs need CPU resources in order to do computation, disk resources in order to load and save data, and memory resources as a workspace. Some also need network resources in order to talk to the outside world.&lt;/p&gt;
&lt;p&gt;Imagine if the author of each of these programs had to know about all the other programs, and had to coordinate with them directly in order not to overwrite another program&amp;#8217;s data or read another program&amp;#8217;s network messages? &lt;span&gt;It would be like driving on a crowded road with no traffic rules, so that to safely change lanes, pass or enter an intersection you&amp;#8217;d have to coordinate directly with every other driver on the road.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Just as we have traffic rules, signs, signals and cops, a common layer that allow cars to flow without every driver talking to all other drivers, computers have the OS, a common layer that&lt;span&gt; carves up resources fairly between programs and takes care of coordinating access to those resources, so that programs don&amp;#8217;t step on each others&amp;#8217; toes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;OS Layers&lt;/strong&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;An OS typically consists of a &lt;em&gt;kernel&lt;/em&gt; and a set of &lt;em&gt;applications&lt;/em&gt;. The kernel is the heart of the OS. It provides the basic resource and hardware management facilities we&amp;#8217;re discussing. The applications are standardized tools to allow humans to interact with the OS conveniently. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;An example of such an application is a &lt;em&gt;shell&lt;/em&gt;. A shell is a prompt where humans can type commands that interact directly with the OS. For example, if you&amp;#8217;re on a Mac, go to Applications &amp;gt; Utilities &amp;gt; Terminal.app and double-click on it. That terminal window is running a shell. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Type &lt;code&gt;pwd&lt;/code&gt; (short for &amp;#8216;print working directory&amp;#8217;) and hit enter. The shell will display the directory it&amp;#8217;s currently &amp;#8216;in&amp;#8217;. Now t&lt;/span&gt;&lt;span&gt;ype &lt;code&gt;ls&lt;/code&gt; (ell-ess) and hit enter. You&amp;#8217;ll get a list of all the contents of that directory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;code&gt;pwd&lt;/code&gt; and &lt;code&gt;ls&lt;/code&gt; are applications, as is the shell you ran them in. They access information about the filesytem by making calls into the kernel.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Different OSes strike different balances between the kernel and the applications. Some do almost all work in the kernel, while others do as little as possible in the kernel and defer other work to higher layers.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In my next post we&amp;#8217;ll dive into how OSes manage the four main resources in a computer: CPU, RAM, disk and network.&lt;/p&gt;</description><link>http://benjyw.com/post/47578880778</link><guid>http://benjyw.com/post/47578880778</guid><pubDate>Tue, 09 Apr 2013 17:19:00 -0700</pubDate><category>CS101</category><category>feature</category></item><item><title>April Foolishness</title><description>&lt;p&gt;A few weeks ago &lt;a href="https://twitter.com/shanley" target="_blank"&gt;@shanley&lt;/a&gt; published &lt;a href="http://blog.prettylittlestatemachine.com/blog/2013/02/20/what-your-culture-really-says" target="_blank"&gt;this post&lt;/a&gt; about the superficiality of what passes for &amp;#8220;company culture&amp;#8221; in much of Silicon Valley. &lt;/p&gt;
&lt;p&gt;In the spirit of the April fool&amp;#8217;s day grinch, I&amp;#8217;m going to add another one: Culture is not about telling semi-clever lies on your corporate blog once a year.&lt;/p&gt;
&lt;p&gt;Every year, come April 1st, dozens of tech companies, from Google down to the smallest startups, post oh-so-hilarious faux press releases about some obviously absurd product move or feature launch. You can imagine the self-satisfied giggles at the brainstorming sessions in the marketing department. The trouble is, no one else is really laughing. &lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="http://media.tumblr.com/dff9ca86d99737c4d9652630d0ec1cf0/tumblr_inline_mkl0h6V3H31qz4rgp.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;April fool&amp;#8217;s jokes were always a fairly annoying phenomenon. Very few are truly funny (&lt;a href="http://www.youtube.com/watch?v=27ugSKW4-QQ#t=0m30s" target="_blank"&gt;this&lt;/a&gt; is still the gold standard, and it&amp;#8217;s over 50 years old). A good joke has to take the reader in at first, but reveal itself on a second reading. If it doesn&amp;#8217;t then you&amp;#8217;re just making stuff up, and there&amp;#8217;s nothing clever about that.&lt;/p&gt;
&lt;p&gt;Google was an early tech-industry proponent of this tiresome tradition, with the obvious goal of demonstrating how cool and funky and non-corporate they are. And &lt;span&gt;now so many companies follow suit, and Google themselves now have so many different April fool&amp;#8217;s jokes, that it&amp;#8217;s difficult, and ultimately pointless, to keep track of them all &lt;/span&gt;&lt;span&gt;(happy to say that&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;a href="http://www.foursquare.com/" target="_blank"&gt;my employer&lt;/a&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;doesn&amp;#8217;t participate in this nonsense.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please, please, make it stop. It&amp;#8217;s not funny, or clever, just slavish and forced. It doesn&amp;#8217;t make you look like a cool place to work, it just makes you look like you&amp;#8217;re trying too hard.&lt;/span&gt;&lt;/p&gt;</description><link>http://benjyw.com/post/46851886803</link><guid>http://benjyw.com/post/46851886803</guid><pubDate>Mon, 01 Apr 2013 08:23:00 -0700</pubDate></item><item><title>Men, It's On Us Now</title><description>&lt;p&gt;The Adria Richards/PyCon/SendGrid &lt;a href="http://www.forbes.com/sites/deannazandt/2013/03/22/why-asking-what-adria-richards-could-have-done-differently-is-the-wrong-question/" target="_blank"&gt;affair&lt;/a&gt; has made me sick to my stomach. Any decent human being should be outraged and sad at how low so many people in the wider tech world can sink.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not going to express an opinion on the original incident. How far out of line were those guys? Did Adria overreact? Could she have handled it better? I don&amp;#8217;t know, I wasn&amp;#8217;t there, and it doesn&amp;#8217;t matter any more.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;What does matter is that the only people who are happy right now are the trolls: the hateful, misogynistic sickos who&amp;#8217;ve spent the last few days making horrific threats of physical and sexual violence against Adria.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The rights and wrongs of the case are, for now, irrelevant. &lt;/span&gt;&lt;span&gt;The opportunity for a reasonable conversation about them has passed, and may never return. &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Any discussion of them against this background of hate becomes an implicit debate on whether Adria &amp;#8220;brought this on herself&amp;#8221;, and none of us should fall into that trap. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is where SendGrid failed so badly: it may have been the right call to let Adria go (and I have no opinion on the matter), but doing so under threat merely capitulated to the worst elements on the internet. Whatever mistakes you think she&amp;#8217;s made, Adria Richards belongs to the sane, productive side of tech, and we should be circling the wagons around her, not cutting her loose.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Women in the tech industry are getting the message loud and clear: if you step out of line (or even if you do &lt;a href="http://en.wikipedia.org/wiki/Kathy_Sierra" target="_blank"&gt;nothing at all&lt;/a&gt;) the trollosphere will destroy you at will, and your company will abandon you to your fate. As John Koetsier of VentureBeat &lt;a href="http://venturebeat.com/2013/03/22/adria-richards-im-staying-safe/#.UU1epBHSZ44.facebook" target="_blank"&gt;put it&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What do you do now if you are a woman in technology and you feel harassed or abused and want to shine a light on it, but now see this prominent woman totally abandoned by her company?&lt;/p&gt;
&lt;p&gt;I’ll tell you what you do, unless you’re a saint or a hero. You shut up. You put your head down. You grin and bear it, because it’s a man’s world. And you leave, eventually, for a better place.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So now it&amp;#8217;s up to us, the sane male population of the tech world. If we want a diverse, welcoming industry that benefits from the talents and perspectives of women, we&amp;#8217;ll have to be the ones to make it safe for them to participate. We must push back against exclusionary language, sexist banter, brogramming and all the other issues, large and small, that determine whether women are welcome and respected at our companies, conferences, open-source projects and online communities.&lt;/p&gt;
&lt;p&gt;We can&amp;#8217;t expect women to go through this alone. And if we don&amp;#8217;t fight to keep and increase female participation in all parts of the tech industry, and women abandon it, we&amp;#8217;ll all be poorer for it.&lt;/p&gt;</description><link>http://benjyw.com/post/46078949857</link><guid>http://benjyw.com/post/46078949857</guid><pubDate>Sat, 23 Mar 2013 09:06:00 -0700</pubDate></item><item><title>CS vs. SWE</title><description>&lt;p&gt;Someone asked me at a bar gathering yesterday: &amp;#8220;Is computer science really a hard science? Isn&amp;#8217;t it more like engineering?&amp;#8221; I had at that point had one too many drinks to give a coherent answer. Plus, nothing kills small talk faster than bringing mathematics into the conversation&amp;#8230;&lt;/p&gt;
&lt;p&gt;But it is actually a good question. What &lt;em&gt;is&lt;/em&gt; the distinction between computer science and software engineering?&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;A Foot in Each Camp&lt;/strong&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As you might have guessed, there&amp;#8217;s no clear boundary between the two concepts. University computer science departments, for example, deal with both theory and with practical application. Within computer science, each subfield relies on varying amounts of each.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example, the field of &lt;em&gt;computer graphics&lt;/em&gt; relies on advances in both the mathematical theory of c&lt;/span&gt;omputational geometry, and in the practical development of hardware and software for very fast image processing and rendering.&lt;/p&gt;
&lt;p&gt;As another example, the field of &lt;em&gt;programming language research&lt;/em&gt; deals with both the formal mathematical properties of programming languages and with the pros and cons of their use by human programmers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Computer Science Without Computers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At the extreme we have &lt;em&gt;theoretical computer science&lt;/em&gt;. This subfield consists of&lt;span&gt; those aspects of computing that would be just as interesting and valid as a branch of mathematics even if computers didn&amp;#8217;t exist.  &lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;span&gt;This isn&amp;#8217;t as silly as it sounds: Theoretical CS has its foundations in the work of John von Neumann, &lt;/span&gt;&lt;span&gt;Alan Turing, Al&lt;/span&gt;&lt;span&gt;onzo Church, Claude Shannon and others in the 1930s and 1940s. Their work predates modern computers, and indeed they were all considered mathematicians at the time, the term &amp;#8220;computer science&amp;#8221; not having been coined yet.&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Theoretical computer science deals with the basic properties of information and computation. It answers questions such as &amp;#8220;are there uncomputable mathematical statements?&amp;#8221;, &amp;#8220;how efficiently can various computations be performed?&amp;#8221;, &amp;#8220;how much information can be represented by a certain number of symbols?&amp;#8221; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The answers to these questions don&amp;#8217;t depend on a particular computer design. In fact, like the rest of mathematics, they are valid even in a universe without actual computers. Or humans, for that matter. &lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So why is this considered a computer science discipline? Because real-world computers, as we know them, could not exist without it. Theoretical CS is the foundation of all other branches of computer science, including the most applied ones. It doesn&amp;#8217;t require them, but they sure as hell require it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;A Mathematics Machine&lt;/strong&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And this, in the end, is why computers are so fascinating to me and to many other math nerds. Beyond its use as a tool for creating and consuming information, a computer is a real-world manifestation of a complex mathematical concept.&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Granted, that&amp;#8217;s hardly a unique property. A hula hoop is a real-world manifestation of the geometric concept of a circle. But the theory of computation is complex and interacts with many other branches of mathematics, one way or another. &lt;/span&gt;&lt;span&gt;On some level a computer &lt;/span&gt;&lt;em&gt;is&lt;/em&gt;&lt;span&gt; math, &lt;em&gt;is&lt;/em&gt; logic, rendered in silicon and metal. And that, I think, is why I have been captivated by computers for as long as I can remember.&lt;/span&gt;&lt;/p&gt;</description><link>http://benjyw.com/post/44566924200</link><guid>http://benjyw.com/post/44566924200</guid><pubDate>Mon, 04 Mar 2013 14:03:00 -0800</pubDate></item><item><title>Respecting Failure</title><description>&lt;p&gt;&lt;a href="http://www.alexiatsotsis.com/" target="_blank"&gt;Alexia Tsotsis&lt;/a&gt; just published an &lt;a href="http://techcrunch.com/2013/02/17/killing-it-isnt-worth-it/" target="_blank"&gt;important post&lt;/a&gt; on TechCrunch about an insidious side of startup culture, one she refers to as &amp;#8220;the cult of success&amp;#8221;. &lt;/p&gt;
&lt;p&gt;In the startup world we pay lip service to risk all the time. No concept is more hallowed or hyped in Silicon Valley than &amp;#8220;entrepreneurship&amp;#8221;, and the defining feature of entrepreneurship is risk. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You Can&amp;#8217;t Spell Risk Without Failure&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Risk, by definition, implies frequent failure. Yet while we recognize the value of failure &lt;em&gt;in principle&lt;/em&gt;, when presented with an individual instance of it, one involving a specific startup and actual people, we too often respond with snark and schadenfreude. TechCrunch, and the rest of the tech press, are not immune from this, as Alexia admits. Too often, how the ups and downs of a startup get covered depends more on how close the founders and investors are to the &amp;#8220;cool kids&amp;#8221; rather than on the merits or the long view.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What&amp;#8217;s an appropriate response to failure, then? Should we celebrate it, as we do success? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;!-- more --&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I believe not. If the word &amp;#8220;failure&amp;#8221; is to mean anything, then it&amp;#8217;s not something to be celebrated. We can, however, &lt;em&gt;respect&lt;/em&gt; failure.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Entrepreneurship and risk aren&amp;#8217;t to be lauded for their own sake, either. Anyone can take risks: to paraphrase Dawkins, however many ways there may be of being successful, it is certain that there are vastly more ways of being a failure. Silicon Valley is about taking &lt;em&gt;smart&lt;/em&gt; risks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Smart Risks and Virtuous Entrepreneurship&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How should we define a smart risk? Clearly we can&amp;#8217;t do so retroactively, by whether a venture succeeded. That just brings us right back to where we started.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We can, however, evaluate a startup using the old-fashioned virtues that have underpinned enterprise since long before Silicon Valley.&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Hard work&lt;/strong&gt;&lt;span&gt;: are the founders and employees dedicated?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Execution&lt;/strong&gt;&lt;span&gt;: is the startup consistently and rapidly moving towards its goal?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Professionalism&lt;/strong&gt;&lt;span&gt;: Are the founders and employees good at what they do?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Respect&lt;/strong&gt;&lt;span&gt;: Do the founders treat their investors and employees as true partners, and do they deserve the trust of their users?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Focus&lt;/strong&gt;&lt;span&gt;: Is the startup keeping its eye on the ball at all times?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inspiration&lt;/strong&gt;&lt;span&gt;: are the founders, investors, employees and users excited?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision&lt;/strong&gt;&lt;span&gt;: Does the startup have a north star goal, no matter how unlikely, for two, five or ten years out?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Noble goals&lt;/strong&gt;&lt;span&gt;: is the startup trying to make some corner of our world even a little bit better? Or are they pandering to baser human qualities just to make money?&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;If a startup scores well on these values, then it deserves our respect and admiration whether it succeeds or fails. And by the same token, if a startup doesn&amp;#8217;t live up to enough of these values then we should be leery of it even if it happens to &amp;#8220;succeed&amp;#8221; by some limited definition of success.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Respecting Failure&lt;/strong&gt; &lt;strong&gt;Without Celebrating It&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If we focus too greatly on outcomes, then lauding entrepreneurship becomes nothing more than empty lip service. But if we&amp;#8217;re still to tell the wheat from the chaff we can&amp;#8217;t glamorize failure for its own sake either.&lt;/p&gt;
&lt;p&gt;Entrepreneurs, who&amp;#8217;ve been so driven towards success, aren&amp;#8217;t likely to take much solace in being told that failure is fine. Although the intention of that sentiment may be kind, it actually undermines everything a founder works for.&lt;/p&gt;
&lt;p&gt;Instead, if we focus on virtue, we have a solid footing on which to respect founders, employees and investors, while they&amp;#8217;re in mid-venture, regardless of the outcome.&lt;/p&gt;
&lt;p&gt;If a venture ultimately fails, this respect gives the entrepreneurs something to be proud of and build on for the future. And the knowledge that they&amp;#8217;re respected for what they&amp;#8217;re doing now, and not for some murky future outcome, may lift some of the enormous mental and emotional pressure of entrepreneurship. Because, as Alexia puts it, &amp;#8220;killing it&amp;#8221; isn&amp;#8217;t worth it.&lt;/p&gt;</description><link>http://benjyw.com/post/43403469553</link><guid>http://benjyw.com/post/43403469553</guid><pubDate>Mon, 18 Feb 2013 07:54:00 -0800</pubDate><category>feature</category></item><item><title>Intelligent Geometry</title><description>&lt;p&gt;Religious dogma sometimes leads to absurd anti-scientific stances: &lt;a href="http://en.wikipedia.org/wiki/Intelligent_design" target="_blank"&gt;intelligent design&lt;/a&gt;, &lt;a href="http://buffalobeast.com/117/let_there_be_retards.htm" target="_blank"&gt;young earth creationism&lt;/a&gt;, &lt;a href="http://abcnews.go.com/Health/baby-alayna-wyland-blind-religious-parents-refused-medical/story?id=13687650" target="_blank"&gt;faith healing&lt;/a&gt;, and &lt;a href="http://www.youtube.com/watch?v=joxny3rco_4#t=0m9s" target="_blank"&gt;ridiculous&lt;/a&gt; &lt;a href="http://www.youtube.com/watch?v=m4vpLzxiRpc" target="_blank"&gt;conclusions&lt;/a&gt; about &lt;a href="http://www.youtube.com/watch?v=Awv7MewXx6A#t=2m27s" target="_blank"&gt;reproductive health&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to revert to the 19th century, you can leave it at that. But &lt;span&gt;a religious political party in Israel are now aiming much further back: United Torah Judaism, a fundamentalist ultra-orthodox party, are running this ad in the campaign for next week&amp;#8217;s knesset (parliament) election:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" height="564" src="http://images1.ynet.co.il/PicServer3/2013/01/16/4402317/440231401000100408564no.jpg" width="408"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;For those who don&amp;#8217;t read Hebrew, here&amp;#8217;s a translation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;EUCLID&lt;/p&gt;
&lt;p&gt;No, it&amp;#8217;s not the name of a medicine, it&amp;#8217;s a Greek mathematician your son will be forced to study, instead of the &lt;a href="http://en.wikipedia.org/wiki/Mishnah" target="_blank"&gt;mishna&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s really important when we send them to the &lt;a href="http://en.wikipedia.org/wiki/Cheder" target="_blank"&gt;cheder&lt;/a&gt;? Values, good conduct, fear of god, studying the torah day and night, from the earliest age. A government without Judaism will force your son to learn non-religious studies. You must protect the next generation. We all must. We are all &lt;a href="http://en.wikipedia.org/wiki/Haredi_Judaism" target="_blank"&gt;haredim&lt;/a&gt;. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;I know a lot of kids who&amp;#8217;d be happy to take up religion if it would get them out of math class. But rolling the science clock back to 300 BC? That&amp;#8217;s a bold move.&lt;/p&gt;
&lt;p&gt;And did you notice how the ad only refers to &amp;#8216;sons&amp;#8217;? Either they&amp;#8217;re not concerned about girls poisoning their minds with such dangerous ideas as the parallel postulate and the pythagorean theorem, or they consider it a given that girls shouldn&amp;#8217;t be properly educated&amp;#8230;&lt;/p&gt;</description><link>http://benjyw.com/post/40806007710</link><guid>http://benjyw.com/post/40806007710</guid><pubDate>Thu, 17 Jan 2013 17:37:00 -0800</pubDate><category>politics</category></item><item><title>CS101 part 4: Software</title><description>&lt;p&gt;You suffered admirably through my necessary but dense preliminary discussions of &lt;a href="http://benjyw.com/post/31462926671/cs-101-boolean-algebra" target="_blank"&gt;boolean logic&lt;/a&gt;, &lt;a href="http://benjyw.com/post/31799922590/cs-101-binary-numbers" target="_blank"&gt;binary arithmetic&lt;/a&gt; and &lt;a href="http://benjyw.com/post/35592138655/cs-101-part-3-memory" target="_blank"&gt;memory hierarchy&lt;/a&gt;. Now comes the payoff - a series of posts about things you&amp;#8217;ve actually heard of. First up: software.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m sure you have at least a rough idea of what hardware and software are. In fact, if you&amp;#8217;re reading this, you probably know a lot of people who write software for a living. But you may be wondering what it means to &amp;#8220;write software&amp;#8221; or &amp;#8220;run a program&amp;#8221;. Or you may still marvel at how it is that we can make a pile of electronic circuits into some magical device that can show us pictures of kittens on skateboards.  Read on to find out more!&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Instruction Sets&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As you no doubt recall from a previous post, computers implement very basic logic and arithmetic using electronic circuits that operate on numbers represented as sequences of &amp;#8216;bits&amp;#8217; - 0s and 1s. These circuits are known as &lt;em&gt;hardware&lt;/em&gt;, to emphasize that they are a physical thing, built out of tiny pathways etched in silicon, that behave in certain useful ways when you run electrical current through them.&lt;/p&gt;
&lt;p&gt;An &lt;em&gt;instruction set&lt;/em&gt; consists of all the basic logic and arithmetic operations that are available in a particular processor&amp;#8217;s circuits. Examples of such basic instructions are: &amp;#8220;add the number in memory location A to the number in memory location B, storing the result in B&amp;#8221; or &amp;#8220;if the number in memory location A is zero, perform the next instruction, otherwise jump to this other instruction&amp;#8221;.&lt;/p&gt;
&lt;p&gt;These basic instructions are the smallest building blocks of all computer programs, just as written characters are the smallest building blocks of all books. And different types of processor (e.g., an Intel Core i5 vs. a Qualcomm Snapdragon S4) have different instruction sets, just as different cultures have different writing systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CISC vs. RISC&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The two most common instruction sets in use today are that of the x86 family of processors, used primarily in desktop and laptop computers, and the ARM family of processors, used primarily in mobile devices.&lt;/p&gt;
&lt;p&gt;x86 is an example of a CISC (Complex Instruction Set Computing) instruction set: it contains over a thousand different instructions. ARM is an example of a RISC (Reduced Instruction Set Computing) instruction set: it contains only a few dozen different instructions.&lt;/p&gt;
&lt;p&gt;Note that this doesn&amp;#8217;t make ARM a weaker or less capable processor. It&amp;#8217;s just a different hardware design, analogous to the fact that English is written with 26 characters while Chinese is written with thousands of them, but both are equally expressive.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hardware and Software&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A &lt;em&gt;computer program&lt;/em&gt; is a sequence of these basic instructions. It tells the computer how to combine these elementary operations in order to perform complex computation. Instructions combine into computer programs just as letters of the alphabet combine to make books.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Running&lt;/em&gt; &lt;em&gt;a program&lt;/em&gt; is when the computer takes each instruction in a program in turn and activates the hardware circuit it corresponds to. If the program is constructed properly, the result of all those hardware circuits firing will be something useful. Or kittens on skateboards, who knows&amp;#8230;&lt;/p&gt;
&lt;p&gt;The term &lt;em&gt;software&lt;/em&gt; is just a synonym for &amp;#8220;computer program&amp;#8221;, implying that it&amp;#8217;s something logical, as distinct from the physical hardware. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;War and PC &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The analogy to books is instructive: a printing press knows how to typeset individual letters. It is, quite literally, hardware. In this analogy, &lt;em&gt;War and Peace&lt;/em&gt; is software. The bridge between the two is the English alphabet: it exists in both worlds, as a physical thing that can be typeset and as a logical thing that can be used to construct words, sentences, paragraphs, chapters, and eventually whole works of literature.&lt;/p&gt;
&lt;p&gt;Similarly, the instruction set is the bridge between hardware and software. Each instruction lives in both worlds: as a building block of the software, and as a representative of a physical circuit.  The software is a recipe for how to combine hardware operations, and that recipe is written in their common language - the instruction set.&lt;/p&gt;
&lt;p&gt;One important difference from literature, though, is that while novels are linear, intended to be read in a straight line from start to finish, programs are not. Some instructions cause execution to &amp;#8220;jump&amp;#8221; to a different part of the program, depending on various conditions, rather like those &lt;a href="http://www.cyoa.com/" target="_blank"&gt;choose-your-own-adventure&lt;/a&gt; books from childhood. This has the interesting and useful effect that a running program doesn&amp;#8217;t have to end: it can &amp;#8220;loop&amp;#8221; over the same instructions over and over again. For example, a web server program loops over and over again on instructions that take an incoming browser request for a URL and return the contents of the requested page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grains of Sand &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Useful computer programs typically consist of hundreds of millions of instructions. Computers can execute these instructions very, very quickly. The processor clock rate (those &amp;#8216;gigahertz&amp;#8217; numbers you may be familiar with) is the rate at which the processor can execute instructions. For example, a 1.6&amp;#160;GHz processor can execute 1.6 billion (that&amp;#8217;s billion, with a &amp;#8216;b&amp;#8217;) instructions per second. As you can imagine, this degree of complexity is intractable to humans.&lt;/p&gt;
&lt;p&gt;Composing programs directly from the instruction set is like building a skyscraper out of individual grains of sand. It&amp;#8217;s completely impractical to write any but the most trivial programs this way.&lt;/p&gt;
&lt;p&gt;Instead, modern computer systems consist of layer upon layer of increasingly complex building blocks, each constructed from simpler units, all the way down to individual instructions. Software engineers write programs using these building blocks, but in the end, everything converts back down to millions and millions of instructions, each causing a circuit to fire for a tiny billionth of a second.&lt;/p&gt;
&lt;p&gt;In my next few CS 101 posts, we&amp;#8217;ll discuss some of these building blocks: firmware, drivers, operating systems, programming languages and more.&lt;/p&gt;</description><link>http://benjyw.com/post/40626775943</link><guid>http://benjyw.com/post/40626775943</guid><pubDate>Tue, 15 Jan 2013 13:52:00 -0800</pubDate><category>feature</category><category>CS101</category></item><item><title>Depression and the Highly Logical Mind</title><description>&lt;p&gt;I was saddened to learn of the &lt;a href="http://www.nytimes.com/2013/01/13/technology/aaron-swartz-internet-activist-dies-at-26.html?_r=0" target="_blank"&gt;tragic death&lt;/a&gt;, by his own hand, of Aaron Swartz. That a prominent member of my community, our community, the tech community, is gone forever is sad. That he was lost so young is tragic. That he took his own life is a horror.&lt;/p&gt;
&lt;p&gt;Aaron Swartz &lt;a href="http://www.aaronsw.com/weblog/verysick" target="_blank"&gt;wrote openly&lt;/a&gt; about having depression (I don&amp;#8217;t like to use &amp;#8220;depressed&amp;#8221; as an adjective; It&amp;#8217;s a disease that you have, not a thing that you are.) And many of the &lt;a href="http://boingboing.net/2013/01/12/rip-aaron-swartz.html" target="_blank"&gt;outpourings&lt;/a&gt; of grief and support after his death recognized in it a shared experience. The relatability of Aaron&amp;#8217;s struggle made the tech world feel even more like a community, as it did after &lt;span&gt;Ilya Zhitomirskiy&amp;#8217;s&lt;/span&gt; &lt;a href="http://www.modernluxury.com/san-francisco/story/dark-side-of-the-boom" target="_blank"&gt;tragic suicide&lt;/a&gt; in 2011. For, while depression is dreadful for anyone, it may have a uniquely pernicious effect on highly logical minds.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;Math and Computer Science require the kind of abstract, logical, inner-focused thinking associated with introversion (in the &lt;a href="http://www.myersbriggs.org/my-mbti-personality-type/mbti-basics/extraversion-or-introversion.asp" target="_blank"&gt;Myers-Briggs&lt;/a&gt; sense, not the social sense; Many MBPT introverts are social extroverts). And there appears to be a &lt;a href="http://www.ncbi.nlm.nih.gov/pubmed/12516312" target="_blank"&gt;correlation&lt;/a&gt; between introversion and depression. Perhaps it&amp;#8217;s due to a physiological connection between scientific tendencies and vulnerable brain chemistry. But it may also be because depression has one symptom, unique among all illnesses, that tugs at the seams of logic: it makes you believe, contrary to all available data, that you can never recover from it.&lt;/p&gt;
&lt;p&gt;Depression is a mind-parasite, burrowing into your consciousness. Like any good parasite, it must protect its nest. This trick that it plays on you, convincing you that you can never be rid of it, is the uniquely perverse way it keeps itself alive. Nerdy readers may appreciate the relevance of &lt;a href="http://en.wikiquote.org/wiki/Ender's_Game" target="_blank"&gt;this quote&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;&amp;#8220;Only the enemy shows you where you are weak. Only the enemy tells you where he is strong.&amp;#8221;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;Someone whose toolkit for dealing with the world consists of logic and reason, ideals and abstractions, may have particularly weak defenses against this trickster disease.&lt;/p&gt;
&lt;p&gt;You realize that it&amp;#8217;s lying to you, that there &lt;em&gt;are&lt;/em&gt; treatments, that that things &lt;em&gt;aren&amp;#8217;t&lt;/em&gt; objectively as bad as they feel. But you &lt;em&gt;know&lt;/em&gt;, on some level deeper than logic, that there is no point, no hope and no future. And to encounter, maybe for the first time, the hard limits of rationality, to realize that there&amp;#8217;s a part of your mind that can override the logical world view that is the core of your identity, may leave you feeling particularly helpless and hopeless.&lt;/p&gt;
&lt;p&gt;You can&amp;#8217;t rationalize depression away, a fact that people who&amp;#8217;ve never suffered from it find hard to comprehend. But if someone you care about is struggling with it, and it&amp;#8217;s likely that someone is, you &lt;em&gt;can&lt;/em&gt; help them find a new way to access their mind.&lt;/p&gt;
&lt;p&gt;Tell them that you care about them and appreciate them and are glad to have them in your life. Show them that you enjoy being around them and that you love them. And above all, spend time with them. Give them glimpses of an alternate future, one in which they are secure, happy and loved, tear away the lies that depression needs in order to survive, and in that sunlight it will wither.&lt;/p&gt;</description><link>http://benjyw.com/post/40534968093</link><guid>http://benjyw.com/post/40534968093</guid><pubDate>Mon, 14 Jan 2013 11:39:00 -0800</pubDate><category>feature</category></item><item><title>CS101 part 3: Memory</title><description>&lt;p&gt;In my first two CS101 posts (&lt;a href="http://benjyw.com/post/31462926671/cs-101-boolean-algebra" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://benjyw.com/post/31799922590/cs-101-binary-numbers" target="_blank"&gt;here&lt;/a&gt;) we discussed the basic electronic circuits used to compute logic conditions and basic arithmetic. At the end of my last post I alluded to a third element we need before we can construct something worth calling a &amp;#8216;computer&amp;#8217;. That element is &lt;em&gt;memory&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Memory gives us the ability to have the current computation be influenced by the result of past computation. It&amp;#8217;s what allows us to compose sequences of basic operations to produce ad-hoc, complex computations. These sequences of instructions are called &lt;em&gt;programs&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;Computers need memory to store two kinds of data: the programs - the sequences of instructions that define the computations - and the inputs and outputs of those computations. Both types of information are, as always with computation, reducible to long sequences of 0s and 1s. So the basic building block of computer memory is a way to store a 0 or a 1.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Durability&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As you recall, electronic circuits can have two states, represented by the presence or absence of electrical current on a wire, and we can call these states &amp;#8220;1&amp;#8221; and &amp;#8220;0&amp;#8221;. A memory bit can be constructed using such a circuit, as long as it has the additional property of &lt;em&gt;stability&lt;/em&gt;. That is, it must be able to sustain whatever state it&amp;#8217;s in. So, if it has current (representing a 1) it has to continue to have current until we deliberately tell it otherwise, and vice versa. It can&amp;#8217;t, for example, just let the current decay on its own, thus spontaneously turning a 1 into a 0.&lt;/p&gt;
&lt;p&gt;There is, in fact, a way to construct these memory circuits, using the basic boolean components discussed in my first CS 101 post. Unfortunately, however, these circuits maintain their value, 0 or 1, only as long as there is current available. In other words, the memory loses all its state when you switch the power off. Outside of the most basic calculations, this causes a huge problem - how do we keep important information around for a long time? &lt;/p&gt;
&lt;p&gt;The answer is to save the data to long-term, &lt;em&gt;durable&lt;/em&gt; memory, so that even when the power goes off, the information isn&amp;#8217;t lost. An example of long-term memory is a hard drive, where the information is stored on spinning platters coated with a magnetic material divided into many tiny areas, each set up so that its magnetic field points in one direction or another, representing a 0 or a 1 respectively. The material on the platter doesn&amp;#8217;t require power to sustain its magnetic field, and so the data is preserved even without power. Then, when power returns we can copy the data from the disk back into the electronic memory, and continue with computation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Latency and Bandwidth&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You may well be thinking, &amp;#8220;why even bother with electronic memory? why not use durable memory directly?&amp;#8221;&lt;/p&gt;
&lt;p&gt;The problem is that durable memory (hard drives, solid-state drives and so on) are incredibly slow in comparison with electronic memory. There are two manifestations of slowness, when it comes to memory: latency and bandwidth.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Latency&lt;/em&gt; is a measure of how long it takes to find the data. Or, in other words, how long it takes to retrieve the first bit we need. For example: RAM has latency on the order of 100 nanoseconds. Hard drive latency, however, is on the order of 10 milliseconds, because a hard drive has moving parts that have to be positioned mechanically. Finding a piece of data on disk is 100,000x slower than main memory! That is a huge difference. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Bandwidth&lt;/em&gt; is a measure of how long it takes, once we&amp;#8217;ve found the data, to retrieve it all. Or, in other words, how many bits we can transfer into or out of memory per second. RAM has bandwidth on the order of 4 gigabytes/sec, while hard drives have bandwidth on the order of 40 megabytes/sec, which is 100x slower. Not quite as huge a difference as with latency, but still very significant in some cases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Snail&amp;#8217;s Pace&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The concepts of latency and bandwidth are relevant not just to memory, but to any case where we move data, the obvious example being networks. And indeed in many cases a computer on a network can use another computer as a form of memory: sending data over the network for a receiving computer to store, and then requesting the data back over the network later.&lt;/p&gt;
&lt;p&gt;An extreme and evocative illustration of the difference between latency and bandwidth is that of the &amp;#8220;snail pulling a chariot of DVDs&amp;#8221; &lt;a href="http://memerial.net/643_this_snail_is_pulling_a_chariot" target="_blank"&gt;meme&lt;/a&gt;. That photo originated from a tongue-in-cheek &lt;a href="http://www.improbable.com/airchives/paperair/volume11/v11i4/sluggish-data-11-4.pdf" target="_blank"&gt;experiment&lt;/a&gt; based on a computation similar to the following:&lt;/p&gt;
&lt;p&gt;Say our &amp;#8220;memory&amp;#8221; is a box of DVDs with data burned on them, and for whatever reason, we decide that it&amp;#8217;s a good idea to retrieve data by having a snail pull DVDs along. &lt;/p&gt;
&lt;p&gt;An african land snail moves at a &lt;a href="http://www.petsnails.co.uk/faq.html#q120" target="_blank"&gt;pace&lt;/a&gt; of about 0.5 inches per second.  The snail+chariot is about 7.5 inches long, so if we send snails out single-file we can send a new one every 7.5/0.5 = 15 seconds. This means we can send out four chariots, or eight DVDs, a minute. &lt;/p&gt;
&lt;p&gt;A common DVD has a capacity of around 4&amp;#160;GB, which means the snail system can deliver 8 x 4 = 32&amp;#160;GB / minute, which is about 500&amp;#160;MB/sec. This is a huge amount of bandwidth! By contrast, a fast broadband connection for home internet might be 10&amp;#160;MB/sec. And if we replace those DVDs with blu-ray discs, which can have a capacity of 40GB or more, we&amp;#8217;re looking at 5&amp;#160;GB/sec of bandwidth, which is faster than pretty much any network out there, all on the backs of snails. &lt;/p&gt;
&lt;p&gt;The latency of the snail system, however, is absurdly slow. If you&amp;#8217;re just a mile away from the origin of the data, you&amp;#8217;ll wait 36 hours for the first bit of data to arrive. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Memory Hierarchy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Another big difference between different forms of memory is price. Hard drives are significantly cheaper per GB than RAM, even though the prices of both keep dropping dramatically (I&amp;#8217;m not clear on what the current cost of snails is).&lt;/p&gt;
&lt;p&gt;Therefore modern computers have an entire hierarchy of memory components, to provide various different tradeoffs between price, size, latency, bandwidth and durability. These range from tiny chunks of very fast memory embedded on the CPU itself, to RAM-based main memory, to SSDs and hard drives. Even tape drives are still used sometimes for backup. Like the snails, they have very high latency but also very high bandwidth, which is appropriate when you want to dump a large amount of data out efficiently, but don&amp;#8217;t mind the restoration process being clunky.&lt;/p&gt;
&lt;p&gt;Typically, the faster the memory (in latency and/or bandwidth) the less of it you have, due to cost or engineering constraints. So data needs to move up and down the hierarchy, from slow/cheap/durable memory to fast/expensive/volatile memory, as needed, and then demoted back down that hierarchy when possible to free up room in the fast memory for other data.&lt;/p&gt;
&lt;p&gt;A holy grail of hardware is a memory subsystem with the performance of RAM, but the durability and price of disk. But until such a thing is invented, a good part of the art of building systems, such as those that power your favorite web sites, is that of managing the tradeoffs between the advantages and disadvantages of these various types of memory. Great systems are characterized by their ability to shunt data around in clever ways in order to maximize speed without compromising data safety if the power goes out in the datacenter. &lt;/p&gt;</description><link>http://benjyw.com/post/35592138655</link><guid>http://benjyw.com/post/35592138655</guid><pubDate>Mon, 12 Nov 2012 14:33:00 -0800</pubDate><category>feature</category><category>CS101</category></item><item><title>Growth, Jobs and Silicon Valley</title><description>&lt;p&gt;A non-technical, political post today (I did &lt;a href="http://benjyw.com/post/25770526645/hello-world" target="_blank"&gt;warn&lt;/a&gt; readers there would be some).&lt;/p&gt;
&lt;p&gt;The overriding theme of the upcoming presidential election is &lt;strong&gt;jobs&lt;/strong&gt;, with the candidates sparring aggressively over who can create more of them. Unemployment is still high across the country, and finding work, especially if you&amp;#8217;re a new college grad, is a daunting challenge. &lt;/p&gt;
&lt;p&gt;And yet here in Silicon Valley companies &lt;a href="http://abclocal.go.com/kgo/story?section=news/local/south_bay&amp;amp;id=8761451" target="_blank"&gt;can&amp;#8217;t hire fast enough&lt;/a&gt;. If you&amp;#8217;re a new CS grad you&amp;#8217;ll have no trouble at all getting several job offers to choose from. Your starting salary, on day one of your career, might be higher than the current salary of either of your parents. And if you&amp;#8217;re an experienced engineer, designer or product manager then the sky is pretty much the limit. &lt;/p&gt;
&lt;p&gt;This raises tempting questions: Can the presidential candidates learn from Silicon Valley&amp;#8217;s success? Does the tech industry point the way towards a nationwide economic renaissance of job growth?  Is what&amp;#8217;s good for startups good for America? And if so, do the political endorsements of tech luminaries carry extra weight?&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Innovation and Growth&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Many people in Silicon Valley believe that the answer to all these questions is yes. &lt;/p&gt;
&lt;p&gt;For example, several movers-and-shakers in the startup world, including &lt;span&gt;Reid Hoffman, Dave Morin, Drew Houston and Craig Newmark,&lt;/span&gt;&lt;span&gt; &lt;/span&gt;recently &lt;a href="http://allthingsd.com/20121019/how-many-techies-does-it-take-to-elect-a-president-t4o-launches-innovator-series-videos-for-obama/?mod=ATD_iphone" target="_blank"&gt;recorded&lt;/a&gt; a series of videos promoting innovation as the driver of economic recovery, and announcing their support for President Obama as the right leader to increase innovation and parlay it into economic growth.&lt;/p&gt;
&lt;p&gt;As another example, Paul Graham recently posted his informal presidential election &lt;a href="http://paulgraham.com/ovr.html" target="_blank"&gt;survey&lt;/a&gt; of startup community leaders, who apparently, by a 2-1 margin, favor President Obama over Mitt Romney, as does Graham himself (and as do I).&lt;/p&gt;
&lt;p&gt;Graham writes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;Encouraging economic growth is a big theme, perhaps the biggest theme, in the current presidential campaign. Here in Silicon Valley, economic growth is something we understand well. Growth is the defining quality of a startup, and the leaders of the startup community are arguably the world&amp;#8217;s leading experts in making it happen.&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;These claims of expertise in innovation and growth are valid. All these folks have experience with both, and their opinions unquestionably carry significant weight within the tech community. But whether that expertise carries over to the rest of the economy is a more nuanced question.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Growth vs. Jobs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Silicon Valley does indeed lead the pack in innovation and in &lt;em&gt;capital&lt;/em&gt; growth, but the true big theme in this presidential campaign is jobs. And Silicon Valley is, by some measures, a poor job creator. &lt;/p&gt;
&lt;p&gt;The following chart (1) shows that capital in the technology sector yields far fewer jobs per $ than capital in other sectors:&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" height="341" src="http://cl.ly/image/0L0c1o0R3m08/Screen%20Shot%202012-10-14%20at%2012.01.47%20PM.png" width="610"/&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the big tech industry darlings are near the bottom of the list, along with the oil companies. And Google&amp;#8217;s numbers would be even lower if not for the Motorola Mobility acquisition, which added around 20000 employees for &amp;#8220;only&amp;#8221; $12.5B. &lt;/p&gt;
&lt;p&gt;I didn&amp;#8217;t include data for privately-held startups, as I don&amp;#8217;t know them with any precision. But if you plug in whatever numbers you estimate for Twitter, Foursquare or a host of other startups, you&amp;#8217;ll likely get similar ratios. For example, a guesstimate of $9B for Twitter&amp;#8217;s market cap and 1400 for its number of employees gives a ratio of 155. And using 400/$3B for Square we get a ratio of 133.&lt;/p&gt;
&lt;p&gt;By this metric, at least, Silicon Valley, while good at growing capital, is bad at growing jobs. If I had $1B to invest, and my goal was to create profit, tech would be a good place to put it. But if my goal was to create as many jobs as possible, investing in tech might give me poor returns.&lt;/p&gt;
&lt;p&gt;Obviously this is not to say that the tech industry doesn&amp;#8217;t provide immense value. It continues to revolutionize how we produce, consume and locate information, how we interact with people and places, how we shop and how we do business. But these transformations are due to Silicon Valley&amp;#8217;s expertise in technology and innovation, not its expertise in capital growth. The latter may have little applicability outside the rarified air of SoMa and Menlo Park.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inequality&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can debate whether employees-per-market-cap is a valid metric, but it&amp;#8217;s hard to argue with the fact that, while the nation needs millions of low- and medium-skilled jobs all across the country, especially in the Midwest and the South, the tech industry produces small numbers of highly-skilled jobs, mostly concentrated in the San Francisco bay area. Apple and Google aren&amp;#8217;t even making iPhones and Android handsets in the US, which could have created large numbers of manufacturing jobs in states that most need them.&lt;/p&gt;
&lt;p&gt;The true economic leitmotif of the past 20 years and more hasn&amp;#8217;t been growth, or even jobs, but inequality. Increasingly huge amounts of wealth have been concentrating in fewer and fewer hands, while everyone else, at best, struggles to stay in the same place, and at worst plunges into poverty. The tide has been rising, but instead of lifting all boats it&amp;#8217;s been flooding the basements. &lt;/p&gt;
&lt;p&gt;Silicon Valley is no exception when it comes to this &lt;a href="http://www.wired.com/business/2012/08/silicon-valley-creates-jobs-but-not-for-everyone/" target="_blank"&gt;hollowing out&lt;/a&gt; of the economy: the wealth created here is concentrated firmly in the hands of a lucky few (myself included). We&amp;#8217;re rewarded handsomely for happening to have skills for which demand greatly outstrips supply. But the impact on the rest of the area economy has been mixed. For example, tech wealth has driven house prices and rents in San Francisco to such heights that many people vital to the city&amp;#8217;s fabric, the people who make SF the world-class city it is, are being priced out. (2)&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m not saying that Silicon Valley is evil, or that the way it allocates wealth is wrong. The tech industry has created value by providing incredible new products and services to consumers worldwide.  And in any case, to steal a great &lt;a href="http://www.avc.com/a_vc/2012/08/lockups-and-insider-selling.html" target="_blank"&gt;phrase&lt;/a&gt; from Fred Wilson: you can park your outrage at the door of capitalism. But there&amp;#8217;s a happy medium between socialist redistribution and a world of Eloi and Morlocks. If you want to build an economy in which everyone thrives, instead of just the select few with world-class educations and unrivaled access to opportunity, Silicon Valley is not an ideal model.&lt;/p&gt;
&lt;p&gt;(1) Click &lt;a href="https://docs.google.com/spreadsheet/ccc?key=0AqkKuhwpmBBIdDJ4Yk9pZFFDU0hXaXpUSkNjemttZnc" target="_blank"&gt;here&lt;/a&gt; for original spreadsheet. Data retrieved from Google Finance on Oct 14th. Companies chosen from lists of largest market caps, lists of largest non-state employers and leading companies in various sectors. And Whole Foods, because I was hungry when I wrote this.&lt;/p&gt;
&lt;p&gt;(2) See David Talbot&amp;#8217;s recent &lt;a href="http://www.modernluxury.com/san-francisco/story/how-much-tech-can-one-city-take" target="_blank"&gt;article&lt;/a&gt; in San Francisco magazine for more on this, and other effects of the tech industry&amp;#8217;s rise on the rest of the city.&lt;/p&gt;</description><link>http://benjyw.com/post/34134468367</link><guid>http://benjyw.com/post/34134468367</guid><pubDate>Mon, 22 Oct 2012 17:59:00 -0700</pubDate><category>feature</category><category>politics</category></item><item><title>Hashing Redux: Proving What You Know</title><description>&lt;p&gt;Remember my &lt;a href="http://benjyw.com/post/27150244544/potatoes-and-passwords" target="_blank"&gt;post&lt;/a&gt; about hashing passwords? I recently encountered a tweet exchange between two of my co-workers that used hashing in a novel and nerdy way. &lt;/p&gt;
&lt;p&gt;It started with this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="http://cl.ly/image/0v2j191Z1N0u/Screen%20shot%202012-10-09%20at%209.40.10%20AM.png"/&gt;&lt;/p&gt;
&lt;p&gt;Jorge is posting a quote from Minnesota congresswoman and amateur conspiracy theorist Michelle Bachmann, helpfully providing a link to the source. But he&amp;#8217;s also added a mysterious string of letters and numbers in parentheses. Why? Let&amp;#8217;s find out.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;Harry replies with:&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="http://cl.ly/image/08052W2k3L3d/Screen%20shot%202012-10-09%20at%209.47.03%20AM.png"/&gt;&lt;/p&gt;
&lt;p&gt;Pointing out to Jorge that the source is satirical, and that he&amp;#8217;s been duped into believing that this is a real quote. And, to be honest, given Congresswoman Bachmann&amp;#8217;s propensity for fanciful conspiracy theories, anyone might have fallen for that. Or would they?&lt;/p&gt;
&lt;p&gt;Jorge could have tried to save face by tweeting &amp;#8220;of course I knew it was satire, he he&amp;#8230;&amp;#8221; And we would have been forgiven for thinking &amp;#8220;yeah right&amp;#8230; if you knew that you would have said so in the original tweet&amp;#8221;. Jorge could have then claimed &amp;#8220;well, but I didn&amp;#8217;t want to ruin the tweet by giving the game away&amp;#8221;, but that would have sounded defensive and lame.&lt;/p&gt;
&lt;p&gt;Instead, Jorge tweeted this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="http://cl.ly/image/0Z3F2H3K241B/Screen%20shot%202012-10-09%20at%209.50.48%20AM.png"/&gt;&lt;/p&gt;
&lt;p&gt;What the hell does that mean? &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Saving Face via md5&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re on a mac right now, open up a terminal (Applications -&amp;gt; Utilities -&amp;gt; Terminal) and enter this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;p&gt;md5 -s &amp;#8220;Yes, I know this is satire.&amp;#8221;&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hit enter. Does the result look familiar? Yep, it&amp;#8217;s that strange string of letters and numbers that Jorge added to his original tweet. md5 is a type of hash - &amp;#8220;a way of jumbling up text in a way that can’t be unjumbled&amp;#8221;, as I put it in my old post.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;What Jorge has cleverly done is use md5 to prove that he knew this was satire all along, without saying so explicitly and ruining the tweet. Not just &lt;em&gt;claim&lt;/em&gt;, mind you, but &lt;em&gt;prove&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The logic is as follows: &amp;#8220;That hash I provided in my original tweet? That is the hash of the sentence &amp;#8216;Yes, I know this is satire.&amp;#8217; And since hashes are not reversible, there was no way for me to use a random string and then later reverse-engineer it into a face-saving sentence. Therefore I must have derived that hash from that sentence &lt;em&gt;when I was writing the tweet.&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Basically, Jorge &lt;em&gt;did&lt;/em&gt; say &amp;#8220;Yes I know this is satire&amp;#8221; in the original tweet, but he did it in a clever way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Not Giving the Game Away&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A consequence of the fact that hashes aren&amp;#8217;t reversible is that no one, no matter how nerdy, could have figured out what sentence Jorge used to derive the hash until he told them. So publishing that hash didn&amp;#8217;t ruin the original tweet by giving the game away. &lt;/p&gt;
&lt;p&gt;This tweet exchange gives a small taste of the powerful applicability of computer science to so many real-life problems. This example may seem trivial, but here&amp;#8217;s a more significant one:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keeping Secrets&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Imagine, for example, that you&amp;#8217;re a secret agent. A fellow agent, whom you&amp;#8217;ve never met,  approaches you and asks &amp;#8220;hey, did you get that new top-secret document? I wanted to discuss it with you.&amp;#8221; Sounds reasonable, right?&lt;/p&gt;
&lt;p&gt;But wait! Maybe this person isn&amp;#8217;t an agent after all. Maybe she&amp;#8217;s a journalist, or worse, an enemy spy, trying to get something out of you by claiming to know more than she does. Pretending to have insider information is a classic form of social engineering.&lt;/p&gt;
&lt;p&gt;So you say to the alleged agent, &amp;#8220;tell you what, to prove to me that you have access to the top-secret document, send it to me.&amp;#8221; But she, being, or at least pretending to be, a responsible agent, says &amp;#8220;don&amp;#8217;t be daft&lt;sup&gt;*&lt;/sup&gt;, I don&amp;#8217;t know if you yourself are allowed to read it&amp;#8221;. What an impasse!&lt;/p&gt;
&lt;p&gt;Then, remembering the CS classes you took in college before you went to secret agent school, you suggest this: &amp;#8220;OK, let&amp;#8217;s each compute the hash of the document, write it on a note, and exchange the notes.&amp;#8221; Now, if you both give each other the same hash you can each be certain that the other has access to the document, and you can discuss it without fear of revealing anything to an unauthorized person. And if not - time to call security: you&amp;#8217;ve uncovered an impostor without actually revealing any information to them.&lt;/p&gt;
&lt;p&gt;This example shows that the ability to retroactively prove that you know something, without revealing that thing up front, is incredibly powerful. &lt;/p&gt;
&lt;p&gt;* Apparently this is a British secret agency&amp;#8230;&lt;/p&gt;</description><link>http://benjyw.com/post/33285977178</link><guid>http://benjyw.com/post/33285977178</guid><pubDate>Tue, 09 Oct 2012 22:53:00 -0700</pubDate><category>feature</category></item><item><title>Spanner and Planet-Scale Services</title><description>&lt;p&gt;Google recently published a &lt;a href="https://plus.google.com/118227548810368513262/posts/J23q42YpYZ5" target="_blank"&gt;much-anticipated paper&lt;/a&gt; on Spanner, their globally-distributed database. Spanner is the new pinnacle of Google&amp;#8217;s technology stack, supplanting Bigtable at the cutting-edge of scalable databases. The authors will present the paper at the OSDI (Operating Systems Design and Implementation) &amp;#8216;12 conference in October.&lt;/p&gt;
&lt;p&gt;Google&amp;#8217;s OSDI papers tend to be seminal: the &lt;a href="http://research.google.com/archive/mapreduce.html" target="_blank"&gt;MapReduce paper&lt;/a&gt; from OSDI &amp;#8216;04 sparked the open-source Hadoop project, which in turn powered the industry-wide &amp;#8220;big data&amp;#8221; trend. And the &lt;a href="http://research.google.com/archive/bigtable.html" target="_blank"&gt;Bigtable paper&lt;/a&gt; from OSDI &amp;#8216;06 sparked a host of similar systems (HBase, Cassandra, MongoDB and others) that power services such as Facebook, Twitter, Foursquare and many more. Will Spanner spark a trend in the same way? It&amp;#8217;s too soon to say, but there are arguments in both directions.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;Spanner offers several novel and highly valuable features. Most of these are too technical to describe in this blog (which is primarily aimed at non-engineers). But one feature worth mentioning is that Spanner manages data across multiple datacenters. It is, in other words, the first truly planet-scale system.&lt;/p&gt;
&lt;p&gt;Previously, systems were managed at the level of, at most, a single datacenter. Some companies can run for a while out of a single datacenter, but beyond a certain size you really need multiple datacenters, at different locations around the world, for two reasons:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Resilience:&lt;/strong&gt; If an entire datacenter is down, say because it loses power or network connectivity, you can still keep your service up from another location.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Speed:&lt;/strong&gt; One of the major contributors to slowness of a global service is the time it takes for data to traverse all the network connections between a user and a far-away datacenter. The closer you put the servers to a user, the better their experience. So, for example, you might serve West Coast users from a datacenter in California, but Asian users from a datacenter in Japan. &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Managing services across multiple datacenters has always been a technical challenge. You have to make sure that the data in all locations is consistent, and that you can switch seamlessly between them as needed. One of Spanner&amp;#8217;s biggest features is that it takes care of all this complexity for you. It&amp;#8217;s hard to overstate how useful this is. This sort of service would be a huge benefit to large-scale services such as Yahoo!, Facebook, Twitter, Foursquare and others.&lt;/p&gt;
&lt;p&gt;However there are also reasons to think that Spanner may remain a rarified, Google-only technology for several years:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Complexity:&lt;/strong&gt; Spanner is mind-bogglingly intricate. It took some of the top names in distributed systems years to develop, and the paper, though detailed, was still forced to omit many crucial details for the sake of brevity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Technology stack:&lt;/strong&gt; Spanner relies to a great extent on the rest of Google&amp;#8217;s technology stack. Open-source equivalents of parts of this stack exist, but there are still gaps, and even the parts that exist are relatively immature.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hardware:&lt;/strong&gt; Spanner relies on two forms of time reference: GPS and atomic clocks, to synchronize operations between remote locations. This requires specialized, non-commodity hardware that is not widely available and with which the open-source community has little or no experience.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;This last point is especially interesting. The uncertainty of computer clocks and the limits they place on distributed systems are well-studied but too complex to explain here. I will perhaps dedicate a future post to the issue. But suffice it to say that the requirement of specialized clock hardware in datacenters is a major barrier to open-source implementations of Spanner. &lt;/p&gt;
&lt;p&gt;Nonetheless, I expect the paper to spark debate and inspire the open-source community to create even bigger and better systems, for the benefit of companies large and small across the industry. And that can only be a good thing.&lt;/p&gt;</description><link>http://benjyw.com/post/32261289957</link><guid>http://benjyw.com/post/32261289957</guid><pubDate>Tue, 25 Sep 2012 06:34:00 -0700</pubDate><category>feature</category></item><item><title>CS101 part 2: Binary Numbers</title><description>&lt;p&gt;In my &lt;a href="http://benjyw.com/post/31462926671/cs-101-boolean-algebra" target="_blank"&gt;debut CS101 post&lt;/a&gt; I discussed Boolean algebra, and how any Boolean function can be modeled by a real-life electronic circuit. In this post we&amp;#8217;ll explore how this fact provides computers with the ability to do arithmetic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Natural Numbers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To do arithmetic, you first need to be able to represent numbers. The most basic numbers are the &lt;em&gt;natural numbers&lt;/em&gt;, the whole numbers we use for counting things.  To write down a counting number we can simply represent it as a list of &amp;#8216;things&amp;#8217; of that size. Say we pick the hash symbol # to represent a &amp;#8216;thing&amp;#8217;, then we can write down the counting numbers as #, ##, ###, ####, ##### and so on. Of course we&amp;#8217;d also need some symbol, like 0, to represent &amp;#8220;no things&amp;#8221;. &lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Decimal Digits&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The problem with this representation is that it&amp;#8217;s very unwieldy. It becomes impractical to represent more than a small number of things this way. The solution is to assign shorter symbols, or &amp;#8216;digits&amp;#8217; to the various counting numbers. So, for example, we use &amp;#8216;3&amp;#8217; to mean ### and &amp;#8216;7&amp;#8217; to mean #######. These digits are much shorter and more convenient. The problem now is that there are infinite counting numbers but only so many symbols we can assign, write and remember, so it&amp;#8217;s impractical to have a unique digit symbol for every number. The solution is simple: have only a few digits, and combine them to form larger numbers. Because we have ten fingers (&lt;em&gt;digitus&lt;/em&gt; in Latin), and counting on fingers is a ubiquitous habit, most human societies settled on ten digit symbols, that we write as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. &lt;/p&gt;
&lt;p&gt;So what happens when we want to represent more than 9 things? We count off groups of ten and use one digit to represent how many such groups we had, and then another digit to represent the remainder. This allows us to represent up to 9 tens and a remainder of 9, or 99. And if we want to represent more than 99 things? We add a third digit to count groups of &amp;#8216;ten groups of ten&amp;#8217;, which we call &amp;#8216;a hundred&amp;#8217;. And so on. This is what we refer to as &amp;#8216;base ten&amp;#8217; representation. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Computers Don&amp;#8217;t Have Fingers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is all presumably intuitive and well-understood by all readers. But the crucial point to recognize is that the choice of ten digits, 0-9, is purely cultural. There is nothing fundamental or &amp;#8216;mathematical&amp;#8217; about it. This observation is important because electronic circuits don&amp;#8217;t have fingers. They have little wires that can either contain current or not. So electrical circuits can fairly straightforwardly represent only two states. Can we do useful math with only two states? Why yes we can!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Binary Numbers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just as we were able to represent any natural number using the digits 0-9, so can we represent them using just the two digits 0-1, in a similar way. So 0 means &amp;#8216;no items&amp;#8217;, 1 means #, and now we have to carry to another digit, so 10 means ##, 11 means ###, 100 means #### and so on. This base two, or &lt;em&gt;binary&lt;/em&gt;, representation of numbers is the cornerstone of digital (there&amp;#8217;s that word &lt;em&gt;digit&lt;/em&gt; again) computation. Note that these are the &lt;em&gt;same&lt;/em&gt; counting numbers as before. We&amp;#8217;re just writing them differently. In one notation ############# is 13, and in the other it&amp;#8217;s 1101, but these are just two different ways of representing &amp;#8220;the number of hash symbols in #############&amp;#8221;. We&amp;#8217;re really used to seeing that written &amp;#8216;13&amp;#8217;, but it&amp;#8217;s still an arbitrary notation. &amp;#8216;1101&amp;#8217; is just as valid. To avoid confusion between the two representations, we&amp;#8217;ll suffix binary numbers with a &amp;#8216;b&amp;#8217; in the remainder of this post. So, e.g., 13 = 1101b.&lt;/p&gt;
&lt;p&gt;In binary notation the two digits 0 and 1 and referred to as &amp;#8216;Binary digITs&amp;#8217;, or &amp;#8216;bits&amp;#8217;. By convention, bits are commonly grouped together in eights, called &amp;#8216;bytes&amp;#8217;. Each byte can represent a number in the range 0b-11111111b, which is 0-255 in decimal notation. You&amp;#8217;re probably used to thinking of the powers of ten: 10, 100, 1000 as round numbers. But in binary, the powers of two: 2, 4, 8, 16 etc. are the round numbers. To a computer scientist 1024 (two to the power of ten) is a round number and 1000 is not. After all, in binary 1024=10000000000b, while 1000=111110100b, which is not particularly round-looking.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arithmetic Circuits&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As we saw in the previous post, Boolean algebra has two states we called &amp;#8216;false&amp;#8217; and &amp;#8216;true&amp;#8217;. But in a mathematical context it&amp;#8217;s more useful to call them 0 and 1. And just as we were able to build physical circuits to compute Boolean functions (functions with inputs that are either &amp;#8216;false&amp;#8217; or &amp;#8216;true&amp;#8217;) so can we build circuits to compute functions with inputs that are either 0 or 1. Which means that basic mathematical operations on natural numbers, such as adding them together, can be implemented by physical electronic circuits! For example, a circuit to add two eight-bit numbers together would have eight input wires to represent the first number, eight input wires to represent the second number, and eight output wires to represent the result. We set the input bits to be 1 or 0 by passing current only through the appropriate input wires, and we measure the 1s and 0s of the result by checking which output wires have current and which don&amp;#8217;t. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It&amp;#8217;s a Little Trickier Than That&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We&amp;#8217;ve seen how, thanks to binary representation, it&amp;#8217;s possible to build physical electronic circuits that can do simple math on whole numbers. However there remain a great many complications. Some of these are:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;What should happen when a computation overflows the number of output wires? In our example above, 8 wires is enough to represent the binary numbers 0b-11111111b, which are 0-255 in decimal. But suppose we add 10010110b + 11001000b, which in decimal is 150 + 200. That would be 350, which is 101011110b, requiring nine digits, while our circuit only has eight output wires.&lt;/li&gt;
&lt;li&gt;How to represent non-counting numbers: negative numbers, fractions, and irrational numbers such as pi. &lt;/li&gt;
&lt;li&gt;How to perform more complicated mathematical operations, such as division and taking roots. &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Explaining these is beyond the scope of this post, but I may address them in a future post, if there&amp;#8217;s enough interest.&lt;/p&gt;
&lt;p&gt;For now, at least, we&amp;#8217;ve established that it&amp;#8217;s possible to build physical electronic circuits that can not only compute logical statements, as we saw last week, but also count and do basic arithmetic, all through the magic of binary numbers.&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s one more element that we need to put in place before we can really call our circuit a &amp;#8216;computer&amp;#8217;, and we&amp;#8217;ll talk about that in the next post.&lt;/p&gt;</description><link>http://benjyw.com/post/31799922590</link><guid>http://benjyw.com/post/31799922590</guid><pubDate>Tue, 18 Sep 2012 09:20:00 -0700</pubDate><category>Feature</category><category>CS101</category></item><item><title>CS101 part 1: Boolean Algebra</title><description>&lt;p&gt;Several people have suggested that I write a series of &amp;#8220;CS101&amp;#8221; posts explaining computer science and software engineering fundamentals, unrelated to anything in the news cycle. This idea appealed to my inner didact, so I&amp;#8217;ll try a few posts along those lines and see what responses I get. Feel free to comment and/or suggest topics.&lt;/p&gt;
&lt;p&gt;Hopefully, reading these posts will provide non-engineers in the tech industry with a better sense of what goes on under the hood, of what their engineering colleagues do, and of why software engineering is such a fascinating, intricate discipline. To any engineers reading this: you&amp;#8217;ll have to forgive my simplification of many concepts, in the interest of clarity and brevity.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll kick off, appropriately, by discussing the lowest level concept in Computer Science&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Boolean Algebra&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Boolean algebra, first developed by 19th century mathematician George Boole, is a mathematical formalization of intuitive logic. It provides a formal framework for reasoning about relationships between mathematical quantities that are limited to two possible values: &lt;strong&gt;true&lt;/strong&gt; and &lt;strong&gt;false&lt;/strong&gt;, often denoted as 1 and 0, respectively.  In particular, Boolean algebra allows us to reason about &lt;em&gt;operations&lt;/em&gt; on truth values.&lt;/p&gt;
&lt;p&gt;The three basic operations on truth values are:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;NOT: NOT(true) is false, and NOT(false) is true.&lt;/li&gt;
&lt;li&gt;OR: OR(X, Y) is true if either X or Y are true, and false otherwise.&lt;/li&gt;
&lt;li&gt;AND: AND(X, Y) is true if both X and Y are true, and false otherwise.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Note how intuitive these definitions are. For example, we all understand intuitively that the statement &amp;#8220;X is a programming language and Y is programming language&amp;#8221; is only true if the statements &amp;#8220;X is a programming language&amp;#8221; and &amp;#8220;Y is a programming language&amp;#8221; are each independenly true. So for X=Java and Y=Ruby, the statement is true, but for X=Java and Y=Spanish the statement is false&lt;/div&gt;
&lt;p&gt;The basic Boolean operations can be combined, e.g., we can formalize the intuitive statement &amp;#8220;either X is false and Y is true, or Z is false&amp;#8221; as OR(AND(NOT(X), Y), NOT(Z)). Boolean algebra provides rules for manipulating these expressions, much as regular high-school algebra does for expressions involving numbers. Such expressions are known as &lt;em&gt;Boolean functions&lt;/em&gt;: They take one or more truth values as input, and output a single truth value. Crucially:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;p&gt;Any Boolean function can be written as some combination of the basic Boolean operations.&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;So far so good, but why is Boolean algebra so central to computer science? Because it provides the bridge between the abstract world of mathematics and the physical implementation of computer hardware. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Boolean Hardware&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Electronic circuits consist of components connected by wires. We can assign a truth value to a wire in an electronic circuit: true if there is electrical current on that wire and false if there isn&amp;#8217;t. &lt;/p&gt;
&lt;p&gt;Now it turns out to be possible to construct circuits that implement each of the three basic Boolean operations. For example, it&amp;#8217;s possible to build a little circuit that has two wires going in and one coming out, and in which current comes out only if both incoming wires have current. This little contraption is a real life AND circuit: a physical thing that implements the abstract mathematical concept of Boolean AND. Similar circuits can be built to implement OR and NOT. &lt;/p&gt;
&lt;p&gt;Such circuits can be combined, by connecting the output wire of one to an input wire of another so that current can flow from one to the other. As we saw above, any Boolean function is some combination of the 3 basic operations, and therefore:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;p&gt;Any Boolean function can be implemented as an electronic circuit.&lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a remarkable engineering fact. Given any Boolean function, we can build hardware that can actually compute it! If we want to find out what the function&amp;#8217;s output is for a given set of inputs, we simply apply current to the wires representing the inputs that are true, apply no current to the wires representing the inputs that are false, and measure the current on the output wire.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Now Repeat Billions of Times&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The advent of transistors and, later, integrated circuits have made it cheap and easy to mass-produce phenomenally complicated circuits, consisting of many millions of AND, OR and NOT operations, modeling similarly large and complicated Boolean functions. These circuits form the basis of real-life computers. &lt;/p&gt;
&lt;p&gt;In the next post in the series we&amp;#8217;ll examine how these circuits are used to provide elementary computing capabilities.&lt;/p&gt;</description><link>http://benjyw.com/post/31462926671</link><guid>http://benjyw.com/post/31462926671</guid><pubDate>Thu, 13 Sep 2012 08:05:00 -0700</pubDate><category>feature</category><category>CS101</category></item><item><title>Posts To Resume Shortly</title><description>&lt;p&gt;Sorry for the long hiatus. I was on a much-needed vacation in Australia, Vanuatu and New Caledonia. I will resume regular updates shortly.&lt;/p&gt;</description><link>http://benjyw.com/post/31386853107</link><guid>http://benjyw.com/post/31386853107</guid><pubDate>Tue, 11 Sep 2012 22:30:07 -0700</pubDate></item><item><title>A Reliable Whole From Unreliable Parts</title><description>&lt;p&gt;Wired Enterprise recently published an excellent &lt;a href="http://www.wired.com/wiredenterprise/2012/08/google-as-xerox-parc/" target="_blank"&gt;article&lt;/a&gt; about how Google revolutionized distributed systems, creating the technologies that power not only Google, but much of the rest of the internet. The article gives some much-deserved limelight to Jeff Dean and Sanjay Ghemawat, accurately describing them as &amp;#8220;t&lt;span&gt;wo of the most important software engineers of the internet age — and two of the most underappreciated&amp;#8221;. I might also add, &amp;#8220;two of the most unassuming&amp;#8221;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I won&amp;#8217;t belabor points already made in that article, but it&amp;#8217;s worth emphasizing the key insight that underlies most of that groundbreaking work:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;p&gt;Building Internet-scale systems is the art of constructing a reliable whole from unreliable parts. &lt;/p&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;These days this may sound obvious to most engineers. But it&amp;#8217;s easy to forget that in the first dot-com era, the &amp;#8220;big iron&amp;#8221; approach was far more common.&lt;/p&gt;
&lt;p&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;Back then, much of the internet was powered by massive, high-end servers, notably Sun&amp;#8217;s &lt;a href="http://en.wikipedia.org/wiki/Ultra_Enterprise" target="_blank"&gt;Enterprise&lt;/a&gt; line. These machines attempted to provide scalability and reliability in a single computer: many processors and massive amounts of memory were racked together, each part was engineered for high quality, and each function was provided by multiple redundant components, so the machine could keep running when individual parts failed. Entire sites, even large ones such as eBay, ran off a single such machine or a small cluster of them. If a machine went down, part or all of the site went down, but the quality of the machines was such that this was rare.&lt;/p&gt;
&lt;p&gt;These machines were awesome to behold. They were also expensive. A fully-loaded Sun E10K cost well over a million dollars. And that&amp;#8217;s in 1999 dollars&amp;#8230; &lt;/p&gt;
&lt;p&gt;What Jeff, Sanjay and others at Google and elsewhere realized in the late 90s and early 2000s was this: no matter how expensive any machine was, at some point it would fail, taking at least part of the site down with it. And as the site scaled up to meet the growth in users and content, these failures would become more frequent. This meant that there needed to be a way to provide site reliability in the face of machine failure. &lt;/p&gt;
&lt;p&gt;But once you have the ability to handle machine failure without loss of service, you can not just tolerate machine failure but &lt;em&gt;embrace&lt;/em&gt; it, allowing you to buy much cheaper hardware. That $1M box cost 1000x more than a commodity machine, but provided perhaps 50x the computing power. What you were paying the huge premium for was hardware reliability. However once you&amp;#8217;re able to handle hardware failure, you may as well spend that $1M on a thousand cheap computers, and get much, much more computing power for your money. This insight led to the now familiar datacenter architecture of racks and racks of cheap commodity machines connected by a fast local network. &lt;/p&gt;
&lt;p&gt;So how do you get reliability if you can&amp;#8217;t provide it in hardware? You provide it in software. This pushes the burden of reliability onto the software engineers. The problem is that writing reliability-guaranteeing software for a distributed architecture is much harder than writing for a single &amp;#8220;big iron&amp;#8221; machine: every system has to knit together data and computation from multiple different machines, some of which might fail in mid-flight. At the time, few engineers had experience with distributed systems. To this day many don&amp;#8217;t.&lt;/p&gt;
&lt;p&gt;Most of Jeff and Sanjay&amp;#8217;s work, therefore, has been about making distributed systems easier to write, by providing layers that abstract away the particulars of how data and computation are divided up among machines, and how failures are handled. Essentially, their work has been about providing reliability in software instead of in hardware, allowing application engineers to focus on the particulars of their application instead of re-inventing distributed wheels.&lt;/p&gt;
&lt;p&gt;For example: most of you are familiar with the local filesystems on your laptops. You save a file under some name, and it&amp;#8217;s stored on your machine&amp;#8217;s disk drive, under some directory path. But in a distributed system, which machine should this file live on? What happens when that machine dies?&lt;/p&gt;
&lt;p&gt;The solution was the seminal &lt;a href="http://research.google.com/archive/gfs.html" target="_blank"&gt;GFS&lt;/a&gt; (Google File System), which offered functionality that looked like that a regular file system, but under the covers split the file up into chunks, and stored each chunk on at least 3 different machines. If any machine died, the chunk was still available on the other machines. GFS dealt transparently with pushing the data around the network, figuring out where the data lives, rewriting chunks after machine failure in order to maintain 3 copies, reconstituting the chunks into a single file and so on. Any other application at Google can use GFS naively, without having to be aware of all those details, just as you use your local filesystem without having to be aware of exactly where on the magnetic platter your bits and bytes go.&lt;/p&gt;
&lt;p&gt;These ideas spawned a host of proprietary and open-source systems and designs that are in wide use today everywhere from Google and Facebook down to the smallest startups. The web as we know it could not exist without the distributed systems innovations of the past 12 years, and this is why the names &amp;#8220;Jeff and Sanjay&amp;#8221; are still spoken with awe by engineers all over Silicon Valley. &lt;/p&gt;</description><link>http://benjyw.com/post/29725217982</link><guid>http://benjyw.com/post/29725217982</guid><pubDate>Sat, 18 Aug 2012 18:07:00 -0700</pubDate><category>feature</category></item><item><title>Zinc and Pants</title><description>&lt;p&gt;If you&amp;#8217;re interested in Scala and/or in build systems, Typesafe just published a &lt;a href="http://blog.typesafe.com/zinc-and-incremental-compilation" target="_blank"&gt;blog post&lt;/a&gt; about Zinc, the standalone incremental Scala compiler. Among other things, it mentions the work I&amp;#8217;ve been doing on integrating Zinc into Pants (Twitter&amp;#8217;s open-source build system; we&amp;#8217;re moving towards using it at foursquare).&lt;/p&gt;</description><link>http://benjyw.com/post/29540093638</link><guid>http://benjyw.com/post/29540093638</guid><pubDate>Thu, 16 Aug 2012 00:20:59 -0700</pubDate></item></channel></rss>
