« duben 2005 »
PoÚtStČtSoNe
    
 
       
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 717

Contacts

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Bill Vass
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
Main | Next page of month (Mar 2005) »
20050430 Sobota duben 30, 2005
New Code Completion - Flash Demo

I made another live demo - this time it's about new code completion which is currently being developed in NetBeans 4.2. It's in experimental state so it's not in the daily builds yet. I've blogged about the improvements before.

The demo contains some of the highlights of new features. To play it you need a flash plug-in. It includes my speech - make sure to turn on your speakers:


Click to open the flash demo!


I need your feedback. Is my English well understandable? Should I slow down or make pauses between individual parts? Or it is ok and slowing down would mean loosing some of the dynamics? Any other suggestions? Write me your comments so that I can improve my demoing skills :-) Thanks.
20050429 Pátek duben 29, 2005
Usability @ Microsoft

I've discovered this URL on Microsoft corporate website:

http://www.microsoft.com/usability/default.htm

Before you will start throwing stones on me, I would like to remind you that we have a contract with Microsoft :-)

Some interesting facts found on this site: Still anyone thinking that software usability is not important?
20050428 Čtvrtek duben 28, 2005
New NetBeans Book

Daniel Templeton wrote in his blog that a new NetBeans book is being prepared. Good news, but I have better :-) You can read the draft of the book for free here:

http://www.netbeans.org/kb/articles/NBFieldGuide.html

Isn't opensource great?

20050427 Středa duben 27, 2005
Sun: Network is the Company

While travelling by public transport I have a lot of time to think - not sure if this is good or bad. Anyway, I came to several interesting (although imperfect) analogies. Sun differs from other companies I know in how communication is handeled - it reminds me of some of the network principles I was tought at school.

Networks have a nice characteristics - for networks it's 3 + 3 = 9. So if our company has more network-like attributes than other companies, we should be doing better products with less resources.

What's the conclusion from this post? I should probably spend less time in the public transport :-)
From a Czech Newspaper...

7.45 a.m. - a bar in Prague 1 was ambushed by two men. They took part of the money and said that they will come back for more later on. When they arrived the police was waiting for them and these two men in ages of 39 and 30 were arrested.
20050426 Úterý duben 26, 2005
Javadoc Support in NetBeans

I've found out that a lot of people come to my blog by searching "javadoc NetBeans" keywords in Google. Interesting, isn't it? It seems to me that there is a demand for more information on javadoc support in NetBeans. Since javadoc-related features are kind of tricky, I've decided to write a post about it, maybe it will help somebody with solving problems with it.

There are several levels of support of javadoc in NetBeans: I'll go through these topics and try to cover the most common pitfalls.

1. Javadoc in code completion

Code completion has a javadoc window which displays javadoc for currently chosen java element (method, field, etc.). The javadoc window is enabled by default - this can be toggled in Tools | Options | Editing | Editor Settings | Java Editor | Auto Popup Javadoc Window.

The JDK javadoc is taken from one of these sources: The situation is simple with JDK 1.4 or newer because the JDK contains a src.zip file which contains all the sources (except for some security-related classes). So you don't have to do anything, the javadoc window displays the javadoc for you.

The situation is complicated on MacOSX where JDK doesn't contain the src.zip file - in this case you need to download the whole javadoc from:

http://java.sun.com/docs/index.html

This javadoc should be saved on your disc, preferably in the "docs" subdir of your active JDK. Then you need to go to Tools | Java Platform Manager, choose the Javadoc tab, press the "Add ZIP/Folder" button and point it to the docs directory. Now javadoc on Mac will work for you in code completion's javadoc window.

Javadoc for classes in project works out of box, it is just parsed from the sources you write, so there's no additional effort necessary.

Javadoc for project libraries needs to be configured in Tools | Library Manager. Choose the library for which you want javadoc to be displayed and similarly to older JDK go to Javadoc tab and point it to the javadoc directory of your library.

Warning: You need to point the dialog to the correct directory - it needs to contain usual javadoc files - index.html, overview-tree.html, and so on and subdirectories index-files, resources, etc. The dialog will not tell you when you will choose an incorrect directory or a broken javadoc directory. We need to fix this in the future, but this is how it works at the moment.

2. Javadoc generating for a project

To generate javadoc for your project, use Build | Generate Javadoc. You can also use the project context menu (available on right-click). To set up parameters for javadoc, go to project properties in context menu and choose Build | Documenting section. Here you can configure the usual parameters of javadoc.

3. Displaying Javadoc from the IDE

At first, make sure you have your browser configured correctly in Tools | Options | IDE Configuration | System | System Settings. You need to set the correct browser and proxy settings if necessary. When set up, go to View | Documentation Indices and choose the javadoc you want to display. You will see there javadoc for the libraries you've set up. JDK javadoc can be shown using context menu on JDK libraries (Show javadoc). See paragraph below which explains how to add javadoc of your current project into this submenu.

You can also show javadoc for a java element (method, class, field, etc.) by pressing Alt-F1 on that element.

4. Javadoc index search

To make Tools | Javadoc index search work you need to configure the Javadoc tab in platform manager or library manager - depending if you want to show JDK or project library javadoc. The situation is more complicated with javadoc for classes from your project. If you generate javadoc for your project, it is created in dist/javadoc subdirectory in your project dir. Now you want to let the IDE know that it should search this javadoc as well. The way I've found for this is to add an artificial library to your project through Library manager. This library must contain jar with your project (needs to be there, otherwise the javadoc won't be shown) and it must contain the javadoc for your project. When this is set up you can search javadoc for your project as well. This obviously is not very well designed and we should improve it in next releases.

Update: Second workaround to make javadoc search and documentation indices work for project classes is to restart the IDE. Much simplier than first workaround. Still deserves to be improved.

5. Javadoc in navigator

Navigator displays javadoc for individual elements on mouseover. The javadoc is taken from sources and it works out of box, no extra configuration is necessary.

6. Autocomment tool

Autocomment tool enables you to add easily javadoc comments to your source. It's located in Tools | Auto Comment. It shows you all cases where javadocs are missing and you can fill them in. It also helps you with solving the javadoc warnings. The name of this tool is a bit misleading, because it won't fill in the comments for you, you still have to type them in.

I hope this covers all important topics for javadoc support in NetBeans. My opinion is that the javadoc support is good - it works and provides all necessary functionality, but we need to make it's configuration easier. This seems like work for our usability team.
20050425 Pondělí duben 25, 2005
NetBeans 4.1rc1 on Mustang

Based on Dmitri's suggestion I've tried to run NetBeans 4.1 RC1 on latest JDK 6.0 Mustang build. We are currently testing for compatibility with various versions of JDK 1.4 and 5.0, development versions of JDK 6.0 are not officially supported so I was also interested to see if things work well.

A very good news is that the Gray rectangle bug is fixed. This bug made Java apps look strange, non-natively and less responsive. Great job fixing this! I am not sure if it's only a placebo effect but antialiasing on WinXP with my LCD looks slightly better, too (antialiasing has to be enabled in editing options if you want to try it).

More is coming in the future - check out the section Improved text quality and capabilities. I hear sometimes that our IDE has worse out of box experience due to Swing font rendering, so this will probably no longer be an argument if all these issues get fixed.

There are several other small differences I've mentioned - on JDS the status bar changed colour and looks more natively now. On WinXP the window frames changed slightly and look better. So far I didn't mention any significant problems, only on WinXP two form editor buttons lost their titles - probably due to some font changes. We'll know more during NetBeans 4.2 development cycle when we'll be testing on JDK 6.0 but so far the changes look very good.
20050424 Neděle duben 24, 2005
Back from the Trip and Still Alive

I've succesfully returned from our biking trip to Sumava mountains. We were surprised by the amounts of snow which were still everywhere. So we had a lot of fun trying to bike on snow - look at the following videoclip:


Biking on snow (a videoclip)

Here we decided to take a shortcut through the woods so we had to bike 5 km through deep snow. Not only we got lost, but our other friends got tired of waiting for us - so we had to search for them. We had mobile phones, but mostly there was no signal and either one or the second group got lost somewhere in the woods, we didn't have GPSes unfortunately. Finally, we found each other around 4 p.m. after going through lots of snow, water, swamp, rocks, peaks, chasms, 2 pubs and a ski slope.

During the trip we met a lot of animals, like these:


These guys looked very satisfied

Guess what mice do when frightened

On the second day we decided to walk - our back muscles hurted so badly we could not bike anymore. We made a round trip and went to see the famous moors around Kvilda. It was a lot of fun, especially when we lost our way again and had to go through deep forests (watch the angry girl in videoclip below):


A metrosexual in the woods
(a videoclip)

My friends look very intelligent

Now I wish i had another weekend to rest - I'm completely exhausted. But also full of nice memories, a bit sun-tanned and psychically prepared for new battles with software bugs.
20050423 Sobota duben 23, 2005
Trip to Southern Bohemia

I've prepared this post upfront, because I am spending the whole weekend on a mountain bike. Here's the trip my friend chose for the first day:



He says it's not as bad as it looks, but I'm not sure if I can trust him with this judgement. I haven't biked this year yet so it will probably be very painful. I'll post some photos when I'll get back (if I survive).
20050422 Pátek duben 22, 2005
Sun Opens Doors for External Contributions to Java

In case you've missed it, take a look at:

http://java.sun.com/developer/technicalArticles/J2SE/peabody/

Very good step, in my opinion. I hope it gets attention of the best-of-breed developers. It will probably be a big challenge to keep the compatibility, on the other hand the JDK team definitely has lots of experiences with keeping it, so it might work well. Our QA team will be thinking of you!

20050421 Čtvrtek duben 21, 2005
NetBeans 4.1 Release Candidate 1 is Out!

You can download NetBeans 4.1 RC1 here.

Final release will differ only slightly from Release Candidate 1. I recommend to upgrade to everybody who is using NetBeans 4.1 EA, EA2, beta, q-build or daily build, RC1 is definitely more stable. For users who prefer final releases: you probably want to wait till 4.1 final which will come in May. On the other hand if you have some issues with 4.0, you could try 4.1 RC1 if they were solved, there was a huge amount of bugfixes - see table below.
NetBeans Quality in Numbers

I've played with Issuezilla, our bug tracking software and got interesting and quite surprising numbers for bug fixes in NetBeans:

Version Bugs fixed Release date No. of months Avg. bugs/month fixed
NetBeans 4.12932May 2005 (planned)5 months586 bugs/month
NetBeans 4.05001Dec 20048 months625 bugs/month
NetBeans 3.62662Apr 20049 months296 bugs/month
NetBeans 3.51157Jun 20036 months193 bugs/month

The numbers for 4.1 are for current status but there won't be many changes till fcs.

Important are the numbers on the right - average number of bugs fixed per month for each release. Wow, they are increasing, aren't they?

How to explain these numbers? If you would ask our competitors, they would probably say that the numbers of our bugs are increasing so the quality is going down. Ok, guys, thank you for your opinion, but this is clearly not the case. I am confident that quality of 4.1 is high, 4.1 is largely a stabilization release - except for new J2EE modules. We were testing the daily builds for months and they were very stable.

If the quality is good, how come that the number of fixed bugs is increasing? The remaining options are that we are adding lots of new features (we are, look at J2EE and J2ME support) and for other modules we are stabilizing the IDE. The other way to explain increasing number of bugfixes is increased focus on development of the IDE. My take is that it's a mix of these reasons - which is good.

I recently read in several blogs and articles why people should switch from Eclipse to NetBeans. I won't be telling anyone to switch, we are in a opensource space where everybody can hopefully make his own free decision. So I only recommend to take a look at NetBeans, it is improving and if you'll still miss anything, let us know through our mailling lists. We are listening. The competition in Java tools space is good, because the one who benefits from the competition the most is you - the developer.
UI Design for Programmers

I've just finished reading a book from Joel Spolsky called UI Design for Programmers. I can recommend this book to anybody working in software development, no matter what you are doing (as long as you are doing something). It is about designing software for real users - it won't teach you how to create good dialogs, but it will help you to think as a user. Why is that important? People working on software forget one important difference - you already know a lot about the program you create and care about it, while normal people know almost nothing about your program and don't care so much about it.

By reading the book you realize some hidden facts, like most people just don't read manuals - you knew that, didn't you? But it goes further, most people don't read descriptions in dialogs either - unless really necessary. So they just click on the error message you gave them, ingoring the content. Very bad users. But how many times did you click the button without actually reading what's in the dialog? Let's admit it, we all do it from time to time.

Joel is great in explaining simple principles - to understand them you don't need to have a degree in nuclear engineering. Still these principles are a bit surprising. By showing some of the annoyances of software we are using every day (web browsers, office suites, e-mail clients, etc.) you get a lot of knowledge of what *not* to do when designing software. Every programmer thinks that users like many options, because then the software they are making is greatly configurable. Wrong! Most users hate many options, because they don't understand them - they didn't spend all those months by designing the software as you did. They don't care if your program's database should be small, medium or extra large with double chips and hot mexican sauce. All they care about is that the program does the job they want from it.

What I also like on the book is it's size, it has 134 pages with a lot of pictures. Joel is always to the point, you read the book with one breath - it's very easy to read and amusing. Probably inspired by opensource, Joel published big part of the book online on his webpage here. I recommend checking out the other articles he wrote, there's a lot of truth about software development. I have to admit that Joel inspired me with his writing style and his posts were one of the impulses for me to start to blog. Thanks, Joel!

20050420 Středa duben 20, 2005
World of Warcraft Screenshots

I made a collection of screenshots from the wanders of our guild in the World of Warcraft. Perhaps they will be interesting for you - most of us are software folks and this game really is an incredible piece of software. Although I can't show you how it looks in action, take a look at the beautiful graphics of the 3D world. Over 1.5 million people playing online - I would really like to see the server rooms!


Small Tauren on a small Kodo beast

Playing dead
 

No future

Happy New Year!
 

A few corpses after fight

Old mama with da bear
 

Undead horse in the woods

Dead lizard, good lizard
 

This guy means it seriously

Moon howl
20050419 Úterý duben 19, 2005
Scanning Classpath Performance Tips

I assume you've clicked on this post because you're one of the NetBeans users who is unhappy about the scanning classpath dialog. It takes so long. And all you can do is sit and wait. Yes, I know, this is annoying. So you may want to try some of my tips which could help:

1. Which NetBeans version do you use? For users with NetBeans 4.0, 4.1 EA, beta or 4.1 development builds: upgrade to NetBeans 4.1 rc1 and install NetBeans from installer. Only several weeks divide us from 4.1 release, thus the quality of the build is very high. Currently installer pre-parses all JDK sources which causes NetBeans to only check JDK sources instead of full parse. That's why installation takes longer, but thanks to this you don't have to wait so much when IDE starts and scans JDK. This won't help with scanning your project, but helps a lot for scanning of JDK.

2. Is your project on a network drive? Bad idea! If there is a possibility to have it on local drive, put it there. The faster the disc, the better. NetBeans has to scan all your files for changes (so that it has up-to-date information for refactoring, code completion and other features). Having project on network drive slowes it down a lot. Note for Sun employees - your homes are on network mapped drives. Try to put your projects on your local hard-drive and you may be surprised about the difference.

3. Is your JDK on a network drive? I know, you may ask, who would do it. There are people who really have JDKs on network drives, trust me. They should try to put it on their local drive instead.

4. How many projects do you have opened? Try to keep the number of projects on minimum. NetBeans will not parse their sources and thus startup with opened projects will be faster.

5. Any other ideas? Ugh, no. You got me. Well you can always upgrade your computer, but this is probably not the advice you would like to hear from me. On the other hand it helps. Fast CPU, fast hard-drive and more than 512 MB memory boosts any Java application, not only NetBeans. Before you will write me angry posts about me forcing you to upgrade hardware - it's just an idea, don't shoot me for it.

There are plans for improvements of scanning classpath in next release, so stay tuned.

I have also tips what you could do if your project sources are of 1 GB size on a network share and you can't do anything about it (don't take them seriously):

20050418 Pondělí duben 18, 2005
Constantine with Keanu Reeves

I went to see the new movie with Keanu Reeves - Constantine. I kind of liked the movie, although it was difficult to perceive Keanu different than Neo from The Matrix. The story is about an exorcist who is fighting his way to heaven by killing daemons. I find interesting the ideas about eternal fight of good and evil and how important it is to keep the balance. Although the movie doesn't go very deep, it reminded me Lord of The Rings where the fight of good and evil is deeply rooted in the story (I rather mean the book, the movie is only surface of what is in the book). And Keanu played well, this time he was very sarcastic and he was charismatic as usual.

Would I recommend you to see the movie? Yes and no. If you like the comix type of stories with heroes and daemons, add some points. If you are a fan of Keanu Reeves, add even more points. For the others it depends, being sci-fi or fantasy positive helps. I would not recommend the movie to people who rather prefer "normal" reality. And to Christians, because in the movie there is a version of Bible with a different ending - guess who wins. That may be quite insulting for some of the religious people.

20050417 Neděle duben 17, 2005
Paperclip for Vim

NetBeans will have editor hints, Vim strikes back with paperclip:


Full detail on click.
20050416 Sobota duben 16, 2005
Reasons Why I Like Working at Sun

Here are some of the reasons why I am happy to be working at Sun Microsystems. What are yours?

1. People. It feels great to be among intelligent, funny and interesting people. The concentration of idiots is very low in Sun.

2. Squash. I can play squash during launch break. We have in Prague a squash league and as I spend around 10 hours a day at the computer I appreciate I can refresh myself with sport.

3. Technologies. I can work with latest Java, JDS, Linux, Solaris, J2EE, J2ME... whatever. It's nice to have something to play with.

4. Time to study. I can spend part of my job by improving my skills and knowledge. There's always what to improve.

5. Blogging. I am allowed to blog. Even encouraged to blog. I can spread the holy word of NetBeans.

6. Work from home. Starting by this week it's possible for me to work one day in a week remotely. Not only it saves 2 hours for transport, it also helps to concentrate on my work. And I can have music playing laud as much as I want.

7. Freedom. I can choose how my day at work will look like. Nobody's ordering me that I have to do this or that and as long as I do my job well I can choose my priorities.

8. English. I have great English classes where I can improve my communication skills. Maybe my grammar will get better, too, although I still doubt it.

9. Communication. Part of my job is communication with the community around NetBeans. It's interesting to exchange opinions with people from all around the world.

10. I don't have to wake up early. This one is self-explaning, isn't it?

11. Fun. As you can see elsewhere in my blog, there are people here who have good sense of humor.

There are also few things which don't make me so happy when working at Sun. I will not post them here because I could get into serious troubles with my manager :-)
20050415 Pátek duben 15, 2005
PET Bottles Needed in Prague

Thanks to our Irish colleagues for their valued contribution:

http://blogs.sun.com/roller/comments/roumen/Weblog/who_stole_my_bottle#comment2

Are there any other generous people who want to help Marek?

Big thanks to anyone who contributes!
Fastest Way to Open a File in IDE

I started to play with Wink, freeware software which can capture screens and makes very good flash demos. For the beginning I chose something very small - I'll show you how Go To Class works in NetBeans.

Go To Class is very useful if you want to open a file fast. The old, slow way is to go to the project explorer, search for your file inside project and then doubleclick to open it in editor. That's probably fine when you are working on small projects, but as the project grows you may have big tree hierarchy. You also may forget in which package is the class you want to edit (it won't happen to you because unlike me you have perfect memory ;-).

Instead of browsing the trees to find the java class you can open the file by invoking the Go To Class dialog (Alt-Shift-O). You just type in the name of the class - or even it's first letters. Then press enter and voila - there you go.


Click on screenshot for action!

Update: I've just added speech to the demo. It is completely out of sync with the flash demo and takes twice as much time. I need to find a way how to get the sound into the swf file, Wink doesn't support this. To play sound you need wav support in your browser. In Firefox this is done by Quicktime, it Internet Explorer it works out of box using Media Player (with controls). But you don't use IE, do you?

Update no.2: Woohooo! Speech is now integrated into the flash demo! Check it out. It will be much easier to explain NetBeans features with this.
20050414 Čtvrtek duben 14, 2005
Who Stole My Bottle?

Today's e-mail:

Hello.

I am investigating plastic bottle disappearing. Bottle disappeared from my office (3rd floor, office number C188) last night.

If you saw that bottle (see attached picture with me and my beloved bottle), or have any information which can help me to find it, please contact me.

Thank you in advance for your cooperation.

Regards...



First reply:

Hello.

We were investigating isreal map dissappearing. The map disappeared from HIE office (2nd floor, office number 2170 - 2176) a month ago.

We haven't seen your bottle, but we finally know where is our map (see attached picture).

;-)

Thank you!

HIE team



Second reply:

Hi,

I know how you feel, I lost my bottle short time ago. Although mine was smaller than yours we were very close to each other. I miss it a lot.

It seems very strange our PETs (bottles) get lost and I think we should escalate the mysterious losses so that no one ever has to go through the same hell like you and I had to.

I'm attaching picture of my bottle and me from the better days

Regards...



Third reply:

Hi Marek and Boris,

let us express our deep compassion to you. We believe that we can brighten your lives and we founded a fund to collect some bottles to help you. There is a lot kind of bottles which can came to you lives and we believe that will be much more in following days.

Your colleagues.

20050413 Středa duben 13, 2005
New Code Completion and Suggestions

Are you curious about the newest NetBeans editor improvements? Two hot topics are redesigned code completion and suggestions. I got a permission from the developers to post steps how to build NetBeans with these - so you can try them out! Checkout and build takes some time and effort, so be prepared for it. You have been warned.

1. Checkout CVS sources - CVSROOT=:pserver:anoncvs@cvs.netbeans.org:/cvs (more info here): The size of downloaded files is around 430 MB. No, we won't help you with paying your Internet connection bill.

2. Build NetBeans with ant using following command in nbbuild subdirectory (more info here): That's it, once the IDE is built, you can czech the new features out. In case you have troubles with building, write me a comment and I'll help you.

Warning: these features are under development and the IDE built with them should not be used in production environment. Their functionality may change and no quality is guaranteed. There are several known bugs and the UI will be changed, too. Take them just as preview of new functionality.

New Code Completion:


Improved, faster, sexier.

Suggestions (aka Editor Hints):

A lightbulb for Java editor, which provides several hints. When a light bulb appears, press Alt-Enter to get the list of possible hints. Most hints are available on lines with error annotations.


Better than your paperclip!

Currently, there are following hints available: Why am I posting this? We want to know your feedback. If you take your time to download and build NetBeans from CVS, please spare a minute or two and let us know what you think about the improvements.
20050412 Úterý duben 12, 2005
Please Help Save Toby
Guys, this is serious! Toby's gonna die!


http://www.savetoby.com
How Do People Find Your Blog?

One nice thing about blogs.sun.com is that you can see from where people came in the referers section (after login). So you see if your friend who added link to your blog is generating traffic for you. The interesting part is that full URLs are visible! If people use google you can see the whole search string. Here are some of the latest searches which lead people to my blog:
Isn't google amazing?
20050411 Pondělí duben 11, 2005
Another Guy from Prague Blogging

In case you haven't mentioned yet we have another NetBeans blogger from Prague. Welcome Geertjan to Sun's blogging world! He's Dutch, a member of the documentation team and he writes about the mysteries of writing web applications in NetBeans. He started blogging shortly after me and the amount of posts he produced so far is quite impressive.

Message for the others: think about joining us! Why? Take a look at this and this. We have lots of interesting ideas to share and it would be selfish to keep them for ourselves :-)
Editing Tip for Lazy Programmers

When writing tests it can be handy to have long descriptive method names. If your test suite fails, you can see immediately from the report what went wrong. On the other hand writing these long names can be really painful so when writing them it's mostly better to cut&paste the name then to write it.

With NetBeans, there is another nice possibility. Instead of writing the long method name you can just write the beginning of it and press Ctrl-K. The rest of the name is generated for you. If there are conflicts you can cycle through the list of names starting by the string you wrote (Ctrl-L is for cycling backwards). Here is an example - the yellow line is important:


Before Ctrl-K


After Ctrl-K


On the first screenshot I am about to add the test method name into the suite. Normally I would have to write it (ugh!) or use mouse or keyboard to cut&paste it. By pressing Ctrl-K I have it there immediately! You can use it for any purpose, I chose writing tests just as an example. Works also great for variables or any other longer strings you use several times in one file.
20050410 Neděle duben 10, 2005
Another Regexp Trick in NetBeans

Question: How do I replace two newlines by one in the whole file?

Answer: Not trivial :-) We've added regexp support recently into NetBeans (see my other post about back-references). You can certainly use "\n" in the Find What field. Now you want to replace "\n\n" by "\n". If you try to do this, it doesn't work, because the Replace With field converts \n to just n (not to a newline). Too bad we can't use this kind of expressions in the Replace With field but we have to live with that for now.

But! You can use a back-reference to get the \n into the Replace With field like this:


Using this neat trick you can replace two newlines by one. It can be used not only for newlines, but any other similar expressions starting by backslash.
20050409 Sobota duben 09, 2005
An Extraordinary Movie

I went to the cinema to see The Life Aquatic with Steve Zissou. It was a great experience. The movie's web page with playable clips is here:

http://lifeaquatic.movies.go.com/main.html

Wait! Before you will go to see the movie or get DVD and then write me comments like "this was the worst movie I've ever seen" I have several warnings for you. This is not mainstream. It's a special movie for special people. It looks like if it was a low-budget movie filmed by several students. Some of the music even sounds like a midi file! If you're after visual effects, great scenes, advanced computer graphics, ultra 3D THX surround sound played on 32 huge loudspeakers, this one is certainly not for you.

The story is strange. A crew full of loosers sailing the seas, searching for a "jaguar shark" who killed the captain's friend, trying to film a movie for 12-year old children? Broken relationships, lost hopes, captain meets his adult son he didn't want to have, his wife wants to divorce, he drinks too much and fells in love with a younger pregnant woman who by no chance wants to have anything with him. Everybody's wearing red stocking caps which just look awful and seems to be proud to be members of the Zissou team, lead by a captain who's life is a neverending depression.

What can be interesting on such a movie? Well, the story is so absurd, that it actually becomes funny. There are moments where you can't stop laughing, because the situation is so bad or just because of the way the movie looks so crappy. The actors play their roles exceptionally. And surprisingly, the movie is full of deeper thoughts. It touches you, maybe because one of your relationships went also wrong or because you didn't want to accept at one point of your life becoming adult. Or maybe because you are also still searching for something in your life and cannot exactly name what it is.

As written in one of the reviews, this movie touches deeply 1 of 10 people, while the other 9 don't understand what's special on it. I think it's worth trying if you are from the first group.

P.S. You have to see the movie if you like music of David Bowie. It's full of his songs sang in Portugese :-)
20050408 Pátek duben 08, 2005
Microsoft Acquires Sun Microsystems

Why didn't they tell us upfront?

http://www.twoguys.org/~gregh/ms/ms-sun.html

Gee, I'm glad I took those .NET classes. I knew they could become handy one day!

Update: How to communicate in Sun Microsoftsystems: http://www.microsoft.com/athome/security/children/kidtalk.mspx
Two NetBeans Editor Performance Tips

1. Faster scrolling in code completion
If you consider movement over options in code completion slow, try to turn off the javadoc tooltip. You can do that in Tools | Options | Editing | Editor Settings | Java Editor | Auto Popup Javadoc Window. Javadoc's window performance will be improved in next releases and is known to be currently worse than optimal.

2. Faster scrolling in editor under Linux
If you are using antialiasing under Linux you may experience very bad scrolling in editor (occurs only with some graphical cards). Try to turn off the antialiasing in Tools | Options | Editing | Editor Settings | Text Antialiasing, it will help a lot. I can't help myself but I also like the fonts without antialiasing under Linux better.


    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.