Logo, a programming language with visionary ideas


Nowadays, computers are truly ubiquitous and accessible to children, e.g., iPads are used at certain kindergartens in Sweden. Could we leverage these computers to improve education, innovate on teaching methods, and help students at school? I firmly think that the answer is yes! The key relies on teaching children how to program computers, a mental and creative activity.

Recently, there has been considerable efforts to push computer programming to elementary and high schools. As a concrete example, I can cite the Computing at School initiative to promote programming at schools in the UK, which has Simon P. Jones (co-creator of Haskell) among its collaborators. Another relevant example is Pablo E. Martinéz Lopez, who is part of the effort program.ar to push programming at the public schools in Argentina. For that, Martinéz Lopez participated in the creation, design, and implementation of a new programming language called Gobstones.

mindstormsWhile randomly discussing about teaching programming at schools, a colegue of mine (Ezequiel Gutesman) pointed out to me the book MindStorms by Seymour Papert, one of the creator of Logo. Logo is a programming language for education created in the 60s, and while the book was firstly published in 1980 (and a second edition in 1993), I found the book’s principles and ideas still applicable today. Below, I briefly describe the most relevant insights I got from the book.

Computers should not program children

Nowadays, smartphone and tables are often loaded with applications designed to entertain children—in fact, parents use them as a sort of XXI century pacifier. Children quickly learn how to launch applications, overcome obstacles by leaning the tablet slightly to the right, switching between games with a push of a button, etc. It is a reality that children learn “the way of the computer” in no time. However, it is the computer that decides how children should interact with it. In other words, computers are currently indoctrinating, i.e., programming, our children. While knowing how to use computers is important, children should also be empowered to instruct computers to carry out tasks in the way that their imagination determines, i.e., without being limited or restricted by pre-established software and user interfaces.

No fear for programming

Another insight I found relevant in the book is the fact that teaching programming is an inclusive activity. If compared with learning mathematics, where students often feel that they either “got it” or “got it wrong” (a binary cruel classification), learning programming is about try and error. Students (and even professional programmers) do not often get their code free of errors in their first try. The fact that programming works like this makes a difference: students are welcome to try, after all, everyone is surely getting it wrong in the beginning. Students should not be scared of failing, the very nature of learning programming consists more about repairing code than getting it right at once.

Modularity as a necessity to repair code

A modular program is one that subdivides the code into smaller, reusable, independent parts called modules. For example, if you write a program that sells products online, the code could be divided into the modules to handle payments, to display products, and to administrate customers. Now, have you ever wondered how to teach a 10 years old kid such an advanced concept? In this matter, the book is enlightening: children should learn the value of modularity as an aid for debugging. Repairing a big chunk of code is indeed challenging, not only for children, but also for professional programmers. If the code is divided into modules, children can focus on repairing the errors related to a single module without having to understand the rest of the code found in the other modules—after all, a module is ideally conceived as a self-contained unit of code. By showing that modularity alleviates debugging, children have a practical and genuine motivation for writing modular code.

Formal thinking at a very early stagehistoria-logo-01

The book is built on the Piaget‘s principle that children create their own intellectual structure from the material they find around them—often referred to as culture. For instance, a child usually learns the properties of liquid when they pour it on the floor. The book states that children should be immerse in a “computer culture” that they are familiar with. In that way, children can build their own intellectual structures from an environment that they know. In the case of Logo, children are placed in a world where there is a turtle that moves in a two-dimensional plane and is able to draw lines while moving. The creators of Logo believed so strongly in this approach that the MIT lab, where Logo was thought, had a actual mechanical turtle—making the computer culture as concrete as it can be. Is this enough to learn programming? While it definitely helps, children should also develop formal thinking in order to be good programmers.

Piaget says that a child achieves the formal stage of reasoning if he/she achieves (1) self-referential thinking, i.e., thinking about how he/she thinks, and (2) combinatorial thinking, i.e., being able to enumerate all the possible states of a system. Self-referential thinking starts manifesting when children take their first steps in programming: they need to think how to teach (program) the turtle to draw the figure they imagine—this path makes children reflect on how they think. With respect to combinatorial thinking, Logo provides the concept of loops. A loop enables children to systematically repeat the turtle’s commands, e.g., a square on the screen can be drawn as repeating 4 times the following instructions: move forward the turtle 1 cm on the screen, and rotate the turtle to the right 90 degrees. To illustrate the power of loops, consider that you ask the children to deduce all the possible colors that can be obtained by combining Red, Blue, and Green. As a response to your question, they will most likely get stuck. However, asking the same question to children who know programming, their mind will probably conceive nested loops, where each of them iterates over the color palette in order to achieve all the possible colors. Although such program will have some errors (e.g., emitting duplicate colors), they would indeed solve the challenge by taking the notion of loops from their computer culture.

To conclude this post, I strongly encourage the reading of Seymour Papert’s book to any educator who teaches programming at schools. Actually, I would even dare to recommend it to teachers in first programming courses at Universities. The book is not only interesting from a historical perspective, but from the applicability and validity of its ideas today. Sometimes, it is good to revisit old ideas.

Grillad köttpizza


Matambre a la pizza is a traditional Argentinian dish prepared on the grill. A quick way to describe it would be as a pizza where the dough has been replaced by meat! Yes, by meat! People could also think of it as a low carb pizza. Since not many people may have heard about this before, I decided to call it grillad köttpizza in Swedish.

Just like making a pizza, there are two main parts: the base and the topping. The interesting part is obviously the base, while the topping (e.g. tomato sauce, mozarella, etc.) is similar as for regular pizzas. Be prepared to surprise your Nordic meat lovers friends!


The base  The meat cut used is flank steak. This cut is often flat, thin, and comes in a square shape, which makes it perfect as a base.  In case that the piece is too thick, you should cut it in the middle to either have two bases or just extend the one you got.  Flank steak is not the easiest cut to find (if compared with entrecôte for instance). In my case, I had to ask around several butcher shops in Saluhallen.  The flank steak sold there is  different from the one in Argentina, i.e., it is small (one piece could feed up to two adult people) and with almost no fat (a good thing). Nevertheless, it can be used to make the dish. The meat needs to go through a tenderizing process.


Tenderizing process Although easy to do, this phase takes a long time. The ingredients needed are:

  • Onions, 2
  • Laurel leave, 1
  • Milk, half a liter
  • Water, half a liter
  • Flank steak (flankstek på svenska)
  • Pepper grains
  1. Slice the onions and place them in a (deep) oven tray so that you cover all its surface (add more onions if needed).

    Flank steak

    1. Flank steak and onions. You should actually cover all the tray with onions (not as shown by the picture).

  2. Place the flank steak on top of the onions for the meat not to be in direct contact with the tray. Crush the laurel leave and sprinkle it together with the whole pepper grains. Add milk and water (in even measures) so that the liquid reaches half way up the height of the flank steak until half of its height. At this point, you could add more pepper, laurel, and any seasoning of your preference. However, I would recommend you to keep it simple.

    2. Flank steak with milk and water. The amount of seasoning might be changed according to personal preferences.

  3. Seal the oven tray with aluminium paper.

    Sealed oven tray.

    Sealed oven tray. This step is important to keep the flank steak humid.

  4. Heat the oven to 150 Celsius degrees. Place the sealed oven tray into the oven and keep it there for two hours and thirty minutes. At this step, the flank steak becomes cooked. Once it is done (see picture below), the meat is ready to be put on the grill!

    Cooked and tenderized flank steak.

On the grill I recommend you to have all the topping ready. Here, it follows one suggestion for topping, but you might have others in mind. The ingredients are:

  • Some tomato-based sauce (e.g. filetto)
  • Green olives
  • Oregano
  • Mozzarella
  1. Divide the mozzarella in small pieces, and cut the olives.
  2. Place the flank steak on the grill, and put the tomato sauce, the mozzarella, the olives, and the oregano. In the picture below, you can see two köttpizzas (one of them with pesto sauce and mozarella).

    Quickly put the ingredients. Here, different flavors of köttpizza.

    You can choose different toppings on your köttpizza.

  3. Put the grill cover and cook for 5 minutes (just to melt the mozzarella and heat up the other ingredients).

    Köttpizza ready to server!

    Köttpizza ready to serve!

Enjoy it!

An alternative to beef  is to use pork flank steak. However, I have not managed to get that cut in Göteborg yet!

Systematically Learning Emacs

LaTeX code

LaTeX code

Users can use text editors for so many different purposes, which might range from simply writing letters to do some advance programming. Some years ago, I switched from Vim to GNU Emacs (Emacs) in order to boost my productivity writing scientific articles. On that time, it seemed that Emacs provided better support to handle LaTeX documents (bibliography or reference citations, on the fly spell checking, different font sizes depending on the section heading, etc.) Deliberately, I began to adopt it into my other main activity: programming. Unfortunately, I did not find it as impressive as for writing articles. I forced myself to learn some Emacs tricks, keyboard shortcuts, and installing different modes to allow better experiences when programming.
However, I had never had a systematic approach to learn Emacs. It was precisely for that I decided to read the book Learning GNU Emacs, 3rd edition.

Learning GNU Emacs book cover

Book cover

The book explains the principles behind Emacs in a easy and clear manner. The chapters are concise and to the point. Topics are usually summarized with a table of keyboard shortcuts—a useful help in the Emacs world. I briefly highlight what I consider the most interesting concepts described in the book.

  • When editing, it is handy to know about the kill ring (Chapter 2). This storage area allows to paste any text that has been deleted or copied.

  • Collaborative paper-writing might find you opening files with different line lengths. Emacs has a fill-mode (Chapter 2) to set up the column width and automatically reformat paragraphs according to that.

  • Emacs has a search mode capable to ignore quotes, punctuation symbols, and line breaks (Chapter 3). More interestingly, recursive editing allows to pause the current task, perform some editing, and then resume it. This feature turns out to be quite useful when, for instance, performing a search and replace activity.

  • Grasping the concepts of buffers, windows, and frames makes a difference when setting up a productive layout (Chapter 4).

  • It is no longer necessary to open a terminal to handle files (Chapter 5). Emacs has support for shell commands which smartly treats and organizes the produced outputs.

  • One of the most interesting topics in the book are related to write macros (Chapter 6) and programs for Emacs (Chapter 7). These chapters give a feeling regarding how extensible Emacs is.

The book has chapters which are a bit out-of-date and might not be of great interest nowadays. For instance, how to write ASCII articles (Chapter 7) and HTML code (Chapter 8) as well as handling CVS version control systems (Chapter 12). I believe that some of those chapters respond to the philosophy of you can do everything within Emacs, which I do not share.

All in all, the book is of great help to systematically learn Emacs. It is of easy reading and, while not all the chapters are interesting, it is worth reading if you wish to raise your experience (and productivity) with the editor.

Desde afuera

Esta nota tiene como fin satisfacer una necesidad de expresarme mas que generar algún tipo de conocimiento. Tal vez, porque hace 24 horas que mi cabeza no deja de pensar en diferentes cosas desde que me entere que falleció el ex-presidente Nestor Kirchner.

El destino quiso que mi primera visita a la universidad de Stanford se asocie con su muerte. Era  madrugada en Palo Alto, California cuando escucho que mi teléfono recibió un SMS. Era mi madre. Me escribió “Se murió Kirchner, el esposo de Cristina”. Lo leí dos veces y, pensando que había alguna equivocación, agarre la laptop para verificar la noticia en Internet. Era cierto, el Nestor Kirchner que todos conocían, había fallecido. Seguí las noticias durante dos horas en mi habitación. No podía quedarme mas tiempo pegado a la laptop, tenia que tomar mi vuelo de vuelta a Suecia, país donde soy profesor en ciencias de la computación.

Aun estando a 10.000 metros de altura, mi cabeza no paraba de pensar. Sentía pena por la muerte del ex-presidente e incertidumbre por lo que podría pasar en mi país. El rumbo iniciado por Kirchner ha conseguido conquistas que antes ni siquiera me imaginaba. Su mandato me devolvió la esperanza de que Argentina quiere ser un país independiente y soberano.

No puedo dejar de ser egoísta y dar ejemplos de como su gobierno me afecto puntualmente. Solo puedo hablar de los primeros años ya que resido en el exterior desde el 2005. Recuerdo que en sus primeros tiempos de mandato, los patacones empezaron a desaparecer. Se empezaba a saldar deudas con las provincias. Están frescas mis memorias de los cartelitos que tenian los negocios diciendo “se aceptan Patacones”.  Por otro lado, sentí orgullo, y un sentimiento de justicia, cuando volvía al país desde del 2005 e incrementalmente se me fue devolviendo el 13% que la Alianza decidió quitarme de mi sueldo de docente en la Universidad Nacional de Rosario. Como profesional involucrado en informática, fue la primera vez que se diseño un plan estratégico, a 10 años, del desarrollo de software en Argentina. Si, 10 años. Se empezada a pensar a largo plazo.

Estoy seguro que el gobierno de Kirchner tuvo errores como así también los tiene el de Cristina. Sin embargo, es hora que dejemos de mirar el árbol para mirar el bosque. No hay que evaluar a una persona por como se viste, que cartera usa o como habla. Señores, el bosque, hay que mirar el bosque! A veces mi familia me dice, “vos no sabes lo que es, no vivís acá” Puede ser verdad lo que dicen, pero también es verdad que, al vivir afuera, uno ve los sucesos con otros ojos. Ver el bosque en una forma diferente. Uno no esta tan expuesto a la batería de medios que hay en Argentina y se puede elegir con que informarse sin dejar que se colen noticias o conductores tendenciosos.

Mi mas sincero pésame a nuestra presidente, familiares, y allegados a Nestor Kirchner. El vació que dejo, y del que todo el mundo habla, no es mas que una manifestación de lo que significaba para el país, ya sea para bien o para mal. Después de once horas de vuelvo, arribe a Frankfurt donde estoy esperando mi vuelo a casa. En los televisores veo la noticia de la muerte de Kirchner en Alemán. Varias personas cuchichean entre si. ¿ Sera que lo conocen de algún lado? ¿ Sera que se preguntan si es Alemán por su apellido? Hay que mirar el bosque. Nestor lo esta mirando desde arriba.

Programming as part of elementary schools’ agenda

1982 - Sinclair ZX Spectrum

Sinclair ZX Spectrum from 1982.

Some days ago, I found myself explaining to my sister, born in 1989, what home computers were and how I used to program them when I was 10 years old. In fact, I quickly downloaded an emulator of ZX Spectrum, my first computer, and showed her how to build a very simple program to compute the age of the user according to its year of birth. She quickly picked up some instructions of Spectrum’s BASIC programming language and realized how the program worked. When I asked her — didn’t you learn this stuff at school? She shacked her head and told me that she has never learnt something like we just did. As a computer scientist, her answer intrigued me and also made me curious about how informatics is taught in elementary schools. In particular, if children between 10 and 13 years old learn programming.

Why should be important to teach programming in elementary schools? Generally speaking,  computer programming is a purely intellectual activity that often requires reasoning and systematic thought — skills that can be easily translate to many other domains not directly connected with computers. Therefore, children’s analytic reasoning could be significantly  boost  by teaching them how to program regardless if they become professional programmers in the future. However, elementary schools seem to neglect such opportunity.

“It is not common to teach programming at elementary schools” says María Nelida Declerk, who has been an Argentinean teacher in informatics for 20 years.  Declerk emphasises that “New teachers do not know programming! Nowadays, lessons for children are oriented to play with the computer.” Declerk, different from other teachers, gives lessons on the LOGO programming language for students between fourth and sixth grade. She uses a version of LOGO that displays a turtle on the screen capable to move and draw lines with different colours. “It is impressive to see what students are capable of doing with LOGO. To command the turtle, children need to master four quadrants in Cartesian coordinates, while they have only seen one in the mathematics class! When introducing four quadrants, mathematics teachers note that children already master the concept and that is because they have been programming with LOGO!”

Book Basic for children (basic para niños) from 1984

As another indication that programming is not present in elementary schools, there seems to be a lack of books dedicated to teach programming to children. If fact, there seems to be only one recently published book in AmazonHello world! by Warren and Carter Sande, dedicated to teach programming to teenagers. Clearly, this situation is different from the one lived in the 80s, where there were several books written to teach programming to young students. As a 10 years old kid, I learned to program using a book with a sympathetic cartoon called Arturo (see picture), who was supposed to be of pedagogical importance for the young readers. The book covers several features of BASIC as printing on the screen, variables, inputs, branching, loops and comments. Surprisingly, these topics are also covered, with another intensity of course, by first informatics courses at certain universities. After studying 3 hours a week for two years, my class mates and me were able to finish the book. By then, we were modest BASIC programmers and only 11 years old.

I personally believe that one of the main reasons for not teaching programming at schools comes from the huge progress that informatics has been doing for the last 20 years. During the 80s, people needed to know the programming language BASIC in order to use home computers. Nowadays, computers provide beautiful and intuitive graphic interfaces that make easier to use them. I am not against progress. Nevertheless, I think that sometimes progress replaces some good traditions by not necessarily better ones.

Python LogoI consider that it is time to put programming as part of elementary schools’ agendas. However, to achieve that, there are several initial questions to answer. For example, what is the programming language that should be taught? What is the programming language that could play the same role as BASIC in the 80s? I personally believe that a good candidate for this task is Python. This programming language is very light-weight in syntax compared with other mainstream languages like C or Java. Children should not be distracted by remembering to place a semi-colon at the end of every instruction or to write the right class-hierarchy path in order to use a function. In addition to that, the dynamic features of Python make programs more compact and simpler, e.g. variable declarations or type signatures are not necessary. It would be also beneficial to rely on a good textbook to drive children’s  learning. Perhaps, adapting the contents of Basic for children for modern computers and the programming language Python is not a bad starting point. A simple and easy to learn programming language as well as a good textbook are a necessary combination to start pushing programming in elementary schools and benefit children from such a wonderful intellectual activity.

Separating the chaff from the wheat: PhD interviews

Appointing PhD student is not an easy task. For faculty members, a PhD student is an investment that it could last up to five years, where supervisors and students should share time and work together. For most of the announced  PhD position is usually the case that students send their grades, statement of intention, and recommendation letters to some determined committee for reviewing. The candidates that successfully pass all the filters imposed by the committee are usually invited for an interview. At that point, every candidate is worthy to pursue a PhD. The question is rather who is the best and more suitable person for the position.  This blog tries to give some tips based on my short experience interviewing PhD students for positions in Computer Science.

Nervers do mind It is natural and common that students are a bundle of nerves at the  interviews. The reasons for that could be several and diverse. For example, students could take planes from very remote countries just to have an interview with people that they do not know. Moreover, candidates do not usually have experience in how PhD interviews are carried out or what to expect. In this light, it is highly recommendable to break the ice before the interview. There could be several ways to do that: having lunch or dinner, going for drinks, or some informal activity between the candidates and some of the interviewers. The candidates would surely feel less nervous when seeing known faces.

Questions Asking the right questions is a key aspect for obtaining a good impression of  candidates’ intentions and capabilities. I hereby describe a few (non-exhaustive) questions that could lead to separate the chaff from the wheat in a 30 minutes interview.  These questions are taken from my short experience as an interviewer.

  • Do you have some ideas that you are proud of?
  • What is one of your favorite papers?
  • Why do you want to pursue a PhD?
  • What courses did you find exiting during your education?

There are many variables in play when performing an interview. Breaking the ice and carefully selecting the questions before hand could definitely help the candidates to give the change to show everything that they are capable of. Interviewers, on the other hand, could also get an honest impression of candidates’ skills and ambitions.