Linex and Iberia

Past week I’ve travelled to Valencia to take a rest and see the city. A big city, by the way, altough people’s timetable was a bit “strange”, but that’s a different story…

One of the most surprising things happened in the flight: in the plane there were glass coasters, napkins and even headrest covers with the advertisment “sé legal, copia GNU/Linex” (“be legal, copy GNU/Linex”).

It seems like Junta de Extremadura has made an agreement with Iberia to show Linex advertisments and offer Linex CDs and leaflets in some regional flights. What a good thing!

linex.jpeg

Summer practices on PhpReport

PhpReport is a GPL web application that tracks tasks performed by a company staff or workgroup and allows administrators to launch queries and get statistics about the tasks and time spent on each one. This give company managers the proper information to do cost analysis and decission making. PhpReport is used internally by Igalia staff on daily basis since December 2003.

This summer Igalia has planned a “company practices” hiring to improve PhpReport. Jesús Pérez is the student selected, and he will make use of XP Tracker to manage his tasks. At this link you can follow his progress.

The improvements assigned to this development iteration satisfy new functional needs and publishing & community issues. Some of those improvements are:

  • Internationalization.
  • Migration of existing OpenOffice.org spreadsheets into PhpReport, to make result extraction and business decission making easier.
  • XML import module rewriting, to improve mantainability and extensibility of the application.
  • Administration and usage documentation.
  • Package improvements.

As a result of this iteration, a new release is planned for the end of the summer. Stay tuned!

NeoSudoku 1.2.1 GPL released!

I’ve worked a little more in NeoSudoku and at last it can:

  • Solve human targeted sudokus using the limited resources that the cell phone has.
  • Learn new sudokus (new board configurations input by hand)
  • It can’t save new sudokus to persistent storage, but it will be the next feature to come.

The rest of the features can be found on my past post. You can download it from here:

Enjoy it!

Working on NeoSudoku

This is the current J2ME/MIDP project I’ve been working on at my spare time since the past weekend: An implementation of the known game Sudoku.

It’s not published yet, because I want to enhance it a bit more and at this moment it contains some sudokus borrowed from a copyrighted book, so publishing wouldn’t be a good idea…
Currently the project is at version 1.1, having the following features:

  • Complete implementation of the game rules, with detection of illegal number placement and end of game. The game is playable.
  • Several pre-stored sudokus can be chosen for playing.
  • Special hints available:
    • List of available values that can be put into a square.
    • Board map showing the number of values eligible to be put on each square (good to detect the squares that can only be filled with one single value).
  • Special solvind tools avaliable:
    • “Reduce” tool, that detects all free squares with only one possible value, fills them and repeats the process until no more of such squares are remaining.
    • Limited “solve” tool, that tries to solve the sudoku using a backtracking algorithm. Unfortunately, the phone goes out of memory very soon, so this tool is very poor. I’m working to optimize this algorithm in order to enhace the decission path and to lower the memory footprint of the “context” of each step.
  • Tested on Nokia 3100 and Sony Ericsson T630.

From now on, I would like to enhance the following points to reach version 1.2:

  • Optimize the solving algorithm until it’s useful.
  • Write a sudoku editor and give the user the ability to store input sudokus into RMS memory (resource management system) on the phone.
  • Make possible for the user to push and pop the current game state on a stack, to do backtracking by hand.

And now, enjoy some screenshots. I’ll keep you informed. Stay tuned…

NeoSudoku1.png NeoSudoku2.png NeoSudoku3.png NeoSudoku4.png NeoSudoku5.png NeoSudoku6.png NeoSudoku7.png

Experiments with WMA (JSR-120)

This night I’ve been doing some tests with Wireless Message API (JSR-120) that, surprisingly, is supported by my cheap Nokia 3100.

I was expecting that this API lets me examine the SMS inbox folder or something similar, but it doesn’t. It “only” provides a way of data interchange (as in a network socket) using SMSs as transport layer. You can open a connection to a url like “sms://666123456:5000” (yes, I don’t know what a port means :-m) and, on the other side, listen to “sms://:5000” and receive data.

I wrote a small test midlet and was able to “send” one of such messages (the phone showed me a confirmation dialog), but it never reach the destination phone. Maybe it can only be received by another Java midlet, I was expecting a normal SMS.

I’ll continue to do more testings when I’ve time enough…

P.S.: Dape has discovered today that WMA doesn’t make possible to access to sms inbox (for security reasons?), and can only be used to receive sms sent by another midlet using WMA. Phones that are able to receive WMA sms on their inbox are implementing the specification in a wrong way.

Password card utility in MIDP 1.0

At last I’ve improved and published NeoPwd under GPL. It’s an utility to store and query electronic bank access passwords (coordinade cards) into a mobile phone.
It’s written using CLDC 1.0 and MIDP 1.0 API. The package has a text file where you can write an authentication password, your card number and all the password coordinates data. Then, you should build the application, create an obfuscated package (it takes less space) and download it to you cell phone.

In order to use this utility with your own passwords, you have to unzip NeoPwd.jar (yes, a jar is in fact a zip), edit the data.txt file inside it, put there your passwords, zip all the stuff again as NeoPwd.jar and download it to your cell phone. The format of data.txt is explained in the source code (NeoPwd.java).

Enjoy it!

Using GPG with KMail

Every time I need to use GPG, I do it from the command line, but now I am wondering how to configure KMail in order to use all the GPG features from my favorite mail client.

To configure KMail, I followed the instructions at KMail website, but with some variations to make it work in Debian Sarge.

I already had KMail, gnupg, kdepim, etc… installed, so, the only packages I had to install were pinentry-qt and gpg-agent. I didn’t have to compile gpg-agent, because it was already in Sarge.

I had to configure .gnupg/pgp-agent.conf as said in the link but putting the right pinentry path, and had to create the .kde/env/gpgagent.sh containing the “eval” line.

That’s all. I did all the tests and it worked well. The only thing that I couldn’t do was to cipher using S/MIME, because the public key list was empty. I’ll do more research on that when I’ve more time…

By the way, you can download my public key from here. Ask me about the figerprint before adding it to your ring.

PHP is my friend :) (and also is NetBeans)

Everyday I enjoy using this language more and more. It’s powerful, it’s easy, and it can be used in everyday life for many more things than simply writing web pages.

Theese days I’m taking part in the development of Sicus, and one of the tasks I’ve to do is writing unit tests of some parts of the application. It’s boring and involves a lot of repetitive coding. Well, that’s where PHP can help…

I’ve written a couple of scripts that take a brief specification of the methods of a class (method, mandatoryness, erroneous values) and automatically write the methods to perform the tests using loops, conditionals and variable substitution. It’s easy because text/template substitution is what PHP is designed for.

The code might not be very elegant, but performs well enough.

[24/6/2006 update] 

Yesterday I discovered a NetBeans menu tool that would had avoided me writing one of that PHP scripts I was talkinf above of (the getter & setter method generator).

NetBeans has the ability of examiining your code, noticing what member attributes haven’t get() and set() methods yet, and generate that code automatically. That tool is available from the menu: Refactor –> Encapsulate field.

Parsewiki, a wiki-to-any converter

This days I’m writing a lot of docs in DocBook format, and the lack of a good editor is a pain. When I say “a good editor”, I mean some tool that avoids these awful and artificially long XML tags, because I don’t want to spend more time typing tags than typing normal text.

So, I did some googling and discovered ParseWiki, a Perl script that transforms wiki text into DocBook, HTML, XHTML and even Latex. This tool is saving me a lot of time. Have a look at it in:

http://paginas.fe.up.pt/~villate/parsewiki/