GeekWare - Daniel Pecos Martínez

Javascript Promises Pattern – 101

I am sure you have heard about the javascript Promises Pattern, but if you haven’t, here is a quick and simple definition: a promise or future is an object that represents a future result, not yet obtained or calculated (here you have a more complete definition). In fact, what is really nice about it is that allows you to define callbacks for async code in and more elegant and readable way.

Retrospectiva 2012

31 de Diciembre, otro año más. Y uno nuevo a punto de llegar. En mi caso es fácil resumir 2012 en un par de palabras: cambio y aprendizaje. Ha sido un año en el que profesionalmente he tomado un cambio de dirección y del cual estoy realmente satisfecho, aunque en su momento fue una decisión díficil, sobre todo por el momento de crisis en el que nos encontramos. Y es que este cambio me ha hecho aprender. Mucho.

Valencia – Global Day of Coderetreat 2012

Creo que la mejor forma de iniciar este post es felicitando a los organizadores (@borillo, @xaviuzz, hay que reconocer que os lo habéis currado) y dando las gracias a peerTransfer por hacer de host para este evento de forma totalmente altruista. Una pena para aquellos que no hayan podido asistir: ha resultado ser un evento muy dinámico, con opiniones y puntos de vista muy variados e interesantes y, sobretodo, divertido. El problema a resolver (Conway’s Game of Life), aunque simple en principio, ha dado mucho juego, y aunque un pomodoro no es suficiente para implementar una solución completa, ni mucho menos, ha sido la excusa perfecta para practicar pair programming, TDD y ya de paso, poner en práctica algún nuevo lenguaje y herramientas.

Functional Programming & Scala course finished

Coursera Functional Programming has not been my first experience in an online course, but it has been the most satisfying by far. Many people were interested in it, and I think it created a great hype, not only in the course forums but in social networks like twitter. People all around the world were interacting in the same course, creating really interesting conversations and discussions about the subject. Really nice.

Recipe: From SVN to Git without pain

Are you already in love with Git? I’m pretty sure of that, that’s the reason why you are reading this, huh? These are the steps you should follow to migrate an existing SVN repository to a Git one: 1 – Create a file where you will map SVN users to Git users, following this pattern: svn_user = git_user This is the one I created to migrate some SVN repositories from Google Code:

Blog rollback

A couple of months ago I took the decision to reset my blog and start it again from the beginning, creating a more professional computer technology oriented content. I wrote some technical articles and I feel really proud of them, but there was something left, some place where I could write about my thoughts or anything I would think it would deserve it. Some days ago I make a quick revision of a backed up previous blog where I found some articles I liked very much, some of them with several comments, containing really interesting stuff, and some others that were really crap articles. I started thinking that maybe the restart of the blog was not a good decision, that what my blog really needed was a good clean up and not a complete reset. And that’s what I’ve been doing for a couple of days, recovering articles that I feel are interesting or that made me feel in some special way when I wrote them.

Git-SCM (Part 2)

In a previous post, we have seen what Git is and its main characteristics. Now, we’ll go more into detail about its functionality and we’ll see what a usual day working with Git looks like. But before, some initial concepts: Repository: A working tree of files and directories which can be versioned, keeping track of every single modification made over the working tree, been able to move forward and backward in its history. Branch: it is an alternative image of the repository, keeping track of its own history of modifications. A repository has a main branch called master, and it can have an undefined number of branches, some of them may be copies of remote branches and the default name for the upstream repository is origin. The current branch of the working copy can be always referenced as HEAD. Commit: it is a concrete state of a branch, containing the modifications made to the entire working tree since the previous commit in the history, as well as author information and timestamps. It can be identified by its SHA hash, but a name or tag can be associated to it in order to make thing easier. Merge: it is the process of integrating changes or commits of two different branches. This integration is automatically carried by Git, if there are no conflicts between commits. Push: the changes committed in a local branch into a remote branch. These are the basic concepts we are going to use in the rest of this post. Now let’s start with the fun!

amCharts Javascript Tutorial: Parsing dates and styling up the chart

Recently I began a collaboration with amCharts, writing some tutorials for their blog. This is my first contribution, and you can find the original post in amCharts blog. http://blog.amcharts.com/2011/03/amcharts-javascript-tutorials-part-3.html I hope you’ll enjoy my first tutorial about this great graphs library! And, of course, feedback is wellcomed! In this tutorial we will enhance our previous example in order to parse dates. This will allow us to obtain date-based graphs displaying their data points using relative distance to each other and not placing them at regular spaces.

HTTP connection + HTTP Authenticacion + Proxy + SSL

Many times during your life as a java developer, you will face the situation of retrieving some resources using an HTTP connection. At first, it will seem easy, but probably some problems will arise such as: Needing to use an HTTP Proxy (maybe authentication would be required) Establishing an HTTP authenticated connection Connecting to a server that uses SSL self-signed certificates I’m sure you will quickly find the Apache Commons solution: commons-httpclient. In this article I will show you some code that, I hope, will ease you the resolution of the previous obstacles using this great API from Apache.

Git-SCM (Part 1)

One of the key tools of a software project development is the repository where it’s hosted. During my experience as software developer I have been working with several flavors, such as Visual SourceSafe, CVS, Mercurial, and of course, SVN. But latetly I have found this little jewel called Git. Git was initially developed by Linus Torvalds as a result of an unsuccessful research to replace the propietary SCM BitKeeper, used back in 2005 in the Linux Kernel project (kinda strange that the opensource star project was hosted with a propietary software, huh?). Back then, the ability to freely use BitKeeper was withdrawn by its copyright holder, so Linus was forced to find a replacement for it. He was looking for a VCS with a high performance in the process of applying patches and keeping track of the changes, but he didn’t find any opensource solutions that fitted his requirements, so he started the developement of Git (as he says on Git’s Wikipedia entry, Git was named after himself, because he considers himself an “egoistical bastard, and I name all my projects after myself”; git is the British English slang word for an stupid or unpleasant person).