« červenec 2005 »
PoÚtStČtSoNe
    
23
30
31
       
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 1437

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
« Previous day (Jul 12, 2005) | Main | Next day (Jul 13, 2005) »
20050713 Středa červenec 13, 2005
How Much Can You Tell About a Person From a Face Photo?

Somebody thought: "a lot!". Here are my results from www.faceanalyzer.com:

Intelligence5.0Average Intelligence
Risk5.9Average Risk
Ambition6.0Average Ambition
Gay Factor1.0Very Low Gay Factor
Honor3.5Low Honor
Politeness 3.6Low Politeness
Intelligence5.0Average Intelligence
Income5.5$30,000 - $50,000
Sociability6.9High Sociability
Promiscuity4.4Low Promiscuity

55% Southern European
27% South East Asian
18% Korean/Japanese

Archetype: Charmer

Well :-) I leave the judgement on the others who know me. I wonder what connection has the face with the income? Maybe it depends on the amount of wrinkles and type of smile? Anyway, the software is very good in finding centers of eyes on all photos I've tried. And if you click on other profiles, the celebmatch seems to work well - the software can recognize similarities in faces. So what are your results?
Surrounding Code with Try-Catch Easily

I've just noticed that I didn't blog yet about the new surround with try-catch action which was recently added to 4.2's editor context menu. Let's say you have following code:

import java.io.File;

public class CoffeeMachine {    
    public CoffeeMachine() {
        File f = File.createTempFile("coffee", "tmp");
    }    
}

Now you can select the line with createTempFile and execute surround with try-catch action from editor context menu. You need to surround the method because it throws an exception that should be caught. If you have good memory, you can also use the shortcut which is Ctrl-Alt-S (S as [S]urround). The code you get is:

import java.io.File;
import java.io.IOException;

public class CoffeeMachine {    
    public CoffeeMachine() {
        try {
            File f = File.createTempFile("coffee", "tmp");
        } catch (IOException e) {
        }
    }    
}

What has happened? The line which is performing a dangerous IO operation was surrounded by a try-catch block. Notice that the correct import was added into the list of imports as well. Now it's time for you to write code which will handle the case that you could not create the temp file.

Why making fuss of this? I believe that such small features can make real difference if they are intelligent enough and can save you time while writing code. Let's hope for more of these - in 4.2 you'll be able to use a lightbulb hint for this action as well. Time to get more coffee... :-)

P.S. If you will try this functionality and find any bugs, you know where to submit them. Oh sorry, this is the right place.


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