Monthly Archives: February 2014

Erlang: Links, News And Resources (7)

Previous Post
Next Post

Erlang Bookmarks
https://github.com/0xAX/erlang-bookmarks/blob/master/ErlangBookmarks.md

The Go Circuit Project: Paradigm for developing and sustaining Big Data apps
http://www.gocircuit.org/

Recon Library
http://ferd.github.io/recon/
Recon is a library to be dropped into any other Erlang project, to be used to assist DevOps people diagnose problems in production nodes.

ferd/pobox
https://github.com/ferd/pobox
External buffer processes to protect against mailbox overflow in Erlang

Embedding the Nitrogen Web Framework into an Existing Erlang Application | Sigma Star Systems
http://sigma-star.com/blog/post/embedding-nitrogen

Leapfrogging Online Payments & Burying Tech Debt
http://www.infoq.com/presentations/refactoring-erlang
David Craelius tells the story of Klarna building an online payment system in Erlang and their approach to solving the nightmare of technical debt accumulated during a period of fast expansion.

Productivity Gains in Erlang
http://www.slideshare.net/JanHenryNystrom/productivity-gains-in-erlang

Erlang at Basho, Five Years Later | Basho
http://basho.com/erlang-at-basho-five-years-later/

langref.org
http://langref.org/

How attached are you — Functional Erlang — Medium
https://medium.com/functional-erlang/6d31b7af25d4

Erlang processes — Functional Erlang — Medium
https://medium.com/functional-erlang/c527f4b30544

How does Cloud Haskell currently compare with Erlang/OTP, Scala/Akka, Clojure/Storm? : haskell
http://www.reddit.com/r/haskell/comments/1ft2l2/how_does_cloud_haskell_currently_compare_with/

Building Services With Erlang webmachine
http://www.erlang-factory.com/upload/presentations/679/webmachine_services.pdf
http://www.erlang-factory.com/upload/presentations/679/webmachine_services.pdf

Scaling systems configuration at Facebook: The paradigms, design, and software behind managing massive numbers of systems with open source and small teams – Phil Dibowitz | Opscode Blog
http://www.opscode.com/blog/chefconf-talks/chefconf-2013-scaling-systems-configuration-at-facebook-the-paradigms-design-and-software-behind-managing-massive-numbers-of-systems-with-open-source-and-small-teams-phil-dibowitz/

An interview with Stavros Aronis about #erlang and Dialyzer | Paolo D’Incau’s Blog
http://pdincau.wordpress.com/2013/05/31/an-interview-with-stavros-aronis-about-erlang-and-dialyzer/

A beginners guide to Erlang – Ward Bekker
http://blog.equanimity.nl/blog/2013/05/29/a-beginners-guide-to-erlang/

Writing RabbitMQ Plugins With Elixir
http://videlalvaro.github.io/2013/06/writing-rabbitmq-plugins-with-elixir.html

The Three Laws of Programming Language Design | Lambda the Ultimate
http://lambda-the-ultimate.org/node/4754

A Week with Elixir
http://joearms.github.io/2013/05/31/a-week-with-elixir.html
Elixir is a functional, meta-programming aware language built on top of the Erlang VM.

Scale-free engineering
http://www.gocircuit.org/scalefree.html

Liberator – Welcome
http://clojure-liberator.github.io/liberator/
Liberator is a Clojure library that helps you expose your data as resources while automatically complying with all the relevant requirements of the HTTP specification (RFC-2616). Your resources will automatically gain useful HTTP features, such as caching and content negotiation. Liberator was inspired by Erlang’s Webmachine.

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

Keep tuned!

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

End Of Iteration 2014w08

Previous Post
Next Post

More interesting projects and code TDD practices

Annalisa

A new JavaScript project:

https://github.com/ajlopez/Annalisa

to solve some use cases of Preciosa project. Preciosa is written in Django/Python, but I want to explore how to solve:

– Given an string, return associated properties (ie. analyze a product description, then return detected weight (from “10 gr” substring), brand (from “… Axe … “ substring). I create rules to detect some patterns (simple normalized substrings) and return a JavaScript object with detected properties/values.

– Search by word combination (done), and approximated words (WIP)

Now, I’m working on implementing Preciosa use cases, using its data for products, companies, brands, etc.  I’m implementing console programs, and I will to implement a web service with associated test page.

AcquarellaJS

I started:

https://github.com/ajlopez/AcquarellaJS

A new implementation, this time in JavaScript, for my syntax highlighter Acquarella (in C#). I plan to use it to generate colored HTML for my code snippets, and add them to my posts (in blog software that doesn’t allow JS scripts).

Templie

Someone asked on Twitter about a template engine in Java, without dependencies, a lightweight version. Then, I wrote

https://github.com/ajlopez/Templie

Now, it has expansion of variables in ${variable}, and process of @if commands. Next steps: adding @for, adding ${variable.property} using reflection.

ScalaSharp

My Scala interpreter in C#, in progress:

https://github.com/ajlopez/ScalaSharp

I was adding more INode concrete nodes. Instead of having expression tree, I want a node tree, to have type checking BEFORE evaluation, according to a typed compiled language.

Talks

I modified

https://github.com/ajlopez/Talks/tree/master/NodeIntro

It was published to

http://ajlopez.github.io/Talks/NodeIntro/index.html

And created a new one (WIP):

https://github.com/ajlopez/Talks/tree/master/NodeDistributedApps

for upcoming JSConf Uruguay 2014. Yes! I’m an speaker.

SimpleAsync

After attending JavaScript meetup with @getify talk, I wrote, following TDD as usual, a simple async library:

https://github.com/ajlopez/SimpleAsync

I want to add: .do to launch a “parallel” tasks (many consecutive .do returns an array with the collected result), and .map to process an array in “parallel”.

Silabeo

I wrote a new TDD exercises

https://github.com/ajlopez/TddRocks/tree/master/Python/Silabeo

this time in Python: syllable separation in Spanish. Good code kata. It was useful to me to learn and practice more Python.

Others

Minor additions to https://github.com/ajlopez/DylanSharp, https://github.com/ajlopez/MeteorSamples, https://github.com/ajlopez/SimpleReact

I also worked on two non-public projects. More fun is coming.

Keep tuned!

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

Akka: Links, News And Resources (7)

Previous Post
Next Post

ThreadPools
http://www.playframework.com/documentation/2.2.x/ThreadPools

chanan/AkkaGuice
https://github.com/chanan/AkkaGuice

typesafe.com
http://typesafe.com/blog/running-a-2400-akka-nodes-cluster-on-google-compute-engine

Distributed Publish Subscribe in Cluster — Akka Documentation
http://doc.akka.io/docs/akka/2.2.3/contrib/distributed-pub-sub.html

Microkernel — Akka Documentation
http://doc.akka.io/docs/akka/2.2.3/scala/microkernel.html

Typesafe Blog – PlayFramework – Blog – Typesafe
http://typesafe.com/blog/PlayFramework

yngui/akka-disruptor
https://github.com/yngui/akka-disruptor

Dispatchers — Akka Documentation
http://doc.akka.io/docs/akka/snapshot/scala/dispatchers.html

rogeralsing/Pigeon
https://github.com/rogeralsing/Pigeon
Akka in C#

Getting Started Tutorial (Scala): First Chapter — Akka Documentation
http://doc.akka.io/docs/akka/2.0.2/intro/getting-started-first-scala.html

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

Keep tuned!

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

Make It Work, Make It Right, Make It Fast

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:

http://c2.com/cgi/wiki?MakeItWorkMakeItRightMakeItFast

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

Owin: Links And Resources (2)

Previous Post

Byte Rot: OWIN and Katana challenges: blues of a library developer
http://byterot.blogspot.com.ar/2013/08/OWIN-Katana-challenges-blues-library-developer-aspnetwebapi-nancyfx.html

damianh (Damian Hickey)
https://github.com/damianh

owin Archives – StrathWeb
http://www.strathweb.com/category/owin/

Getting Started With OWIN and the Katana Stack – Tugberk Ugurlu’s Blog
http://www.tugberkugurlu.com/archive/getting-started-with-owin-and-the-katana-stack

Owin.Dependencies: An IoC Container Adapter Into OWIN Pipeline – Tugberk Ugurlu’s Blog
http://www.tugberkugurlu.com/archive/owin-dependencies–an-ioc-container-adapter-into-owin-pipeline

Introducing SaasKit – Multi-tenancy made easy – Ben Foster
http://ben.onfabrik.com/posts/saaskit-multi-tenancy-made-easy

Are we gOWINg in the right direction? | Roysvork
http://roysvork.wordpress.com/2014/02/18/are-we-gowing-in-the-right-direction/

The Liara Framework by Prasanna V. Loganathar
http://prasannavl.github.io/Liara/

davidfowl/OwinHttpClient
https://github.com/davidfowl/OwinHttpClient

prabirshrestha/simple-owin
https://github.com/prabirshrestha/simple-owin

OWIN Middleware in the IIS Integrated Pipeline : The Official Microsoft ASP.NET Site
http://www.asp.net/aspnet/overview/owin-and-katana/owin-middleware-in-the-iis-integrated-pipeline

OWIN and Katana : The Official Microsoft ASP.NET Site
http://www.asp.net/aspnet/overview/owin-and-katana

Fix and OWIN and Simple.Web – codeface
http://blog.markrendle.net/2013/10/01/fix-and-owin-and-simple-web/

fracture
https://github.com/fractureio

ASP.NET MVC 5 Fundamentals – Online Training Course for Developers
http://pluralsight.com/training/Courses/TableOfContents/aspdotnet-mvc5-fundamentals

Writing OWIN middleware
http://odetocode.com/blogs/scott/archive/2013/11/11/writing-owin-middleware.aspx

ASP.NET – Getting Started with the Katana Project
http://msdn.microsoft.com/en-us/magazine/dn451439.aspx

Understanding OWIN Forms authentication in MVC 5 – .NET Web Development and Tools Blog – Site Home – MSDN Blogs
http://blogs.msdn.com/b/webdev/archive/2013/07/03/understanding-owin-forms-authentication-in-mvc-5.aspx

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

Keep tuned!

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

Owin: Links and Resources (1)

Next Post

OWIN — Open Web Interface for .NET
http://owin.org/

Getting up to speed with Katana – Jon Galloway
http://weblogs.asp.net/jgalloway/archive/2013/05/30/getting-up-to-speed-with-katana.aspx

Tomek on Software: Access MS SQL from a node.js application using OWIN, in-process CLR hosting, .NET, and ADO.NET
http://tomasz.janczuk.org/2013/02/access-ms-sql-from-nodejs-application.html

Tomek on Software: CPU bound workers for node.js applications using in-process .NET and OWIN
http://tomasz.janczuk.org/2013/02/cpu-bound-workers-for-nodejs.html

tjanczuk/owin · GitHub
https://github.com/tjanczuk/owin

Tomek on Software: Hosting .NET code in node.js applications using OWIN
http://tomasz.janczuk.org/2013/02/hosting-net-code-in-nodejs-applications.html

gsscoder/owinhttplistener · GitHub
https://github.com/gsscoder/owinhttplistener

Herding Code 123: Andreas Håkansson and Steven Robbins on NancyFx
http://herdingcode.com/?p=350

Kayak, a C# HTTP server.
http://kayakhttp.com/

OWIN — Open Web Server Interface for .NET, v1.0 Draft 5
http://owin.org/spec.html#Overview

Hanselminutes Podcast 264 – This is not your father’s WCF – All about the WebAPI with Glenn Block – Scott Hanselman
http://www.hanselman.com/blog/HanselminutesPodcast264ThisIsNotYourFathersWCFAllAboutTheWebAPIWithGlennBlock.aspx

Getting fancy with Nancy – Introduction – TheCodeJunkie
http://thecodejunkie.com/getting-fancy-with-nancy-introduction

CodePaste.NET – Processor for supporting uri extensions which map to variant representations
http://codepaste.net/j8spid

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

End Of Iteration 2014w07

Previous Post
Next Post

A lot of interesting topics and code.

MeteorSamples

I started to explore Meteor:

https://github.com/ajlopez/MeteorSamples

You can see one of my samples deployed at:

http://mycompany.meteor.com/

A simple CRUD (WIP) application. Next steps: code generation using AjGenesis for Node.js, mobile look, and wrap up as a PhoneGap application.

I also wrote posts:

Programming Meteor (1) First Steps
Meteor: Links And Resources (1)

ScalaSharp

My Scala interpreter in C#:

https://github.com/ajlopez/ScalaSharp#

I started to switch from a tree of expression to a tree of nodes (a classical AST). In this way, I could implement type checking, compilation, etc… visiting the node tree. There are differences between an expression and a node. A node could be a name, but that name, in Scala, could be a val, a var, or a def. I have not the full context to decide what kind of expression to invoke. So, I need a previous step. A node is the first parser output. A tree node could be visited, performing type checking and then producing the correct expression.

SimpleReact

Inspired by Meteor .autorun method, I wrote a react library in JavaScript

https://github.com/ajlopez/SimpleReact

As usual, simple code, using TDD workflow.

SimpleScraper

I continue adding features to

https://github.com/ajlopez/SimpleScraper

A simple JavaScript library to process an HTML string. I should add more features, and write a sample, scraping an e-commerce site.

Others

A minor addition in ClojSharp https://github.com/ajlopez/ClojSharp using recur in a function

Completing the model in https://github.com/ajlopez/AjGenesisNode-Express supporting that an entity references another entity.

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