Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Fri, 31 Jan 2003
.NET and the CLR
I find myself thinking more and more about doing some work in the CLR environment. Notice that I said CLR, not necessarily .NET. Near the end of my grad school days in the early 90's, some friends of mine asked me to sit in on a programming languages seminar that they were running. We talked about Oak/Java, Dylan, and a bunch of other languages. A that time I was not particularly impressed with Java as a language. Compared to the Lisp family of languages, Java was just barely catching up. Now that Java is a success, some folks would like you to believe that Java invented dynamic languages, and that the only thing left to do is expand the libraries until they bloat up and consume the world -- which they're well on they way to doing.

I have a slightly different perspective. The adotption of managed environments (the combination of JIT VM's and automatic memory management) is a long overdue development in the evolution of software development, but we haven't arrived. There is a lot of room for improvement in the languages that we are using to today. The JVM and the ecosystem around it are focused on Java. Yes, there are implementations of lots of other languages on the JVM. Yes, some of them talk to Java. But for non-technical reasons, the JVM is going to be focused on Java, and for reasons of compatibility Sun is going to continue to evolve the JVM very slowly.

I'm interested in a managed environment that can still evolve and grow. Microsoft is claiming that this is what they want. I'm not sure that I believe that they will continue to evolve it. But it doesn't matter. Mono provides a managed environment that can evolve. It has compatibility with the current ECMA CLR and will continue to. Compatibility to the MS CLR is nice, but Miguel says that they have Mono running on Windows as well. So here we have an open source, potentially evolvable managed environment. If the Mono guys can get just the ECMA specified portions of the CLR running well, I think that this is very interesting. I'm interested in seeing continued innovation at the runtime level, and that's not really happening with the JVM. What is happening is improvements in the quality of implementation. I'd like to see the Mono ECMA CLR, with a switch that can be flipped to go into Microsoft compatible mode, however compatible that turns out to be, for whoever cares to be compatible. But I'm just as happy to see an open source CLR based runtime evolve starting from what is Mono today, and if it forks from the Microsoft one (due either to Microsoft changing theirs or the open source one changing), I'm not bothered by that.

So, am I a heretic yet?

Then we go on to build managed libraries that provide Windowing API's, etc. Then Haskell.CLR can actually talk to the rest of the computer, and we get to a place where everytime we want to innovate in the language space, we don't have to throw away the ability to do useful stuff. That's been the single biggest problem with adoption of "advanced languages" is that they can't talk to the rest of the computer, and they can't leverage any existing library code. I think that a scheme such as the one I'm proposing might actually work.

People will suggest that open sourcing the JVM would solve the problem just as well. Possibly, but I've given up hope that Sun will decide to open-source Java and the JVM. Even if they do, they'll encumber it with something like the JCP. Unfortunately, in my opinion, the JCP is not in the innovation business. It is in the keep things under control business. If you look at the number of Jakarta projects that are used in all kinds of software projects, you realize that things don't have to be standardized by the JCP in order for them to be adopted broadly. I want to see something that can grow and evolve and where the best code can win.

Maybe I really am a heretic.

[22:27] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Prototyping / refactoring
I've noticed something since I've started using Eclipse -- I tend to refactor my code a lot as I understand it. Eclipse's refactoring tools take out a fair amount of the pain associated with using a language like Java for prototyping.

As I've started to play with Python, I find myself reliving some of my Lisp experience at MIT. I find the Python code to be very succint and easy to read -- I find that I don't mind the use of space / indentation as syntax. Since I indented my lisp code all over, so I find that I am not noticing this at all. The notation that python provides for lists and maps is one of the things that is making me very productive. The combination of list comprehensions and slice notation is very powerful and makes programs shorter. These two notions are things that Java could benefit from, but there's almost no chance that we'll see them, because Sun is so committed to not evolving Java the language. If Java had macros, we could implement some of this stuff nicely.

One thing I haven't yet gotten used to is the Python object system, which requires each method to have an explicit self parameter. Having used Lisp generic functions, this should be no big deal for me, but having worked mostly in in C++ and Java for the last 7 or 8 years has kind of braindamaged me. It'll probably take a little time to shake that out. Interestingly enough, David Mertz has implemented multimethod dispatch for Python. I haven't played with this, but it does provide another proof point for the saying that all languages are destined to reinvent Lisp badly.

Anyway, back to Eclipse and prototyping. I think that if the refactoring tools are taken far enough, and Java had a kind of macro language, I would be pretty happy. I'm back to using Emacs to edit python, which is fine. The only things I miss are integrated help / code completion and refactoring tools. Oh, and a reasonable interface to the debugger.

[22:27] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Thoughts from the Bloggers dinner
I'm writing this on an airplane without connectivity. Try that with movable type...

Crossroad rocks for an event like this. It has a food court, a big open space and public access 802.11. The only thing I could think of that was missing was a bunch of power strips.

I love how you can find an unexpected blessing at an event like this. A bunch of us were sitting around talking XML geek talk. Don Box and Miguel de Icaza were talking about RelaxNG / XML Schema. Miguel was doing the standard "RelaxNG is so much simpler" bit. Don pointed out that James Clark has a tool, trang, that will convert RelaxNG schemas into W3C XML Schema. He went on to point out that if all you wanted RelaxNG for was a simple syntax, then why not just write RelaxNG and then use those tools to convert them to Schema. At that point, the lights went on for me. At the last ApacheCon, Andy Clark and I talked about how much work it would be to adapt Jing to use the Xerces XNI instead of SAX, with the goal of being able to plug the adapted Jing into Xerces so that Xerces would have support for RelaxNG. We thought that this would be a way to help more people use RelaxNG. I actually had started to do this a few weeks ago, before working for food took priority. After Don's comments, I decide that using James Clark's trang solves the problem that I wanted to solve, without importing another large code base into Xerces. RelaxNG advocates will go on to tell about the schemas that RelaxNG can express that Schema can't, but I don't care about those cases. Saved me a few weeks work that can go towards other efforts. That alone made it worth the trip.

Miguel was giving demos of the latest Mono drops, including a Mono base photo browser. He also showed a compiler bootstrap -- something only a geek could love. I noticed that many of the Microsoft folks were paying very close attention to what Miguel was showing and seemed very impressed and complimentary towards it. Joshua Allen has already commented to this effect. I have a few more thoughts on Mono/.Net/CLR that I'll save for another post.

Sam and I talked about blosxom hacking, python and pybloxsom hacking. I think it would be awesome if Sam decided to switch to using pyblosxom. The other thing that we talked about was doing a version of the Weblog/Metaweblog APIs using SOAP instead of XML-RPC. There's a technical reason for doing this, which is that there's no way to multiply categorize an entry using an XML-RPC based API. As I've posted before, I think that this is an important feature for blogging software to have. This would also be a wonderful API to use to consolidate comments and the various kinds of *Backs s that have been proposed.

Two other notorious bloggers that I met were Dare Obasanjo and Josh Allen from the XML core technology team at Microsoft. I was especially pleased to hear Dare say, many of the people using XML would be just as happy with s-expressions, something that I've been saying for a while now. I know, we ex-lisp hacker whine alot.

[22:19] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Thu, 30 Jan 2003
Gone fishing, er, working
I wanted to post some impressions from the dinner, but I'm on the road with a client, and I don't think I'll get much time for the next few days.
[00:44] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Tue, 28 Jan 2003
The bloggers dinner is underway.
Here are some shots from the Puget Sound bloggers dinner, now underway.
Sam's here


Sam and Miguel

This is the proof I was there
[19:54] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Mon, 27 Jan 2003
Jardeps live
I've updated jardeps so that it actually does some work. I've updated the Jardeps code so that it can actually fetch jars that it needs but which don't reside on the system. These jars are placed in a cache directory and then you can compute a classpath for all the jars that you need relative to the cache. At this point, I think that the dependency tracing stuff works.

The next steps will be to figure out what to do about retrieving jars from a "central" repository, and also to decide how to handle jar versions. Depending on how fancy we want to be about deciding whether one jar version is as good as another. My thinking on this is to do something simple that can be deployed, and then make it smarter about version numbers as we go. Not being smart about version numbers means that we'll have multiple copies of jars in the jar cache.

Feedback, ideas, and bugfixes welcome.

[01:35] | [computers/programming/java] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Fri, 24 Jan 2003
The Perl guys have it together
When I see things like this article telling how to move data from an Amazon wishlist to allconsuming.net, it just makes my teeth fall out. I never would have guessed that there's a library in CPAN that knows how to yank items out of the Amazon wishlist, but there you go. I am totally impressed by this, even though I try to avoid programming in line-noise, I mean, Perl, if at all possible. Where is the Java or Python equivalent of this stuff? I mean, really, this is 2003 after all....

P.S. Articles like this one are why I was hesitant about the blosxom family of blog software. Which category does this article go in? Python, Java, Perl? It could be in all of them, but its going to end up in general programming instead.

[23:49] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Wed, 22 Jan 2003
SeaJUG 1/21/2003
Last night I went to the monthly Seattle Java User's Group (SeaJUG). Our two speakers this month were Steve Loughran, author (along with Erik Hatcher) of Java Development with Ant and Rebecca Wirfs-Brock.

Steve is one of the Axis developers, and his talk was about web services interoperability -- actually he later confessed that he was trying to scare us about all the corner cases that create interop problems, but that basic stuff works. Some problem areas were things like Java's lack of unsigned types, which make it hard to interop with web services or clients written in languages that have unsigned types (C/C++/C#), people's expectation that they can send Java collection classes, or java.io.File's.

One of the more interesting comments that he made was that the DOC/LIT style of using SOAP is the future. I've been hearing this statement made more and more. This has been my thinking for some time now, so it's good to heat that other people think that this is true.

As an aside, does anyone out there in blogland have a recommendation for a good web services stack written in Python?

I was pretty interested to hear what Rebecca Wirfs-Brock had to say. Designing Object-Oriented Software was one of the first O-0 books that I read as a grad student back in the late 80's, and I've always appreciated the CRC method as a lightweight yet effective mechanism for design. Rebecca has a new book out, which looks like it elaborates on these topics. It's hard to say, because she didn't talk about the book directly. Instead, she talked about "Skills for Agile Designers" . Part of her talk was about Agile methods -- she's not in the fundamentalist Agile camp. The next section her talk covered "Tools for Seeing" -- ways of looking at a system to bring the key design criteria into focus. She talked about stereotypes of object roles as a way to bring out the issues that will need to be dealt with. This is intended to be a generative sort of approach -- if an object is acting as a coordinator, then the design is likely to solve the following problems, etc. She also mentioned how this perspective helped to appreciate Peter Coad's use of color in UML diagrams. Someone in the group pointed out Streamlined Object Modeling as a good resource for this kind of philosphy. Another interesting topic was the use of JavaDocs as a way to yank stuff back up and map it back to CRC cards (if you were using them). The idea is to have a custom doclet that pulls just the descriptions for class and method comments and renders them all into a big page(s). This can then be used to try to trace stuff back to the CRC cards to make sure everything was covered and nothing was gold plated. The final section was called "Tools for Shaping Solutions", and included a discussion of Problem Frames by Michael Jackson.

I really enjoyed her talk but found it to be more focused on object design/modelling and less about finding balance in the application of Agile methods. Wilhelm pointed out that her audience is probably normally people for whom object modelling = RUP, and so in comparison a lot of the techniques that she covered were Agile in comparison. Since this was a 3 hour talk compressed into 1 hour, there were probably lots of things that got left out. All in all an evening of quality presentations, and of course, some good beer and conversation afterwards.

[17:52] | [computers/programming/java] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Tue, 21 Jan 2003
Jardeps is starting to roll...
Markus has made some small changes to my jardeps prototype. Next steps include actually getting the jars and putting them in a directory and then composing a classpath or such.
[12:45] | [computers/programming/java] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Mon, 20 Jan 2003
Pyblosxom - indices and improved referers
Today I added flavor based indices (as Wari points out, no big work). I also committed a version of the referrers plugin that uses the new plugin API.
[23:41] | [computers/internet/weblogs/pyblosxom] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Fri, 17 Jan 2003
The Smack
So far I'm finding blogging to be quite fun. Today, I got an IM from Bill Lynch at Jive Software. I did some work on Jive back in 2000 when there was only an open source version. It's nice to hook up with old friends.

Turns out that Jive is releasing a commercial Jabber server, and as part of that effort, they've developed an open source Jabber client library in Java called Smack. The only other Java Jabber library that I know of is JabberBeans, which wasn't being maintained much when I looked at it last. If you're interested in Jabber, check it out -- I know I will.

I got to hook up with Bill again, and I got some nice Smack out of it.

[14:07] | [computers/programming/java] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Thu, 16 Jan 2003
I couldn't resist...
I hacked a proof-of-concept to compute jar dependencies based on attributes in jar file manifests. I'm not tackling the hard problems like versioning, or setting up a distributed, mirrored, repository. I figure this is a good starting point that could get refactored into a real solution. Or not.
It works like this. When jar files are created, place three new attrbutes in the manifest:

jar-id: a string representing a unique id for this jar
jar-version: a string representing the version identifier for this jar
jar-dependencies: a comma separated list of jar-id#jar-version tuples which
                 specifies the jars that this jar directly depends on
                

If all jars embedded this information, then we just compute the set of dependencies needed by the application (root) jar, get those that we don't have, compute their dependencies, and repeat until we have all the jars.

[15:26] | [computers/programming/java] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
What to do about the classpath problem?
The classpath problem is getting written about a lot today: James Strachan points out Classworlds, the underpinning for Uberjar. He also relates uberjar to static linking. I would like to see a "dynamic linking" solution, where we don't have to create uberjars, and we don't need a centralized description of the jars that we need.

Ted Neward wants a new JSR that will deal with the issues of versioning and Jar-to-Jar dependencies.

Markus Kohlher thinks (and I agree with him) that we should specify the dependencies (and versions) within the jar files. He points out that the jar file spec already defines a Class-Path attribute.

A number of solutions to this problem have been proposed, but none has really come to fruition. At the ASF, we've had jjar, cjan, and now Maven. There's also a cjan project at Sourceforge. There might be even more than this.

This is a problem that needs to get solved -- a number of people are taking cracks at it. I wonder -- is there a way to get this happening faster? I know Ted Neward is interested in a JSR and Markus is working on code. I've looked at the jjar code a while ago and talked with some Maven folk about this problem at ApacheCon.

[10:25] | [computers/programming/java] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Open Source and Security
There a nice CNET editorial by Whitfield Diffie, on the role of open source software and computer security. Key statements:
As for the notion that open source's usefulness to opponents outweighs the advantages to users, that argument flies in the face of one of the most important principles in security: A secret that cannot be readily changed should be regarded as a vulnerability.
It isn't that secrets are never needed in security. It's that they are never desirable.
It's simply unrealistic to depend on secrecy for security in computer software.
The secret to strong security: less reliance on secrets.
Go read the whole thing.
[09:50] | [computers/open_source] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Already causing trouble
Sam says that my RSS feed is breaking Radio's aggregator because of my use of category domains. I did run the RSS files through the RSS validator before I turned on the blog. Glad to see that Dave Winer is going to fix Radio.

Sam -- feel free to give me an e-mail smack whenever you like if anything else like this happens.

If anyone else is having problems with the domains, please e-mail me and I'll turn them off until your aggregator can deal.

[09:42] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Wed, 15 Jan 2003
Hooked up with Wari
I was finally able to hook up with Wari Wahab, the author of pyblosxom. We're going to put my stuff into CVS. As soon as cvs.sourceforge.net comes back. In the meantime, I've implemented a url blacklist feature for my referer plugin. Look for it when CVS comes back.
[23:10] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Classpaths - a neverending source of pain.
The Java classpath mechanism is probably the number one source of wasted time. Just look in any java related mailing list and you'll find piles of messages related to hosed classpaths. Why isn't there a JSR to replace the classpath mechanism?

Today Bill de hÓra wrote about fixing the classpath mechanism by allowing it to read from an XML file. The problem with this solution is that people keep their jars all over the place, so you've just moved the problem around. Even then, you have the problem of getting the various version dependencies right.

One of the comments references Uberjar. I can see the appeal of this approach, because you ought to be guaranteed that you get all the right versions. I'd prefer to see something that didn't copy jars all over creation, even if disks are cheap now.

[17:57] | [computers/programming/java] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
False alarm.
Okay, I decided to do this on a different machine, so things should be stable around here. I've got a comment system limping along, but I don't like how it integrates with pyblosxom, so I'm going to (of course) re-write it. There's a lot changing in pyblosxom right now, so I'm going to catch up with the changes and then go from there (assuming that I can get to cvs.sourceforge.net, which has been unreachable for almost a day)
[17:27] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Danger
I'm going to be adding comment support today. Watch your head...
[12:39] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Tue, 14 Jan 2003
It always happens this way.
Of course, *after* I spent a few hours rebuilding my Eclipse workspace due to problems with the .metadata diretory, I discover this article describing how to rebuild .metadata without rebuilding the whole workspace.
[23:14] | [computers/programming/java/eclipse] | # | TB | F | G | 0 Comments | Other blogs commenting on this post


twl JPG

About

Ted Leung FOAF Explorer

I work at the Open Source Applications Foundation (OSAF).
The opinions expressed here are entirely my own, not those of my employer.

Creative Commons License
This work is licensed under a Creative Commons License.

Now available!
Professional XML Development with Apache Tools : Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Technorati Profile
PGP Key Fingerprint
My del.icio.us Bookmarks
My Flickr Photos


Syndicate
RSS 2.0 xml GIF
Comments (RSS 2.0) xml GIF
Atom 0.3 feed
Feedburner'ed RSS feed

January 2003 >
SuMoTuWeThFrSa
    1 2 3 4
5 6 7 8 91011
12131415161718
19202122232425
262728293031 

Archives
2006
2005
2004
2003

Articles
Macintosh Tips and Tricks

Search
Lucene
Blogs nearby
geourl PNG

Categories
/ (1567)
  books/ (33)
  computers/ (62)
    hardware/ (15)
    internet/ (58)
      mail/ (11)
      microcontent/ (58)
      weblogs/ (174)
        pyblosxom/ (36)
      www/ (25)
    open_source/ (145)
      asf/ (53)
      osaf/ (32)
        chandler/ (35)
        cosmo/ (1)
    operating_systems/ (16)
      linux/ (9)
        debian/ (15)
        ubuntu/ (2)
      macosx/ (101)
        tips/ (25)
      windows_xp/ (4)
    programming/ (156)
      clr/ (1)
      dotnet/ (13)
      java/ (71)
        eclipse/ (22)
      lisp/ (34)
      python/ (86)
      smalltalk/ (4)
      xml/ (18)
    research/ (1)
    security/ (4)
    wireless/ (1)
  culture/ (10)
    film/ (8)
    music/ (6)
  education/ (13)
  family/ (17)
  gadgets/ (24)
  misc/ (47)
  people/ (18)
  photography/ (25)
    pictures/ (12)
  places/ (3)
    us/ (0)
      wa/ (2)
        bainbridge_island/ (17)
        seattle/ (13)
  skating/ (6)
  society/ (20)



[Valid RSS]

del.icio.us linkblog

www.flickr.com

Blogroll

java.blogs
Listed on BlogShares

Locations of visitors to this page
Where are visitors to this page?


pyblosxom GIF