Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Sun, 31 Aug 2003
Checked exceptions vs Unchecked Exceptions + Tests
Bill de Hora is contributing his thoughts to the checked exception debate. His post has some good points

As I was thinking about this some more, checked exceptions start looking like explicit typing. The reason people want checked exceptions is to make sure that no error conditions go unprocessed. Same thing that explicit typing people want. But let's apply the testing argument. If your testcases actually tested the relevant error conditions, then you wouldn't need to have a language mechanism to ensure that the errors got handled. At least, you could make all exceptions unchecked, and eliminate the multi-arm catch hairballs that are lying around. It's not like all those catch blocks that are empty, printing stacktraces, or logging exceptions are really improving the robustness of the systems that they are in.

[01:10] | [computers/programming] | # | TB | F | G | 5 Comments | Other blogs commenting on this post
Technology Review has an article on Roofnet, an MIT effort to build/deploy a mesh network using off the shelf 802.11b hardware. There's no substitute for trying to build something and seeing what happens. Theoretical models and simulations are nice, but experimental evidence at the correct scale gets my attention every time.
[01:00] | [computers/internet] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Comments as metadata
Oliver Steele has a long post categorizing the various uses of comments. Along the way, he stratifies macro systems into structural macros and definition-level macros, and relates those to explict programming.

He concludes with a section about comments intended for comment processors like doctest, iContract, and XDoclet.

All of these functions of comments as metadata could be implemented by extending the language instead. (Contracts are from Eiffel, for example, which supports them in its core syntax.) However, the use of structured comments as metadata lets a third-party tool address a gap in the language in a way that leaves the source structure intact for compilers and other source processors (such as editors, source debuggers, and refactoring tools) that wouldn't recognize an extended grammar. Just as comments are an escape hatch for human readers, they're an escape hatch for development tools as well.

And these two kinds of comments - natural language and structured metadata - are related. They both add information that can't be expressed in the primary programming language. And they're both useful to humans too.

[00:50] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Who's it?
Marc Canter thinks that I like Jon Udell's tagging conventions. That's a little premature. I'd like to see them so I can decide whether I like the idea or not. Mark Pilgrim is cleverly using HTML tags to get some smart behavior out of his weblog. We know that the RDF folks want to tag all sorts of stuff. So the question is, what is Jon doing? It sounds like neither.

Marc is asking about standards. As far as I know, we don't really have much experience with this kind of metadata in real world, real scale applications. Seems early for standardization. Of course, that never stopped the W3C or the JCP.

[00:42] | [computers/internet/microcontent] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Sat, 30 Aug 2003
Tagging conventions for microcontent
Jon Udell has put up his structured blog search which allows you to write XPaths over an XML representation of his blog and get some useful information out of it. In the accompanying blog post he makes the plea for well formedness, since that makes things easier. No argument from me. What I'm more interested in is a description of his tagging conventions.
[01:25] | [computers/internet/microcontent] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Dynamic language omnibus
  • Chris Double has a series of entries covering continuation based web frameworks, continuation based web servers, and SISC.
  • Bill Clementson moved his blog and picked up an RSS feed. He also picked up some continuation based web server papers that Chris missed.
  • James Strachan and Bob Werken over at codehaus are building a java friendly dynamic language. The goal is to integrate well with Java and be familiar to Java programmers. I'd guess it would be C# friendly as well, which means that if the MS guys keep their promises to improve the CLR for dynamic languages, Groovy will end up being better on CLR than on the JVM. I didn't see any references to continuations. There's a reference to Bachrach's JSE.
  • Alex Martelli weighs in in the Ruby vs Python discussion.
  • Michele Simionato and Jimmy Retzlaf report on their experiences with Psyco, the Python partial evaluator.
[01:15] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Categorical indirection
Don Park's post on how to link blogs and wikis is actually an instance of the following. Take a category, or view (if you prefer database terminology) and send it off to somewhere else. This is cool, and another reason why multiple categorization would be useful. Each category can do its own rendering, transmission, etc.
[00:53] | [computers/internet/microcontent] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Rating conferences
I read Werner Vogel's post on valuing conferences and started thinking...

Why not build a web application that lets you do this both before and after conferences? That way you could see if expectations and reality met up. By allowing many people to do this, you might be able to come up with a way of recommending conferences to people. If conference organizers were willing to cough up some of their evaluation data, you could use that as input as well. Maybe something like this would work as a sub-application of a site like tribe.net.

[00:47] | [misc] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Fri, 29 Aug 2003
Guiding the near future and rechecking the past
Names matter. What you name something can determine how it's accepted. That's why Brian Marick's article about technology-facing examples was enlightening to me. Here are some renamings that I found while reading his post:

test-driven development => example-driven development
unit test => technology facing examples
programmer support tests => checked examples
retained checked examples => change detectors

I think that this could use some more work to make these ideas even clearer to the non-infected. The other observation that he made was that there are two roles for examples. Some examples are written to guide near term development -- what functionality needs to be implemented next, and what do examples of its use look like? Other examples are used exclusively for rechecking that the past behavior of some code remains unchanged. Some guiding examples eventually become rechecking examples, but not all rechecking examples were originally guiding examples.

[01:05] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Dave Thomas explained the use of CodePaste:
CodePaste is a RubLog blog that allows anyone to add a page containing source code via a special link. This code is then syntax highlighted and displayed on the blog.
This is an interesting idea, and a neat use of blogs. But I started wondering, wouldn't this be a better use for a Wiki? And then I wondered some more and now I think that it would be a good application for something like Hydra SubEthaEdit, because you could make temporary annotations right in the code. The nice thing about using a blog style tool to do this is that you could link the blog entry with the IRC chat log and keep a history of the discussion. You could probably do this with a wiki version as well.
[00:52] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
REPL's and data structures
Patrick Logan picks up the programming environment thread and points out something else that I just take for granted:
Lisp, Smalltalk, (dynamic languages I have decades of experience with) as well as Python, Ruby, etc. have good support for not only making prototype code, they also have good support for making prototype objects and data structures.

Lists, maps, arrays, even self-referencing structures can all be entered end edited in a command loop or workspace using a very simple (i.e. few characters) syntax. There are also the mundane (now that Java brought them to the masses) aspects of these languages like garbage collection and array bounds checking.

Then he goes on to speculate that static languages will sort of get this ability to easily deal with data structures via XML. It's horrible but true. XML is the s-expressions of the new millenium.
[00:44] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Thu, 28 Aug 2003
"Cuddled elses"
Piers Cawley wrote about how he's adopted Kent Beck's code layout rules for Smalltalk when writing OO Perl. While this in itself is interesting, the thing that inspired the title was his name for
} else {
AKA, the "cuddled else". I never heard of a name for this before. I use this style extensively when I'm programming in Java, but it and all the close brackets use up a lot of whitespace.

I remember the first time I saw Python, and saw that indentation was significant. I was really turned off by it, and it kept me away for quite some time. Part of that was because a long time ago I had to implement a compiler for a language that had a similar offside rule, and it was a nasty experience. Having used Python for a while now has made me a believer in the indentation based syntax. As I was browsing the OCaml documentation, I noticed that OCaml code has a similar flavor to Python code. I don't know if OCaml relies on indentation or not, but it's going to be interesting to find out.

[01:39] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
REPL's revisited
Don Box brings up Saber C/C++ as an example of a REPL for a statically typed language. I used this a long time ago (when it was just Saber-C), but I forgot about it, so I guess I have to retract yesterday's'
I have yet to experience an environment for a static language that is as usable in this way as a system designed with a REP loop in mind.
Also, the CAML/OCaml lovers are starting to beat on me ;-). I got a comment about the camlp4 tool for doing macros in OCaml, and someone else pointed out that CAML / PolyML also have REPLs -- at least I can get out of that by saying I haven't used it. I am planning to sit down and have a look at OCaml after I finish my current project.
[01:24] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Wiki's and good vs bad people.
If you're going to read Clay Shirky's piece Wikis, Grafitti, and Process, be sure that you read Ben Hyde's follow up.
[01:12] | [computers/internet] | # | TB | F | G | 1 Comments | Other blogs commenting on this post
Software product liability
At one of r0ml's many excellent presentations, he commented on the use of product liabilty lawsuits as a weapon to be used by open source against closed source software, on the premise that the open source community truly believed their products to be more reliable than closed source programs. Additional repetitions of the events of recent weeks may lead us to a world where such lawsuits become a reality, but not as a result of r0ml's proposed strategy.

Declan McCullagh's News.com article tells both sides of the story. Cem Kaner, quoted in McCullagh's story, had own take on this issue.

The software industry as a whole needs to find ways to improve software reliability. If we don't find a way to do it, the legal system is going to find way to do it for us.

[00:42] | [computers] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Wed, 27 Aug 2003
FOAF confluence
Today Shelley Powers and Leigh Dodds posted regarding the social aspects of information, in particular, the possibility that someone would build an information smushing tool.
Whenever you publish any data on the web, even simply posting to a mailing list with a public archive, you're releasing information that could be used to profile you. I could build a tool to smush together information about mailboxes from mail archives without FOAF. FOAF just makes this data, and the act of publication, more explicit. FOAF is therefore a showcase for the kind of issues that are going to be increasingly important in the future (now, even); it's not necessarily a problem for FOAF to solve, IMO.
It also happened that today Joi Ito used such a tool to find identity related information needed to merge frequent flyer miles accounts. The name of that tool: Google.
[01:18] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
What do you mean a device driver in Lisp? (Actually Dylan)
[via Chris Double's weblog]: Andreas Bogk is running Gwydion Dylan right on top of the L4 microkernel, including a VGA character screen driver written in Dylan.
[01:03] | [computers/programming/lisp] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Yep, time to stop copying
[via Daniel Barlow's diary] A quote from Tom Lord on free software architecture:
For a long time, the right strategy for GNU was to build a basic unix replacement differentiated primarily by licensing. As software goes, the core of unix is a simple architecture, reflecting its history as a design first realized by a very small team of people.

Well, that part's done and the strategy won.

Nowadays, the proprietary competition is about databases, and productivity apps, and browsers, and middleware layers. The software we're competing against is not like unix: it isn't simple; it wasn't built by a small number number of people; it's a moving target. It isn't a tractable project to clone this proprietary software under different licensing.

If the goal is still "(a) build a free alternative to proprietary software", then a new strategy is called for: competition on _software_architecture_, not just licensing.

One way or another, the free/open source software movements are going to have to truly invent something. The exciting days are ahead of us.
[00:53] | [computers/open_source] | # | TB | F | G | 1 Comments | Other blogs commenting on this post
More on libraries
Gordon Weakliem decided to do something about my wonderings and produced unzip examples in C# and Python. The net result is that the C# is about as bad as the Java, and the Python, while better is still not as good as Perl. Of course, this is a microbenchmark of sorts, but it does make you wonder.
[00:48] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Dynamic explorations
Jon's post today captures one of Patrick's comments that I mostly agreed with:
It *is* about how dynamic linking and binding works in a system. But how that works is intimately associated with the language design.
That's how I was tempted to respond yesterday. It usually is, but not always -- think of dlopen(3). Perhaps Don is thinking that the VM environment can help in ways that are usually the province of the language.

Then Jon goes on to amplify Patrick's point about interactive environments:

As programming increasingly relies on external services and alien environments, it becomes as much a game of exploration and discovery as of design and specification. I think dynamic languages and interactive programming environments help make us better explorers and discoverers, and I think that's only going to matter more as time goes on.
It is very nice to be able to probe the system and test out ideas without the overhead of writing a new class, compiling it, etc. I have yet to experience an environment for a static language that is as usable in this way as a system designed with a REP loop in mind.
[00:42] | [computers/programming] | # | TB | F | G | 1 Comments | Other blogs commenting on this post

twl JPG


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

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

< August 2003 >
      1 2
3 4 5 6 7 8 9


Macintosh Tips and Tricks

Blogs nearby
geourl PNG

/ (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



Listed on BlogShares

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

pyblosxom GIF