Make your own free website on Tripod.com

Content:

Home

Bash Obfuscator

Overview

Bash shell scripts are very powerful tools for unix development. Because they are interpreted, debugging and documentation is quiet easy and no source has to be stored separately.

But if you use them in commercial products, it is often unwanted, that anybody can get's the sourcecode (Scripts are not automatically under GPL). In this case an Obfuscator might be helpful.

An Obfuscator tries to remove as much information as possible from the script without affecting the scripts functionality. This kind of information are blanks, whitespaces, comments and meaningful variable names.

For this reason I've written a simple Obfuscator. It is written in Java because I did it as an programming exercise. Of course Bash would be a more appropriate language, but you are free to do it yourself.

Example

In the example below a simple script demonstrates the obfuscation process:

Usage

Original script
Obfuscate script
Learning a new language can be a very funny thing, except learning the new words.

For this task I had a flashcard box at home, make this an easier task. It worked very good, but unfortunately, I usually don't carry it with me, when I have time to learn. For example while sitting in a train or waiting for somebody.

So I began 'porting' my flashcard box to my Palm Pilot. I focused on quick access time. Therfor the software can be started with a single click.

Also I learned Chinese and I needed to display Pinyin characters, the way to express Chinese words with Latin characters. But not all characters I needed have been available at the Pilot, so I needed an own implementation.

The concept of the flashcard box

The box consists of 5 folders:

Folder 5
Folder 4
Folder 3
Folder 2
Folder 1

At the beginning, all questions will be placed in folder number 1. Assumed you have 100 flashcards it will look like this in the beginning:

0
0
0
0
100

If you use a real box, you have to choose one of the cards, try to answer the question on it and apply the following rules on putting the card back to the box:

  • If your answer is right, the card will be put in a higher folder, or stays in folder number 5 if it is taken from there.
  • If your answer is wrong it will be put into folder number 1.

In this way, flashcard you have already memorized will move to higher folders until they are staying in folder 5. The flashcards you don't know will stay in the lowest folder.

So the cards in the higher folders need not to be trained as frequent as the cards in the lower folders.

All this tasks are done by the software automatically.

Using the Palm software

Here's an example of how it works:
Palm-Question
Immediately after the start of the program, one random flashcard is chosen and displayed. The backside is hidden.

If you want to see the answer, click anywhere on the screen:
Palm-Answer
Then you have to choose if your answer was right or wrong. Maybe you think cheating is easy in this way? This is true. But it won't help you learning the language.

By pressing the 'Config' button while the question is displayed, you can select the vocabulary to use, the language that is used as the question and the folder number to choose the questions from. If 'Mixed' is chosen, the folder will be chosen by random. Folder 1 has a higher probability than folder 2 and so one. Folder 5 is the least probable one.
Palm-Config
You can also see the number of cards each folder has.

Installation

Downloading the Software

Download and unzip the archive into a new directory. It contains the files AskMe.prc, AskDB.prc and AskMeServer.jar.

Installing the Palm Pilot Software

Install KVM

Download and install the KVM software from Sun Microsystems, if you haven't done it already. It is used to execute Java Programs on the Pilot.

Install the AskMe Software

  • Install AskMe.prc with hotsync on your Pilot
  • Install AskDB.prc with hotsync on your Pilot
It is better to use two hotsyncs to install the software. Both programs are belonging to the same software. The name of the software used by the Palm Pilot is the name of the first installed program.
You should have these programs now:
Palm-Menu
You can't start the software now. First you have to load a vocabulary from Desktop.

Create the Vocabulary

The vocabulary can be edited with a software like Excel. Here's an example:
EnglishEsperanto
hopingesperi
Hello!Saluton!
......

The first line contains the names of the languages. Then the vocabulary pairs are following. Each entry can contain multiple words, up to four lines on your palm pilot.

Store the file in the CSV format. The column separator must be a TAB character.

If you want to use Pinyin characters, you have to add the number of the tone after the character. The sentence from the example above must be written in this way:
na4 ge to2ngshi4Dieser Kollege

An example vocabulary for Pinyin can be downloaded here.

Installing the Desktop Server

You need to install Java on your desktop. A description how to do this can be found here.

The server software has already been unpacked and is named AskMeServer.jar.

Maybe you need to configure your PC to let the Pilot connect to the Network. If you are using Windows, you can use MPPP.

Synchronize the desktop vocabulary with your Palm

Server-Screenshot
  • Start the Server by running AskMeServer.jar
  • Enter a free port number or use the default value.
  • Choose your vocabulary file.
  • Press 'Connect to Palm Pilot'. This screen will appear:
    Server-Connect-Screenshot
  • Now start AskDB on your Palm Pilot.
    DBMenu
  • Select 'Create a new database' if you want to create a new vocabulary. Select 'Synchronize an existing database' if you want to update a vocabulary.
  • In both cases you will see the synchronize menu. Enter the same port number as you have entered in the server and the host address. Don't use 'localhost' or '127.0.0.1', this will not connect to the server.
    Synchronize
  • Then press 'Synchronize' and wait until the procedure finishes.
    Synchronize-Progress
  • Now the new vocabulary is installed.

Other software to learn chinese

You can fin a lot of very useful tools to learn Java on Erik E. Petersons homepage www.mandarintools.com.

The tool cannot handle chinese characters and I also don't know any for the Palm Pilot. For the desktop, a very useful Java program is done by Erik E. Peterson called FlashApplet.

Sourcecode

Palm Software
Desktop Software

Michael Habermann