Angel \”Java\” Lopez on Blog

April 15, 2014

End Of Iteration 2014w15

Previous Post

Code Generation

I wrote new tasks, templates using my AjGenesis code generation tool. I create a simple:

https://github.com/ajlopez/AjGenesisNode-Django

to generate a Django web site, with admin page. The code generation creates the model, and admin feature allows you to edit the data, using Sqlite. It’s simple, but it is working. Next steps: create custom views, and a new project to generate Flask web site.

I added text area input fields to https://github.com/ajlopez/AjGenesisNode-Express the project that generates Express/Node.js web site from a model. Next steps: client-side validation, better server code organization, some initial tests.

I want to integrate these tools in a online app, so I started https://github.com/ajlopez/AjGenesisNodeServer to have a web site that generate codes from a model, defined at client side. You will select technology (Express, PHP, Sinatra, Django, Flask, …), the models (mainly, entities like: customer, supplier, department, employee, invoice… ), the database, the features (multiple pages, single page, angular? backbone? other?, REST API?, phonegap wrapper?), and voila. A zip will be generated with the generated solution. That is, code generation as a service. Maybe I could add an API to be externally consumed.

Python

I added a Flask web site example, work in progress, to my Python Samples:

https://github.com/ajlopez/PythonSamples/tree/master/Flask

I will use as a basis for my AjGenesis code generation version for Flask web sites.

Actor Model in C#

I refactored my project

https://github.com/ajlopez/Aktores

an Akka-like actor model implemented in C#. Now, I have a mailbox per actor, but the actor message process is executed consuming task from a queue, with n thread launched by the initial actor system. It was good to see such refactor working: all is in place, now. It is a proof that you don’t need to design everything before coding. If you follow TDD (Test-Driven Development) new ideas (or old ideas that have not implemented yet) can be added without much effort.

Erlang in C#

I started to add serialization of message to my project

https://github.com/ajlopez/AjErl

As usual, I started simple, using TDD: write input and out channel, using tests, red to green, refactoring. Instead of consuming an external library for serialization, I wrote a simple code, towards my first use case of distributed application. When the use case will be in place, I could start to think about other implementation path.

Google Code Jam

Past Saturday, I participated in Google Code Jam, Qualification Round. My code, usually written following TDD:

https://github.com/ajlopez/TddRocks/tree/master/Gcj2014

The Minesweeper problem is the tricky one. I should add the description of the problems, copying it from the original site.

Others

I added some code kata tests to my JavaScript samples https://github.com/ajlopez/JavaScriptSamples. I added metadata macro readind go my Clojure in C# https://github.com/ajlopez/ClojSharp. I started to add type checking in my node tree for Scala in C# https://github.com/ajlopez/ScalaSharp/commits/master. I added qualified name evaluation to my Rust interpreter in JavaScript https://github.com/ajlopez/RustScript. I worked on two non-public projects, too.

More fun is coming.

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

April 12, 2014

Angular, Links and resources (1)

Filed under: JavaScript, Web Development, Links, Angular — ajlopez @ 8:00 pm

 

The Hitchhiker’s Guide to the Directive | codef0rmer
http://amitgharat.wordpress.com/2013/06/08/the-hitchhikers-guide-to-the-directive/

jmcunningham/AngularJS-Learning · GitHub
https://github.com/jmcunningham/AngularJS-Learning

AngularJS Fundamentals – Online Training Course for Developers
http://pluralsight.com/training/Courses/TableOfContents/angularjs-fundamentals

DailyJS: Angular Smart Table, TurtleScript
http://dailyjs.com/2013/06/03/rust-smart-table/

Learn AngularJS in 5 steps – revolunet blog
http://blog.revolunet.com/blog/2013/06/01/starting-with-angularjs/

TodoMVC
http://todomvc.com/

Things I Wish I Were Told About Angular.js
http://ruoyusun.com/2013/05/25/things-i-wish-i-were-told-about-angular-js.html

Dynamically Loading Controllers and Views with AngularJS and RequireJS – Dan Wahlin’s WebLog
http://weblogs.asp.net/dwahlin/archive/2013/05/22/dynamically-loading-controllers-and-views-with-angularjs-and-requirejs.aspx

The MongoDB NoSQL Database Blog, The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
http://blog.mongodb.org/post/49262866911/the-mean-stack-mongodb-expressjs-angularjs-and

Khelldar/Angular-Express-Train-Seed · GitHub
https://github.com/Khelldar/Angular-Express-Train-Seed

AngularJS collaboration board with Socket.io | Tutorial | .net magazine
http://www.netmagazine.com/tutorials/angularjs-collaboration-board-socketio

Alex Rothenberg – The "Magic" behind AngularJS Dependency Injection
http://www.alexrothenberg.com/2013/02/11/the-magic-behind-angularjs-dependency-injection.html

AngularJS — Superheroic JavaScript MVW Framework
http://angularjs.org/

AngularJS
http://www.infoq.com/presentations/AngularJS

AngularJS — Superheroic JavaScript MVC Framework
http://angularjs.org/#/

My Links
http://delicious.com/ajlopez/angularjs

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

April 10, 2014

Erlang: Links, News And Resources (10)

Filed under: Distributed Computing, Erlang, Functional Programming, Links — ajlopez @ 5:27 pm

Previous Post

Erlang y Whatsapp – AltenWald
http://altenwald.org/2014/02/22/erlang-y-whatsapp/

High Scalability – High Scalability – The WhatsApp Architecture Facebook Bought For $19 Billion
http://highscalability.com/blog/2014/2/26/the-whatsapp-architecture-facebook-bought-for-19-billion.html

ACM SIGPLAN Erlang Workshop 2014, Göteborg, Sweden
http://www.erlang.org/workshop/2014/

marianoguerra/efene
https://github.com/marianoguerra/efene
Programming language with C-like syntax that runs on the Erlang platform

Electric Duncan: Lisp Flavored Erlang
http://technicae.cogitat.io/2013/03/lisp-flavored-erlang.html

Lisp Flavored Erlang
http://lfe.github.io/

Zotonic, the Erlang Web Framework — Zotonic
http://zotonic.com/

Inside Erlang, The Rare Programming Language Behind WhatsApp’s Success ⚙ Co.Labs ⚙ code community
http://www.fastcolabs.com/3026758/inside-erlang-the-rare-programming-language-behind-whatsapps-success

Erlang/OTP – Recursos
http://erlang.bosqueviejo.net/trabajo.html

There’s More to Life than Just Functions
http://bodil.org/more-than-functions/#/

Talking about Erlang with Fernando Benavides | Paolo D’Incau’s Blog
http://pdincau.wordpress.com/2014/02/03/talking-about-erlang-with-fernando-benavides/

videlalvaro/erlang-prime-sieve
https://github.com/videlalvaro/erlang-prime-sieve

KennethLundin-ErlangFactory2009London-AboutErlangOTPandMulti-coreperformanceinparticular.pdf (application/pdf Object)
http://www.erlang-factory.com/upload/presentations/105/KennethLundin-ErlangFactory2009London-AboutErlangOTPandMulti-coreperformanceinparticular.pdf

Big changes to Erlang
http://joearms.github.io/2014/02/01/big-changes-to-erlang.html

Erlang HiPE vs Scala | Computer Language Benchmarks Game
http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=hipe&lang2=scala&data=u64q

Building a Multi-Master Distributed Redis in Erlang
http://www.infoq.com/presentations/redis-erlang

Can someone explain the structure of a Pid in Erlang? – Stack Overflow
http://stackoverflow.com/questions/243363/can-someone-explain-the-structure-of-a-pid-in-erlang

ongoing by Tim Bray · Software in 2014
https://www.tbray.org/ongoing/When/201x/2014/01/01/Software-in-2014

Deploshark – Tech Blog: Aprendiendo Erlang
http://blog.deploshark.com.ar/2014/01/aprendiendo-erlang.html

My Links
http://delicious.com/ajlopez/erlang

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

April 9, 2014

End Of Iteration 2014w14

Previous Post
Next Post

Code Generation

I updated my template engine in JavaScript, with a minor change to skip new lines in some contexts:

https://github.com/ajlopez/SimpleTpl

Then I consumed the new version in AjGenesis for Node:

https://github.com/ajlopez/AjGenesisNode

I published the first version of my Sinatra code generation tasks and templates:

https://github.com/ajlopez/AjGenesisNode-Sinatra

The simple generated site can manage list of entities, persisted using sqlite3 and data-mapper.

I removed bower from my Express code generation tasks and templates:

https://github.com/ajlopez/AjGenesisNode-Express

because I think it is more clear to have directly the assets in the repository, instead of installing via bower.

And I updated my Php tasks and templates:

https://github.com/ajlopez/AjGenesisNode-Php

so now it is using a first page with Bootstrap.

Complexo

I wrote a simple library to support complex number operations in JavaScript

https://github.com/ajlopez/Complexo

As usual, I wrote the code using TDD workflow. You can check the commit history.

Learning Node.js

I updated my

https://github.com/ajlopez/NodeSamples

with a simple sample of a web server. I recorded a Google Hangout (see Spanish post)

Others

Additionally, I started new code kata in JavaScript, https://github.com/ajlopez/JavaScriptSamples

I did a minor internal refactor in ScalaSharp https://github.com/ajlopez/ScalaSharp my Scala interpreter in C#.

I added a do operation to my https://github.com/ajlopez/SimpleAsync simple asynchronous library. The do operation launch a “parallel” function. You can chain do operations, to launch more than one operation. The next then or map operation will receive the result of the do operations as elements in an array, after full completion of the “launched” functions. Usually, those functions perform asynchronous calls.

I was working in two non-public projects, too.

More fun is coming.

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

April 5, 2014

Always Be Coding

Filed under: Open Source Projects, Programming Languages, Software Development — ajlopez @ 10:49 am

As a professional software developer, we should pursue to be better programmers. One activity I adopted some years ago, is: "Always Be Coding”. Every day, write a piece of code. Try something new. Improve something old. Open your brain. Explore a new path. Learn a new language. Practice TDD every day. Push for simplicity. Start a simple project “Hello world” using new technology or operating system. Write a simple web site using the new web framework in the block. If you write C# or Java, try Ruby or Clojure. If you use Ruby on Rails, try Sinatra, or make a switch to Python and Django. If you like Lisp, try ClojureScript for a web project. If you like Smalltalk, try Pharo and Seaside. If you are a programming language geek, go for Rust, Go, Dart. If you write ASP.NET MVC for a living, try SignalR, then Node.js and Socket.IO. Change your editor. Change your programming language. Or write your own.

Even if all these languages, technologies, libraries, and frameworks are not in your “daily work”, the new insights are welcome. And the constant practice makes the master. If you keep the brain open, new ideas could fertilize your mind and your skill toolbox. In our profession, the change is the only constant. Altought there are other things to practice, “soft” skills, teamwork, you (and me) should be trained every day.

So, to put my money where my mouth is, every day I write a piece of code, in public and non-public projects. Partial evidence:

That’s is my public commitment: to write code every day. To learn something new, to practice an skill, to explore a new way of doing things. Always be coding

More fun is coming.

Original photo from http://atechnologyjobisnoexcuse.com/2012/04/coffees-for-coders/

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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
http://www.ajlopez.com
http://twitter.com/ajlopez

April 1, 2014

End Of Iteration 2014w13

Previous Post
Next Post

AjGenesis Agents

I started to add agents support to AjGenesis for Node, Express tasks:

https://github.com/ajlopez/AjGenesisNode-Express

The idea of agents is: instead of having code to render or produce page, code, classes, the agents are queried to solve problems: render this field, render this input, create the validation code, etc. Each agent could accept or not the problem: if an agent specialized in Angular detects that Angular is not being used in the application, then it is not loaded. Work in progress.

Ruby in C#

I updated:

https://github.com/ajlopez/RubySharp

My Ruby interpreter in C#. I added local variables detection. Ruby is a language where the local variables used in an scope can be listed. I wrote code to retrieve the name of local variables from expressions.

Clojure in C#

I worked on:

https://github.com/ajlopez/ClojSharp

There are a few new primitived forms and special form, and more parser/lexer support.

Scala in C#

I started to add dynamic object support to

https://github.com/ajlopez/ScalaSharp

The idea is to have objects with defined methods. Maybe, I will re-implement the object without dynamic methods: these should be defined at compile time, instead of runtime. I’m thinking about the definition of classes for many objects, and singleton classes for only one object.

Rust in JavaScript

I updated my Rust interpreter in JavaScript:

https://github.com/ajlopez/RustScript

with the support of modules, and public functions exposed in modules. I should add the references to them, using double colon operator.

AjLisp in Scala

To practice TDD and the use of SBT (Simple Build Tool), I started:

https://github.com/ajlopez/AjLispScala

Where I’m reimplemented AjLisp ideas in Scala, using scalatest library for TDD

JavaScript Samples

To explore WebGL, canvas, and implement some code katas, I created:

https://github.com/ajlopez/JavaScriptSamples

WebGL is not easy: lot of details to setup an scene. Canvas examples were borrowed from other of my projects. To practice TDD, I started to wrote simple code katas, using SimpleUnit and Node.js

I was working on two non-public projects, too. More fun is coming.

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

March 26, 2014

Backbone, Links And Resources (3)

Filed under: Backbone, JavaScript, Links, Web Development — ajlopez @ 3:08 pm

Previous Post

The 10 hottest JavaScript framework projects
http://www.infoworld.com/print/228335

My experience with Backbone, Ember and CanJS – Sebastian’s Blog
http://sporto.github.io/blog/2012/08/18/backbone-ember-canjs/

The triumph of JavaScript
http://www.infoworld.com/print/227283

A List of Programming Screencast Series | Virtuous Code
http://devblog.avdi.org/2013/06/21/a-list-of-programming-screencast-series/

app.js
http://addyosmani.github.io/traceur-todomvc/docs/app.html

Backbone, Node, Express, and More: An Introduction to Full-Stack JavaScript, with Init.js | Toptal
http://www.toptal.com/javascript/guide-to-full-stack-javascript-initjs

Knockback.js Home
http://kmalakoff.github.io/knockback/

Building Backbone… by Derick Bailey [Leanpub PDF/iPad/Kindle]
https://leanpub.com/building-backbone-plugins

DailyJS: Backbone Fetch Cache, Backbone.VirtualCollection, WTCSS
http://dailyjs.com/2013/06/17/fetch-cache-virtual-collection-wtcss/

Developing Backbone.js Applications
http://addyosmani.github.io/backbone-fundamentals/

Learning Advanced JavaScript via the Backbone.js source code
http://chrisawren.com/posts/Learning-Advanced-JavaScript-via-the-Backbone-js-source-code.html

Our Backbone Stack
http://blog.pamelafox.org/2013/06/our-backbone-stack.html

My Links
http://delicious.com/ajlopez/backbone

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

March 25, 2014

End Of Iteration 2014w12

Filed under: AjGenesis, Code Generation, JavaScript, NodeJs, Ruby, RubySharp, RuScript — ajlopez @ 10:41 am

Previous Post
Next Post

Ruby Interpreters

I updated my projects

https://github.com/ajlopez/RubySharp
https://github.com/ajlopez/RuScript

The first in a Ruby interpreter in C#. I started to add the support to detect the local variables in an scope. In Ruby, there is the function local_variables() that returns a list of the names of local declared variables (not only the already initialized).

The second project is the seed to my next talk: it implements Ruby in JavaScript, as an interpreter. I added more support for modules and classes, and function declaration with and without arguments and parenthesis. I’m using my grammar/parser generation:

https://github.com/ajlopez/SimpleGrammar

It was updated to support new use cases (dog fooding!).

RustScript

I added some simple features to

https://github.com/ajlopez/RustScript

My Rust Programming Language interpreter in JavaScript. Not, it has function definition with arguments, let and let mut (mutable), some new arithmetic, bitwise and logical operators, with precedence. And a powerful assert! to start writing test programs.

ScalaSharp

I updated

https://github.com/ajlopez/ScalaSharp

My Scala interpreter in C#. The additions were simple: more node support. A node is the product of a parser, and define a part of the program. It has a type to be checked. That is the main difference with expression: a node has a type that can be inferred from the rest of the program, or by explicit declaration. As a typed language, an Scala interpreter cannot directly evaluate expression. I should check the types of the nodes, and THEN, generate a correct expression tree.

Code generation

I created

https://github.com/ajlopez/AjGenesisNode-Model

A new global tasks to be used by AjGenesis and related tasks to modify the model using command line. I started the new global tasks

https://github.com/ajlopez/AjGenesisNode-Php
https://github.com/ajlopez/AjGenesisNode-Django

to generate code for PHP and Django. There are only the skeletons, but I want to generate code for these languages/frameworks using a free model. Meanwhile, you can check the simple pages generated from:

https://github.com/ajlopez/AjGenesisNode-Express

The next big step: having a code-as-a-service application, written in Node.js, using AjGenesisNode, and deployed on Heroku.

I worked on two non-public projects, too.

More fun is coming!

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

March 19, 2014

Backbone, Links And Resources (2)

Filed under: Backbone, JavaScript, Links, Web Development — ajlopez @ 5:26 pm

Previous Post
Next Post

Working With Data in Sails.js | Nettuts+
http://net.tutsplus.com/tutorials/javascript-ajax/working-with-data-in-sails-js/

Pimp my Backbone.View (by replacing with Facebook’s React)
https://blog.mayflower.de/3937-Backbone-React.html

Jeremy Ashkenas – Taking JavaScript Seriously with Backbone.js – YouTube
https://www.youtube.com/watch?v=4udR30JYenA#t=19m56s

TodoMVC
http://todomvc.com/

Developing Backbone.js Applications – O’Reilly Media
http://shop.oreilly.com/product/0636920025344.do

Building Single Page Web Applications with Backbone.js, JaxRS, MongoDB, and OpenShift | OpenShift by Red Hat
https://www.openshift.com/blogs/building-single-page-web-applications-with-backbonejs-jaxrs-mongodb-and-openshift

Building single-page web applications with Ruby on Rails – Selleo Blog
http://selleo.com/blog/technologies/building-single-page-web-applications-with-ruby-on-rails/

How to build a large, single-page javascript application with Backbone.js
http://firmamento.org/blog/2013/01/05/how-to-build-a-large-single-page-javascript-application-using-backbonejs/

Developing Backbone.js Applications -
http://addyosmani.github.com/backbone-fundamentals/

Quilt.js | Declarative Backbone Views
http://pathable.github.com/quilt/

ccoenraets/nodecellar
https://github.com/ccoenraets/nodecellar

Testing Backbone + RequireJS Applications with Jasmine | Simple Thoughts
http://kilon.org/blog/2012/08/testing-backbone-requirejs-applications-with-jasmine/

Game On: Backbone and Ember | Nettuts+
http://net.tutsplus.com/tutorials/javascript-ajax/game-on-backbone-and-ember/

JavaScript Application Architecture with Backbone.js
http://www.slideshare.net/molily/javascript-application-architecture-with-backbonejs

Building Backbone.js Apps With Ruby, Sinatra, MongoDB and Haml
http://addyosmani.com/blog/building-backbone-js-apps-with-ruby-sinatra-mongodb-and-haml/

Script Junkie | Building Mobile JavaScript WebApps With Backbone.js & jQuery: Part I
http://msdn.microsoft.com/en-us/scriptjunkie/hh377172.aspx

My Links
http://delicious.com/ajlopez/backbone

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

Older Posts »

The Shocking Blue Green Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 56 other followers