February 2004 Archives

February 27, 2004 8:20 PM

Nokia 7650 fact list

Nokia 7650 I'll use this diary entry to collect known facts about Nokia 7650 mobile phone and corresponding technologies (and I will update it when new facts come to my attention).

Nokia 7650 is the member of so called Series 60 developer platform. Devices in this series are based on Symbian OS and support both C++ and Java applications. 7650 contains Symbian OS 6.1.

Band Functionality: GSM900/GSM1800
Browser Version: WAP 1.2.1
Java APIs: CLDC 1.0 (JSR 30), MIDP 1.0 (JSR 37), Nokia UI API
Data Bearers: HSCSD, GPRS
PC Connectivity: Bluetooth, Infrared
Display resolution: 176 x 208
Color Depth: 4096 Colors (12 bit)
Heap Size: free RAM (up to 1.4MB)
Shared Memory for Storage: free user memory, up to 4 MB
Maximal Jar File Size: up to 4MB, WAP GW restrictions applies
Messaging: SMS, MMS, Email
Music Support: MIDI tones (poly 24), AMR audio clips (NB-AMR)
Dimensions: 114 x 56 x 26 mm
Weight: 154 g
Navigation Key: Grid key mat, 2 labeled soft keys, 5 way scrolling
Extra Features: VGA camera (640x480), SMTP/POP3/IMAP4 email, Handsfree speaker
My testing phone Nokia 7650 is identified (*#0000#) as:
V 5.06
Nice introduction to Series 60 is the document Developer Platform 2.0 for Series 60: Introductory White Paper (Dev_Plat_WP_v_1_0.pdf, 2.88 MB). Although primary oriented to business customers, it also describes differences between Developer Platform 1.0 and 2.0.

Getting Started with Java(TM) Technology (Getting_Started_with_Java_Technology_v1_1.pdf, 387 kB) is a very good introductory document for people who never used GUI programming environments. It also contains step-by-step creation of HelloWorld project.

Introduction to Series 60 Applications for Java Developers (Introduction_to_Series_60_Appls_for_Java_Developers.pdf, 122 kB) is much better introduction for developers. It contains the description of Java implementation for Series 60 devices.

Java 2 Platform, Mobile Edition (J2ME) consists of two main components:

  • Configuration (Connected Limited Device Configuration) - virtual machine (VM) and a small set of classes for system-level programming.
  • Profile (Mobile Information Device profile) - additional classes for new APIs (UI, sound, ...)
MIDlet is an application written for MIDP profile. They are written to extend javax.microedition.midlet.MIDlet class. This class controls the life cycle of each MIDlet by those three methods: startApp(), pauseApp() and destroyApp().

MIDlet suite is a JAR (Java ARchive) file containing several MIDlets and other classes. MIDlet suite is described by small text file called Java Application Descriptor (JAD file) that contains e.g. the name of the provider of MIDlet suite, the name of MIDlet suite, its size and URL.

The following table shows the source code of HelloWorld midlet:

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HelloWorld extends MIDlet implements CommandListener
    private Command exitCommand;
    public HelloWorld() {}
    public void startApp()
        Displayable current = Display.getDisplay(this).getCurrent();
        if(current == null)
            TextBox helloScreen = new TextBox("Hello World!", "Hello World!", 256, 0);
	    exitCommand = new Command("Exit", Command.EXIT, 1);
    public void pauseApp() {}
    public void destroyApp(boolean b) {}
    public void commandAction(Command c, Displayable d)
	if (c == exitCommand) {
The following table shows how HelloWorld MIDlet looks like when run in several emulators and also on real device:
Nokia Developers Suite for J2ME Sun J2ME Wireless Toolkit 2.1 Sun J2ME Wireless Toolkit 1.0.4 Real device
HelloWorld MIDlet in the emulator HelloWorld MIDlet in the different emulator HelloWorld MIDlet in the different emulator HelloWorld MIDlet on the real device
Corresponding JAD file looks like:
MIDlet-1: HelloWorld, HelloWorld.png, HelloWorld
MIDlet-Jar-Size: 1169
MIDlet-Jar-URL: HelloWorld.jar
MIDlet-Name: HelloWorld
MIDlet-Vendor: Pavel Janik
MIDlet-Version: 1.0
How to deploy the MIDlet JAR file to the device? There are several ways to do that.

Sun J2ME Wireless Toolkit 2.1 provides the capability to run MIDlet via OTA. You will enter the URL of the HTML page containing link to JAD file and J2ME WTK simulates the phone fetching the file from the network, asking the user if he really wants to install the application and will finally install it. By default J2ME WTK uses webserver on the localhost so you can test it even without connection to the network. This is good for testing, but it is useless for deployment to real device.

How it works?

Over-the-Air deployment Over-the-Air deployment
1. Intro screen of Sun J2ME WTK 2.1 when running via OTA (Over-the-Air). 2. The Application Management System (AMS) page allows you to run the installed applications (none is installed by default) or to install new applications.
Over-the-Air deployment Over-the-Air deployment
3. When installing the application, you must enter the URL to the page containing the link to JAD file. Sun J2ME WTK 2.1 automaticall creates HTML page for you in the bin/ directory. 4. When the page is displayed, you can chose which JAD file to open.
Over-the-Air deployment Over-the-Air deployment
5. JAD file is displayed. The name of the application, its size, version, vendor and the full location of it JAR file are displayed. You can choose to cancel the installation or to install it. 6. Application was successfully installed and is now listed on the main AMS page.
On the other hand, real device works in the same way - you point its WAP browser directly to JAD file and the device lets you choose if you wish to install the package. If you wish to, it will download the JAR file and install it.

The MIME type for JAD files is text/vnd.sun.j2me.app-descriptor, the MIME type for JAR files is application/java-archive.

There are also other ways to deploy the MIDlet to the real device: via infrared (look at the OpenOBEX project), via Bluetooth, via e-mail and via MMS.

Going the systematic way of learning new things, I started to read CLDC specification. Here are my notes.

Connected, Limited Device Configuration, specification version 1.0a, Java 2 Platform Micro Edition

This specification defines Java platform for small devices (from only 160 kB to 512 kB of memory for Java virtual machine, configuration libraries, profile libraries and applications). CLDC is the core definition of Java platform and is the basis for profiles. Profiles are more focused definitions of Java platform for particular devices.

CLDC specification addresses the following areas:

  • Java language and virtual machine features
  • Core Java libraries (java.lang.*, java.util.*)
  • I/O and networking
  • security
  • i18n
Additional features are to be addressed by profiles.

So the architecture of CLDC devices is layered. The lowest level is host operating system (Symbian OS 6.1 in case of Nokia 7650), Java virtual machine, CLDC libraries (Java libraries), profiles (Java libraries, MIDP profile).

Java application is run by JVM by calling one single main function declared as

  public static void main (String[] args)
CLDC specification does not support floating point numbers, finalization of class instances.

There are two types of class libraries in CLDC:

  • classes that are subsets of standard Java 2 SE
  • classes specific to CLDC
The first group consists of java.lang.* (Object, Class, Runtime, System, Thread, interface Runnable, String, StringBuffer, Throwable, Boolean, Byte, Short, Integer, Long, Character, Math), java.util.* (Vector, Stack, Hashtable, interface Enumeration, small subset of Calendar, Date and TimeZone, Random) and java.io.* (InputStream, OutputStream, ByteArrayInputStream, ByteArrayOutputStream, interface DataInput, interface DataOutput, DataInputStream, DataOutputStream, Reader, Writer, InputStreamReader, OutputStreamWriter, PrintStream). CLDC specific classes are contained in the package javax.microedition.* (io).

Properties in CLDC: java.util.Properties is not implemented, but several properties are defined:

  • microedition.platform - name of the host platform or device (default null)
  • microedition.encoding - default character encoding (default ISO8859_1)
  • microedition.configuration - name and version of the supported configuration (default CLDC-1.0)
  • microedition.profiles - names of supported profiles separated by blanks (default null)
Those properties are available for reading by method System.getProperty(String property). Profiles may define additional properties.

Properties in NDS for the Java 2 Platform, Micro Edition's emulator (Series 60 MIDP Concept SDK Beta 0.3.1, Nokia Edition):

microedition.platform = j2me
microedition.encoding = ISO-8859-1
microedition.configuration = CLDC-1.0
microedition.profiles = MIDP-1.0 MIDP-2.0
Properties in Sun's Java 2 Platform, Micro Edition Wireless Toolkit's emulator (DefaultColorPhone):
microedition.platform = j2me
microedition.encoding = ISO8859_1
microedition.configuration = CLDC-1.1
microedition.profiles = MIDP-2.0
Properties in real Nokia 7650:
microedition.platform = Nokia7650
microedition.encoding = ISO8859_1
microedition.configuration = CLDC-1.0
microedition.profiles = MIDP-1.0
Generic Connection framework defined in CLDL allows network/serial connections. CLDC spec doesn't define protocols, only the framework. It is profile's task to define supported protocols.

The second basic specs is J2ME Mobile Information Device Profile (MIDP), specification version 1.0a, Java 2 Platform Micro Edition. Profile of Java 2 Micro Edition is a device-type specific set of APIs.

The MIDP specification defined minimal hardware characteristics as: screen resolution at least 96x54, 1bit display depth, pixel shape approximately 1:1, at least one input device (ITU-T phone keypad, QWERTY keyboard or touchscreen). Minimal memory requirements are: 128 kB non-volatile memory for MIDP components, 8 kB non-volatile memory for persistent data storage and at least 32 kB volatile memory for Java runtime (heap). And of course: two-way networking with limited bandwidth.

MIDP defines additional properties:

  • microedition.locale - current locale of the device (default null)
  • microedition.profiles - defined in CLDC, must contain at least MIDP-1.0
The specification requires locale to contain both language and country (like cs-CZ), but Nokia 7650 returns only en or de according to the selected language of the GUI.

Reading resources You can use java.lang.Class.getResourceAsStream for access to resource files bundled in MIDlet's JAR file. This code reads the contents of the resource file resourcefile.txt and displays it in the TextBox.

import java.io.*;
import java.lang.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class ApplicationResources extends MIDlet implements CommandListener
    public ApplicationResources() {}
    public void startApp()
        Displayable current = Display.getDisplay(this).getCurrent();
	String resValue;
        if(current == null)
	    InputStream resFile = getClass().getResourceAsStream("resourcefile.txt");
	    byte[] resByteArray = new byte[100];
	    int resLength = 0;
	    try {
		resLength=resFile.read(resByteArray, 0, 100);
	    } catch (java.io.IOException ex) {
	    resValue = new String(resByteArray, 0, resLength);
            TextBox resourcesScreen =
		new TextBox("Resource contained in JAR file", resValue, resLength, 0);
    public void pauseApp() {}
    public void destroyApp(boolean b) {}
    public void commandAction(Command c, Displayable d) {}
Call of java.lang.System.exit must throw java.lang.SecurityException (MIDlets should exit only by MIDlet.notifyDestroyed). The same applies to java.lang.Runtime.exit. When you call System.exit in the emulator, you get:
startApp threw an Exception
java.lang.SecurityException: MIDP lifecycle does not support system exit.
	at java.lang.Runtime.exit(+9)
	at java.lang.System.exit(+7)
	at Exit.startApp(+4)
	at javax.microedition.midlet.MIDletProxy.startApp(+7)
	at com.sun.midp.midlet.Scheduler.schedule(+266)
	at com.sun.midp.main.Main.runLocalClass(+28)
	at com.sun.midp.main.Main.main(+116)
Real device will produce alert "Application Error. Exiting...".

Timer and TimerTask classes. This part of MIDP specification allows applications to set alarms and be notified when they expire. Timers can be set to expiry once and also expire repeatedly. It is implemented by two classes:

  • java.util.TimerTask - this class implements interface Runnable and represents task that could be attached to Timer expiry for execution. Typical usage is:
    TimerTask myTask = new TimerTask() {
       public void run()
       ... the code to run ...
  • java.util.Timer - this class is the actual timer that is scheduled for expiry with its schedule method:
       timer.schedule(myTask, 1000*seconds);
The Timer can be scheduled for one-time execution by those methods:
public void schedule(TimerTask task, long delay)
This schedules the timer to expire after delay milliseconds, or
public void schedule(TimerTask task, Date time)
which schedules the timer to specified time in the future. If the time is in the past, the task is called immediately.

The Timer can also be scheduled for repeated execution by:

public void schedule(TimerTask task, long delay, long period)
public void schedule(TimerTask task, Date firstTime, long period)
where delay (firstTime respectively) is the delay before the first execution (resp. the exact time of the first execution) and period is the time (in period ) before the next (and additional) executions. Scheduling using plain schedule can be very inaccurate because n+1th call of the function is scheduled according to time of nth call. This is called fixed-delay execution. It is inaccurate because of garbage collection in VM etc.

The second method to schedule tasks is fixed-rate execution. In this method, tasks are scheduled according the real time approximately. n+1th call of the function is scheduled according to nth scheduled call. If something slows down, several close runs of the task can happen in the period less than period. This can't happen in fixed-delay execution.

The Timer can be canceled by calling cancel method:

public void cancel()
The following is a small example of fixed-delay execution:

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.Timer;
import java.util.TimerTask;
public class TimerTaskDemo extends MIDlet implements CommandListener
    private Command exitCommand;
    private Timer timer = new Timer();
    private TextBox myScreen;
    private int seconds = 10;
    public void startApp ()
        Displayable current = Display.getDisplay(this).getCurrent();
        if(current == null)
            myScreen = new TextBox("TimerTask demo!", "You have 10 seconds to Exit...", 256, 0);
	    exitCommand = new Command("Exit", Command.EXIT, 1);
	    TimerTask counterTask = new TimerTask() {
		    public void run()
			myScreen.setString("Seconds left: " + Integer.toString(--seconds));
	    TimerTask dismissTask = new TimerTask() {
		    public void run()
	    timer.schedule(counterTask, 1000, 1000);
	    timer.schedule(dismissTask, seconds*1000);
    public void pauseApp() {}
    public void destroyApp(boolean b) {}
    public void commandAction(Command c, Displayable d)
This MIDlet displays the following screen first:
Initial screen of TimerTask MIDlet.
and schedules task counterTask to execute in a second and execute repeatedly after 1 second. It also defines second task dismisstask which is scheduled to destroy the MIDlet in 10 seconds. The counterTask changes the text of the TextBox to count down to 0:
Count down in TimerTask MIDlet.
When 0 is reached, the MIDlet is destroyed. You can also destroy it manually by pressing the Exit button (the Series 60 MIDP Concept SDK Beta 0.3.1 Nokia edition emulator has Close button instead and Exit is hidden in Options menu).

CLDC specification defines only the generic framework for connections, but no actual protocols. This is the role of profiles. MIDP profile v1.0 defines subset of the HTTP 1.1 protocol (interface HttpConnection) with GET, POST and HEAD methods.

Example of HttpConnection javax.microedition.io.HttpConnection interface is used for HTTP connection. The following example shows the sample usage of it.

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import java.io.*;
import javax.microedition.io.*;
public class HttpConnectionExample extends MIDlet {
    private Display display;
    String url = "http://www.janik.cz/";
    public HttpConnectionExample() {
	display = Display.getDisplay(this);
    public void startApp() {
	try {
	} catch (IOException e) {
    public void pauseApp() {}
    public void destroyApp(boolean b) {}
    void getViaStreamConnection(String url) throws IOException {
        HttpConnection c = null;
        InputStream s = null;
        StringBuffer b = new StringBuffer();
        TextBox t = null;
        try {
	    c = (HttpConnection)Connector.open(url);
	    c.setRequestProperty("User-Agent", "UnknownAgentUsingNokia7650");
	    s = c.openInputStream();
	    int ch;
	    while((ch = s.read()) != -1) {
		b.append((char) ch);
	    t = new TextBox("Web page", b.toString(), 1024, 0);
        } finally {
	    if(s != null) {
	    if(c != null) {
This example shows the usage of HttpConnection interface and using its setRequestProperty property. We set the User-Agent HTTP header to the string "UnknownAgentUsingNokia7650" and it is shown as such to the server itself: - - [...time...] \
    "GET /www.janik.cz/ HTTP/1.1" 200 689 "" "UnknownAgentUsingNokia7650"

Persistent storage is the only mechanism to permanently store data on the MIDP device. The implementation on MIDp devices is called Record Management System (RMS). RMS is not relational database. Records are byte arrays and it is the responsibility of the application (MIDlet) to understand the data stored there. Developers can pack anything they want to into the record using DataInputStream, DataOutputStream and ByteArrayInputStream, ByteArrayOutputStream. You can even store images in records.

Every record is identified by record IDs. Record IDs are unique in one record store (see below). First record's ID is 1, second's 2, ... If you delete record with ID 2, and add new one, record ID 2 is NOT reused.

What is it record store? It is a collection of records (with their IDs running up from 1). Each record belongs to exactly one record store and are accessed through their record store. Record store is named. The name is case sensitive and may contains up to 32 Unicode characters. Only the MIDlet who created the record store and other MIDlets from the same MIDlet suite can access record store. This means that each and every MIDlet suite in the device can create record store with the same name and they will be distinct. MIDP version 1.0 does not allow sharing record stores between MIDlet suites, but version 2.0 allows that. When the MIDlet suite is removed/uninstalled from the device, all record stores created by it must be removed too.

There is no locking in the record store API, but the implementation must ensure that all operations are atomic, synchronous and serialized. After each change, the record store is marked with timestamp (in the form of System.currentTimeMillis()) and version. If you want to track changes in the record store, you can also register listener and be notified after each change.

Actual implementation of record management system is inside javax.microedition.rms. MIDP devices provide limited data storage, but the specification requires at least 8k of non-volatile memory for persistent data. Applications can specify the minimal required persistent data storage in their JAD file in the MIDlet-Data-Size property. Devices may refuse to install the application if there is not enough space.

Really nice introductory article about RMS were written by Eric Giguere at Sun's website. Similar article was written by Qusay Mahmoud.

MIDlet Life Cycle Now, it is the good time to explore the life cycle of a MIDlet. MIDlets are executes in a virtual entity referred to as Application Management Software (AMS). As our picture describes, MIDlet can be in several phases (when already installed on the device):

  • Paused
  • Active
  • Destroyed
While creating the MIDlet, AMS calls its constructor. MIDlet constructor can't access the Display. When the application receives focus from the AMS (at the start or when returning from Paused state), startApp() is called. Application then should call appropriate startup page by Display.getDisplay(this).setCurrent() function (when starting up) or restore the page displayed before going to Paused state. When the application loose the focus, pauseApp() is called. No screen is displayed then, but all timers and tasks are still running. The application can setCurrent() the screen that should be presented when returning from Paused state. The function destroyApp(boolean unconditionally) is called when application is being destroyed. No access to Display, but the application can/should save its state to persistent storage. The application can request to not enter the Destroyed state by throwing MIDletStateChangeException but only if the unconditional flag is set to false.

MIDP specification contains the chapter about User Interface, using so called MIDP UI API. There are two APIs for two distinct ways of programming applications:

  • high-level API - it is designed to be as portable between devices as possible. Should your goal be portable application, prefer high-level API. While using this API, application doesn't have a way to control fonts, colors etc. This is controlled directly by the implementation. The application also can not use all events like in the low-level API.
  • low-level API - is provide for applications that need direct control of both displaying and user interaction (like keys, ...). Device specific API is also part of low-level API (like Nokia UI API). Applications using low-level API (should they be portable) should not use device specific APIs and when working with screen, should be independent of the screen size.
The Central object for UI API is Displayable. It is abstract class extending Object. Displayable can be placed on the Display thus shown to the user. It may have a title string, a ticker and zero or more commands and listener attached to it. The actual visual presentation is defined by its subclasses.

MIDP 1.0 defines two subclasses of Displayable:

  • Screen - is the parent of all high-level UI widgets: Alert, TextBox, List and generic Form.
  • Canvas is the direct screen representation used in low-level API.
The TextBox is UI widget (Screen in fact) that allows the user to enter and edit text in the widget. This UI widget has the following constructor:
  TextBox(String title, String text, int maxSize, int constraints)
where title is the title of the TextBox, text is its initial contents, maxSize identify the maximal number of character programmer wants it to contains (see below) and constraints allows the programmer to modify its behavior.

The maximal size of the text inside TextBox is device dependent so application should check getMaxSize() for valid sizes. It is not the size of the displayed text though. The displayed text may be shorter and it is device's responsibility to allow scrolling in it.

Constraints allow programmer to specify which value is to be entered. They are constants defined in the class TextField:

  • ANY
  • URL
TextBox in the emulator The following table shows the sample TextBox code for the TextBox on this image. The title is displayed twice on the screen, but the real device displays title only once (at the top of the screen). Ticker is running from the right to the left side of the screen just below the title. The application can't set its direction nor speed, it is decided by the implementation. If there are linebreaks in the ticker text, emulator removes them, but the real device uses empty boxes - so do not use them. Several screens can reuse the same ticker (see setTicker() method of Screen). The modifier TextField.ANY allows any text to be typed. If you change it to TextField.PASSWORD, only starts will be displayed instead of the actual text.
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class UITextBox extends MIDlet implements CommandListener
    private Command exitCommand, showCommand;
    private TextBox uiTextBox;
    public UITextBox() {}
    public void startApp()
        Displayable current = Display.getDisplay(this).getCurrent();
        if(current == null)
            uiTextBox =
		new TextBox("UITextBox title",
			    "The initial contents of the uiTextBox", 256, TextField.ANY);
	    exitCommand = new Command("Exit", Command.EXIT, 1);
	    showCommand = new Command("Show the text", Command.SCREEN, 1);
	    Ticker uiTicker = new Ticker ("This is a ticker!");
    public void pauseApp() {}
    public void destroyApp(boolean b) {}
    public void commandAction(Command c, Displayable d)
	if (c == exitCommand) {
	} else if (c == showCommand) {
	    // This is only useful for the emulator.


Posted by Pavel | Permanent link | File under: Mobile technologies

February 27, 2004 7:17 AM

Chinese builds of OpenOffice.org

Chinese (simplified) OpenOffice.orgI was asked to provide Chinese builds (both simplified and traditional) for our supported systems.

Screenshot of Chinese simplified version is attached to this entry. Looks nice. But if this is only Chinese simplified, how Chinese traditional looks like?

There were some issues connected with both versions. E.g. the About OpenOffice.org dialog is translated but strings OOO_VENDOR and OOO_LICENSE are not translated correctly etc.

If you can try both versions, please look at ftp.linux.cz.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 26, 2004 2:50 PM

New toy...

Mutt@Nokia I have received new toy yesterday - Nokia 7650 - which is able to run Java applications (I even created HelloWorld today).

But this is not that important. I'd like to show you different thing :-) I successfully run s2putty 1.3 Beta 3 on it! Mutt is running, vi is running too. See the screenshot.

Do you like it? There are several issues with it - there is no simple way to send Space character to the remote server, it does not have the possibility to remember the last remote server etc. But those are minor issues.

And because GPRS is flat rate here in Czech republic, it is very useful mechanism to be online without unpacking the notebook from your bag.


Posted by Pavel | Permanent link | File under: Work

February 25, 2004 10:09 PM

RC1 really close...

OpenOffice.org 1.1.1 Release candidate 1 is really close today. There are only three issues as of now: #i18759# (documentation only), #i21646# (Microsoft Windows VC6 compiler issue for Windows builds which will be retargeted to 1.1.2) and #i25250# (fixed already).

Michael Meeks (see his blog) prototyped l10n statistics generator.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 23, 2004 11:48 PM

khirano: welcome!

Khirano is another OpenOffice.org builder who decided to create his own blog. Welcome!


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 23, 2004 11:23 PM

Novell's financial results for the first fiscal Q 2004

financial results Novell just announced impressive financial results for its first financial quarter of 2004. They bought S[uU]SE at the beginning of this year...


Posted by Pavel | Permanent link | File under: Work

February 23, 2004 11:00 PM

Incoming e-mail statistics for today

Today is the first complete (almost) day when my mail server adopted new antispam filtering rules (see the diary entry from yesterday).

Here is the small statistics:

s:/var/log # grep "Feb 23 " mail|grep -c status=sent
s:/var/log # grep "Feb 23 " mail|grep -c reject:
s:/var/log # grep "Feb 23 " mail|grep -c "User unknown in local recipient table"
681 possibly valid e-mails delivered (~50 of them being marked as spam via spamassassin on my machine) and 2297 invalid e-mails. 2158 of them (94%) with non-existent e-mail address in To:, 117 HTML e-mails (5%), 3 e-mails with ADV in the subject (directly discarded) and the rest was sent with non-existent domain of the sender.

This is quite positive. Really interesting is also the statistics of e-mails with invalid To:. There are only five valid e-mails in the domain janik.cz and there are unbelievable amount of delivery attempts to non-existent e-mails:

    163 dhinds
    103 honey
     82 pittman
     79 Schroeder
     75 devinscottch
     75 cvjb
Of course those e-mails are imaginary and they never exist on my systems.

To summarize: never ever setup so called domain wide e-mail when you accept/deliver all *@domain to one mail box. Czech Telecom presents this service (doménový koš in Czech) as a big advantage of their offers. Never believe them ;)


February 22, 2004 7:14 PM

Another level of antispam filtering at @janik.cz

I have just activated another level of antispam rules at @janik.cz. Should new rules affect your e-mails, please call me or contact me by other means.

In general: do not try to send me HTML mails, correct your DNS entries, use only proper addresses etc.


Posted by Pavel | Permanent link | File under: Internet technologies

February 22, 2004 11:59 AM

Intel released docs for their x86-64 implementation

Intel released Software Developers' Guide to their 64-bit Extension Technology.

They also published FAQ on their technology. Although mainly PR oriented, the last question and the answer is interesting:

Q9: Is it possible to write software that will run on Intel's processors with 64-bit extension technology, and AMD's 64-bit capable processors?
Intel 64-bit Extension Technology A9: With both companies designing entirely different architectures, the question is whether the operating system and software ported to each processor will run on the other processor, and the answer is yes in most cases. However, Intel processors support additional features, like the SSE3 instructions and Hyper-Threading Technology, which are not supported on non-Intel platforms. As such, we believe developers will achieve maximum performance and stability by designing specifically for Intel architectures and by taking advantage of Intel's breadth of software tools and enabling services.

So the result from reading this is: although AMD's and Intel's architectures are completely (read entirely) different, you should optimize for AMD64, because it will run on Intel's 64-bit extension technology without problems. You can't do that vice-versa, because Intel added additional instructions to the architecture.


Posted by Pavel | Permanent link | File under: Work

February 19, 2004 9:32 PM

Hospodářské noviny o České poště, s.p. (Czech)

Hospodářské noviny (i server ihned.cz) publikovaly článek Pošta chce vydávat výpisy z katastrů i občanské průkazy, který spekuluje o možných budoucích službách poskytovaných Českou poštou, s.p.

Komentáře však obsahují opravdu hodně inteligentní připomínky lidí :(


Posted by Pavel | Permanent link | File under: Work

February 18, 2004 10:14 PM

XFree86 4.4 with new license getting rejected by more and more distributions

... and not only Linux distributions (Mandrake, Debian GNU/Linux, Gentoo, Fedora Core). Also OpenBSD rejected to use it. Great community show and lecture.

The community is not dependant on the vendor of any single piece of software. When the vendor changes the license, the community can still reuse the older version and fork it. Or people will stand up and create new implementations.

This case can also show us how strong the community is and if different Linux distributors and vendors can cooperate more closely together.


Posted by Pavel | Permanent link | File under: Internet technologies

February 18, 2004 7:39 AM

EU rejected Microsoft settlement proposal

European Union rejected the settlement Microsoft proposed. At least something is different here in Europe.

On the other hand, American people can sue McDonalds because of their weight.

Update: On the other hand (again), I do not think that any member of parliament in other democratic countries has the possibility to be drunk twice. It is possible in our country :(.


Posted by Pavel | Permanent link | File under: Internet technologies

úterý, 17. února 2004, 23:14:04

Vedení ... (Czech)

Citát z porady: "Vedení (myšleno vedení celého podniku) to nesmí mít složitější než provoz."


Posted by Pavel | Permanent link | File under: Work

February 17, 2004 7:11 AM

First Exploit based on leaked Microsoft Windows source code

The first exploit based on the leaked part of the source code of Microsoft Windows (see recent entry in my diary) has been released yesterday.

I thought people would be more responsible and will also release unified diff which fixes the problem, but this time, it didn't happen.


Posted by Pavel | Permanent link | File under: Internet technologies

February 16, 2004 11:39 PM

x86_64 port moving again

Dan Williams did a lot of work today on further moving x86_64 port and filed about 10 issues with my patches. Hopefully I'll get to all of them tomorrow and we will solve all current issues (build till project svx) this week.


Posted by Pavel | Permanent link | File under: OpenOffice.org

sobota, 14. února 2004, 19:06:07

PDF export i podpora starších verzí Microsoft Wordu (Czech)

Dnes jsem do našeho buildu implementoval již dříve vytvořenou podporu pro starší verze Microsoft Wordu (a vyřešil tak chybu #i25349#) i opravdu pro export dokumentů ve formátu PDF (příslušná chyba byla nahlášena v konferenci českých uživatelů OpenOffice.org a poté potvrzena vývojářem).

Nyní již na všech systémech běží překlad build-13 (s datem Sat Feb 14 17:10:21 CET 2004).

Update: Vše je již hotové a k dispozici na ftp.linux.cz.


February 14, 2004 6:16 PM

Two gigabytes of spam/virus mails in 40 days?

I set-up spamassassin several days before the end of the last year and am very carefully handling mails with it, learning from my old archived spam and such.

Today, my Emacs/Gnus session told me:

nnfolder-save-mail: Buffer exceeds maximum size
It is unbelievable, but I have two gigabytes of archived spam/virus mails in about 50 days. This amount does not count with spams that reached non-existent e-mails @janik.cz because I'm archiving the directly on the mail server which is permanently connected to the Internet.

Almost 99.9 percent of spam comes from the world, but I have also identified 5 companies from our country who were sending spams to me. I reported their behavior to their respective trade offices with the help of the template created by local consumer organization.

I think my current setup can be used for about one or two years from now and then, I'll change my e-mail address to different one and will modify my anti-spam rules accordingly.

Update: do you know that 2 GB of spam can be bzip2ed to 40 MB of data?


Posted by Pavel | Permanent link | File under: Internet technologies

February 13, 2004 11:12 AM

Are you interested in Windows Source Code?

Microsoft announced yesterday, that Windows Source Code was made illegally available on the Internet.

This is the statement from their press release. The interesting thing in this press release is, that Microsoft informed about this issue. The second interesting thing is that Microsoft tries to stop people think about the breach to their corporate network and thus implicitly said: "It appears that one of our partners, who received the sources, published them."

And the most interesting part of their press release is:

At this time there is no known impact on customers.
So, Microsoft customers, think about the fact that someone has the sources of the products you use. They were able to find so many bugs even without the source. What if they have source handy?

On the other hand, now those crackers (who have the source handy) can also provide patches and fixes. And maybe even faster than Microsoft does right now ;) Those are the benefits of the source code in general.

More details e.g. at SecurityFocus.


Posted by Pavel | Permanent link | File under: Lost in Thoughts

February 13, 2004 12:07 AM

Our build system upgraded to cws_src680_ooo20040225

I have just successfully upgraded our build system to cws_src680_ooo20040225, fixed several build issues (see Bonsai) and am now waiting for ftp.linux.cz to come up again to rsync everything there.

Good night!


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 12, 2004 5:42 PM

Development digest, cws_src680_ooo20040225 opened

OpenOffice.org Development digest for week nr. 5 was released by CPH. The digest contains announcements of Afrikaans, Zulu and Sipedi localizations (we build binaries for Microsoft Windows for those teams) and also the link to OpenOffice.org Perl Library that could be interesting to you if you like Perl (I hate it...). The most interesting thing from the users point of view is that export to PDF now also exports hyperlinks (it was done on 680 branch for 2.0).

Rüdiger Timm announced opening of new CWS for 2.0 development, tagged as cws_src680_ooo20040225. This is to be closed on February, 25th.

I hope to get the first build before weekend (the weather forecast for tomorrow is terrific, -20 degrees Celsius, thus I'll stay at home tomorrow).

Update: see Bonsai for recent changes in cws_src680_ooo20040225.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 12, 2004 6:49 AM

Solaris/SPARC installation sets of build-12 finished

Localized installation sets of OpenOffice.org 1.1.1b for Solaris/SPARC are now built. They are being mirrored to ftp.linux.cz. Please test them and report results back to me.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 11, 2004 11:00 PM

Just received OpenOffice.org 1.0 Resource Kit

OpenOffice.org Resource Kit Today, I have received long awaited book OpenOffice.org 1.0 Resource Kit by Solveig Haugland and Floyd Jones. Although this book was written for version 1.0, I hope to be better user after reading it.

So, I'm off to actually read the book :)

And if you have problems delivering e-mails to OpenOffice.org and all of its subdomains, be sure to add you to CC: of #i24914# and see Sander's blog entry about The continuing siege.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 10, 2004 8:12 PM

Translations finished, mails down and hardware upgrade

We have successfully provided four GSI files to be merged (Czech, Hungarian, Slovenian, Slovak) to CVS tree fix3. This will be the base for OpenOffice.org 1.1.1.

Mails @OpenOffice.org seems to have pretty hard life to get through the main main relay. It is not accepting e-mails very frequently:

pavel@linux:~> telnet asmx1.sfo.collab.net 25
telnet: connect to address Connection refused
The downtime of OpenOffice.org site is announced for tonight (UTC) for hardware upgrade.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 10, 2004 8:28 AM

Thesaurus does not work on the first run

It is pretty strange bug in OpenOffice.org (confirmed at least in 1.1.0 and also in upcoming 1.1.1) that thesaurus does not work on the first run of OpenOffice.org before spellchecking is "activated". The full description is available in the issue I reported (#i25299#). Kevin Hendricks confirmed this issue, but it doesn't seem to be connected with thesaurus but with the way Writer works with lingu resources.


Posted by Pavel | Permanent link | File under: OpenOffice.org

neděle, 8. února 2004, 16:04:31

Neuvěřitelně proměnlivé počasí

Tyto čtyři fotografie byly pořízeny v průběhu cca jedné hodiny dnes, v Rudné u Prahy.

Nádherné počasí, perfektní viditelnostSpolečně s Mirkou a Danem jsme vyjeli na malou projížďku do obce Červený újezd, která je z Rudné vzdálená cca 7 km. Naším úkolem bylo podívat se, je-li z této vesnice přímá viditelnost do Rudné, abychom zjistili možnost propojení Rudné přes Úhonice do Červeného újezdu. Předpokládali jsme, že viditelnost bude vynikající, neboť bylo nádherné slunečné počasí. Pravda, se silnějším větrem...
Návrat domů Vítr byl zřejmě silnější, než jsme předpokládali, takže po příjezdu domů jsme nevěřili tomu, co se před námi otevřelo. Hotová smršť. Během několika málo okamžiků začalo sněžit tak, že nebylo téměř nic vidět a byla obrovská tma. Sníh padal tak rychle, že za chvíli byla původně suchá zahrada pokrytá souvislou vrstvou sněhu. A obloha téměř nádherně čistá.
Sníh!Nějak takto to vypadalo přibližně deset minut po zachycení předchozí fotografie. To je až k neuvěření :-)
Všechno pryčUpdate: Po cca dalších dvaceti minutách začíná opět svítit sluníčko. No prostě klasické proměnlivé počasí. Ale jinak je tady hezky ;)


Posted by Pavel | Permanent link | File under: Private

February 07, 2004 9:50 PM

Build-12 of fix3 being uploaded to ftp.linux.cz

Really wonderful day. I wrote the script FixLocalizeErrors.sh that is able to fix issues in localize tool with missing backslashes before line endings for newly added languages. We were hit by this issue really hard, because we are adding several new languages in our builds. And because our system was based on providing clean builds done by script, I had to manually create the patch to fix all those issues. Unbelievably boring work.

Now it is pretty simple and we only have to create one simple patch that overcomes two simply misplaced translations (see patch for details).

I hope this script can help also other people who are adding new localizations (Evan, this is also for you ;).

And now for the real thing: build-12 is on its way to ftp.linux.cz. The version for GNU/Linux is finished, other system (Solaris, FreeBSD and Microsoft Windows) are building right now. Please test and report results.

This version contains DicOOo 1.2 which should use different font for Czech language. Please check this.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 06, 2004 7:24 PM

fix3 in a pretty good shape

Today was in the sign of building CVS tree fix3 on more systems. Builds on GNU/Linux and FreeBSD were finished yesterday, but I left Windows and Solaris for today.

Solaris build stopped at the very beginning because I had :: in the PATH and this confused GetCorrectPath yet enough to remove the rest of the PATH for the build. Thus gmake (which is located in /opt/sfw/bin/gmake) was not found when bootstrap tried to make dmake.

The build on Microsoft Windows was more adventurous, because I'm still stuck with old compiler. Thus I had to fix three issues #i25134#, #i25170# and #i25175# with OpenOffice.org's code. Those patches are already in fix3 as of now so I'm about to start all those builds again from scratch.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 05, 2004 10:13 PM

Public tender with only one candidate?

Czech Republic is very strange country. Local government uses several practices to avoid public tenders (strategic order, divide one order to several etc.). Ministry of Informatics found a new strategy to not break the law.

They announced public tender (Czech) with conditions set so strictly, that only one telecommunication operator could engage the tender.

And surprisingly enough, that company really won the tender ;)


Posted by Pavel | Permanent link | File under: Lost in Thoughts

February 05, 2004 3:41 PM

Watching cws_srx645_ooo111fix3?

Bonsai Do you want to see what is new on the branch cws_srx645_ooo111fix3? Just look at Ximian's Bonsai for this branch. Wonderful service. Thanks, colleagues :)

And when you are at ooo.ximian.com, look at OpenOffice.org Cross-Reference too.


Posted by Pavel | Permanent link | File under: OpenOffice.org

February 04, 2004 11:29 PM

Build updated to fix3 tree, PO files updated accordingly

After several hours of manual work I successfully updated PO files for our languages (Czech, Slovak, Hungarian, Slovenian and Danish) and handed them over to translators. Additionally I generated PO files for three South African languages (Afrikaans, Northern Sotho and Zulu) and Welsh PO files.

Unfortunately, there is an issue when building with JDK 1.3 thus I'm not able to provide installation sets yet.

The deadline to provide final GSI files is on February 10th, so we have a lot of work now...


Posted by Pavel | Permanent link | File under: OpenOffice.org