F/OSS

My Gutsy Desktop

And behold, my newly-installed desktop. I couldn’t wait for the CDs from Canonical, so I just downloaded and in just a little over an hour, I had my desktop humming.

But after enjoying the looks and sleekness of this new desktop, I had to backtrack from using it further, lest I’d want to ruin my 160 GB HDD. Ubuntu (Feisty and Gutsy) apparently had a bug that will hasten the lifespan of a SATA HDD. Here’s a link to the article: linux-hero.com, and at bugs.launchpad.net. But wait, there’s a workaround:
“hdparm -B 255 /dev/sda”. I wouldn’t budge though. I’ll wait for an official Ubuntu kernel patch.

Powered by ScribeFire.

Closures in Java… do we need it?

I have been figuring my way into Groovy lately (JSR 241). And one thing that came accross my curiosity is Closures.

Closures are like pointers to a function that you can pass as a parameter. Yup, you read it right, pass the function as a parameter to another function. Other languages does have Closures (using the same name or another). We C# delegates, Groovy closures, and C function pointers.

Perhaps due to my orientation and upbringing as Java-centric developer without ever experiencing Smalltalk, the use and significance of Closures will never be clear to me.

It seems that the general trend in the Java language nowadays is to improve the language. Yes, some of them were very useful in pushing Java forward (when I say Java, I’m referring to the language, not the platform), some are plain useless.

These tuti-fruity enhancements to the language, are, I believe is in response to the relative ease of programming in other development paradigms. Say, .Net, LAMP, or perhaps, RoR. Any old-school Java developers will code and prefer the semantics of the older-Java. So, going back to Closures in Java. There is a silent-but-raging debate whether to include Closures in JDK 7 (and if indeed included, what will be its syntax). Though I have not seen much opposition to it in the web, I would still blurt out my unsolicited view on Closures.

Take the real world. Take the real business cases for example. I don’t think, there isn’t any large or realistic need for it. If any, these can be easily addressed through generalizations. And in the most extreme, inner classes, particularly, anonymous inner classes. Now that would be in extreme. In the real world, were much of the business is produced by the EE world, do you really require closures in your EJB? In Servlets? Or perhaps in you JSPs. How about JDBC? JNI? Can’t really think of any…

I believe that Closures will just be a language-level sweetie, and hence, not really needed at all. Java is statically-typed, OO-driven (yeah, debate me on this) language. Having said this, how would you model Closures? How will you document this? How about exceptions management? Closures will almost certainly ran afoul with your nicely-designed exception routines. What happens to EJB/JTS? What happens to your simple Collections? There is one heck of a large mindset to overcome if we are to support Closures.

You see, Java is everywhere. The cult-status following of Java simply makes it harder to implement new niceties. Yes, new features may be introduced but what percentage of the community uses these. Why not just build a new Language instead of further complicating the existing one. Think of it as JRuby, Groovy or perhaps Jython.

…Java is now open-source. Speaking of just creating a new language from scratch and putting all these from-other-language-envy features, do I smell a fork here?

My simple take on Java Closures: We don’t need Closures in Java. 10 years of SE and the robustness of EE is a sound testament to this. Java is fine, as it is.

And yes, I can survive Groovy too with ever resorting to Closures.

I told you so…

In a post in Pinoy.Tech.Blog about Wifi Wardriving, there was a dilemna whether it is legal. And if it is, whether it is ethical. Tracking back into this old post/thread, I would again reiterate my position regarding this issue. We can’t even ask whether it is ethical because the very essence of wardiving is pattently illegal, and hence, unethical too.

Though I must admit, the laws here in Singapore is different as that of in the Philippines, it is apparent that tapping into someone else’s network is illegal whether it be in Singapore, Philippines or any damn part of the earth (well, maybe except antarctica). In a recent move by a complainant, a Singaporean teen was recently sued for wardriving.

The teener, 17, is the first person to be charged with this crime under the Computer Misuse Act, the Straits Times reported.

So I guess that settles the doubt, at least here in Singapore. A call to my fellow overseas Pinoys. Please refrain from piracy, moreso, from tapping-in to your clueless neighbor’s wifi network. There has been numerous warnings before, now here’s a sample conviction to send jitters to those who are matitigas-ang-ulo.

source: International Herald Tribune

Java is now free, no reasons for FUD either

Sun just open sourced Java. Java will now carry the GPL as its license. As Sun has said, it was always open, now it’s free. My FUD, and perhaps, the same sentiments shared by the majority in the Java community is addressed through the Classpath Exception Clause.

Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.

As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

RMS would be very happy with Java’s opening. Perhaps, RMS would consider adding a closure and revisions on his The Java Trap article.

And, oh, btw, Duke is also freed… under BSD.

NetBeans 5.5b’s UML Modeler

I have been using NB 5.5b’s UML Modeler for quite some time now.  I find the UML tool very useful.  Yes, Rational Rose is exceptional (and even the price is very much exceptional), and that you’d have some other tools like Poseidon.  But the thing that attracts me to NB 5.5b is that of integration.  NetBeans 5.5′s UML Modeler comes with a built-in forward engineering (ie. model artifact to Java source) and reverse engineering (Java source to model).  This forward and reverse engineering comes with an auto-synchronization between the items so that a full round trip engineering is achieved.  This clever feature is devoid of code markers, and hence, will preserve how your code looks like after synchronization.  If your familiar with Rose, you’ll know what I mean (that is, half your code is composed of comments and annotations). 

The UML Modeler also comes with a suite of GoF pattern templates.  You can have the ability to draw your diagrams in a giffy just by knowing which pattern to apply.  For SCEA takers, you should know the GoF patterns by heart (at least the most common and useful among them).

Another goodie on this tool is that it supports the UML 2.0 semantics.  So there goes your doubts on how to draw your loops and alternate flows in sequence diagrams…

The UML Modeler used to be part (and still is) of Sun’s Java Studio Enterprise IDE.  This IDE is based on the NetBeans Platform.  But sorry guys, no XMI support for this tool.  If interoperability with other applications through XMI is goal, NB5.5b isn’t your tool.

Overall, NetBeans 5.5b rocks!  I can’t wait for the formal release of version 6.