Sunday, February 27, 2005

Why P2P like Bit-Torrent needs legal protection

P2P technologies allow end users to provide bandwidth for file sharing instead of relying on large central servers that cost the content providers money. I frequently use Bit-Torrent to grab ISO images for Linux installs. Some people break the law using cars or guns, but we do not outlaw cars and guns - we just punish people who use them illegally. It should be the same way with P2P: if someone makes copyright movies available, that is wrong, and should be punished. Making the technology illegal is also wrong.

I think that one reason the big media companies lobby Congress to outlaw P2P technologies has nothing to do with current illegal use of these technologies. Instead, I think that they see a long term threat as entertainment markets are opened up to independent producers who find that their production costs are slashed using digital media and close to free distribution via P2P. A lot of people do not seem to mind commercials in network TV so why not fund Indy movies with a few embedded commercials? Same idea for musicians: produce low cost music videos and distribute them via Bit-Torrent (and if they get to be popular, add a few short targeted commercials).

Saturday, February 26, 2005

Pushing Java back into the background for web applications

ServerSide has an article on IBM's support for PHP. As a Java developer, I don't think that this is anything to worry about, mainly because I specialize more in back end server side Java that JSPs, struts, etc. (although I also do a lot with the presentation layer).

Actually, I like PHP a lot for smaller web apps that don't have to scale, etc. I installed SugarCRM (a CRM system written in PHP) for a customer last year, and liked it.

With light weight communication there is no reason why the presentation for web application can not be done lightly (e.g., CherryPy for Python developers, Rails for Ruby developers, PHP, etc.) with back-end processes written in heavier weight languages like Java or Common Lisp.

Java Trails, Ruby Rails

I spent a few hours with Ruby Rails recently and liked it a lot - looked great for building simple database driven form web applications. I have been looking at Java Trails this morning and it looks similar to Rails, but not quite as flexible because Ruby is a dynamic language (fair enough).

I usually build complex web applications so Rails and Trails are not quite what I need, but I will likely use both in the future for simple projects - both look like real time savers.

Is the dollar 'being dropped'?

Check out these international news stories.

This link is Google News, so the links that you see in the future may differ from what I just read:

Russia has been moving away from the dollar for cash reserves and towards using the Euro to sell oil (Russian Pravda news) and there is little we can do about it (compare this to other oil producing countries like Iraq, Venuzuela, and Iran - their switching to using the Euro to sell oil has caused extreme responses from the US government in the last 3 years).

"Federal, corporate and private debt is in the trillions, and Japan and China could wreck our economy just by dumping the debt paper they hold on the market." This would be very bad for them also, but it is still disturbing to not control our own fate.

One last good read: Conservative writer Patrick J. Buchanan blasts Bush's foreign policy and the neoconservatives who seem to have hijacked our government. A quote from his article: "In 2003, we invaded a nation that had not attacked us, did not threaten us, and did not want war with us to disarm it of weapons it did not have. Now, after plunging $200 billion and the lives of 1,400 of our best and bravest into this war and killing tens of thousands of Iraqis, we have reaped a harvest of hatred in the Arab world and, according to officials in our own government, have created a new nesting place and training ground for terrorists to replace the one we lately eradicated in Afghanistan."

Tuesday, February 22, 2005

Legislating against municipal broadband: let the corruption begin

Hang on to your hats for this one: big Telecom corporations are spending (bribing?) a lot on corrupt politicians who would dare to pass legislation that is so obviously against the public interest. Using wifi like technology, communities can very inexpensively provide a low bandwidth (via socket throttling) wireless service to local citizens.

If anyone has any arguments for how legislation forbidding local governments from stimulating local economies, helping all students and citizens have free Internet access, etc. is harmful to society, let me know - I am interested in hearing both sides.

I don't care how busy you are today, use CONTACT YOUR SENATORS and CONTACT YOUR CONGRESS PERSON about this. Not all polititions are on the take from large corporations (yet), so it really does help to make a little noise. Push back.

Monday, February 21, 2005

CORBA, SOA, Semantic Web

Way back when a good CORBA implementation was provided for FREE with Java JDKs, I thought that this is it, CORBA will be the universal glue that binds remote applications together, opens up business opportunities for small developers to sell software and information services, etc.

Much to my surprise and disappointment, CORBA, although widely used, did not become the universal 'glue' that I thought that it would. When I started to use SOAP and XML-RPC based web services, I felt the similar excitement that I first felt when I started to use CORBA, but we will see if disappointment sets in.

I believe that one huge business opportunity for CORBA/SOAP/XML-RPC based web services will be delivery of "cleaned up" and standardized data as per ideas for the Semantic Web. I have written about this before in both my published books and this blog, but I think that this deserves repeating:
  • Identify high value information areas and design ontology's to define terms, constraints, etc.
  • Use an ontology as a kind of API for requesting and receiving structured information
"Sanitizing" and cleaning up data is a lot of work - if we can agree on standard ontology's for different subjects, business areas, etc., then large and small companies can compete with supplying information in the domains that they specialize in. Using standard ontology's will allow customers to switch information vendors if they are unhappy with service or feel like they can get a better deal.

Sunday, February 20, 2005

Real patriotism; paper on oil/economic warfare against the US

For years, I have said that the single most patriotic thing that Americans can do is to try to reduce their use of oil and natural gas. This point was reinforced today as my wife and I drove across Arizona to visit relatives: I was driving our 40MPG car at the speed limit while watching HUGE vehicles with one driver, no passengers speed by often 20 MPH over the speed limit. These selfish assholes do not care about the long term health and vitality of our country.

This article on Chinese plans to topple the US economically seems a little over the top and exaggerated to me, but is still an interesting read and serves as a good start to a dialog that I would like to see occur more in the US: how can we insure long term that we will enjoy a reasonable quality of life? The simple answer is to conserve and save something for our kids and grandkids. A longer answer would deal with saving money to wheather the economic storm that will start when the world switches from using dollars to using Euros to buy oil, and the general downward settling of our economy when the rest of the world decides to stop loaning us money to pay for our excesses. It is not often talked about, but in the US we depend on foreign banks to fund our massive debts and we are at constant risk that for any of several possible reasons the rest of the world decides to "pull the plug" on us, in spite of our powerful military.

Hey, my computer is bothering me while I am working

I saw this article in the NYT linked from Nelson's Blog. I had to laugh.

When I really want to concentrate on work, I boot a no-frills Linux distro, don't check my email frequently, and have my wife answer the telephone. As Ellen Ullman points out in this article, Windows users do get interupted and they do not have as much control over this process :-)

Saturday, February 12, 2005

Dowser: cool clustering search tool

I installed Dowser on my iBook a few weeks ago (binaries are available for OS X and Windows, or build from source - requires Python, SQLite, and PySQLite).

Dowser runs as a mini local web server (uses a browser for UI) that organizes searches using Google, A9, etc. and clusters results. A handy right side menu shows topics discussed in the search results. These topics are links to locally cached previous search results - this mechanism allows cross referencing your search results by automatically assigned topics. Anyway, Dowser is worth a look.

Friday, February 11, 2005

Java code is running faster than equivalent C++ code

I did not believe it at first, but it seems true: a fuzzy matching algorithm that I wrote is running faster implemented in Java than in C++ (about 5% faster).

A few caveates: the Java code is part of a large very long running server process so Hotspot has had a lot of time to optimize the code. Also, about 90% of the runtime of the entire system is in the small section of code that I reimplemented in C++ - this is about as good a scenario for Hotspot optimization than you could hope for. The particulars:

Java JVM: J2RE 1.4.2 IBM build for PowerPC.
C++: GNU g++ used with -O3

The code uses a packed block of 8 bit byte values that is about 4 megabytes. There is no code in this algorithm that could be optimized away: just some nested loops comparing byte values and performng a few sums.

Java on the server is not slow! This is for a customer project, and to get better performance I was willing to recode the whole thing in C++ if there had been an appreciable performance gain - obviously I won't do that now :-)

Thursday, February 10, 2005

Coolest thing in the FSF online store

I just received a UPS delivery yesterday of a box of goodies that I ordered from the FSF online store. My favorite item: a stainless steel traveling coffee cup - I really like it. I also ordered Gnu/FSF branded clothing, but the cup is the coolest thing that I ordered. Drinking from it right now :-)

Tuesday, February 08, 2005

Now both SWI-Prolog and XPCE are LGPL

Jan Wielemaker has for years produced one of the great Prolog development kits. I know that to some programmers, Prolog seems like an esoteric language, but for some applications it is probably the best language to use; for example, these application areas are good candidates for prolog development: graph theory, search, natural language processing, constraint satisfaction. There are good free Prolog tutorials on the web, and if you really like the language, I could recommend the book "The Art of Prolog" (actually, there are many fine Prolog books - that is just the one I have purchased most recently).

XPCE is a very cool GUI cross platform platform that is implemented in Swi-Prolog. Jan has written some very interesting applications using XPCE, like Triple20 (RDF/RDFS/OWL visualisation and editing tool).

Monday, February 07, 2005

Qt GPLed for Windows

I guess that this is good news. I wrote the Qt chapter for "Linux Programming Unleashed" (first edition) and always thought that Qt was a great cross platform UI toolkit.

I have been intending to try the Python Qt bindings (on Linux) and this GPL release for Windows might give me a little incentive to spend the time.

Very useful: PyDev on Eclipse

For my Java development, I usually "live" in IntelliJ. However, I do also use Eclipse and I decided to give the Eclipse Python development kit PyDev a try today. Very useful!

As much as I like Java for medium to large scale server side projects, I am getting more and more into Python. I am thinking of changing my title from "Java consultant" to "Java and Python consultant" :-)

Python as a language and a platform hits the 'sweet spot' for rapid development of small and medium scale projects.

Another great feature that I like about Eclipse is that it is as a platform for writing and running your own tools (the book "Contributing to Eclipse" is a good reference for this). I tend to enjoy experimenting with many tools and technologies, but if I start doing more work in Python (I am mainly just working on a GPLed fun project in Python right now), I might switch back to Eclipse as my main development environment.

Sunday, February 06, 2005

Installing Eclipse 3.01 on PowerPC Ubuntu Linux

I was going to try an install from source until I found directions for just rebuilding the native code launcher and SWT .so libraries for the PowerPC architecture, starting with a x86 Linux GTK distribution.

In order to get the build to work, I had to make 2 small changes:

1. ln -s /usr/X11R6/lib/libXtst.so.6 /usr/X11R6/lib/libXtst.so
2. Compilation error: missing XTest.h, so I just commented out that include file

Saturday, February 05, 2005

Sweet: Ubuntu Linux on an iBook

Pardon me if I have been too enthusiastic lately about Ubuntu Linux, but after installing it on my iBook, I am an even bigger fan. Great distro!

To install it, I connected my iBook to my desktop Mac with a firewire cable, and booted my iBook holding down the "t" key to boot the iBook as a remote disk. I then ran iPartition (commercial product) on my desktop Mac to free up 9 gigabytes for Linux partitions on the iBook. Using the PowerPC Ubuntu install CDROM, installation was a snap and now my old iBook just increased in value to me. I have an old style airport card, which Ubuntu recognizes - newer iBooks with 802.11g airport cards loose out: the manufacturer for the newer card does not release driver specs.

Linux TCO vs. Windows TCO

Total Cost of Ownership (TCO) depends so much on business (or personal) requirements that it just does not make sense to make generalizations. A key decision point is often: 'we have to run this off the shelf software, and only a Windows version is available'. This is commonly the case in banks, stores, etc that purchase complete solutions that include Windows clients.

For me personally, TCO has more to do with how many hours a month do I need to spend to administer the computers that I need for my consulting business. Admin time is non-billable time. I use Mac OS X, Ubuntu (Debian derived) Linux, and Windows. I find that the admin time required for OS X and Ubuntu is far less that for Windows - way less. Still, for some jobs I need to use Windows, so I live with higher administration overhead.

A customer of mine has a large work group in India (with just a few of us in the US) and is looking to move away from a Windows desktop. I think that the OpenOffice.org support for Microsoft Office file formats is so good now that they should be able to do this, but it would be naive to not expect human/labor costs in the switch. The big win is long term: not dealing with software license keys, no pressure of forced updates when current systems meet operational requirements, no ongoing software licensing costs, etc. One great thing about Linux is that it tends to run well on lower cost hardware: in 1992 I ran Linux, X windows, and C++ development tools on a used laptop (5 MBytes of RAM, really small disk) and today, I get surprisingly good use out of a $200 Chinese manufactured PC (I did add more memory to it, so it was really a $250 PC). Because I use this PC a lot (with Ubuntu Linux on it) running OpenOffice.org, and IntelliJ Java IDE, I am occasionally tempted to invest a little money and some (non-billable) admin time replacing it with a faster box - but, with Linux, even this low end PC is so useful, I don't feel like investing the time to upgrade the hardware.

My personal preference is to run OS X, but I feel like there are long term advantages to mastering the Linux platform, both server side and on the desktop. So for strategic reasons, I find myself booting Linux more often.

Wednesday, February 02, 2005

I did not intend to rag on Apache, BSD, etc. licenses last night

I was a little annoyed when I wrote my post last night: on top of the lame Sun open source license the OSI annoyed me also. Anyway, there is lots of room for Free Software (GPL), Open Source (BSD, Apache, etc.), and commercial software.

In any case, I am not annoyed by the BSD and Apache licenses - just Sun's license.

Tuesday, February 01, 2005

Open Source vs. Free Spoftware: brown nosing vs. doing what is right

Yeah - been reading Eric Raymond's replacement Russ Nelson over on Slashdot. I used use the Open Source 'artistic license' for my little open source offerings. After the fiasco of the OSI approving Sun's lame open source license, I have been rethinking the whole Open Source (MIT, BSD, Apache, etc). vs. Free Software (GPL) thing. So many businesses have been co-opting non-GPL licensed open source software, that I think it it is time to come down hard in favor of the GPL.

Now, I feel like a little bit of a hypocrite: I just released a commercial product with a few useful features added because I included Apache licensed utilities. Believe me - I am thinking about that - been thinking of releasing just my AI stuff as GPL (*), but not quite there yet. Anyway, I have been working hard on a new Free Software project in Python, and I am absolutely going to release it under GPL.

(*) I have been considering releasing under GPL with an alternative $$ license for commercial non-GPL use - but that also seems not quite right to me, although it would nudge others to use the GPL.

PS. from Slashdot:
If the CDDL is a weapon against free software, why isn't the

Mozilla license a weapon against free software? The two of them
differ only slightly.
-russ
Wow! - I find this scary that the guy taking over OSI does not understand the ramifications of deleting the "..and other open source licences" clause from the Mozilla license to create the CDDL - wow! What good is access to source code to you if you can not use it legally!

PSS. I did like some of Russ's political comments on Slashdot: for example, "Trail of Tears" (happened near where I live in Arizona - US government (or at least one local general) murdering Indians: ugly).

Feels good: donating to FSF, Debian, Ubuntu

As individuals, we can collectively do a lot of good by donating money where it does real good (fighting corporate interests, feeding the hungry, and donating to worthwhile IT projects). I just invested (yes, I consider this an investment!) by making small donations to the FSF, Debian, and Ubuntu Free Software projects.

BTW, I have a friend who lives for charitable work - several years ago, he gave me some great advice on which charities to avoid (or contribute to) based on how much money they spend in administration costs. I have monthly donations taken out of my credit card for the American Friends Service Committee, Habitat for Humanity, and the Heifer Project - all recommened!! Also, if you make monthly contributions to a charity, make sure that you call them up and have them *not* send you information and requests for more money in the mail - that is administrative overhead - ask, and they will just quietly take your money and not waste it on mailings back to you.

Ubuntu Linux: yes, it rocks!

I have been using Ubuntu Linux on both PowerPC (dual booting a Mac) and an Intel based PC. For Java developers, Ubuntu on an Intel PC is a better experience (just get Sun's JDK 1.5 as a tar distribution, un-tar it where ever, set JAVA/bin in PATH and set JAVA_HOME) where as for the PowerPC you need to get IBM's JDK 1.4.2 distribution - but that works great, if a little more work to install. If you use IntelliJ on PowerPC, set the -Didea.no.jdk.check=true option because IntelliJ wants JDK 1.4_04.

Ubuntu, except for a few development tools, does a great job setting up by default what most people need (firewall, OpenOffice.org, Mozilla Firebird, etc.)

Tomcat v.5.5.7 for JDK 1.5. Also: JDK 1.5 vs GNU Java

Wow, first of all, a small (5 MB) download! Taking advantage of more JDK 1.5 libraries. At least on (Unbuntu) Linux, I switched over to using JDK 1.5, so using the new stable version of Tomcat makes sense.

I feel a little like I am being pulled in two directions: I enjoy the new JDK 1.5 language features and performance boosts. On the other hand, I have a long term goal of releasing some of my commercial Java products as Free Software (GPL) and for those, I want to provide both ant build.xml files to build for Sun's JDK 1.5 and unix make files to build using the GNU gcj native Java compiler - so, I need to be just a little careful using new language feature for Free Software releases.