"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Wednesday, July 27, 2005

Fundamentals of A Security Hole

I hope no one is surprised about the "Greasemonkey Crisis".

Most closed source and open source running applications, middleware, and basic services on the internet or anywhere else are based on a fundamentally flawed concept of security. Greasemonkey is no different; moreover Greasemonkey is especially dangerous sinces its raison de'tre is dynamic customization over the internet.

Things could be different without too much trouble, but the first step is to recognize the real problem and well-known solutions.

Jon followed up with some important questions and implications. And so I should qualify my claim of "without too much trouble".

That should read "without too much *technical* difficulty". The challenging problem I stated above is the that the core problem is so pervasive: in our current systems, but also in our current thinking. A mindshift is needed to recognize the technical problem, realize there are existing technical solutions that are already out of the lab, and that the problem can be tackled one web site and one client application at a time. Not ideal, but much more practical than the ideal.

Some existing solutions that have escaped the labs already: Jon mentioned the E programming language, which if nothing else demonstrates the problem can be addressed on the current Java Virtual Machine. The DARPA Browser illustrates how to use E in a large, real application. The Waterken web application server and the Waterken browser illustrate how to apply the same concept at the level of HTTP and URI's.

The Squeak programming language (Smalltalk) and the Oz programming language are both being extended with E-like capabilities. Objects, virtual machines, web servers are all related concepts (see Mark Baker's recent note and the referenced observation about Smalltalk and HTTP) and all happen to provide a good foundation for capability-based security.

I'll also toss into the mix that concurrency-oriented (pdf) languages like Erlang and Termite are amenable to the same solutions. Capability-based security is just around the corner from our current thinking and our current tools. Capability-based systems can be released onto the internet incrementally, and already have been. Objects, the web, and shared-nothing message passing are all fundamentally doing the same thing... referencing resources and passing around representations of resources that refer to other resources. Just squint a bit to see the similarities and read about capabilities to understand the security aspects of design.

Saturday, July 23, 2005

Shaping Systems with Seaside

Mark Watson writes...

if building web apps in Java, PHP, etc., is like carving something out of rock, Seaside is like using clay.

Wednesday, July 20, 2005

How to Design Large Erlang Systems

From the Erlang User's email list, the question "How do you design large Erlang programs?"

The answers and references from Erlang experts like Ulf Wiger and Joe Armstrong make interesting reading.

Another thread has mre useful design guidance, e.g. on composing state machines from Vance Shipley (and thus).

Tuesday, July 19, 2005

The Next Postscript

I can count the number of lines of Javascript I have written on, well, 20 hands. The core language makes sense to me, nevertheless: apparently Javascript sucks volumes (volume one and volume two).

My take on Javascript is that it could well be the next Postscript: over time, more of it will be generated than written by hand. Worse is better.

Monday, July 18, 2005

CalDAV

Mark Baker comments...

CalDAV is a red herring. We need calendar-specific operations in HTTP like we need a podcast-specific URI scheme.
This bothered me a fair bit too. Say I want to use WebDAV for authoring schematics of electronic circuits. The CalDAV precendent suggests I would begin a SchemDAV committee.

Makes little sense to me. On the other hand to make calendars or schematics more interoperable I think we should begin agreeing on what the HTTP verbs should mean relative to calendar or schematic resources.

Ideally we would agree what POST means when I send you an event description to your calendar. And that's probably the easiest one. We probably need to do other kinds of resources for and about calendars (and schematics) for searching, comparing, and calculating.

Given the recent ballyhoo of microformats vs. XML -- aren't we still dancing around the verbs? We need to agree on how to handle the verbs to get anywhere deep.

Termite: a Lisp for Distributed Computing

Update via email: Guillaume Germain expects to have a release of Termite in the next few weeks. End Update

Termite is a Lisp for distributed computing. (PDF paper and PDF presentation)

From the presentation...

In short: take Scheme, remove mutations, add isolated processes with mailboxes, add message sending and receiving operations and an addressing mechanism.
The bottom line is Termite is Erlang's distributed concurrency model ported to a dialect of Scheme that has been pared back to something like the sequential aspects of the Erlang language (chapters from Erlang book PDF).

Included in Termite are continuations that can support distributed process migration and macros. Continuations, macros, and closures allow Termite to be more amenable to discovering new abstractions than Erlang.

Termite is from the Gambit team at University of Montreal and runs on Gambit 4.

ATOM or WebDAV: The Rest of the Story?

I do not have a deep understanding of either ATOM or WebDAV but on the surface they seem to overlap in their publishing capabilities. ATOM's does not extend HTTP but WebDAV's does. On the other hand ATOM uses some less well-supported HTTP verbs anyway, so does this point matter?

The ATOM publishing protocol is generating a lot of enthusiasm, even saving us from the WS-xxx. So are these two protocols distinct? When would one be preferred over the other?

What about content-specific issues, like calendars. CalDAV extends WebDAV. Does ATOM have enough not to be extended like this? Should WebDAV be extended like this?

Friday, July 15, 2005

Concurrency Bragging Rights

Wes Moise writes about upcoming advances in concurrency in C# and Java. He sees C# as making the bigger leap into the state of the art.

It’s safe to say that Microsoft will be addressing this issue soon, and probably will be leading the way. As for Sun, Java 5 introduces some concurrency features such as AtomicInteger types, ReentrantLocks, lock-free data structures, but it’s not fundamentally different from concepts that originated in the 60s.

The smart minds at Microsoft Research have been focused on a new concurrency constructs in COmega based on join calculus.

On the other hand many years ago I was using Doug Lea's wonderful util.concurrent package. This has become "standard" now as java.util.concurrent.

The real problem is C# and Java are still languages from the middle of the pack of "the 60s" languages (e.g. Concurrent Pascal). Languages from the best of "the 60s" like Lisp and Smalltalk, have not had to change much and are able to move into new concurrency models with much less baggage.

I am not sure I would hold either C# or Java on a pedestal for the coming paradigm of concurrent programming. Eeek. Termites!

Middling Around the Real Problem

Update: See the comments.

The paper by Meijer and Drayton is making the rounds. As long as Microsoft supports the popular "dynamic" languages I don't care much what other languages they support.

Since the paper is a work in progress and they admit to being provocative, I may as well comment...

First of all I would note that the term "test" does not show up anywhere in the paper. This is a bit of a shock for a paper whose opening sentence is...

Advocates of static typing argue that the advantages of static typing include earlier detection of programming mistakes.
Moving on to a few unsubstantiated claims...
data intensive applications need to deal seamlessly with several degrees of typedness
I did not see a definition of "data intensive" nor did I see evidence of what this "need" is.
not inferring the types of these variables whenever possible is literally throwing the baby with the bath water
Everything has a cost/benefit ratio, which informs the answer to "whenever possible". I could not find a description of this ratio in spite of that being the topic of the paper.
in general programmers want to express more advanced contracts about their code
Yes, but the question is how, and at what cost. Testing, even model checking, could be brought into this discussion. The benefits of the specific proposals in the paper are not clearly proposed.
The compiler should verify as much of a contract... as it can
More of the same... "as much as possible", "as much as it can"... the problem is the paper should propose some eveluationc criteria otherwise it is your word against mine. I will go with my word every time in that case.
Perhaps the most useful example [of coercive typing] is "auto-boxing" from value types to reference types
If that's the best example then... ahem. One could simply choose a language that does not even have such things that contribute nothing to the real problem.
the compiler can automatically "lift" addition on normal integers to addition on nullable integers
One could simply choose a language that does not even have such things that contribute nothing to the real problem.
[generics make it] possible to create highly reusable languages, while maintaining the benefits of compile-time type checking
Those benefits have a cost. The point is people disagree on the accounting of the cost/benifit ratios. The paper does not propose an accounting that can be examined.
I want lazy evaluation... the power of the Unix shell lies in the fact that programs consume and produce lazy streams
Agreed. But this has nothing to do with type checking. Maybe this would make a better paper than one on type checking for many readers.

Overall the paper has some ideas on how typical type checkers for C# and Java can be improved. That these checking approaches would be better than "dynamic" languages seems to be an assumption the authors chose not to question. Too bad, I thought that was the point. I don't see many people arguing to stick with the poor checking done currently by C# and Java.

T Revival

I am not sure how much this matters today, but the T Project from Yale is being revived. T is a dialect of Scheme whose optimizing compiler was a fascinating piece of work 10 years ago and influenced subsequent work on compilation via continuations.

Jonathan Rees has more interesting T background from the insider's view.

T ran on Apollo workstations among other systems. I used them at Mentor Graphics until Gambit Scheme came along.

Emacs: The Extensible, Customizable Display Editor

I had used Emacs for a couple of years or so when I came across this paper in a book on programming environments. This inspired a lot of my subsequent software design in several domains far from text editing.

Another Radically Tailorable Resource

Avi adopted the phrase "radically tailorable". Great. I like that phrase quite a bit.

Here's another reference that has influenced my thinking long before this post. This should also be in the Lieberary, but some links seem broken.

This paper presents a kit called EZWin, which provides many services common to implementing a wide variety of interfaces, described as generalized editors for sets of graphical objects. An individual application is programmed simply by creating objects to represent the interface itself, each kind of graphical object, and each command. A unique interaction style is established which is insensitive to whether commands are chosen before or after their arguments.

The system anticipates the types of arguments needed by commands, preventing selection mistakes which are a common source of frustrating errors. Displayed objects are made "mouse-sensitive" only if selection of the object is appropriate in the current context. The implementation of a graphical interface for a computer network simulation is described to illustrate how EZWin works.

Friday, June 24, 2005

Longhorn and RSS???

This violates all sense of design. Is this their latest attempt to make a "new OS" compelling? What would a sensible developer think about "putting RSS into Linux"? What could that possibly mean that was advantageous to *anyone*???

Friday, June 03, 2005

Programming RSS and Atom

Here is at least one more blog reference to Danny Ayer's book. (re: This first reference.)

I just got it recently and so far so good. A variety of topics and apparently useful core information.

Another good book seems to be Developing Feeds with RSS and Atom, by Ben Hammersley. That one seems to stay more to the core though I've barely cracked either of them.

At least two more with similarly sounding titles are on their way.

Thursday, June 02, 2005

"In XML format" ==> Still not enough information

Update: Brian Jones has a blog with more information. Not a whole lot more yet, but more. For example the default stroage will be zipped XML. The XML will be "fully documented". A royalty-free license is mentioned with no hints as to what it provides. However on their press site comes this encourage news...

PressPass: Won't this make it easier for your competitors to copy Microsoft Office?

Sinofsky: Certainly this will make it easier for other developers to use our formats to build solutions that don't require Office. However, the ability of other technology providers to use the new file format to integrate their solutions with the Microsoft Office System is an important and frequently requested capability by the industry. We feel it's to everyone's advantage to respond. Customers also know that the true value of a desktop application is not the format in which data is stored but the full breadth of capabilities offered by that application, along with the quality and security of the user experience that it provides.

So now I mainly wonder a few things...
  • Hopefully "fully documented" means what you would hope it means.
  • Hopefully "other technology providers to use the new file format to integrate" means what you hope it would mean.
  • Hopefully, since they apparently will not support Open Document format, "integration" is as easy as you would hope it would be.
Hopefully. End Update

What does it mean these days to anyone knowledgeable enough to care to say that you store your data "in XML format" without saying anything meaningful about what that format actually is.

My interpretation of this contentless "news" about content is that it serves as FUD given the recent ballyhoo about OASIS and the Open Document format. I have seen no other meaningful information to suggest an alternative explanation.

Unwittingly the typical customer says, "Why switch to another office suite when Microsoft is also publishing 'in XML format'".

Eek

A tag line found on Danny Ayers blog...

Tags: hReview, microformats, microformat, rdf

Is there something concerning about this?

Not Scheming

Mark Baker suggests about web description languages...

I generally think it's a bad idea to describe the data produced using a schema since schemas generally (DaveO's excellent extensibility advice notwithstanding) change foreseeably over time, and I don't want a change in the schema produced by a service breaking clients if I can help it. Instead, I'm more a fan of simply using a media type as a name for an open-ended sequence of backwards-compatible schemas (think "text/html" vs. HTML 2.0, 3.2, 4.01, etc..), as well as, of course, associating an extensible processing model to that media type to accomodate as many unanticipated extensions as possible over time.

These monkeys...

...wannabe something else.

But they're not.

Dance, monkeys, dance.

Tuesday, May 31, 2005

Good Point

Chris Sells makes a, er, "point"...

The thing that I really need that I'm missing is for my computer, and everyone's computer that I'm conferencing with, to have a stylus attached to their screen. The "let's just sketch something on the white board" is really the last remote collaboration frontier 'til we get some kind of fancy "virtual presence" stuff going.

I don't mean that every computer needs to be a Tablet PC. Frankly, I'm not very productive on a computer that doesn't have a keyboard. But, I want to be able to sketch something right on my computer screen like a tablet can and instantly share it as I do so. Plus, and here's the rub, I want everyone else to have a stylus, too. If they don't, they'll turn to the white board and I'm out of luck across the great divide.

Good point. A freehand drawing and handwriting surface should "just be" part of the standard desktop.

In the Loops

Martin Fowler looks for a rigoruous definition of "agile" software development practices, and measurements of which practices may be more effective than others.

...agile methods fundamentally expect teams to decide what process to follow and furthermore expect teams to actively and regularly change their process. Any attempt to define a rigorous process that can be tested for conformance runs contrary to this philosophy...

How can you do a survey on whether agile methods are more effective that alternatives, or whether Extreme Programming is more effective than Scrum, when you can't get a clear definition of what Scrum is in the first place? If a client wants a system built using Extreme Programming how can they tell if it's really being done?

The first part of the quote above *is* the definition of agile in my experience: if the team decides what to follow and actively improves their performance then they are "being agile". The second part of the quote becomes less interesting in this case.

Comparing textbook definitions to each other is less interesting than comparing an agile team to its own history. If the team is improving then that's the goal.

A useful excercise for a team when considering their own agility is for them to explicitly describe their feedback loops (plural), who should be in their loops for which information, and how are decisions (and their timing) made in each of these loops.

(Hint: many problems in an organization of any size occur, and are therefore obscured, outside the boundaries or on the border of the "team" per se.)

Using this approach Scrum, XP, and other approaches become possible sources of improvement and less a necessarily well-defined instruction manual that can be graded independent of actual performance.

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.