You know how sometimes when you’re out at a bar with your hot friends and even though you’re drunk and it’s really late you can still tell that the person who’s checking you out is not your type? No? Me neither… I’d much more likely be the unlucky one doing the checking out. Well, at least Eclipse gives us [...]
Archive for November, 2007
Sorry, you’re just not my type
Posted in search, tagged can I buy you a drink? sorry I'd rather have the money on November 30, 2007 | Comments Off
Content assist and templates
Posted in editor, tagged look ma no hands on November 29, 2007 | Comments Off
Let’s face it, we’d all like to do a little less typing and a little more sailing, wouldn’t we? Ctrl-space is the jack-of-all-trades keystroke that will have you typing less and hitting the water in no time. It goes by the intriguing name of “Content Assist” and I must admit that it’s a little hard to [...]
Taming large methods
Posted in refactoring, tagged what you've got hold of there is an anteater on November 28, 2007 | Comments Off
Next to using a chair and a whip, one of the most effective ways to tame large, complicated, methods that do many things is to refactor them into smaller more manageable methods that each do a single thing. Eclipse offers an “Extract Method” refactoring for this case. You can select a block of code that you want [...]
Ctrl-1 keystroke to rule them all
Posted in editor, tagged ctrl-1 ctrl-1 ctrl1... I just tripled my productivity on November 27, 2007 | Comments Off
Sometimes I wish that my IDE were smart enough to write my code for me by having a keystroke for “fix bug” or “imagine what customer wants and implement it… elegantly”. Eclipse can’t quite do that but it does have a wicked-cool keystroke in Ctrl-1, which depending on the context can suggest some pretty intelligent things.
For example, if [...]
Check your references
Posted in search, tagged mr. t vs eclipse... mr. t wins! on November 26, 2007 | Comments Off
Got a misbehaving class? Need to find out who’s using it? Ctrl-Shift-G and Ctrl-Alt-G are on your side. Ctrl-Shift-G is used to find all references to a particular symbol in the workspace and it’s also activated by right-clicking in the editor and selecting References > Workspace. Ctrl-Alt-G is textual search for the highlighted word in [...]
Can anyone comment on this?
Posted in editor, tagged I bet even GPS is confusing in Ireland on November 23, 2007 | Comments Off
I’ve thought about this for some time and have come to the conclusion that commented out code is evil. Sometimes it’s left there because someone’s hinting at alternative solutions in an attempt to be helpful or as a piece of historical antiquity for future generations to puzzle over but most of the time it serves as [...]
Run, Forrest, run!
Posted in debug, run, tagged electrocute your stomach into fitness on November 22, 2007 | Comments Off
The first time I saw Forrest Gump I thought it was a great movie. I was particularly impressed with Tom Hanks’ portrayal of the mentally retarded Gump. Years later, I had the misfortune of watching The Terminal in which Hanks revises his Gump role, this time as a mentally retarded traveller/interior decorator who gets stuck in an airport [...]
When your code has an identity crisis
Posted in refactoring, tagged a rose by any other name would smell as sweet on November 21, 2007 | Comments Off
Did you know that Sting used to be named Gordon Sumner, that John Denver was Henry John Deutschendorf or that Michael J. Fox was Michael A. Fox? Name changes are uncommon when we’re talking about people (except in the entertainment industry, apparently) but they’re very common when we’re talking about code.
Renaming is one of the [...]
List all shortcuts
Posted in help, tagged help I need somebody not just anybody on November 20, 2007 | Comments Off
At the risk of rendering this blog superfluous, Ctrl-Shift-L is the shortcut that lists all shortcuts – a meta-shortcut if you will. Type it and it opens a scrollable table in the bottom right hand corner of the workbench. Shortcuts are listed in alphabetical order according to the rather intuitive names given them by the [...]
Kills lines… dead
Posted in editor, tagged the usual pulp fiction wars on November 19, 2007 | Comments Off
I’ve become so accustomed to using this keystroke that I now constantly type it in applications that do not support it, then I become angry that they don’t. Anger leads to hate, hate leads to suffering and the next thing I know, I imagine reaching for a lightsaber (you know, the one that says “Bad Mother F***er”) to slice my [...]