How To Become A Hacker
It's easier than you think :)
Nat Friedman: So, I'll let you in on the secret. Here are the steps to becoming a hacker:
- Download the source code to the program you want to change
- Untar it on your hard drive
- Get it to build and run
- Open the source code in an editor
- Find the part of the code that you need to change to make the program do what you want it to do
- Make the changes you need to make to the code and test it to make sure it works
- Run the diff -u command and email the output to the mailing list
Contrast this with ESR's advice, you will see that Nat's advice is so much easier.
Popup Ad For Popup Blocker
Pop, I'm up.
(This blog entry is contributed by WeiqiGao.com correspondent Dale Wilson. —Ed.)
There I was, minding my own business and browsing the web when all of a sudden a pop-up window appeared!
It said:
JBoss And Microsoft
Whatever!
Having joked about it 3 days ago, I feel obligated to report the real news:
Shaun Connolly, JBoss VP: Microsoft and JBoss are announcing our intentions to work together on enhancing the interoperability between the JBoss Enterprise Middleware System (JEMS) products and the Microsoft Windows Server products. In support of this vision, we have outlined areas of technology engagement that we will work on together over the coming year for the benefit of Microsoft and JBoss customers.
Guys, TurboGears Is Every Bit As Compelling As Rails
If you can judge this sort of things by a 20-minute video
This is for all of you who jumped onto the Rails bandwagon from watching a 15-minute video. Another 20-minute video is released onto the web 9 days ago.
The product is called TurboGears. It's yet another, you guessed it, web framework. (background: coooool!)
It's powered by Python. (background: coooool! Scripting language!!)
It builds a wiki. (background: way cooool! better than a forum!!!)
It supports AJaX. (background: AJaX! AJaX!! AJaX!!!)
And it contains Kid, Web Services Infrastructure. (background: Stop, stop, stop. I want to jump to the other bandwagon!!!!!)
Come on, Java guys. Where's our video?
Playing The JBoss Speculation Game
It's the license, stupid!
Marc Fluery's latest blog entry teased us with "we GOT SOME DYNAMITE OF AN ANNOUNCEMENT COMING OUT ON TUESDAY MORNING". And the speculation has began by Matt Raible and Eric Burke.
Here's my prediction: JBoss will go GPL.
(Fictional) text of the announcement:
Oops! Rickard is right. We've been distributing JBoss with the wrong license for the past five years. It should have been GPL all along, not LGPL. It's an honest mistake (wink, wink).
For all the leeches out there who are bundling JBoss with their proprietary products, don't worry. JBoss is a professional open source company and will see to it that your product line is viable for the future. For you and your customers, we'll offer you our newly crafted sucker's license—you pay us 2.5 cents per transaction per side!
SCO just bought our license.
The other option is to make your product GPL too, you can then sell training and services at high prices. Let me tell you it not that bad. Take the red pill.
Oh boy, do we look like a REAL FIRM now!
IONA initiiert CORBA-Portal
Java Magazin: Der Anbieter von Integrationslösungen, IONA, wird ein anbieterunabhängiges Online-Portal für CORBA-Nutzer bereitstellen. Die Informations- und Interaktionsplattform für CORBA-Entwickler ist ab sofort unter der Adresse orbzone.org erreichbar. Die Inhalte des Portals umfassen Meldungen über die neue Anbieterofferten und CORBA-Spezifikationen, einen Kalender mit CORBA-Events, Fachartikel von Experten sowie ein Wiki und ein Forum.
That's OrbZone - CORBA Community.
Talking about "Nothing New", the CORBA folks have been in that situation for years.
Things To Look Into
Where has the all the Java excitement gone?
Continuing my tradition of making a list of things that I ought to know. Here's a few things that I think merits some deeper examination:
- JBoss Seam <--JSF&EJB3 framework, no Springs, no Struts, just an app server and me
- The announcement is here. The product page is here. The documentation is here. More info here. Accolades here.
- LINQ <--Language INtegrated Query, sprinkle selects in C# code
- The video is here. The in depth coverage is here. The debate is here, here, and here. And of course the podcast is here (actually here.)
I should list more items, but I really couldn't find anything more that's worth writing about. Indeed, nowadays when Java people meet, the conversation goes something like this: "What's new in the Java world?" "Nothing. Everything is old news now—AOP, Spring, Hibernate, etc."
Don't make me learn Ruby! <scream/>
Refactoring Is Garbage Collection Of The Source
And thanks for all the tests!
We are doing another round of refactoring in my current project. This is one of those biggish refactorings that changes the code structure for the better. We've done this before (as I blogged 235 days ago.) And here's some of our thoughts on the matter of refactoring, especially big refactoring.
According to Rob, as you code by adding new features and fixing bugs, the tension in the code increases. It is wise to do refactorings from time to time to release the tension so that the code base remains pliable. This is very important for the continued success of the code base.
Big refactorings, as opposed to regular refactorings that you do as you code, is rather like garbage collection (of the mark and sweep kind) in that i) you stop everything else in the code base to do it; ii) the code base will be cleaner afterwards so that you can code more efficiently.
Here's another analogy: If the entire product is a quilt and each individual features are the piece parts, then regular refactoring can be thought of as ironing out the pieces before stitching them onto the quilt and big refactoring can be though of as ironing out the while quilt. Both are necessary. One doesn't imply the other. I'm tempted to call them local refactorings and global refactorings.
Of course, all these refactoring is made possible by the unit tests and functional tests that we have written. We are not yet "test first" on this project, but we spend quite a lot of time (almost 1:1) writing tests.
Writing tests is such a natural part of the project that time for writing tests are part of the estimates for each feature: "4 hours to write the code, 4 hours to write the tests." Tests are not skimmed even when we are up against a deadline:
Jonathan: I can finished the code before COB today. Do you want me to check in the code?
Kevin: You want to check in broken code?
Jonathan: They aren't broken.
Kevin: Prove it!
Jonathan: (Lost for words. ...) I can write the tests later.
Rob: Write the tests now.
We♥Tests
Uninstalled Google Desktop
They wanted to know why. So I told them.
I had a bad case of Google Desktop interfering with the program I'm developing today, so I decided to uninstall Google Desktop.
Guess what happened at the end of the uninstall process? Well, them being Google, it made sense for them to throw up a cute little dialog box and ask "Eh, why are you uninstalling our software?"
Google Blog Search---A Winner!
Hours Of Fun
Heard the buzz over there in blogland about Google's new Blog Search beta.
And you know I have to try it out. The result is impressive (I wonder how they ranked the blogs):
Aren't You Happy Java Don't Have Default Arguments
They are trouble in C++. And they are trouble in Python.
Trond Andersen: I talked with someone looking at Ruby to use for a prototype and didn't want Java's verbose syntax and complex APIs. I suggested Python as a good alternative since it got better support for GTK than Ruby and RedHat and others uses the language alot, but it seemed like they had rejected Python as an alternative for such a relative large prototype. I just had to ask why. So he fired up the console on his Mac and typed:
...
Try it !!!! It wasn't quite what I've expected.
Go figure.....
Here's what I got when I tried:
[weiqi@gao] $ python
Python 2.3.4 (#1, Feb 2 2005, 12:11:53)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> class foo:
... def __init__(self, x=[]):
... self.y = x
...
>>> a = foo()
>>> a.y.append("123456")
>>> a.y
['123456']
>>> b = foo()
>>> b.y
['123456']
>>> a.y.append("98765")
>>> a.y
['123456', '98765']
>>> b.y
['123456', '98765']
The explanation is here.
Clearest Explanation of REST Yet
REST is refutation of Web Services (WS-*)
Sometimes a concept is so vague that you spend years trying to understand it. And one day, you get it.
Here's one example of me getting OLE way back when.
REST has been something that I've heard a lot in the past couple of years. I've been to numerous internal as well as local user group talks on the subject. I read articles in online magazines. I've heard testimonies on how a little bit of rest did wonders in decoupling an otherwise tangled mess.
However in the back of my mind there is a nagging feeling that I have not understood the concept completely. It didn't help that the explainers invariably resort to "it's an architecture style," or "when I GET the URL http://host/car, I'm getting a representation of a car, which is a resource, and my state is transferred," followed immediately by an apology, "I know. I know. It's not the best of explanations on earth."
Then I read this tutorial on REST Web Services, referenced in John Cowan's weblog. And it all clicked for me.
I'll let you read the tutorial yourself since it's a rather long one (148 slides.) Here are two slides that resonated with me the most:
The Unix Way
- Files have a generic interface
- All resources in the system could be accessed through these narrow interfaces
- Some things were always exceptions
- Unix networking broker this philosophy
- The Plan 9 research OS restored it, doubled and in spades
REST from a Unix viewpoint
- Resource rather than files
- URI space instead of the filesystem
- A slightly different (even narrower) generic interface
- But the focus is the same: a generic shared abstraction, not point-to-point interface coordination.
Direct Manipulation, Emerging Behavior, Untestable Qualities, ...
It's fast. It's fun. It's Swing.
Tonight's presentation at the St. Louis JUG is by Kyle Cordes, principal of Oasis Digital, and his title is Direct Manipulation User Interfaces with Java Swing.
This is once again one of those talks that you have to attend to appreciate its content. Reading the slides afterwards probably won't do it.
Before the talk Raj Patel asked what the talk is going to be about. The answer I came up with is "writing a Swing application where the users don't enter texts and push buttons." At the opening of the presentation, Kyle also pointed out that he's not talking about Swing drag-and-drop, which is all about negotiating data formats. Nor is he talking about Naked Objects, whcih is all about not writing the GUI.
Kyle spent most of the time in Eclipse, doing demos while going through source code class by class and line by line.
Kyle's thesis is that direct manipulation user interfaces, based on drag-and-droppable on-screen widgets, can provide fast, efficient, intuitive, and appealing data manipulation in your application.
In one of the demos, the screen is populated with small JPanels in a ten row three column grid. You pick up one and move it to a different spot. As you are dragging the JPanel other JPanels make way for it by moving to a different location in an animated fashion. "Wow" was my first reaction.
Then he went through the code. And the code was amazingly simple. It uses Swing features to the fullest extent, but simple. The animation logic is driven by a Swing Timer whose action is simply: hey, each JPanel, check if you should move to a different spot, and if so, move a little bit toward the new spot. The fancy animation is an emerging behavior out of this simple logic. Another "wow" at the source level.
After the talk I asked if he wrote any tests for the code. The answer is no. "How could you write a test for the emerging behavior?" Jeff Grigg put it a different way: "How could you write a test for 'this is fun?' You let the user use it and watch them having fun!"
Java News Brief (JNB): NetBeans Platform
Swing developers needs the help
In this month's installment of OCI's Java News Brief (JNB), Tom Wheeler writes about the NetBeans Platform.
Ever since IDE's were invented, IDE vendors had been selling us code that they wrote to build their IDE, thinking that we might get some reuse out of them. At first they are called class libraries. Then they become application frameworks. Now they are calling them platforms.
I liked Tom's exposition style a lot. I think inviting is the word to describe it. Half way into the article, I wanted to reinstall NetBeans, which I uninstalled 44 days ago and try out Tom's examples, which are temporarily available here.
I did have a few problems:
- When I ran ant tryme, and could not find some of the classes in the org.apache.tools.ant package. (If you think about it, this is almost comical.) Adding /usr/share/java/ant-1.6.2.jar to my CLASSPATH environment variable won't help. I have to specify it on the command line using -Dant.jar=/usr/share/java/ant-1.6.2.jar for the example to proceed.
- The sample tries to modify or write files in the NetBeans installation directory, which under my installation scheme is not writable. I usually don't like it when programs want to mess up a perfectly good installation. But for Tom there is nothing that a little chmod 777 won't fix.
- In the step where Tom says to edit nbbuild/user.build.properties he really means nbbuild/user.cluster.properties.
Other than these, the introduction is a smooth sail. Look what I did:
Now that I'm talking about NetBeans, I should point out that the promised change of the click through license on the NetBeans download site still hasn't happened. According to Tim Boudreau in a comment made 24 days ago:
Turns out we have to do something or other for all the historical releases as well, so we've been iterating with the lawyers on clear, unambiguous text for those. I know that sounds Dilbert-esque, but lawyers are paid to be paranoid. I made a commitment, and what I said will happen will happen. I will post a follow-up here as soon as it does.
See also Tim Bray's post 40 days ago.
On the other hand, it seems that the scrambled jars problem that Tom mentioned in the article are gone. Great!
Threads Cannot be Implemented as a Library
C, C++ must learn to do threading
(Via Lambda the Ultimate.)
Hans-J. Boehm: In many environments, multi-threaded code is written in a language that was originally designed without thread support (e.g. C), to which a library of threading primitives was subsequently added. There appears to be a general understanding that this is no t the right approach. We provide specific arguments that a pure library approach, in which the compiler is designed independently of threading issues, cannot guarantee correctness of the resulting code.
We first review why the approach almost works, and then examine some of the surprising behavior it may entail. We further illustrate that there are very simple cases in which a pure library-based approach seems incapable of expressing an efficient parallel algorithm.
Our discussion takes place in the context of C with Pthreads, since it is commonly used, reasonably well specified, and does not attempt to ensure type-safety, which would entail even stronger constraints. The issues we raise are not specific to that context.
...
Several of us are trying to address these problems in the context of the C++ standard. Other participants in this effort include Andrei Alexandrescu, Kevlin Henney, Doug Lea, Maged Michael, and Bill Pugh.
Google Sidebar Displays Spam
Is There A Way To Filter Spam Out?
I've been running my desktop with the Google Sidebar (part of the new Google Desktop) for seven days now.
The information presented in the Sidebar is interesting enough to keep me from disabling it. I do, however have a complaint. And it has to do with the email alert portion of the Sidebar:
It does not do spam filtering. It's true that there is a way to add filters by hand. But that's so inadequate, especially considering that I have trained my Thunderbird spam filter to do a pretty good job.
(I have to send myself several test emails just so that I can take a screenshot that won't embarrass everybody.)
Please, Google, make it work!