 |
May 2007 Archives
How to create applications with Sun Spot?
Posted by felipegaucho on May 31, 2007 at 05:43 AM | Permalink
| Comments (3)
I hope these links could be useful for you:
Bookmarks
UBUNTU vmware image
- VMware Player with your own Ubuntu installation
- Felipe Gaucho's Blog: Ubuntu test-drive for Windows users.
sunspot
- Java Sun SPOT Application Development using Java ME (J2ME)
- Linux News: Developer: Sun SPOT Project Could Help Usher in New Computing Era
- Sun SPOT - Wikipedia, the free encyclopedia
- SPOT Blog ... : Weblog
- "Sun SPOT" Sensor Networks
- ALAVs
* I just start reading and understanding Sun Spot, as soon as I get something running here I plan to show you ;)
Jazoon Kumite looking for Black Belt Developers
Posted by felipegaucho on May 21, 2007 at 07:19 AM | Permalink
| Comments (1)
- Where: Jazoon'07, Zürich / Switzerland
- Date: June 24 - 28
- Prize: Your Java Honor (and some gifts)
|  |
So, check the mosquito flying, don't lose your focus and remember: one hit, one answer!
JSR-277: Super JAR and the three kinds of Hell.
Posted by felipegaucho on May 16, 2007 at 02:58 AM | Permalink
| Comments (12)
Michal Cierniak and Stanley Ho introduced the JRS-277 (Java Module System) talking about three kinds of hell:
- Classpath Hell: Where are your classes and libraries? Why different IDEs use different folders? Does it matter?
- JAR Hell: How to deliver different libraries in only one JAR?
- Extension Hell: Remember that nightmare when a different version of a class was being loaded from an unexpected JAR?
|  |
Well known problems like How to deliver applications in only one JAR and the version control and management of dependencies between different modules of an application motivated these researchers to propose something better for the next generation: a Super JAR mechanism that allows developers to simplify development and deployment processes. As you will read in this entry, Maven seems to be quite similar to this new specification, but there are some enhancements in parts were Maven and other integrator mechanisms failed in the past. It is a new idea based on old problems, so the solution is a collection of best practices and learned lessons, including an elegant conflict resolution that sometimes reminds us of operational systems algorithms. During JavaOne, most part of the session was consumed by explanations about the conflict scenarios and the strategies the authors were proposing to avoid them - tricky but also very interesting.
What is a Module?
A module is a set of artifacts that can be executed as an application or artifacts that can be part of an application - including libraries, classes, files and any other resource required during the runtime. From the specification:
A Java module is a unit of encapsulation. It is generally written
as a development module in a programming language in the Java platform,
and is ultimately compiled into meta data and packaged together
with classes and other resources as a deployment module.
The goal of the new specification is a first class modularity:
- Versioning scheme: the nowadays JAR format does not support versioning, what means the correct version of the libraries should be controlled by developers and deployment engineers. Usually we adopt name conventions to solve conflicts and to alert the users about the library version, but we all know this is error prone. The authors suggested to include some versioning scheme with runtime validation process, solving the first hell.
- New distribution format (JAM): JAM comes from Java Module, and it is based on the JAR file format plus some advantages:
- Signed JAM files: the signing and signature verification for a JAM file are identical to those for the JAR file format in the Java SE platform. A JAM file can be signed and verified using, e.g., the standard jarsigner tool from the Java SE SDK.
- Compressed JAM files (Pack200): Pack200 is a hyper-compression scheme for the JAR file format, and it is defined in JSR-200. The JAM file format is based on the JAR file format, hence developers may use Pack200 to further compress a module archive (i.e. a JAM file) for distribution.
- Fine grained security in JSE 7: they are looking to use some Java 7 proposed features to enhance the security level of the JAM files, including the ability to reduce the visibility of some resources through manifest configuration. It is not included in the current specification, but is a good outlook.
- Repositories: this part is Maven-like, but with some new features like repositories hierarchy. Several repositories (bootstrap, global, application, local, URL) can be accessed during the runtime to resources retrieval, and some naming and versioning conflicts can occur during this process. The resolution of these issues is an important part of the JSR-277, but I invite you to check the early draft about that because it is not something I can summarize in few lines of a blog :)
- Runtime support: a great advantage of the Module System over Maven and other integrators is the Runtime support. Proposed to be part of the JRE, the new mechanism will receive a privileged treatment during the startup of applications, and all its features will be executed by the virtual machine itself instead of a third-party code. Runtime will include validation of modules, a wonderful feature that brings the Java developers full control about which resource and which module will really be used by their applications.
A lot of information for a simple blog, but the subject is fascinating and I guess the new Module System can give us a much better control over our deployment tasks in a near future. I strongly suggest you to visit the specification download page, read the early draft and start preparing to change your configuration procedures in the next year.
JavaOne 2007 - That's is big!
Posted by felipegaucho on May 08, 2007 at 08:58 PM | Permalink
| Comments (1)
Thousand people and the big players talking about the event perspective. The highlights for me were:
- Java 100% Open Source: finally the great news was published out there - Java is definitely free for use, copy and distribution under GPLv2
- Java FX: an impressive version of rich client platform that promises integration between desktop and mobile applications. The rapid application development is also another quite impressive feature, and the creators of the new technology commented about just three days to create a fully featured application with an amazing graphical interface. They also presented the same framework playing on top of mobile phones and the outlook of the FX seems really good.
- Education: a different moment during the introductorial sessions: Dr. Djibril Diallo spoke about 1.5 bilion people starving around the world, and ask the developer to help him to push a better life quality through sports. It was a really fascinating moment, some one keeping technology subkect quiet for few minutes and remember the crowd about we all are part of the same society, the global one. Jonathan Schwartz explained the strategies SUN is looking to join in order to connect people using Java technologies.
- Passion: I could talk for hours here about everything is happening around me, but there is only one clear message: I love Java. Several times during the General Session I got completely moved about the Java technologies and its community. Watching a powerful SUN showing up on the stage was another wonderful feeling - forget about that conspiracy theories about the weakness of SUN, the company still alive and more powerful than ever. The new age is starting and we will be there to enjoy all the innovation that is coming.
It is just the beginning - it will be an amazing week. See you at the pavilion.
Java Puzzlers strikes JavaONE
Posted by felipegaucho on May 08, 2007 at 04:46 PM | Permalink
| Comments (1)
|
Dr. Joshua Bloch and a representative of Dr. Neal Gafter just finished a fantastic presentation about weird behaviour of apparently simple programs, the tricky behaviour they call Java Puzzlers. They not only showed the puzzles but also the way to fix it in day-by-day life. The contents included this assertions:
- Short and Integer are different, don't try to use primitive integer values to look for a Short object in a map.
- Different URL Strings that point to different web pages can represent the same Map keys.
- JUnit doesn't support concurrency.
- Classloader ignores recursive class initialization.
- I/O Streams
skip() method does not skips the amount of bytes you asked to be skipped.
- Math.abs doesn't guarantee nonnegative result
Integer.MIN_VALUE == -Integer.MIN_VALUE
- (?:) operator present weird behaviour handling mixed wrapper classes.
- Conversion form
int to float is dangerous.
Seems easy? Are you not understanding these fragments captured live during a lecture? Ok, I agree it is a bit raw, but I will not try to translate all the reasoning done during the presentation in this small blog entry. My only tip here is that the attendees was invited to answer the puzzles during the presentation and almost none was consensus and for sure none was responded correctly by the majority of people in the room. Very challenger.
Java Puzzlers is a book, and if you are curious about what that means or you want to contact the authors, you can check the book site.
I bought mine in the JavaONE's book store and I am proud to have my exemplar signed by Dr. Bloch - an excellent speaker and a gentleman.
|
|
Thanks Netbeans Day 2007
Posted by felipegaucho on May 08, 2007 at 12:44 PM | Permalink
| Comments (2)
Gregg Sporar lead a technical session about the new Netbeans 6.0, together with a set of SUN engineers. It was not a flat presentation, in fact it was more deep into little details about how the new Netbeans works, including some live coding presentation - I can't imagine the kind of bargain Gregg used to convince a guy to code live on the stage to hundred of other developers :). The presentation was a complete overview of the new IDE features of the IDE, but the main attraction was the integrated profiler. Scripting and debugging completes the show together with some usability hints and tricks. The full presentation will be available somewhere in the oficial conference page, but mine first impressions are enumerated below:
- Scripts languages: just 1 regular expression definition file and you have highlight colors and formating stuff ready for using on your IDE. It is about usability, a chance to promote productivity for the more than hundred script languages out there.
- Debugging : stepping over expressions, little button that allow you to define fragments of commands as step points. During the presentation, the output console showed up that
Out of Memory heap problems stack trace. At this point I started to guess the speaker was lost and the presentation will restart in some way - I was wrong. Due to the integrated profiler, the speaker could show us how to inspect and to identify the variables causing the problems and he fixed that on the fly - without that heuristic and boring to stop-evaluate-fix-restart cycle we commonly use to solve such problems. I was quite impressed with such feature and for sure will try that later in the hotel room. Then the speaker started to show other minor enhancements of the NB debugger and passed to the project group presentation.
- Profiler: built-in with the standard build from Netbeans 6 releases. The profiler section of the presentation gave me a good feeling about the integration of a profiler in te development environment. For years, I've been using Eclipse with a set of plugins to evaluate my runtime problems, and sometimes I need a special external tool to investigate better what is happening in the memory. With this new integrated feature, Netbeans seems to be a first class tools in terms of productivity and also in terms of control about what is really happen - without the ping-pong with external tool, common in my Eclipse experience.
You can check more about the new feature at this link: http://wiki.netbeans.org/wiki/view/NewAndNoteWorthyMilestone5.
The Netbeans day happy hour
After wonderful presentations and a lot of social and professional network, everyone went to the Closing General Session with that mission accomplished feeling to listen James Gosling and the Netbeans crew. Mr. Gosling introduced the final session of the day using the calm words reserved only to the core guys of any technology. To support the creator words, a team of engineers presented a summary of the Netbeans presentations and some novelties and future perspectives about the Netbeans platform.
The presentation started with the Netbeans TV - a captivating video about guys trying to deliver Netbeans CDs and other gifts to Palestinian developers at Middle East. Some interesting reference to all people far away who are still using and loving Netbeans despite any difficulties. The smiles of that guys receiving simple gifts was quite amazing - a real life reference and a happiness sharing moment. The show then continued with Tim Boudreau and Henry Story talking about Web 3.0 and URL oriented databases: the web is the database. They commented the growing feeling that semantic web is becoming reality - including some demonstration of RDF documents being imported into Netbeans through a simple copy/paste operation.
An interesting Netbeans plugin that allows movie player to be embedded into any JSE application was shown running over UBUNTU. The funny part was James Gosling commenting he doesn't has any windows running anywhere - the crowd loved it.
Then we got a presentation of a man trying to train his dog using the SUN Spot device, adapting a DOG transporting box to be a remote controlled device to release dog food from computer commands. The lecturer was quite a character - a special moment to relax and enjoy a very friendly speaking and some nice movies with the dog interacting with the box - a kind of digital Pavlov experience :). One of the slides presented the sentence the geek shall inherit the earth and I guess this is a perfect way to describe the style of that presentation.
Before the end of the day, Bruno de Souza spoke about the Netbeans Dream Team - a group of volunteers that contributes for the enhancements of the Netbeans quality through book publishing, tutorials, demos and a lot of feedback from real world experiences using Netbeans. Some of the dream team was on the stage showing the face of the growing Netbeans community.
Time is up, the day finished with some special gifts distributions and beers. After the conference day, the JUG leaders had a unofficial dinner at a Chinese restaurant, but that is another history.
If you can't code, retire.
Posted by felipegaucho on May 07, 2007 at 01:17 PM | Permalink
| Comments (2)
Other interesting points of the fun lunch was about usability, development tools, Java language outlook and other minor social behavior that drives our profession. Observing the quiet room listening the speakers I felt a reliever feeling about the knowledge prevalence in the era of management and marketing.
At the end, four top notch professionals speaking frankly about their expectations, actually the expectations shared by the most part of nowadays software engineers - a better software world through better tools, job and technology evolution.
If you are not here, a tip: bet here next year - it is the most amazing experience a Java developer can have in this life. See you in 5 minutes at the next door session.
Interview with the editor-in-chief of Netbeans Magazine
Posted by felipegaucho on May 07, 2007 at 08:05 AM | Permalink
| Comments (1)
Netbeans Day is happening at Moscone and walking by San Francisco I had a chance to interview Leonardo Galvão - the magazine's editor. On board of a Star Bucks Cafe, Leonardo gave some tips about the new online resource for the Netbeans users.
|
What is Netbeans Magazine ?
Netbeans Magazine is an online technical publication about Netbeans Platform and also about projects and technologies that adopt the Open Source IDE in order to improve its productivity and quality goals. It is a PDF document available at http://www.netbeans.org/community/magazine. Despite the virtual nature of the magazine, I believe it is very important people to have a chance to print the magazine in a high-quality format, so the document layout was designed to provide a high quality printable PDF document. The magazine is published every three or four months - the periodicity is not fixed because the priority is the quality of the contents and sometimes is better to postpone few weeks for synchronizing the magazine with big events like JavaONE.
Who is behind the magazine ?
I and Osvaldo Doederlein as editors and the PH Design as the company responsible for the illustration and page layout. The sponsorship is granted by SUN/Netbeans and the business model includes open opportunities for international partnership in a near future. The magazine is also a personal project after several years as Editor-in-chief of Java Magazine, a printed Brazilian magazine distributed for more than thirty thousand readers.
|  |
Who writes for the magazine ?
The contents are collected from several countries, and we always try to identify the core Netbeans users and also the companies adopting the tool in large commercial projects. The writes are basically the Netbeans community, and everyone interested in to contribute should send a mail with a brief description about the prospective article. The Netbeans and SUN also give us some support in order to guide the content selection. The last issue is a good example about the diversity of writers, it is a 80 pages publication including articles from USA, South Africa, Germany, Brazil and Italy.
What is the preferable subjects ?
Everything related to Netbeans: special tricks to enhance the productivity through the features of Netbeans, script languages, interoperability with Open Office and eal world usage of Netbeans Platform.
The magazine is a community effort or a commercial initiative?
The magazine is a commercial initiative in symbiosis with the community. The board responsible to publish and elaborate the magazine is doing it through a professional business model but with low cost and giving priority to the contents quality and the community demand. People don't earn too much money through the magazine, but we believe a minimum budget is required in order to guarantee the quality of our work.
Are you attending Netbeans Day ?
For sure :), I will have a chance to keep in touch with a lot of people today at Moscone pavilion. I am looking for a snapshot of the Netbeans community that will be very important during the next magazine's releases - see you there.
A special tip: during this week, Leonardo Galvão is taking breakfast everyday at the Star Bucks near China Town, and if you want to schedule a meeting with the editor of the Netbeans Magazine, you can contact him through the mail: leonardo @ javamagazine.com.br
|