<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>chuyeow.wtf</title>
  <subtitle>Go, Ruby, Rails, Firefox, Anime, Mac</subtitle>
  <link rel="self" type="application/atom+xml" href="https://chuyeow.wtf/categories/java/feed.xml"/>
  <link rel="alternate" type="text/html" href="https://chuyeow.wtf"/>
  <generator uri="https://www.getzola.org/">Zola</generator>
  <updated>2006-09-28T20:40:02+00:00</updated>
  <id>https://chuyeow.wtf/categories/java/feed.xml</id>
  <entry>
    <title>Vibrant Ink TextMate theme for Eclipse</title>
    <published>2006-09-28T20:40:02+00:00</published>
    <updated>2006-09-28T20:40:02+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/"/>
    <id>https://chuyeow.wtf/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/">&lt;p&gt;Spent some time tinkering with Eclipse&#x27;s preferences today as I was really missing the &lt;a href=&quot;encytemedia.com&#x2F;blog&#x2F;articles&#x2F;2006&#x2F;01&#x2F;03&#x2F;textmate-vibrant-ink-theme-and-prototype-bundle&quot;&gt;Vibrant Ink theme for TextMate&lt;&#x2F;a&gt; and Eclipse is looking pretty now...&lt;&#x2F;p&gt;
&lt;div class=&quot;img&quot;&gt;
&lt;img src=&quot;&#x2F;assets&#x2F;eclipse-textmate-snippet.png&quot; &#x2F;&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;&lt;br style=&quot;clear: both&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The only thing that I still couldn&#x27;t figure out was how to change the color of the folding&#x2F;breakpoint bar next to the gutter. And I&#x27;m really starting to like the Monaco font that seems to be the default programmer&#x27;s font on Macs (I found a &lt;a href=&quot;http:&#x2F;&#x2F;www.system7designs.com&#x2F;blog&#x2F;textmate-envy-aka-monaco-font-for-windows&#x2F;&quot;&gt;Windows version of Monaco&lt;&#x2F;a&gt; but haven&#x27;t tried it).&lt;&#x2F;p&gt;
&lt;p&gt;I guess TextMate envy still exists even when you are on a Mac with a registered version of TextMate heh.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;ins&gt;Here&#x27;s &lt;a href=&quot;https:&#x2F;&#x2F;chuyeow.wtf&#x2F;wp-content&#x2F;uploads&#x2F;2006&#x2F;09&#x2F;Eclipse%20preferences.epf&quot;&gt;my Eclipse preferences&lt;&#x2F;a&gt; (I just did a File -&gt; Export -&gt; Preferences). It seems Eclipse only allows a full export&#x2F;import so you may want to be careful to &lt;strong&gt;backup your existing preferences&lt;&#x2F;strong&gt; before importing mine.&lt;&#x2F;ins&gt;&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Copy &#x27;n&#x27; Paste and the incorrigible programmer</title>
    <published>2006-03-10T20:05:58+00:00</published>
    <updated>2006-03-10T20:05:58+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2006/03/10/copy-n-paste-and-the-incorrigible-programmer/"/>
    <id>https://chuyeow.wtf/2006/03/10/copy-n-paste-and-the-incorrigible-programmer/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2006/03/10/copy-n-paste-and-the-incorrigible-programmer/">&lt;p&gt;We just never learn, do we?&lt;&#x2F;p&gt;
&lt;div class=&quot;code&quot;&gt;String fromLocationCode;&lt;br &#x2F;&gt;
Location fromLocation = request.getFromLocation();&lt;&#x2F;p&gt;
&lt;p&gt;String toLocationCode;&lt;br &#x2F;&gt;
Location toLocation = request.getFromLocation();&lt;&#x2F;p&gt;
&lt;p&gt;&#x2F;&#x2F; Do stuff to toLocation&lt;&#x2F;p&gt;&lt;&#x2F;div&gt;
&lt;p&gt;First, my (extremely talented) colleague makes a similar copy and paste blooper, and one day later I repeat the same mistake. But, but... Select boring code, Ctrl-C, Ctrl-V, it&#x27;s &lt;em&gt;sooo&lt;&#x2F;em&gt; easy...&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>J2SE 5.0 is out</title>
    <published>2004-10-01T10:28:22+00:00</published>
    <updated>2004-10-01T10:28:22+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2004/10/01/j2se-50-is-out/"/>
    <id>https://chuyeow.wtf/2004/10/01/j2se-50-is-out/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2004/10/01/j2se-50-is-out/">&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;java.sun.com&#x2F;j2se&#x2F;1.5.0&#x2F;docs&#x2F;relnotes&#x2F;features.html&quot;&gt;New Features and Enhancements in J2SE 5.0&lt;&#x2F;a&gt;. I miss Java. I&#x27;m having a rough time getting used to wxPython (mostly because of its lack of documentation).&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>JMF applet without JMF installed?</title>
    <published>2004-08-25T19:37:49+00:00</published>
    <updated>2004-08-25T19:37:49+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2004/08/25/jmf-applet-without-jmf-installed/"/>
    <id>https://chuyeow.wtf/2004/08/25/jmf-applet-without-jmf-installed/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2004/08/25/jmf-applet-without-jmf-installed/">&lt;p&gt;A long shot, but do any of you Java programmers think an applet that uses &lt;a href=&quot;http:&#x2F;&#x2F;java.sun.com&#x2F;products&#x2F;java-media&#x2F;jmf&#x2F;index.jsp&quot;&gt;&lt;acronym title=&quot;Java Media Framework&quot;&gt;JMF&lt;&#x2F;acronym&gt;&lt;&#x2F;a&gt; can be deployed and run on a client that &lt;em&gt;doesn&#x27;t&lt;&#x2F;em&gt; have &lt;acronym title=&quot;Java Media Framework&quot;&gt;JMF&lt;&#x2F;acronym&gt; installed?&lt;&#x2F;p&gt;
&lt;p&gt;I think the chances would be higher if instead of an applet, a Java Web Start application was used instead. Bundling the JMF libraries could work, but there hasn&#x27;t been any report of success as far as I can find. (It is &lt;a href=&quot;http:&#x2F;&#x2F;saloon.javaranch.com&#x2F;cgi-bin&#x2F;ubb&#x2F;ultimatebb.cgi?ubb=get_topic&amp;f=45&amp;t=001407&quot;&gt;possible with a full-blown Java application though&lt;&#x2F;a&gt;.)&lt;&#x2F;p&gt;
&lt;p&gt;Any leads at all would be good. In the meantime I will be trying this out myself.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Help needed with .NET and Java</title>
    <published>2004-03-08T19:27:13+00:00</published>
    <updated>2004-03-08T19:27:13+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2004/03/08/help-needed-with-net-and-java/"/>
    <id>https://chuyeow.wtf/2004/03/08/help-needed-with-net-and-java/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2004/03/08/help-needed-with-net-and-java/">&lt;p&gt;&lt;ins&gt;Update: &lt;a href=&quot;http:&#x2F;&#x2F;www.dovitz.com&#x2F;blog&quot;&gt;Dave&lt;&#x2F;a&gt; has an excellent  &lt;a href=&quot;https:&#x2F;&#x2F;chuyeow.wtf&#x2F;archives&#x2F;2004&#x2F;03&#x2F;09&#x2F;getting_net_button_listbar_control_to_work.php&quot;&gt;solution to the ButtonListBar .NET control problem&lt;&#x2F;a&gt;.&lt;&#x2F;ins&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Firstly, the .NET question: does anybody know how to get this &lt;a href=&quot;http:&#x2F;&#x2F;www.vbaccelerator.com&#x2F;home&#x2F;NET&#x2F;Code&#x2F;Controls&#x2F;ListBar&#x2F;Button_List_Bar&#x2F;article.asp&quot;&gt;Button ListBar Control&lt;&#x2F;a&gt; to work?&lt;&#x2F;p&gt;
&lt;p&gt;I was trying to get the.NET Button ListBar control into my VB project&#x27;s toolbox - I followed these instructions:&lt;&#x2F;p&gt;
&lt;blockquote&gt;&lt;p&gt;To use the control, add either the ButtonListBar.vb or ButtonListBar.cs file to your project. You should find the control automatically appears in the Toolbox; if not you&#x27;ll need to force the toolbox to display the&lt;br &#x2F;&gt;
control: typically I find that double clicking on the control source file to open its designer causes this to occur.&quot;&lt;&#x2F;p&gt;&lt;&#x2F;blockquote&gt;
&lt;p&gt;Unfortunately, it doesn&#x27;t appear automatically when I added ButtonListBar.vb (via &quot;Add existing item&quot;). So I double-clicked the source file... But it threw out this error&lt;&#x2F;p&gt;
&lt;blockquote&gt;&lt;p&gt;The class ButtonListBar can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file...&lt;&#x2F;p&gt;&lt;&#x2F;blockquote&gt;
&lt;p&gt;Which I don&#x27;t understand of course. Neither did it cause the ListBar control to appear in the Toolbox. I have emailed the author about this, but if anyone knows what I&#x27;m doing wrong, please let me know ASAP.&lt;&#x2F;p&gt;
&lt;p&gt;This of course leads to the question: What is the correct way to add a user control which comes in source form?&lt;&#x2F;p&gt;
&lt;p&gt;Now, for the Java question: is there an existing library&#x2F;package that would allow me to calculate the median and, say, the 95th percentile of a population quickly? I searched to no avail, of course, before I ask this.&lt;&#x2F;p&gt;
&lt;p&gt;I can do this myself the hard way, but I&#x27;m really pressed for time. I&#x27;d like to reuse an existing solution if there is any.&lt;&#x2F;p&gt;
&lt;p&gt;Thanks for any leads!&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Spotlight on Java and J2EE at SitePoint</title>
    <published>2003-11-14T02:00:12+00:00</published>
    <updated>2003-11-14T02:00:12+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/11/14/spotlight-on-java-and-j2ee-at-sitepoint/"/>
    <id>https://chuyeow.wtf/2003/11/14/spotlight-on-java-and-j2ee-at-sitepoint/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/11/14/spotlight-on-java-and-j2ee-at-sitepoint/">&lt;p&gt;Web development site &lt;a href=&quot;http:&#x2F;&#x2F;www.sitepoint.com&#x2F;&quot;&gt;SitePoint&lt;&#x2F;a&gt; has recently started a series of articles on Java in it&#x27;s &lt;a href=&quot;http:&#x2F;&#x2F;www.sitepoint.com&#x2F;subcat&#x2F;94&quot;&gt;Spotlight on Java and J2EE&lt;&#x2F;a&gt;. A new article is published everyday, and the quality is good.&lt;&#x2F;p&gt;
&lt;p&gt;SitePoint is popularly-known as one of THE places for PHP articles (its &lt;a href=&quot;http:&#x2F;&#x2F;www.sitepointforums.com&#x2F;forumdisplay.php?f=34&quot; title=&quot;PHP forum at SitePoint Forums&quot;&gt;PHP forum&lt;&#x2F;a&gt; is also one of the busiest) - this shift in focus to enterprise technologies is encouraging, since I&#x27;ve always thought newer web developers tend to view PHP as the end all and be all to getting a serious job in web development. This is my opinion of course, and in no way should this be construed as trolling! :-)&lt;&#x2F;p&gt;
&lt;p&gt;Are you a Java developer? Come help make the &lt;a href=&quot;http:&#x2F;&#x2F;www.sitepointforums.com&#x2F;forumdisplay.php?f=35&quot; title=&quot;Java forum at SitePoint Forums&quot;&gt;Java forum&lt;&#x2F;a&gt; (it&#x27;s currently called the &quot;Java, ColdFusion and Other Languages&quot; forum, but that will soon change in our proposed forum structure changes) more lively. We need more members to help grow the Java forum, be they leaders in discussions or fledging newbies.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Flash your keyboard lights with Java</title>
    <published>2003-09-01T16:54:29+00:00</published>
    <updated>2003-09-01T16:54:29+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/09/01/flash-your-keyboard-lights-with-java/"/>
    <id>https://chuyeow.wtf/2003/09/01/flash-your-keyboard-lights-with-java/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/09/01/flash-your-keyboard-lights-with-java/">&lt;p&gt;From &lt;a href=&quot;http:&#x2F;&#x2F;atog.typepad.com&#x2F;atog&#x2F;2003&#x2F;09&#x2F;keyboard_spinne.html&quot; title=&quot;keyboard spinner&quot;&gt;atog&lt;&#x2F;a&gt;: found this very interesting &lt;a href=&quot;http:&#x2F;&#x2F;weblogs.java.net&#x2F;pub&#x2F;wlg&#x2F;403&quot;&gt;keyboard spinner&lt;&#x2F;a&gt; with code (in Java) posted. I tried it out and it works! There&#x27;s a hypnotic effect watching the lights flashing.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Python &amp; Java comparison article</title>
    <published>2003-08-14T10:23:33+00:00</published>
    <updated>2003-08-14T10:23:33+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/08/14/python-java-comparison-article/"/>
    <id>https://chuyeow.wtf/2003/08/14/python-java-comparison-article/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/08/14/python-java-comparison-article/">&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.ferg.org&#x2F;index.html&quot;&gt;Stephen Ferg&lt;&#x2F;a&gt; claims&lt;&#x2F;p&gt;
&lt;blockquote&gt;&lt;p&gt;
A programmer can be significantly more productive in Python than in Java.
&lt;&#x2F;p&gt;&lt;&#x2F;blockquote&gt;
&lt;p&gt;in his article &quot;&lt;a href=&quot;http:&#x2F;&#x2F;www.ferg.org&#x2F;projects&#x2F;python_java_side-by-side.html&quot;&gt;Python &amp; Java: a Side-by-Side Comparison&lt;&#x2F;a&gt;&quot;. The basis of his argument centres around dynamic typing in Python, among other things like code verbosity.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>foreach in Java 1.5</title>
    <published>2003-08-13T08:59:26+00:00</published>
    <updated>2003-08-13T08:59:26+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/08/13/foreach-in-java-15/"/>
    <id>https://chuyeow.wtf/2003/08/13/foreach-in-java-15/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/08/13/foreach-in-java-15/">&lt;p&gt;Joshua Bloch and Neal Gafter&#x27;s recent &lt;a href=&quot;http:&#x2F;&#x2F;developer.java.sun.com&#x2F;developer&#x2F;community&#x2F;chat&#x2F;JavaLive&#x2F;2003&#x2F;jl0729.html&quot;&gt;JavaLive chat&lt;&#x2F;a&gt; further talks on generics and typesafe enums, 2 of the more significant new language features in the Java 1.5. There is interesting discussion on generics especially.&lt;&#x2F;p&gt;
&lt;p&gt;My favorite though is the enhanced for loop which is similar to the &lt;tt&gt;foreach&lt;&#x2F;tt&gt; construct in languages like &lt;acronym title=&quot;PHP Hypertext Preprocessor&quot;&gt;PHP&lt;&#x2F;acronym&gt; and Python.&lt;&#x2F;p&gt;
&lt;p&gt;The following example reads &quot;for each Object in the Collection C...&quot;:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code language=&quot;Java&quot;&gt;&lt;br &#x2F;&gt;
void displayAll(Collection c) {&lt;br &#x2F;&gt;
  for (Object o : c)&lt;br &#x2F;&gt;
    ((String)o).display();&lt;br &#x2F;&gt;
}&lt;br &#x2F;&gt;
&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve always found the Java (and C&#x2F;C++) for-loop idiom to be overly wordy and reduces code legibility, so this is a welcome addition.&lt;&#x2F;p&gt;
&lt;p&gt;Related links:&lt;br &#x2F;&gt;
Previous &lt;a href=&quot;http:&#x2F;&#x2F;java.sun.com&#x2F;features&#x2F;2003&#x2F;05&#x2F;bloch_qa.html&quot;&gt;interview with Joshua Bloch&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>JADE on BEA Weblogic Server</title>
    <published>2003-06-26T14:00:44+00:00</published>
    <updated>2003-06-26T14:00:44+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/26/jade-on-bea-weblogic-server/"/>
    <id>https://chuyeow.wtf/2003/06/26/jade-on-bea-weblogic-server/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/26/jade-on-bea-weblogic-server/">&lt;p&gt;I&#x27;m confused by BEA Weblogic Server&#x27;s implementation of JMX. I&#x27;ve been trying to figure out how WLS 8.1 allows configuration and addition of new services so that I can run &lt;a href=&quot;http:&#x2F;&#x2F;sharon.cselt.it&#x2F;projects&#x2F;jade&#x2F;&quot;&gt;JADE&lt;&#x2F;a&gt; (Java Agent DEvelopment Framework) as a managed service (via JMX).&lt;&#x2F;p&gt;
&lt;p&gt;Basically, it would be a &quot;port&quot; of &lt;a href=&quot;http:&#x2F;&#x2F;sourceforge.net&#x2F;projects&#x2F;bluejade&quot;&gt;BlueJADE&lt;&#x2F;a&gt; (which works for JBoss) for WLS. Now if only I could figure out from the BEA documentation how to add a managed service, but the JMX edocs were of no help - lots on how to manage MBeans, nothing on how to actually deploy one for a new service.&lt;&#x2F;p&gt;
&lt;p&gt;It appears that WLS&#x27;s and JBoss&#x27;s JMX implementations are quite disimilar enough that there isn&#x27;t any resemblance in their XML descriptors nor their directory structures - I&#x27;m lost on how to proceed. And looking at how JBoss manages all it&#x27;s services via JMX, with configuration descriptors (*-service.xml files) clearly visible in the server directory, I can really see how JBoss&#x27;s microkernel architecture really pays off in this respect. I didn&#x27;t even need documentation to figure out how it works in JBoss!&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Artima.com - tech-oriented blog directory</title>
    <published>2003-06-26T13:48:42+00:00</published>
    <updated>2003-06-26T13:48:42+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/26/artimacom-tech-oriented-blog-directory/"/>
    <id>https://chuyeow.wtf/2003/06/26/artimacom-tech-oriented-blog-directory/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/26/artimacom-tech-oriented-blog-directory/">&lt;p&gt;Inspired by &lt;a href=&quot;http:&#x2F;&#x2F;www.javablogs.com&#x2F;&quot;&gt;java.blogs&lt;&#x2F;a&gt;, Bill Venners has set up &lt;a href=&quot;http:&#x2F;&#x2F;www.artima.com&#x2F;weblogs&#x2F;index.jsp&quot;&gt;Artima Weblogs&lt;&#x2F;a&gt; for tech-oriented blog owners to submit their blogs so that it appears on an aggregated list. It does need a little redesign to make it look less &quot;academic&quot; though.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve signed up on the &lt;a href=&quot;http:&#x2F;&#x2F;www.artima.com&#x2F;buzz&#x2F;community.jsp?forum=141&quot;&gt;Open Source&lt;&#x2F;a&gt; forums (only 3 of us at the time of writing).&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Multi-author java tips blog</title>
    <published>2003-06-21T15:25:35+00:00</published>
    <updated>2003-06-21T15:25:35+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/21/multi-author-java-tips-blog/"/>
    <id>https://chuyeow.wtf/2003/06/21/multi-author-java-tips-blog/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/21/multi-author-java-tips-blog/">&lt;p&gt;I&#x27;m toying with the idea of a multi-author Java tips blog, and am looking for possible contributors. If there is sufficient interest, I&#x27;ll be able to setup a subdomain to host the blog.&lt;&#x2F;p&gt;
&lt;p&gt;Please do contact me at &lt;a href=&quot;mailto:redemption@codefront.net&quot;&gt;redemption at codefront.net&lt;&#x2F;a&gt; should you be interested. This is (what I foresee) a good opportunity to share your experience and expertise with the Java community via the informal weblog medium.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;&#x2F;strong&gt;: I&#x27;ve setup a subdomain at &lt;a href=&quot;http:&#x2F;&#x2F;javatips.codefront.net&#x2F;&quot;&gt;http:&#x2F;&#x2F;javatips.codefront.net&#x2F;&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>java.blogs gets confused</title>
    <published>2003-06-21T15:03:53+00:00</published>
    <updated>2003-06-21T15:03:53+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/21/javablogs-gets-confused/"/>
    <id>https://chuyeow.wtf/2003/06/21/javablogs-gets-confused/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/21/javablogs-gets-confused/">&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.javablogs.com&#x2F;&quot;&gt;java.blogs&lt;&#x2F;a&gt; apparently gets confused when I updated the title of a blog entry - the updated blog becomes the newest entry and my subsequent blog entry does not appear on the &lt;a href=&quot;http:&#x2F;&#x2F;www.javablogs.com&#x2F;Welcome.jspa&quot;&gt;java.blogs front page&lt;&#x2F;a&gt;, nor on the blog details page.&lt;&#x2F;p&gt;
&lt;p&gt;I apologize to java.bloggers for being lead to my old entry yet again.&lt;&#x2F;p&gt;
&lt;p&gt;I may yet have to re-add by blog unless this fixes itself soon. (It&#x27;s an unresolved issue.)&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;EDIT&lt;&#x2F;strong&gt;: It appears that an update of my blog details fixed the problem.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Java Tip #2: Static factory methods vs. constructors</title>
    <published>2003-06-21T14:13:32+00:00</published>
    <updated>2003-06-21T14:13:32+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/21/java-tip-2-static-factory-methods-vs-constructors/"/>
    <id>https://chuyeow.wtf/2003/06/21/java-tip-2-static-factory-methods-vs-constructors/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/21/java-tip-2-static-factory-methods-vs-constructors/">&lt;p&gt;Factory methods are simply methods that instantiate objects. Some factory methods in the Java 2 API that you would likely have used are the &lt;tt&gt;getInstance()&lt;&#x2F;tt&gt; and &lt;tt&gt;valueOf()&lt;&#x2F;tt&gt; methods. &lt;tt&gt;getInstance()&lt;&#x2F;tt&gt; is the conventional instantiation method in singletons, while &lt;tt&gt;valueOf()&lt;&#x2F;tt&gt; are often type-conversion methods, like in &lt;tt&gt;String.valueOf(int i)&lt;&#x2F;tt&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Providing a static factory method instead of a public constructor has both advantages and disadvantages, which will be discussed at length in the rest of this entry.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Static factory methods have names&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
A class can have only a single constructor with a given signature, which is a restriction in cases where a class needs to be able to be instantiated using identical parameter lists. In cases like this, you can replace constructors with static factory methods with more intuitive names that highlight their differences.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Static factory methods can improve performance&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
This is because static factory methods do not have to actually instantiate new objects each time they are invoked. This is what allows for the Singleton pattern, where a single instance is returned. It also allows instances to be cached within the object in cases where object instantiation is expensive (like for the case of instantiation of fields from a database) or frequently done.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Static factory methods can return a subtype of their return type&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
This allows for interfaces to be returned by static factory methods, which is best exemplified in the Collections Framework. Needless to say, forcing a client to refer to the returned object by its interface rather than its actual class is a good practice.&lt;&#x2F;p&gt;
&lt;p&gt;Also, the class of the object returned can be private (non-public), so there is a degree of encapsulation where the private class can be modified without impacting clients of the API (possibly for bug-fixing or improvements, or just plain maintainence). The private classes can also vary depending on the parameters to the static factory, so long as they are subtypes of the return type, allowing for greater flexibility.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Classes without public or protected constructors cannot be subclassed&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
This is an unavoidable fact, so classes designed for inheritance must have at least 1 public constructor to be able to be subclassed.&lt;&#x2F;p&gt;
&lt;p&gt;The verdict? Use static factory methods for a more intuitive API, to improve performance via object-caching, to implement singletons, in interface-based frameworks, and to return objects of private classes. Use constructors in classes designed for inheritance (there shouldn&#x27;t be many of these) and for greater visibility in API documentation (since they appear in a separate table in standard Javadocs).&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Integrating JADE into JBoss with BlueJADE</title>
    <published>2003-06-17T15:04:57+00:00</published>
    <updated>2003-06-17T15:04:57+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/17/integrating-jade-into-jboss-with-bluejade/"/>
    <id>https://chuyeow.wtf/2003/06/17/integrating-jade-into-jboss-with-bluejade/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/17/integrating-jade-into-jboss-with-bluejade/">&lt;p&gt;The following are installation instructions for integrating &lt;a href=&quot;http:&#x2F;&#x2F;sharon.cselt.it&#x2F;projects&#x2F;jade&#x2F;&quot;&gt;JADE&lt;&#x2F;a&gt; (Java Agent DEvelopment Framework) as a managed container in JBoss using &lt;a href=&quot;http:&#x2F;&#x2F;sourceforge.net&#x2F;projects&#x2F;bluejade&quot;&gt;BlueJADE&lt;&#x2F;a&gt;. It addresses several issues with group installation, which doesn&#x27;t seem to work as indicated in the official installation instructions. I&#x27;ve posted them more for reference than as a weblog entry &lt;i&gt;per se&lt;&#x2F;i&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;What is BlueJADE?&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;BlueJADE makes the JADE agent system a manageable service under a J2EE application server. BlueJADE allows JADE to become a service that can be managed through JMX (Java Management Extension).&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Installation in WinXP&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Setting up the environment&lt;br &#x2F;&gt;
- Install JADE, BlueJADE and JBoss. It is recommended that a version of JBoss with Tomcat already integrated be used. Refer to their respective documentation on the installation process. This often involves simply unarchiving the binaries, or compilation if you&#x27;re building from sources.&lt;br &#x2F;&gt;
- Set the JADE_HOME, BLUEJADE_HOME and JBOSS_HOME environment variables to point to the respective directories.&lt;&#x2F;p&gt;
&lt;p&gt;Group Installation&lt;br &#x2F;&gt;
- Pick a group under $BLUEJADE_HOME&#x2F;groups to install. It&#x27;s simplest to choose the &#x27;simpleagent&#x27; group.&lt;br &#x2F;&gt;
- To install the group, run the install script (install.bat) in $BLUEJADE_HOME&#x2F;groups&#x2F;simpleagent. 1 argument, the group to install, should be specified. A 2nd argument would copy over an existing JBoss environment if specified.&lt;br &#x2F;&gt;
  Eg.&lt;br &#x2F;&gt;
    $ install simpleagent default&lt;br &#x2F;&gt;
- At this point, you could run into problems. Apparently, the environment variables are not picked up properly by the installation script&#x2F;program so you have to edit $BLUEJADE_HOME&#x2F;bin&#x2F;win&#x2F;install.properties to add in the &quot;missing&quot; environment variables.&lt;br &#x2F;&gt;
  The variables include:&lt;br &#x2F;&gt;
    LOCALHOSTNAME, GROUP, TEMP, JBOSS_HOME, JADE_HOME, BLUEJADE_HOME&lt;br &#x2F;&gt;
  Set these to point to the exact path&#x2F;name.&lt;br &#x2F;&gt;
- If installation goes well (no error messages), open the file $JBOSS_HOME&#x2F;server&#x2F;simpleagent&#x2F;deploy&#x2F;jade-service.xml. The element &lt;attribute&gt; with name=&quot;ConfigDocName&quot; should be pointing to an incorrect path - change it to point to $JBOSS_HOME&#x2F;server&#x2F;simpleagent&#x2F;conf&#x2F;jade-service-config.xml. Depending on the group you&#x27;re installing, there could be more bogus paths - just keep an eye out for them and correct accordingly.&lt;br &#x2F;&gt;
- Open that jade-service-config.xml file and make similar corrections for the 2 (or more, depending on your group) paths there:&lt;br &#x2F;&gt;
    xsi:noNamespaceSchemaLocation=$JBOSS_HOME&#x2F;server&#x2F;simpleagent&#x2F;conf&#x2F;JADE-1_0.xsd&lt;br &#x2F;&gt;
    jadeArgs=$JBOSS_HOME&#x2F;server&#x2F;simpleagent&#x2F;conf&#x2F;jadeboot.properties&lt;&#x2F;p&gt;
&lt;p&gt;Running JBoss with JADE container&lt;br &#x2F;&gt;
- Run JBoss with the simpleagent environment by executing the following command at $JBOSS_HOME&#x2F;bin&lt;br &#x2F;&gt;
    run -c simpleagent&lt;br &#x2F;&gt;
- If all goes well, you should see no errors in the startup process and a JADE Remote Agent Management GUI appears (only for simpleagent and demoagent groups).&lt;br &#x2F;&gt;
- JADE is now manageable as a service under JMX - go to http:&#x2F;&#x2F;localhost:8080&#x2F;jmx-console&#x2F;&lt;&#x2F;attribute&gt;&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Java Tip #1: Defensive copies</title>
    <published>2003-06-17T02:03:06+00:00</published>
    <updated>2003-06-17T02:03:06+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/17/java-tip-1-defensive-copies/"/>
    <id>https://chuyeow.wtf/2003/06/17/java-tip-1-defensive-copies/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/17/java-tip-1-defensive-copies/">&lt;p&gt;Something that could easily be missed when programming in Java is inadvertently exposing the internals of a supposedly encapsulated field to clients of your class. Consider the following naive implementation of a rectangle class that disallows negative dimensions:&lt;br &#x2F;&gt;
&lt;code language=&quot;Java&quot;&gt;&lt;br &#x2F;&gt;
public final class MyRectangle {&lt;br &#x2F;&gt;
  private final Dimension dim;&lt;&#x2F;p&gt;
&lt;p&gt;  public MyRectangle(Dimension dim) {&lt;br &#x2F;&gt;
    if( dim.height &lt; 0 || dim.width &lt; 0 ) {&lt;br &#x2F;&gt;
      throw new IllegalArgumentException(&quot;Dimensions cannot be negative&quot;);&lt;br &#x2F;&gt;
    }&lt;&#x2F;p&gt;
&lt;p&gt;    this.dim = dim;&lt;br &#x2F;&gt;
  }&lt;&#x2F;p&gt;
&lt;p&gt;  public int getArea() {&lt;br &#x2F;&gt;
    return dim.height * dim.weight;&lt;br &#x2F;&gt;
  }&lt;br &#x2F;&gt;
}&lt;br &#x2F;&gt;
&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
A cursory glance may seem indicate that the class should be immutable and no negative dimensions, and thus no negative areas, are possible. Not true. Consider this bit of code that uses the MyRectangle class:&lt;br &#x2F;&gt;
&lt;code language=&quot;Java&quot;&gt;&lt;br &#x2F;&gt;
Dimension dim = new Dimension(2, 3);&lt;br &#x2F;&gt;
MyRectangle rect = new MyRectangle(dim);&lt;br &#x2F;&gt;
dim.setSize(-3, 4);  &#x2F;&#x2F; modifies rect&#x27;s internal Dimension field!&lt;br &#x2F;&gt;
&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
This is possible because Dimension is a mutable class! Therefore, it is important to make a defensive copy of each parameter to the constructor that is mutable. We can fix the MyRectangle class by changing it&#x27;s constructor like so:&lt;br &#x2F;&gt;
&lt;code language=&quot;Java&quot;&gt;&lt;br &#x2F;&gt;
  public MyRectangle(Dimension dim) {&lt;br &#x2F;&gt;
    this.dim = new Dimension(dim);  &#x2F;&#x2F; make defensive copy&lt;&#x2F;p&gt;
&lt;p&gt;    if( dim.height &lt; 0 || dim.width &lt; 0 ) {&lt;br &#x2F;&gt;
      throw new IllegalArgumentException(&quot;Dimensions cannot be negative&quot;);&lt;br &#x2F;&gt;
    }&lt;br &#x2F;&gt;
  }&lt;br &#x2F;&gt;
&lt;&#x2F;code&gt;Notice how a copy of the Dimension parameter is made, so that the client has no reference (and thus no access) to the internal dim field of the MyRectangle object. The same has to be done in the case where accessors return mutable fields - make sure to return defensive copies. The rule is never to directly return the internal field to a client class - always create a defensive copy and return that instead, so that there is no handle into the object internals.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Winners of JavaWorld 2002 Editors&#x27; Choice Awards</title>
    <published>2003-06-10T15:07:14+00:00</published>
    <updated>2003-06-10T15:07:14+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/06/10/winners-of-javaworld-2002-editors-choice-awards/"/>
    <id>https://chuyeow.wtf/2003/06/10/winners-of-javaworld-2002-editors-choice-awards/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/06/10/winners-of-javaworld-2002-editors-choice-awards/">&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.javaworld.com&quot;&gt;JavaWorld&lt;&#x2F;a&gt; has announced the &lt;a href=&quot;http:&#x2F;&#x2F;www.javaworld.com&#x2F;javaworld&#x2F;jw-06-2003&#x2F;jw-0609-eca.html&quot;&gt;winners of the JavaWorld 2002 Editors&#x27; Choice Awards&lt;&#x2F;a&gt;. These are the results (with my predictions ;))&lt;&#x2F;p&gt;
&lt;pre&gt;
Best Java Data Access Tool: 
  Winner: &lt;strong&gt;Oracle 9iAS TopLink&lt;&#x2F;strong&gt;
  Finalists: CocoBase Enterprise O&#x2F;R 4.5, Hibernate 1.2.4
  My prediction: N&#x2F;A
Best Java IDE:
  Winner: &lt;strong&gt;IntelliJ IDEA 3.0&lt;&#x2F;strong&gt;
  Finalists: Borland JBuilder 8.0, Eclipse 2.1
  My prediction: Borland JBuilder 8.0 (makes me want to evalute IntelliJ IDEA)
Best Java Performance Monitoring&#x2F;Testing Tool:
  Winner: &lt;strong&gt;JUnit 3.8.1&lt;&#x2F;strong&gt;
  Finalists: JProbe 5.0, Optimizeit Suite 5
  My prediction: JUnit 3.8.1 (no doubts about this one)
Best Java Application Server:
  Winner: &lt;strong&gt;BEA WebLogic Server 8.1&lt;&#x2F;strong&gt;
  Finalists: IBM WebSphere Application Server 5.0, JBoss 3.0
  My prediction: BEA WebLogic Server 8.1 (no doubts about this either)
Best Java Device Application Development Tool:
  Winner: &lt;strong&gt;Java 2 Platform, Micro Edition (J2ME) Wireless Toolkit 2.0&lt;&#x2F;strong&gt;
  Finalists: IBM WebSphere Studio Device Developer 5.0, Sun ONE Studio 4 Update 1 ME
  My prediction: J2METWK (I&#x27;ve used this and it&#x27;s perfect! Sun ONE Studio ME is a
    little too cumbersome to use.)
Best Java-XML Tool:
  Winner: &lt;strong&gt;Xerces2 Java Parser 2.4&lt;&#x2F;strong&gt;
  Finalists: JAXB (Java Architecture for XML Binding), Xalan-Java 2.5
  My prediction: N&#x2F;A
Best Java Installation Tool:
  Winner: &lt;strong&gt;Java Web Start 1.2&lt;&#x2F;strong&gt;
  Finalists: InstallAnywhere 5, InstallShield MultiPlatform 5
  My prediction: N&#x2F;A
Best Java Book:
  Winner: &lt;strong&gt;Patterns of Enterprise Application Architecture (Martin Fowler et al.)&lt;&#x2F;strong&gt;
  Finalists: Java Development with Ant, Java Performance Tuning, Second Edition 
  My prediction: Java Development with Ant (I&#x27;m reading it now. And it is GOOD.)
Most Useful Java Community-Developed Technology:
  Winner: &lt;strong&gt;Apache Ant 1.5&lt;&#x2F;strong&gt;
  Finalists: Eclipse 2.1, Tomcat 4.1
  My prediction: Apache Ant 1.5 (Of course)
Most Innovative Java Product or Technology:
  Winner: &lt;strong&gt;AspectJ 1.0.6&lt;&#x2F;strong&gt;
  Finalists: Eclipse 2.1, JavaServer Faces
  My prediction: N&#x2F;A (unfortunately I&#x27;ve not caught up with what AspectJ is)
&lt;&#x2F;pre&gt;
</content>
  </entry>
  <entry>
    <title>Design Patterns ebook</title>
    <published>2003-05-31T14:59:06+00:00</published>
    <updated>2003-05-31T14:59:06+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/05/31/design-patterns-ebook/"/>
    <id>https://chuyeow.wtf/2003/05/31/design-patterns-ebook/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/05/31/design-patterns-ebook/">&lt;p&gt;I came across this great free ebook entitled the &lt;i&gt;The Design Patterns Java Companion&lt;&#x2F;i&gt; available &lt;a href=&quot;http:&#x2F;&#x2F;www.patterndepot.com&#x2F;put&#x2F;8&#x2F;JavaPatterns.htm&quot;&gt;here&lt;&#x2F;a&gt;. I&#x27;m not sure why it is free, but it seems a legitimately free copy seeing as &lt;a href=&quot;http:&#x2F;&#x2F;www.javacoding.net&quot;&gt;JavaCoding.net&lt;&#x2F;a&gt; links to it prominently. I&#x27;m barely past the first chapter and skimmed through it quite a bit, and it seems to be a very useful example type book.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>DAML&#x2F;XSLT update</title>
    <published>2003-05-30T14:58:03+00:00</published>
    <updated>2003-05-30T14:58:03+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/05/30/damlxslt-update/"/>
    <id>https://chuyeow.wtf/2003/05/30/damlxslt-update/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/05/30/damlxslt-update/">&lt;p&gt;Following up on my previous post on the &lt;a href=&quot;http:&#x2F;&#x2F;www.davincinetbook.com:8080&#x2F;daml&#x2F;damlxslt&#x2F;DamlXSLTAnnouncement2.html&quot;&gt;DAML&#x2F;XSLT Adapter&lt;&#x2F;a&gt;. It seems to do quite a good job at translating a DAML document into XML format, but it does choke when a complex ontology is used. Among other things, it produces &amp;lt;null&amp;gt; tags when it encounters certain DAML tags, and trips up when translating tags with fully qualified names (QNAME). It also seems, sadly, that the project is dead, seeing as the last update was back in July 2001.&lt;&#x2F;p&gt;
&lt;p&gt;Nevertheless, it will do for now and is sufficient for my project. All I got to do now for the PDA side is to write a parsing engine using &lt;a href=&quot;http:&#x2F;&#x2F;www.kxml.org&quot;&gt;kXML2&lt;&#x2F;a&gt; to translate the XML format into DAML model Java objects. On the heavy-weight peer side (mainframe or workstation), we can use the &lt;a href=&quot;http:&#x2F;&#x2F;www.hpl.hp.com&#x2F;semweb&#x2F;jena.htm&quot;&gt;Jena toolkit&lt;&#x2F;a&gt; from HP to instantiate DAML model Java objects from the ones I wrote, and write them out to a DAML file. I can only hope I have enough time to finish it, because I&#x27;m still fairly new to DAML, and have never actually done XML parsing before. Would have liked to use &lt;a href=&quot;http:&#x2F;&#x2F;jakarta.apache.org&#x2F;commons&#x2F;digester.html&quot;&gt;Digester&lt;&#x2F;a&gt;, but it&#x27;d be difficult to port to the PDA. We did consider hand-rolling our own lightweight Digester clone for the PDA, for good abstraction and easy maintainability, but neither time nor expertise are on my side.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Jakarta Commons - Digester component</title>
    <published>2003-05-28T14:56:44+00:00</published>
    <updated>2003-05-28T14:56:44+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/05/28/jakarta-commons-digester-component/"/>
    <id>https://chuyeow.wtf/2003/05/28/jakarta-commons-digester-component/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/05/28/jakarta-commons-digester-component/">&lt;p&gt;The &lt;a href=&quot;http:&#x2F;&#x2F;jakarta.apache.org&#x2F;commons&#x2F;digester.html&quot;&gt;Digester component&lt;&#x2F;a&gt; of the &lt;a href=&quot;http:&#x2F;&#x2F;jakarta.apache.org&#x2F;commons&#x2F;index.html&quot;&gt;Jakarta Commons&lt;&#x2F;a&gt; project is an extremely useful and well-designed  package that allows you to parse XML files at a higher level of abstraction in Java. This allows developers to concentrate on processing XML rather than get unnecessarily involved in parsing functions. With Digester, you can use simple matching patterns and write corresponding callback functions which are called whenever a match is found. For example, consider the XML snippet below.&lt;&#x2F;p&gt;
&lt;pre&gt;
&amp;lt;book&amp;gt;
  &amp;lt;title&amp;gt;The Hobbit&amp;lt;&#x2F;title&amp;gt;
  &amp;lt;author&amp;gt;J. R. R. Tolkien&amp;lt;&#x2F;author&amp;gt;
&amp;lt;&#x2F;book&amp;gt;
&lt;&#x2F;pre&gt;
&lt;p&gt;In Digester, you can write this (in Java):&lt;br &#x2F;&gt;
&lt;code language=&quot;Java&quot;&gt;&lt;br &#x2F;&gt;
Digester digester = new Digester();&lt;&#x2F;p&gt;
&lt;p&gt;digester.addObjectCreate(&quot;book&quot;, &quot;Book&quot;);&lt;br &#x2F;&gt;
digester.addCallMethod(&quot;book&#x2F;title&quot;,&quot;setTitle&quot;,0);&lt;br &#x2F;&gt;
digester.addCallMethod(&quot;book&#x2F;authors&quot;,&quot;setAuthor&quot;, 0);&lt;&#x2F;p&gt;
&lt;p&gt;digester.parse(&quot;books.xml&quot;);&lt;br &#x2F;&gt;
&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
When Digester parses the XML file (assumed to be &quot;books.xml&quot;), it will create a Book object when it encounters the &lt;book&gt; tag, and it will call the setTitle() and setAuthor() methods with the arguments &quot;The Hobbit&quot; and &quot;J. R. R. Tolkien&quot; respectively upon encountering the &amp;lt;title&amp;gt; and &amp;lt;author&amp;gt; tags. Isn&#x27;t this very intuitive? I think it&#x27;s a very clean abstraction layer on top of XML parsing that allows developers to get on with &quot;real&quot; development work. Once again the Jakarta Project amazes me with what it can do.&lt;&#x2F;book&gt;&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>simkim - embeddable scripting language</title>
    <published>2003-05-26T14:56:25+00:00</published>
    <updated>2003-05-26T14:56:25+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/05/26/simkim-embeddable-scripting-language/"/>
    <id>https://chuyeow.wtf/2003/05/26/simkim-embeddable-scripting-language/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/05/26/simkim-embeddable-scripting-language/">&lt;p&gt;I came across a project called &lt;a href=&quot;http:&#x2F;&#x2F;www.simkin.co.uk&#x2F;index.shtml&quot;&gt;simkin&lt;&#x2F;a&gt; today that is really interesting. For a demonstration, go &lt;a href=&quot;http:&#x2F;&#x2F;www.simkin.co.uk&#x2F;Demo_Java.shtml&quot;&gt;here&lt;&#x2F;a&gt;. Reminds you of XUL, doesn&#x27;t it? Only it uses XML files to allow an easy way to customise your application. XML isn&#x27;t the only way that&#x27;s available, as the script can be stored in something called a TreeNode file or in a database. What&#x27;s more, it can be used in MIDP (see &lt;a href=&quot;http:&#x2F;&#x2F;www.simkin.co.uk&#x2F;Docs&#x2F;java&#x2F;MIDP.html&quot;&gt;here&lt;&#x2F;a&gt;), and it uses &lt;a href=&quot;http:&#x2F;&#x2F;www.kxml.org&quot;&gt;kXML&lt;&#x2F;a&gt;, a lightweight XML parser that I&#x27;m also using for my current project.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>Thinlet</title>
    <published>2003-05-24T14:53:07+00:00</published>
    <updated>2003-05-24T14:53:07+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/05/24/thinlet/"/>
    <id>https://chuyeow.wtf/2003/05/24/thinlet/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/05/24/thinlet/">&lt;p&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.thinlet.com&quot;&gt;Thinlet&lt;&#x2F;a&gt; is a Java GUI toolkit that I&#x27;ve been using in my recent project. It allows you to design the view of your applications using a simple XML format (much like XUL), thereby enforcing clean separation of view and controller, a common fallacy in Swing-based or AWT-based programs (not saying it can&#x27;t be done, but it is often too easy to mush your view and controller together). Best of all, it works on a PersonalJava environment which is the target platform for my application, so there won&#x27;t be problems porting it into PDAs. There is limited functionality, though to be sure, the developers are actively implementing new widgets and functionality upon user requests. For example, automatic sorting of lists and popup (context) menus are already in the latest CVS sources. The developers are also spending time refactoring their design, since Thinlet is basically 1 gargantuan class with 6000+ lines of code. Nevertheless, it&#x27;s simplicity and portability across even limited platforms is a big factor in applications where it matters.&lt;&#x2F;p&gt;
&lt;p&gt;Check out a &lt;a href=&quot;http:&#x2F;&#x2F;thinlet.sourceforge.net&#x2F;demo.html&quot;&gt;demo of Thinlet widgets&lt;&#x2F;a&gt; as well as an &lt;a href=&quot;http:&#x2F;&#x2F;www.mycgiserver.com&#x2F;~thinlet&#x2F;demoamazon.html&quot;&gt;Amazon browser&lt;&#x2F;a&gt; (it works - try searching something on it).&lt;&#x2F;p&gt;
&lt;p&gt;Through my search for a suitable XUL or XUL-like toolkit, &lt;a href=&quot;http:&#x2F;&#x2F;luxor-xul.sourceforge.net&#x2F;&quot;&gt;Luxor XUL&lt;&#x2F;a&gt; and &lt;a href=&quot;http:&#x2F;&#x2F;www.jxul.org&quot;&gt;jXUL&lt;&#x2F;a&gt; turned up. jXUL, unfortunately, has seen no developer activity since late 2001, but Luxor XUL seems great, only it depends too much on Java 2 APIs to port easily. I&#x27;m not too sure about committing to jXUL in future projects without a good look at the functionality provided, but I&#x27;m pretty sure Luxor XUL would be worth more than a look.&lt;&#x2F;p&gt;
</content>
  </entry>
  <entry>
    <title>DAML XSLT</title>
    <published>2003-05-24T14:51:29+00:00</published>
    <updated>2003-05-24T14:51:29+00:00</updated>
    <author><name>Chu Yeow</name></author>
    <link rel="alternate" type="text/html" href="https://chuyeow.wtf/2003/05/24/daml-xslt/"/>
    <id>https://chuyeow.wtf/2003/05/24/daml-xslt/</id>
    <content type="html" xml:base="https://chuyeow.wtf/2003/05/24/daml-xslt/">&lt;p&gt;Michael F. Aube and Susan Post from &lt;a href=&quot;http:&#x2F;&#x2F;www.davincinetbook.com:8080&#x2F;&quot;&gt;Booz Allen &amp; Hamilton&lt;&#x2F;a&gt; had written a DAML&#x2F;XSLT Adapter that allows conversion of an arbitrary &lt;a href=&quot;http:&#x2F;&#x2F;www.daml.org&quot;&gt;DAML&lt;&#x2F;a&gt; document into other formats utilizing an XSLT stylesheet. You can read more about it &lt;a href=&quot;http:&#x2F;&#x2F;www.davincinetbook.com:8080&#x2F;daml&#x2F;damlxslt&#x2F;DamlXSLTAnnouncement2.html&quot;&gt;here&lt;&#x2F;a&gt;. It&#x27;s rather &#x27;academic&#x27;-looking at the moment, but it is a promising project. For one thing, it&#x27;d allow conversion of DAML documents into a more simplified XML format which can then be parsed in restricted Java environments like PDAs.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve been looking for a DAML parser that works on JDK 1.1.8 (which is the JVM version supported on most PDAs), but prolonged searches turned up naught. This seems to be a possible solution to my problems because the heavy-weight peer where the PDA gets the DAML document (wirelessly) from can instead convert it into a simplified XML format suitable for parsing on the PDA. Why parsing? It&#x27;s to allow editing of DAML ontologies via a GUI. When transferring back, the conversion can be done the other way around, with total transparency to users at both ends. I&#x27;ll be looking into this and will update on my experiences working with this.&lt;&#x2F;p&gt;
</content>
  </entry>
</feed>
