Imaginemos un mundo libre

El blog de Ronny, dedicado a la libertad de acceso al conocimiento.

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 can only say that 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… Leer el resto de esta entrada »

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 com.google.zxing.integration.android  and save the classes.  You can find the code here.

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

import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;

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="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="com.qr.scanner.MainActivity">

    <Button
        android:id="@+id/button_get_qr_code"
        android:layout_centerHorizontal="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/get_qr_code" />

    <TextView
        android:id="@+id/text_view_qr_content"
        android:layout_below="@+id/button_get_qr_code"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</RelativeLayout>

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.app.Activity;
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;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mActivity = this;
        mGetQRButton = (Button) findViewById(R.id.button_get_qr_code);
        mQRCodeTextView = (TextView) findViewById(R.id.text_view_qr_content);
        setupButton();
    }

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() {
            @Override
            public void onClick(View v) {
                IntentIntegrator integrator = new IntentIntegrator(mActivity);
                integrator.initiateScan();
            }
        });
    }

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();
            mQRCodeTextView.setText(scanContent);
            Log.d(TAG, "QR Scan Content: " + scanContent);
        }
    }

You can see the full example at my GitHub account:

Written by Ronny Yabar Aizcorbe

enero 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

Written by Ronny Yabar Aizcorbe

enero 21, 2014 at 2:05 pm

Publicado en Cusco, Mountain Biking

Etiquetado con , ,

Mountain Biking: Chincheros 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

Written by Ronny Yabar Aizcorbe

enero 8, 2014 at 12:13 pm

Publicado en Cusco, Mountain Biking

Etiquetado con , , ,

New Tatoo – Celeste

leave a comment »

Finalmente, el nuevo tatuaje está listo, estaba pendiente desde hace meses. Aquí el resultado:

Tatuaje - Espalda

El nombre de mi novia y único amor de mi vida en la espalda, para ti Celeste. Love you pinguina.

Celeste

Written by Ronny Yabar Aizcorbe

diciembre 15, 2013 at 1:42 am

Publicado en Personal

Etiquetado con

Joel on Software

leave a comment »

Joel Spolsky is a famous blogger in the software world. He’s an ex-Microsoft employee who worked in the Excel team, is the Co-Founder of Fog Creek, a software company with a great culture and successful products like Trello, FofBugz, Copilot, CityDesk… By the way, the Fog Creek culture is really simple and is summarized like this:

Best Working Conditions -> Best Programmers -> Best Software -> Profit

It’s really funny (Life is to too short, we have to laugh and smile), how some managers still don’t understand this and make the programmers job really painful. Wake up! Wake up! managers.

Joel started writing articles in 2000 and has influenced the way of thinking of many people around the globe. Although, he’s not very active today, he has written really great articles about Software Development, Programming, Design, Startups, Recruiting and Interviews.

If you are a Software Developer, CEO, Team Leader, Product Manager, Startup founder, CS student or just work in the Software Industry, I think you will find these articles really interesting.

You can find all those articles in his blog or you can buy the two books with his writings in Amazon. I really enjoy reading in a tablet too. So, instead of buying the two books, I downloaded the Joel on Software Android app, created by the software company Digicorp. You can use the app, even without an Internet connection. Thanks guys!.

Joel on Software - Android App

These are my favorite articles, in no particular order:

Go and read, buy or download the Joel on Software stuff, it’s worth reading.

Written by Ronny Yabar Aizcorbe

octubre 8, 2013 at 11:44 am

Salar de Uyuni – Bolivia

leave a comment »

2013-03-31-2816

 

Written by Ronny Yabar Aizcorbe

septiembre 25, 2013 at 11:06 pm

Publicado en Bolivia, Viajes

Etiquetado con , ,

Seguir

Recibe cada nueva publicación en tu buzón de correo electrónico.