Declarative versus Imperative
Advice for faculty candidates interviewing at UTCS
Keshav Pingali suggested this recipe based on thirds: 1/3 of your talk should be understandable by everyone. This should include the motivation and the high-level contribution and significance of the work. 1/3 of your talk should be understandable by people in your general area. Finally, 1/3 should be understandable by specialists working on your particular problem.
I'm not sure I would go so far as Keshav. But I do agree that there must be at least part of your talk where you describe the key problem and your solution in detail, and that this is likely to be fully understood by only a few people in the audience. But that's OK.
So PLEASE keep the depth in your talks and don't worry too much that somebody might not be able to follow. Just think about how many job talks you've been to where you haven't understood everything. It's OK. Take a deep breath. Show your depth!
Revised definitions of object and object-oriented
The Day Functional Programming Became Pure
Before 14 August 2003, the page described functional programming as a style that emphasized the use of functions. For example on 14 October 2001 the entire page was 220 words long, and began:
Functional programming is a style of programming that emphasizes the evaluation of functional expressions, rather than execution of commands. The expressions in these languages are formed by using functions to combine basic values.
A functional programming language is a language that supports and encourages functional programming. The oldest example is LISP. More recent examples include Scheme, ML, Haskell, Erlang, Clean.Lisp is identified as the first functional language, and Schema, ML and Haskell are on equal footing.
The changes started on On 14 August 2003 when the pages from Nupedia, which had a structured and peer reviewed model for content production, were integrated into Wikipedia by Luxor to create a page with 1,640 words:
Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions. In contrast to imperative programming, functional programming emphasizes the evaluation of functional expressions, rather than execution of commands. The expressions in these languages are formed by using functions to combine basic values.
Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions. Functional programming emphasizes the definition of functions rather than the implementation of state machines, in contrast to procedural programming, which emphasizes the execution of sequential commands. A purely functional program does not modify state to produce values (as is done in imperative programming), it constructs new values from (but does not overwrite) existing values.
There is still a distinction between (ordinary) functional programming and the "pure" form of functional programming, which avoids the use of mutable state. At this point there was a small but significant change, in the middle of the night, with no fanfare, by an unknown person. At 01:07 on 29 May 2006 it was changed to read:There is no uniform agreement on what constitutes functional programming or a functional programming language. Often considered important are higher-order and first-class functions, closures, and recursion. Other common features of functional programming languages are continuations, Hindley-Milner type inference systems, non-strict evaluation (i.e. "laziness"), and monads.
Functional programming is a programming style that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming emphasizes the definition of functions, in contrast to procedural programming, which emphasizes the execution of sequential commands.
Functional programming relies on concepts from the lambda calculus, Lisp, and more recently Haskell. Frequently mentioned are the avoidance of state and side-effects (which provides for referential transparency), higher order functions, recursion, and closures.
The change was made by ideogram, whose real-world identity is not disclosed. This account was created a few days before the active editing of the Functional Programming page started. Since then the account has been banned numerous times for unacceptable behavior (trolling) but this seems to be urelated to the editing of the Functional Programming page.
They didn't leave a revision comment. On the other hand, there is some discussion about the issues on the Functional Programming Talk page. There have been edits since this point, which have restored some of the previous language, but they are later removed. Currently (July 14, 2012) the page reads:
In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state.[1] Functional programming has its roots in lambda calculus, a formal system developed in the 1930s to investigate function definition, function application, and recursion. Many functional programming languages can be viewed as elaborations on the lambda calculus.[1]
In practice, the difference between a mathematical function and the notion of a "function" used in imperative programming is that imperative functions can have side effects, changing the value of program state. Because of this, they lack referential transparency, i.e. the same language expression can result in different values at different times depending on the state of the executing program. Conversely, in functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f twice with the same value for an argument x will produce the same result f(x) both times. Eliminating side effects can make it much easier to understand and predict the behavior of a program, which is one of the key motivations for the development of functional programming.
[1] Paul Hudak. 1989. Conception, evolution, and application of functional programming languages. ACM Computing Surveys volume 21, issue 3 (September 1989).What are the implications of this? How did this change come about? Are we in the midst of a (small) scientific revolution? Who is behind this?
According to the new definition ML and Lisp are no longer functional languages. It is possible to write some some in a functional subset of these languages. The first requirement is avoiding the use of "ref" types in ML, or the use of assignment and structural mutation in Lisp languages. However, this is not enough, because many of the standard libraries for ML and Lisp languages have side-effects. This is especially true of any libraries for IO. As a result, the range of program that can be conveniently written in a functional style is fairly limited.
Interesting discussion on DSLs
Why do North Americans not like MODELS?
| Conference | Location | North American papers |
| Models 12 | Austria | 16% |
| Models 09 | US | 21% |
| AOSD 12 | Germany | 22% |
| ECOOP 11 | UK | 35% |
| OOPSLA 11 | US | 54% |
Of course, maybe they do submit papers but they just aren't accepted :-)
Update: The numbers for USA are even worse:
| Conference | Location | US papers |
| Models 12 | Austria | 6% |
| Models 09 | US | 12% |
| AOSD 12 | Germany | 22% |
| ECOOP 11 | UK | 31% |
| OOPSLA 11 | US | 52% |
UML is the worst thing to ever happen to MDE/MDD
There was also some discussion on StackExchange.
It has since become clear to me that UML is perfectly reasonable for
its purpose: to describe OO designs. But UML is not appropriate for
doing serious Model-Driven Development. It was OMG that tried
to connect the two, in promoting MDA. That was a mistake.
I think that DSL research has many of the same goals as MDD, and
the connection between these two threads of research will eventually
bear fruit.
Ensō papers
Alex Loh, Tijs van der Storm, and William R. Cook
Tijs van der Storm, William R. Cook, Alex Loh
Skype UI Fail
"On Understanding Data Abstraction, Revisited" referenced
- Lambda the Ultimate
- Jonathan Aldrich's Classic Papers
- Éric Tanter's Object-Oriented Programming Languages: Application and Interpretation
- Kevlin Henney's It Is Possible to Do Object-Oriented Programming in Java
- Guy Steele on Why Object-Oriented Languages Need Tail Calls (Discussion on Lambda-the-Ultimate)
- Michael Bayne's samskivert
- Tommy McGuire's Mad science, abstract data types, and objects
- stackoverflow: How does one declare an abstract data container type in Haskell?
- stackoverflow: Data types compared to OOP objects
- Stuart Sierra on Objects Are Not Abstract Data Types
- Robert Simmons on What does focusing tell us about language design? (Discussion on Lambda-the-Ultimate)
- Yin Wang on ADTs and Objects
- Kurt Schelfthout FORTY SIX AND TWO
- stackexchange: FP and OO orthogonal?
- LShift Frank Shearar Conditional statements, the lambda calculus and early/late binding
- Object-Oriented Programming in ML
- On Not Understanding...
- David Albert Paper of the Week: On Understanding Data Abstraction, Revisited
- Examples from Section 3 in Standard ML by Robert J. Simmons
- Onward! Most Notable Paper Award 2019 for 2009
Emails with Bob Harper
Dell service call... slow, confused.. but gets the job done
is a log of your session. Please save the log for your records.
| 04:05:15 | Session Started with Agent |
| 04:05:22 | William: "Hi" |
| 04:05:23 | Agent: "Thank you for contacting Dell XPS Premium Support. My name is XXXX and my rep ID number is #####. How may I help you today?" |
| 04:05:43 | William: "I was just talking with tech support about my XPL laptop." |
| 04:05:56 | William: "They tried to connect me to hardware support, but the connection failed" |
| 04:06:09 | William: "we are having trouble communicating, so I thought I'd try chat" |
| 04:06:25 | Agent: "I appreciate the opportunity to assist you with this issue." |
| 04:06:31 | Agent: "Please allow me 2 to 3 minutes to pull up your account information. In the meantime, May I have an alternate contact number and the best time to reach you if we have to follow up on the case?" |
| 04:06:52 | William: "the phone number I gave on the login screen here is good. Do you have it?" |
| 04:07:10 | Agent: "Yes." |
| 04:08:55 | Agent: "I see that you are contacting us regarding your XPS L401X , which has windows 7 as the Operating System. Am I correct?" |
| 04:09:12 | William: "yes" |
| 04:09:44 | Agent: "Okay." |
| 04:09:57 | Agent: "May i know what exactly is the issue?" |
| 04:11:13 | William: "THe computer started being slow... VERY slow. opening a folder window took 5 minutes" |
| 04:11:27 | William: "then i reinstalled the operating system.. but it hung during installation and did not complete" |
| 04:11:39 | William: "I ran diagnostics and got a disk error" |
| 04:11:59 | William: "2000-0146" |
| 04:12:13 | William: "it cannot boot at all" |
| 04:12:52 | Agent: "Okay." |
| 04:12:52 | William: "another diagnostic gave DTS Self-test Read error with number 0F00-065D" |
| 04:13:04 | William: "i'm getting tired of repeating this problem over and over again to different people" |
| 04:14:25 | Agent: "I will make sure that this would be the last time you the explain the issue , i will resolve it my the end of the chat." |
| 04:15:04 | Agent: "If you got 146 error we need to run the extended test on hard drive." |
| 04:15:12 | Agent: "Are we chatting from the same computer?" |
| 04:15:27 | William: "no (its broken :-)" |
| 04:16:12 | William: "how do I run the test?" |
| 04:17:05 | Agent: "Turn on the computer and keep on tapping f12 key on the keyboard." |
| 04:17:33 | William: "ok" |
| 04:17:42 | Agent: "I understand that but we need a code in order to replace the hard drive without which it cannot be processed." |
| 04:17:52 | William: "its fine" |
| 04:18:20 | William: "i've done the f12 step.. have the "please select boot device" screen. Please go as quickly as you can" |
| 04:20:36 | Agent: "Sure." |
| 04:20:42 | Agent: "Select diagnostics." |
| 04:21:00 | William: "there is no option named "diagnostics"" |
| 04:21:17 | William: "it has "har drive" "Cd drive" "Network" "Enter PSA+" and "Enter Setup"" |
| 04:21:58 | William: "the last person asked for "diagnostics" too. It annoys me that you do not know the options in your own product" |
| 04:22:33 | Agent: "William by default it should have the option." |
| 04:22:50 | William: "well.. it doesn't" |
| 04:22:53 | William: "i haven't done anything to the computer" |
| 04:23:08 | William: "PSA+ is "pre-boot system assesement" test" |
| 04:23:28 | Agent: "But as the hard drive has issue it is not displaying it select Psa++" |
| 04:24:59 | William: "if you say so" |
| 04:26:04 | Agent: "So once you select that it will run the test and give you the error 146 and after that it will asks you to continue the test or nor select continue." |
| 04:26:07 | William: "it is doing tests now.." |
| 04:26:18 | William: "yes, that is right" |
| 04:26:50 | William: "i've been waiting foryou to tell me what to do then" |
| 04:28:01 | Agent: "select continue and it will continue the test and give you some options let me know what are they?" |
| 04:28:37 | William: "it is continuing with memory test... it wil take about 5 minutes i think. there is no way to skip that test and get to the advanced options... so we must wait" |
| 04:28:59 | Agent: "Yes." |
| 04:34:35 | William: "ok.. it is done" |
| 04:34:48 | William: "it says "do you want to run the remaining tests?"" |
| 04:34:55 | William: "it will take 30 minutes or more" |
| 04:35:08 | William: "but i think these tests are different from the on-disk diagnostis" |
| 04:35:09 | Agent: "Select no." |
| 04:35:14 | William: "ok" |
| 04:35:21 | Agent: "And the it will give you options." |
| 04:35:25 | William: "booting utility partition" |
| 04:35:41 | William: "options: test memory/ test system/ exit" |
| 04:36:55 | Agent: "Select test system." |
| 04:37:09 | William: "ok.. its going" |
| 04:37:56 | William: "express test/ extended test/ custom test/ symptom tree" |
| 04:38:18 | Agent: "Select custom ." |
| 04:39:41 | William: "ok" |
| 04:39:45 | William: "(can you go faster?)" |
| 04:40:18 | Agent: "Sorry we need to run the tests then only we can see the error." |
| 04:40:30 | Agent: "Have you select custom?" |
| 04:40:47 | William: "yes. I already said "ok"" |
| 04:40:59 | Agent: "OK." |
| 04:41:05 | William: "I just want you to respond more quickly. I am waiting a long time between each message" |
| 04:41:21 | Agent: "Oh i am sorry you felt so." |
| 04:41:24 | Agent: "Sure." |
| 04:41:56 | Agent: "Now it will start the test and this test will take around 30 min." |
| 04:42:15 | Agent: "So if you want i can stay or i will give you a call." |
| 04:42:15 | William: "which tests should I select in the custom area?" |
| 04:42:35 | Agent: "Hard drive." |
| 04:42:59 | William: "hmm.. you did not say that before" |
| 04:43:23 | William: "which tests?" |
| 04:43:42 | Agent: "Hard drive extended test." |
| 04:43:52 | William: "that's not an option" |
| 04:43:55 | William: "it has" |
| 04:43:58 | William: "confidence" |
| 04:44:04 | William: "device quick check" |
| 04:44:09 | William: "derive self-test (short)" |
| 04:44:13 | William: "drive self-test (long)" |
| 04:44:16 | William: "read test" |
| 04:44:18 | William: "seek test" |
| 04:44:22 | William: "SMART test" |
| 04:44:25 | William: "Verify test" |
| 04:44:42 | Agent: "Drive self test long is know as extended test." |
| 04:44:46 | Agent: "So please select it." |
| 04:44:57 | Agent: "Known*" |
| 04:45:07 | William: ""known as" doesn't help me, since you are not using the same words as I'm seeing." |
| 04:45:26 | William: "just that one? nothing else?" |
| 04:45:26 | Agent: "It will take 30 min to complete this test ." |
| 04:45:38 | Agent: "Only that one." |
| 04:45:49 | William: "ok.. its running" |
| 04:45:56 | Agent: "Perfect." |
| 04:46:03 | William: "estimted completion time 113 minutes" |
| 04:46:20 | William: "ahh.. it failed already" |
| 04:46:33 | William: "0F00-075D" |
| 04:46:39 | Agent: "Okay what is the error message?" |
| 04:46:44 | William: "that is the error code" |
| 04:47:00 | William: "Msg: DISK -DST Sefl-test Read error" |
| 04:47:13 | William: "continue testing?" |
| 04:47:26 | Agent: "Yes." |
| 04:48:31 | Agent: "Is it running?" |
| 04:48:40 | William: "oh.. it seems to have stopped the test" |
| 04:48:49 | William: ""continue testing" seems to mean "select another test to run"" |
| 04:49:06 | William: "there is an "X" on that test, since it failed" |
| 04:49:34 | Agent: "In this case we will replace the hard drive." |
| 04:49:56 | Agent: "Are you comfortable in replacing the hard drive?" |
| 04:50:38 | Agent: "This is not to rush you, please respond if we are connected." |
| 04:50:47 | William: "ye" |
| 04:50:47 | William: "yes" |
| 04:51:00 | Agent: "Okay." |
| 04:51:21 | William: "yes, i can probably replace it, if its not too difficult" |
| 04:51:27 | William: "i have done things like this before" |
| 04:51:30 | Agent: "So i will send you the hard drive which will reach your place within 2 to3 business days." |
| 04:51:30 | William: "on computers" |
| 04:51:40 | William: "ok" |
| 04:51:42 | Agent: "Okay that really great." |
| 04:53:50 | Agent: "Thank you." |
| 04:54:44 | Agent: "You will also get a call from dell to check if the issue is resolved or not after 3 days ." |
| 04:54:53 | Agent: "And would there be anything else that I may assist you with today?" |
| 04:55:51 | Agent: "It was pleasure assisting you ." |
| 04:56:48 | William: "thanks" |
| 04:57:12 | Agent: "You are welcome." |
If you require further assistance, please visit us at support.dell.com
Talk at MSR on Batches
Batches are a new approach to relational database access, remote procedure calls, and web services.
A Remote Batch statement combines remote and local execution: all the remote code is executed in a single round-trip to the server, where all data sent to the server and results from the batch are communicated in bulk. Batches support remote blocks, iteration and conditionals, and local handling of remote exceptions. Batches are efficient even for fine-grained interfaces, eliminating the need for hand-optimized server interfaces.
Batch services also provide a simple and powerful interface to relational databases, with support for arbitrary nested queries and bulk updates. One important property of the system is that a single batch statement always generates a constant number of SQL queries, no matter how many nested loops are used.
A few more messages about Ensō
In the short term, I think we need to focus on specialized executable specification languages.
Form-based code and Airport boulevard
The Irrationality of the American Home Buyer

(Thanks Google!)
Note that it has huge stand-alone houses that almost completely cover the available space. The alleys are a nice touch, but they aren't very efficient in terms of space. The houses are so close together that you could almost reach out one window and touch the other building.
Consider this analogous random chunk of suburban London. The houses are touching! But that leaves more room for a back yard.

Maybe its just me, but I would rather have my house touch my neighbor's house and have some open space. Having the houses touch actually gives more room for windows that you want to look out. The American style might have more windows, but there is less view.
I am not sure exactly who to blame... It could be the American architects, planners, and builders. It is partly their fault. But in the end they build what American buyers want to buy. And those buyers are not very rational, I fear.
Is there anything we can do?
How to Teach, Write, and Deploy a Partial Evaluator to a Million People in 24 Hours
Working in Scheme, Ludovic Courtès finished the code that evening. He then checked it in to the code base of the GNU Guile compiler. I suspect that it needs a little more engineering to make it completely robust, but there is nothing that can't be taken care of with a little care.
This is a very fun example of practical impact: lecture to deployment in less than 24 hours. Thanks to everyone who attended, and to Ludovic for his extra efforts!
Facebook Insecurity
I recently found out that Facebook is incredibly easy to hack. It allows you to access the reset password page without any email confirmation, and it also does not let you modify your security question. Facebook had better do something about this, especially given that Google+ is now going after them. Please go to this Facebook FAQ page and tell that that the answer is not helpful.
We want to make sure that your account and the information in it stays safe, so once you set up a security question on your account there’s no way to update it. Sorry for the inconvenience.Facebook FAQs