Posts about nerdness

Creating a forum the easy way (32 LOC)

This is only the first part of a project to create the simplest (for me) software forum possible.

Here are the features I want:

  • Login using twitter / Facebook / Google / OpenID
  • Unlimited number of threads
  • Support for like / dislike both on threads and on posts
  • Avatars
  • HTML in comments
  • Mail the user on replies
  • RSS feeds for threads

You can see it in action at http://foro.netmanagers.com.ar (for a limited time only ;-)

And here is the code:

import bottle
import disqusapi as disqus
import json
shortname = 'magicmisteryforum'
api = disqus.DisqusAPI(open("key").read().strip())

@bottle.route('/', method='GET')
def index():
    msg = bottle.request.GET.get('msg', '')
    threads = api.forums.listThreads(forum=shortname, limit=100)
    print threads[0]
    return bottle.template('main.tpl', threads=threads, shortname=shortname, msg=msg)

@bottle.route('/new', method='POST')
def new():
    title = bottle.request.forms.get('title', None)
    if not title:
        bottle.redirect('/?msg=Missing%20Thread%20Name')
        return
    thread = api.threads.create(forum=shortname, title = title)
    thread_id = thread.__dict__['response']['id']
    # Redirecting to /thread/thread_id doesn't work
    # because threads take a few seconds to appear on the listing
    bottle.redirect('/')

@bottle.route('/thread/:id')
def thread(id):
    t = api.threads.details(thread=id)
    return bottle.template('thread.tpl', shortname=shortname, id=id, thread=t.__dict__['response'])

@bottle.route('/static/:path#.+#')
def server_static(path):
    return bottle.static_file(path, root='./static')

app = bottle.app()
app.catchall = False #Now most exceptions are re-raised within bottle.
bottle.run(host='184.82.108.14', port=80, app=app)

It requires Bottle and the Disqus python API

Of course, there is also a bit of templating involved, here is main.tpl and the thread.tpl. Since I suck at HTML, it uses Bluetrip CSS and it's more than simple enough to customize.

OF COURSE I AM CHEATING!

This thing is just a simple veneer around Disqus! More like a blog with comments and without posts than a forum! But ... what's missing to make this a real forum? It works, doesn't it? You could even use Disqus categories to create subforums...

All things considered, I think it's a cute hack.

And if you wait a few days, this will lead to something much more magical!

Full source code at http://magicforum.googlecode.com

De Vicenzo: A much cooler mini web browser.

It seems it was only a few days ago that I started this project. Oh, wait, yes, it was just a few days ago!

If you don't want to read that again, the idea is to see just how much code is needed to turn Qt's WebKit engine into a fully-fledged browser.

To do that, I set myself a completely arbitrary limit: 128 lines of code.

So, as of now, I declare it feature-complete.

The new features are:

  • Tabbed browsing (you can add/remove tabs)
  • Bookmarks (you can add/remove them, and choose them from a drop-down menu)

This is what already worked:

  • Zoom in (Ctrl++)
  • Zoom out (Ctrl+-)
  • Reset Zoom (Ctrl+=)
  • Find (Ctrl+F)
  • Hide find (Esc)
  • Buttons for back/forward and reload
  • URL entry that matches the page + autocomplete from history + smart entry (adds http://, that kind of thing)
  • Plugins support (including flash)
  • The window title shows the page title (without browser advertising ;-)
  • Progress bar for page loading
  • Statusbar that shows hovered links URL
  • Takes a URL on the command line, or opens http://python.org
  • Multiplatform (works in any place QtWebKit works)

So... how much code was needed for this? 87 LINES OF CODE

Or if you want the PEP8-compliant version, 115 LINES OF CODE.

Before anyone says it: yes, I know the rendering engine and the toolkit are huge. What I wrote is just the chrome around them, just like Arora, Rekonq, Galeon, Epiphany and a bunch of others do.

It's simple, minimalistic chrome, but it works pretty good, IMVHO.

Here it is in (buggy) action:

It's more or less feature-complete for what I expected to be achievable, but it still needs some fixes.

You can see the code at it's own home page: http://devicenzo.googlecode.com

How much web browser can you put in 128 lines of code?

UPDATE: If you read this and all you can say is "oh, he's just embedding WebKit", I have two things to tell you:

  1. Duh! Of course the 128 lines don't include the rendering engine, or the TCP implementation, or the GUI toolkit. This is about the rest of the browser, the part around the web rendering engine. You know, just like Arora, Rekonq, Epiphany, and everyone else that embeds webkit or mozilla does it? If you didn't get that before this explanation... facepalm.
  2. Get your favourite webkit fork and try to do this much with the same amount of code. I dare you! I double dog dare you!

Now back to the original article


Today, because of a IRC chat, I tried to find a 42-line web browser I had written a while ago. Sadly, the pastebin where I posted it was dead, so I learned a lesson: It's not a good idea to trust a pastebin as code repository

What I liked about that 42-line browser was that it was not the typical example, where someone dumps a Webkit view in a window, loads a page and tries to convince you he's cool. That one is only 7 lines of code:

import sys
from PyQt4 import QtGui,QtCore,QtWebKit
app=QtGui.QApplication(sys.argv)
wb=QtWebKit.QWebView()
wb.setUrl(QtCore.QUrl('http://www.python.org'))
wb.show()
sys.exit(app.exec_())

And if I wanted to make the code uglier, it could be done in 6.

But anyway, that 42-line browser actually looked useful!

This 42-line web browser, courtesy of #python and #qt -- http... on Twitpic

Those buttons you see actually worked correctly, enabling and disabling at the right moment, the URL entry changed when you clicked on links, and some other bits.

So, I have decided to start a small, intermittent project of code golf: put as much browser as I can in 128 lines of code (not counting comments or blanks), starting with PyQt4.

This has a useful purpose: I always suspected that if you assumed PyQt was part of the base system, most apps would fit in floppies again. This one fits on a 1.44MB floppy some 500 times (so you could use 360KB commodore floppies if you prefer!).

So far, I am at about 50 lines, and it has the following features:

  • Zoom in (Ctrl++)
  • Zoom out (Ctrl+-)
  • Reset Zoom (Ctrl+=)
  • Find (Ctrl+F)
  • Hide find (Esc)
  • Buttons for back/forward and reload
  • URL entry that matches the page + autocomplete from history + smart entry (adds http://, that kind of thing)
  • Plugins support (including flash)
  • The window title shows the page title (without browser advertising ;-)
  • Progress bar for page loading
  • Statusbar that shows hovered links URL
  • Takes a URL on the command line, or opens http://python.org
  • Multiplatform (works in any place QtWebKit works)

Missing are tabs and proxy support. I expect those will take another 40 lines or so, but I think it's probably the most featureful of these toy browsers.

The code... it's not all that hard. I am using lambda a lot, and I am using PyQt's keyword arguments for signal connection which makes lines long, but not hard. It could be made much smaller!

Here it is in action:

And here's the code:

#!/usr/bin/env python
"A web browser that will never exceed 128 lines of code. (not counting blanks)"

import sys
from PyQt4 import QtGui,QtCore,QtWebKit

class MainWindow(QtGui.QMainWindow):
    def __init__(self, url):
        QtGui.QMainWindow.__init__(self)
        self.sb=self.statusBar()

        self.pbar = QtGui.QProgressBar()
        self.pbar.setMaximumWidth(120)
        self.wb=QtWebKit.QWebView(loadProgress = self.pbar.setValue, loadFinished = self.pbar.hide, loadStarted = self.pbar.show, titleChanged = self.setWindowTitle)
        self.setCentralWidget(self.wb)

        self.tb=self.addToolBar("Main Toolbar")
        for a in (QtWebKit.QWebPage.Back, QtWebKit.QWebPage.Forward, QtWebKit.QWebPage.Reload):
            self.tb.addAction(self.wb.pageAction(a))

        self.url = QtGui.QLineEdit(returnPressed = lambda:self.wb.setUrl(QtCore.QUrl.fromUserInput(self.url.text())))
        self.tb.addWidget(self.url)

        self.wb.urlChanged.connect(lambda u: self.url.setText(u.toString()))
        self.wb.urlChanged.connect(lambda: self.url.setCompleter(QtGui.QCompleter(QtCore.QStringList([QtCore.QString(i.url().toString()) for i in self.wb.history().items()]), caseSensitivity = QtCore.Qt.CaseInsensitive)))

        self.wb.statusBarMessage.connect(self.sb.showMessage)
        self.wb.page().linkHovered.connect(lambda l: self.sb.showMessage(l, 3000))

        self.search = QtGui.QLineEdit(returnPressed = lambda: self.wb.findText(self.search.text()))
        self.search.hide()
        self.showSearch = QtGui.QShortcut("Ctrl+F", self, activated = lambda: (self.search.show() , self.search.setFocus()))
        self.hideSearch = QtGui.QShortcut("Esc", self, activated = lambda: (self.search.hide(), self.wb.setFocus()))

        self.quit = QtGui.QShortcut("Ctrl+Q", self, activated = self.close)
        self.zoomIn = QtGui.QShortcut("Ctrl++", self, activated = lambda: self.wb.setZoomFactor(self.wb.zoomFactor()+.2))
        self.zoomOut = QtGui.QShortcut("Ctrl+-", self, activated = lambda: self.wb.setZoomFactor(self.wb.zoomFactor()-.2))
        self.zoomOne = QtGui.QShortcut("Ctrl+=", self, activated = lambda: self.wb.setZoomFactor(1))
        self.wb.settings().setAttribute(QtWebKit.QWebSettings.PluginsEnabled, True)

        self.sb.addPermanentWidget(self.search)
        self.sb.addPermanentWidget(self.pbar)
        self.wb.load(url)


if __name__ == "__main__":
    app=QtGui.QApplication(sys.argv)
    if len(sys.argv) > 1:
        url = QtCore.QUrl.fromUserInput(sys.argv[1])
    else:
        url = QtCore.QUrl('http://www.python.org')
    wb=MainWindow(url)
    wb.show()
    sys.exit(app.exec_())

The Outhouse and the Mall

Wearing the software engineer's hat: Code is the most trivial and the least important part of a feature.

—Michael Iatrou

Michael tweeted that, I replied, he replied, but what the heck, I think sometimes things can be better explained in more than 140 characters, thus this post [1].

So, why the mall and the outhouse? Because when we talk about software and code and features, we are not all talking about the same thing. Imagine if I told you that bricks are trivial. After all, they have existed in their current form for thousands of years, they are pretty simple to manufacture, and have no interesting features, really, except a certain resistence.

Now, suppose you are building an outhouse. Since you are a funny guy, you want to build an actual brick outhouse so you will use bricks to do it.

Now, since bricks are so boring, you may feel compelled to believe bricks are the least important part of your edifice, and that the overall design is more important. Should you carve a moon-shaped hole in the door? How deep should the latrine be?

However, that position is fatally flawed, since if you ignore those trivial, boring bricks, all you have is shit in a hole in the ground. That is because you are considering the bricks as just a mean to your end. You only care about the bricks insofar as they help you realize your grand outhouse vision. I am here to tell you that you are wrong.

The first way in which you are wrong is in that artificial separation between means and ends. Everyone is familiar with the ethical conundrum about whether the ends justify the means, but that's garbage. That'swhat you say when you try to convince yourself that doing things haphazardly is ok, because what you do is just the means to whatever other thing is the end. Life is not so easily divided into things that matter and things that don't.

Your work, your creation is not just some ideal isolated end towards which you travel across a sea of dirty means, trying to keep your silver armour clean. It's one whole thing. You are creating the means, you are creating your goal, you are responsible for both, and if you use shoddy bricks, your outhouse should shame you.

In the same way, if you do crappy code, your feature is demeaned. It may even work, but you will know it's built out of crap. You will know you will have to fix and maintain that crap for years to come, or, if you are lucky, ruin your karma by dumping it on the head of some poor sucker who follows your steps.

I am pretty much a materialist. If you remove the code, you don't have a feature, or software, you have a concept, maybe an idea, perhaps a design (or maybe not) but certainly not software, just like you don't have a brick outhouse without piling some damn bricks one on top of the other.

I always say, when I see someone calling himself a software engineer, that I am merely a software carpenter. I know my tools, I care about them, I use them as well as I can according to my lights [2] and I try to produce as good a piece of furniture as I can with what I am given.

This tends to produce humble software, but it's software that has one redeeming feature: it knows what it should do, and does it as well as I can make it. For example, I wrote rst2pdf. It's a program that takes some sort of text, and produces PDF files. It does that as well as I could manage. It does nothing else. It works well or not, but it is what it is, it has a purpose, a description and a goal, and I have tried to achieve that goal without embarrasing myself.

My programs are outhouses, made of carefully selected and considered bricks. They are not fancy, but they are what they are and you know it just by looking at them. And if you ever need an outhouse, well, an outhouse is what you should get.

Also, people tend to do weird stuff with them I never expected, but that's just the luck of the analogy.

But why did I mention malls in the title? Because malls are not outhouses. Malls are not done with a goal by themselves beyond making money for its builders. The actual function of a piece of mall is not even known when it's being built. Will this be a McDonalds, or will it be a comic book store? Who knows!

A mall is built quickly with whatever makes sense moneywise, and it should look bland and recognisable, to not scare the herd. It's a building made for pedestrians, but it's intended to confuse them and make the path form A to B as long and meandering as possible. The premises on which its design is based are all askew, corrupted and self-contradicting.

They also give builders a chance to make lots of money. Or to lose lots of money.

Nowadays, we live in an age of mall software. People build startups, get financing, build crappy software and sometimes they hit it big (Twitter, Facebook) or, more likely, fade into obscurity leaving behind nothing at all, except money lost and sad programmers who spent nights coding stuff noone will ever see or use, and not much else.

Far from me saying startups are not a noble or worthy endeavour. They are! It's just that people who work on them should realize that they are not building software. That's why code doesn't look important to them, because they are actually selling eyeballs to advertisers, or collected personal data from their users to whoever buys that, or captive public for game developers, or whatever your business model says (if you have one!).

They are building malls, where the value is not in the building, which is pretty ghastly and useless by itself, but on the people in it, those who rent space in the mall, those who will use the mall, the software, the social network, whatever it is you are building.

Twitter is not software, Facebook is not software. If they were, identi.ca and diaspora would be bigger! What they are is people in one place, like a mall is not a real building, but a collection of people under a roof.

So, there is nothing wrong with building malls. Just remember that your ends and your means are one and a whole, that code is important, that without code Facebook and Twitter don't work, and that without people they are a badland, and know what you are doing.

Because the only hard thing in life is knowing what you want to do. The rest is the easy part. And because malls without toilets suck.

[1] If you really want to see the whole conversation, it's here: http://bettween.com/ralsina/iatrou (if anyone knows a better conversation tracker please post it in a comment).
[2] Yet here I am, an Engineering Manager at Canonical. Sorry guys!

We live in the future.

/static/thefuture.jpg

Neal Stephenson wrote:

There is something new: A globe about the size of a grapefruit, a perfectly detailed rendition of Planet Earth, hanging in space at arm's length in front of his eyes. Hiro has heard about this but never seen it. It is a piece of CIC software called, simply, Earth. It is the user interface that CIC uses to keep track of every bit of spatial information that it owns - all the maps, weather data, architectural plans, and satellite surveillance stuff.

Hiro has been thinking that in a few years, if he does really well in the intel biz, maybe he will make enough money to subscribe to Earth and get this thing in his office. Now it is suddenly here, free of charge...

And of course, I have just that very thing installed in my desktop. Not all the mentioned data is hooked into it, but hey, it is free of charge.

Heinlein wrote about private citizens and companies going into space. He thought it was not any government's job. And that is going to happen in my lifetime. I know a guy who knows a guy who knows a guy who went to space paying for it with his own money.

Of course there are no flying cars or rocket backpacks (those were good ideas... not!)

What's the difference between Gibson's Idoru and Gorillaz, except that it's cheaper to pay musicians than it is to build Artificial Intelligences? Can you tell me what's the point in building an AI, anyway? Aren't mechanical turks cheaper and better?

Asimov wrote about a foundation of scholars writing an encyclopedia to be constantly updated, containing the whole of humanity's knowledge (we got wikipedia instead. Good enough!)

Our phones are much nicer than Star Trek's communicators (for example, the loudspeaker is optional)

It's as if most of the ideas of scifi got filtered through a purifier and what made sense came out on the other side. I like living in the future. I want to see the next one.

The lottery as a rational investment.

There is a prejudice that the poor play lotteries because they are lazy, can't save and are generally stupid and are hurting themselves by chasing the fantasy of winning instead of saving pennies. You know what? It's bullshit.

When I was in high school (about 13 years old), I once had a plan to make money: I would play the lottery. Here's the mechanism I had in mind.

I would play $1 in the quiniela. Quiniela pays $700 for each $1 you bet, and you have to choose a number between 000 and 999. My idea was: I can bet the $1 my parent give me every day, and there's a chance I make $700. If I had $700 I could buy anything a 13-year old kid may want. With $1? Not so much.

Of course you are right now thinking: What a moron! He has a 0.001 chance of winning and it pays 700 to 1, so it's a losing bet! Bzzzzzt!

Let's start with some simple simulation code:

import random

n = 476

for tests in range(10000):
    for w in range(1000):
        q = random.randint(0,999)
        if n == q:
            break

    print(w)

Short explanation: run 10000 simulations of this process:

  • We play each day for 1000 days.
  • If we win, we stop.
  • If we don't win in 1000 days we stop.
  • We record the number where we stop.

So, I ran it. Here's a graph of the results

histogram

So, how many never won anything? In my data set: 3699 players out of 10000 never won anything.

How many actually lost money? 5030 players.

And how many won money? 4967 players won money.

2910 players won in less than 350 plays.

3 players got exactly even money, winning in their 700th play. For them, this was exactly the same as saving their money.

So, is it a good idea to play a lottery like this? It's a coin toss. Half the time, you end with no money. Half the time, you end with more money than if you had saved.

If you are betting disposable income (a sufficiently low amount that "it doesn't hurt"), it works out. You have a fair chance (50%) of a reward at least as good as saving the money, and a decent chance (25%) of a reward twice as good.

And you have a fair chance (50%) of losing money. But you would lose it very, very slowly and painlessly. ¿How well do you think stocks compare to that? ¿And what are the barriers to entry on both games?

In short: playing the lottery is not irrational, really, it's just a savings plan. It sure was a better idea than buying candy!

A short short scifi story

I wrote this for a contest at the New Scientist magazine. I thought what the heck, maybe someone will like it. And no, I won't explain it, because that spoils the whole thing.

There is no Such Thing as Free Energy

I wished a cold drink was still a possibility, and looked out, across the baked clay that used to be a swamp. The hatch closed and we started our long trip to the stars, cursing the inventor of the perpetual motion engine all the way.

Como ser un nerd en argentina y no morir en el intento

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.

Costo en china? U$S 9.39, con envío gratis

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....

Tip

Cosas chicas == no problem

Normalmente los paquetes de menos de medio kilo casi nunca se quedan en la aduana. Ese dongle bluetooth de U$S 1 te va a llegar a tu casa.

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!

Tip

El mundo es grande

Comprar las cosas directamente significa elegir de una variedad muchísimo mayor de la que tenés acá. Sumále que encima es más barato...

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.

Tip

It's a gift!

Casi todos estos sitios tienen algún servicio de "gift". Te sacan el precio y todo lo que haga que parezca una compra por internet. Aumenta la probabilidad de que llegue a tu casa directo.

Cómo Pagar

La más fácil es PayPal. Si tenés tarjeta de crédito es trivial.

Tip

Hablá con nerds amigos!

Si no tenés PayPal ni tarjeta internacional, pero conocés alguien que trabaja para el exterior, es muy probable que esa persona tenga saldo en PayPal que no puede sacar. En Argentina, convertir PayPal en dinero es muy caro. Entonces se puede llegar a un acuerdo: se lo pagás al 95% del valor (o lo que arreglen) tu amigo tiene la plata, vos tenés descuento en dealextreme o donde sea.

También podés hacer la compra con la tarjeta de un amigo/pariente y pagarle a él en efectivo.

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 ;-)

Tip

Los productos HP tienen garantía internacional

Los Dell por ejemplo: NO. Así que ojo, comprá una marca que te dé service en Argentina. En el caso de Dell tenés que comprar aparte una garantía que te sirva acá. Vos sabrás si te bancás tener una notebook sin garantía (yo sí, si es barata ;-)

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.

Tip

La entrega es allá

Normalmente las compras de refurbished hay que hacerlas en USA. Por eso lo de que tiene que ir alguien a recibirla.

Alternativamente hay servicios de reenvío de mercadería, pero no los he usado y no los conozco.

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.

Tip

Es ilegal importar cosas que se enchufan

Todo lo que se enchufe a la pared tiene que homologarse y creo que es ilegal traerlo. Si alguien tiene un cargador para su propia notebook por ejemplo, supongo que es legal (así me hice de un cargador para la eee)

Conclusión

Ojalá sirva de algo, si tenés más tips ponelos en los comentarios!

Why we are here.

Warning: rant ahead.

Yesterday the government of Argentina announced that they are giving way 3 million netbooks to students. They also announced that they are giving them the option of Ubuntu or Windows 7.

There was, of course, the typical reaction from the FLOSS side: why are they giving Windows to the students when Linux is better? It's unfair that the government pays for Windows!

I am here to tell you to grow up and stop being a baby. I am here to tell you to stop treating others like babies.

I think I can do this because I am immune to criticism from the FLOSS crowd: I am a member of that crowd. I have an awesome FLOSS pedigree, I have used nothing but Linux for over 15 years. And I have a thick skin and I don't care much what other people say, in principle, unless they give me good reasons to care. And I am telling you to stop complaining.

I am telling you that if the only reason to use a specific piece of software is because it's cheaper, you are accepting that piece of software sucks.

I want people not to just use Linux, I want them to want to use Linux. I want them to wait anxiously for the next release of Ubuntu or Firefox or whatever.

And the first step towards excellence is wanting to be excellent. If having to pay nothing for Windows or Ubuntu there is a certainty that Windows will win, then Ubuntu freaking sucks and needs to improve. People are not adopting it even if it's free? Then something is wrong, and figuring out what is important.

But even more important than finding the missing piece is knowing a piece is missing. Open source has grown complacent. It's grown self righteous. It's become adolescent, sure of its awesomeness and immortality.

I don't believe in many things, but I do believe in free will. I believe that people are not morons, I believe that if they prefer Windows, it's because it does something better, and I believe that whatever that is (and I don't really know what it may be), it can be found, and can be improved, and can be replaced, and other things can be added, and people will want to use the better product.

And if they don't... well, at least we fought an honest fight, and we did our best, and we (hopefully) had fun in the process, and pushed the envelope, and created nice things, and the users are better off in the end even if our babies are not the chosen ones, because we raised the level of everything.

For example, before Linux, Windows sucked much, much more than it does now, and I think many of those improvements were because of Linux, and I am happy that today Windows users have a OS that doesn't stink.

I want free and open source software to be used because it's awesome, not because it's cheap. Awesome and cheap I can live with. Just cheap? That sucks.

And the constant "they use windows because they don't know better"? That's patronizing and condescending, and very, very annoying. And if it annoys me, who is not the target of the lame condescension, trust me, it annoys the crap out of Windows users.

Grow a spine, get your asses into gear, start making awesome stuff, kick ass with quality. That's why we are here. Not to be the cheapest date in town.