all posts | tags | all posts, latest updates first | latest comments

El autor es el profesor Luis Miguel Bermúdez, quien recientemente ha recibido varios reconocimientos a su trabajo como docente en un colegio distrital de Bogotá, en particular en lo relacionado con educación sexual.

En el libro cuenta en primer lugar cómo fue su experiencia personal con la educación sexual, tanto en el colegio como en el hogar, y luego en la universidad, con la ventaja adicional de poder analizar, en retrospectiva, qué tipo de educación era, qué enfoques tenía (de moralista, a puramente biológico, a enfocado a prevención de ETSs), y de qué cosas carecía (hablar acerca del componente afectivo, del componente erótico). Menciona también un evento a primera vista fortuito, pero que tuvo bastante impacto en su carrera: tener acceso en su adolescencia a un ejemplar de La sexualidad humana, de Masters y Johnson.

Otra de las secciones del libro presenta su trabajo en el colegio Gerardo Paredes, específicamente la construcción del plan curricular para la clase de educación sexual, para los distintos cursos. Una de las ideas centrales de esa construcción fue involucrar a los estudiantes, identificar cuáles son sus dudas y necesidades. También fue una de las principales dificultades, por la desconfianza que los estudiantes tienen de los los adultos como fuente de información, en lo que tiene que ver con sexo.

Fue muy interesante ver el análisis de esos problemas iniciales, ver de dónde viene esa desconfianza, y luego ver el resultado del proceso, para los distintos cursos/grupos etáreos:

Para adolescentes, la virginidad, la pornografía, dudas acerca de distintas prácticas sexuales, planificación/anticoncepción, y la dimensión erótica del sexo en general.

Para niños en bachillerato (grados octavo hacia abajo), la temática está alrededor del auto-descubrimiento, la masturbación, los cambios en el cuerpo debidos a la pubertad. Y también, identifica en esa exploración que debe incluir la temática del abuso sexual.

En primaria el foco está en desaprender muchas de las violencias de género/estereotipos/discriminación que adquirimos básicamente como parte de nuestra cultura, sin ser realmente conscientes de ello.

Complementando esas secciones más «estructuradas» del libro, hay varias otras con anécdotas, casos de estudiantes particulares y cómo ponen a prueba la capacidad del profesor, y del colegio, para afrontar los imprevistos/situaciones tan sorprendentes en las que terminan involucrados, y otras misceláneas pero no por eso menos interesantes, como examinar el concepto de clase/riqueza/pobreza que tienen los estudiantes, y hacer que reflexionen sobre ello.


Es un muy buen libro, y se lee fácil y rápido ---lo leí en una noche---. Mi única crítica va al estilo/edición del libro; tiene uno que otro gazapo (nada inesperado), pero en donde siento que de verdad faltó trabajo adicional fue en tener voces/personas consistentes en las distintas secciones del libro: en ocasiones habla el profesor en primera persona, en ocasiones el texto se estructura como diálogo, en otras ocasiones en tercera persona. Pero es un detalle menor, y no afecta el contenido/legilibidad/mensaje.

Muy recomendado.

Posted Tue Apr 9 19:01:30 2019 Tags:

Code style

This is an idea I noticed in a response at a tweet from @garybernhardt.

Indenting with tabs, spaces, two or four spaces, where do you place the opening/closing braces, how do you break long lines, whether you place spaces or not around operators, and in which contexts, how many white lines you place between class declarations, all of those things, should be irrelevant. All of those are just visual aids, which:

  • Should not show up in your diffs, when you are reviewing a pull request from somebody.
  • They should be ignored by your version control system; any commit that merely changes whitespace/formatting is a non-change, since nothing changes functionally.
  • You should be able to tell your IDE how you want to look at the code, what code style you want to use. Yet that should not provoke/show up as a change (a commit) in your VCS.

Files

Your IDE should take care of creating/naming files. It should also take care of where to put the things you create as a programmer: globals, functions, classes, modules, etc.

Ideally, your only responsibility should be telling your IDE what's your module structure. It should deal with the rest.

Also, your VCS should stop caring about files. We don't need to know that 'a file was renamed', we also don't need to know that 'a function was moved from this file to that file', if it didn't change.

But, 'a function was moved from this module to this other module' is something I do care about. As I also care about 'all the changes made to this single function'. Perhaps the VCS should version not files, but a standarised, machine friendly, machine-diffable version of the code we write. The IDE, or your VCS should know how to generate those for you, automatically. Possibly the IDE would be a better fit, and the VCS should just be considered a dumb storage, versioning a standarized representation of the code generated by the IDE.

Code analysis

Before, and mostly because of this article from Joel Spolsky, and my own experience as a reviewer, I tried to avoid exceptions, and preferred error codes, because error codes:

  • Are visible to the reader.
  • Their handling (or lack of thereof) is visible to the reader.

Because of that, you don't have to zip around your whole codebase when reading some piece of code in order to check whether a method throws an exception or not, and the opposite situation, to check all of the places where an exception is handled, and figure out which one of those is the one calling the function you are reading right now.

Writing exception-based code does give you clean code, with centralized/localized handling of errors (when used properly). You basically end up with the code that handles the happy path, in a single place, and code for handling the possible errors, somewhere else, wherever the exceptions that might be raised are handled. But, that code is awfully hard to read with our current tools, because all of that error handling is littered over so many different files/places in your project, many times even with no obvious connection of how to get it, because many "final" exception handlers (like, for example, DRF's custom exception handlers) are defined dynamically, just by putting a class name in a string in a settings file somewhere... you will not find them by just following the call chain, when reading the code.

But, that is a limitation from our current development tools, nothing more. All in all, I think exception-based code is better than error-status-based code, fundamentally because a dead program is better than a limping program, and exceptions guarantee you that if you did not handle them, your program crashes, (and you get to see the stacktrace of when it crashed) instead of carrying on with God-knows-what you get after something fails and somebody didn't handle that error code properly.

As for reading exception-based code, I wish I was able to ask to my IDE to:

  • Show me what non-runtime exceptions a given function raises, which is of course the aggregate of whatever exceptions it, or its callees, raise. (This is one of the things that I think Java got right, the compiler tells you that, and the language has the concept of runtime errors and business-logic-related exceptions, ...)
  • Show me the call tree of a given function: who calls it, who calls its caller(s), and so on and so forth until hitting either main or whatever is the boundary for the framework I'm using: e.g., a Rails controller, a Django view, etc.
  • Show me all of the places where a given exception (or its ancestors) is handled. And show that somehow in the call tree.

Also related, and occasionally useful, is being able to see the (for lack of a better name) reverse call tree of a function: which functions it calls, which functions those functions call, and so on and so forth. Of course skipping (optionally) the core language/framework stuff.

When analyzing a function, it would also be nice to be able to ask the IDE to show you the dependencies of a variable: where has it been changed in the current function so far (something function-aware, not just a find-in-file), and which other variables/expressions are used to calculate this variable.

Testing

Somewhat related to the code analysis section; I should be able to modify something in the codebase, and have my IDE to run only the affected tests, and no others. The IDE should figure out where what I modified is tested, maybe from coverage information from previous test runs/static analysis/whatever.

Posted Tue Mar 12 21:54:35 2019 Tags:

Un par de veces terminé metido en restaurantes costosos, en donde la comida era tan maluca, el servicio tan malo, y todo tan caro, que no podía atribuir la experiencia sencillamente a la mediocridad y pereza de los involucrados; no, era tan absurda la situación, que me hacía pensar en una broma práctica: «están haciendo esto a propósito, es un experimento social, a ver qué tantas estupideces tolera la gente, antes de mandarlos a la porra, a ver cómo racionalizan gastarse tanta plata en algo a todas luces malo». La versión consumista del experimento de Milgram.

Leer este libro de Amelie Nothomb se sintió igual a estar en uno de esos restaurantes.

posdata: incluso comprar el libro hizo parte de la experiencia. En la librería fuimos asaltados por una artista en una exposición de su obra allí, que quería convencernos de comprar sus manteles floridos manchados de pintura por cinco millones de pesos la unidad.

Pensé que me gustaba uno de sus trabajos, hasta que noté que estaba mirando el estampado de la tela que ella usó como lienzo...

Posted Tue Oct 2 21:54:57 2018 Tags:

This is a novel about first contact with another sentient species, the Moties. I ended up reading it because of this handy chart that helps your choose which popular sci-fi book you should read.

Overall I liked the book. I miiiiight re-read it. Not great, but a good read.

This alien race has some rather interesting features ---although maybe constraints is a better word for some--, some of them not really believable, but nothing that makes the book inedible. Things like the mechanics of travelling between star systems of this universe are quite interesting. Even more so is the depiction of the politics of that first contact: deciding what you want the other race to see, what don't, why do or do not, and how to get your population to play along with the charade; in the book you get to see that from both the Motie and the human side. Also, the plot twists are really really good: unexpected, yet congruent with the story.

But, the thing I liked the most was the discussion of a particular aspect (I would dare say central) of the Motie's psychology: Crazy Eddie.

For a variety of reasons, hope is something the Moties feel very rarely, and express even less. It is not frowned upon, but at least is considered very weird/unusual by them.

So, when the Moties talk about certain things, like their sending a hibernating Motie in a space probe to the nearest habitable star system (which they suspect is inhabited, and actually is, by humans), in a trip of hundreds of years, in order to establish contact, or about that particular point in space in their star system which might allow them to travel instantaneously to the closest star, but from which none of their ships has ever returned (because the endpoint for that trip lies inside the closest star, and their ships are immediately destroyed upon arrival), they refer to those things not with adjectives (such as hopeful), but reaching for an archetypal Motie they call "Crazy Eddie", who in their stories is prone to that kind of behaviour. So you have the Crazy Eddie probe, the Crazy Eddie point, etc.

They also say that about plans, ideas, and even certain Moties: that's Crazy Eddie, he's Crazy Eddie, they are Crazy Eddie. But humans are also Crazy Eddie, all of them.

It's only after seeing many times how the Moties use the expression "Crazy Eddie" that it dawns upon you they are talking about hope. Regardless of all their technology, advanced social and intellectual capabilities, they are not given to attempt things based (to a large extent) on hope. To feel/believe something that (quoting from Wikipedia) "serves as a promise or reason for expecting a better future".

Their biology forces them to live an eternal cycle of development, overpopulation, and catastrophic war; you can't really blame them for not expecting a better future, and for mocking those who do, and labelling them and their ideas "Crazy Eddie". That's what I liked the most from the book: learning how they feel about hope by the very absence of that concept in their language, and watching them getting "infected" by hope from the visiting humans that interact with them.

Just as as side note, in this universe, the Russians and the Americans seem to have ended the Cold War not by attrition, but by joining forces/becoming a single government. I don't remember if the authors explain that explicitly in the book, but it becomes quite obvious when you see characters with last names like Kutuzov, and when you see spaceships called MacArthur or Lenin.

Posted Sun Nov 12 18:24:26 2017 Tags:

Un abogado desempleado es abandonado por su gato, y poco después por su esposa.

Después de un tiempo al abogado le sale una mancha enorme en la mejilla, y encuentra trabajo permitiendo que riquillos laman su mancha hasta inducirle un orgasmo.

Con los ingresos que obtiene de su peculiar ocupación, consigue comprar un terreno con un pozo seco, que usa para conectarse al Internet de los Espíritus (TM), en donde pasa la mayor parte de su tiempo buscando a (el avatar de) su malvado cuñado (responsable del abandono de su esposa) en ese mundo virtual.

El abogado logra provocarle un ataque (cardiaco/cerebral/no recuerdo) a su malvado cuñado, a través de sus acciones en el Internet de los Espíritus (TM). Luego de esto, su esposa asesina a su hermano en el hospital (al vegetal que quedó luego del ataque sufrido a «manos» del abogado), y va a prisión. El abogado espera su regreso.

La mancha en la cara del abogado desaparece después de atacar a su malvado cuñado, quedando así desempleado de nuevo.

...

Un poco más en serio, en el libro hay descripciones bellísimas de la soledad del abogado.

Posted Tue Oct 10 20:49:31 2017 Tags:

The book was kind of meh. The British aristocracy was deposed by the "intellectual class" (thanks to the development of the Analytical Engine), and the former aristocrats plot to take their position back. In this version of history, the British Empire is stronger than the original one; it ended up allied (kinda) with the French Empire, and so America is more of a mess, with colonies, and small republics here and there. But none of that really makes a difference because everything happens in London/Paris. I did not really "feel" anything different because of that early development.

The characters chase one another trying to acquire the book's MacGuffin, a set of punched cards (apparently written by Ada Lovelace) containing what might be either:

  • The perfect mathematical/statistical model for placing bets (the Modus).
  • A computer virus, possibly the first of its kind.
  • An example program demonstrating/exemplifying the Incompleteness Theorem, discovered in the 19th century thanks to the early development of computing.

This happens in three sort-of-related stories, each with its own main character, each dealing in some way with the mess created by the punched cards, or the people trying to acquire them for $WHATEVER_REASON.

However, the book made me curious about some things. So.

Things I learned thanks to the book (or, more exactly, wikipedia pages I read because of it):

Finally, what is it with William Gibson? Does he have to have a computer becoming sentient in every one of his books? Meh.

Posted Wed Sep 6 22:15:58 2017 Tags:

Having a way of importing a single class/function into the current file/module:

# ---------- A.py -------------
class MyClass:
    ...

def my_func():
    ...

# ---------- B.py -------------
from A import my_func

my_func()

The language support for named arguments, and variable number of arguments, specially when calling functions with many arguments:

def my_func(a, b, c=2):
    print(a, b, c)

my_func(0, 1, 3)
# 0 1 3

my_func(0, 1)
# 0 1 2

my_func(0, b=2, c=4)
# 0 2 4

my_func(b=2, c=4, a=0)
# 0 2 4

The awareness in the community (and by extension in the documentation and other online resources) about how to handle bytes vs. strings in your program. Precious little other languages take care of talking about this.

The handling of negative indexes for lists, and the range() method for generating sequences. Some other languages have syntax for ranges, but they end up being either more limited, or unfriendly in non-standard situations (I'm looking at you and your handling of negative endpoints in ranges, Elixir.)

Also, IPython, and its automatic module reloading.

Posted Thu Jun 22 21:24:02 2017 Tags:

You cannot behave like a militant atheist all the time. The idea of God/Gods/the supernatural is important to most of us, because you can find strength, relief, resolution, even joy in it. In the most intense times of your life, it helps you cope with the magnitude of reality. So don't be an asshole to people who believe in some God. They need the idea. You might need it, only you haven't been unfortunate enough to ending up there (or fortunate enough, some might say).

As Regina Spektor puts it:

No one laughs at God in a hospital
No one laughs at God in a war
No one's laughing at God when they're starving or freezing or so very poor
No one laughs at God when the doctor calls after some routine tests
No one's laughing at God
When it's gotten real late and their kid's not back from the party yet
No one laughs at God when their airplane start to uncontrollably shake
No one's laughing at God
When they see the one they love, hand in hand with someone else
And they hope that they're mistaken
No one laughs at God
When the cops knock on their door and they say we got some bad news, sir
No one's laughing at God when there's a famine or fire or flood
But God can be funny
At a cocktail party when listening to a good God-themed joke, or
Or when the crazies say He hates us
And they get so red in the head you think they're 'bout to choke
God can be funny
When told he'll give you money if you just pray the right way
And when presented like a genie who does magic like Houdini
Or grants wishes like Jiminy Cricket and Santa Claus
God can be so hilarious, ha ha
Ha ha
No one laughs at God in a hospital
No one laughs at God in a war
No one's laughing at God
When they've lost all they've got and they don't know what for
No one laughs at God on the day they realize
That the last sight they'll ever see is a pair of hateful eyes
No one's laughing at God when they're saying their goodbyes
But God can be funny
At a cocktail party when listening to a good God-themed joke, or
Or when the crazies say He hates us
And they get so red in the head you think they're 'bout to choke
God can be funny
When told he'll give you money if you just pray the right way
And when presented like a genie who does magic like Houdini
Or grants wishes like Jiminy Cricket and Santa Claus
God can be so hilarious
No one laughs at God in a hospital
No one laughs at God in a war
No one laughs at God in a hospital
No one laughs at God in a war
No one laughing at God in hospital
No one's laughing at God in a war
No one's laughing at God when they're starving or freezing or so very poor
No one's laughing at God
No one's laughing at God
No one's laughing at God, we're all laughing with God

Religion might be valuable as a personal thing. As a social/public institution, it must be destroyed. We are long past due realizing that we don't need it to define our ethics/moral, that the state is now (must be) capable of providing all the social services associated to its institutions in the past, and that we are better off without those potential (and many times actual) nurseries of fascism.

We need to be done with those creepy groups of people that already know what's good and proper for everybody and will ram their ideas of the world down all of our throats.

As Regina Spektor puts it:

you know that statue
that statue of baby jesus
in the window
in the window of the 99 cent store
last night I saw the owner kiss it
and whisper in its ear
I was walking home from walgreen's
and he did not hear me see him
and on the
very very next morning
all the subway cars were hallelu-leluing
welcome back the baby king, the baby king
all the believers they were smiling
and winking at each other
I could honestly say I was scared for my life
they said, all the non-believers they get to eat dirt
and the believers get to spit on their graves...
you know that statue
that statue of baby jesus
in the window
in the window of the 99 cent store
they've been showing it on the news
it was thirty times its size
with a megaphone and a heart-shaped bruise
it was hovering in the skies
and all the
subway cars were hallelu-lelu-leluing, hallejuah
welcome back the baby king, the baby king
all the believers they were smiling
and winking at each other
I could honestly say I was scared for my life
they said, all the non-believers they get to eat dirt
and the believers get to spit on their graves...
believe!...
you know that statue
that statue of baby jesus
in the window
in the window of the 99 cent store
when I woke up I ran and bought it
and locked it in my closet
with a little bread and water
and a flashlight and a first aid kit til he grows

(Comments? email me! jerojasro AT devnull.li)

Posted Wed Nov 30 23:29:30 2016 Tags:

One of the things that always baffled me from Asimov's "Robot" series, was: if the robot's ultimate goal is to look after mankind's welfare, why don't they take care of the scientific research? Why do they rely on humans for that? After all, they are sentient, can read minds, have far more speed and processing power than any human.

In Asimov's universe, even though the robots know that scientific progress is useful for the preservation of mankind, they always rely on third parties (meatbags) for research, and coming up with new developments.

After finishing "The End of Eternity", I kind of suspect why things are like that for him:

"The greatest good?" asked Noys in a detached tone that seemed to make a mockery of the phrase. "What is that? Your machines tell you. Your Computaplexes. But who adjusts the machines and tells them what to weigh in the balance? The machines do not solve problems with greater insight than men do, only faster. Only faster!"

I can't say I wholly agree with him; I suspect things will change in the future. But, at least today, he's absolutely right. As long as we use computers only as minions to carry out our exquisitely specified desires, we won't have anything better than a fancier/faster/dumber human.

Posted Tue Jul 8 14:11:43 2014
A/B
He stood upon the last
Bastions of the place
Looked out on the ruins
With thunder in his face
An introverted spectacle
In the flowers on the rocks
The daisies on the ramparts
Blowing free
His heart was divided
Clouds gathered in the sky
The belfry made of wood and steel
Was silenced in it’s cry
Something must have happened
What, he wouldn’t say
But shown within
The wider lens of history
[Chorus:]
His mission the transmission
Of technology
One cannon trained upon the church
This one caught his eye
“to keep the bishop in his place”
He muttered with a sigh
His mood was melancholy
His attitude severe
His inner burden
Weighed upon him mightily
A bird as never seen in books
Flew in overhead
A kind of dove it might have been
But not a sound was said
All the ancient knowledge lay
In pieces on the ground
The cause of all his suffering
Was not for love of me.
[Chorus:]
His mission the transmission
Of technology

Compare with:

You say you love me but you never beep me
You always promise but you never date me
I try to fax but it's busy, always
I try the network but you crash the gateways
You never spend your nights with me
You don't go out with other girls either
You only love your collider
I fill you screen with hearts and roses
I fill your mail file with lovely phrases
They all come back: "invalid user"
You never let me into your computer
You never spend your nights with me
You don't go out with other girls either
You prefer your collider
I gave you a golden ring to show you my love
You went to stick it in a printed circuit
To fix a voltage leak in your collector
You plug my feelings into your detector
You never spend your nights with me
You don't go out with other girls either
You prefer your collider
You only love your collider
Your collider.
Posted Tue Jul 8 13:56:41 2014