CS Broke

Computer Science, at a deep and fundamental level, is broken, and that applies not only to software but to hardware. One of the reasons that I have this feeling is that after programming for the past 25 years the field hasn't really changed. The conversations aren't any different. You could substitute 'Windows API' or 'Borland CGI' for 'HTML and CSS' and you'd be having the same exact conversations I had 15 or 20 years ago. We still struggle with leaks, be it memory, or file handles, or threads, or whatever. We still have race conditions. We still struggle with software that grows linearly in features but exponentially in complexity.

I've been struggling to find a way to express this concisely. The best way I've found so far is to ask:

What part of the computer in front of you is fractal?

The answer is none of it, yet in nature, which has been at this game of computation for billions of years, everything is fractal. We're doing it all wrong.

The web is fractal.

Posted by Michael R. Bernstein on 2008-12-12

I agree, but what's the solution? As far as I know, no one's figured out how to program in fractals.

Posted by Stuart Sierra on 2008-12-12

I say that webpages and XML are somewhat fractal, but the problem is that we have to grow them ourselves. In nature everything grows on its own. Which leads me to believe that RDF (or something like it) would be the answer, combined with some sort of neural network...that would add things to the RDF tree. What do you think?

Posted by Andrew J. Leer on 2008-12-12

The world may be highly fractal, but at each successive level of complexity, there are features that you wouldn't be able to predict from the previous level. I'm not sure that the solution is so much to find a base set of abstractions that can be used to build anything, but rather to accept that we need to think differently to do different things. Some problems may be better solved in lambda calculus, some others with OOP abstractions, and some others may need totally new languages (programming or otherwise).

Posted by J. Benlin Lee on 2008-12-12

I actually find it reassuring that it's changed so little.

Posted by Travis on 2008-12-12

Wait, are you suggesting there’s anything more than a conceptual connection between computer science and day-to-day web development? Part of the problem, at least, is that software “engineering” largely ignores the science and runs on gut feeling. Any attempt to use robust, stringent methodology will be shot down because gut feeling leads to quicker results, at least in a short-term sense. (He says, then goes back to gut-feeling code hacking.)

Posted by Jens Ayton on 2008-12-12

Maybe software code should be written in the same way as Wikipedia is written? We need to get used to incomplete features in software, in the same way we are accustomed to broken links and stub pages in Wikipedia. We need to get used to 'blurring' or 'approximating' the details; think of partial functions. Just write the software lines that are needed, when they are needed, to the detail they are needed. Don't some LISP environments do something like this, to enable you to fill in the blanks where necessary? Just extend this to a collaborative software system.

Posted by Aaron McDaid on 2008-12-12

nothing wrong with slow evolution... you need but step back 300 yrs to see the wee changes, but they are there. Growing and harvesting Grain has changed very little in over 2500 yrs, but at least we are still eating.

Posted by walter on 2008-12-12

You have described a fractal: computer science is self-similar in time and space. It has grown by iterating the same useful but partial solutions. And you describe it as "broken" - the root meaning of fractal that tries to capture the notion of a form that can't be measured. Perhaps it could not be otherwise. Fractals describe many processes that are space-filling and iterative. On the other hand fractals don't capture the idea of selection. Fractals describe open-ended replication and structure. But only a few of these productions survive. Nature succeeds by pruning the the vast majority of her trials. Don't be too hard on computer science. I predict it will do amazing things in a billion years. It'll forget these early sketches and boil it all down to a single function, iterated.

Posted by Rick Thomas on 2008-12-12

Has anyone seen this? ( Mainly I am referring to Chapter 5. A group of scientists discovered that there is a fractal relation between the size of the branches on the trees and how many and what size of trees there are in the rain forest... (Even though it looks completely random!) Neat stuff! :-D

Posted by Andrew J. Leer on 2008-12-12

Can someone explain why fractals would solve anything? Or even what problem fractals would solve? The only end goal in nature, as far as one exists at all, is to continue existing. Nature didn't choose fractals because they were a good method, they simply proved more durable on average than other systems. If you wrote a program, or a book, or built a car the way nature creates plants and animals, you'd end up with code bloat, memory leaks, and software with lifespans ranging from 6 nanoseconds to a thousand years, with no explanation of why that should be. You'd end up with constant viral propagation. You'd end up with systems so vulnerable that the slightest external interference would cause a crash so severe the entire system might become unrecoverable. And finally, you couldn't design for a purpose, because that's not how evolution works. Natural is not optimal for all situations. And I am not a robot! I am a free man!

Posted by deworde on 2008-12-12

[quote] The conversations aren't any different. You could substitute 'Windows API' or 'Borland CGI' for 'HTML and CSS' and you'd be having the same exact conversations I had 15 or 20 years ago. [unquote] I don't think it has anything to do with CS per se. It's not too much of a stretch to substitue the vocabulary of electrodes and diodes, steam and pistons, wheels and axles or any other technlogical endeavour from history. The common features of humans trying to get a "thing" they have made to do something consistently and reliably are the universals the rest is just the technical jargon of the day.

Posted by Bert on 2008-12-12

Fractal is a representation not an argument here... But CS is not IT which as not changed much, sorry to say and in that I agree with the OP. IT as engulfed CS in a way not many science have in the past, and maybe that is why they are intertwined in our way of dealing with it. Science evolves out of thinking, not making. And thinking new ideas is NOT easy, neither market driven. Other sciences are evolving at a slower pace then their markets, Talking about Windows or HTML is not about computing science, it's about business - getting people to pay up... CS as many fields of study that are evolving, but at a rate that is beyond our day-to-day grasp. By the way, astronomy is not telescopes, but astronomy is not philosophy either and telescopes permitted new insights not available without them.

Posted by jmdeschamps on 2008-12-12

@deworde For argument's sake, the surviving structures are fractals too that outcompeted the weak ones. In surviving, they may be part of a pattern or algorithm that shapes their peers. Evolved life is such a compound fractal. Regarding purpose: to our minds purpose is very important. To evolution it is merely another correlation, in no way incompatible.

Posted by Rick Thomas on 2008-12-12

> We still struggle with software that grows linearly in features but exponentially in complexity. I hear your pain. But this happens not to be true -- not, at least, for definitions of "features" and "complexity" we usually use. Consider, for example, a small domain-specific language -- a language for laboratory control, or for representing NPC behavor in a game, or what have you. Version 1 has, let's say, a dozen built-in operators and a hand-built recursive descent parser. The customer or the boss says, "I went another dozen verbs." Odds are, you won't come close to doubling the complexity of the program; you'll just add 12 more action classes to your repertoire. You can argue you've double the number of features and you haven't even doubled the size of the code. Look at long-lived software -- EMACS, say, which turns 27 this year. Today's EMACS is bigger than 1999's, and has more features. And 1999 had more features (and perhaps smaller size) than 1990. But is this *exponential*? And this is a favorable comparison; one could argue, for example, that a Ruby compiler is simpler than the K&R C compiler, and that C compiler was simpler than a FORTRAN IV compiler -- so here we're not merely better-than-exponential, we're quite possiby shrinking.

Posted by Mark Bernstein on 2008-12-12

If I understand correctly what you mean by fractal I would say that the last improvement in Computer Science is Object-Oriented programming that allow us to better manage complexity by using the same small set of concepts to communicate with very simple systems and most complex ones, built by composing simpler systems. Regarding the Web, I would say that we have this uniform interface thanks to the REST architectural style. It is great to be able to communicate with all Google servers the same way we communicate with our simple weblog hosted on one server. However, the Web style need better composition tools. Mashups are great but there are still security issues, unfortunately.

Posted by Benoit Fleury on 2008-12-12

I disagree - I think we iteratively gain building blocks that we can build new things with. When you're working on building a new layer, you don't always see it, but the key to the 'cloud' idea is that it puts a "somebody else's problem" field around an area, so you can ignore it and focus on the bit you care about, ratehr than on yak-shaving. I wrote more on this on my own blog: Cycling to new layers of freedom

Posted by Kevin Marks on 2008-12-12

Saying that in nature everything is fractal is a vast oversimplification of nature. It also is missing the point, because the process of nature is very different than the process we want with software. The reason nature works despite it's staggering complexity is because it's benefited from millions of years of search. No one had to sit down and create fitness functions either... it was all implicit in the chemistry, or more ultimately, physics. Starting from that foundation nature has progressed with no specific goal in mind: it's just ruthlessly applying the rule set. That's not what we need from software. With most software we have an application: a specific goal or utility that we need. Nature doesn't know or care what it's optimizing for. While we might borrow evolutionary techniques from nature, we'll always have a problem of describing fitness: what is it that we want to optimize for? So while I do think there things we're doing wrong, I don't think we can look at nature and say "look at that, it does it right, we're doing it wrong". We need to do something nature doesn't do, and being fractal won't get us there. I think your point about geometric complexity as a function of feature count is very well taken however. PPS. For the love of $deity let comments use line breaks.

Posted by Jason Watkins on 2008-12-12

I don't think 'fractal' is useful nomenclature for what you're talking about, and your use of it puts you in the company of dilettantes.

The study of fractals for their own sake is almost exclusively the domain of interdisciplinary hand-wavers. Anyone that can say the words 'chaos theory' without a lot of ironic inflection and audible shrugging is not worth listening to. Anything that divides or multiplies tends to exhibit some self-similarity — while that might make a good whoa moment for the intoxicated or teenage, it's not a particularly productive insight.

It looks like you're attempting to say that the history of progress is somehow fractal, something that's already been explored (even using software). Just because it feels good doesn't make it true or even useful.

Posted by Fred Blasdel on 2008-12-12

Jason: You can get line breaks to render, you just have to put them in yourself using <br> and <p> elements.

Posted by Fred Blasdel on 2008-12-12

I agree with Jason and some of the other commenters above: this hope for solving all our engineering/CS problems by emulating nature to create a system that auto-magically evolves itself beyond the bugs we, as humans, inherently build into things that we design smacks me as being close to the singulatarian religion: hoping for a "raputre of the geeks" where the technology will hit some tipping point where it, on its own, cures us of all of our problems.

Most of the big challenges in engineering come from basic aspects of human nature, whether that be the difficulty of coordinating large groups of people in complex efforts (such as the standards processes behind HTML and CSS) or, as jmdeschamps points out above, how just darn intractably hard it is to invent new things. At best, the things we build can be useful tools for helping us work on these problems more effectively, allowing us to create new more effective social structures and giving us more inspiring materials to work with. And, in that regard, technology has done pretty damn well in the last 30-40 years. From the personal computer enabling an explosion of digital artistry and literacy to the internet enabling new models of open collaboration, technology has made a relatively large and relatively positive impact on human history and potential.

Any quest for technology that will fundamentally alter (or, worse, replace) human nature is not only doomed to failure, but a major waste of a discipline that, at its best, is dedicated to the high and serious purpose of giving humans tools to use in the long and slow quest of working to better understand and improve their world.

Posted by Greg Borenstein on 2008-12-12

@Fred - How is your generalization a "productive insight"? Why aspersion for users of a simple tool? Fractal is a specific mathematical structure useful in modeling, and a word with many associations, one cluster of which offer a scaffold toward understanding evolutionary processes.

Posted by Rick Thomas on 2008-12-12


Two thoughts - one reason that you can replace Term A with Term B is that every so often we have a new generation of software developers that have come of age knowing B rather than A, and they attempt to solve all of the same problems with B that the previous generation attempted to solve with A, while most of the A developers (now IT managers) just shake their heads and say "But we already solved this!"

The web is fractal (deeply, with one estimate putting its fractal dimension at 4.1). Most stand-alone programs aren't. My belief is that web programming as a consequence is in fact profoundly different at a deep level to programming Windows, for instance, and that we're only just beginning to appreciate the significance of that. We've spent the last decade+ trying to treat the web as an imperative architecture and it isn't, and I suspect that the hard work of understanding how to truly program the web is only just beginning.

Posted by Kurt Cagle on 2008-12-12

@Greg and others - Don't take this too seriously. Our puny efforts are in an exponentially different league from nature. We don't have the autonomous distributed substrate and we are no where ruthless enough to waste as much on trials. At the same time nature inspires us with its complex forms and offers us a huge trove of analogies to consider in design. If a fractal fits use it. If selection with variation helps try it again. Invention has always been inspired by nature and now we've got really good science illuminating it.

Posted by Rick Thomas on 2008-12-12

Software Engineering is mostly broken. Computer Science is doing fairly well.

Posted by Justin Sheehy on 2008-12-12

You're thinking it all wrong.

Posted by Nx on 2008-12-12

Really interesting post. My gut feeling is that something is wrong with the way we build software, but can't put my finger on it. I've also been fascinated about software vs nature, but with no real conclusions drawn so far.

I was casually quizzing my girlfriend, who diagnoses diseases at a cellular level, to get an understanding of how nature designed our bodies. I was interested in seeing if any of it would be useful to software development.

Some things that I gleaned were very interesting. For example, there is a huge amount of message passing going on. The parts that emit messages aren't aware of each other, and different receivers react to messages in different ways, some completely ignore them!

Similarly, the body has two channels for sending messages - the slow blood stream, and the lightning fast nervous system. Each being better for a particular purpose. This allows for slow, less important communication like preparing muscles for flight (takes < 1 minute), and then for fast, critical stuff like ensuring the lungs keep breathing (signals sent/receive in nanoseconds).

Cool huh!

The body also distributes knowledge around so that no individual part does too much. In our DNA, there are cells that do nothing else but go around checking that the other DNA cells are healthy. If not, they instruct those cells to die. It's amazing when you look at how nature separates responsibilities, builds in redundant failover mechanisms, and allows for loosely coupled communication.

Anyway, it's all interesting. And it reminds me of good OOP design a bit. I suspect we have most of the right tools for software development, but could take a few good design lessons from our mother nature.

PS - The excessive use of bold is for scanners!

Posted by Tobin Harris on 2008-12-13

"software that grows linearly in features but exponentially in complexity" - nice observation. It's worth noting how easy it is to get chaos in a system - all you need is some kind of delay (or something isomorphic) and non-linear feedback. Software is full of these characteristics, especially once you bring in the human element.

I agree to some extent with Michael, the Web does have some fractal features - see timbl's notes on the fractal Web.

I imagine this feature of the Web will become 'stronger' once grouping of resources (beyond e.g. per-domain/site) is used more, avenues for this include URI Templates, named graphs (sets of RDF statements collectively identified with a URI) and POWDER.

What I'm not so sure about is how this relates to CS as a field. The subject of the life sciences is fractal, but does that mean the study of life sciences has to be fractal too?

Posted by Danny on 2008-12-13

I would add Atom to the head of your list of grouping mechanisms - grouping happens passively today and much more as we use Atom for general collections.

"does that mean the study of life sciences has to be fractal too?"

Bit of a deep question for a blip response, but here goes:
One can argue that the relational steady-state of any human discourse is fractal - that which remains as a historical change in the way we think and act. To reach that point there must have been an iterative adjustment process affecting local and global. The resulting forms are fractal. That's a useful observation in this domain if fractal math can be used to model or characterize the discourse, or to usefully scaffold discourse. Other iterative forms may serve as well.

Posted by Rick on 2008-12-13

Riffing off of Tobin Harris' comment, I found the book 'The Plausibility of Life' rather insightful regarding evolvability.

Another way of looking at it is what makes genomes resilient and generative (such that mutations and recombinations are still very likely to produce a viable organism, if perhaps one less fit), rather than brittle.

It's hard to summarize exactly what I got out of the book, but there are lessons buried in there about designing infrastructure and frameworks that are similarly generative.

Posted by Michael Bernstein on 2008-12-14

i can't program anything more complex than a rice cooker, and the only thing i really know about how my macbook works, is where to plug it in and turn it on. oh, i also know how to fry one up rather well with a liter of water dumped into it..... but, i did have something to say, being the parent of a highly technologically literate child(ren), i can see how having grown up with a mouse as the extension of his arm, he conceptualizes in techno-think in a way that i don't think that gates and jobs can. at 3 yrs old instead of saying 'wait' he would say 'pause'. i think that the up and coming generation is going to take this whole idea on a rather more organic journey.

Posted by gena on 2008-12-14

See Milner on Turing, Communication and Computation for a lucid description of how the logical foundations of CS can be repaired.

Posted by Stu on 2008-12-15