Atom Atom feed

GPLv3 Released, Apache Rejects Compatibility Claim

The Free Software Foundation released GNU General Public License, version 3 (GPLv3) yesterday.

FSF: Version 3 of the GNU GPL strengthens this guarantee, by ensuring that users can modify the free software on their personal and household devices, and granting patent licenses to every user. It also extends compatibility with other free software licenses and increases international uniformity.

One of the gaols of GPLv3 is to make it compatible with the Apache License 2.0.

Richard Stallman: GPLv3 is now compatible with the Apache 2.0 license

However, Sam Ruby—"Hey, I just might be “whomever”. :-)" of Apache Software Foundation—reacted negatively to the compatibility claim:

Sam Ruby: The GPL V3 license is compatible with the ASF V2 license in precisely the same way that blood type AB is compatible with blood type O.

Specifically,

Sam Ruby: Apache Software Foundation will not distribute code which has either a direct dependency on GPL licensed code, or will only meaningfully operate when GPL code is installed.

The license war continues.

Friday Java Quiz: What Will It Print

(This week's Friday Java Quiz is contributed by WeiqiGao.com correspondent Brian Gilstrap.)

View From The Fringe: Suppose you have the following two classes:

public class Test {
    public static void main(String[] args) {
        System.err.println( Foo.class.getName() );
        System.err.println( "Testing, 1, 2, 3..." );
        new Foo();
    }
}

public class Foo {
    static {
        System.err.println( "Foo here." );
    }
    public Foo() {
        System.err.println( "New Foo!" );
    }
}

Without running this program, do you know what the output will be?

Comments are directed to View From The Fringe.


BTW, the class in last week's quiz actually compiles and run fine on Linux systems. The $^A is a legal Java identifier. It is only on the less capable Windows systems that the resulting class file cannot be written to the file system. You would have the same problem with Java classes named COM, PRN, LPT1, COM1, etc.

Read more...

Tags :

Quote Of The Day

Did Jeff say that?

Eric Niebler: [...] I drift back into the real world and hear this gem from Jeff as he compares ASIO to the popular ACE library: "ACE is an open source project, so you’re free to download it, look at the source code, and be horrified."

Tags :

Which Direction Is Back When You Move Something Back A Week

In the tradition of asking the internet to clarify timing phrases (see the When Is Next Tuesday? post 686 days ago), I'll post another question.

I am always confused a little bit when someone mentions that an event has been "moved back."

So here's a simple question: If Dave is scheduled to give a presentation on the 15th of next month, and he can't make it on that day so he moves the presentation back a week, when is the presentation?

  1. the 8th
  2. the 22nd

What if Dave moves the presentation up a week?

Tags :

Friday Java Quiz: Will This Code Compile

Without firing up your Java compiler, guess if the following class will compile:

interface $^A {}

where "^A" is the character whose ASCII value is 1. (You enter it as ^V^A in vi or C-q C-a in Emacs.)

Tags :

Getting Sun Java 5 On Debian 4.0: So Easy

First the goods.

The official Debian 4.0 contains Sun JDK 5 in its non-free section. To get it, you edit /etc/apt/sources.list to enable the non-free repository, and then run apt-get install sun-java5-jdk.

Here's my /etc/apt/sources.list (with my changes high-lighted in red):

#
# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official amd64 DVD Binary-1 200704
07-12:15]/ etch contrib main

deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official amd64 DVD Binary-1 20070407
-12:15]/ etch contrib main

deb http://ftp.debian.org/debian/ etch main non-free
deb-src http://ftp.debian.org/debian/ etch main non-free

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

Running apt-get install sun-java5-jdk caused apt-get to include several other dependencies and suggested other packages to install. I installed the suggested packages as well, with the exception of the plugin packages, which do not exist for the AMD64 architecture.


When I did the Google search, there are suggestions for using the testing or unstable repositories. My local Debian expert warned me that enabling unstable repositories may have far reaching consequences affecting every aspect of the system. So I'll refrain from going there until I've learned a bit more of how Debian works. According to Sun folks, Java 6, NetBeans 5 and GlassFish 1 are in the unstable repository.


Now the essay. (I started this post here, but it got a bit long. So I added the instructions at the top.)

Unlike on Windows or the Mac, there have always been multiple ways to install Sun's JDK on Linux systems:

  1. Download a self-extracting rpm from Sun and install it
  2. Download a self-extracting binary from Sun and install it
  3. Getting it from your Linux distribution's packages repo

Every time someone like me asks the question "How do I get Java for my Linux," the advice we get usually points to a Sun download. This has always worked fine for me and is the way to go when I wanted the latest and greatest JDK. All the navigating and clicking is a bit annoying but nothing unusual.

However, there are several drawbacks of this approach, some perceived and some actual:

  • It doesn't feel right
  • It's not hooked into the dependency management infrastructure of the Linux distribution
  • It's more complicated than the process of getting other programming languages

Added to the confusion is the fact that many Linux distributions supply an alternative, incomplete, but free software implementation of Java in the form of GNU gcj, GNU Classpath and the Eclipse compiler, which are hooked into the dependency management system (meaning you cannot easily get rid of it without also having to get rid of hundreds of other packages, including OpenOffice.org.)

That is why I was excited about JPackage.org's effort to create properly dependency managed packages for the various non-free (Sun, IBM, BEA) JDKs. However, Sun's licensing terms of their JDK made this process more complicated than it needs to be.

The licensing term was relaxed in 2006 to enable Linux distributions such as Debian and Ubuntu and Fedora to include Sun's JDK in their distributions. And the official Ubuntu and Debian releases now does indeed include packages for Sun Java. With this addition, installing Sun JDK is as easy as installing, say, Ruby:

(Go back to the top of this blog entry to see how easy it really is.)

Tags :

Question Of The Day: Sun Java On Debian 4.0

Now that I've switched to Debian 4.0, I'm interested in getting the Sun Java 6 packages installed. If I recall correctly, there was quite a stir during JavaOne when the Ubuntu folks announced that some of Sun's Java products (the JDK, NetBeans and Glassfish) are available in their apt repositories and can be installed with a simple apt-get command.

I also remember someone mentioning that one can apt-get the same packages from Debian. But I did not save the link at the time. And now I can't find it. Searching for "Debian Sun JDK" on the Google yields many hits that are old news now (they were written prior to Sun open sourced their Java). They usually outline the thirteen steps that one has to get through to get the Sun JDK installed.

About the only thing that's relevant is this blurb from NewInEtch page on Debian Wiki:

NewInEtch: Sun Java 5.0 - sun-java5-bin, sun-java5-demo, sun-java5-doc, sun-java5-fonts, sun-java5-jdk, sun-java5-jre, sun-java5-plugin, sun-java5-source (non-free)

So my question today is simply this: What is the Debian way of installing Sun's Java 6 JDK?

[Update] This link seem to contain the most up-to-date information.

Tags :

Goodbye Fedora, Hello Debian

My Fedora 7 Upgrade did not go well (some stupid video driver issue). So I wiped the disk and installed Debian 4.0r0.

Now you debian fans out there, especially those who says "You should be running Debian, the truly free operating system," will endure some of my stupid questions:

Q1: How do I start the SSH server? How do I configure it so that it starts on reboot?

Q2: How do I share the printer that's hanging off of the parallel port of the Debian box? With CUPS?

Tags :

That Explains It

(Via James Strachan's Blog)

Joy of Tech: The Joy of Tech comic

Tags :

Tom Wheeler: NetBeans Platform

Tonight's St. Louis JUG meeting is a fun one. Tom Wheeler, the award winning member of the NetBeans community, was on hand to talk about the NetBeans Platform.

Tom is a very eloquent presenter. That, coupled with the fact that Tom has been using the NetBeans Platform for two years, made this presentation a valuable one. The presentation slides is available here. Here's one slide that will make you think:

Tom Wheeler Deep Thoughts

Other tidbits from the meeting:

  • JetBrains has generously offered IntelliJ IDEA licenses for the presenter and one lucky attendee.
  • KForce, a local IT recruiting company, brought in delicious food, and also raffled off a pair St. Louis Cardinals tickets. They have several Java positions.
  • In an informal survey, Jeff Brown asked about IDE usages. By show of hands, it seems that many people are using Eclipse, a smaller number are using IDEA, and a couple people are using NetBeans. Jeff then asked, "If Eclipse costs $450 a license and you can't see the source, would you still be using Eclipse?" One answered that if that is the case he would be using IDEA instead. Another asked back "Who's paying it?"
Tags :

A Comment On GCJ (It May Not Be Dangerously Buggy!)

(I attempted to comment on Angsuman Chakraborty's blog entry GCJ is Dangerously Buggy, but the blog is not taking comments.)

I ran Angsuman's code (essentially "System.out.println(new java.util.Date());") with the up-to-date GCJ on Fedora Core 6 and it produced the correct result, not the wrong result as Angsuman claimed.

Can anyone else reproduce the claimed behavior?

Tags :

No New Language Features In Java 7?

Elliotte Harold: As for new features in the language, most attendees were lukewarm at best, even when discussing sexy topics like closures. To the extent that the Java language wasn't meeting their needs, most attendees seemed to prefer learning a a new language entirely, such as Scala, rather than adding more features to the Java language. Fortunately for them, Neal Gafter predicted that there will be no new language features in Java 7. Closures and other such major changes will have to wait for Java 8.

The article has been out for 9 days. I made a mental note about this paragraph but did not get around to blog about it until now.

I don't know how realistic Neal's prediction will proven to be. But I do feel that the number of new language feature proposals for Java 7 is too many and the scopes too big to be all adequately designed and agreed upon in time for Java 7 (which is still scheduled for 2008 as far as I can tell) and absorbed by the millions of Java programmers.

That's why I asked 34 days ago:

Me: ... what are they going to do after Java 7? Add a macro system?

With many Java programmers I know still working with Java 4 (my current project included), whether a feature show up in Java 7 or Java 8 really doesn't matter that much, at least for the next three years, during which time we'd be lucky if we can advance to Java 6.

Save some of that stuff for later. Maybe we should create a fictitious "Java ∞" (or Java 3000) to which all language feature proposals are made and debated and designed and tested. And the real Java releases (Java 7, Java 8, etc.) will only pick a few well regarded features from "Java ∞".

Tags :

Safari on Windows Feedback: Fonts Dialog

Dear Apple,

I tried out Safari on Windows and have encountered a problem with the fonts used to display Simplified Chinese web pages. They look awful in Safari on Windows. Here's a side-by-side comparison.

Obviously, Safari on Windows is not using the correct fonts for rendering Simplified Chinese pages. However, when I went to the Preferences page to configure fonts, I couldn't find an option for selecting fonts for Simplified Chinese pages:

Safari Font Dialog

Here's the corresponding Options page in Firefox, where I can choose different fonts for differently encoded pages:

Firefox Font Dialog

Any help you can provide me is appreciated.

Tags :

Apple's Safari On Windows

Brian walked in the office a moment ago, all disappointed. The keynote that Steve Jobs gave at the WWDC did not contain enough new stuff to satisfy him.

However, Brian did mention the availability of Safari for Windows, which I downloaded immediately. I am writing this blog entry in it:

Safari for Windows

Aside from my "This is just like iTunes" reaction when I first saw the download page and the running browser, here are several things that popped up i my mind:

  • Can you call an application a Web application if it doesn't run in all three browsers (IE, Firefox, Safari)? In the past, when something doesn't run in Safari, we brush the issue aside with a "That was just a Mac browser, and it works on Firefox on the Mac." We can't do that anymore.
  • If working in two out of three browsers (IE and Firefox) qualifies an application as a "Web application", who's to say that Safari and Firefox only applications are not "Web applications"?
  • You can write cross-platform Safari applications (at least on Windows, Mac, and the iPhone) now just like you can write cross-platform Firefox applications (for Windows, Linux and the Mac).
  • What other applications would Apple release for the Windows platform? Will there be a day when I can enjoy some of the other Mac applications that the Mac fanatics around here praise, almost everyday, on the Windows platform?
  • Where is the catch?
Tags :

Document Templates Considered Harmful

Eric Burke strikes again with a document template for the creation of essays of the "X Considered Harmful" genre.

This blog entry is an instantiation of that template. Here goes:

_Document templates___ Considered Harmful

Resolved: _Document templates_ _ is a poor choice for _documenting_the_design_of software systems______ and should be avoided at all costs.

With _30_________ years of experience in this field, I am an authority. I have seen countless examples of _document templates__________, all starting with good intentions but inevitably ending in failure.

You may think __document templates__ offers benefits, such as:

  • _a unified format____________
  • _a_sense_of_organized-ness_________

These seem OK on the surface, but consider the huge number of negative consequences:

  • _It takes_a_huge_amont of time_to_learn_all_the templates_____
  • _Nobody reads them, not even the original authors—they just fill them out____________
  • _All of those ugly left-over underlined blank markers really distracts____________
  • _____________
  • _If you accidentally delete one of fields, it will take you a day to add it back____________
  • _____________
  • _____The underlines won't go away as you type and screw up all the formatting________
  • _____________
  • _____________
  • The formatting gets ugly when you run out of the preformatted blanks

Now let’s look at an example:

_[link to] The SDLC template____________________________________________
_[link to] The ADR/DSOT templates (versions 1.2.3.4.5-1966 and 5.4.3.2.1-1987)_ __ ____ ____________ ________ _________________
__ ______________________ _____________________

This works fine on _green field_projects________, but only when _the_team_is_small________. If you try _it on existing systems_with_thousands_of_developers_and_contractors_from dozens_of vendors_____, it will certainly fail with this result:

_No one can figure out what what the heck is going on_ ___________________________________________
_The ADT and the DDR_gets to be thousands of pages long and is of no help to anyone _______ ________ ________ ________ ________ ____

See the problem?

The data is compelling:

line-chart.gif

_Alex Miller____________ says it best on his blog in a comment in Eric's blog at __http: //stuffthathappens.com/blog/ 2007/06/07/__________- considered-harmful/#comment-9180 _______________ :

__Awesome. Now I can finally get around to doing that “Mad Libs Considered Harmful” blog I’ve been meaning to write for so long.
It also reminds me that I need to polish up my proposal to add GOTO to Java 7. ______________________
________________________

On your next project, think carefully before choosing _document templates___________. A quick Google search for the term _%$#@-ed up document templates ___________ seems to back this up — it returns over _____3_______ million matches!

References

It's Not A Real Programming Language Until...

... these books have been published:

(When I told Dale about the JavaFX Script announced at JavaOne 2007, Dale said: "It's not a real programming language until four books have been published." So Dale started a poll on the breakroom whiteboard. Here's the accumulated list of must-have books contributted by the combined mind power of everyone.)

  • Introduction to *
  • The * Programmer's Bible
  • * in a Nutshell
  • Thinking in * (by Bruce Eckel)
  • * for Dummies
  • Teach Yourself * in 24 Hours
  • * in Action
  • The * Programming Language (by creator of *)
  • The book
  • Effective *
  • * Design Patterns
  • Using *
  • * for [] Programmers
  • [] for * Programmers
  • * Unleashed
  • The * Programmers' Bible (2nd Edition)
  • Intro To *#
  • The * Annotated Reference Manual
  • Core *
  • Corba Programming With *
  • Evolution of *
  • * Considered Harmful
  • Bitter *
  • Beyond *
Tags :

Bjarne Stroustrup: Evolving a language in and for the real world: C++ 1991-2006

(Via Lambda the Ultimate)

Bjarne Stroustrup: This paper outlines the history of the C++ programming language from the early days of its ISO standardization (1991), through the 1998 ISO standard, to the later stages of the C++0x revision of that standard (2006). The emphasis is on the ideals, constraints, programming techniques, and people that shaped the language, rather than the minutiae of language features. Among the major themes are the emergence of generic programming and the STL (the C++ standard library’s algorithms and containers). Specific topics include separate compilation of templates, exception handling, and support for embedded systems programming. During most of the period covered here, C++ was a mature language with millions of users. Consequently, this paper discusses various uses of C++ and the technical and commercial pressures that provided the background for its continuing evolution.

Tags :

I Still Type Two Spaces After A Period

Eric brings up the important topic of how many spaces to type after a period.

I learned to use a typewriter on a Royal(?) portable typewriter borrowed from the English department. It was an ancient typewriter even at that time. It must be from the 1920's. It has a typeface where the little circles of the number "6" and the number "9" line up.

It was then when I learned to

  • Type two spaces after a period
  • Listen to the bell. Finish the word at hand when it rings and pull the return lever
  • Type two spaces before and after Latin or other foreign words and mathematical symbols
  • Consult the dictionary before typing a word whose spelling I'm not certain

None of these make sense on a computer anymore. And I have given up on the bell (do you know that you can still enable the bell in vi?) and the dictionary. I put mathematical symbols in dollar signs out of respect for Donald Knuth and TEX (and all mathematicians get it).

Yet I still type two spaces after a period. I kept the habit for two reasons: i) in places where it doesn't matter the two spaces will be converted to whatever they are converted to; ii) there are still places where this conversion does not occur (notably in source files) and two spaces after a period still look better than one:

<p>Yet I still type two spaces after a period.  I kept the
habit for two reasons: i) in places where it doesn't matter
the two spaces will be converted to whatever they are
converted to; ii) there are still places where this
conversion does not occur (notably in source files) and two
spaces after a period still look better than one:</p>
Tags :