Wednesday, December 29, 2004

Combining Java with other languages

How often is language choice dictated by the availability of existing libraries? For me, quite often! I have been looking at two approaches to leveraging Java code for alternative languages/platforms:
  • IKVM - a JVM implementation (uses GNU CLASSPATH) that runs inside Mono and Microsoft's .Net CLRs
  • PyLucene - the large Java Lucene search application is compiled using GNU gcj into native code and then wrapped using SWIG as a Python library
I have used PyLucene with Python: great to be able to effectively use a large Java application in Python. I have not experimented with IKVM yet, but for a practical Java programmer who might need to reuse some code in the .Net framework: it looks promising.

Monday, December 27, 2004

Lisp vs. Java products, ant build process

A few weeks ago, I was talking with one of me consulting customers and we started discussing my commercial KBtextmaster product. I wrote the original 0.x version in Common Lisp and I am almost done with version 2, also written in Common Lisp. My customer stated the opinion that the marketability of compiled Lisp products is small compared to products written in Java. I decided in the last week that he was correct so I dusted off some old Java code (a port of the Lisp code to Java) written a few years go and decided to 'bite the bullet' and starting with the old Java port proceeded with porting over the new Lisp code to Java also.

Anyway, I spent about 5 hours today "coding like crazy" and I was surprised at both how easy it was to port changes over from Lisp to the old Java port code-base and to also update some of the old Java code with newer version 2 algorithms. If my consulting workload is not too much, I expect to get everything done in Java in a few weeks. I also decided to try a different marketing approach: I am going to sell the product for a very low price with a non-commercial (or educational) license and price it quite a bit higher with a commercial use license.

One of the things that I did today was to spend 20 minutes setting up a good ant build process to manage building and deploying the Java code. Ant is so useful to me that I have not bothered looking at alternatives like Maven (which is layered on top of ant).

While I had the flu last week, I made a first cut at a color brochure for the new KBtextmaster product - when it is done, I will post a PDF file :-) I got the idea for doing a color brochure from the people with the semantic web Sesame project: they produced a brochure for Sesame that does a very good job at promoting Sesame (in my opinion).

Saturday, December 25, 2004

Cut down the trees: payoff to political cronies

This is a sad thing to read Christmas morning. The first effect will literally be in my own back yard (I live in the mountains of Northern Arizona).

My criticism is not just of the corrupt(*) Bush administration: the Democratic leadership in this country are also firmly "in the pockets" of large corporations that are no longer even American companies (since Clinton and Bush both worked to make it easy for large corporations to register off shore and avoid tax burdens).

Our government, both democrats and republicans are now the "best that money can buy". A few people in Congress still have some moral fiber and do more or less what is right - but they are a small minority.

Welcome our new corporate overlords :-(

Oh well.

(*) My opinion because Bush put ex-industry lobbyists in charge of oversight of their industries.

PS. I do study history and understand that it is the nature of people in power to become increasingly more corrupt: this has been going on for thousands of years. I believe that the important thing is for people to continually push back by calling elected representatives to task for their transgressions.

Wednesday, December 22, 2004

I may be Java developer, but...

I have sold two C# products in the last 2 days :-)

It definitely seems worth while porting at least some of my text-mining utility libraries from Java to C#. Most of my sales are for Java products with Python and C# about tied for second.

Oh, the crap they try to feed us

I am taking it easy, recovering from flu, so I have the TV on to the news. A headline news item was something like "US economy doing well: GDP is up 4.5%".

I hope that everyone knows what a load of crap Gross Domestic Product (GDP) numbers are - GDP is a poor measure of economic health. If the US has to borrow even more money from foreign banks to pay for government operating expenses, that increases the GDP. Poor quality products give the GDP a double kick upwards: cheap prices promote sales and products have a short life time and must be replaced. Anyway, there are many factors that are clearly (at least in my opinion) bad for our country yet increase the GDP.

The GDP goes up every year no matter what is happening. I wish our government and the news media would stop using meaningless statistics like GDP and get real. BTW, Dave Pollard has a good writeup on this subject.

Monday, December 20, 2004

Open file formats and AbiWord 2.2.2 for OS X

As an author, I own licenses for Microsoft Office for Windows and the Mac. Still, I try to avoid the use of Word as much as I can because of the horrible Microsoft closed file formats. Frankly, I can not understand how large companies and governments can justify the use of closed source proprietary file formats.

When I primarily used SuSE Linux for my desktop, as long as I had a truetype font server set up correctly, I was very happy using (Strangely, OOo runs really well on Windows - go figure.)

Now that I have almost completely converted my business over to using Macs with OS X, I have found myself grudgingly using Word for the Mac (which is quite good). OOo under X11 on the Mac is usable, but far from perfect. I think that the people working on the NeoOfficeJ project (OOo running natively on OS X using Aqua) are doing a great job (I donated money at their site today - in my own interest to encourage people whose work I use!) and I find NeoOfficeJ to be very usable and getting better. In the future, NeoOfficeJ is likely to be my standard writing tool.

I gave AbiWord another look tonight - they have a minor version release since my last look. I liked what I saw:
  • AbiWord file format is clear and easy to parse XML
  • Light weight - loads in a few seconds even on my old iBook
  • Handles imported graphics well - I just save OmniGraffle drawings as TIFF first
  • Seems to generate tables of contents well (but no index building features - needed for very long documents)
I intend to give AbiWord a fair trial. If I do have to occasionally keep using Word for a while on my Macs, at least OOo has a great batch feature: searches nested directories for Word documents and generates OOo XML document files. In a few minutes in batch mode I can generate OOo XML format files for all of the Word documents on my system.

Great! a web site for home/amateur movies is a very cool site. I am down with the flu today so I have been doing more fun-oriented web surfing than I usually do. This site contains excellent short movies - lots of fun.
Creativity space is infinite...

Lisp world: the old and the new

The new: the "so good I can't believe it is free software" DrScheme Scheme development environment has a new 2.09 version available now.

The old: over on the Lisp blogs recently, I saw a reference to the availability Xerox Parc Medley Lisp for non-commercial use. It is bundled with the LFG grammar toolkit. It is available here.

This is the Lisp that I used in the 1980s on my Xerox 1108 Lisp machine. I downloaded the Medley Lisp and LFG grammar bundle (runtime converted to run on Linux) and took a trip down 'memory lane'. (I am in bed with the flu - not well enough to work, but well enough for messing around with old software).

While I use Common Lisp for my Lisp development now, I am so happy to have a non-commercial version of Medley. Wowza!

Sunday, December 19, 2004

Supporting infrastructure for nurturing creativity

I love coincidences in life. I was just thinking how much I enjoy independent and/or non-formula movies (e.g., both Indy films at Sundance and the fabulous Chinese movie "Hero" that combined an amazing plot twist with eye-candy cinematography). A few minutes later, I saw this article about the British plan to install about 250 digital projectors in theaters throughout the United Kingdom. This will open up the possibility to produce and distribute very low budget movies made with digital video technologies - a very good thing! I would like to see the same thing in the USA.

I admit to being too optimistic, but I look forward to a future where instead of lusting after excess material goods (the production of which places too high of a burden on our delicate ecology), people will become more interested in low-resource cost creative activities like getting together to produce low budget movies and plays, writing, playing games, cooking gourmet food, crafts, writing software <grin>, etc., etc.

Creativity in play and work needs a little infrastructure, but not much compared to expensive social support programs and waging wars. Although the world is suffering from some bad leadership (even a little worse than usual, I think), I am somewhat optimistic about the future.

Why should the USA have to be a net importer of food? And, starving children.

For the first time in about 50 years the US is importing more food than we are exporting.

Another legacy of the Bush administration economics. As Dave Pollard said (unfortunately this is accurate) "Rich Get Richer, Poor Children Dying" is the likely legacy of this era. 400,000 Iraqi children with long term health threatening chronic diarrhea and 1 billion children in the world living in poverty. As US citizens we are responsible for the Iraqi children and we share the shame of 1 billion ill-fed children with the rest of the world.

I like what Colin Powell told Bush about Iraq: "You break it, you own it". Unfortunately Bush seems to be trying to (metaphorically) sneak out of the store after breaking something. Bush's concept of being a Christian and my concept of being a Christian differ greatly, BTW.

Speaking of religion, I received an interesting letter from an official with the Quaker American Friends Service Committee (one of my favorite charities - most of the money donated to them actually goes to helping people build sustainable clean water supplies, build small scale food producing infrastructure, etc.). In this letter is the claim that I believe that many Christian religious leaders in the US personally tried to contact Bush during the lead up to the invasion of Iraq and Bush refused to have any contact with religious leaders who did not agree with his radical foreign policy goals.

Friday, December 17, 2004

NetBeans 4. Free vs. commercial development tools.

I spent some time 'kicking the tires'. Version 4 looks to be a major improvement both in edit/build/test mode and in web app development functionality. It is great that a good IDE like NetBeans is available for free. However, since I earn most of my living designing and writing Java code, I feel that it is worth while buying a 'best of breed' commercial product (which, in my opinion, is IntelliJ).

Same thing with Common Lisp: there are awesomely good free Common Lisp compilers available (e.g., OpenMCL, CLisp, SBCL, CMU). Still, the free tools are just not at the same level as the Xanalys LispWorks and the Franz's Allegro CL. The commercial products provide a richer development environment and library support. Allegro CL is out of my budget price range, so I happily use LispWorks.

Python is the other programming language that I use a lot. I am still trying to find a 'best of breed' Python IDE. I mostly develop on Mac OS X so the ActiveState IDE is not a possibility. I have tried a trial version of the WingSoft IDE (runs under X11 on Mac OS X) and it is good but just not at the same level as IntelliJ or LispWorks. So, I just use Emacs (for about 15 years, I did all of my coding in Emacs, but productivity-wise, Emacs is simply not competitive with commercial IDEs like IntelliJ).

Anyway: great work on the new NetBeans release!

Wednesday, December 15, 2004

OS X 10.3.7 upgrade: wowza!

What a great upgrade! 3D graphics in Croquet is noticeably faster and scrolling long web pages in Safari definitely is smoother and faster.

I used to be a big Linux fan (a Linux user since downloading Slackware over a 2400 baud modem over 10 years ago), but Mac OS X is such a better user experience (for coding, writing, web access) that I just use Linux on my servers now. Oh well.

It is even better that I hardly ever have to boot a Windows machine anymore (but I do keep one handy - work for some customers does occasionally require it).

I seems a little funny that I even care about operating systems: my favorite software (IntelliJ, LispWorks, Emacs,, FireFox, etc.) all runs well on OS X, Windows, and Linux. Still, using a Mac just seems so much nicer to me - really, no comparison.

Sunday, December 12, 2004

I think that I will buy a PlayStation Portable (when available in the US)

I was fortunate enough to work in the game industry for a few years (hired to do 'game AI', but also did multiplayer networking, and lots of other fun stuff), working on two Nintendo games, a PC networked hovercraft racing game, and a virtual reality system for Disney. Anyway, I think that Sony has hit it right with the PlayStation Portable: a balance of great style, features, and portability.

I like Sony products because for me they have 'lasting power'. I bought my Sony DSC-F55 digital camera (with audio & video also) 5 years ago, and I still like it. Until it died a tragic death, my Sony Vaio mini-laptop was a prized possession (and my wife also enjoyed it a lot).

I tend to not buy many toys - mostly because I get more pleasure from time with family and friends, and free activities like hiking. However, when I do buy things, I like to buy things with style and quality. Another good example is my Mac iBook: bought it two years ago, and I still get a lot of pleasure from its style and functionality.

Quality over quantity...

Monday, December 06, 2004

Too cool: a 'Comic Book' to teach you Lisp (online web site)

Conrad Barski (M.D.) has written a great comic book style web site to teach you (yes you!) how to program in Common Lisp. Check it out.

I also have a more conventional Common Lisp tutorial that I wrote(*) 2 years ago available: Loving Lisp, or the Savvy Programmer's Secret Weapon.

(*) actually, so many people in the Lisp community helped so much that I feel that it was a group effort.

Saturday, December 04, 2004

Most productive programming languages and platforms

For me this is a tough call. I am an "old Lisper" (I wrote two Springer Verlag Lisp books a long time ago) and while I have been coding for a new product today using LispWorks Common Lisp, I have to say that when it comes to algorithm development and new coding, nothing comes close to Lisp for programming productivity. I have also been working through Mark Pilgrim's fine 'Dive Into Python' book (*), and I certainly consider Python to be another high productivity language.

That said, for so many of my work tasks, the breadth of Java platfom tools "nukes" the productivity advantages of Python and Lisp. As I have mentioned recently, I am finding XML-RPC to be an excellent bridge for tying together Lisp, Python, and Java code. But, there is a definite performance overhead for XML-RPC calls. Anyway, I keep finding myself making the following decisions over, and over again:
  • If my job task requires any J2EE functionality, then code in Java
  • Else: is it a small job and runtime performance is not much of an issue: then use Python
  • Otherwise: use Commn Lisp for programmer productivity and superb runtime performance
Sorry if this seems like a stupid blog post, but: choosing language/platform is an issue that I face all the time. In the best of worlds, I would have the entire J2EE stack (and other Java goodies) available as Common Lisp libraries and tools.

I can imagine a year or two from now when the Python tools and available software stacks "catch up" with Java - then I might just switch over to Python as my primary development language (and ignore performance problems).

(*) I have started once again seriously studying Common Lisp (mostly with Paul Graham's books)

Wednesday, December 01, 2004

How much productivity is lost due to Microsoft software?

We have just 2 Windows PCs (2000 and XP), but we have 3 Mac OS X systems and one linux box. I spend so much more time keeping the Windows PCs running properly than all of the other computers together, and by a factor of 2 or 3.

Can you feel my frustration :-(

Really, the best computers are the OS X machines: everything works with minimal administration activities.

I think that the problem with Microsoft Windows is simply that marketing and adding new features is more important than producing stable, relatively secure software.