Sunday, April 27, 2008

Literate Programming

Work with evolving technologies computer related such as: operating systems, computer networks, language programming; they demand a continuous practice for avoiding forget the learned lessons.

For example, if you learned how to
  • configure a router
  • backup your server remotely
  • process a XML file in your program
if you don't practice, you'll loose your skills after while.
If you think that you'll be apart from your task, it's highly recommended that you document your tasks and your software programs and as much as possible provide your sources, they will save your day shortly.

In a recent interview with Donald Knuth I found something interesting. For programming languages, he has something to say. He proposes something called programming literate. It deals with different aspects related with the software development process. It provides guidelines for software documentation, design documentation, agile documentation, and source comments.

I can assure you, a well written document is as important as the product that accompanies it.

Friday, April 25, 2008

SWIG extending your possibilities

Hi,

I'm a Java fan, and lately, I'm a Groovy lover. However, it's well known there are limitations in high-level languages such as Java and scripting languages, Groovy for example, when dealing with low level issues. Some people say "C is a high abstraction of the assembler code". In fact, one step during compilation of C programs is to translate them in assembly code (gcc -S <your_program>.c)
As consequence, the Java developers have developed JNI (Java Native Interface) framework. It allows the interaction between Java and C code. However, to develop JNI components can be a daunting task.

SWIG is a software development tool connecting C and C++ components with scripting languages such as: Perl, PHP, Python, Tcl and Ruby. Besides, it supports interaction with non-scripting languages such as: C#, Common Lisp, Java, Lua, Modula-3, OCAML, Octave and R. Impressive ah!

Take care, and happy weekend!

Tuesday, April 22, 2008

Science 2.0

Years ago, Web 2.0, arrived our computers exposing different mechanisms of interaction for the web users.
Likewise, Web 1.0 was developed by a physics researcher, Web 2.0 is been used and developed for people from different areas of knowledge.
Now, Web 2.0 is been used for the users to display different situations of your life but also the researchers are using it as a mechanism for supporting the development process of knowledge.
The Wiki framework is one of the most successful mechanisms for sharing knowledge as much as informal and formal way.

Today, researchers are advocated to open their knowledge to the world, of they will be condemned to the failure and isolation.

Scientific American has an interesting article about this topic (http://www.sciam.com/article.cfm?id=science-2-point-0&print=true).

Thursday, March 20, 2008

Compiling fftw2 in IA64

Compile and Install FFTW2 on IA64 architecture was a painfulness experience. However, the problems happen when you're trying to link your MPI programs with the fftw lib.

I got the next error:

/home/jas/fftw2/lib/libfftw.a(rader.o)(.text+0x23e2): In function `fftw_create_rader??unw':
: undefined reference to `__libm_sincos'
/home/jas/fftw2/lib/libfftw.a(twiddle.o)(.text+0x9d2): In function `fftw_create_twiddle':
: undefined reference to `__libm_sincos'
/home/jas/fftw2/lib/libfftw.a(twiddle.o)(.text+0x11c2): In function `fftw_create_twiddle':
: undefined reference to `__libm_sincos'
/home/jas/fftw2/lib/libfftw.a(twiddle.o)(.text+0x1a22): In function `fftw_create_twiddle':
: undefined reference to `__libm_sincos'


You can solve it, adding the next strings to your compilation line:
  • -L/opt/intel/cc/9.1/lib
  • -limf
Now, it works ;-)

Regards.

PD: An useful program for reviewing the content of a static library is nm.

Wednesday, March 19, 2008

Google Code University

Daily, previous to start my work, I read the following web pages:
Of course, I read them for being informed about different issues of my reality, I mean: my country, my friends, and news related with different topics such as: technology, literature, education, among others.
I have to confess, that I'm not digg RSS lover, but today I read it quickly and found this interesting link http://code.google.com/edu/.

It contains relevant information about hot topics in computers, such as: AJAX, Distributed Systems, Web Security, and Languages.

As a matter of fact, I will review the Distributed Systems area because it's interesting to know what they have to say about this topic.

Regards,


Tuesday, March 18, 2008

Compiling Octave on IA64

My research work involves signal processing analysis. A lot of work in signal processing is done with Matlab. However, there is not free license of Matlab for Linux. Hence, I use Octave. Octave is a Matlab clone for free and open source. Many of the non-advanced scripts developed for Matlab works under Octave. For example: scripts for handling images and sounds, work pretty well in Octave.

However, in order to run Octave on IA64 architecture a little modification must be done. The configure script does a good job for x86 architecture but not so good for IA64. During the compilation procedure I got this error:

unresolved reference to `?1__serial_memmove'

I solved the problem modifying the Makeconf file located in the root directory of the source code. Then, look for the line that contains the FLIBS variable and add the following strings:
  • -L/opt/intel/cc/9.1.046/lib
  • -lirc
My resulting line was:

FLIBS = -L/opt/intel/cc/9.1.046/lib -L/usr/lib/gcc/ia64-redhat-linux/3.4.5 -L/usr/lib/gcc/ia64-redhat-linux/3.4.5/../../.. -lz -lfrtbegin -lg2c -lirc -lm

The ?1__serial_memmove definition is given in the libirc.[so|a] library, and it's located at /opt/intel/cc/9.1.046/lib directory.

Some data:
uname -a: Linux volatile.ece.uprm.edu 2.6.9-42.0.3.EL #1 SMP Mon Oct 9 16:02:20 EEST 2006 ia64 ia64 ia64 GNU/Linux
icc --version: icc (ICC) 9.1 20070111

Resources:

Friday, March 14, 2008

Compiz and Gnome on Compaq R3000 laptop

In my last trip to Raleigh (NC), I bought a laptop battery for my old Compaq Presario R3000. I'm very happy because now I can stand for many hours unplugged from the grid.
Also, I had upgraded my laptop memory to 1 Gbyte. Certainly, the applications run more smoothly.

Because, I'm Linux user, my operating system has a modest hardware requirements.

Many people say that software is the computer soul. Now, I agree totally. My hardware laptop has been empowered with Compiz. In order to work with Compiz, my NVIDIA(NV17 GeForce4 420 Go 32M) video card requires the NVIDIA-Linux-x86-96.43.05-pkg1.run package, that you can download from Unix area at NVIDIA site.

Today, Linux has a lot of applications that make of it a futuristic operating system. Compiz and Beryl along with the windows managers, Gnome and KDE, make the Linux user experience, one very enjoyable.

I feel like my laptop (3.5 years old) takes a new breath and I'm happy with it.