Sunday, October 30, 2011

Jabber for mobile phone

There is good project for jabber client for ordinary phones(non smartphones, androids)
http://www.bombusmod.net.ru/ works fine on nokia 6500s.

this project is fork for http://bombus-im.org/

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-1.5.0.16
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

Ubuntu.

Edit your .bashrc file to include the lines:
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME
export ORACLE_SID=XE
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 https://svn.dev.your/repo/trunk/src .

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 - http://www.jetbrains.com/idea/documentation/inspections.jsp
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 - http://rusya7.blogspot.com.

SevNTU Checkstyle new release 1.0.4

New checks in release 1.0.4:
Sources:
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 - http://www.meetup.com/SV-SUG/
Eclipse user group - http://www.meetup.com/sfeclipse/
Jenkins - http://www.meetup.com/jenkinsmeetup/

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! http://meetu.ps/3DRb

Friday, October 7, 2011

Make an branch for code that was already changed in svn

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

Solution:
1. create destination folder on svn
2. in source_folder "svn add [files that are new for svn]"
3. svn copy http://svn.server.com/svn/destination 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 server.domain.com 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 - http://michael.peopleofhonoronly.com/vim/

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" :).

Solution:
I used this builds for Lighting and Google calendar provider:
http://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-1.9.2/linux-xpi/
you can investigate http://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/ 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.