Sunday, October 30, 2011

Jabber for mobile phone

There is good project for jabber client for ordinary phones(non smartphones, androids) works fine on nokia 6500s.

this project is fork for

Thursday, October 20, 2011

Setup maven from scratch on Ubuntu

sudo apt-get install maven2
copy settungs.xml to ~/.m2

Edit .bashrc, add few lines:
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-
export PATH=$JAVA_HOME/bin:$PATH
export M2_HOME=/usr/share/maven2
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

Setup sqlplus for Oracle XE


Edit your .bashrc file to include the lines:
export PATH

To apply changes:
. ~/.bashrc

Wednesday, October 19, 2011

Svn merge latest changes from trunk to branch

Command is simple, just log it for further reference:
svn log | more

List of latest merged versions could be printed by:
svn propget svn:mergeinfo .

from output you need to get latest revision of you previous merge from trunk or initial coping to branch. For example: 1001.

svn merge -r 1001:HEAD .

Tuesday, October 18, 2011

Source for future checkstyle checks

After discussion on Habr, about our new release of checkstyle good link was found - list of all inspections in Intellij Idea -
This will be good source of tasks for students for their practice.

Or may be it reasonable to direct them to update PMD/Findbug if necessary?

Saturday, October 15, 2011

Blog of the friend

Ruslan Diachenko introduced his tech blog -

SevNTU Checkstyle new release 1.0.4

New checks in release 1.0.4:
Update site for Eclipse (EclipseCS plugin is required):

ForbidAnnotationCheck - Forbid specific annotation for field/method, e.g. forbid @Autowired annotation for private field. Done by Victor Hidoyatov. (issue).

AvoidConstantsInInterfacesCheck - avoid declaration of constants in interfaces. Done by Vladimir Svikhunov. (Issue) .

AvoidHidingCauseExceptionCheck - hiding Cause exception in throwing new exception. Done by Daniil Yaroslavtsev. (issue).

AvoidNotShortCircuitOperatorsForBooleanCheck - Forbid to use "|", "|=", "&" for boolean/Boolean variables, and force to use "||", .... , explanation link. Example: "boolean b |= returnBoolean()". Done by Daniil Yaroslavtsev.  (issue) .

IllegalCatchCheck - Options to ignore 1) exact re-throw after logging 2) creation and throw of other Exception base on current exception. Done by Daniil Yroslavtsev. (issue).

OverridableMethodInConstructorCheck - Do not use protected/public method in C-tor. Use only private and final. Check all call hierarchy from c-tor to avoid: c-tor -> private -> public/protected. Done by Daniil Yaroslavtsev. (issue).

ReturnBooleanFromTernary - It is a bad practice to return boolean values from ternary operations. Just use the value inside branch instead. Done by Ivan Sopov.

ReturnNullInsteadOfBoolean - Arguably it is the matter of style to use Boolean for ternary logic or enum. And since all the information is in the single file and even in the single method, I think that checkstyle is capable of doing this. Done by Ivan Sopov. (issue)

VariableDeclarationUsageDistanceCheck - check distance between declaration of variable and its first usage of it. Options: Allowed distance (in rows); Ignore variable names (regexp). Done by Ruslan Diachenko. (issue).

AbbreviationAsWordInNameCheck - XMLReader should be names like XmlReader. Checks names for fields, methods , ....... . Few ignore options. Done by Roman Ivanov. (issue).

Monday, October 10, 2011

Meetups at SF

The Silicon Valley Spring User Group -
Eclipse user group -
Jenkins -

Nano editor cheat sheet

Select: ALT + M + A
Copy: ALT + 6
Paste: CTRL + U

Saturday, October 8, 2011

I joined San Francisco Java User Group on Meetup

I joined The San Francisco Java User Group on Meetup. You should too!

Friday, October 7, 2011

Make an branch for code that was already changed in svn

SVN. You have changed code and need to make a quick backup of it to branch

1. create destination folder on svn
2. in source_folder "svn add [files that are new for svn]"
3. svn copy source_folder

All changes will be copied and committed to branch, trunk will not be changed,
just do on source_folder "svn revert -R ."

Monday, October 3, 2011

Vi and jump to certain line number

Problem message from ssh:

Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:41
RSA host key for has changed and you have requested strict checking.
Host key verification failed.
We need to quickly remove 41 line.

Example to jump for certain line (41th):
 vi +41 /home/rivanov/.ssh/known_hosts
Press key d twice to remove current line.

Just for further information:
Vim keys -

Saturday, October 1, 2011

Ubuntu, Thunderbird 3.1.15, Lightning, Google calendar

After update on my Ubuntu 10.04, Thunderbird version was updated and Lightning extension become incompatible. Official extension site provide Lightning for Thunderbird 7 only. No link to "Older version" :).

I used this builds for Lighting and Google calendar provider:
you can investigate for more stable versions.

just for logs, here instructions how to setup lightning and google calendar:

Install Lightning addon first from Tool>Addons menu item. For 64 bit use this link.

Please switch off Autoupdate for Plugins: Edit -Preferences-Advanced-"Automatically check for updates", update will brake the compatibility.