Tuesday, January 15, 2013

Dos to Unix Text Converter for Windows

Back in 2003, a team of civil engineers from university ask from me an easy way to convert some output text files from a static-modelling tool (running in a Unix machine) to Windows format for post-processing. The problem was that they did want a text editor but just a simple drag'n'drop application for the conversion.
 For this purpose I created a small application called "Dos2Unix Converter" with line-termination autodetection, drag'n'drop, command line execution and Windows Explorer integration capabilities for Windows OS.

You can download the application, for free, here:



Once again: S.F.M.B.E.





Sunday, January 13, 2013

Game of life in Android!

"The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

  • Any live cell with fewer than two live neighbours dies, as if caused by under-population.
  • Any live cell with two or three live neighbours lives on to the next generation.
  • Any live cell with more than three live neighbours dies, as if by overcrowding.
  • Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick (in other words, each generation is a pure function of the preceding one). The rules continue to be applied repeatedly to create further generations."

"Conway was interested in a problem presented in the 1940s by mathematician John von Neumann, who attempted to find a hypothetical machine that could build copies of itself and succeeded when he found a mathematical model for such a machine with very complicated rules on a rectangular grid. The Game of Life emerged as Conway's successful attempt to drastically simplify von Neumann's ideas. The game made its first public appearance in the October 1970 issue of Scientific American, in Martin Gardner's "Mathematical Games" column. From a theoretical point of view, it is interesting because it has the power of a universal Turing machine: that is, anything that can be computed algorithmically can be computed within Conway's Game of Life."

Stereogram Creator PRO

One of my oldest projects is Stereogram Creator PRO. The idea of making the Stereogram Creator PRO was born in 1995 during computer lessons at the university. The facinating world of stereograms, first saw in books, attracks me so badly that motivated me to develop a little algorithm for stereogram creation. After speding thousand of hours on my PC (a 286 machine) to develop an algorith, I created my first stereogram.
 The next step was to create a stereogram with a real picture as a source image, not a custom paint created with graphics routines (circles etc). A shareware program (I cannot remember its name) was painting a bmp/gif in the screen and my program, written in BASIC, was creating the stereogram. The first attempt to create an integrated enviroment (version 1!) is with BASIC under DOS. The program was a piece of art but was....under DOS and had not so many capabilities.
 Two years later I decided to re-develop the SCP under Windows, this time with a real and easy interface with full-graphics capabilities! After one year of development, among with study in university and other activities, SCP2 was ready! My excitement was so stronge that I decided to share it with people. So I published SCP2 on the web, firstly in a shareware/demo version but after a second thought I decided to publish it as a freeware.
The application is here: SCP site.

Notice: A registration to a mailing list is required to succesfully run the application. This is for keeping records of the number of downloads. I know that it'is a little bit of weird but it was one of a prohistoric methods those days... 







Eclipse is (was) very slow! (affects AndroidStudio also)

After upgrading from Ubuntu 10.04 to Ubuntu 12.04, I had problems with Eclipse Application, which I use for Android development, as suggested by Google dev team.
First of all, the repository package of Eclipse in 12.04 is just not running. It keeps crashing on startup.
So, I've downloaded the Eclipse 4.2 from official site and installed it.
But the performance was too poor. And this is a fact for many people, not just for me. After some google searches and many tests, I ended up with a magic eclipse.ini file configuration that speeds up Eclipse:

-startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize 256m
--launcher.defaultAction openFile
-server
-vmargs
-Xms512m
-Xmx1024m
-XX:PermSize=1024m
-XX:MaxPermSize=1024m
-Xverify:none
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods

Now my Eclipse is running normally and I am able to continue my projects!

Reference: http://www.eclipse.org/forums/index.php/mv/msg/367243/0/40/

Note: S.F.M.B.E. (sorry for my bad english!)

Addition: This also applies to new Android Studio IntelliJ IDEA. Just locate studio.vmoptions in bin folder and increase heap as above!

Saturday, January 12, 2013

Simple And Beautiful!


I've had enough of fancy wallpapers and landscape pictures to decorate my Android device.
 So I decided to create a tiny application for doing a very simple thing....to draw a solid-color background! After a while, I decided to add some effects like color-cycling and faded-out edges! And so I did. But the wallpaper looked "very empty", and I added the ability to draw a smooth Android robot figure in the center.
The result was :  Simple & Beautiful!

From since, the application riched with more funny figures.





Here are some screenshots: