Angel \”Java\” Lopez on Blog

October 15, 2017

Functional Programming: Links, News And Resources (21)

Filed under: Elm, Functional Programming, Haskell, Links, Programming, Programming Languages — ajlopez @ 2:17 pm

Previous Post

Introduction to Elm

A Farewell to Functional Reactive Programming

Elm Programming

Elm in Action

Functional Programming in Haskell: Supercharge Your Coding

Functional Works Block

Rolling your Own Blockchain in Haskell

Mental Models or Real-World-Metaphors for Functional Programming

Stay tuned!

Angel “Java” Lopez

August 8, 2016

New Month’s Resolutions: August 2016

July was an intensive month in my software development job. But I had time to work on personal projects. Review of my past month resolutions:

– Improve WangTiles [pending]
– Improve WangTilesJS [pending]
– Improve CrysSharp [complete] see repo
– Improve CrysJS [complete] see repo
– Improve SimpleForth [pending]
– Improve BlockchainSharp [complete] see repo
– Improve SimpleBlockchain [complete] see repo

I also worked on:

– Start ChinesP, chinese practice web site [complete] see repo
– Update SimpleLists [complete] see repo

My new month’s resolutions

– Improve CrysSharp
– Improve CrysJS
– Improve BlockchainSharp
– Improve SimpleBlockchain
– Start Solidity Compiler

Stay tuned!

Angel “Java” Lopez

June 8, 2014

New Month’s Resolutions: June 2014

Filed under: C Sharp, JavaScript, NodeJs, Open Source Projects, Programming — ajlopez @ 5:43 pm

It’s time to review my May 2014 resolutions:

– Work on SimpleScraper, first use cases [complete] see repo
– Continue RuScript [pending]
– Continue RustScript [partial] see repo
– Continue SharpGo [complete] see repo
– Continue Distributed Messages in AjErl [pending]
– Improve Mass Language [pending]
– Continue Aktores (first distributed features) [pending]

Additionaly, I worked on:

– Continue ScalaSharp [complete] see repo
– Start SimpleApps, my MyApps refinement [complete] see repo
– Continue ClojSharp [complete] see repo

My resolutions for this new month, June 2014:

– Continue AjErl
– Continue ScalaSharp
– Continue SharpGo
– Variable scope in Mass Language
– Start SimpleItems
– Continue SimpleApps
– Continue ClojSharp
– Continue DictSharp
– First AjErl distributed use case
– First Aktores distributed use case
– Write C# Posts
– Write TDD Post
– Improve my personal site code

Stay tuned!

Angel “Java” Lopez

May 19, 2014

TDD: Links, News And Resources (11)

Previous Post
Next Post

More links about an important topic in agile programming, a hard skill that improves the making of a software

Can TDD Help Reduce Integration Time? | James Grennings Blog

Elixir is for programmers

StudiesOfTestDrivenDevelopment – Agile Bibliography

Matt Sears | Minitest Quick Reference

Kickstart your next project with a Walking Skeleton – Code Climate Blog

Concordion – Technique

Code Kata

Expectations by jaycfields

Reused Abstractions Principle (RAP) – Software People Inspiring

When Should You Think? | 8th Light

Test-Driven Development. A Cognitive Justification? – Steve Freeman

Using No Mocks to Improve Design « Arlo Being Bloody Stupid

learn Scala with TDD – Stack Overflow

How Scala promotes TDD

TDD is a Path


Should you TDD on a Lean Startup? — Tech Talk — Medium

So Long, and Thanks for All the Tests

XP Epsiode


TDD, Architecture & Non-Functional Goals – All Of These Things Belong Together – Software People Inspiring

Jeremy Pollack of on Test-driven Development and More

the middle hexagon should be independent of the adapters | silk and spinach


My Links

Keep tuned!

Angel “Java” Lopez

May 7, 2014

End Of Iteration 2014w18

Filed under: C Sharp, ClojSharp, Google, Iteration, JavaScript, NodeJs, Programming — ajlopez @ 5:07 pm

Previous Post
Next Post

Node Samples

I added a Picasa API search demo application


I added more basic functionality to my JavaScript scraper:

Now, each document element has a list of attributes. As a concrete use case, there are two console samples that generate structured JSON data from two  popular Argentinean news sites:


An interpreter of Go programming language written in C#, work in progress

Some lexer pieces in place, and the first parse expression method.


Artificial Neurons in JavaScript:

I removed events: no use case for them, yet. I added the construction of a multilayer network. Next step: automatic learning using back-propagation.


Clojure interpreter in C#:

I implemented metadata reader. Big surgical refactor: now adding metadata produces a new object (in previous naive implementation, the metadata was attached to the original object). Now, it follows Clojure expected semantics. But TDD saved my day!

Google Code Jam

I participated in Round 1B:

I solved only one problem, check

For another problem, Lottery, I had a not written solution with O(n,m). I thought that it was not good enough for processing large dataset. But, apparently, the large dataset had no hard problem. Some contestants solved the problem using O(n,m) solutions. It was an interesting problem, that deserve more thought. I didn’t understand the third problem (I confused tickets with flights)


There is a new empty Laravel PHP sample at Some new node parse methods in ScalaSharp I added first map, reduce implementations to I added more features to serialization in

I worked on three non-public projects, too.

More fun is coming.

Keep tuned!

Angel “Java” Lopez

April 26, 2014

Applications Creating Applications

I was working in different approaches to make programs create more programs. This post is a brief review of the path I took in the past years/months/weeks, and that it is still work in progress. I think they are interesting ways of doing programming, to be explored.

Dynamic Applications

The idea is to describe an application (entities, some relations, some code), and run it in a web runner that knows how to interpreted the application definition. I wrote a first implementation for past year Knockout competition:

More info at Dynamic Applications in Node.js.

The application could be described in a simple structure (in this example, a simple JavaScript object that can be serialized to JSON). The same structure could be interpreted and run by different host applications: a web application, an SPA, a mobile app, etc. And it could be used as a seed to generate code in a “concrete” technology, like Sinatra, Express+MongoDB, etc.

Code Generation

One of my preferred topics. I created tasks, templates and free models to generate applications in Express, and in other technologies (Sinatra, Django, Flask, PHP, all work in progress). I have implementations in C#, Ruby and Node.js. But my latest work is on Node.js:

You can have a simple example in:

Screenshots of a simple generated application:


And I’m working on creating an online site where you can describe the application (the free model, the features, databases, entities, web framework to use) and then download the generated application code.


In the project:

I describe each application as a set of cards (a deck). A card can have simple values, or a another card or deck. For example, a card could have an id, a name, a title to be displayed, and additional info. A card could have another deck of cards as a property (ie an Chemical Elements card could have a deck with one card by element). They can be rendered in different context: a web application, a web application as a Single Page Application, a mobile app (in Phonegap, or native). One thing is the structure and content of a card, and another thing is the render of a card. The later depends on the context of the host application.

A simple example

var model = {
    title: "My Deck",
    cards: [
        { title: "Card 1", text: "This is the card 1" },
        { title: "Card 2", text: "This is the card 2" },
        { title: "Card 3", text: "This is the card 3" }

Another sample, with screenshots:

A card content could be a simple text, a long text, an URL, an image, or a widget to be displayed by the hosted application (ie a Google Map). The card description could be static or could be generated on the fly (ie, a feed could be transformed to a card/deck, or it could be retrieved from a REST API). A card could have partial content (id, title), and a resolver can retrieve the rest of its content, using the id (ie, a card could represent a Wikipedia Page, and the id would be the URL; the resolver downloads the page content, and complete the card, if needed).

More fun is coming.

Keep tuned!

Angel “Java” Lopez

April 3, 2014

New Month’s Resolutions: April 2014

Review of my March’s resolutions:

– Work on DictSharp [complete] see repo
– Give talk about Node.js Distributed Applications [complete] see repo see online slides
– Improve SimpleGammon [complete] see repo
– Improve Annalisa [complete] see repo
– Add @for to Templie [pending]
– Work on PreciosaAnnalisa online web services [complete] see repo
– Improve my Node.js Distributes Applications samples [complete] see repo see repo see repo
– Work on ScalaSharp [complete] see repo
– Improve ClojSharp [complete] see repo
– Improve SimpleAsync, do operation (functions in parallel) [pending]
– Improve Aktores [pending]
– Distributed messages in AjErl [pending]
– Add variable scope to Mass language [pending]
– Start code generation as a service [partial]

Additionally, I worked on:

– Complexo, simple complex numbers operations in JavaScript [complete] see repo
– Started RustScript, a Rust programming language interpreter in JavaScript [complete] see repo
– Continue RuScript, a Ruby interpreter in JavaScript [complete] see repo
– Continue RubySharp, a Ruby interpreter in C# [complete] see repo
– Started AjLispScala, a Lisp interpreter in Scala, using TDD and SBT [complete] see repo
– Recorded a second video Node.js Spanish tutorial [complete] see post

For this new month, my resolutions are:

– Continue AjLispScala
– Continue AjGenesisNode-Express
– Continue AjGenesisNode-PHP
– Continue RuScript
– Continue RustScript
– Distributed Messages in AjErl
– Give a talk Intro to Node.js
– Publish a new Node.js video tutorial

More fun is coming.

Keep tuned!

Angel “Java” Lopez

February 22, 2014

Make It Work, Make It Right, Make It Fast

Filed under: Programming, Software Development, Test-Driven Development — ajlopez @ 5:05 pm

Years ago, I read this statement, applied to software development:

”Make It Work, Make It Right, Make It Fast”

I don’t remember the source. It is attributed to Kent Beck, but apparently, there are precedents. Read:

In the last decade, I started to understand the three-part statement, and I really think my software development skills were improved adopting this way of doing programming. Somehow is related to TDD (Test-Driven Development) but there are different things, and can be applied in a wider context. Let review what I think about each part, and how I apply them everyday.

Make It Work

Yes, instead of trying to do “THE RIGHT” thing from the beginning, I put my effort in having a working thing (a function, a method in a test, a use case branch, a user interface and experience). I don’t bother about the inner improvements, or about applying all the patterns from the book. I write code that works. Simple, working code. Following this advice, I can write simple code, and I can start to understand the underlying problem. If the product is use case branch (not a full use case), the working output  can shed light on the business model, and even end user feedback can be applied in early stage.

However, if I tried to do the right thing, I could waste my time and effort in something that is not what the project needs.

There is an special case: “make it work” is an essential of TDD second step, make the test go green.

Make It Right

Only when I have a working piece of software, then I’m back to improve it. Removing code duplication, applying the patterns in context (not only the patterns by the book), exploring new implementations. This is the opportunity to decrease or to remove any technical debt, any relic of toxic code. If something is convolute, go and write more straightforward code.

When the product is code written with TDD, I apply this advice at refactoring step. TDD workflow and cycle helps me to have a controlled technical debt amount. And having all the tests, now I can explore with confidence alternative internal implementations, without pain. It is really a creative step. Some programmers think that TDD puts a damper on creativity, but on the contrary, I see this two steps as a form of exercise it.

Make It Fast

Only then I worry about the speed of execution. There are so many factors that can influence it, that I only take care when a have a clear and working implementation. If you tend to write code in the previous phases thinking “this code is faster code”, stop doing that. I don’t know if a method is faster enough or not, without having a clear use case that needs performance improvement, and without having speed measured before optimization. Don’t optimize what it’s not measured.

Sometimes, I met project with the wrong decisions already done: someone added stored procedures, because “stored procedures are faster”, without any evidence of such assertion, without any performance suite that could support the statement. And then, a convoluted stored procedure, with lot of domain logic, start to emerge in the middle of the system. Even worse: without any test.

So, after practicing these precepts in my personal and professional projects, I’m a big proponent of following them. It is a pleasure to see how an idea grows up until become a concrete and solid library or system.

More fun is coming.

Keep tuned!

Angel “Java” Lopez

February 16, 2014

Programming Meteor (1) First steps

Filed under: JavaScript, Meteor, Mobile, NodeJs, PhoneGap, Programming, Web Development — ajlopez @ 7:21 pm

Yesterday, I attended to Meteor meetup at Buenos Aires, a half day of talks and coding. Thanks to organizers, sponsors and supporters: @areatreslab, @4residents, @bikestorming, @html5cat (he co-wrote a function analysis paper), @matikalwill (a.k.a. “my life is bikestorming, ‘senio’”).

Meteor is a framework to build web applications. And it can be used to build mobile applications, too. A meteor application, in general, is a single page application (SPA). The server is based on Node.js. But Meteor is not like another Node.js applications. Visit:

The main difference: the programming language is JavaScript, AND CAN BE EXECUTED at server side or at client side. Yes, the same code. Or you can write code specifically created for client OR server side.

Meteor is based on seven principles:

  • Data on the Wire. Don’t send HTML over the network. Send data and let the client decide how to render it.
  • One Language. Write both the client and the server parts of your interface in JavaScript.
  • Database Everywhere. Use the same transparent API to access your database from the client or the server.
  • Latency Compensation. On the client, use prefetching and model simulation to make it look like you have a zero-latency connection to the database.
  • Full Stack Reactivity. Make realtime the default. All layers, from database to template, should make an event-driven interface available.
  • Embrace the Ecosystem. Meteor is open source and integrates, rather than replaces, existing open source tools and frameworks.
  • Simplicity Equals Productivity. The best way to make something seem simple is to have it actually be simple. Accomplish this through clean, classically beautiful APIs.

Notable, database state is shared by all clients at realtime. If your current view is a list of customer, and somebody adds a new customer to the MongoDB database (the supported database) all the clients are notified, and each view involving customers are automatically refreshed. All this without adding special code, simply using the code that lists customers in a page (using Handlebar as the template engine).

Although based on Node.js, Meteor is not an NPM package. It should be installed manually, read:

It can installed in Linux/Unix and Mac boxes. Supported platforms at:

But if you have Windows (I used Windows in the meetup) you should use another approach:

There are Vagrant –based solutions, too. I installed using the LaunchMeteor.exe without problems, in two Windows machines.

I read:

A Meteor application is a mix of JavaScript that runs inside a client web browser, JavaScript that runs on the Meteor server inside a Node.js container, and all the supporting HTML fragments, CSS rules, and static assets. Meteor automates the packaging and transmission of these different components. And, it is quite flexible about how you choose to structure those components in your file tree.

The only server assets are JavaScript and files in the private subdirectory. Meteor gathers all your JavaScript files, excluding anything under the client, public, and private subdirectories, and loads them into a Node.js server instance inside a fiber. In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.

My emphasis. This is a sensitive issue: I’m not sure about the implications of such run strategy. Check my links,scalability

Meteor has an unofficial package manager, called Meteorite:

and “smart packages”

I read:

In addition to the packages in the official Meteor release being used by your app, meteor list and meteor add also search the packages directory at the top of your app. If you’ve downloaded an unofficial package from Atmosphere you should unpack it into that directory (the unofficial Meteorite tool streamlines this process). You can also use the packages directory to break your app into subpackages for your convenience — if you are willing to brave the fact that the Meteor package format is not documented yet and will change significantly before Meteor 1.0…

Meteorite is not running on Windows, so you should use only the builtin packages or use a manual install.

There are many resources to learn Meteor:

For example, there are easy ready to use examples:

During yesterday meetup, I tried some examples, modify and simplify the leaderboard example, add a Bootstrap 2.x top bar, and started to write a new one using many pages and MongoBD (using Backbone routing):

Many links with tutorials, videos, examples at:

The CRUD sample (work in progress) at:

It uses only builtin packages so you can run it as is from Windows.

Yesterday, I published some Meteor-related links. More links at:,tutorial

Ah! Meteor can run in PhoneGap, to have a multi-device mobile experience:,phonegap

My plan: after finishing the mycompany sample, use the base code to generate an AjGenesis module for Node.js. So, I will have code generation of web sites, using a free defined model, tasks and templates. Then, add phonegap support, and maybe, software as a service, using Node.js access to PhoneGap Build API.

More fun is coming.

Keep tuned!

Angel “Java” Lopez

July 22, 2013

End Of Iteration 2013w29

Previous Post
Next Post

Many ideas and implementations! Summary:


I started to write a simple in-memory database in C#, using TDD

I recorded and published a Google Hangout, documenting my TDD process (in Anglish, Angel’s English 😉

TDD Rocks! (3) SharpBase in C#

TDD Rocks

I renamed this project (previous name: TddOnTheRocks). I updated Energy problem for an Spanish post:

I implemented a new problem/algorithm

Given a boolean matrix, it returns a list of the greatest sets of cells having true value, that comply with the problem criteria. If a cell X, Y is in the set, for all the other cells X2, Y2, the cells X, Y2 and X2, Y are in the set, too.


I started to write an open source in JavaScript/Node.js


In order to practice TDD with JavaScript, I started to write an in-memory simple JavaScript object store in memory:

I recorded my initial TDD process as a Google Hangout:

TDD Rocks! (2) OStore with JavaScript/Node.js


I improved my programming language recognizer, written in JavaScript:

I managed to have a Node.js and a browser versions. The browser versions is running at:


I’m preparing a talk about Intro to Smalltalk. I recorded a Google Hangout. It includes my first steps with Pharo 2.0. In Spanish

Explorando Smalltalk (1)

Ruby and TDD

I recorded a Google Hangout, in Anglish, with a simple example written using Ruby 2.0 and TDD:

TDD Rocks (1) Playing with Ruby

I worked on two private projects.

Keep tuned!

Angel “Java” Lopez

Older Posts »

Create a free website or blog at