How often do you press backspace multiple times to get rid of all whitespace characters that are before your cursor?
IntelliJ IDEA has interesting and highly-undocumented editor action called “Hungry Backspace” that allows you to perform that action with just a one key press.
Unfortunately, IntelliJ IDEA by default leaves the operators at the end of line…
Excetptionin Java is widely discouraged practice. Checkstyle, PMD, FindBugs - all of these tools have rules complaining on every attempt to catch
Exception. While this practice might be useful to do some generic action for all exceptions like logging and rethrowing with more context, but generally we should stay alert whether it is really necessary.
In Java empty arrays (of zero length) are fully immutable and safe to be shared across entire classloader. This means that if we invoke e.g.
new intmore that once that’s just waste of memory (very small waste, but still).
IntelliJ IDEA has many useful navigation features. Every competent user already knows, that in order to navigate to any file in the project it’s enough to press
Nand type file name or its part. Nevertheless, we usually use this functionality in very limited way.
As with majority of conceptions in software development, their original meaning gets obscured pretty fast. I have impression that it happened even to as simple idea as TDD…
Many projects have adopted only one commit per pull request rule. It makes commit history much more clear and readable. Generally I agree with it, but I’d like to propose an exception from this rule.
Many coders consider themselves as smart when they have learnt how to use
SPACE. When they need to declare variable
SPACEto complete each word separately, which gives about 5-6 autocompletions and decent amount of typing for the above.
Let me teach you the trick that would save you thousands of keypresses in your life. Just type
new ArLi, press
Vand… you are done!
subscribe via RSS