Entrepreneur, executive, and investor; octo-dad; former Googler, now VP Product at

I’m writing some Java2D code, and I notice that IDEA (my code editor) highlighted parts of my code:

Intelligent Code Analysis

Check out the caption at the bottom of the window. It turns out (as any good Java2D programmer knows) I’m reversing the width and height arguments — but how did IDEA know? Whether its lexical analysis or a special case built into the tool, wow! This kind of stuff is infinitely useful.



Post a comment
  1. jz #
    January 18, 2007

    I’m not good Java2D programmer, can you explain me why IDEA highlighted that piece of code? Thanks! 🙂

  2. January 18, 2007

    jz: The order is reversed; methods that take height and width arguments take the width first, and then the height (just as x logically precedes y). Admittedly, IDEA’s error could have been clearer, like “It looks like you reversed the width and the height” instead of the message shown.

  3. jz #
    January 19, 2007

    Hi Ben,

    thank you for explanation (I bad translated word reversing), now I understand. One tip: If IDEA doesn’t analyse this by lexical way, try set width by lesser value than height one 🙂

  4. Kirill Kalishev #
    March 9, 2007

    It’s a feature of the inspection gadgets plugin which is bundled with IDEA. You can even add more name patterns for similar things, just check you inspection configuration.

  5. February 8, 2012

    I like how they get the old pelope who buy anything on midnight info commercials to endorse it on live TV

  6. February 9, 2012

    1XCu2i zchjmuemgbba

Trackbacks & Pingbacks

  1. el lady mature
  2. Ben Galbraith’s Blog » Blog Archive » More on the Amazing IntelliJ IDEA

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Basic HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS