Endomondo Lied To Me    Posted:


A week ago I re-started my diet and exercise plan. Since I am grossly overweight, the exercise plan is basically "walk around 5km every day, fat guy". Since I am a nerd, I wanted data so I could stop lying to myself about how much I was walking.

I had seen Endomondo mentioned in my tweeter timeline a bunch of times and the featureset looked pretty much exactly as I needed:

  • Track my walking
  • Keep history
  • Show it in google maps (because it's nice)

It even did things like tracking calories burnt and so on.

The only problem was... it really sucks at figuring out how much you walked. It consistently overestimates by around 50% the distances, and since it calculates the average speed based on time and distance (and the time measurement is correct) it overestimates speed by 50%, which then means it overestimates calories burnt by (I am guessing) 125%.

How did I verify that Endomondo is wrong, and avoid the obvious explanation of "your GPS is broken"?

  1. I tracked myself using Endomondo and Google Trails at the same time.
  2. I counted steps roman-mile style (count every "left-right", multiply by 1.6)
  3. I measured the path I walked in Google Maps and Bing Maps

All those measurements tell me a walk of 1100m +/- 150m is measured by Endomondo as 1.68 km


Ver mapa más grande

Why does this happen? I could assume Endomondo is just crap, and probably be right, but trying to come up with a "interesting" explanation, I am leaning towards noisy measurements. For example, if Endomondo saw my position shifting randomly 10 or 15 meters left or right it would probably add enough noise to make the path 50% longer (for a much more fun example of this, read this paper (by no other than Benoit Mandelbrot!) but this doesn't explain why Google Trails works so much better (unless Trails does something smart with antialiasing and interpolation).

If you use Endomondo, care to share your experience? I am reluctant to 1-star it in Google Play without independent confirmation.

Comments

How I Made My Phone Useful    Posted:


So, I got this phone on my trip to the US. It's a Galaxy SII variant called the S959G. It's not a very common variant, and of course it was locked to a network that's unavailable here, and comes with Android 2.3 which is ancient, so it needed some fixing.

And man, the Android community is a mess about documenting stuff. So here's my shot at it.

This only applies to THIS PHONE if you go blind doing this, or your dog catches fire, not my problem.


The goal:

  • Unlocked
  • Rooted
  • Newer Android
  • Google Apps
  • Done using Ubuntu (because I prefer it)

The process is a bit lengthy, but simple.

Install heimdall
It's in the repos, just use apt, piece of cake

Go to the XDA page for this phone because that seems to be the canonical information source.

Get (from where it says "The best way to root") the CWM RECOVERY v6.0.27 file. It's called CWM-Recovery.tar.md5 because version names are for the weak.

Get the recovery.bin that's inside it using tar xvf CWM-Recovery.tar.md5

Put your phone into download mode. For this model that's done like this:

  • Turn off
  • Plug into USB
  • Press Volume Up and Volume Down (keep pressed)
  • Press power (keep pressed)
  • When Samsung appears on screen, let go of power button
  • When you see a warning sign, let go of volume buttons
  • Click Volume Up

Flash the recovery.bin using heimdall: heimdall flash --recovery recovery.bin

Now you have to go into recovery to make backups:

  • Turn off
  • Unplug USB
  • Press Volume up and down and hold
  • Press power
  • Let go of power when Samsung flashes
  • There you are

In this mode, volume up/down move the cursor up/down and the power button chooses the selected option. Do the obvious thing to do a backup.

Turn on the phone and make sure it works.

Now copy the CyanogenMod zip file from XDA (or any i777 image) into the phone's SD Card somehow (drag and drop in Nautilus works ;-)

Go back into recovery mode as above.

Clean up the phone: Clean data, cache, and in advanced, clean dalvik cache.

Install by using "Install zip from sdcard" and choosing the right one, and doing the obvious thing.

Boot the phone, it should now be in CyanogenMod (yay).

Try to make a phone call. If you can't and/or the phone asks for a SIM PIN, it's still locked. To unlock I used this APK which was untested on this model, but hey, it worked.

You may also need to install one of the "modem" files from XDA. Just put them in the SD card, go to recovery, and install one, try, if it doesn't work then try another one.

Get gapps-jb-20130301-signed.zip from the XDA page.

Copy that into the SD card, then install from recovery mode.

And that's it. If it fails, you can probably go back to something reasonable using the stock firmware that's in the same page, but I have not done it so I don't offer intructions.

Good luck!

Comments

A Oakland me fuí, y traje remeras    Posted:


Cuando te postulás en Canonical, casi siempre dice algo como "está dispuesto a viajar internacionalmente varias veces al año". Eso es parte de estar en una empresa donde el 90% de la gente trabaja desde la casa. Que cuando querés verte en persona con algún grupo, el lugar más práctico puede estar a 10341KM de distancia.

Entonces hice mi valijita porque trato de nunca despachar equipaje, y me subí al vuelo de United a Houston, donde conectaría a San Francisco, y de ahí me tomaría el tren a Oakland. Bueno, ese era el plan.

Me dí un pequeño lujo, hice upgrade a "Economy Plus", no es super caro y garantiza que llegás con las rótulas puestas, pero no mucho más que eso.

El avión a Houston era un 767 nuevito, con pantallas de 9" y enchufe USB para cargar tus aparatitos. El asiento de adelante estaba a mas o menos un metro y medio del mío. De hecho, con mis bracitos de cocodrilo tenía que estirarme mucho para llegar al bolsillo de adelante. Y mi bonita pantalla individual... no funcionaba. No me registraba los toques. El azafato muy amablemente me reseteó el sistema dos veces pero no hubo caso, así que el asiento bárbaro, pero bueno, siempre algo sale mal en los viajes.

Y hablando de que las cosas salen mal... la conexión en Houston era un poco justa de tiempo. Y había mucha, mucha gente en migraciones, y muy muy poca gente atendiendo en migraciones así que el avión salió mientras yo estaba haciendo cola todavía.

Así que me voy al mostrador, me dicen que el siguiente vuelo sale a las 3PM y llega a San Francisco a las 5PM (por el cambio de hora). Como le digo que tengo entradas para ver Warriors-Nuggets a las 7, el copado que me atendió me pone en standby en todos los vuelos a San Francisco del día, así apenas hubiera un asiento viajo, porque "anything for a NBA fan, dude". Así que engancho en el primer vuelo, que SÍ es un upgrade porque en vez de viajar en esos horrendos A310 es otro 767!

Obvio, voy en la última fila (pero pasillo :-) y la pantallita anda, y me ví This is 40 que está muy buena aunque los protagonistas son increíblemente odiosos y (por tener 41) me dan ganas de agarrarlos a trompadas para sacarlos de la nube de pedos.

Como en los vuelos internos no hay morfi, me compré una "lunch box" que te venden. Los contenidos de la mía incluían:

  • Un pote de puré de manzana
  • Un minipaquete de Oreo
  • Un minipaquete de skittles
  • Dos (2) "meat sticks sabor peperoni"
  • Dos (2) galletitas de agua
  • Un pote de "mediterranean tapenade"
  • Un minipaquete de galletitas Goldfish

Eso, obviamente es una comida balanceada. Balanceada sobre el filo de una navaja entre "What the fuck" y "uhhhh, oreos".

Sí, gané el torneo de trivia del avión y tengo foto que no publico por modestia. A la vuelta hice mejor puntaje pero no saqué fotos porque fuí el único que jugó.

Llego a San Francisco, espero los 15 minutos que necesito para despejarme del mareo que me provoca casi cualquier medio de locomoción, y me compré un teléfono en una máquina expendedora, un Samsung Galaxy SII "El teléfono Android más esperado de 2011" que está lindo (todas las fotos de este post están hechas con ese teléfono) pero parece ser una variante porque no tiene botón "Home" como veo en las fotos de la web.

Como todavía estaba intrigado/hambreado por la experiencia "lunchbox" me comí unas buffalo wings (no hay nada que hacerle, no me gusta comer alitas, no sé para que las pedí) y me dieron una rica sopa de almejas de yapa (viene con unas galletitas que las rompés y las metés adentro), y un café horrible.

Ante la perspectiva de una hora de tren, decidí hacerme el playboy y tomarme un taxi. Tomé varios en este viaje, y eran: Hindú (2), Pakistaní (1), Afgano (1), Uzbeko (1), Hondureño (1).

Llego al hotel (lindo, es un Marriott, son todos iguales), lo encuentro a mi compañero de habitación Lucio Torre cometiendo crímenes contra la gardelidad con "Por una cabeza" (igual, mejoró mucho en la semana)

Por una cabeza by Carlos Gardel on Grooveshark

Nos fuimos al Starbucks a comer/tomar algo.

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_171110.thumbnail.jpg

Universos paralelos, donde Hellman's hace mostaza.

Ducha, tratar de parecer un ser humano, minisiesta, y me voy a imprimir la entrada para el partido al "Business Center", y nunca más claro el porqué del nombre.

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_181529.thumbnail.jpg

¡Pagué el mínimo!

Llego al Oracle Arena, que es famoso por ser el estadio más ruidoso de la NBA. Entré un cachito tarde así que me perdí la presentación de los equipos, pero bueno. TODO el estadio vestido de amarillo... porque había remeras gratis en cada asiento. Y sí, la mía estaba ahí esperándome.

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_203418.thumbnail.jpg

Un argentino en Oakland.

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_193207.thumbnail.jpg

Traje 2, regalos para las mellizas Warrior!

El estadio está bueno, mi asiento estaba bárbaro, medio arriba como para poder ver toda la cancha, no tan lejos que no se vea nada, cerca del pasillo para salir rápido, no en el pasillo, para que no me joda la gente pasando todo el tiempo (perdón por el momento Sheldon). Colgando del techo hay por supuesto una super pantalla, tableros, etc, y... dos diminutas bolas de espejos.

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_192735.thumbnail.jpg

WTF?

El partido muy bueno, el ambiente muy ruidoso, todos muy entusiasmados aunque todo con esa artificialidad que tiene el que el tablero del centro diga que hay que gritar y todos griten lo mismo (excepto "Ref you suck!" que es espontáneo), un groso Stephen Curry, tira desde la casa si quiere, impresiona que hasta los que parecen lentos en la tele son rapidísimos. Andrew Bogut en un momento estaba con las manos en las rodillas como pidiendo aire, miré para otro lado y en 2 segundos había cruzado la cancha y volcado como un animal.

Termina el partido...

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_211720.thumbnail.jpg

Sí, ganaron los Warriors, por paliza.

Salgo, encaro para el tren, y veo un taxi parado, me lleva, resulta que el tipo fue a ver el partido y el taxi estaba estacionado nomás, pero me llevó igual porque "ten bucks is ten bucks, man!"

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_212722.thumbnail.jpg

Este cartel estaba a 5 metros del pibe que me vendió la segunda remera, obviamente.

Vuelvo al hotel, me dió hambre, hice mi primera parada en Rosamunde Bar & Grill, un lugar especializado en salchichas!

http://ralsina.com.ar/galleries/oakland-5-2013/20130428_220640.thumbnail.jpg

"First time? try something basic": Beer Sausage, sauerkraut & hot peppers.

Volvimos otro día con Lucio, y casi nos morimos, pero ... muy buenas las salchichas, tienen una docena de variedades, y son todas muy ricas :-)

Al día siguiente salí a pasear un poco bien temprano, porque durante el día laburamos, resulta que el hotel está a tres cuadras de la comisaría de Oakland (o, mejor dicho, del condado de Alameda)

http://ralsina.com.ar/galleries/oakland-5-2013/20130429_073956.thumbnail.jpg

Esto es enfrente de la entrada, los demás estacionan a la vuelta...

http://ralsina.com.ar/galleries/oakland-5-2013/20130429_074218.thumbnail.jpg

El único negocio del centro de Oakland que no cierra a las 9PM.

Así encontré el lugar donde desayunaría casi todos los días, Caffé 817. ¿Por qué? Rico café, ricas cosas para acompañarlo, muebles steampunk, mesa en la vereda...

http://ralsina.com.ar/galleries/oakland-5-2013/20130429_075402.thumbnail.jpg

Ahí empezamos a laburar, con lo que paso a tener mucho menos para contar, porque llegaba a la noche tan hecho pomada que casi no salimos. Eso sí, esas tres cuadras alrededor del hotel las conozco como la palma de mi mano!

http://ralsina.com.ar/galleries/oakland-5-2013/20130429_124838.thumbnail.jpg
http://ralsina.com.ar/galleries/oakland-5-2013/20130430_072650.thumbnail.jpg
http://ralsina.com.ar/galleries/oakland-5-2013/20130501_062916.thumbnail.jpg

El mundo se divide entre los que te ven comiendo esto y te miran con cara de horror, y los que se quejan que no les guardaste.

http://ralsina.com.ar/galleries/oakland-5-2013/20130429_134537.thumbnail.jpg

El 1 de mayo cuando salgo del hotel justo estaba pasando la manifestación correspondiente. Resulta que el año pasado se agarraron con la cana, así que estaban muy vigilados. De hecho eran unas cuantas personas paseando por la calle principal haciendo ruido con mas o menos el mismo número de policías. Sí, la mitad van encapuchados, todos los negocios van cerrando, pero todo tranqui, por lo menos cuando pasé yo. Después vendían galletitas en la plaza.

http://ralsina.com.ar/galleries/oakland-5-2013/20130501_182515.thumbnail.jpg

Manifestantes

http://ralsina.com.ar/galleries/oakland-5-2013/20130501_182526.thumbnail.jpg

Policías

Fuí a la farmacia, compré un regalo para mi otra cuñada:

http://ralsina.com.ar/galleries/oakland-5-2013/20130429_170837.thumbnail.jpg

De nada, María!

Paseamos un poco en auto un día (O sea, fuimos a Best Buy, y a Target) y esto está en el estacionamiento:

http://ralsina.com.ar/galleries/oakland-5-2013/20130430_175123.thumbnail.jpg

También hay carteles parecidos en los lugares adonde podés fumar. Que no incluyen nada a menos de 25 pies de una puerta. Sí, está prohibido fumar en la vereda.

Paseamos un poco más fuimos a la Jack London Square, comimos en varios lugares por ahí, fuí al cine dos veces (Iron Man 3 y Oblivion) y se acabó el viaje. Para volver al aeropuerto no había taxi, y me dice el tipo de uniforme de la puerta "Take a Towncar, it costs almost the same" y me lleva a una cosa que es algo intermedio entre una limo y una carroza fúnebre:

http://ralsina.com.ar/galleries/oakland-5-2013/20130504_091503.thumbnail.jpg

Es cómodo, para que te lo voy a negar.

Viaje de vuelta sin grandes problemas (asiento que no reclinaba), ya que hacía ya dos días que nadie abría fuego con armas automáticas en el aeropuerto llegada a casa, The End.

Más fotos (incluyendo queso Filadelfia de chocolate, simulador de tornados, estatua de Jack London, otras comidas, etc.) en la galería.

Comments

Indio    Posted:


Con Tato jugamos a un juego de rimas. Por turno, cada uno le dice una frase al otro, y el otro tiene que rimarla. Por ejemplo, "Estoy sentado bajo una sombrilla" / "Me parece que es amarilla". Si no la podés rimar, punto en contra. Ok, no somos exactamente El Cuarteto de Nos, pero es divertido. PERO hay una palabra que está prohibida, porque no tiene rima, que es indio.

Vaya acá un humilde intento de rimar indio, inspirado por algo que recuerdo vagamente de hace décadas.

Me voy a ir al Quindio
escribo yo con mi mano
es un lugar colombiano
que quiero rimar con indio.
Se pronuncia Quindío
me dice la wikipedia
la puta que lo parío
lo mío, es la comedia.

Gracias, gracias, premios de poesía avisen por email.

Comments

La Cacerola Loca    Posted:


"Locura es hacer lo mismo una y otra vez esperando resultados diferentes"

—Albert Einstein

Hoy leí en un comentario en un sitio que no merece ser linkeado la pregunta "cómo puede ser que hayan llegado al poder éstos". Bueno, estimado comentarista anónimo de blog político-vedettil, te lo voy a explicar.

La causa inmediada del poder de Cristina Fernandez es, obviamente, que ganó elecciones. Pero a nadie le interesa eso, excepto a los que se la pasan echando en cara del 46% que 54 es más que 46, y que si quieren ser presidentes es buena idea ganar elecciones, pero acá no vamos a caer en ese facilismo. Vamos a ver más para atrás.

Cristina llega a presidenta en gran parte porque la apoya como candidata Néstor. Si bien ella es una persona con un gran historial político, senadora, etc. si no la llevaba Néstor, no hubiera sido presidenta. O tal vez sí, pero de otra manera completamente distinta, igual que si yo no hubiera comprado una Sinclair 1000 no sería programador (a menos que lo hubiera sido por otros motivos). Pero esos otros motivos son ficción, porque no sucedieron. Ella es presidenta por Néstor.

¿Y cómo llegó Néstor a presidente? Llegó porque lo llevó Duhalde, y porque Menem se hizo encima porque se olvidó de ponerse el pañal para adultos, o porque se dió cuenta de que a pesar de ganar la primera vuelta, en la segunda sacaba exactamente los mismos votos porque todos los demás no lo querían.

Así que Néstor ni siquiera llegó por ganar elecciones, llegó porque de los otros dos políticos que podían llegar a ser candidatos, uno (Duhalde) se tenía que ir por dos muertos y el otro (Menem) estaba quemado.

¿Pero cómo puede ser eso? ¿Cómo puede suceder que los tres políticos más populares a nivel nacional en ese momento fueran esos tres? ¡Uno que no se puede presentar, uno que no lo vota nadie, y uno que no lo conoce nadie, y saca menos votos que Memem! Eso no es normal.

Pero claro, pensemos. ¿Por qué Duhalde tenía poder, como para poder empujar a Kirchner como candidato? Por la acefalía del 2001-2002. Acuérdense que a Duhalde ese poder le llega cuando ya todos los demás se habían escapado de ese poder porque quemaba, porque nadie lo bancaba, porque no les daba el cuero, porque no tenían las pelotas de titanio que tiene el hijo de mil putas de Duhalde.

Menem llega porque hubo tal debacle que la gente (bueno, digamos un cuarto de la gente) decía, mierda, el turco era un tremebundo hijo de puta... ¡pero esto fue peor!

Sí, llegamos en el 2003 con esos 3 candidatos por culpa del 2001. ¿Qué pasó en el 2001? El cacerolazo. En el 2001 se hizo pública esa consigna de "que se vayan todos". Y se fueron todos. Bueno, casi todos. Quedó Duhalde, porque el tipo lo bautizaron con teflón, quedó Menem, porque no tenía otra cosa que hacer en la vida, y quedó Kirchner porque a Duhalde se le fué de las manos una represión, murieron dos pibes, dijo "ma sí, me voy a pescar en el gomón", y era lo que había a mano. ¿Se acuerdan cuando decían que era "el chirolita de Duhalde"? ¡Si hasta lo habían bautizado Virolita! ¡Cuánta presciencia política, qué don de adivinación!

Pero si en el 2001 no se hubieran ido todos, alguno hubiera quedado. Y si quedaba alguno, Duhalde no era presidente, Kirchner no era candidato, Menem era jubilado, y en las elecciones del 2003 quién sabe qué hubiera pasado.

Entonces ver ahora a la misma gente saliendo de vuelta a la calle, diciendo las mismas cosas, en la misma pose, demonizando a la política como si ellos tuvieran una idea de con qué reemplazarla, es gracioso. Bah, gracioso si no te jode que haya tanta gente que no se da cuenta que está haciendo lo mismo, una y otra vez, esperando un resultado distinto. Si no te jode que salir a decir "que se vayan todos" y "que se acabe la política" es, literalmente, una locura.

"Todo lo que digas parece más inteligente si se lo atribuís a Einstein"

—Albert Einstein

Comments

Here's a very big gun, there's your foot: PHP support in Nikola    Posted:


I am a very big proponent of static site generators. I would not have bothered writing Nikola otherwise. But there is always that feeling that maybe there is some little thing which is hard to implement, like a contact form.

And let's face it, the easiest way to solve some of those things is by sticking a few lines of PHP in your HTML.

So, if you really want to, you can do it. I think Nikola (github master) is the first static site generator that supports php code. Here's how:

  1. Add php to your page_compilers (because I will never put it there by default):

    post_compilers = {
        "rest": ('.txt', '.rst'),
        "markdown": ('.md', '.mdown', '.markdown'),
        "textile": ('.textile',),
        "txt2tags": ('.t2t',),
        "bbcode": ('.bb',),
        "wiki": ('.wiki',),
        "ipynb": ('.ipynb',),
        "html": ('.html', '.htm'),
        "php": ('.php'),
    }
    
  2. Add php posts or pages to your post_pages:

    post_pages = (
        ("posts/*.txt", "posts", "post.tmpl", True),
        ("posts/*.php", "posts", "post.tmpl", True),
        ("stories/*.txt", "stories", "story.tmpl", False),
        ("stories/*.php", "stories", "story.tmpl", False),
    )
    
  3. Create a php post:

    nikola new_post posts/foo.php
    
  4. Put php in there:

    <!--
    .. date: 2013/04/16 09:57:09
    .. title: php test
    .. slug: foo
    -->
    
    <?php
    Print "Hello, World!";
    ?>
    

Build the site as usual, and you should end up with a page with PHP extension, that has that PHP in the "content" area, so it will follow your site's theme. Of course you can't do things like add HTTP headers and such, but hey, read the title.

Comments

Nikola version 5.4.4 is out!    Posted:


Yes, version 5.4.4 of Nikola, my static site/blog generator is just published at the usual place, including the following improvements:

Features

  • New Japanese translation.
  • Nikola check exists with 1 if there is an error
  • New HIDE_UNTRANSLATED_POSTS option that ensures you don't have mixed-language pages (Issue #373)
  • New theme "site-planetoid" for use with the planetoid plugin.
  • New 'retired' tag for posts that should no longer be in feeds.

Bugfixes

  • Added post data as a uptodate check for mustache (Issue #456)
  • Rebuild post pages when the post's translation list changes (Issue #458)
  • Handle "-h" (Issue #460)
  • Added correct help for console command (Issue #460)
  • Escape twittercard data (Issue #452)
  • Added missing "twittercard" in story template
  • Added support for per-language tags (Issue #450)
  • Fix wrong path splitting (Issue #434)
  • Remember locale even when set_locale failes (Issue #446)
  • Decode path argument in new_post (Issue #442)
  • task_indexes had missing config dependencies (Issue #441)
  • Removed bogus links to slides assets that were removed
  • Compressed files were seen as unknown by "nikola check"
  • local search and mustache plugins must be disabled by default (Issue #437)
  • Avoid failure if there are no tags and USE_GZIP is enabled (Issue #439)
  • Fix aspect ratio detection in Vimeo videos (Issue #440)
  • Blogger importer was passing wrong options to "nikola init" (Issue #408)

Comments

My very own Roger Ebert anecdote    Posted:


It was around the time "The Blair Witch Project" was a thing so it must have been in 1999 or 2000, that when I was reading Roger Ebert's "Movie Answer Man" column, I thought, hey, I may have something to say about this.

I emailed him about how the "found footage" genre was old, citing 1980's Cannibal Holocaust, and even going back to Edgar Allan Poe's "Arthur Gordon Pym" which is (of course) a found manuscript. We exchanged a few emails, he was always thoughtful, polite, willing to have a nice conversation. He eventually asked about what was the best possible time to visit Buenos Aires, I said spring or fall, suggested that he may be interested in attending BAFICI, and eventually it petered out.

So, not much as anecdotes go, but it made me realize I had been reading his reviews and articles (and later his blog and his twitter feed) for over 15 years.

I remember seeing him do a cameo in a lame TV show (the one with the guy that has a magical dog that brings him tomorrow's newspaper or something), and thinking, hey, I know that guy, sort of.

Now that he's dead, it seems he was, for everyone, the same he was for me, gracious, friendly, interesting.

He was the kind of guy who wrote reviews for Deep Throat and co-authored a Russ Meyer movie, and was always ready to say that a movie was crap yet good crap because there are degrees of crap, and you have to take crap in its own terms.

I'll miss the guy.

Comments

Security Cargo Cults    Posted:


Earlier I mentioned a hack I use when I need to get a clean browser quick. Here it is again:

rm -f ~/.config/ralsina/devicenzo.conf
curl https://devicenzo.googlecode.com/svn/trunk/devicenzo.py | python

Since that got posted on reddit (no, not linking it), it triggered "interesting" arguments. Basically many were shocked (shocked) about running arbitrary internet code locally in this manner. It's insecure. While I am by no means a security expert, at least I know I am ignorant.

Let's examine that insecurity claim a little, in the context of what I was proposing. I am trying to tell people "here's a small web browser that requires no setup and since it's not your main browser, you can nuke it and reset its state easily before running it, like this".

So, what's wrong with doing it that way, according to the commenters:

It's insecure because you can't see the code before running it because it's piped.

Well, that makes it exactly as insecure as every unsigned binary you ever downloaded. Or, let's be honest, every shell script, python script, perl script etc you have ever downloaded. Or you audit them?

Who exactly is being prevented from auditing it by having it presented this way? Is the intersection of "people who can audit this script" and "pople who don't understand pipes" not empty?

For those who can audit, this makes no difference. For those who can't audit, this makes no difference.

It would be better if I provided a hash of the file to know it's not tampered

And how would you know the hash is not tampered? Wat you want, really is a digital signature of the script.

If you trust google (and usually, people do), then you know that:

  1. The script was uploaded by me (check the history of the file)
  2. The script has not been tampered from the repo (since it's a secure connection and yes, there is a hash of the revision)

If you don't trust google, then you don't know who uploaded it, and if you don't trust me, you don't care who uploaded it, even if it's signed (because it's signed by someone you don't trust).

How does the user know it's not malware?
He doesn't. Life is like that.
Why should the user trust you?
He shouldn't. OTOH, were he so inclined, he can check who wrote it, and that I am a real person, with a long history of sharing code online and no claims of ever pushing malware.
This is more insecure because it downloads on every run
You don't need to run malware more than once, anyway. So, not much of a difference.
This propagates bad habits
So does Dunkin' Donuts, and noone posts about it at reddit. But in any case, sure, it's a bad habit. Big deal.

So, is it secure? Hell no! Is it significantly less secure than installing a random PPA you see mentioned in a forum? Maybe slightly. Is it less secure than running random unsigned binaries? Hell no. Is it less secure than downloading and running it? No. Is it less secure than building a random thing from source? Hell no.

But is it less secure than the other realistic ways in which I can give you a 100+ line chunk of python code that works as a web browser? I don't think so.

In the context of "here's the code for it, it can do this", this is not significantly insecure. It's more or less as insecure as the alternatives. With the advantage that, if you want, you can audit it. It's 128 lines of code (assuming you trust Qt and PyQt and Python, etc)

So there.

Contents © 2000-2013 Roberto Alsina
Share