Posted by : gon in (KDE, Linux)

My first PPA repository

Tagged Under : , , , , , , ,

Sorry, this entry is only available in Español.

Posted by : gon in (joomla)

Respect you yourself should (Joomla Critique #1)

Tagged Under : , , ,

While working to re-build a site formerly used joomla 1.0, I had a little trouble in the control panel of the new 1.5, because I was leaving an error message.

Fortunately it was not fatal, since it could also modify the site parameters without much inconvenience. But it is not comfortable to see that something is not right, except for a large system such as Joomla.

The error indicated that I had an XML file that was not being parsed properly, but it’s not saying which file or which was wrong.

Then I downloaded a backup of the site, and replicate it on my local machine to find out the error. I remembered that there are thousands of Linux applications for console enough powerful to parse and validate the XML’s from my site.

I had an enjoyable experience with the find command. But I was missing the command to validate an xml file. Searching the web, I found that possibly the command xmllint I could. But ultimately did not help, this reveals a small unexpected detail.

xmllint has an option to validate, but to do this work, requires that 1) the XML file using a defined DTD or 2) it passes a DTD as a parameter. Testing without using a DTD by parameter, I tried the following:

find. -name "*.xml" -exec xmllint --noout --valid "{}" \;

Unfortunately, the result was not what I expected. ALL XML files except one, were invalid because they didn’t have defined the DTD. Thanks to that file that it was, I found that joomla has on its site a DTD file so that developers include it in yours XML configuration files. In this way, the developer requires that your XML files have the structure that the system requires.

The worst… that single valid file, was a third-party plugin and not the official developers. That is, the official joomla developers do not respect their own rules when writing code.

Finally, xmllint was not what I was looking for, and only had to check the file was malformed (bad labels closed nested bad …). As I did not know, see on a mailing list (the one I have in the list of FOSS Communities), where I got the solution: xmlwf.

Just change the above command with the following matter and fixed:

find. -name "*.xml"-exec xmlwf "{}" \;

I found the causers (they were 2), which I fixed and gave the matter ended.
But I stayed with the bitter taste of the disregard that the Joomla developers as a mere detail. What gives me confidence for when a new system update?

Posted by : gon in (Desarrollo)

When a comment changes the meaning

Tagged Under :

Looking at foreign source code for the first time, is like an archaeologist finding a lost civilization.

Unless we have on a rosseta stone (or better still, we know the language lost), the unique form to decode it is “test and error”.

Recent days, had an unusual fail in my application fingerprint reader. Sometimes saving the template of the fingerprint in the database, I wanted to save a second or third reading, but still kept the first. In addition, I identified only 1 fingerprint of all saved.

Reviewing the original example from development kit, I found the reason of the error and my confusion.

While I was developing C# code of fingerprint reader, I found a method interacting with the database, but declared in an illegal place. A few months ago, the first thing I did was to move that portion of code to another file that corresponds to my “Model” layer. The line that caused my confusion was as follows:

public int identify(ref int score, ref AxGrFingerXLib.AxGrFingerXCtrl grfingerx)
{
    GRConstants result;
    int id;
    SqlDataReader rs;
    TTemplate tptRef; // <= FAIL HERE
 
    // More code...
}

At the head of the method was a comment that said something like “compare the reader’s template against all the templates obtained from the database”. Therefore, I assumed that “TTemplate tptRef” meant “Fingerprint of reference”. I do not know what concept of “measure of reference” was the programmer’s example, but for me, a rule or a weight is a unit of reference. Ie “My template is compared with yours”.

However, the programmer for example, “Footprint of reference” mean “each of the templates in the database”. That is to say: “My template in each turn of the cycle is the same in the database and compared with your reading”.

That simple change of meaning, ruined the code. Now, after long having made these changes, I got to understand how this method works only reading the source code, but I would have been forced to investigate more thoroughly “where the fingerprint reading was clogged”.

I learned how important it is to look at all the interpretations that may have documents or comments. If we are the ones that document, then avoid a breakdown that could change the meaning.

Posted by : gon in (Desarrollo)

Juggling with 900MB SQL Database

Tagged Under : , ,

And the weight, wan’t the joke.

Following the delayed “fingerprint reader for access control” project , I ran into a problem of those …

The present application of access control works with SQL Server 7 on Windows 2000, a bad living relic. The tool of handling of the data base (SQL Management) associated to that version, is a true mystery in functionalities. For some reason, “Generate SQL querys” from a data base, it only generates the models of the tables, but no record. Finally I could not recover this data, because generating a full backup or dumping to a flat text file, threw a pretty “unknown error”.

Not who did it, but today I received a DVD with 900MB of tables and records of those bases. The file was a backup respaldo.bkp.

The first thing I did was try to play with him :p :

Read the rest of this entry »

Posted by : gon in (wordpress)

Migration FAIL! (and a wordpress critique #1)

Tagged Under : , ,

I have not yet fully completed the migration of this blog, but while I have had every experience …

Among the most serious, the worst was having deleted the previous blog at WordPress.com

I do that to avoid the content duplication. Unfortunately, forget the little detail about my URL, which was used as an Openid address. I was 3 feeds pointing to twitter accounts through twitterfeed. But now I can’t log on twitterfeed, it only uses openid. As I was using the WordPress.com account as openid and now I can’t use it, can’t go to administer the accounts in twitterfeed. EPIC OWNED :retard: .

At least, the only solution I have is to change the password to the twitter accounts

Posted by : gon in (Zend Framework, wordpress)

Gonium has new blog

Tagged Under : , ,

Since I have the space, I will use it.

One place, to explain things

While I do not have a blog module functional for Gonium, I have no further use the enemy (Wordpress). Which is not bad at all, but just the opposite.

gonium_blog_120x60

While I do not have a blog module functional Gonium, I have no further use to the enemy (Wordpress). Which is not bad at all, but just the opposite.

An important detail: the blog, the project on Google Code, the messages on Twitter, the svn commits and autogenerada API documentation, all will remain mainly in English.

The reason for this is simple: universality. Unfortunately, although I do not like the idea, English is the most universal. Not because of Chilean origin, I would like just a few friends try it. I hope that everyone has the possibility to use it. Who tells me that someone is already looking at the code? And if someone spoke in Italian? Or French? Or German? Or Chinese?

Moreover, the experience in the GDT, I noticed the users (mostly Spanish-speaking), the displeasure of using classes / objects and methods named in Spanish. I do not understand these odd habits, but they are frequent and widespread. In fact, Eduardo Silva, in his speech at the Monkey HTTP Daemon at Linux Meeting, mentioned the same problem with its Spanish-speaking users, so he decided to simply leave the mailing list, blog, documentation, etc. in English. This time, take the same idea and I will see what happens.

For now, I do not expect an explosion of users, while functional version lacking, but I hope ideas, comments and general feedback. I have been asking things like “Are you recruiting people?” This is a relief for those minutes that I question the “What the hell am I doing something that only I care.” If anything, I am recruiting people :B . Zend Framework Developers? Welcome! Any contribution will be equally well received, either from a PHPers, jQueryst, CSSers, Translator, Web Designer or Artist are fully welcome.

Read the rest of this entry »

Posted by : gon in (Desarrollo)

How to store data in a Secure Cookie (and a PHP FAIL)

Tagged Under : , , , , , , , , , ,

Sorry, this entry is only available in Español.

Posted by : gon in (Navegador, web)

Google Chrome: Jurel tipo Salmón

Tagged Under : , ,

Talla(*) para webmasters:

HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19

(*) Talla (español chilensis): dícese de broma o humorada

Posted by : gon in (Zend Framework)

Gonium, nuevo demo y nuevos componentes

Tagged Under : , , , , , , ,

Gracias a la wena onda de Tecnoman, que se auspicio con hosting y me dejo hincharle las pelotas para que instalara PDO en un servidor en producción, tengo el demo de Gonium en un hosting nuevo. Ahora intentaré de algún modo recompensar aquello, posteando más seguido en tecnosquad.org.

Aprovechando eso, subí una copia más reciente.

Hace unos días agregué al trunk del repositorio, una copia propia del proyecto zend-framework-datagrid, con la diferencia de que mi copia permite traducirlo con Zend_Translate y los comentarios están corregidos. También corregí unos warnings menores. Además le cambié el prefijo a las clases de “Core_” (originalmente en zf-datagrid) a “Rox_”, para darle concordancia a mi estructura de directorios. Podría decir entonces que es un pequeño fork :B

También agregué todo jQuery UI al directorio público. Una ejemplo de esto es la pequeña demostración con el efecto acordeón que le agregué al widget de Login.

Y por último, agregué un directorio con XML’s en formato docbook, para poder usarlos en conjunto con la documentación creada con phpDocumentor.

Espero tener una documentación un poco más completa más adelante.

Posted by : gon in (Zend Framework, php)

Gonium: Rompiendo el RoadMap

Tagged Under : , ,

Sorry, this entry is only available in Español.