english

...now browsing by tag

 
 

Chess Clock for Android 1.0-b7 released…

Monday, March 1st, 2010

I have released 7th release of Chess Clock for Android today.

Screenshots

image image

Major changes

  • I have changed application name from “Android Chess Clock” to “Chess Clock for AndroidTM” to be in sync with Android Branding Guidelines
  • added support for Scrabble® time control (penalty for overtime)
  • slightly improved UI
    • inactive timer is now gray
    • simple animation when clock is pushed
    • added moves counter
  • added Flurry.com usage stats to know better what functionality is mostly used.

Known bugs

  • After release I found one bug: when player times out then it is necessary to push reset button twice to reset clocks. This bug is related to Simple Delay mode only. It will be fixed in next release.

Android Chess Clock 1.0-b5 released

Thursday, February 18th, 2010

Today I released minor upgrade of Android Chess Clock. Major features implemented:

  • “Click” sound when players swapped
  • Application should be available also for devices like HTC Tattoo (explicit declaration of small screen support in AndroidManifest.xml)
  • Minor redesign of about screen
  • Updated Android Market text.

Android Chess Clock 1.0-b4 released…

Monday, February 15th, 2010

I’m happy to announce that next release of Android Chess Clock was released today. For me it is important release as this is first one that I tested on my own Android Phone. There are many new features.

Screenshots of new features

image image image
Selection of calculation
methods
Bronstein time control
configuration
New Icon

Full new features & bug fixes list

  • Bug fixes
    • Fixed issue with incorrect reset when coming back from Configuration screen via Cancel button
  • New features
    • New icon
    • Added new time control calculation methods:
      • Simple Delay
      • Fischer
      • Bronstein
    • Added button allowing bug report

Coming soon

  • Hourglass method
  • Support for Go & Scrabble time control approaches

Android Chess Clock 1.0-b3 released today

Saturday, February 6th, 2010

I have released next version of Android Chess Clock. Major change is refactoring of calculation engine to support multiple calculation strategies in future. Although this change is not visible for user today it is investment for future.

Screenshots

acc-main acc-main-l

Major changes in this release

  • slight screen design graphic improvement
  • added different layout for landscape screens
  • when any player runs out of time application allows one click reset of time to start next game quickly
  • added feedback button to About screen
  • various small code improvements

Coming soon

  • additional time control algorithms

Android Chess Clock 1.0-b1 released…

Saturday, January 30th, 2010

I’m happy to inform you that first beta version of Android Chess Clock was released to Android Market, filed under category Games/Brain and Puzzle.

Application is currently fairly simple (as you can see on screenshot) but works:

acc-main acc-config

Main features

  • supports Android 1.5+
  • players alternate by taping anywhere on the screen
  • supports small QVGA screens as well as HVGA
  • gently graphics without CPU (and energy) consuming animations
  • independent setting of time for every player

Application was tested on T-Mobile G1 (thanks to Honza) and Google Nexus One (thanks to Vindra) as I don’t have currently real Android device.

Known bugs & user requests

  • bugs
    • application resets countdown when you change orientation of screen from landscape to portrait
  • nice to have
    • missing icon
    • application does not run in full screen mode
    • time can be set only as hours and minutes but not seconds
    • sound when player runs out of time

Please write your feedback bellow the article.

How we spend Christmas in Czech Republic….

Monday, January 18th, 2010

IMG_5592 I wrote this blog post primarily for my colleagues from ON Semi. Hope you will get closer to our Christmas habits and traditions. This article describes situation in my family but in majority of parts it is valid for whole Czech Republic too.

Christmas day

Contrary to US holidays main Christmas day here is December 24. It is called Generous day and it is the day when people give gifts to each other. To children we usually say that gifts was given by baby Jesus.

In some families children decorate the tree to mark place where gifts should be delivered.

In some families (including ours) Christmas tree is delivered together with gifts. This causes some logistic issues (tree is usually about 2 meters/7 ft tall and fully decorated with a lot of glass decorations;-)) but also some fun to parents as it forces them to be imaginative ;-)

Generous evening

Generous evening is most awaited part of the day (especially by children). Gifts are delivered after Generous day dinner that is usually between 4 or 5 pm (when sky becomes dark and there is first star).

When family finishes dinner everybody is waiting for sound of small bell from the room where gifts are expected to be delivered.

In our family we use trick with two cell phones. One has recorded sound of small bell as ringing tone and from the second one I’m calling from table. We have also remote controlled power outlet so the tree starts shining at this moment too. It looks like magic to children.

To make magic atmosphere for children during Christmas dinner adults also say:  “I saw something in the garden…  It’s not anymore there” or “There was some flash above the house of our neighbors” etc.

Generous day meals

For breakfast on generous day in our family there is served vánočka (Christmas cake plaited from dough) prepared by my wife.

Lunch is usually very light, usually some soup.

Main dish in generous day is dinner.

Most traditional meal for generous day dinner is fried carp and potato salad. There are two styles of potato salads: mayonnaise style (much more common) and vinegar style. Mayonnaise style is made from boiled potatoes with carrots, garden pea, celery and optionally (not everyone does) boiled eggs or apples.  Vinegar style is simpler. Just boiled potatoes with fresh onion in water + oil + vinegar dressing.

Alternative to carp is pork coated with breadcrumbs and eggs and flour. This was preferred in my family (when I was young) as we don’t like fish.

During the generous evening dinner we also eat Christmas wafer with honey as starter to be healthy.

Generous day traditions

As major part of Czech nation is atheistic most Christmas traditions is not related to church traditions and they are some kind of superstition:

Golden Pig

We say to children that when they will starve whole day until generous day dinner then they will see golden pig. Usually they don’t manage to starve whole day but when they do then we use flashlights and pig flashes for short time in the garden.

Kissing under mistletoe

Every girl and woman has to be kissed under mistletoe to be healthy next year. To have mistletoe in the house we cut it from the tree in the garden or we buy it and hang on chandelier.

Nobody can leave the the table during generous day dinner

There is superstition that nobody can leave the table during generous day dinner. Otherwise somebody from family will die next year.

Giving freedom to small carp

In some families (not ours) they buy two carps. They eat bigger one and smaller one gets freedom.

This is a bit controversial habit. It is because some animal protection activist sais that carp is extremely shocked by changes of temperature (from bathtub to river) and dies in the river.

Splitting the apple

Some people cut apple into two halves and in case that core has star shape then it is OK and in case that it has cross shape then the person that cut apple dies in next year.

Midnight mass

Even atheistic people goes to church on Generous day. There is so called midnight mass, that usually takes place close to midnight from Dec 24 to Dec 25.

Hopefully you had fun while reading this post and in case you have any questions or comments feel free to add them as comments bellow this article. You can also share link to this article with your friends.

Netbeans performance problem: JPanel form is much slower if running inside RCP

Wednesday, August 5th, 2009

Last week I was fighting with very strange performance issue. We have quite complicated JPanel form and I was doing some performance opmtimization. I thought that it is now OK, but when then same form was executed as component inside NetBeans Rich Client Platform, it was horribly slow.

Click to continue »

How to submit Bugzilla bug using XML/RPC and pure Java

Thursday, July 16th, 2009

Our project uses Bugzilla for tracking issues. I was looking for solution how to submit occured exception programatically. I found quite simple solution using Groovy and I have adapted it to pure Java.

Here is the source code:

import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.httpclient.HttpClient;
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
import org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory;

public class Main {
   public static void main(String s[])
      throws MalformedURLException, XmlRpcException {

        HttpClient httpClient = new HttpClient();
        XmlRpcClient rpcClient = new XmlRpcClient();
        XmlRpcCommonsTransportFactory factory = new XmlRpcCommonsTransportFactory(rpcClient);
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();

        factory.setHttpClient(httpClient);
        rpcClient.setTransportFactory(factory);
        config.setServerURL(new URL("http://bugzilla.example.com/xmlrpc.cgi"));
        rpcClient.setConfig(config);

        // map of the login data
        Map loginMap = new HashMap();
        loginMap.put("login", "tomas.hubalek@....");
        loginMap.put("password", "*top*secret*");
        loginMap.put("rememberlogin", "Bugzilla_remember");

        // login to bugzilla
        Object loginResult = rpcClient.execute("User.login", new Object[]{loginMap});
        System.err.println ("loginResult=" + loginResult);

        // map of the bug data
        Map bugMap = new HashMap();

        bugMap.put("product", "Playground");
        bugMap.put("component", "Database");
        bugMap.put("summary", "Bug created from groovy script");
        bugMap.put("description", "This is text including stacktrace");
        bugMap.put("version", "unspecified");
        bugMap.put("op_sys", "Linux");
        bugMap.put("platform", "PC");
        bugMap.put("priority", "P2");
        bugMap.put("severity", "Normal");
        bugMap.put("status", "NEW");

        // create bug
        Object createResult = rpcClient.execute("Bug.create", new Object[]{bugMap});
        System.err.println("createResult = " + createResult);
     }
 }

Usage of Apache XML RPC Client is quite straightforward, only gotcha is that mapped parameters must be set passed as new Object[]{bugMap}. Otherwise you get ClassCastException.

How to extract list of packages from JAR file

Wednesday, July 15th, 2009

I’m currently working on some project using NetBeans Platform. This project need to have list of public packages from the jar in configuration file. So I write this quite simple code to do it manually

unzip -vb commons-beanutils-1.8.0.jar \
      | grep 00000 | cut -c 59- | grep -v META-INF \
      | tr / . \
      | awk '{print "<publicPackage>" $1 "*" "</publicPackage>"}'

A the result is

<publicPackage>org.*</publicPackage>
<publicPackage>org.apache.*</publicPackage>
<publicPackage>org.apache.commons.*</publicPackage>
<publicPackage>org.apache.commons.beanutils.*</publicPackage>
  ...
<publicPackage>org.apache.commons.collections.*</publicPackage>

I love unix text processing utilities…

How to detect that my operating system is running under VMWare?

Thursday, November 13th, 2008

We had trouble with some server (it had strange variations of performance but load and other metrics was OK) and got suspicion that it is no real Linux box. To prove this theory I was looking for some trick how to detect whether it is running under VM Ware.

I found one kind of detection using CPU instructions but it required to compile some C/C++ code and I not skilled enough to do it. Then I found something easier.

I found that VM Ware has registered MAC addresses range that begins with 00:50:56. Then it was pretty easy:

ici-prom@mesdev:~/Com­monInterfaceDrsq> /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:94:77:49
inet addr:172.16.102­.134 Bcast:172­.16.102.255 Mas
inet6 addr: fe80::250:56f­f:fe94:7749/64 Scope:L
UP BROADCAST RUNNING MULTICAST MTU:1500 Metri
RX packets:50945267 errors:0 dropped:0 overruns
TX packets:60687615 errors:0 dropped:0 overruns
collisions:0 txqueuelen:1000
RX bytes:17384391194 (16.1 GiB) TX bytes:63720
Base address:0×1070 Memory:f4820000-f4840000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mas­k:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:766348 errors:0 dropped:0 overruns:0
TX packets:766348 errors:0 dropped:0 overruns:0
collisions:0 txqueuelen:0
RX bytes:88850050 (84.7 MiB) TX bytes:88850050

Switch to our mobile site