Archive for 2003

Eclipse & Netbeans Comments Off

Talk of merging Eclipse and NetBeans is off then, according to this recent post. I can’t say that I’m surprised, since many of the differences between the two ‘platforms’ have become religious issues.

What I’d like to see, however, is soome commonality and code sharing between the two where it makes sense. For example in the resource management / virtual file system APIs, or their action API. This kind of thing would make writing plugins that work with multiple IDEs much easier, and would avoid duplication of effort, allowing the developers to enhance the two products in new ways.

Gnome Wish List Comments Off

My thoughts on the OS News Gnome wish list, others have already commented. Now I haven’t been following too closely the new features in 2.6, but here’s my thoughts anyway:

  • Nautilus Scripting a new plugin API and smart menu merging would go a long way to making Nautilus cooler, assuming of course that developers step up to the base and write plugins for it! And by the way, we really need to change the (legally incredibly dodgy) icon for this app!
  • Spatial Mode I can’t wait for this, assuming the implementation doesn’t totally suck it will be way cool.
  • Metacity Features Viewports == Crack. But the magnetic windows feature in metacity is broken, so it’s fair game for criticism as far as I’m concerned.
    • File Selector* The new file selector does suck. As far as I can see the two problems with the current file selector are that it looks ugly as fuck, and that it lacks even basic features. The proposed new design solves the fugly problem but doesn’t appear to add any features. I’d like to see, at least, improved filtering, and more details of files being displayed.
  • Development Tools I don’t use Glade so I don’t know whether it sucks or not. I suspect the same is true of Eugenia so these comments don’t really seem fair. That said, what I’d really like to see is a GUI builder integrated with Eclipse, maybe as a new back end for the VE project.
  • Drag and drop, copy and paste Yeah, this sucks, but now that there are Free Desktop specs for this the situation should improve.

I’ll update this as I get time over the next couple of days.

Mac Annoyances Comments Off

John Gruber takes issue with external editor support in apples new XCode application. I’m wondering what the Mac is like as a development platform? I love the hardware, and there are lots of neat things about the Mac, but is it a viable platform to switch to?

Update: Yes, it is. I switched a few months after this was written and haven’t looked back.

JSR-173 Reference Implementation Comments Off

I’ve been looking at the new streaming API for XML (JSR-173), I’ve been generally impressed but have found a bug in the reference implementation, here’s the details, using this test program:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import java.io.*;
import javax.xml.stream.*;
public class StaxWriterTest {
	static String nsURI = "http://ianp.org/nsURI";
	static String nsPrefix = "a";
	static int depth = 0; // Used to pretty print the output.
	static XMLStreamWriter w;
	public static void main(String[] args) {
		try {
			w.writeStartDocument();
			indent(1);
			w.writeStartElement(nsURI, "root");
			w.writeNamespace(nsPrefix, nsURI);
			indent(0);
			w.writeEmptyElement(nsURI, "levelOne");
			w.writeAttribute(nsURI, "foo", "foo");
			indent(0);
			w.writeStartElement(nsURI, "levelOne");
			w.writeEndElement();
			indent(1);
			w.writeStartElement(nsURI, "levelOne");
			indent(1);
			w.writeEmptyElement(nsURI, "levelTwo");
			w.writeAttribute(nsURI, "foo", "foo");
			indent(-2);
			w.writeEndElement();
			indent(0);
			w.writeStartElement(nsURI, "levelOne");
			w.writeEndElement();
			indent(-1);
			w.writeEndElement();
			w.flush();
			w.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
	static void indent(int d) {
		try {
			if (d < 0) { depth += d; }
			for (int i = 0; i < depth; ++i)
			w.writeCharacters("  ");
			if (d > 0) { depth += d; }
		} catch (XMLStreamException e) {
			throw new RuntimeException(e);
		}
	}
}

This is using version 7 of the reference implementation, by the way. The program should produce this output:

1
2
3
4
5
6
7
8
9
&lt;?xml version='1.0' encoding='utf-8'?>
&lt;a:root xmlns:a="http://ianp.org/nsURI">
	&lt;a:levelOne a:foo="foo"/>
	&lt;a:levelOne/>&lt;/a:levelOne>
	&lt;a:levelOne>
		&lt;a:levelTwo a:foo="foo"/>
	&lt;/a:levelOne>
	&lt;a:levelOne/>&lt;/a:levelOne>
&lt;/a:root>

But actually produces this:

1
2
3
4
5
6
7
8
9
&lt;?xml version='1.0' encoding='utf-8'?>
&lt;a:root xmlns:a="http://ianp.org/nsURI">
	&lt;a:levelOne a:foo="foo"/>
	&lt;a:levelOne/>&lt;/a:levelOne>
	&lt;a:levelOne/>
		&lt;a:levelTwo a:foo="foo"/>
	&lt;/a:levelOne>
	&lt;a:levelOne/>&lt;/a:levelOne>
&lt;/a:root>

Line 5 is generated as an empty element instead of a start element. I’ve pointed this out the to JCP committee, we’ll see if they repsond.

Fedora Comments Off

By coincidence I just finished reading up on the Fedora Project before I read this post from Diego. As I see it Redhat are going to push the Fedora project as their replacement for the Professional edition (i.e. Red Hat 9). This probably makes sense since they can free up a lot of resources whilst hopefullty maintaining market visibility. If they can increase the speed of the release cycle for this it may even help them gain some more converts (and it sure does look pretty!).

Appropriate Technology Comments Off

This says it all:

Web services technology also gets more than its fair share of misuse. Web services are great, if that’s really what you need. The problem arises when people use web services ‘just because’, or apply web services inappropriately, like using SOAP as an internal messaging bus.

We get this all the time in RFC’s and RFP’s at work, the obligatory how do you support web services question. For internal integration projects. Urghh… .

Tiny Danish Elves Comments Off

A neat Flash animation about Lego bricks.

The Semantic Web Comments Off

Clay Shirky’s latest newsletter on networks, economics and culture discusses the semantic web. In a nutshell, he’s not very impressed. The starting point for this argument is that syllogisms don’t model the real world well, an example:

The creator of shirky.com lives in Brooklyn. People who live in Brooklyn speak with a Brooklyn accent.

Well in this case clearly they don’t, the second assertation is clearly false, it’s obvious that not everybody who lives in Brooklyn calls birds boids, so that absolute assertaion does not hold. The example later on using Nike and the first amendment of the US constitution has more merit, in this case the fact asserted (the first amendment covers the rights of US citizens) is a subset of the actual applicability rather than a superset as in the Brooklyn case. I think that this is still a surmountable problem, but it may require a more complex representation of ‘facts’ than initially considered.

I think that maybe the way forward if not, as Clay suggests (if only to point out it’s impracticality), to attach context to each assertation and then cross check against this. A better approach surely would be to attach an accuracy value to each statement, then the syllogisms could have attached accuracy values also. For example, the following pseudo code:

1
2
3
LET clay lives in Brooklyn ACCURACY 1.0
LET people who live in brooklyn say boids ACCURACY 0.7
DEDUCE clay says boids ACCURACY 0.7

With the final 0.7 being the product of the two ‘fact’ accuracies. Now this is just something that I’ve come up with on the spur of the moment, not a result of research so I don’t know how generally useful this would be, but in tools designed for human use it should be possible to tolerate a level of inaccuracy, so long as it is marked as such. Reading further, the examples about merging databases I can agree with the fact that it’s way more complicated that just simply mapping field names! When it comes to meta data, this is probably best if it can be extracted from the data itself automatically, of course this would reduce the amount of available data, but maybe we could tag any manually added meta data with a date and allow it’s accuracy to deteriorate as time goes by (or as the tagged data is revised), and you could always tweak your reasoner to reduce the accuracy of human added data anyway.

Hmmm, but this goes against what the semantic web is supposed to be for to a large extent. Machines need to be able to rely on absolute (i.e. ACCURACY 1.0) facts to be able to use them a lot of the time. I think the conclusion that I’m coming to is that there is a benefit to be gained from the semantic web and it’s related technologies and ideas, but probably not as great as it’s champions make out. So it’s another web related technology with potential that has been overmarketed.

Nothing new there then.

On Lisp… Comments Off

I’ve been playing a little with learning Lisp (not that I’ve much free time, but hey, what the hell). This example, taken from Dave Lamkins’ Successful Lisp, more than any other that I’ve seen so far, expresses the power of the language.

1
2
3
4
(defun open-bracket (stream char)
`',(read-delimited-list #] stream t))
(set-macro-character #[#'open-bracket)
(set-macro-character #] (get-macro-character #)))

Here’s what’s happening: we’re redefining the syntax of the language dynamically! Normally, if I type [1 2 3] into a Lisp interpreter it will raise an error, something along the lines of variable [1 has no value, but after running that little code snippet I can now type [1 2 3] and it will create a three element list populated with the numbers 1, 2, and 3. Here’s the equivalent in a Java like syntax.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class OpenBracket implements JavaLanguageParser {
	static List list;
	public void nextToken(RuntimeEnv env, StreamTokenizer stok) {
		if (list == null)
			list = new ArrayList();
		int tok = stok.nextToken();
		if (tok == TT_WORD)
			list.add(stok.add(stok.sval));
		else if (tok == TT_NUMBER)
			list.add(new Double(stok.nval));
	}
}
class CloseBracket extends JavaLanguageParser {
	public void nextToken(RuntimeEnv env, StreamTokenizer stok) {
		if (OpenBracket.list ==null)
			throw new ParseException("mismatched brackets");
		env.pushObjectOntoStack(OpenBracket.list);
		OpenBracket.list.clear();
		OpenBracket.list == null;
	}
}
Lang.defineNewKeyword("[", new OpenBracket());
Lang.defineNewKeyworkd("]", new CloseBracket());

Then writing List foo = [1 2 3 bar] would yield a new ArrayList populated with 3 Double objects and a string. Even with my friendly psuedo-code it’s a lot more work, but to actually do this is impossible. I assume that this is what folks like Paul Graham mean when they say things like ‘If you re writing a text-editor, you can turn Lisp into a language for writing text-editors. If you re writing a CAD program, you can turn Lisp into a language for writing CAD programs’ and it strikes me as an amazingly powerful concept. I think I really like this language.

Java Help Comments Off

I had a look at the Java Help API today, hoping to use it in an application that I’m writing, alas no. Despite claiming to be interface based, and coming with a reference implementation from Sun, what we now call the service provider pattern, it’s irrevocably tied to Swing. This means that you couldn’t use it to say, provide a help system on an interactive web based system, or an SWT based client side app, which is what I’m interested in.

Sun seem to be more interested in pushing their own ideas onto others than in producing a solid solution. Here’s hoping version 3 of the API solves this, but don’t hold your breath.

Next Page »