I just saw this on a place I won't bother linking:
This october has 5 fridays, 5 saturdays and 5 sundays. This
happens only every 823 years. And I am grounded all month!
Really, it's not worth linking to because it's everywhere
There are variations, of course, 5 sunday/monday/tuesdays, different months, etc.
But why are people falling for that? I mean, it's pretty obvious if you think 2 minutes that there's no way it can be true!
The length of october is fixed (31 days).
Since weeks are 7 days, you have 4 weeks + 3 days in october.
If october starts on a friday, those last three days are
going to be friday/saturday/sunday.
So, for this thing to be true, October 1st would have to be a friday only once every 823 years. Sounds pretty stupid when you say it that way, right?
I really have no idea how anyone with half a brain can fall for it, but I have seen people I know have a functional cortex do it. Comments encouraged :-)
This is a spanish-only post, it makes no sense for any english-readers: it's about how to buy electronics in Argentina.
Intro
Ser un nerd en Argentina tiene muchos problemas. Uno de ellos es que los
precios que nos quieren cobrar por casi cualquier chiche electrónico
es ridículo.
Otro de los problemas es que el 99% de la gente no sabe como hacer para
que no les afanen de esa manera. Y ojo, no hablo de contrabandear, hablo
de usar tus derechos y tus recursos legales. Aclaro: no soy abogado,
si siguiendo estos consejos vas preso, es cosa tuya, yo digo lo que creo que está bien nomás.
Así que estimados lectores, acá está mi guía para comprar chiches sin
tener que empeñar un riñón (que también es ilegal, ya que estamos).
Lo primero que necesitás es paciencia. Algunos de los mecanismos que te
voy a contar llevan uno o dos meses, o requieren colaboración de
terceros. Pero bueno, somos nerds, resolver problemas es lo nuestro.
Chucherías Chinas
Tengo un bonito microscopio de bolsillo de 80x que me compró mi esposa. Costo?
$90. Es un juguete buenísimo, re educativo, y cuando tenía 6 años hubiera
dado la figurita difícil (era la tarántula) por uno de estos.
O sea, la mitad. Y como sale menos de U$S 25, de hecho es legal traerlo por correo
y no pagás tasa de aduana.
De todas formas, probablemente no tengas que ir a la aduana porque....
Pero ponéle que pagás la tasa. Con tasa y todo, son U$S 15, o sea $60.
Si pasás por la aduana a veces y no te molesta hacer cola un rato
(llevate un libro)....
Pero es aún mejor. Porque en http://DealExtreme.com tenés un modelo de 150x por U$S 12!
De hecho, tenés 36 modelos de microscopios!
Por ejemplo, en http://alibaba.com hay algo así como 35000 vendedores de tablets
con Android. Alguna te va a servir ;-)
Ahora bien, supongamos que te decidiste y te encargaste algo de China o similar,
qué tenés que saber:
Guardá la "factura" que te dá el sitio, y la URL del producto.
La factura suele ser un HTML, imprimílo. Cuando retirás en Aduana lo
necesitás. No lo muestres de entrada! Sólo si te lo piden.
Andá dispuesto a pagar. Es al cuete discutir. Tené en cuenta que aún con
lo de la aduana es barato, y no te hagas mala sangre.
Si vas tipo 10:30 suele haber poca gente.
Andá tranquilo, llevate algo para entretenerte porque en una de esas lleva
un rato. Igual hay sillas, que se yó, no es la muerte de nadie.
Cómo Pagar
La más fácil es PayPal. Si tenés tarjeta de crédito es trivial.
El amigo que viene de afuera
Sí tenés un conocido que viaja al exterior con regularidad:
Podés comprar en USA y que te reciba y traiga las cosas.
Hasta U$S 300 (si el que viaja es argentino) no se paga aduana. Se paga el
50% por encima de esa cifra.
Si es un extranjero que trae una cosa propia "en uso" y te la vende acá,
no creo que tengas que pagar importación (no estoy seguro)
Veamos un ejemplo!
Una HP mini comprada acá: $1999, o U$S 500
Comprada en USA: U$S 329.
Pagando aduana con franquicia: U$S 345
Pagando aduana full: U$S 495 (ahí no conviene ;-)
Pero que te parecería tener la misma netbook por U$S 180?
Bueno, resulta que HP (y todas las empresas) venden productos
"refurbished" o sea reacondicionados. Normalmente no te vas a dar cuenta
de nada, tienen un rayón mínimo, o algo así. Hoy la misma netbook estaba a
U$S 179.90. Normalmente salen más o menos la mitad. Y vienen con garantía.
Y fijáte que la HP mini por U$S 180, pagando la aduana full... cuesta el 54%
de lo que sale la nueva acá. Eso es negocio.
Alternativamente, Ciudad del Este (Paraguay) está muy cerca de Argentina.
Y es muy barato comprar electrónicos ahí. Y tenés los U$S 300 de franquicia.
Pero hay más! Un ciudadano paraguayo que visita argentina puede traer ciertas
cosas con ciertos límites. Hay que hablar con él y coordinar!
Si no conocés a nadie... bueno, andá de paseo a cataratas! Pasala bien! Y comprate
una cámara o lo que sea en la excursión a Ciudad del Este.
Accesorios
No compres accesorios originales. Por ejemplo: la batería original de
repuesto de mi eeePC 701? U$S 110, 3 elementos. La "trucha" de 6 elementos? U$S 40.
Conclusión
Ojalá sirva de algo, si tenés más tips ponelos en los comentarios!
That a plugin architecture for a complex app is a good idea is one of
those things that most people kinda agree on. One thing we don't
quite agree is how the heck are we going to make out app modular?
One way to do it (if you are coding python) is using Yapsy.
Yapsy is awesome. Also, yapsy is a bit underdocumented. Let's see
if this post fixes that a bit and leaves just the awesome.
Update: I had not seen the new Yapsy docs, released a few days ago. They are much better than what was there before :-)
Here's the general idea behind yapsy:
You create a Plugin Manager that can find and load plugins from a list
of places (for example, from ["/usr/share/appname/plugins",
"~/.appname/plugins"]).
A plugin category is a class.
There is a mapping between category names and category classes.
A plugin is a module and a metadata file. The module defines a
class that inherits from a category class, and belongs to that
category.
The metadata file has stuff like the plugin's name, description,
URL, version, etc.
One of the great things about Yapsy is that it doesn't specify too much.
A plugin will be just a python object, you can put whatever you want there,
or you can narrow it down by specifying the category class.
In fact, the way I have been doing the category classes is:
Start with an empty class
Implement two plugins of that category
If there is a chunk that's much alike in both, move it into
the category class.
But trust me, this will all be clearer with an example :-)
I will be doing it with a graphical PyQt app, but Yapsy works just as
well for headless of CLI apps.
Let's start with a simple app: an HTML editor with a preview widget.
A simple editor with preview
Here's the code for the app, which is really simple (it doesn't save or do
anything, really, it's just an example):
But this application has an obvious limit: you have to type HTML in it. Why not
type python code in it and have it convert to HTML for display? Or Wiki markup,
or restructured text?
You could, in principle, just implement all those modes, but then you are assuming
the responsability of supporting every thing-that-can-be-turned-into-HTML. Your
app would be a monolith. That's where yapsy enters the scene.
So, let's create a plugin category, called "Formatter" which takes plain
text and returns HTML. Then we add stuff in the UI so the user can choose what
formatter he wants, and implement two of those.
Here's our plugin category class:
Of course what good is a plugin architecture without any plugins for it? So,
let's create two plugins.
First: a plugin that takes python code and returns HTML, thanks to pygments.
See how it goes into a plugins folder? Later on we will tell yapsy to search
there for plugins.
To be recognized as a plugin, it needs a metadata file, too:
And really, that's all there is to making a plugin. Here's another one
for comparison, which uses docutils to format reStructured Text:
And here they are in action:
reSt mode
Python mode
Of course using categories you can do things like a "Tools" category, where the
plugins get added to a Tools menu, too.
And here's the application code:
In short: this is easy to do, and it leads to fixing your application's internal
structure, so it helps you write better code.