Archive for February, 2007

Pet peeve: good versus well

Tuesday, February 27th, 2007

It just perplexes me how people develop the habit of misusing these words. I always feel the urge to correct these uninformed people when I hear they say “I’m doing good.” Ugh.

True leader

Tuesday, February 27th, 2007

Responding to the Oleg’s blog entry: A good team leader is ask to become one.

I disagree with his assessment.

One must understand that being a good team leader is completely different from that of becoming a good team leader. While being a well respected developer can certainly help boost morale and confidence of an assumed leader (which is important), there needs to be additional factors present to adequately quantify such individual as being a good team leader.

I think it’s troublesome and, perhaps somewhat counterintuitive, to think that a good team leader is asked to become one. In my opinion, good leaders are those who possess the uncanny ability to take control of frightful situations and can instill and elevate the confidence of their teammates at the same time. They don’t seek approval; they lead by example, as the saying goes. They relish the opportunity to make difficult, high-risk decisions where others normally would shy away from. They readily accept blame and criticism to deflect attention away from their teammates’ miscues. They are excellent listeners and communicators with a strong desire in learning the strengths and improving the weaknesses of those around them. Most importantly in my mind, great leaders are fearless: they live and die by their own ambition to succeed.

So as you can see, an assumed leader is a dangerous proposition because there’s a great potential for failure due to unrealistic expectations. Most people don’t realize the pressure that comes with being a leader until they are actually appointed as one. Then they ultimately succumb to their unfortunate fate and revert back to as followers because they lack the “killer-instinct” trait inherent in many “true” leaders, as I would call it.

I wish I could have the opportunity to work with some “true” leaders someday but it appears they are few and far between.

IDEA favorite keystrokes

Monday, February 26th, 2007

As an avid Emacs user, I am a big fan of using keystrokes as shortcuts to boost productivity. It’s a must-have feature on my list. One feature among many I like about IDEA is that there are many built-in keystrokes, which I learned to harness over the last few years. The following list of shortcuts(from Reference Card) are my favourite:

  • Ctrl+W = Select successively increasing code blocks
    Performing selection is such a breeze.
  • Ctrl+Space = Basic code completion
    Need I say more?
  • Ctrl+Alt+Space = Class name completion (the name of any project class independently of current imports)
    Very handy for people like myself who can’t recall or spell long class names.
  • Ctrl+/ = Comment/uncomment with line comment
    Common feature.
  • Ctrl+Q = Quick documentation lookup
    Opens a small IDE-contained window with provided documentation on the class/method in question.
  • Shift+F1 = External Documentation
    Opens the browser for complete javadoc reference on the class/method in question.
  • Alt+Insert = Generate code… (Getters, Setters, Constructors, hashCode/equals, override, implement)
    Useful for generating and implementing many common methods.
  • Ctrl+Alt+L = Reformat code
    Maintain consistency of style within your sourcecode.
  • Ctrl+Alt+O = Optimize Imports
    Re-arrange the import statements which includes removal of un-used statements.
  • Ctrl+D = Duplicate current line or selected block
    Copy-and-paste in one step.
  • Ctrl+Delete = Delete to word end
    Delete from start of caret to end of the word.
  • Shift+Del = Cut current line or selected block to buffer
  • Alt+F7 = Find usages
    Great for finding dependencies.
  • Ctrl+N = Go to class
    Jump to the sourcecode of a particular class.
  • Ctrl+Shift+N = Go to file
    Jump to a file, other than a class. e.g. xml files, javascript files
  • Ctrl+B = Go to declaration
    Jump to the source of the class/method in question.
  • Alt+Up/Down = Go to previous/next method
    Quickly move between method declarations.
  • Ctrl+P = Parameter info (within method call arguments)
    Quickly recall method call arguments information.
  • Ctrl+Shift+F = Find in path
    Useful for finding a particular usage in an entire project.
  • Ctrl+Alt+Left/Right = Navigate back/forward
    Revert back/forward to an earlier/later snapshot.
  • Ctrl+Alt+T = Surround with… (if..else, try..catch, for, synchronized,etc.)
    Surrounds a selected block of code with a particular java keyword

My frequently used refactorings

  • F6 = move
  • Shift+F6 = Rename
  • Ctrl+Alt+N = Inline
  • Ctrl+Alt+M = Extract Method
  • Ctrl+Alt+V = Introduce Variable

Java and IDEA: deadly tandem

Sunday, February 25th, 2007

I have been doing Java development for about 6 years now. It’s amazing to think that I have stuck with it for this long but I strongly believe Intellij IDEA has a lot to do with my seemingly never-ending devotion. Simply put, this product rocks–just lovin’ it.

My first IDE encounter came during my first year in University, and there I use JBuilder which I rely on its code-auto-completing to save myself a bit of time in doing my assignments. It was convenient to say the least, but, mind you, I knew nothing about Java. I wanted to learn more. In fact, I had a burning curiosity for understanding the construction and building of my programs but it was evident that my reliance on JBuilder (or any IDE for that matter) was doing more harm than good for my understanding of the language. The concepts such as classpath and package statements were foreign to me, but is critical to a program’s successful execution. And it wasn’t until I ditched the IDE, and started using TextPad for my SCJD that I was able to unravel the mystery behind the underlying language that I now call my bread-and-butter.

TextPad taught me the entire build process that was concealed from me by JBuilder. I learned to rely more on the command prompt, as dreaded by many unfortunately, but therein lies the real value through this transition. It was then I began compiling and executing my project with javac.exe and java.exe, respectively. Of course it was tedious, but I gain much from their repeated usage. I felt confident then, as I do now, to setup and execute new and existing projects. Some times it’s shocking to see some developers who claim to possess a level of Java expertise (with a few years of experience) but fail to understand the underpinning process of putting everything together. Wow. Perhaps, the biggest lesson I learned through this transition, ironically, is my new found appreciation for modern IDEs and the features they provide to help make my job easier. It’s unfathomable to use TextPad and/or command prompt for managing medium to large projects. I became then more interested in saving time, and focused on coding effectively.

There wasn’t guilt this time around when I finally stumbled upon Eclipse2 in one of my previous work place. Setting up a complex project involving many libraries was a cinch, and I embraced and used the myriad of built-in tasks Eclipse provided. At the time, I also picked up on ANT build tool rather quickly but I think it had a lot to do with my previous transition. The CVS integration was a godsend. It took some time getting acclimated with the “perspective” concept to take full advantage of the IDE, but still I wasn’t satisfied with its entire offerings. I don’t know. The editor just “didn’t feel right” to me. Then my friend introduced me to Intellij IDEA3. I couldn’t agree more with IDEA’s slogan: develop with pleasure.

I have been developing with pleasure for awhile now. IDEA is like the partner you always wanted: looks, intelligence, and most importantly, it doesn’t get in the way while you are coding. I had the (dis)pleasure of developing for .NET platform with VS2005 a couple years back, and I knew I wouldn’t be joining the .NET camp any time soon afterwards. I was happy to return to Java. I have been invited with the idea to experiment with Ruby(for Rails), but am hesitant for the time being. It could be the next “big” thing, but I am no rush to see what this over-hyped exotic language is about. Maybe of one of these days when I can finally get the smile off my face. But until then.

First post

Saturday, February 24th, 2007

Nothing much to see for now.