You must create

Nov 14

Una idea para un juego que tuve hace nueve años:
“Locura combi 3D”

Una idea para un juego que tuve hace nueve años:
“Locura combi 3D”

Nov 11

Python ‟magic”

This has to be the magic-est Python code I’ve ever written. Didn’t know it was possible to inherit from classes created on the fly (awesome!).

https://gist.github.com/4055485

The code is for making some fields, in several tables, multi-language (I’m using SQLAlchemy). Instead of writing every time whatever_enwhatever_eswhatever_pt, etc. and a property(…)  but just changing the name of the field, it creates mixins dynamically. And adding a new language is just a simple change and a migration away.

Nov 03

Brick es la película clásica del detective curtido y solitario, la femme fatale que es amiga y enemiga, el bajo mundo y un asesinato misterioso por resolver. Solo que sus personajes son adolescentes en secundaria , pero quizas eso sea una gran metáfora de algo o una burla al género. 

Mírala con subtítulos, pues los diálogos pueden ser algo crípticos, hasta que imaginas al personaje principal – nadie menos que Joseph Gordon-Levitt — en gabardina y sombrero. Es una película extraña y fascinante.

Oct 21

The Zaarly Blog: The Paper Trail Behind Building the All New Zaarly -

zaarly:

Products can be built in many different ways. But, no matter what the process, usually the end goal is always the same. A simple, useful and meaningful product that people love.

We just released Zaarly 3.0. We wanted to share a few early sketches that we made on a favorite iPad app of ours,

Oct 15

Crossover

Crossover

(Source: sherlocksscarf221b)

Oct 04

The art of getting stuff done without bossing around -


Sep 26

littlebigdetails:

Google Flight Search Results - On mobile, Google flight status results include an airplane placed on a line at a point relative to its flight progress. Color communicates whether the flight is on time or not.
/via Erin Olmon

Me gusta

littlebigdetails:

Google Flight Search Results - On mobile, Google flight status results include an airplane placed on a line at a point relative to its flight progress. Color communicates whether the flight is on time or not.

/via Erin Olmon

Me gusta

Sep 25

memosfromfury:

[Submitted by: Jojo
J.A.R.V.I.S. is Mr. Stark’s personal AI. He is not:
property of S.H.I.E.L.D.
the offspring of H.A.L. 9000 and GLaDOS
an invisible man duct-taped to the ceiling
“freeware, “shareware”, or “available for both iPad and iPod Touch”
an alternative to Google
watching you sleep (or shower, or anything else)
where the party is at
Furthermore, Mr. Stark is not allowed to reprimand agents by claiming they “hurt J.A.R.V.I.S.’s feelings” and/or coercing them into apologizing to the AI.]

memosfromfury:

[Submitted by: Jojo

J.A.R.V.I.S. is Mr. Stark’s personal AI. He is not:

Furthermore, Mr. Stark is not allowed to reprimand agents by claiming they “hurt J.A.R.V.I.S.’s feelings” and/or coercing them into apologizing to the AI.]

(via eruntale)

Aug 19

Why does Thor and Loki speak our language?

They don’t. They hear and talk in AllSpeak. 

Everybody can understand the Allspeak, although their brains mistakenly confuse it with old English (or whatever language they normally speak).

Aug 14

Nobody wants to read your shit. Nobody–not even your dog or your mother–has the slightest interest in your one-act play, your Facebook page or your new sesame chicken joint.

It isn’t that people are mean or cruel. They’re just busy.

” — http://www.stevenpressfield.com/2009/10/writing-wednesdays-2-the-most-important-writing-lession-i-ever-learned/

Aug 09

Left to its own devices, the mob will augment, accessorize, spam, degrade and noisify whatever they have access to, until it loses beauty and function and becomes something else.

Designers prune.

” — Seth Godin

Migraciones (de bases de datos)

Detesto todas las soluciones en Python para migrar esquemas de bases de datos. Todas parecen exigir configuraciones paralelas a la aplicación, exigen que nadie más toque la BD y/o necesitan comandos verbosos que interrumpen el flujo de trabajo.

La solución más limpia, “South”, es más controladora que la “novia loca”, borra columnas para cambiar su tipo de dato y además que solo puedes usarla con Django (y yo uso SQLAlchemy).

Así que, después de pensarlo unos días, aquí les presento como debería funcionar mi solución de migraciones ideal:

  1. Las migraciones solo existen para actualizar el esquema de la base de datos a su última versión. Esto significa que:

  2. Un solo comando (por ejemplo python manage.py syncdb) crea las tablas faltantes, compara el esquema guaradado con el de la base de datos, aplica las migraciones necesarias y genera nuevas migraciones si se ha cambiado algo (y si algo no está claro, te pregunta).

  3. Las migraciones son scripts generados automáticamente comparando el esquema actual con el de la base de datos. Pueden editarse manualmente de ser necesario. El nombre de estos scripts tiene la forma: 20120809T200416_nombre_de_la_migracion.py donde la primera parte es la fecha y hora en que se genera la migración, y la segunda es un nombre opcional. Estos archivos se suben al control de versiones.

  4. Las migraciones crean tablas automáticamente (antes de aplicar otros cambios), si es que existen en el esquema declarado pero no en la base de datos.

  5. Las migraciones no borran o cambian el nombre a tablas, por si se está compartiendo la base de datos con otra aplicación. Si se quiere hacer eso, puede ejecutarse un comando específico, editar manualmente el script de migración, o diréctamente editar la base de datos.

  6. Si se cambia el tipo de datos de una columna — por ejemplo de VARCHAR(255) aVARCHAR(100) — se supone que la data guardada en ella es compatible con este nuevo tipo de datos. De no ser así, deberá editarse el script de migración para modificarla antes de hacer el cambio.

  7. Solo un programador a la vez puede generar migraciones. Es decir que en un equipo se debe coordinar para no generar migraciones conflictivas. Como están ordenadas por fecha, la última será la que prevalezca, pero si no se tiene cuidado, hay casos en que simplemente fallarán (intentando modificar una columna que ha sido borrada, por ejemplo).

  8. La fecha-hora de la última migración aplicada se guarda en cada base de datos en una tabla schema_migration con una sola fila y una única columna llamada version.

  9. Los scripts de migración son generados en un lenguaje como Python en vez de SQL (aunque podría haber facilidades para general código SQL específico a partir de ellos). Usan funciones de alto nivel como add_column o rename_index y un ORM, por lo que, salvo excepciones, son independientes del motor de la base da datos: no importa si se usa SQLite para desarrollo y PostgreSQL en producción.

¿Que opinas? ¿Te gustaría que existiera o piensas que es una abominación de la naturaleza? ¡Escríbeme y dime que piensas! A juanpablo (@) jpscaletti.com o por el Twitter.

Beliefs -


Don’t believe everything you hear.
You will by default. It takes a lot of effort to un-believe it once you hear it.

Don’t believe everything you think.You already do. That’s why you think it. It takes a lot of effort to un-believe it once you think it. Many thoughts are demonstrably false, yet we have them anyway.

Don’t believe you know everything you think you know.You already do. That’s why you think you know it. You have to not just un-believe it, but un-know it.

Beliefs are sneaky.Beliefs don’t look like beliefs; they just look like the world. When you’re in the kitchen, you don’t say “I believe I am in the kitchen”. You say, “I am in the kitchen.” Un-believing is like un-seeing.

Don’t believe everything you say.This is the hardest of all. Our past selves hold our integrity hostage. Do not negotiate with terrorists. Shoot the hostage.

Every belief must pay rent, constantly, or be evicted.

I don’t believe in any of this… or maybe I do.

Jun 18

TodoMVC -

Si te has asomado por necesidad o curiosidad a intentar aplcar el modelo MVC (o MVMV) a JavaScript descubriste que no solo existe Backbone entre las opciones. TodoMVC intenta aclarar el panorma mostrándote *el mismo* programa (un “ToDo”) en cada una de las frameworks más conocidas.