Imaginemos un mundo libre

La paz interior comienza en el momento en el que decides no permitir, que ninguna persona o evento, tome el control de tus emociones.

Archive for January 2014

Coders at Work by Peter Seibel

leave a comment »

Coders at Work

Today, I finished reading the book Coders at Work by Peter Seibel and I found it really enjoyable. Coders at work is a series of interviews with great programmers and computer scientists. If you are somehow a technical person, needs some inspiration or just aspire to be better, I highly recommend you the book.

You will find information about their careers, their thoughts on the software profession and industry and how they consider programming. Programming is art, craftsmanship, science or engineering?.

They also talked about code readability, debugging strategies, testing, language design, job interviews, computer science books worth reading, teamwork, problems at work, how they got into programming and even hobbies.

Here is the list of the fifteen people interviewed. I summarized their main contributions and creations.

  • Jamie Zawinski  (Lisp hacker, early Netscape developer, Mozilla contributor, XEmacs and XScreenSaver creator ).
  • Brad Fitzpatrick  (Memcached, LiveJournal, Perlbal and MogileFS creator, Engineer at Google working in the Go programming language).
  • Douglas Crockford  (Ex JavaScript Architect at Yahoo,  JavaScript Architect at PayPal,  JSON creator, “JavaScript: the Good Parts” book author.)
  • Brendan Eich  (JavaScript creator,  CTO at the Mozilla Corporation).
  • Joshua Bloch  (Ex Java architect at Google, Ex engineer at Sun Microsystems, “Effective Java” book author,  Java Collections framework creator).
  • Joe Armstrong  (Erlang and Open Telecom Platform creator).
  • Simon Peyton Jones  (Haskell programming language co-creator, architect and lead developer of the Glasgow Haskell Compiler).
  • Peter Norvig  (Director of research at Google, ex head of the Computational Sciences Division at NASA,  JScheme co-creator).
  • Guy Steele  (Common Lisp dialect and Scheme programming language co-creator,  “The Hacker’s Dictionary” book author).
  • Dan Ingalls (Smalltalk designer and exceptional contributor, Squeak co-creator, Lively kernel creator, Ex distinguished Engineer at Sun Microystems).
  • L Peter Deutsch (Lisp hacker, Ex Chief Scientist at PARC, Ghostscript creator).
  • Ken Thompson (Unix co-inventor, Bell Labs,  B programming language creator,  UTF-8 encoding definition, Distinguished Engineer at Google, Go programming language co-creator).
  • Fran Allen (Ex programmer at IBM Research,  Compiler expert, first woman to win the “Turing Award”,  Fellow of the IEEE, IBM and ACM).
  • Bernie Cossel  (Ex MIT and BBN great programmer, Arpanet IMPs designer, DOCTOR creator, master debugger).
  • Donald Knuth (“The Art of Computing Programming” author, TeX and MetaFont creator, Computer Science major contributors).

If I had time, I will be writing the most interesting things they said. For now, I will write some quotes from Brad Fitzpatrick, one of the interviews that I really liked the most. He’s really funny and a common-sense person. Here we go… Read the rest of this entry »


Android QR Code Scanner – Quick Guide

leave a comment »

In this tutorial, we are going to build a simple Android QR Scanner using ZXing, a well known Open Source library to work with bar and qr codes.

Our small QR Scanner works this way: We call the Barcode Scanner app with an Intent action, it gets the QR Code and send it back to our app.

One problem, is that probably the user doesn’t have the Barcode scanner app installed. In this case our QR Scanner needs to tell this the user and redirect them to Google Play in order to install it.

So, we are going to use ZXing to manage this situation.

1.- Add ZXing to your project.

In particular, we need two Zxing classes, IntentIntegrator and IntentResult. 
Add them easily to your project. In your source directory create another package. Right click and select New -> Package. Let’s call it  and save the classes.  You can find the code here.

Then, in our activity code, we just need to import these classes:


Once, we have add ZXing to our project, we can start working on our app.

2.- Create the layout.

We need a Button to call the Barcode Scanner app and a TextView to see the qr code content scanned.

<RelativeLayout xmlns:android=""

        android:text="@string/get_qr_code" />

        android:layout_height="wrap_content" />


Obviously, we have a  <string name=”get_qr_code”>Get QR Code</string> in the strings.xml file.

3.- Create the Activity and the scanning code.

Find the layout widgets and create a method with “Get QR Code” logic:

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;


public class MainActivity extends Activity {
    private static final String TAG = "QR Scanner";
    private Activity mActivity;
    private Button mGetQRButton;
    private TextView mQRCodeTextView;

    protected void onCreate(Bundle savedInstanceState) {
        mActivity = this;
        mGetQRButton = (Button) findViewById(;
        mQRCodeTextView = (TextView) findViewById(;

In the setupButton method, create an instant of the IntentIntegrator class and call the initiateScan() method to start scanning.

    private void setupButton() {
        mGetQRButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                IntentIntegrator integrator = new IntentIntegrator(mActivity);

4.- Get the Scanning results.

Now, we are going to use the IntentResult class, to get the scanned data and show it in our Activity.

The IntentIntegrator will return this data to the onActivityResult method of the calling activity. Create and instant of the IntentResult class. Call the getContents() method of the scanning result and save the returned data in a string.

Finally, update your textview text with this string. It’s always useful to log what we are getting.

    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
        IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
        if (scanResult != null) {
            String scanContent = scanResult.getContents();
            Log.d(TAG, "QR Scan Content: " + scanContent);

You can see the full example at my GitHub account:

Written by Ronny Yabar

January 24, 2014 at 12:05 pm

Mountain Biking: Lares

leave a comment »

“Una bicicleta te lleva ahí, y más. Siempre existe esa linea delgada del peligro siempre existente para mantenerte alerta y cómodamente aprehensivo. Los perros te corretean, los baches se vuelven personales y en llegar a tu destino es lo más divertido.”

Bill Emerson

Mountain Biking - Lares

Gracias por tu visita al blog. Puedes seguirme en Twitter haciendo click en el siguiente enlace:

Written by Ronny Yabar

January 21, 2014 at 2:05 pm

Posted in Cusco, Mountain Biking

Tagged with , ,

Mountain Biking: Chinchero to Urubamba

leave a comment »

“Cuando salgo a andar en bicicleta me repito a mi mismo la mantra: el sol esta brillando, hay un viendo fresco y los pájaros están cantando. Esto me ayuda a sobreponerme al tráfico, olvidarme del trabajo, dejar atrás todas mis preocupaciones y concentrarme en la naturaleza a mi alrededor; pero aún debo obedecer las leyes de la calle, del ciclismo y de la gravedad. En ese momento, mentalmente estoy lejos de la civilización mientras el mundo esta rompiendo el corazón de otro.” Diane Ackerman

Mountain Biking

Gracias por tu visita al blog. Puedes seguirme en Twitter haciendo click en el siguiente enlace:

Written by Ronny Yabar

January 8, 2014 at 12:13 pm