10 Pines Blog

State and Polymorphism with Clojure

clojure

A couple of weeks ago, I started to take my first steps on Clojure as part of my apprenticeship residency. Having very little experience with functional programming, I quickly run into a few situations that I wasn’t sure how to handle. Setting aside Clojure’s syntax, which even though I like its simplicity and consistency, I still find the number of parenthesis somewhat uncomfortable. This short post will be about a couple of differences with OOP that caught my attention: how to approach state and how to handle polymorphism.

24 Sep 2014

Software Existentialism

agile

A few days ago, in an interesting discussion I was having in a local Agile forum, someone posted the phrase: > Doing the right thing precedes doing things right

The phrase caught my attention and as the author didn’t give much explanation of it and given I am an early adopter of the Cartesian method doubt of everything until you can prove it’s true by yourself, I’ve decided to spend some time thinking carefully through it.

23 Sep 2014

Two ways we understand code: Unitary vs Integral understanding

There is an often unresolved question in software about comments and documentation, about in what measure they should be used, and what should be commented and documented. About comments in particular it is often said that code should strive be “self-documenting”, or that the tests should be (and are) the documentation, thus comments can be a sign of a lack of clarity in the code, a way to compensate for a weak or bad design, or an inadecuate test suite.

31 Jul 2014

Is Java Dead?

java

The answer is: of course not!!, but now that I got your attention surely due to the title that mimics the lately hot [“Is TDD Dead?”][is-tdd-dead] discussion started by [@dhh][dhh], I would like to concentrate on the real objective of this post that I think it is really more important: is Java taking the right road? or in other words, are the last changes in Java 8 “good” ones or not?

5 Jun 2014

Rethinking Estimations

agile estimations

It’s not like estimations are like this, right? This post is a trigger to rethink estimations. To rethink why we do them, how much do we invest on them, what is their ROI. Should we estimate or not? If you think why you estimate in real life, you wouldn’t think there could be something dangerous about them. We all estimate how much it would take us to get to the bus station before going, right?. However, things get much more complicated in software projects and in organizations.

21 Mar 2014

Rock Your Ruby: The Value of Value

ruby

Check out the Ruby Gem at GitHub

Introduction

Go ahead and ask the developer sitting next to you what is the thing that loves the most about Ruby. It should come as no surprise that simplicity, flexibility and expressiveness are the main reasons Ruby junkies just can’t get enough of it.

In Matz own words, seems like the ‘go with the flow’ philosophy was present right from the start in the Ruby community:

{% blockquote %} “Actually, I’m trying to make Ruby natural, not simple.” {% endblockquote %}

4 Mar 2014

Refactoring legacy code story

refactoring

Introduction

Is the following story familiar? A client nocks to your door, asking for help with a software developed by another vendor. He complains about developers always being late to deadlines and every time a new version is delivered there are plenty of things that are not working properly. Issues fixed on previous versions come back as living deads on every new deploy: something is fixed here, another thing is broken there.

1 Feb 2014

Collecting Collections - Day 32

collections research

Previously on “Collecting Collections”

Method semantics

After gathering a bunch of methods in a table and reading their source or documentation, I had a basic idea for every one of them.I wanted to reduce the amount of necessary concepts to work with a collection. Something like 250 was too much.“Maybe if I make a graph, analyzing which method depends on which other I could get a view of the important ones”. At least that’s what I thought.

15 Nov 2013

Collecting Collections - Day 37

collections research

Previously on “Collecting Collections”

Performance

I was designing in my head, analyzing how to implement each method, visioning dependencies between methods and I stumbled upon size. Very simple to implement. Perhaps so simple that two different implementations popped in my head.

15 Nov 2013

Collecting Collections - Day 20

collections research

Some time ago I started digging collection APIs in a few languages trying to answer a philosophical question. How were the whole/part relationships represented on programming languages (through collections) and what were the operations that we (as programmers) used on them.What started as a few minutes skimming through collections sources in Smalltalk, Java and (thanks to Ignacio) Ruby, have become an intensive and interesting work of exploration and discovery that branched more questions and a toy Java project also.

6 Nov 2013