Generación automática de código

Conforme va madurando el campo de tecnologí­a de información, se van estableciendo patrones de referencia de cómo deben ser las aplicaciones de negocio y va aumentando la presión para tener ciclos de desarrollo cortos. Surge entonces la necesidad de mecanizar el proceso de producción de software, y además hacerlo de manera flexible y ágil que […]

Conforme va madurando el campo de tecnologí­a de información, se van estableciendo patrones de referencia de cómo deben ser las aplicaciones de negocio y va aumentando la presión para tener ciclos de desarrollo cortos.

Surge entonces la necesidad de mecanizar el proceso de producción de software, y además hacerlo de manera flexible y ágil que permita incorporar la parte variable de manera robusta.

Un enfoque es desarrollo Cut-and-Paste usando programadores experimentados en el desarrollo de aplicaciones similares a la que se esta haciendo. Este modelo tiene sus limitaciones y no es realmente escalable. Por un lado es propenso a errores y consume horas-hombre que serian mejor empleadas en actividades que se beneficien de la capacidad creativa y visión del desarrollador. Por otro lado, realmente no permite de manera natural institucionalizar y transferir experiencias entre desarrolladores y entre grupos de desarrolladores.

En el ciclo de vida y desarrollo de una aplicación se requieren distintas perspectivas y niveles de abstracción. En un proceso mecanizado de desarrollo debe haber herramientas que idealmente nos permita partir de la conceptualización de las necesidades de negocio y de manera automática llegar a la implantación bajo tecnologí­as especí­ficas.

El grupo de patrones y prácticas de Microsoft ha desarrollado el concepto de fábricas de software como paquetes de referencia que incluyen una serie de artefactos que permiten mecanizar el desarrollo de familias de aplicaciones. Estos artefactos incluyen modelos, marcos (frameworks) y herramientas.

UML se utiliza en algunas herramientas que generan código a partir de un diagrama de clases por ejemplo. De manera más general el Object managment Group (OMG) ha desarrollado el concepto de arquitectura dirigida por modelos (model-driven architecture, MDA). Este enfoque pudiera ser a un nivel de abstracción y generalización demasiado alto para ser de uso practico.

MDA enfatiza independencia de plataforma. En la práctica, esto no puede ser un absoluto. Las caracterí­sticas de una tecnología o implementación son restricciones en el modelo.

MDA asume que están disponibles modelos para cualquier artefacto.

MDA utiliza UML como lenguaje de uso general. Algunas tecnologías y aplicaciones no se prestan para ser representados en UML y se pueden describir mejor con herramientas especí­ficas que permitan una mayor fidelidad al pasar de concepto a implementación.

MDA asume que 3 tipos de modelo son suficientes:

computation-independent model,

platform-independent model,

platform-specific model.

MDA se enfoca en transformaciones. Es difí­cil lograr un proceso completamente automático que vaya de concepto a implementación. La metodología debe incluir el manejo de la parte variable que no se puede automatizar y los cambos que se requieran durante el mantenimiento de una aplicación

Un lenguaje de modelación de uso general como UML esta diseñado para soportar el desarrollo de modelos que sirvan principalmente como documentación. Estos lenguajes pueden describir cualquier dominio, pero necesariamente de manera imprecisa por el alto nivel de abstracción que utilizan. En el caso de UML, las abstracciones genéricas se definen utilizando lenguaje natural informal.

Un lenguaje de domino especifico (DSL), esta diseñado para describir con precisión una tarea especifica. En vez de abstracciones genéricas utiliza conceptos tomados directamente de la tarea a modelar.

El concepto de fabricas de software de Microsoft utiliza como componente básicos leguajes de alta fidelidad como XML, C# y SQL, lenguajes de domino especifico (Domain Specific Language, DSL), scripts de flujos de trabajo (workflow), archivos WSDL, archivos DDL, SQL.

Las fábricas de software son especí­ficas a subsistemas como administración de clientes, administración de catálogos, cumplimiento de órdenes.

El machote (template) de una fábrica de software incluye código y metadata que se pueden cargar en un IDE o en una herramienta de desarrollo de aplicaciones empresariales. El concepto de machote es similar al de un machote de un documento de Word o Excel.

El uso de una fábrica de software incluye los siguientes pasos:

  • Análisis de problema. Primero determinar si el producto cae dentro del alcance de la fábrica de software.
  • Especificación del producto. Definir los requerimientos del producto en términos de sus diferencias con los requerimientos de los componentes de la fábrica de software.
  • Arquitecta del producto. Ajustar la fabrica de software a las características particulares del producto.
  • Implementación. Las actividades usuales de pruebas unitarias, pruebas de ejecución, ensamblaje de componentes, desarrollo de componentes
  • Instalación. Crear o re usar restricciones, configuración de infraestructura, validaciones, instalación de requerimientos y ejecutalbes.
  • Pruebas. Crear o re usar recursos de pruebas, datos de prueba, scripts de prueba, uso de herramientas de medición.

Las fábricas de software proporcionan un enfoque robusto a la creación de software usando un paradigma de modelación visual, pero va más allá del uso de modelos como documentación. Usando DSL y XML permiten usar metadata para automatizar la generación de código. Los cuatro pilares de las fábricas de software son: Líneas de software, marcos arquitectónicos (architecture frameworks), desarrollo dirigido por modelos, y guías contextuales

El esquema de fábrica de software es un modelo diseñado para soportar cómputo. El esquema de una fábrica es un árbol. Cada nodo en el árbol se conoce como una perspectiva (viewpoint). La perspectiva raíz corresponde a construir todo el entregable. Las perspectivas subyacentes se derivan por descomposición. Cada perspectiva describe la solución en términos de actividades a realizar y una explicación como realizar cada actividad. Las actividades se describen en términos de los productos que generan. Esto productos son los componentes que se utilizan para construir el entregable. Además cada perspectiva incluye recursos suministrados por la fábrica para resolver los problemas del dominio, generalmente automatizando total o parcialmente la tarea.

Par construir una fabrica se empieza sencillo con recursos simples y se va invirtiendo tiempo en desarrollar recursos más sofisticados conforme se va ganando experiencia en el dominio.

Referencias:

Bare-Naked Languages or What Not to Model

CodeGen’ing a Data Access Layer with CodeSmith

LLBLGen

Microsoft DSL

CodeSmith Community: .netTiers

Sean Mccormack’s Codus

Software Factories

Wilson OR Mapper templates for CodeSmith

Codegeneration.net

Can you code gen everything?

CodeSmith Community: Rocky CSLA Templates

Deklarit Kathleen Dollard

CodeSmith Community: Files

Andres Aguiar’s Blog

Eric Smith’s Blog

.nettiers demo/tutorial DAL in 15 mins

Global Bank Scenario

Visual Studio 2005 SDK Version 4.0

http://blogs.msdn.com/jackgr/

Jack Greenfield’s Blog

Code Generation Network

TypeBuilderLib, a Library to Build Dynamic Types Easily

Introducción a Perl

Practical Extraction and Reporting Language. There is more than one way to do it Puntos a favor de perl: perl es un lenguaje de alto nivel perl es gratis perl puede escribir y leer archivos binarios perl puede tener múltiples archivos de entra y salida abiertos al mismo tiempo Tiene un generador de reportes Maneja […]

Practical Extraction and Reporting Language.

There is more than one way to do it

Puntos a favor de perl:

  • perl es un lenguaje de alto nivel
  • perl es gratis
  • perl puede escribir y leer archivos binarios
  • perl puede tener múltiples archivos de entra y salida abiertos al mismo tiempo
  • Tiene un generador de reportes
  • Maneja expresiones regulares
  • Maneja arreglos lineales y asociativos
  • Es poderoso y simplifica la programación
  • Puede procesar archivos muy grandes sin limites en el tamaño de registro
  • perl incluye un conjunto amplio y poderoso de instrucciones para manejo de cadenas de caracteres y arreglos
  • Cualquier cosa se puede realizar de múltiples formas

Ejemplo de programa en Perl:

# Este sencillo programa copia registros de un archivo
# y agrega un prefijo a cada línea con un numero en secuencia
while (< >){
# while () {} genera un lazo de control que continua mientras el
# enunciado en paréntesis es verdadero.
# la instrucciones en el lazo están dentro de los corchetes {}
# < > es un símbolo especial
# Le dice a Perl que busque en la línea de comando y vea si se
# especificaron algunos archivos.
# Si es el caso, entonces se lee cada uno en turno.
# Si no se especifica ningún archivo entonces se lee de
# la entrada normal (standard input)
# Cualquiera que sea el caso los caracteres que se leen se guardan
# en la variable especial $_
# Cuando <> llega al fin de archivo (end-of-file), regresa un valor de falso,
# lo cual termina el lazo.
print STDOUT ++$i, $_;# print es un método simple sin formato de impresión
# STDOUT es una referencia de archivo normal (standard filehandle)
# para la salida normal (Standard Output).
# Filehandles se especifican en MAYUSCULAS en perl.
# ++$i indica incrementar el valor de $i y dejar el valor disponible
# para la instrucción print
# Todos los valores escalares ( es decir cualquier cosa menos una instrucción,
# un arreglo lineal, un arreglo asociativo, filehandle, o nombre de procedimiento)
# empieza con $ en perl # $_ es el operador de default de cualquier instrucción
# en este caso, $_ contiene el último registro que leyó la instrucción<>
# ; termina cada instrucción en perl
}

Breve revisión de la sintaxis de perl

  • En perl es significativo el caso de los caracteres y se diferencia entre mayúsculas y minúsculas
  • No utilice nombres que empiezen con un numero, ya que estos comúnmente son símbolos especiales para perl, por ejemplo $1, $2, etc.
  • Todas las instrucciones en perl terminan con punto y coma ;
  • Comentarios se pueden insertar en un programa con el símbolo #, y cualquier cosa después de # hasta el fin de línea será ignorado
  • perl identifica cada tipo de variable o nombre de dato con un prefijo. Estos caracteres son:

    Tipo Carácter Comentario
    Escalar $ Un numero o cadena de caracteres
    Vector lineal @ Un arreglo referenciado por un numero índice.
    Subí­ndices entre paréntesis cuadrados [].
    @cosa se refiere al arreglo completo.
    $cosa[1] se refiere al escalar que ocupa la segunda posición en el arreglo
    Vector asociativo % Un vector referenciado por una llave de texto, no necesariamente un número.
    Subí­ndices entre{}.
    %cosa se refiere al vector completo.
    $elemento{“x”} se refiere al escalar que corresponde a la llave “x”
    filehandle UC Los apuntadores se archivo se escriben en mayúsculas
    Subrutina & Una subrutina
    Etiqueta xx: Objeto de goto
  • Valores entre paréntesis () son listas. Las listas se usan frecuentemente como argumentos para una subrutina o llamada a función. No es necesario usar paréntesis si solo se usa un argumento o el programa conoce el limite de la lista.
  • Las variables $x, @x. %x, y &x, no necesitan estar relacionadas entres si, sin mencionar $X, @X, %X y &X.
  • Existen variables especiales, las más importantes son:
    $_
    Es el valor escalar de default. Si no se especifica un nombre de variable en una función donde se usa una variable escalar, se usa $_. Esto se usa bastante en perl
    @_
    Es la lista de argumentos a una subrutina
    @ARGV
    Es la lista de argumentos especificada en la línea de comando cuando el programa se ejecuta

Instrucciones básicas y control

Los corchetes {} se usan para contener un bloque de enunciados. Es posible tener variables locales dentro de un bloque. Bloques se usan como los objetos de la mayoría de los comandos de control

Asignación simple:
  • Asignación escalar
  • Listas de escalares
  • Lista a vector
  • Vector a lista
  • Vectores asociativos necesitan un llave, pero aparte de eso, funcionan como se espera de un vector
  • Al asignar un vector a un escalar se obtiene el numero de elementos del vector
Operaciones aritméticas
if-then-else
  • if( condición ) {  rama verdadera  }  else  {  rama falsa  }
  • if (condición) {instrucciones}  elsif (condición) {instrucciones}

    elsif (condición) {instrucciones}
  • unless (condición)  {  rama verdadera  }
  • La condición tiene una gama amplia de operadores comparativos. Es importante observar la diferencia entre operadores numéricos y de cadenas de caracteres.

    Numérico Cadenas Significado
    = = eq igual
    != ne no igual
    > gt mayor que
    < lt menor que

  • Cadenas de caracteres. que no están compuestas por números tienen un valor de cero.
  • perl cuenta con un conjunto extenso de pruebas de archivo:
    • -T cierto si archivo es de texto
    • -B cierto si archivo es binario
    • -M regresa el número de días desde la última modificación
    • -A regresa el número de días desde el último acceso al archivo
    • -C regresa el número de días desde la creación del archivo
Lazos de control
Los lazos más comunes son for y while

  • for ($i = 0; $i < 10; $i++) { instrucciones }
  • foreach $i (@items) { instrucciones }
  • foreach $i ($first .. $last) { instrucciones }
  • while (condición) { instrucciones }
  • until (condición) { instrucciones }
  • Las instrucciones next, last, redo, y continue se usan para escapar de un lazo.
Entrada/Salida
Abrir
Como en Unix, los tres primeros manejadores de archivos se abren automáticamente y son STDIN, STDOUT, y STDERR. Otros archivos se deben abrir explícitamente. La forma de la instrucción open es la siguiente:
open (FILEHANDLE,XFY);
donde X y Y son caracteres opcionales

X = <
Para abrir archivo F solo lectura
X = >
Para abrir archivo F solo escritura
X = > >
Para agregar datos al final de archivo F
X = |
Para escribir a un tubo (pipe) hacia programa F
Y = |
Para leer a un tubo (pipe) desde programa F

Si solo se da el nombre F, el archivo se abre de lectura/escritura

Lectura
La forma más básica de lectura es poner el manejador de archivos dentro de <>. Si no se provee una variable escalar para el registro, este se guarda en $_.
Escritura
La mayor parte de la escritura se hace usando la instrucción print o printf. Estas instrucciones se utilizan aún si el resultado no se va a imprimir realmente.
Cerrar
perl cierra automáticamente cualquier archivo al salir. Cuando se necesita cerrar un archivo se puede hacer con un cierre explicito.
Mensajes de error:
  • die se usa para imprimir un mensaje de error y terminar la ejecución
  • warn se usa para imprimir un mensaje de error pero continuar
Manejo de cadenas de caracteres:
  • split se usa para extraer fichas (tokens) o campos de una cadena a un vector.
  • sort ordena una lista o vector.
  • study optimiza operaciones de cadenas.
Codificación binaria:
  • pack empaca datos en una cadena usando un machote de formato
  • unpack recupera datos de una cadena usando un machote de formato
  • Existe una larga lista de formatos que se pueden usar
  • Se puede usar más de un formato a la vez
    • l long 32 bit signed integer
    • L long 32 bit unsigned integer
    • s short 16 bit signed integer
    • S short 16 bit unsigned integer
    • f float 32 bit floating point
    • d double 64 bit floating point
    • A ASCII string
    • c char a single byte (character)

Expresiones regulares:

perl añade un conjunto de caracteres al conjunto normal. Uno uso importante de expresiones regulares (RE) es el uso de () para seleccionar subconjuntos de la expresión regular. perl facilita el uso del operador (). Existen dos maneras de usar expresiones regulares en perl: Match y Substitute

Una expresión regular esta contenida en slashes, y el operador =~ evalúa.

Las expresiones regulares son sensitivas a mayúsculas y minúsculas

El operador !~ se usa para detectar diferencias.

Algunos caracteres especiales:

.
Cualquier Carácter menos newline
^
El principio de lí­nea o de cadena
$
El fin de línea o cadena
?
Cero o más del último Carácter
+
Uno o más del último Carácter
[]
Cualquiera de los caracteres dentro de los corchetes []
|
o inclusivo
()
Agrupar
Los caracteres especiales $, |, [, ), , / deben ir precedidos por backslash para usarse en expresiones regulares
$` $& $’
$` , $& y $’ se pueden usar para ver cuales fueron los caracteres que se encontraron antes, durante, y después de un empate

Referencias

Active State

Active Perl

Live tutorials

Distribuciones binarias

Open Perl IDE

Documentación.

Introduction to Perl

Ubuntu Unity .desktop

In order to add your launcher to the Unity Launcher on the left, you have to place your .desktop file at /usr/share/applications/ or at ~/.local/share/applications/. After moving your file there, search for it in the Dash (Windows key -> type the name of the application) and drag and drop it to the Unity Launcher. Now […]

In order to add your launcher to the Unity Launcher on the left, you have to place your .desktop file at /usr/share/applications/ or at ~/.local/share/applications/. After moving your file there, search for it in the Dash (Windows key -> type the name of the application) and drag and drop it to the Unity Launcher. Now your launcher (.desktop file) is locked on the Unity Launcher! If your desktop file cannot be found by doing a search from the Dash, you may need to read on…

To be more certain that your .desktop file will work properly, use the desktop file validator, which will notify you of any errors or omissions. If there are no errors, desktop-file-validator will exit silently.

Once the file validates correctly, install it to the default location (probably /usr/share/applications) using the desktop-file-install program. This step may require superuser privileges. The desktop-file-install program may add some lines of its own to your .desktop file. There is no need to have the .desktop file be executable by anyone.

Please note that desktop-file-validate tends to be oversensitive at times, which means that it can output error messages on perfectly working .desktop files. Those error messages should be better seen as warnings rather than anything else. For more information on desktop entry specification please refer to http://standards.freedesktop.org/desktop-entry-spec/latest/

To create a simple custom .desktop you will need to add these entries to a .desktop file of your choice in ~/.local/share/applications/

nano ~/.local/share/applications/your_application_name.desktop
[Desktop Entry]
Name=the name you want shown
Comment=
Exec=command to run
Icon=icon name
Terminal=false
Type=Application
StartupNotify=true

For extra options for your .desktop file you can visit this site. All the options available are very well described there.

You can also copy a existing application’s .desktop file from /usr/share/applications/to your ~/.local/share/applications/ and edit it to fit your needs.

ie: this will copy gedit .desktop file to the folder where the .desktop files should be saved for a user

cd ~/.local/share/applications
sudo cp /usr/share/applications/gedit.desktop .

After that open that location using nautilus ~/.local/share/applications/ and drag n drop the file you have just created to the Unity launcher.

Has an option instead of drag n dropping the file you can open dconf-editor (install it with sudo apt-get install dconf-tools or look for it in the USC) and navigate to desktop.unity.launcher and edit the key favorites by double clicking on the entries to the right of the key.

To add your custom launcher add it at the position you want with this format ‘/home//.local/share/applications/.desktop’. Don’t forget to respect the , and the spaces in that line and make sure that the line starts and ends with [ and ]respectively.

With this method you will need to log off and back in for the change in favorites to take effect. This will make it appear in the dash

Stuxnet

Israel y Estados Unidos desarrollaron técnicas para atacar sistemas de control industrial con el propósito de fastidiar a Irán,pero el secreto es saber que se puede y ahora el genio se salio de la lampara SAN JOSE, Calif. (AP) — When a computer attack hobbled Iran‘s unfinished nuclear power plant last year, it was assumed to be a military-grade strike, the […]

Israel y Estados Unidos desarrollaron técnicas para atacar sistemas de control industrial con el propósito de fastidiar a Irán,pero el secreto es saber que se puede y ahora el genio se salio de la lampara

SAN JOSE, Calif. (AP) — When a computer attack hobbled Iran‘s unfinished nuclear power plant last year, it was assumed to be a military-grade strike, the handiwork of elite hacking professionals with nation-state backing.
Yet for all its science fiction sophistication, key elements have now been replicated in laboratory settings by security experts with little time, money or specialized skill. It is an alarming development that shows how technical advances are eroding the barrier that has long prevented computer assaults from leaping from the digital to the physical world.
The techniques demonstrated in recent months highlight the danger to operators of power plants, water systems and othercritical infrastructure around the world.
“Things that sounded extremely unlikely a few years ago are now coming along,” said Scott Borg, director of the U.S. Cyber Consequences Unit, a nonprofit group that helps the U.S. government prepare for future attacks.
While the experiments have been performed in laboratory settings, and the findings presented at security conferences or in technical papers, the danger of another real-world attack such as the one on Iran is profound.
The team behind the so-called Stuxnet worm that was used to attack the Iranian nuclear facility may still be active. New malicious software with some of Stuxnet’s original code and behavior has surfaced, suggesting ongoing reconnaissance against industrial control systems.
And attacks on critical infrastructure are increasing. The Idaho National Laboratory, home to secretive defense labs intended to protect the nation’s power grids, water systems and other critical infrastructure, has responded to triple the number of computer attacks from clients this year over last, the U.S. Department of Homeland Security has revealed.
For years, ill-intentioned hackers have dreamed of plaguing the world’s infrastructure with a brand of sabotage reserved for Hollywood. They’ve mused about wreaking havoc in industrial settings by burning out power plants, bursting oil and gas pipelines, or stalling manufacturing plants.
But a key roadblock has prevented them from causing widespread destruction: they’ve lacked a way to take remote control of the electronic “controller” boxes that serve as the nerve centers for heavy machinery.
The attack on Iran changed all that. Now, security experts — and presumably, malicious hackers — are racing to find weaknesses. They’ve found a slew of vulnerabilities.
Think of the new findings as the hacking equivalent of Moore’s Law, the famous rule about computing power that it roughly doubles every couple of years. Just as better computer chips have accelerated the spread of PCs and consumer electronics over the past 40 years, new hacking techniques are making all kinds of critical infrastructure — even prisons — more vulnerable to attacks.
One thing all of the findings have in common is that mitigating the threat requires organizations to bridge a cultural divide that exists in many facilities. Among other things, separate teams responsible for computer and physical security need to start talking to each other and coordinate efforts.
Many of the threats at these facilities involve electronic equipment known as controllers. These devices take computer commands and send instructions to physical machinery, such as regulating how fast a conveyor belt moves.
They function as bridges between the computer and physical worlds. Computer hackers can exploit them to take over physical infrastructure. Stuxnet, for example, was designed to damage centrifuges in the nuclear plant being built in Iran by affecting how fast the controllers instructed the centrifuges to spin. Iran has blamed the U.S. and Israel for trying to sabotage what it says is a peaceful program.
Security researcher Dillon Beresford said it took him just two months and $20,000 in equipment to find more than a dozen vulnerabilities in the same type of electronic controllers used in Iran. The vulnerabilities, which included weak password protections, allowed him to take remote control of the devices and reprogram them.
“What all this is saying is you don’t have to be a nation-state to do this stuff. That’s very scary,” said Joe Weiss, an industrial control system expert. “There’s a perception barrier, and I think Dillon crashed that barrier.”
One of the biggest makers of industrial controllers is Siemens AG, which made the controllers in question. The company said it has alerted customers, fixed some of the problems and is working closely with CERT, the cybersecurity arm of the U.S. Department of Homeland Security.
Siemens said the issue largely affects older models of controllers. Even with those, the company said, a hacker would have to bypass passwords and other security measures that operators should have in place. Siemens said it knows of no actual break-ins using the techniques identified by Beresford, who works in Austin, Texas, for NSS Labs Inc.,
Yet because the devices are designed to last for decades, replacing or updating them isn’t always easy. And the more research that comes out, the more likely attacks become.
One of the foremost Stuxnet experts, Ralph Langner, a security consultant in Hamburg, Germany, has come up with what he calls a “time bomb” of just four lines of programming code. He called it the most basic copycat attack that a Stuxnet-inspired prankster, criminal or terrorist could come up with.
“As low-level as these results may be, they will spread through the hacker community and will attract others who continue digging,” Langer said in an email.
The threat isn’t limited to power plants. Even prisons and jails are vulnerable.
Another research team, based in Virginia, was allowed to inspect a correctional facility — it won’t say which one — and found vulnerabilities that would allow it to open and close the facility’s doors, suppress alarms and tamper with video surveillance feeds.
During a tour of the facility, the researchers noticed controllers like the ones in Iran. They used knowledge of the facility’s network and that controller to demonstrate weaknesses.
They said it was crucial to isolate critical control systems from the Internet to prevent such attacks.
“People need to deem what’s critical infrastructure in their facilities and who might come in contact with those,” Teague Newman, one of the three behind the research.
Another example involves a Southern California power company that wanted to test the controllers used throughout its substations. It hired Mocana Corp., a San Francisco-based security firm, to do the evaluation.
Kurt Stammberger, a vice president at Mocana, told The Associated Press that his firm found multiple vulnerabilities that would allow a hacker to control any piece of equipment connected to the controllers.
“We’ve never looked at a device like this before, and we were able to find this in the first day,” Stammberger said. “These were big, major problems, and problems frankly that have been known about for at least a year and a half, but the utility had no clue.”
He wouldn’t name the utility or the device maker. But he said it wasn’t a Siemens device, which points to an industrywide problem, not one limited to a single manufacturer.
Mocana is working with the device maker on a fix, Stammberger said. His firm presented its findings at the ICS Cyber Security Conference in September.
Even if a manufacturer fixes the problem in new devices, there’s no easy way to fix it in older units, short of installing new equipment. Industrial facilities are loath to do that because of the costs of even temporarily shutting its operations.
“The situation is not at all as bad as it was five to six years ago, but there’s much that remains to be done,” said Ulf Lindqvist, an expert on industrial control systems with SRI International. “We need to be as innovative and organized on the good-guy side as the bad guys can be.”
___
Jordan Robertson can be reached at jrobertson(at)ap.org

Bourne-again shell

Bash is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh).[3][4] Released in 1989,[5] it has been distributed widely as the shell for the GNU operating system and as the default shell on Linux and Mac OS X. It has been ported to […]

Bash is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh).[3][4] Released in 1989,[5] it has been distributed widely as the shell for the GNU operating system and as the default shell on Linux and Mac OS X. It has been ported to Microsoft Windows and distributed with Cygwin and MinGW, to DOS by the DJGPP project, to Novell NetWare and to Android via various terminal emulation applications.

Bash is a command processor, typically run in a text window, allowing the user to type commands which cause actions. Bash can also read commands from a file, called a script. Like all Unix shells, it supports filename wildcarding, piping, here documents, command substitution, variables and control structures for condition-testing and iteration.[6] The keywords, syntax and other basic features of the language were all copied from sh. Other features, e.g., history, were copied from csh and ksh. Bash is a POSIX shell but with a number of extensions.

The name itself is an acronym, a pun, and a description. As an acronym, it stands for Bourne-again shell, referring to its objective as a free replacement for the Bourne shell.[7] As a pun, it expressed that objective in a phrase that sounds similar to born again, a term for spiritual rebirth.[8][9] The name is also descriptive of what it did, bashing together the features of sh, csh and ksh.[10]

Eclipse C/C++ Development Toolkit (CDT)

Eclipse is an Integrated Development Environment or IDE. The Eclipse was originally created by IBM, but the Eclipse Foundation has since taken over direction and development of the project. Eclipse started out as a Java IDE, but has since grown into much more. C/C++ development with the Eclipse Platform This article, which is a follow-up […]

Eclipse is an Integrated Development Environment or IDE. The Eclipse was originally created by IBM, but the Eclipse Foundation has since taken over direction and development of the project. Eclipse started out as a Java IDE, but has since grown into much more.

C/C++ development with the Eclipse Platform

This article, which is a follow-up to “C/C++ development with the Eclipse Platform,” is intended for C++ developers who want to learn C++ development using the Eclipse CDT. A simple C++ application is developed in the article. The application makes use of the C++ STL. Readers should be familiar with the STL, as well as with basic object-oriented programming principles such as inheritance and polymorphism. A familiarity with Eclipse will be helpful, but is not required.

HOW TO: Use CDT and MinGW for Eclipse (i.e. develop C/C++ applications in windows)

 

 

Paso 1:

Bajar de mingw.org lo siguiente:

Paso 2:

Extraer los archivos al directorio c:mingw y instalar mingw32-make-3.80.0-3.exe en c:mingw.

Paso 3:

Agregar c:mingwbin a la variable de ambiente de sistema Paths. Verificar con el comando gcc -v .

Paso 4:

Descargar Eclipse e instalarlo.

Paso 5:

Instalar C/C++ Development Toolkit (CDT) usando el menú de actualización Help-> Software Updates -> Find and Install -> Search for new Features to Install.

Paso 6:

Crear un proyecto nuevo file->new ->Managed Make C Project.

Paso 7:

 

Agregar el archivo main.cc con el siguiente código (para probar la instalación):

#include
#include
using namespace std;

int main()
{
string yourName;

cout << “Enter your name: “;
cin >> yourName;
cout << “Hello ” + yourName << endl;
return 0;
}

 

Law of Leaky Abstractions

Una de las paradojas del desarrollo actual es que la disponibilidad de herramientas con grados de abstracción cada vez más altos ha hecho el convertirse en un programador de alto de nivel cada vez más difícil. Si bien es cierto que se puede desarrollar en ASP .Net con el ratón, inevitablemente llega el momento del […]

Una de las paradojas del desarrollo actual es que la disponibilidad de herramientas con grados de abstracción cada vez más altos ha hecho el convertirse en un programador de alto de nivel cada vez más difícil.


Si bien es cierto que se puede desarrollar en ASP .Net con el ratón, inevitablemente llega el momento del error extraño, o del requerimiento fuera del alcance de los asistentes y la ayuda en línea. La única manera de salir de esos pozos es entendiendo el código base, debajo de la capa del IDE y de los asistentes.

Point-and-click VB es un cómodo sillón, pero que flota en aguas turbulentas y más nos vale saber nadar.

Law of Leaky Abstractions:

All non-trivial abstractions, to some degree, are leaky.

Abstractions fail. Sometimes a little, sometimes a lot. There’s leakage. Things go wrong.

Joel Spolsky

Satish Sampath

Wink A tutorial creation application, with captured screenshots, added explanations boxes, buttons, shapes and titles.

An introduction to image compression (includes sample compression library)
Decompilation of executables (includes a decompiler for T…

Wink A tutorial creation application, with captured screenshots, added explanations boxes, buttons, shapes and titles.

Ubuntu Repositories

On systems like Ubuntu, most software is packaged in nice .deb (or .rpm, like in Red Hat) files which contain the programs and libraries you need. These files can be downloaded or come in CDs (Ubuntu’s CD is full of them). Repositories are servers which contain sets of packages. You generally access them with tools […]

On systems like Ubuntu, most software is packaged in nice .deb (or .rpm, like in Red Hat) files which contain the programs and libraries you need. These files can be downloaded or come in CDs (Ubuntu’s CD is full of them). Repositories are servers which contain sets of packages. You generally access them with tools like Synaptic.

These tools can list all the packages you have installed (from your kernel to your favorite application with all the libraries in between) and the packages that are available in the repositories that you have configured the tool to have access to. They also let you search for simple things like “image editor”.

These tools provide a simple, centralized method of software installation and give the distributors (who set up the repositories) a centralized way to send you updates(1) to your software.

In Ubuntu you generally want to have at least Ubuntu’s repositories (which may include the install CD) but it is not uncommon to have other repositories (from other packagers) set up.

It’s important to know that most of the tools you’ll want to use in Ubuntu are already in Ubuntu’s repositories. You can go search the internet for packages, or even source code, for others, but these will be more difficult to install and won’t, most of the time, integrate as well with your system.

So now you know: no more endless searching looking for spyware-infested shareware and freeware. The vast majority of useful software available for Linux is pre-packaged for you.

 

Components

Software in Ubuntu’s repository is divided into four categories or components – main, restricted, universe and multiverse.

Most people will use the Ubuntu Software Centre to install the software they want. But if you’re interested in learning more about the different categories of software we include, read on! Software is grouped according to our ability to maintain it and by how well it meets the goals of our free software philosophy. The standard Ubuntu installation is a collection of software from the main and restricted components. You can install additional software from the Ubuntu Software Centre.

 

Main

The main component contains applications that are free software, can be freely redistributed and are fully supported by the Ubuntu team. This includes the most popular and most reliable open-source applications available, many of which are included by default when you install Ubuntu. Software in main includes a hand-selected list of applications that the Ubuntu developers, community and users feel are most important, and that the Ubuntu security and distribution team are willing to support. When you install software from the main component, you are assured that the software will come with security updates and that commercial technical support is available from Canonical.

 

Restricted

Our commitment is to only promote free software – or software available under a free licence. However, we make exceptions for a small set of tools and drivers that make it possible to install Ubuntu and its free applications on everyday hardware. These proprietary drivers are kept in the restricted component. Please note that it may not be possible to provide complete support for this software because we are unable to fix the software ourselves – we can only forward problem reports to the actual authors. Some software from restricted will be installed on Ubuntu CDs but is clearly separated to ensure that it is easy to remove. We will only use non-open-source software when there is no other way to install Ubuntu. The Ubuntu team works with vendors to accelerate the open-sourcing of their software to ensure that as much software as possible is available under a free licence.

 

Universe

The universe component is a snapshot of the free, open-source, and Linux world. It houses almost every piece of open-source software, all built from a range of public sources. Canonical does not provide a guarantee of regular security updates for software in the universe component, but will provide these where they are made available by the community. Users should understand the risk inherent in using these packages. Popular or well supported pieces of software will move from universe into main if they are backed by maintainers willing to meet the standards set by the Ubuntu team.

 

Multiverse

The multiverse component contains software that is not free, which means the licensing requirements of this software do not meet the Ubuntu main component licence policy. The onus is on you to verify your rights to use this software and comply with the licensing terms of the copyright holder. This software is not supported and usually cannot be fixed or updated. Use it at your own risk.

 

A Quick, Tongue-in-cheek Description of the Ubuntu Repositories

  • $release: Don’t touch it, I like consistency, even with my bugs.
  • $release-security: I’ll accept patches to existing versions (and very rare version upgrades if absolutely necessary) in the process of keeping my system secure.
  • $release-updates: Okay, some bugs are worth fixing, and I trust you this much (holds up two fingers like Maxwell Smart).
  • $release-backports: I have something akin to technology ADHD, needing the latest of everything I can possibly get, but I can’t handle running the development branch.
  • $devel: I can take it. Seriously. If you break my X, I shall become more powerful than you could possibly imagine. I’ll file and maybe even fix the bugs and I’ll do it even if power management is not so much ‘managed’ as vomited all over the wall. Come get some.
  • Debian: We do the work so you don’t have to.

Source: Jeff Waugh, “Understanding the Ubuntu Package Repositories” (modestly edited, as recommended by Waugh)

 

Managing Repositories

 

Further Reading

Lubuntu is a fast and lightweight operating system developed by a community of Free and Open Source enthusiasts. The core of the system is based on Linux and Ubuntu . Lubuntu uses the minimal desktop LXDE, and a selection of light applications. We focus on speed and energy-efficiency. Because of this, Lubuntu has very low hardware requirements. Please join us and contribute to an exciting International Free and Open Source Software project. Install Lubuntu on your computer and start getting involved. Quick links for direct Downloads of the latest version:

[Download lubuntu (Intel x86) desktop CD]   [Download Torrent]

[Download lubuntu 64-bit (AMD64) desktop CD]   [Download Torrent]

[Download 64-bit Mac (AMD64) desktop image]   [Download Torrent]

PCs with the Windows 8 logo or UEFI firmware, choose the 64-bit download. Visit the help pages for more info about which download is best for you. The section discusses both the standard installs and those required for computers with low memory (RAM), old chipsets (i586) and low disk-space (netbooks).

LAME

LAME is a free software codec used to encode/compress audio into the lossy MP3 file format. The name LAME is a recursive acronym for “LAME Ain’t an MP3 Encoder”.[1] Around mid-1998, Mike Cheng created LAME 1.0 as a set of modifications against the “8Hz-MP3″ encoder source code. After some quality concerns raised by others, he […]

LAME is a free software codec used to encode/compress audio into the lossy MP3 file format.

The name LAME is a recursive acronym for “LAME Ain’t an MP3 Encoder”.[1] Around mid-1998, Mike Cheng created LAME 1.0 as a set of modifications against the “8Hz-MP3″ encoder source code. After some quality concerns raised by others, he decided to start again from scratch based on the “dist10″ MPEG reference software sources. His goal was only to speed up the dist10 sources, and leave its quality untouched. That branch (a patch against the reference sources) became Lame 2.0. The project quickly became a team project. Mike Cheng eventually left leadership and started working on tooLAME (an MP2 encoder).

Mark Taylor then started pursuing increased quality in addition to better speed, and released version 3.0 featuring gpsycho, a new psychoacoustic model he developed.

http://sourceforge.net/projects/lame/files/lame/3.99/

http://www.majorgeeks.com/files/details/lame.html

http://gabriel.mp3-tech.org/lame/

http://www.rarewares.org/mp3-lame-libraries.php

A few key improvements, in chronological order:

  • May 1999: a new psychoacoustic model (gpsycho) is released along with LAME 3.0.
  • June 1999: The first variable bitrate implementation is released. Soon after this, LAME also became able to target lower sampling frequencies from MPEG-2.
  • November 1999: LAME switches from a GPL license to an LGPL license, which allows using it with closed-source applications.
  • May 2000: the last pieces of the original ISO demonstration code are removed. LAME is not a patch anymore, but a full encoder.
  • December 2003: substantial improvement to default settings, along with improved speed. LAME no longer requires user to use complicated parameters to produce good results.
  • May 2007: default variable bitrate encoding speed is vastly improved.

Like all MP3 encoders, LAME implements some technology covered by patents owned by the Fraunhofer Society and other entities.[2] The developers of LAME do not themselves license the technology described by these patents. Distributing compiled binaries of LAME, its libraries, or programs that derive from LAME in countries that recognize those patents may be patent infringing.

The LAME developers state that, since their code is only released in source code form, it should only be considered as an educational description of an MP3 encoder, and thus does not infringe any patent by itself when released as source code only. At the same time, they advise users to obtain a patent license for any relevant technologies that LAME may implement before including a compiled version of the encoder in a product.[3] Some software is released using this strategy: companies use the LAME library, but obtain patent licenses.

In November 2005, there were reports that the Extended Copy Protection rootkit included on some Sony Compact Discs included portions of the LAME library without complying with the terms of the LGPL.[4]

Audacity is a free digital audio editor and recording application, available for Windows, Mac OS X, Linux and other operating systems.[5][4] Audacity was started by Dominic Mazzoni and Roger Dannenberg at Carnegie Mellon University.[1] As of 10 October 2011, it was the 11th most popular download from SourceForge, with 76.5 million downloads.[7] Audacity won the SourceForge 2007 and 2009 Community Choice Award for Best Project for Multimedia.[8][9]