CS330
June 17, 2003
Thanks and Redhat Install
I’ve enjoyed the class this semester. Thanks for participating and asking lots of questions. That makes it more enjoyable for me. I hope you got something out of it. Please make sure you complete the online evaluation if you haven’t done so already.
I’m looking for someone to install Redhat Linux on 6 machines for me in the 462 lab. I’ll pay $100 for the job. If you’re an experienced Linux installer and would like to do this, let me know.
03:51 PM | Recommend This | Print This
June 11, 2003
Sonic ESB: Programmable integration
Traditionally, enterprises connected systems using point-to-point links and custom code. More recently, integration brokers—proprietary software for creating connections among multiple systems—emerged as another solution. However, point-to-point connections are expensive to maintain, and integration brokers have been expensive to buy.Ê
Sonic ESB is one of a new set of products billed as enterprise service buses (ESBs), lightweight integration brokers based on standards such as XML and SOAP designed to work in a distributed environment.
[Full story at InfoWorld…]
The pressure to integrate disparate systems across the enterprise is steadily increasing, but establishing connections between systems, even those designed for integration, remains a daunting task.
One of the things that really struck me while I was working on this story is that as these systems become increasingly flexible, configuration stops feeling like configuration and starts feeling like programming—in a really bad language. As I point out in the article, this isn’t really Sonic Software’s fault. Other tools suffer from the same fate. If any of them came out with a proprietary language at their core, they’d be criticized for not being “standards based.” Consequently, you end up writing your “program” in snippets of 2 or 3 languages and stitching it all together with a bunch of GUI-based configuration. Some people think things like XLANG and WSFL are the answer to this problem, but I think they’re syntactic arsenic. While I would welcome a standards-based work flow language, I don’t believe it has to have angle brackets.
What can make this all work in spite of the difficult configuration is an integration architecture. To make use of these tools, you need to understand the tool and its concepts, but you also need a well thought-out plan for what is being integrated and precisely how that’s going to work. You probably don’t have an integration architect sitting around, so you’re going to have to find the person in your organization who can take on this role and create the plan.
All this shouldn’t scare you away, however. I encourage people to dig in and start working with these tools. Begin a small pilot project to find out what you need to do to create the integration architecture. For an organization with disconnected legacy systems trying to move toward being a real-time enterprise, the rewards are sufficient to merit the struggle up the learning curve.
09:16 AM | Recommend This | Print This
June 10, 2003
Presentations
Remember that presentations are due tomorrow unless you’re the betting sort. You can email me your presentations by noon or bring it on a CD. There’s no need to run your Sieve code.
06:49 AM | Recommend This | Print This
June 02, 2003
Language Assignments
Here are your groups and language assignments. Note that I have moved a few people around to even things out. Dig into this and let me know quickly if you can’t find a workable implementation of your assigned language.
| Group | Group Members | Language |
|---|---|---|
| 1 | Max W. Alex R. |
Ruby |
| 2 | Brent A. David R. |
PERL |
| 3 | Kenneth B. Melissa A. |
Haskell |
| 4 | Kevin H. Megan F. |
Squeak |
| 5 | Dan O. Adam Manwaring |
ICON |
| 6 | Carl Y. Kats R. |
SML/CAML |
| 7 | Jarom N. Maria P. |
MDP or SR |
| 8 | Christopher H. Burdette P. |
XSLT |
| 9 | David H. |
Python |
| 10 | Rebol |
Come prepared next Wednesday to make your presentation. I’ll pick groups at random after we’ve taken all those who must go first.
04:44 PM | Recommend This | Print This
May 30, 2003
Midterm 2
Midterm 2 will be in the testing center on June 2nd and 3rd. You may not take it early or late. The exam will cover up through Lecture 24. The style will be much like Midterm 1. You are responsible for knowing when the Testing Center is open and making sure you leave yourself enough time to complete the exam. As with Midterm 1, the exam is open book and open notes. You will probably want a copy of the project write-up.
01:15 PM | Recommend This | Print This
Online Course Evaluations
You can complete the online course evaluation anytime between June 5 and the last reading day. You do so by signing onto Route Y and searching until you find the right link. :-) Course evaluations are an important form of feedback for faculty and I take them seriously. I’ve made many modifications to courses based on feedback from evaluations. I encourage you to participate.
11:14 AM | Recommend This | Print This
May 29, 2003
Final Project
A few items of note for the final project.
- You should be in the same group you were in for the first project. If that’s not possible, let Grant know as soon as possible.
- By tomorrow evening at midnight you should have emailed your languages preference to Grant. This is simply an ordered list of languages from the list in the report with three others that aren’t listed there. There are hundreds of programming languages, so just pick some.
- You’ll need to find a working implementation of the language you’re assigned. You may want to consider that before you order your list.
- You won’t be assigned anything that is familiar (like Java or C, so don’t bother putting them on your list.
- The write-up suggests you have a week to find and install an implementation of your language. You don’t have anything like that. You’ve got a few days at the most. Part of this assignment is the finding and installing. If you don’t think you can find an implementation of the language assigned to you, I’d better know very early (like Tuesday). Grant can help here as well.
- Here are a few other language choices: XSLT, SR, MDP, PIC, Euclid, Miranda, Lucid, Juno, Mathematica, Pizza, GJ, etc.
- If you’re going to use Powerpoint for your presentation, You’ll need to email it to me by noon the day of your presentation.
Relax and enjoy this. You’re not supposed to be comfortable with these languages. That’s the whole point. Just do a little research, pick some, and when you get your assignment, dive in.
10:39 PM | Recommend This | Print This
Language Design isn't Compiler Design
An article in Lambda, the Ultimate, points to a piece by Chris Brumme on memory models in CLR, Microsofts Cimmon Language Runtime. CLR is the virtual machine that C# and other Microsoft languages compile to. Chris says:
So what is a memory model?Ê It?s the abstraction that makes the reality of today?s exotic hardware comprehensible to software developers.
I can remember the days when CPUs weren’t so complicated. But what with n-way semetric multi-processing, multi-level caches, and whatnot, its gotten to the point where understanding the CPU design is a job for experts. CLR, JVM, and other VMs allow those experts to create a useful abstraction that the compiler writer to target. Compiler writers, of course, are another class of expert who write translators from the semantics that the language designer specifies to the semantics of the VM.
09:03 AM | Recommend This | Print This
May 21, 2003
Office Hours Today and Friday
I’ll likely be 15-20 minutes late for office hours today. Friday, I will have to miss office hours all together. If you were planning on coming in, please send me an email and we’ll find a way to get together.
08:11 AM | Recommend This | Print This
May 19, 2003
Declarative AWK
Zia responded to my my article on XSLT and declarative programming languages by pointing out that AWK has some declarative features. This is true. An AWK program is structured as a preamble, followed by a collection of rules, followed by a postamble. The rules use a regular expressions for the pattern and an imperative chunk of code for the action. Functions can be defined separately. AWK executes the preamble and then begins processing the lines of text in a file in turn. If a regexp matches, the imperative chunk of code is executed on the line of text that matched. Yet I suspect that for most programmers if didn’t feel declarative. Because AWK works on lines of text, it easy for most programmers to envision an implicit foreach-loop surrounding the rules and each rule as a case in a big case statement. Even so, I’d bet most AWK programs were written with a single rule.
Correction: Sean Nolan wrote to tell me the “were” in the last sentence should be “are.” I stand corrected. AWK is by no means dead.
04:21 PM | Recommend This | Print This
May 16, 2003
Due Date Changes
If you weren’t in lecture today, you’ll want to know about a few changes to the due dates for homework and the project:
- All homework for the rest of the semester will be due 24 hours after the time in the syllabus (i.e. midnight of the next day). This will allow you some time to think about what we talk about in class and to work with the TA in office hours.
- Part I of the project is due Tuesday, not Monday. Part II is due on Friday, not Wednesday. This doesn’t affect the due dates of anything else.
03:28 PM | Recommend This | Print This
XSLT and Programming Rules
Jon Udell’s latest column for Infoworld talks about rules engines. I’ve long thought that we underuse rules in solving programming problems. Later in the article, Jon makes the connection to XSLT. I was mentioning this very thing to my CS330 class just this week: XSLT is probably the first declarative programming language to go mainstream. Prolog and others were fun, but never caught on in the commercial environment. XSLT is a different matter.
Programming in XSLT is so different from traditional programming, that many people don’t even think of it as programming. They know its similar, but can’t quite get their minds around the idea of a programming language with implicit sequencing. In most popular programming language sequencing is explicit: you put in control statements to change the control flow and in their absence statement execution happens in order. In a declarative programming language, the sequencing is implicit and the order of rules in the program text is (usually) immaterial.
This makes XSLT a challenge for most of us. Switching programming paradigms isn’t an easy task. I watch students struggle to fall out of their imperative programming habits and start thinking of problems functionally. One of the things you have to do is learn new patterns. Even more important, and more difficult because it can’t learned from a book is creating a new mental model of evaluation. We all develop evaluation models in our heads for any programming language we learn and use these models when we program. As a result, becoming proficient in XSLT will only come about with substantial practice for most of us.
01:57 PM | Recommend This | Print This
May 15, 2003
Language Doesn't Matter: Its All About Design
Grady Booch has been around the programming language scene for a long time (I read some of his papers in grad school). He’s now Chief Scientist at Rational Software. Grady was interviewed in February issue of .NET Magazine. There’s a number of little gems in the article, but one jumped out at me because I’ve been contemplating it a lot lately. On page 2, Grady says:
I used to be a language bigot; I thought ADA was the way the world was intended to program. But we’re talking a couple of decades ago. It predated even VB I think. Alan Cooper had done his thing around that time. And at the time I really thought that the choice of language was one of the most important decisions you could make on the development team. But then I encountered this wonderful language called Smalltalk, and C with classes which because C++, and then all the scripting languages and eventually Java. As I go around the world working with lots of projects, the choice of language is important because it brings to the table lots of specific skills, lots of specific tools, lots of specific patterns and idioms for use. And there certain things I can do better in some languages than others.A little later he says:
In the presence of Web services the choice of languages becomes even less important. Because you’re going to use little snippets of scripts and lots of different languages on the Web user interface side, such as VB, maybe Java, lots of things. Again, it’s raising the level of abstraction. Languages now help us glue those little pieces together and therefore fit in the interstitial spaces of our systems.
This is a fact. I’ve been playing with a lot of tools for building and serving up Web services and they all make use of a variety of languages to get even simple tasks done. The programmer is forced to map designs not into one concrete syntax, but several—-all at once. At times, this cacophony of languages stands in the way of rational thought about the problem. To make matters worse, many of them are not even particularly well designed. As I’ve said before, most XML-based languages are syntactic arsenic. And if that weren’t bad enough, a lot of the programming required to make Web services work isn’t even programming with a language, its managing multiple configuration files.
The problem with all of this is fairly straightforward to understand: the nature of programming is building correct dynamic system behavior using static texts (i.e. programs). To do this, programmers have to build mental models of how execution will happen and envision that execution as they program. Mostly, they do this implicitly and, for most, its hard enough to do in one, well thought out language, let alone 5 or 6 bad ones. One last quote from Grady underlines this:
…we’re working in a domain where applications are intrinsically concurrent and distributed, and must be secure. That is not a simple domain in and of itself. Not to be disrespectful of the average code warrior, but building distributed concurrent secure apps isn’t a core competency of such people. They may make some good local decisions for those three issues; however, building a Web-based system that is extensible, scalable, and secure requires good global policies as well.
In such an environment, the role of the architect becomes even more important. Architects are supposed to be looking out for these global policies and designing the system so that the average code-warrior can make good local decisions producing a global end result that is functional and performs well. Even so, I think we could do a better job of creating languages to help manage these abstractions. Seems that no one even tries anymore. Just slap an XML syntax on a simple workflow semantics and claim you’re cutting edge because you’ve sprinkled angle bracket pixie dust on your incomplete scripting language.
08:56 AM | Recommend This | Print This
May 14, 2003
Computer Language Family Tree
This site has a chart that originally appeared in Wired magazine that attempts to show the linage of a number of computer languages. Its interesting to look at the “dead” languages and to see that the new language development (last two years) is mostly happening in the OO field. Of course, this chart isn’t comprehensive.
08:05 AM | Recommend This | Print This
May 13, 2003
Lecture 6 Discussion on Wiki
There was some extensive discussion on curried functions on the WiKi. Here’s a question for you: Can you write a function called curry that takes any two argument function and returns a function which is that function curried? Can you write uncurry for a two argument curried function? Would this work for variable arity functions?
03:21 PM | Recommend This | Print This
May 12, 2003
Equivalence Prediates in Scheme
Lecture 11 contains code which uses the equivalence predicate eqv?. For a discussion of eq?, eqv?, equal? see Section 6.1 of R5RS.
01:16 PM | Recommend This | Print This
Midterm 1 Coverage
For midterm 1, you will be responsible for the material up through Lecture 12 and Homework 12. Note that you will not have programmed using abstract syntax by Homework 12, but I will expect you to understand the concepts. You may find Homeworks 13 and 14 helpful as study aids.
The exam will be in the testing center this Thursday and Friday. There is no time limit. You have two days to take the exam. There will be no late exams given. Ensure that you are familiar with the hours of operation, policies, and so on of the testing center. Ignorance will not engender sympathy.
11:39 AM | Recommend This | Print This
May 08, 2003
Recursion Patterns
We talked about recursion in Concepts of Programming Languages and I mentioned that Lecture 8 should more properly be entitled “Recursion Design Patterns.” I think it would be interesting to write them up using the GoF templates. For reference, here are the patterns we discussed:
- Simple recursion following the BNF
- Mutual recursion following the BNF
- Recursion using auxiliary variables
- Recursion using an accumulator variable
- Recursion over two variables following the BNF
- Tail recursion (covered later)
These patterns provide a suite of tools for solving recursive problems. Remember to define constructors, selectors, and predicate functions to abstract any data type that isn’t a straight list. This will make your programs cleaner and also keep you from making dumb mistakes. One other hint that I’m not sure I mentioned enough is to always pay attention to your return type and check your conditional arms to ensure they’re all creating the right data type. This will help guide the recursion as well.
You should ensure that you’ve mastered each of these patterns and can identify when each should be applied. This will definitely be on the midterm.
06:32 PM | Recommend This | Print This
April 30, 2003
The Hundred Year Language
From Patrick Logan’s weblog, I found a pointer to an essay by Paul Graham called “The Hundred-Year Language.” I don’t know Paul well, but I have interacted with him on more than one occasion. A hundred-year language is one that people will still want to use in one-hundred years. Paul makes some very interesting points and, if you program, the essay is well worth the read—-right to the end. Here’s one quote I just can’t resist repeating:
I don’t predict the demise of object-oriented programming, by the way. Though I don’t think it has much to offer good programmers, except in certain specialized domains, it is irresistible to large organizations. Object-oriented programming offers a sustainable way to write spaghetti code. It lets you accrete programs as a series of patches. Large organizations always tend to develop software this way, and I expect this to be as true in a hundred years as it is today.
The phrase “accrete programs as a series of patches” is so deliciously visual that it makes me smile.
08:04 AM | Recommend This | Print This
April 29, 2003
Using Rendezvous with iChat and Hydra
I don’t know how many OS X users there are in the class. If there’s more than one, I’d encourage you to use Rendezvous to connect in class and make use of some tools to enhance your classroom experience.
- You can use iChat with Rendezvous to open up chat sessions with others in the class. I think this kind of back-channel communication can be helpful.
- Download and install Hydra, a Rendezvous enabled editor. You can use it to create a set of group notes. Once you use it, you’ll be hooked.


