Archive for the ‘Open Source’ Category

Reading to Be a Better Developer

Some readings to about reading others’ code to become a better developer

  1. Reading to Be a Better Developer – The Coding4Fun DevKit
  2. WReader Code Lab
  3. C4F Developer Kit

ProcessMaker Triggers: Timing

First remember:

  1. A process is made up of tasks.
  2. A task is made up of steps (dynaform, input/output document).

You can fire a trigger on 3 levels: process, task and step, in the following order.

  1. Step: before loading a dynaform or after submitting a dynaform.
  2. Task: before assigning the user for the next task. After completing all the steps of a task, you get a confirmation showing the next task and who will be assigned to it. This is the same as after submitting a form if you have only one form in a given task.
  3. Process: before or after derivation of the case to the next task. Perfect if after a task you fire a trigger to insert/update some date on your external Oracle/SQL Server database. Executed after you press the confirmation button to go to the next task. It’s a not return point.

References:

Triggers

Trigger Examples

Subversion: poner un proyecto bajo control de código fuente

Tengo un proyecto de una aplicación web ASP.Net en una carpeta (E:\MyWebApp) en mi PC.
Quiero ponerlo bajo control de código fuente usando Subversion.

Alternativa 1 (larga, carpeta vacía):

  1. Crear una carpeta vacía (E:\MyEmptyWebApp) en mi PC.
  2. Importar la carpeta vacía  (E:\MyEmptyWebApp) al repositorio: click derecho, TortoiseSVN->Import.
  3. En URL of Repository, escribir: svn://192.168.10.20/MyWebApp. Presionar OK.
  4. Ir a la carpeta que contiene la aplicación (E:\MyWebApp)  y los archivos de código fuente.
  5. Click derecho, SVN Checkout.
  6. En URL of Repository, escribir: svn://192.168.10.20/MyWebApp.
  7. En checkout directory, escribir: E:\MyWebApp. Presionar OK.
  8. Esto solo copiará la carpeta oculta “.svn” a la carpeta E:\MyWebApp.
  9. De esta forma, el proyecto estará bajo control de código fuente. Sin embargo, el repositorio está vacío aún.
  10. Ahora, agregar los archivos de la carpeta E:\MyWebApp al repositorio.
  11. Dentro de la carpeta E:\MyWebApp, seleccionar todas las carpetas y archivos, hacer click derecho y elegir la opción TortoiseSVN->Add.
  12. Click derecho en la carpeta E:\MyWebApp, SVN Commit.
  13. Listo.

Como se puede apreciar, la clave está en crear una carpeta vacía e importarla (Tortoise->Import) al repositorio. Esto genera la carpeta “.svn” con las configuraciones de control de versiones de Subversion.

Luego, hacemos un “Checkout” (SVN Checkout) del repositorio (vacío) a la carpeta (working copy)  que contiene realmente el proyecto. Esto simplemente agrega la carpeta “.svn” a la copia local.

Finalmente, se deben agregar (TortoiseSVN->Add) los archivos locales al repositorio y hacer un SVN Commit.

 

Alternativa 2 (corta, recomendable):

  1. Click derecho en E:\MyWebApp, TortoiseSVN->Repo-browser.
  2. Crear una carpeta llamada “MyWebApp” en la ruta deseada en el repositorio: click derecho, “Create folder“. Esto crea una carpeta vacía en el repositorio.
  3. Click derecho en E:\MyWebApp, SVN Checkout. Esto descarga el contenido del repositorio (vacío aún) y coloca la carpeta bajo control de versiones de Subversion.
  4. Dentro de la carpeta E:\MyWebApp, seleccionar los archivos y carpetas deseados.
  5. Click derecho, TortoiseSVN->Add. Esto indica que los archivos y carpetas seleccionados serán puestos bajo control de versiones de Subversion.
  6. Click derecho en E:\MyWebApp, SVN Commit. Esto coloca el proyecto completo bajo control de versiones de Subversion.

 

Referencias:

SVN in-place import and checkout

Importing Data Into A Repository

Adding Projects and Files to Source Control

Subversion and Mercurial

Having  used both Subversion and Mercurial, I think the best starting points so you can get your own conclusions about them are these posts:

Subversion: [Setting up and running Subversion and Tortoise SVN with Visual Studio and .NET][1]

Mercurial: [Hg Init: a Mercurial tutorial][2]

In short, Mercurial is a distributed version control system, while Subversion is a centralized one.

On Subversion, you “commit” and “update” directly to/from the central and unique repository.

On Mercurial, you “commit” and “update” to your local personal repository. Once you’re sure your code is ready, you can “push” your changes to the central repository. To get other people changes, you have to “pull” from the central repository.

[1]: http://www.west-wind.com/presentations/subversion/
[2]: http://hginit.com/index.html

The Joel Test: 12 Steps to Better Code

A list of yes/no questions to measure how good your software team is working

The Joel Test: 12 Steps to Better Code

  1. Do you use source control?
  2. Can you make a build in one step?
  3. Do you make daily builds?
  4. Do you have a bug database?
  5. Do you fix bugs before writing new code?
  6. Do you have an up-to-date schedule?
  7. Do you have a spec?
  8. Do programmers have quiet working conditions?
  9. Do you use the best tools money can buy?
  10. Do you have testers?
  11. Do new candidates write code during their interview?
  12. Do you do hallway usability testing?

Hg Init: a Mercurial tutorial

The best Mercurial tutorial I’ve found so far. Finally understood this stuff!!! Now I’m on my way to change from my loved Subversion to Mercurial.

Hg Init: a Mercurial tutorial

Subversion Re-education
Ground up Mercurial
Setting up for a Team
Fixing Goofs
Merging
Repository Architecture

ProcessMaker: Customizing the Login Screen

For security reasons, I removed the System Information link from login page.

Like this:

1. Edit file: <INSTALL-DIRECTORY>/workflow/engine/skinEngine/skinEngine.php

2. Change line (170-178, 318-322, and 407-416, depending on your version):

if (DB_SYSTEM_INFORMATION == 1) {
$footer = ''; //"<a href=\"#\" onclick=\"openInfoPanel();return false;\" class=\"FooterLink\">| System Information |</a><br />";
}

Works like a charm!!!

 

References

Customizing the Login Screen

Remove System Information from login screen