Angel \”Java\” Lopez on Blog

March 18, 2015

Liqueed Project (3)

Filed under: Express, JavaScript, Liqueed, NodeJs, Test-Driven Development — ajlopez @ 5:24 pm

Previous Post
Next Post

I’m a big supporter of TDD (Test-Driven Development), and its workflow for software development. The software is created based on the tests that describe the expected behaviour, using the simplest possible implementation. For Liqueed Project, TDD was adopted during the creation of most of the code.

An example: there is a file, services\person.js, that is a JavaScript module. It manages the logic of the persons. A person can participate in zero, one or more projects, have sharepoints, vote, etc. And the system keeps the list of persons, retrieve a person by id, by username, … Part of the logic is in the service module. It was written using test/person.js for the tests of the logic. One test, one impementation, refactor, and so on. At the beginning of the test mode, there are some requires:

'use strict';

var service = require('../services/person');
var pservice = require('../services/project');
var async = require('simpleasync');

The services persons and project are used. simpleasync is a simple module I wrote to chaining callbacks. It was an interesting experience, and I’m doing “dog-fooding” in many projects.

Then, two module variables are declared, to be reused in the tests. They are the ids of some persons:

var annaid;
var lauraid;

To run the tests, I’m using simpleunit, another module I wrote, again, to practice JavaScript, TDD and simplicity. It is inspired by nodeunit, but it is simpler. simpleunit executes the module exported functions, providing a test object, something alike to assert in NodeJs.

The first tests exercises the creation of a person:

exports['add person'] = function (test) {

    service.addPerson({ name: 'Anna' }, function (err, result) {
        annaid = result;

It has a callback, so the function could end BEFORE the creation of the person. So, the test.async() tells to simpleunit to wait until the test.done() is reached. The above test only check the return of an id for the new person, and the value is saved in a module variable. This is something to discuss, but I found this way an easy one. The second tests depends on the first one. In C#, in other technologies, I wrote more isolated tests. But for me, in JavaScript, the level of isolation is the module, not the test function. In a module, a test function could depend on the execution of a previous one.

The second test:

exports['get person by id'] = function (test) {

    service.getPersonById(annaid, function (err, result) {
        test.equal(, 'Anna');
        test.equal(, annaid);
        test.equal(result.username, 'anna');

Using the id generated by the first test, the person is retrieved, and the data is checked.

This test series doesn’t use a predefined domain, and it does not assume a previous well-knoen status. And these tests are implemented using an in-memory domain. In the initial iterations, this in-memory domain was the only implementation. Only after the implementation of the first big use case, we added a domain persisted in MongoDB.

Stay tuned!

Angel “Java” Lopez

March 13, 2015

Computer History: Links And Resources (3)

Filed under: Computer History, Links — ajlopez @ 7:08 pm

Previous Post
Next Post

John McCarthy’s theorem prover

History of the Scheme programming language

LEO I, el primer ordenador comercial de la historia, cumple 60 años

“Post-PC Computing” Is Not a Vision
Allen Wirfs-Brock discusses the various computing eras and the change we are currently going through, leaving the PC era and entering a new one characterized by mobility, clouds, HTML and content.

Historia del Software: el lenguaje Python

History of the Internet

A bit of Scheming

Why calculating is better than scheming


Espectacular prototipo de teléfono táctil creado por Apple en 1983

Zuckerberg would stay in Boston if he were starting up now

Readable s-expressions and sweet-expressions home page: Infix and fewer parentheses in Lisp-like languages


The Muses of Insert, Delete and Execute

The Ultimate DOS Machine

Astonishments, ten, in the history of version control

History of Early Stages of Microdata Corporation

A garbage collector for C and C++

A Glance At Garbage Collection In Object-Oriented Languages

Over time, Linux package dependencies show predator/prey relationship

Un auténtico invento adelantado a su tiempo: la máquina analítica de Charles Babbage

A Before-Its-Time Machine

The making of the Xbox: How Microsoft unleashed a video game revolution (part 1)

Incredible Control Panel Of IBM System/360 On Slant With A Few Illuminated Lights

Examining the Roots of Agile

Ward Cunningham on Agile: 10 Years After

AI scientists want to make gods. Should that worry us?

Interview with Dennis M. Ritchie

Ken Thompson and Dennis Ritchie Explain UNIX (Bell Labs)

Takeuchi and Nonaka: The Roots of Scrum

Steve Jobs: Insanely great

A decade’s worth of Windows mistakes that changed Microsoft (for better and worse)

John McCarthy obituary
US computer scientist who coined the term artificial intelligence

Historia de la tecnología: Lisp

The birth of the iPod
The events that led to Apple’s great unveiling on October 23, 2001

My Links

Stay tuned!

Angel “Java” Lopez

March 12, 2015

Computer History: Links And Resources (2)

Filed under: Computer History, Links — ajlopez @ 10:27 am

Previous Post
Next Post

I’m curating some of these links at:

Dennis Ritchie, Trailblazer in Digital Era, Dies at 70

DMR, 1941-2011

Dennis Ritchie

Fallece Dennis Ritchie, creador del lenguaje C y del sistema operativo Unix

Steve Jobs and Me

Steve Jobs Interview about the Blue Box Story

Steve Jobs and Bill Gates Together

Stephen Wolfram on 25 Years of Steve Jobs’ Influence

Mike Williams on the History of Erlang, Modeling and Large Scale Design

10 grandes programadores de la historia

A Brief History of the (Java) World and a Peek Forward

Can Computers Create?

The first time I Met Steve Jobs

40 Year Old 3D Computer Graphics (Pixar, 1972)

The Evolution of Technology – The History of Computers

How Programmers Get Rich,9171,923148-1,00.html

PC Forum’s photostream

Enterprise Software History, Part 1: Origins of Modern Computing

Prescient but Not Perfect: A Look Back at a 1966 Scientific American Article on Systems Analysis

The Story of Linux: Commemorating 20 Years of the Linux Operating System

11 Milestones In Linux History

Erlang History

Notes on A History of Erlang

Working with objects in the user interfaces
My first exposure to personal information systems was in 1970 when I heard Douglas Engelbart
talk about computer augmentation; the idea that computers could provide an extension of the
human intellect.

Setenta años de Supercomputadoras #Infografía

20 años de la primera web

The History of Programming Languages [Infographic]

The history of computer storage (slideshow)

Computer?s History, Components, Language And The Internet

The Story of Mel, a Real Programmer


Javascript history, by its creator
JavaScript Creator Says the Language Wasn’t Just Dumb Luck

In Praise of Benevolent Language Dictators

Before python
…I went to university in Amsterdam to study mathematics and they had a computer that was free for students to use! …
…I had to learn how to use punch cards. There were machines to create them that had a keyboard. …

My Links

Stay tuned!

Angel “Java” Lopez

March 11, 2015

Computer History: Links and Resources (1)

Filed under: Computer History, Links — ajlopez @ 4:51 pm

Next Post

The Unix revolution – thank you, Uncle Sam?

Who Killed Prolog? « A Programmers Place

Unix: when did that happen

Structural insight: Primacy of syntax

A history of computers, 1938 to 2010 [infographic] – Holy Kaw!

How the atom bomb helped give birth to the Internet

Grace Hopper: Programming Pioneer

William Shatner explains what microprocessors are and do… from way back in 1976 — Engadget

Ted Codd, Chris Date

W. Daniel Hillis – Wikipedia, the free encyclopedia

1982 New York Times story predicts the future of technology, Facebook | Poynter.

InfoQ: QCon Keynote: Forty Years of Fun with Computers
Dan Ingalls presents his journey through the world of software developing a number of core technologies over the last forty years

Old Software, Old Hardware in Computing History … | Schrievkrom

Lisp machine – Wikipedia, the free encyclopedia

The History of Email Infographic | Mashable – Neville’s posterous

RedUSERS | Pasen y vean: el museo de computadoras más grande de Sudamérica

History’s Worst Software Bugs

Computer History Museum – The Silicon Engine | Timeline

Donald Knuth never told Steve Jobs that he was full of shit – good coders code, great reuse

Full circle at Microsoft: from the early days of .NET to the new Chakra JavaScript engine « Tim Anderson’s ITWriting

My Lisp Experiences and the Development of GNU Emacs – GNU Project – Free Software Foundation (FSF)

Video: Steve Jobs Discusses Remote Computing in 1997

Edsger Dijkstra – How do we tell truths that might hurt?

Coding Horror: The Long, Dismal History of Software Project Failure

By Ken Levine: Okay…this is AMAZING
This is amazing. It’s a prediction of what a home computer would be like and some of the features it would provide. And the cool thing is — it was made in 1966.

InfoQ: The Accidental Agilist: A Personal Look Back at 10 Years of the Agile Manifesto

Bertrand Meyer’s technology blog » Blog Archive » In praise of Knuth and Liskov

Augmented Reality: Sketchpad demo | Beyond The Beyond
American military-industrial engineers of the early 1960s.

Tom West; engineer was the soul of Data General’s new machine –

Don Manuel estaría contento –
Medio siglo de la puesta en marcha de Clementina, en Argentina

Game Classification : 3D Maze (1982)

Why the internet will fail (from 1995) | Three Word Chant!

Bill Gates: 10 Crazy Stories

Paul Allen compares working with Bill Gates to ‘being in hell’ (video) — Engadget

Ed Roberts, personal computer pioneer (1941 – 2010) « Kempton – ideas Revolutionary

7 de abril, el día que nació la Red — ALT1040

RFC 1 – Host Software (RFC1)

Computer History Museum

Computer History Museum | Exhibits | This Day in History: April 6
Microsoft Corporation releases Windows 3.1 (1992)

Historia tecnológica: Dynabook, la tablet original — ALT1040

Osborne 1 celebrates its 30th birthday, and that of the portable computing revolution

Paul Baran, 84, Dies – Helped Pave Way for Internet –

La computadora que acompañó a una generación de programadores –
Sinclair ZX81

5 Years Later, Jack Dorsey Tweets About Twitter’s Beginning

The essence of the ‘Net: a history of the protocols that hold the network together

How Did The Original Google Server Looked Like | Top Design Magazine – Web Design and Digital Content

Pulitzer Prize-Winning Novelist Tells the Tale of the World’s First Computer | Magazine

Microsoft Excel: The Program’s Designer Reveals The Secrets Behind The Software That Changed the World 25 Years Ago – The Daily Beast

My Links:

Stay tuned!

Angel “Java” Lopez

March 7, 2015

Artificial Intelligence: Links And Resources (11)

Filed under: Artificial Intelligence, Links — ajlopez @ 11:40 am

Previous Post

Artificial Intelligence Introduction – JavaScript Tutorial for Beginners – YouTube

mindforth – Artificial Intelligence with automated reasoning in English, German and Russian – Google Project Hosting

NodeBots – The Rise of JS Robotics – General Game Playing

Jon’s Place: NanoSeeker – New Board

What is deep learning, and why should you care? – O’Reilly Radar

ALIA-2014 | Artificial Life and Intelligent Agents Symposium


Extreme Learning Machines – FastML

Google’s Ray Kurzweil on the moment when computers will become conscious — Tech News and Analysis

Artificial Neural Network: Artificial Neural Networks | Hvictoria Madrid –

Home | Human-like Bots Competition 2014

A Primer on Deep Learning | DataRobot

The People Who Would Teach Machines to Learn | The Official Blog of

IPAM – Schedule

Meet the Man Google Hired to Make AI a Reality | Enterprise | WIRED

Machine Learning is Fun! — Medium

My Links

Stay tuned!

Angel “Java” Lopez

March 3, 2015

New Month’s Resolutions: March 2015

Filed under: C Sharp, JavaScript, NodeJs, Open Source Projects — ajlopez @ 4:30 pm

Time to review the past month’s resolutions, and to write the new ones

– Complete first version ClojJS [partial] see repo
– Complete first version BScript [partial] see repo
– Improve ClojSharp [complete] see repo
– Improve ScalaSharp [complete] see repo
– Complete first version Chip8 emulator [partial] see repo
– Write more posts about JavaScript and Artificial Intelligence [pending]

Although ClojJS has many pieces in place (like resolving requires using a clojjs.json file), there are many forms to be defined in clojure.cljs. I should release a first version with the current status, and then add support for detecting node_modules with clojjs.json definitions, build for browser version, etc.

Additionally, I worked on:

– Start SimpleDSL node.js/javascript module [complete] see repo
– Improve AjScript [complete] see repo
– Improve AcquarellaJS [complete] see repo
– Start DValues [complete] see repo

Then, this new month’s resolutions are:

– Improve ClojSharp
– Improve ScalaSharp
– Write posts about JavaScript and Artificial Intelligence
– First published version of ClojJS
– Add npm modules support to ClojJS
– First published version of BScript
– Improve Chip8 emulator
– Give a full-day course on NodeJS

Stay tuned!

Angel “Java” Lopez

February 27, 2015

ReactJS: Links And Resources (2)

Filed under: JavaScript, Links, React, Web Development — ajlopez @ 7:57 pm

Previous Post



First Impressions using React Native

Facebook just taught us all how to build websites — Medium

React.js Conf 2015 Keynote – Introducing React Native – YouTube

The Languages And Frameworks That You Should Learn In 2015 | wwwDesigned

Why I Ditched Angular for React by Kumar Sanket | wwwDesigned

Life with Dynamic Typing

TouchstoneJS • ReactJS powered UI framework for developing beautiful hybrid mobile apps


Scaling the Single Page Application with React.js and Flux | AddThis Blog

Reactive MVC and the Virtual DOM — Futurice

Removing User Interface Complexity, or Why React is Awesome,-or-Why-React-is-Awesome

David and Suzi | ngReact – Significant Changes, New Co-Maintainer, Next Steps

Om interop with 3rd party JS libs · Robert Stuttaford, Clojure Enthusiast



My Links

Stay tuned!

Angel “Java” Lopez

February 22, 2015

ReactJS: Links and Resources (1)

Filed under: JavaScript, Links, React, Web Development — ajlopez @ 9:46 am

Next Post

Moving Atom To React

Om sweet Om: (high-)functional frontend engineering with ClojureScript and React

Thinking in React | React

javascript – Why is React’s concept of Virtual DOM said to be more performant than dirty model checking? – Stack Overflow

The Functional Final Frontier


A JavaScript library for building user interfaces | React

Polyfills as a service | FT Labs

React Components

Integrating D3.js visualizations in a React app – Nicolas Hery

Why We May Ditch AngularJS For React | Wiredcraft


React | Flux Application Architecture

Reagent: Minimalistic React for ClojureScript

How to Build Stuff with Om | Ronin Hacker


Reagent 0.4.0: All arguments allowed


The Future of JavaScript MVC Frameworks

React | A JavaScript library for building user interfaces

Facebook’s React vs AngularJS: A Closer Look – Posts – Quora

My Links

Stay tuned!

Angel “Java” Lopez

February 21, 2015

Artificial Intelligence: Links And Resources (10)

Filed under: Artificial Intelligence, Links — ajlopez @ 5:40 pm

Previous Post
Next Post

Stephen Hawking: ‘Transcendence looks at the implications of artificial intelligence – but are we taking AI seriously enough?’ – Science – News – The Independent–but-are-we-taking-ai-seriously-enough-9313474.html

Stephen Hawking: Artificial Intelligence ‘Potentially the Worst Thing to Happen to Humanity’ – Yahoo News UK

NEW SAVANNA: Sheldon Klein on Computing Lévi-Strauss, a blast from the past

IBM unveils a computer that can argue | The Exchange – Yahoo Finance

Does HWO continue (in some way) after finals for 2014? : HWO

Hello World Open

The Face Recognition Algorithm That Finally Outperforms Humans — The Physics arXiv Blog — Medium

AI researcher explains how to stop Skynet from happening | Science! |

AI Developers to power new generation of context driven artificial intelligence | SiliconANGLE

The Man Behind the Google Brain: Andrew Ng and the Quest for the New AI | Enterprise | WIRED – Exploring Machine Learning with Scikit-learn

Gaussian Processes for Machine Learning: Contents

ccv 0.6 open sources near state-of-the-art image classifier under Creative Commons

An AI that mimics our neocortex is taking on the neural networks – and this is how it’ll do it • The Register

A review of Her by Ray Kurzweil | KurzweilAI

An Introduction to Deep Learning (in Java): From Perceptrons to Deep Networks | Toptal

Why Minds Are Not Like Computers – The New Atlantis

My Links

Stay tuned!

Angel “Java” Lopez

February 20, 2015

Liqueed Project (2)

Filed under: Express, JavaScript, Liqueed, NodeJs — ajlopez @ 8:07 pm

Previous Post
Next Post

Liqueed is a Node.js project, repository at

And it has a package.json file, the current content:

  "name": "liqueed",
  "version": "0.0.2alpha",
  "private": true,
  "scripts": {
    "start": "node ./bin/www",
    "test": "simpleunit ./test ./testserver"
  "dependencies": {
    "express": "~4.2.0",
    "static-favicon": "~1.0.0",
    "morgan": "~1.0.0",
    "cookie-parser": "~1.0.1",
    "body-parser": "~1.0.0",
    "debug": "~0.7.4",
    "ejs": "~0.8.5",
    "express-ejs-layouts": "^1.1.0",
    "ostore": "0.0.4",
    "simplelists": "0.0.4",
    "simpleasync": "0.0.5",
    "mongodb": "~1.4.19",
    "bcrypt-nodejs": "0.0.3",
    "express-session": "~1.9.3"
  "devDependencies": {
    "simpleunit": "0.0.5",
    "simplejquery": "0.0.1",
    "zombie": "2.5.1"

It is a private application, so you cannot publish it to the public npm repository.

It is a typical Express application, the initial code was generated with the express-generator. The file bin\www contains the source code to launch the application. It uses express modules, like morgan, cookie-parser, body-parser, express-session, but there are others that were included to be used from the logic of application server:

– ostore: Simple JavaScript objects repository, in-memory, used in many test and in the initial version, implementing persistence in-memory, without the need for a database.

– mongodb: the current app uses MongoDB as NoSQL persistence

– simplelists: a simple utility library with list/array functions

– simpleasync: a library to chain asynchronous callsbacks.

– bcript-nodejs: encryption module written in JavaScript

In the tests (written using Test-Driven Design workflow), it uses:

– simpleunit: test library, based on internal use of assert, exporting the test functions.

There are new tests to exercise the Single Page Application of public\index.html, using:

– zombie: it visits a page as a browser

Topics for the next posts: application structure, written tests, exposed API, MVC admin pages, persistence, SPA client, etc.

Stay tuned!

Angel “Java” Lopez

« Newer PostsOlder Posts »

The Shocking Blue Green Theme. Blog at


Get every new post delivered to your Inbox.

Join 69 other followers