The Mongoliad: Book Three (Foreworld, #3)
![]() |
Review:A satisfying conclussion to this trilogy. |
![]() |
Review:A satisfying conclussion to this trilogy. |
Pasa siempre, como en todas las listas de programación, que de vez en cuando alguien postea en la lista de Python Argentina algo que es obviamente su tarea para el hogar. Para manejarlo hay dos escuelas de pensamiento:
Mostrarle como se hace es decirle como hacer trampa.
Mostrarle como se hace es enseñarle.
Yo me inclino más por 1) pero creo haber encontrado un camino intermedio:
1.5) Darle una solución más complicada que el problema.
De esa manera, si entiende la solución, ya hizo el trabajo. Y si no la entiende, va a ser tan obvio que no la entiende, que el profesor nunca le va a aceptar la respuesta.
Como ejemplo, este es el problema que presentaron en PyAr:
La lista viene desordenada y con dos caracteres (uno en minúscula y otro en mayúscula), por ejemplo:
['eD', 'fC', 'hC', 'iC', 'jD', 'bD', 'fH', 'mS', 'aS', 'mD']Para ordenarla debo seguir estas pautas:
Armar subconjuntos de acuerdo a la mayúscula y luego ordenar esos subconjuntos por la cantidad de miembros (en orden ascendente), la lista queda de la siguiente forma:
['fH', 'mS', 'aS', 'fC', 'hC', 'iC', 'jD', 'bD', 'eD', 'mD']Ahora cada subconjunto debe estar ordenado de manera ascendente y de acuerdo a la minúscula, con lo que la lista queda ordenada así:
['fH', 'aS', 'mS', 'fC', 'hC', 'iC', 'bD', 'eD', 'jD', 'mD']
Ignorando que el planteo es ambiguo (hay por lo menos dos maneras de leerlo, capaz que más), yo propuse esta solución, que requiere python 3:
from collections import defaultdict d1 = defaultdict(list) [d1[i[1]].append(i) for i in ['eD', 'fC', 'hC', 'iC', 'jD', 'bD', 'fH', 'mS', 'aS', 'mD']] {i: d1[i].sort() for i in d1} d2 = {len(d1[i]): d1[i] for i in d1} print([item for sublist in [d2[i] for i in sorted(d2.keys())] for item in sublist])
Produce el resultado deseado: ['fH', 'aS', 'mS', 'fC', 'hC', 'iC', 'bD', 'eD', 'jD', 'mD']
pero de una manera que para entenderlo, el alumno necesita saber mas de lo que requiere el
problema original, incluyendo tres o cuatro cosas que no creo que le hayan enseñado.
Ayer fuí (mucho más tarde de lo que hubiera querido) a ver Django Unchained. Aviso: Hay spoilers. Si no la viste, no sigas leyendo. Trato de llevarlos al final del post, pero no te quiero cagar la película. Ok?
I read all of it, one book after the other, and ended a month ago. And since then, I have had a couple of things about it bothering me. Let's see if they make some sense. Mind you, I am going to read volumes six and seven, because these books are addictive as crack in ebook-form.
But, just like crack, they have some worrisome features.
We are five books (and a couple of chapters) into it. It's supposed to be a seven book series. And nothing has happened. You may say a lot has, like "this character got killed" and "that other character got killed" (and a hundred other characters got killed), yeah.
But what has changed in the five kingdoms?
It's starting to feel, these many pages later, as if ... well, who cares what happens? The five kingdoms will have a king, or another. There will be dragons (which will support a king or another), there is war and everyone is having a crappy time, but hey, all that happened five times in the last hundred years or so already.
The hand of the king was killed? Well, so were five of the last seven hands.
A Targaryen may come, lay waste to all the armies of the realm and be crowned? Well, that already happened in the field of fire, and they had Targaryens for a while, until they ran out of dragons.
The Ironmen may conquer the north? Well, they already had conquered it a couple centuries ago, and then they lost it.
And so on: any of the payoffs of the book series has already happened, some of it more than once. So, what's special about this time around?
Does the author have a plan, something up his sleeve that's going to be a shock? I don't know, but the tricks are starting to get repetitive.
What would happen if, after seven books, it turns out that there's nothing special?
The five kingdoms. Scotland, England, Wales, Ireland and which one? Isle of Man? Because, come on. There's these people who are almost exactly Mongols, except they have bells in their hair. There's the pseudo-viking, the pseudo-scots, the ersatz-irish, the fake-italians, the I-can't-believe-it's-not-chinese and so on.
There are knights, whose armour is exactly medieval armour. There's the seafaring raiders, on their longships. Etcetera, etcetera, et-freaking-cetera. It's like whenever the author needs to add an "exotic" character, he just throws a dart at the map, then another, creates a mix 80% one, 20% the other, makes up some silly ortography rule for names, and that's it.
So, dragons. And of course, dragons create magic (you can see how lots of magical gizmos start working since the dragons came).
So, let's make magic everything. Want to have legendary swords? Then they are made of Valyrian steel. That's magical steel, which is why it seems to never need sharpening. That's why you can have family heirloom swords. Because they are magical.
And there's a magical door, made of magical wood. The magical wood comes, of course, from magical trees.
And there's fake magical swords, made by real eastern magic. And there's magical assassins. And magical coins, magical candles. And so on, and so forth. You can't paint yourself into corners when you can count on there being a magical paintbrush that lays down paint that doesn't stain the magical shoes of the painters of the magical land of Paintheria, whose names always have a double laryngeal consonant in the middle.
The first book manages to tell roughly a (earth) year of story. The fourth and fifth, together because they happen simultaneously, cover perhaps three months. And there are characters we have not seen since book three, when they were just about to say something. We are currently entering the third book waiting to know what the maiden of Tarth said at that moment.
There are books that are about one character, there are those that are about a dozen, there are those that are about one hundred. None of the latter is any good. The story keeps expanding and slowing down. At this step, all of book seven is going to be about a single day in the lifes of 50 first-person characters, and each one will describe their breakfast, before we unexpectedly get promised (very soon now) an eight book which will cover their post-breakfast craps and clear every question we may have had about the subject.
You, who know what was in the pies served in the feast at Winterfell in volume 5, you are being spoonfed that kind of thing to make you feel smart and knowledgeable. If you don't know what was in that pie... well, YOU MISSED IT.
And how is it a good idea to write three pages that (if you have a good memory) shout what was in that pie, when it's a story about a third-line and fourth-line characters whose names noone will remember?
Well, it's a good idea because it's fan service, and fans love being served. But it's a cynical, calculating move. You are being served bad pie there, fans.
They are awesome. I can't wait for the sixth volume. George RR Martin, here's my money. Tell me a story.
La semana pasada tomé una decisión que no me esperaba. Cerré los comentarios en este blog a menos que el post sea algo técnico. Lo hice porque no aguantaba algunos de los comentarios. Y dije "se van los comentarios por un mes, y después vemos si los extraño."
Bueno, sigo sin extrañarlos, como se darán cuenta porque este mismo post no tiene comentarios.
Hoy cierro los comentarios de la vida. Suspendí mi cuenta de twitter. Siguen saliendo algunas cosas que se postean automáticamente, pero no lo leo, y no recibo notificaciones de nada.
También es "twitter off por un mes, después vemos si lo extraño".
Ojalá que no.