Archive for category Software

Misspellings

Real life mis-spellings (saw them during last two days):

  • MDB = Massage Driven Bean (sorry this one is Java specific)
  • … CMMI curses are available … (from a corporate email)

Нет комментариев

Java community responds

Java community oficially responded to my post Three years apart with their triple salute:

Java Scout Honour
«In memory of Alexey»

Interestingly, some of them were drinking russian Baltika!

Ex-cameloter drinking russian Baltika!
Poisoned by Russian beer

Комментарии (2)

Look, instance initialiser!

Another thing that I would have learnt had a read a Java Language Specification:
There are instance inistialisers in Java :)
Discovered May 2006
In java, a class can have an instance initialiser, which is executed before constructor is called. I knew about static initialisers that are called when the class is loaded, but never heard about instance initialisers. A colleague taught me that :)

class Foo {
    private int i;
    {i = 5;} //instance initialiser
}

It is sometimes useful in anonymous classes as they cannot have a constructor.
Added to Things that I still discover about Java.

Нет комментариев

Недельный курс по UML

Н

а прошлой неделе я не работал — посещал недельный курс «Object Oriented Analysis and Design using UML». Хочу поделиться впечатлениями. Первое, и самое удивительное, для меня с российским и кипрским прошлым, это то, как я попал на курс. Как-то раз руководитель проекта попросил меня представить моё продложение по мелкому рефакторингу в виде UML диаграмм. Я сказал, что лучше я напишу всё текстом, так как хоть основные аспекты UML я и понимаю, но чтобы качественно нарисовать диаграмму, мне нужно много времени. «Окей», сказал руководитель, «пиши текстом».

Там есть еще »

Комментарии (3)

On usability of Java 5 language features

I only had a chance to develop using JDK5 for a short period of 1 month. And it was 1.5 years ago. Recently I needed a quick solution for basically a script comparing two Excel spreadsheets for matching records and recording results into same spreadsheets. Since I programmed in Java really fast and I felt reluctant indeed to get myself buried into MS VB for Excel documentation, and also taking into account my good experience with Jakarta POI — a Java API To Access Microsoft Format Files, I decided in favour of Java. (Well those were mostly excuses as you might have guessed anyway :) ).

Там есть еще »

Комментарии (4)

& operator is applicable to booleans

While I thought binary operator & in Java was designed to work with integer types, it appeared to be perfectly applicable to boolean operands and worked exactly the same way as &&:

//always true:
assertTrue(boolean1 & boolean2 == boolean1 && boolean2); 

See more things that I still discover about Java.

Комментарии (4)

Another onset of Linux

Linux logo
Sometimes, quite rarely, once in a year or two, I get attacked by a mad feeling that I should give Linux another try. Give it another chance to become my primary OS at home. All its previous attempts failed and I am still under convenient and beautiful Windows XP. Recent Julia’s plans to learn Linux followed by installation of Fedora Core 4 to a spare 40Gb hard drive on her PC. After spending 2.5 hours on playing with PRM dependencies in order to install driver for nForce4 integrated gigabit ethernet controller (I wasn’t able to use yum because no internet was available) I desperately fell in love with linux again.

Там есть еще »

Комментарии (22)

Subversion: incapable of merging deletion with modification?

I am currently discussing in Subversion mailing list an issue with SVN merging, when a file is deleted in branch, modified in the main trunk and then merged back from the branch to the main trunk. What subversion does in this case is it silently deletes the file losing the changes made in the trunk. Here is the start of the discussion thread. So far I discovered that this (turns out) rather important for our company scenario is handled well by CVS (my posting about this). During merge, CVS simply says

cvs.EXE update: file file1.txt has been modified, but has been removed in revision demo-branch

What is it? If it’s not a bug then at least an imperfection. My purpose currently is start discussing this in a subversion developers’ mailing list so that we at least are able to see any movement towards fixing this in the future.

Комментарии (6)

Subversion: do I need to explicitly add/delete each file?

Started to get familiar with Subversion (SVN) recently. We have plans to employ it at work and I need to create good demo cases for other developers distinctly showing advantages of SVN over our current version control system. I discovered an interesting feature of SVN which I’d like to hear your comments about.

In CVS if I delete couple of files locally and then run cvs remove, if I remember correctly, it discovers which files I deleted and marks them all for removal from repository. It does not work with additions though: I need to cvs add explicitly each file/directory after I created it. In SVN, I need do both explicitly. Unless your IDE does all deletions/additions for you, which all good IDEs do of course. But not everybody use good IDEs so this feature looks like a regression given that SVN is positioned as a replacement for CVS. Let alone that they could also improve additions so that running svn add without argument(s) adds files that are created in the local copy after last update and do not yet exist in the repository.

Нет комментариев

Quake 2 written in java

Guys from Bytonic have created a java port of open-sourced quake2 engine. It is using standard Java3D API and two different implementations of Java3D based on OpenGL. So apart from OpenGL the engine is all pure java. Although they have a benchmark page, I was interested to test it myself. So I downloaded jake2 (this is how the port is called) and original q2 demo version. I used q2demo1.dm2 to measure fps. I left all the settings at their default values except the resolution which I set to 1024×768, full screen. jake2 showed 212 fps, original C version resulted in 191 fps. The only thing that was unfair is that jake2 was based on quake2 3.21 sources and original demo I used was version 3.14.

I had a glance at the java sources too. Naturally, they don’t look like proper java sources but more like not very object oriented C sources. At the end of the day, this is a port from conceptually different language, not an original application.

The conclusion is whoever challenges the performance of modern JVMs is welcome to give jake2 a try and eat dirt :)

Комментарии (2)