Tips

Tips and Tricks from all fields

New Eclipse Word Wrap plugin adds keyboard shortcut

Had a few spare minutes yesterday to move the eclipse word wrap plugin from sourceforge to github. While on it also added keyboard shortcut so you can switch on-off the wrapping using Ctrl+Alt+W (M1,M3+W in “Eclipse Language”). Trust me, it’s a useful plugin : ) Latest version can be installed from the update site: http://ahtik.com/eclipse-update/ [...]

Also posted in Eclipse, Java | 5 Comments

Stop Multitasking, Set Deadlines and Learn About Eisenhower Matrix

TimeGT blog has couple of new productivity-related articles (last post from today). Feel free to check them out, maybe you’ll find something inspiring. They explore issues around multitasking, give ideas about setting your own deadlines for increased productivity and introduce Eisenhower Matrix for task prioritization.   How Multitasking Kills Productivity Quadruple Your Productivity by Setting [...]

Leave a comment

Changing GIMP, XChat and other GTK apps to English language

This can be a real headache unless you know the trick: create new system environment variable “lang” with value “c” (lang=c).

Leave a comment

Changing number scale for Oracle NUMBER columns

Whenever you try to change your NUMBER column to more specific scale like NUMBER(10,2) you end up with an error message: SQL Error: ORA-01440: column to be modified must be empty to decrease precision or scale There is a way out of this but it is a bit hacky. Let me know if there is [...]

Also posted in Technology | 1 Comment

Quick hint: Ignore bin, target, build etc dirs in Eclipse CVS and SVN Synchronize View

Directory ignore feature for svn and cvs in Eclipse Synchronize View is located in a straightforward place but still from time to time we tend to forget. I keep looking at SVN settings and synchronize View Menu but it is not there. Here it comes: Window->Preferences->Team->Ignored Resources Faster is to simply type “ignored” into preferences [...]

Also posted in Eclipse | Leave a comment

Using Glassfish Eclipse Bundle for JavaDB, JPA and JSP

Have you ever wondered how quickly one could get from installing a J2EE server to running a JSP page that fetches data from DB using modern persistency technology like JPA? To find out we (me and Ivar) did a little test-drive using recently announced Glassfish Eclipse Bundle that contains Eclipse IDE with bundled Glassfish J2EE [...]

Also posted in Eclipse, Java, Technology | 8 Comments

Can you guess the output? junit and initialization

Can you guess the output without running the code? The relation to Eclipse is simply the fact that big part of eclipse.org is a great example of good test coverage built on top of jUnit. Plus, it was literally pulling my hair out in one of the eclipse-related testing-suites. I stepped into this a few [...]

Also posted in Eclipse, Java, Technology | 2 Comments

Java Quiz of The Day – same private field instance for two classes

What is the smallest change to main method that makes it sysout “true”? You are allowed to change ONLY the main method! Of course changing sysout line is out of question. You can leave your answer in comments and I’ll publish/approve them together with the solution. [java] public class InstanceDemo { public static void main(String[] [...]

Also posted in Eclipse, Java | 49 Comments

SimpleDateFormat is not thread-safe

How many of you use java.text.SimpleDateFormat as static field? I have seen this to be pretty standard practice (and have done this myself too). Be aware that SimpleDateFormat#format(..) is not thread-safe and thereby for most of the cases you should not use this as a static field in server, Eclipse RPC or any other multi-threaded [...]

Also posted in Java | 1 Comment

Turning off win xp master volume beep sound

Aren’t you annoyed by the beep that is so loud? I got pretty frustrated after trying to look for disablement under volume control preferences. Nothing there. Also turning off all sound notifications at control panel (including Exclamation sound) didn’t help. Still nothing, just one aloud beep. Windows XP Volume Control   Here’s the quickest way [...]

10 Comments