New programming model

Last week I started tweeting about a new programming language/model that I'm working on with Tijs van der Storm. If you've talked to me about software in the last 10 years, you've probably been exposed to some of my ideas on this topic. I've been trying to make sense of it for a while, but now I'm pleased to say that it is coming together in a concrete way. We aren't ready to announce anything yet, but I can give you some idea of our guiding principles.

* Program with forests, not trees
The idea here is that all data/information should be represented explicitly as semantically integrated networks of typed values with attributes and relationships. There are two important aspects to this idea, which immediate distinguish our approach from both OO and FP. In contrast to OO, we declare structures on a larger level of granularity, to capture semantic integrity of collections of objects, rather than on individual objects. An OO programmer sees individual objects (the "trees") but cannot really see the "forest". Relative to FP, we allow explicit cycles, so that our representation is graph-based, rather than being based on trees as in FP. I know that lazy functional programs can express cyclic structures, but the cycles are not observable. We tend to call our forests "models" although it is best not to import too many assumptions from MDD or UML when we use the term.

*Support many languages. This means that we support domain-specific language. In effect, every information model you create is a language. It can have multiple interpretations. The distinction between textual and visual languages is unimportant, because text and graphics are just two different presentations of an underlying information structure.

*Dynamic checking
The structure of a model are described by other models, which represent structural and behavioral constraints. That is, all data is described by metadata. And the metadata can be more interesting than just structural types. At the top we use the typical self-describing models. However, since everything is a value, all checking is done dynamically.

* Generic operations
Because our "types" have lots of useful information in them, and can be manipulated just like any other value, its easy to write very generic operations, including equality, differencing, parsing, analysis, etc. We do extreme polytypic/generic programming, but don't worry about static checking. We'll worry about that later :-) Richer metadata (aka types or meta-models) means more powerful generic operations.

* Use code for transformations, but never generate code
We like code. Its great for projecting models onto models or computing analysis of models. We are developing a family of cyclic maps, which are like FP maps but they work on our circular structures. But you should never ever explicitly generate code. This is the big mistake of a lot of work on model-driven development. Instead, we use partial evaluation to generate code. Partial evaluation is great because it turns interpreters into compilers automatically (if you are careful!). Model to model transformations are fine and can be written in either code or as an interpretation of some other transformation language. But requiring all transformations to be models (not code), or generating code from models, is bad. I know others might disagree, but this is what we believe.

*Extreme feature-oriented modularity. That is, every idea should be written once. Allow mixins and inheritance/composition at all levels. These are very natural operations on models: to compose them and merge them. Its not easy, but we think we can make it work. You have to compose the syntax and the semantics cleanly. We are inspired by Don Batory's work here.

Our goal is to create "Smaltalk of Modeling". That is, a simple and elegant system that is based on models all the way down. It has a small well defined kernel and we are working on building real applications too, as we build the system. We are implementing in Ruby, although this is just because it is such a great language for this kind of reflective exploration. Our new system is not object-oriented, it is model-oriented. But we are looking for the key ideas in the modeling world, and not necessarily adopting any conventional wisdom. We are exploring!

Paul Graham on Objects in Arc

I just realized that Paul's note is about 10 years old. I'll leave my comments here, but I'm sure a lot has changed since then.... I just read Paul Graham's explanation for why Arc isn't especially object-oriented. My comments below correspond to his points:
  1. "Object-oriented programming is exciting if you have a statically-typed language without lexical closures or macros." Smalltalk, Ruby, C#, Scala, and Python all have lexical closures, and their use of objects is quite exciting (lexical closures are being added to Java real soon now). All Smalltalk control structures are user-defined as well, although it doesn't have full macros. It is true that objects can be used as a stand-in for closures, so there is a little truth to this comment. On the other hand, object-oriented programming is quite popular in dynamically typed languages, so I'm not sure why Paul thinks OO is tied to static typing.
  2. "Object-oriented programming is popular in big companies, because it suits the way they write software." This is ridiculous. Smalltalk, Ruby, PHP, Python, and Lua (to name a few) are all quite popular but are not tied to "big companies". Lots of people like C++ too, at big and small companies. I think that Paul is showing a surprising lack of awareness of reality here.
  3. "Object-oriented programming generates a lot of what looks like work." Object-oriented programs are often more verbose than other styles. Partly its all the types, which means that Smalltalk, Ruby, Python etc are more concise than Java. But partly it is because OO languages encourage (require?) programmers to create modules and put in extensibility hooks everywhere, and these take up space. These hooks are called classes and methods. Haskell programs are usually concise, but are often not very extensible or interoperable.
  4. "If a language is itself an object-oriented program, it can be extended by users." "Overloading"? This has nothing to do with objects! What are you thinking, Paul? Overloading is about selecting an appropriate method based on its static type.
  5. "Object-oriented abstractions map neatly onto the domains of certain specific kinds of programs, like simulations and CAD systems." Yes, OO abstractions map very neatly into certain kinds of programs, like GUIs, operating systems, services, plugin architectures, etc. They are not good for everything, certainly, but they are good for lots of domains.
Object-oriented programming is different from normal programming. There is so much confusion about objects that I begin to wonder if very many people really understand what object-oriented programming is. Certainly there isn't much in Paul's comments to provide evidence that he really understands it.

Here is a quick dictionary to translate OO names into Lispish descriptions.
  • "Dynamic dispatch" is just calling an function value.
  • "Polymorphism" is two different function values that have the same interface.
  • "Objects" are just functional representations of data.
  • "Classes" are just functions that create collections of first-class functions.
OK, so my definition of "object" looks funny. But most common definitions are wrong. Objects are just collections of first-class functions (you might call them "multi-closures" since they are closures with multiple entry points). Go back and look at how SIMULA was implemented -- it just captured the current environment and returned it as a value.

It is interesting to note that OO programs make more use of higher-order first-class functions (because all objects are collections of first-class functions) than most functional programs. This is another reason that OO is hard to grok. But Paul shouldn't have a problem with that.

As a small example, which do you think is a better approach to files? Here is the conventional approach without objects:
(define (scan stream)
(if (not (at-end? stream))
(print (read stream)))
(scan (open-input-file "testdata.txt"))
This is very limiting, because it requires a global read function that can understand how to read from every kind of stream! If I want to create my own kind of stream, I'm out of luck.

Now here is the OO version:
(define (scan stream)
(if (not (stream 'at-end?))
(print (stream 'read)))
(scan (open-input-file "testdata.txt"))
This is very nice, because anyone can implement a function that understands the 'at-end? and 'read messages. Its immediately extensible!

Remember Paul, that the lambda-calculus was the first object-oriented language: all its data is represented behaviorally as objects. Are you sure you aren't using objects?

ACM Digital Library Top 20 most frequently used search terms

I was poking around the ACM site and ran into this list. Its too bad the only
include "terms" not entire search strings.

The following are the Top 20 most frequently used search terms over the past 90 days: (occurances of term)
1. security (30,608)
2. object (24,393)
3. database (22,965)
4. dot com (19,605)
5. data mining (19,532)
6. web (19,040)
7. software (18,928)
8. design (18,239)
9. internet (18,152)
10. wireless (17,914)
11. mobile (16,218)
12. usability (16,125)
13. computer (15,963)
14. xml (15,465)
15. network (14,937)
16. proceeding (13,865)
17. java (13,099)
18. XML (13,034)
19. management (12,932)
20. information (12,907)

PLDI reviewing

I'm on the PDLI external reviewers committee this year. I've never published a paper at PLDI but I have attended. This is also my first time reviewing papers. I thought the quality of the papers I was given to review was quite high. They were also on a surprisingly broad and interesting range of topics. Unfortunately there was a inverse correlation between paper quality and how interesting I found the topic. In other words, the more radical and creative papers were in general much less well executed than the ones with more incremental results. Surprisingly, about 30% of the papers I read had no evaluation at all! I think that there are lots of valid kinds of evidence for the correctness of a result, including proofs, implementation, case studies, even subjective critique and commentary. But if the authors don't make any attempt to evaluate or critique their work, I don't see any way that a paper can be accepted today. Yes, I've published papers in the past that have little or no evaluation, but things have changed.

Academic Ancestors

A student sent me a link to my academic genealogy page. Mine goes like this:
Peter Wegner, Maurice Wilkes, John Ratcliffe, Edward Appleton, Lord Rayleigh (discovered argon), ..., Isaac Newton. One thing that's interesting is how few students the great minds had in the 1700s and 1800s.
Some rants about conference names:

PLDI: the only PL conference with "Design" in the title is also the least likely to accept papers about design of PLs,

OOPSLA: a conference originally about objects, but now part of SPLASH because objects are everywhere

ICFP: was once a conference about programming with functions, but now that almost every modern language has first-class functions, its about pure functional programming, or programming without implicit mutable state.

ICSE: does the "E" stand for "Empirical"?

POPL: no, the "O" does not refer to "Objects"

Matlab annoyance

I am really annoyed at Matlab. It keeps a record of all your old commands. At least, that's what it seems to do. Gives you a nice good feeling that "nothing is ever lost". However, it turns out that it only saves a certain amount of history, and then it starts throwing away commands. I didn't lose anything critical, but it certainly makes me unhappy that I cannot go back and see what I did a few months ago.

Calendars on iPhone, iPad, Mac

I finally found out how to sync all (ten) of my secondary Google calendars into iPhone and my Mac:
  • iPhone: Just go to http://google.com/calendar/iphoneselect . Forget about adding multiple CalDAV calendars. That was not a fun prospect.
  • iCal: Go to Preferences/Accounts/Delegates. Sure, this makes no sense. And it doesn't work until you close and load preferences creating the account. But it works great.
Happy Calendaring!

PS: Now if we could just solve the problem of multi-person event scheduling (a la Exchange) in a distributed and open way, I'd be happy. We do have an Orc app that does it :-)

The future of programming

I just took at look at The future of programming by Tony Wasserman and Steven Gutz. I've never met him but his article made some fairly accurate projections. Note that we are now in the "Medium Term" period. But we are starting the transition to the "Long Term".

Mysore Park

I just go back from a trip to India/Madrid/Delft. I was at the First Mysore Park Workshop on Building and Programming The Cloud. Then I went to POPL. Finally, I visited Eelco Visser and his group at TU Delft. Very productive! India was great and the food was quite good in Delft. I was less impressed overall with Madrid, although the museums are fantastic.

Data Abstraction blog-roll

Here are some other comments on my essay:
In other news, Matt Might talked discussed Fixed-point combinators in JavaScript: Memoizing recursive functions, which is related to my article with Dan Brown on Monadic Memoization Mixins at SBLP last year.

Note on ECOOP banquet talk

The ECOOP banquet talk was delivered during dessert on the lawn of a nice Italian villa on the hill overlooking Genova. When I started the talk I was wearing this dark Zegna suit I got to wear at the IPO of my company. Unfortunately I never got to wear the suit for that event.

You have to realize that banquet talks are about entertainment, not technical details. Everybody was full of good food and wine.

About halfway through the talk I took off my coat. Then my tie. It was difficult because I was trying to talk at the same time and also holding a microphone. Then I took off my shirt. This didn't seem too strange because it was a warm night. I had a "leave no trace" t-shirt on underneath.

Then I talked for a while more. They assumed I was done. But then.. yes... I undid my belt and dropped my pants, to started chuckles and giggles from the crowd. Fortunately I was wearing shorts underneath. I eventually managed to say something like "see, now I'm an academic" as I stood in my shorts and t-shirt. I was trying to illustrate how difficult the transition from industry to academia is... but at least I got a laugh out of them, even if the point wasn't clear.

Guy Steele loves tail calls

My recent essay seems to be causing a big stir. I am pleased because I love it when my work has impact. The only funny thing about it is that I've known all this stuff for 20 years. I guess I just haven't communicated it clearly enough. And the essay is not an easy read, even still. Some people have suggested I need to write a book. We'll see.

Guy Steele pointed out that a pure OO approach to data only works if your language has tail call optimization. This is related to a comment I made in the essay about how objects use recursion everywhere (at both the type and value level).

samskivert gave a very condensed summary and some nice comments.

Andrew Black at Portland State (previously at OGI) said he used my slides in his class. One student found a bug in the essay: I say that ADTs are not possible without a static type system, but I also say that Smalltalk has some primitive ADTs for numbers. I should have said that without a static type system you cannot have the kind of user-defined ADTs that you find in CLU, ML or Ada. There are two ways to get ADTs in a dynamic language: one is with some kind of dynamic sealing (or encryption) and the other is to build them into the language runtime. The basic ADTs using in Smalltalk are built into the runtime.

And Jonathan Aldrich at CMU listed the essay as one of his select "classic papers" on object-oriented programming, saying "This is a (very!) recent paper, not a traditional classic, but it is the best summary I know of what makes objects unique."

Uploaded presentation slides

I uploaded slides for several of my recent talks. I'll try to upload the rest before the end of the year :-)

On Understanding Data Absraction, Revisited

I just got back from OOPSLA/Onward! where I presented an essay On Understanding Data Abstraction, Revisited. There is a discussion about it on Lambda the Ultimate. Here are the slides from the talk. The talk went pretty well. There was a nice discussion with the audience. Unfortunately the paper is pretty technical, so some people in the audience didn't get it. I suppose now I need to write the book...

ECOOP 2009 Banquet speech

Today I want to talk about my experiences in industry and academia. When most of you think of industry, you think of an industrial research lab, for example HP Labs, Microsoft Research, or Google Research. I've spent some time in an a research lab, but what I really mean by industry is commercial software development. Getting some industrial experience is a good thing, but I don't necessarily recommend you do it the way I did. Here's the story.

I got my PhD in 1989 from Brown. My dissertation was on the semantics of inheritance. I was lucky. I have always been a programmer. I build systems. I have also learned about theory. I seem to have good intuition about what kinds of proofs are possible, but I struggle with the technical details. On the other hand, I read Church's Theory of Lambda Conversion when I was 14 years old, in high school, so that may have distorted my view point a little. But I also programmed at lot. So I combined denotational semantics with object-oriented programming, and this lead to some good insights, including formalizations of inheritance, mixins and F-bounded polymorphism, and data abstraction. More on this later.

I did a lot of this work at HP Labs. For all you struggling grad students, let me say here that my first paper was rejected 5 times before it was published. I had to learn how to write. I did some very productive work and wrote 8 academic papers. Industrial research labs are one of the best places to do research when your research is aligned with the goals of the organization. But I also found that research labs are not completely free. They like to focus their research in specific areas. Sometimes the focus changes. Its as if there is one of those invisible electric fences that keeps the researchers in bounds. Sometimes they move the electric fence and the researchers change focus, or they leave. That's just my personal experience, but perhaps you might find it a useful data point. In my case, I left and spent ten years doing commercial software development. I didn't publish any academic papers for most of that time. I didn't do research. I tried to make great products and a lot of money.

I wanted to learn more about the practice of software development, so I left HP Labs to join Apple. I had a vision that there might be a lot of value in automating graphical applications in a way analogous to the scripting and automation of unix commands. I led the team that created AppleScript. The main thing I learned was how to build high-quality software. I learned about specifications, end-user documentation, test-plans and testing, user interface design, code reviews, customer focus groups. It was a great experience, working in and then managing a team of 20 people. But Apple has a culture of “home runs”. They like products that are absolutely mind-blowing amazing from the very start. That's what they live on. AppleScript was not like that. It was useful but not amazing. It needed to be incrementally improved. I think that is the way Microsoft makes products: relentless improvement. It works for them, just like home runs work for Apple. But we were the wrong kind of product at Apple at that time, so it made the team unhappy. We all left, and AppleScript ran unchanged for about 8 years. It turns out they couldn't even compile it when they wanted to make it native on PowerPC. Our build process was a little complex. But the software ran for many years with no bug fixes. I learned how to make high quality software.

My next startup was a flop. We made the product (its still on the market, in fact), but we didn't make any money. The product helped kids learn to write, by showing them how to edit. Its a topic that some of you will know is still near and dear to my heart. The lesson I learned from it was not to just jump into anything that sounds good over a beer with an old friend. Its important to talk to people, do research on what might work. I did better on my next company.

I got together with two of my tech friends, Martin Gannholm and James Redfern. Martin is the best programmer I've ever worked with. You probably know the type. He not only can write code and read code better than anybody I know, he can also accurately predict when a complex project involving 50 engineers will be done. Marketing always wanted it done sooner, but Martin's prediction was always right.

Martin had a friend named Dennis Ryan who joined as CEO. We had a good idea: to help businesses manage indirect sales channels, that is, resellers, agents, etc. For example, HP sells lots of printers through small shops all over the world. They kept the list of stores in an Excel spreadsheet. So we visited Benchmark Capital, one of the top venture capitalists on Sand Hill in Menlo Park. We gave a powerpoint presentation and a demo and they gave us $20 million.

Venture capitalists talk about pain killers versus vitamins. A vitamin is a product that might make you healthier over the long run, but its hard to tell. Pain-killers are products where the customer screams “give it to me now” and asks what it costs later. Venture capitalists only want to fund pain-killers. Most software development tools, including programming language technologies, are vitamins. Google is great because everybody had “search pain”. But nobody has “ownership type pain”, or even “equality-constrained type-class pain”... or at least nobody with a lot of money in their pockets. That's another big problem: sometimes a company has a lot of pain, but the people who feel the pain are not the people who write the checks. This doesn't work either. It is sometimes possible to make customers have a need that they didn't have before. This is called “making the customers feel a pain that they didn't previously know they have”. It's the job of the marketing department to do that.

When it came to naming the company, we hired a naming consultant. They interviewed everybody. The consultant gave a presentation and said the name of the company should be “Dennis Ryan and the people holding him back”. We all sat there in stunned silence. It would have been funny if it wasn't about us. Anyway, we named the company Allegis.

At one point we spent some time thinking about the purpose of our company. Thinking about a “mission statement” is one of the classic ways that big companies waste time. Some people think its odd that a startup would have time to think about it. But I learned something in the process. First of all, I learned that there is a difference between a purpose and a mission. A mission is something that you do in a bounded amount of time with bounded resources. A purpose is something that you never achieve. The important point is that a purpose must be both guiding and inspiring. Its easy to find inspiring goals, like eliminating world hunger or allowing large enterprise applications to be written and proven correct by 5 people over the weekend. It also easy to find statements that guide your next action, but aren't very inspiring. For example, combining a toaster and a laptop, or fixing the way spaces are parsed in FORTRAN. I good purpose is both inspiring and guiding. Consider Kodak company. What is its purpose? A good purpose for Kodak is not about making cameras or film. It is saving memories. Our purpose was to facilitate collaboration between individuals working together in different companies. This idea of inspiring and guiding is also useful in academia. It is a good way to think about papers, or selecting research topics.

Technically, Allegis was also exciting. We read all the standard references on OO for business applications. It didn't make sense to us. We started investigating model-driven development styles. We created modeling languages for data, user interfaces, security and workflow. These four aspects are the core of any enterprise application. We created interpreters to run the languages, and our interpreters did many powerful optimizations by weaving together the different aspects. I like to call these langauges aspect-specific rather than domain-specific. I don't think of user interfaces as a domain; to me a domain is banking, transportation, etc.

We made products. We evolved them rapidly. We built tools to manage and upgrade our aspect-specific languages. Having the code in a specialized language made analysis possible. If we had embedded the language, it would have been too hard.

We got more money, until we had a total of $60 million. The employees still owned just over 50% of the company at that time. Our company valuation was about $160 million, which meant that I was worth about $8 million on paper. If we had managed to complete our IPO before the stock market crash, it might have been a lot more.

We got customers. Viewsonic, HP, Microsoft, Charles Schwab, Dow Chemical. We made good money, about $4M a quarter. We started to prepare for a public offering. I bought this suit. I never got to wear it for an IPO. The market crashed. We had money and customers, so we were in pretty good shape. But it wasn't enough. We had stiff competition and we felt we needed to keep innovating to grow. Around the same time our company was trying to weather the economic storm that followed the stock market crash.

The venture capitalists weren't very helpful in the end. Their idea of fixing a problem is to throw jet fuel it. I mean, they want to grow your way out of any problem. They don't want nice little businesses. They want maga-blockbuster hits. Its all about percentages. The invest in 10 companies and expect 9 of them to fail, but hope one of them makes a lot of money. Benchmark was in early investor in eBay. Unfortunately, these kinds of odds don't apply to employees, because we can only work on one company at a time.

In the end we ran out of money and we sold the company for nothing, but the employees kept their jobs. This was the management's fault, including me. I was VP of engineering at the time. We were always focused on people, taking care of our people. We should have layed off more people and saved the company. The company that bought us laid off 30 more people and was profitable the next day. We should have done that. But we were trying to grow our way of our problems, and that was not possible.

My friend James said “Experience is what you get when you don't get what you want.”

For a long time I had been thinking about what we were doing technically. It seemed interesting from a research viewpoint. Aspect-specific languages with interpreters and optimizations across aspects. Integrating programming languages and databases. Workflow and concurrency. Security. But we were working in a startup and had to move quickly to satisfy customer needs. There wasn't much time to reflect on what we were doing and dig more deeply into its foundations. I decided to return to research.

Interviewing for academic jobs, in 2003. was great. I think the old days, when the children of wealthy people in america came of age, they would take a tour of europe to be introduced to society. This is how I felt on my interview tour. I wish I had done it when I first got my PhD. I found out that many of the papers I wrote had been read widely and were influential. So many people knew about me, even though I didn't know them. I did wear this suit on the tour, but have not worn it since then. One small interesting point: I supplied references to the universities where I interviewed. These references included academics, some of whom I had not seen in 10 years, and also Dennis Ryan, the CEO who had been my boss for the last 10 years. Not a single university contacted Dennis for input whether I would be a good candidate. They weren't interested in what I had been doing for 10 years. One wonders if they would have cared whether I was a commercial software developer or a dishwasher.

One thing I learned is that programming languages is a very small research area. As a grad student I thought we were big, because everyone in knew did it. But I found out that we are small, smaller perhaps than database research. We are also very fragmented, into functional, OO, typed and untyped, etc. This tends to lead dilute our influence on the community, I think.

When I came back academia welcomed me. Thank you! I was surprised to learn that many people still don't know what inheritance is. The relationship between abstract data types and objects is still undefined. I wrote papers on these topics 15 years ago, but I wasn't in academia promoting my results. If you want old but fundamental answers to these questions, talk to me afterwards, or tomorrow.

However, my first year in academia was miserable. I had to start an entire research program from scratch. I was lonely and unsuccessful in my attempts to publish or get funding. I had spent the last 10 years working with teams of 20 to 50 really smart people, each of whom had 10 to 20 years of serious software development experience. But the key thing is that we were all working together to solve a common problem. This is a very powerful experience. As a professor I lost all that. I was working alone, and then with a few new students who really didn't know very much at all. I got a call from Microsoft. Thinking I had made a terrible mistake, I went for an interview. They offered me a job. But at the same time I started to adjust to academia. I started to work with other faculty members, including Jayadev Misra and Don Batory. My mentor was Kathryn McKinley. I started to have some success with papers and grants. At the last minute I turned down the Microsoft job. I stayed at the University of Texas and now know that it was the right choice. I have an opportunity to work on important problems, and try to bring my commercial experience into an academic setting.

So what is the relationship between academia and industry?

One interesting example is the World Wide Web. The web did not result from an Academic research project by the computer science community. There were many research projects that worked on similar things. There was the Intermedia project at Brown. My understanding is that they tried to implement a bi-directional link model, because this was considered more safe than on-way links. But its important to realize that the web is now an application delivery platform. In some ways it is terrible for this purpose, because HTML was not designed for this purpose. The interesting thing is that many people have tried to create distributed application platforms, but failed. Instead what we have is a messy system that incrementally evolved into what we need. Perhaps this was the only way to get here. Or perhaps there is something more fundamental about what happens when we set out to design something great. We make it too complicated. HTML is the ultimate ``worse is better''. If you look at the technologies that we use every day, Email, LaTex, Web... the most important thing is that they exist and are good enough. But by almost any objective measure of quality, they are terribly designed.

I did ask one person why there wasn't more academic attention on building the web, and the answer was “The World Wide Web wasn't publishable”. This points out how the academic and commercial value systems are different. Academia is like page-rank: your value is defined by what everybody else thinks of you. And what you think of everybody else contributes to (or subtracts from!) their net academic worth. It is a closed hermetic self-referential system. The commercial value system is obviously different: it's all about money. In a way this is similar to page-rank as well. The difference is that the money comes from outside the community, from customers.

Object-oriented programming is another interesting example.

What about technology transfer? Academics tend to assume that the way it is supposed to work is for the academics to do fundamental research that creates amazing new ideas, which are then transferred to industry for implementation. Sometimes things work out this way, but I believe that often it does not work this way. As an academic, if you think this is how it should work, my guess is that you will be frustrated a lot of the time. What I'm going to do now is try to generalize about the relationship between academia and industry. What you'll see in a minute is that this kind of generalization is standard practice for academics, but I want to assure you that I am aware of the potential dangers. Still, here is a framework for thinking about technology transfer.

The way I see it is that industry generally has more problems than they do solutions, but academia often has more solutions than problems. As an academic, I think everyone here will realize the value of a good problem. So if nothing else, we should revise the technology transfer story to include flows in both directions. Industry could transfer problems to academia, and academia could provide solutions to industry. I want to emphasize that both these flows are of high value.

But it is still not so simple. Industrial problems are often messy and tied to specific technical situations or domains. It is not easy to translate these complex problems into something that can be worked on in academia. This translation involves abstraction and selection. The result is a problem that a single student can solve in a year. It's not surprising that industry might not even recognize their problem after it is translated, because their problem is probably one that, even if they knew how to solve, might take a team of 20 to 200 experienced developers can solve in several years. Ideally the student will have a new idea that leads to a completely new way to solve the problem.

The same thing happens when trying to translate the solution back to industry. What usually happens is that industry rejects the proposed solution. The academics go back and complain to their friends about how conservative and unenlightened industry is.

What has really happened is that industry rejected the solution because it is incomplete, not because the industrial people are stupid or timid. You don't build successful companies by being stupid or timid. But you do win by being smart, bold, and by solving the entire problem. I think that most academic solutions don't transfer because they don't solve the whole problem or didn't solve the right problem. It doesn't matter if you have the most amazing solution for part of the problem. If you don't have a complete solution it is useless. Also, if you have abstracted away some important constraints, then you haven't solved the right problem.

We have lots of evidence that industry is not as conservative as people assume they are. Sure, we will be using Cobol and Java for a long time. But look at the amount of experimentation that is going on at the same time. Dynamic languages, application frameworks, web services, browser delivery, on and on and on.

In my experience people in industry are quite smart and are often developing novel solutions to fundamental problems. They just don't have time to abstract away the details and develop there solutions in a universal style. Instead they solve the problem as best they can and move on the rest of the problem. I would encourage you to go out and work with industry. They have important problems. Ole Madsen told me about a project he's involved in that brings researchers and industry together for exchange of problems and solutions. This kind of detailed dialog is much more likely to be successful than the ide of throwing thing over the wall.

I want to end with a discussion of two topics that I've been involved with. One is the integration of programming languages and databases. The other is language support for distributed computing. Industry and academia have been working on these problems for the last 30 years. Two important solutions proposed were object-oriented databases and distributed objects, like CORBA or RMI. I think that OODBs failed mostly because they were partial solutions. Early versions did not have query optimization or transactions, so its not surprising they were rejected. More recently there has been work to develop OODBs that do solve the entire problem, and so we may see more adoption of OODBs now. And Microsoft LINQ uses ideas from embedding DSLs in Haskell to make a better way to call databases from an OO language. This is a case where a new idea made a big difference. Distributed objects haven't been as successful as you might expect, based on the amount of effort to create them. Again, I think they had a fundamental assumption that made the solutions not work. In this case, the assumption was that distribution could be added to an existing language. I've been working on these problems for 15 years and just recently had a new idea on how to attack the problem. It simplifies things enormously. I kick myself every day and wonder “Why didn't I think of that before?” But then I remember something that I tell me students: “Simplicity is the result of hard work.” Simplicity is not where things start. Question your assumptions! Its where they end.

But the summary is that working on real problems is important. Go and talk to industry and ask them what their problems are. Get involved with their problems. Focus on important problems and set aside your favorite solutions, avoid “When you have a hammer, everything looks like a nail.” and “A solution in search of a problem”. It is better to start with problems and then figure out the best way to solve that problem. The solution might be functional, object-oriented, or model-driven. Remember that as an academic, you aren't judged on the quality of your solutions as you are on the taste you demonstrate in selecting problems.

3 Day Startup

I was on the review panel for 3 Day Startup, an entrepreneurial experience for students here at UT Austin. It is co-organized by one of my PhD students, Thomas Finsterbusch, and I have worked with several of the other 44 students who participated. They had a good mix of technical, business, and communication experience. They also included graduate students and undergraduates. Last night they pitched 4 ideas to the panel. I thought all the ideas were interesting, but each one would have its own particular challenges in coming to market. While some may complain that doing a startup in 3 days is not realistic, I don't think that's the point. The point is that it was exactly like a large startup, but in minuature. It gives students a real sense of the psychology of startups. I do think that running something like this over a longer period of time would give the students more time to reflect and also to learn new styles of working, when they find that their first attempt doesn't work. But either way, direct experience of starting a business is not something you can get from book learning or studying cases. You have to live it.

A Better Mousetrap (Distributed Objects)

Despite being jaded and feeling that you've seen it all before, its important to keep your sense of wonder at the possibility of seeing something new. There are new ideas in software. Maybe the last cool idea that captured your imagination didn't turn out to be as amazing as you had hoped. Don't give up. The next idea might be better. It probably means that the first idea didn't solve the whole problem, or had some flawed assumption. But now you know more about the problem and can try again.

Simplicity is the result of lots of hard work.

This is how I feel about my work on distributed objects. First of all, let me say that CORBA, RMI, and DCOM are pretty much complete failures. Ok, Ok. I know that some big systems have been built with CORBA. How could these fancy technologies have been stomped by something as whimpy as Web Services and REST? Have people lost their minds? Is there no answer at all?

I think that both CORBA and Web Services are fundamentally flawed. But that is not the interesting point. The interesting point is that they both have gotten something right. If you combine the good parts of each, and avoid the flaws, then the combination might actually be a good solution. So, what are the problems?

The problem with CORBA/RMI is granularity. Clean object-oriented design encourages fine-grained methods. But these are death to distributed systems. So you have to use Data Transfer Objects and Remote Facades to make things work. Its a mess. Automatic proxies are an invitation to poor performance.

Web Services can use document-oriented approach, which encourage large-granularity designs. But the programming model is terrible. You spend all your time creating documents that describe the actions you want to perform and decoding results. Its the opposite of direct manipulation.

The hidden assumption behind both these approaches is that distribution can be implemented as a library. This is such a deep assumption that we don't even realize its there. We say, if you are going to implement distributed computing, you have to create a library to do it... and so you create proxies, documents, etc... but you haven't realized that you've already lost the game before you started. Its similar to the arguments that threads cannot be expressed as a library. I'll add to that my assertion that regular expressions cannot (effectively) be implemented as a library.

What happens if you drop this assumption? We started with a simple observation. If the problem with CORBA/RMI is granularity, lets look at that. The problem is that one call is one round-trip, and two calls is two round-trips. CORBA/RMI is not compositional from the viewpoint of communication. There is no reason why two calls should take two round-trips. So we invented an a language notation for specifying groups of calls that should be performed together:

batch (r) {
print( r.op(3) );
print( r.get() );
}

In this example, "r" refers to a remote object. The calls to "op" and "get" are both executed in one round trip to the server. Voila! Compositional remote services. You can also execute programs with complex dependencies among the remote parts:

batch (r) {
Foo x = r.locate(3);
print( x.get() );
}

In this case the remote method returns a Foo object, which is then used in the next call. But since all of the action happens on the server within a batch, there is no need for the client to ever refer directly to "x". No proxies! What happens is that the program is partitioned into a remote part and a local part. The remote part is a script, which runs on the server and returns a result:

REMOTE: result = r.locate(3).get();

The local part then uses the result for the local computation:

LOCAL: print( result );

The result can be multiple values, and the script can contain loops and conditionals. See the papers for more examples. It turns out that these "remote scripts" are isomorphic to documents in document-oriented web services. Thus our new idea of "batches" combines the best parts of CORBA (objects!) and Web Servies (documents!) into one.

We took us so long to discover it? Simplicity is the result of hard work.

Here are some papers with details:

Generic Syntax: Lisp parsing + C notation

I've been working with Jose Falcon, undergrad here at UT, for almost a year on this crazy idea for an approach to syntax that combines aspects of Lisp S-Expressions and familiar Algol/C/Java notations. The idea is to use a generic syntax, as in Lisp, but extend it to include many of the common syntactic conventions found in programming languages, grammars, and style sheets. Lisp only recognizes these characters: "(.,')" and space. Our language, called Gel, recognizes {}, [], (), and arbitrary unary and infix operators. So you can write
{ a + (x ** 3) ==> x | y.z; x := 37; if: a=3 then: print(3, f[x]); }
and have it parse just as you would expect. We tag keywords with a ":", because they have to be generic too. To get operators to work right, we make spaces meaningful. Thus:
a +b == a(+b)
a+ b == (a+)b
a + b == (a)+(b)
This corresponds to common usage in Java/C and also most grammar notations:
E ::= E | ("+" E)*
also parses correctly in Gel. Its basically a "super-lexer" just as Lisp is. We will get the source code up soon so you can check it out. Here is the paper. The work will be presented at IFIP Working Conference on Domain Specific Languages (DSL WC).