Monday, March 29, 2010

Fixing the blog remotely

First use of cygwin and ssh to connect to my computer remotely and fix the blog =D. Just had to restart mysql... yet again, something happened with its socket file.

Sunday, March 28, 2010

Learning Apache's minutiae

When using mod_userdir (to allow/disallow each/some user(s) to expose files through requests like http://myDomain.com/~myTestUser/exposedFile.txt), Apache needs --x permissions on the /home/myTestUser directory (directory in accordance with the example) in order to serve the requests. Otherwise you will get a 403 Forbidden error when trying to access them.

Related to this, if UserDir is disabled for a user (or the user doesn't exits), Apache will return a 404 Not Found error, instead of a 403 Forbidden.

Back to Linux

Después de descubrir que la versión más reciente de Arch (Linux) por default trae un kernel que tiene un problema para cargar mi tarjeta de red, antier tuve que re-aprender cómo se compilaba e instalaba un kernel de Linux from scratch. Tuve que bajarlo en otra computadora, y luego pasarlo por USB a la nueva, porque pues sin tarjeta de red cómo lo bajo ¬¬.

Pero ya quedó instalado, ya le instalé el ambiente gráfico, VirtualBox para instalar Windows adentro de Linux, ya logré instalar Windows, hacer que se comunique con el SO host... Lo único malo hasta ahorita es que parece que TightVnc no se lleva bien con KDE 4 cuando quiero iniciar una sesión remota. ¿Conseguir otro server/cliente de VNC? ¿Cambiar KDE por Gnome?

Saturday, March 20, 2010

Adventures of a developer

It's amazing how much one can learn from very short texts.

I read this post that I had put in my "to read [when you have time to really pay attention and think about what you're reading]" list a long time ago, and was surprised by the amount of content and learning that can be obtained from it. This is a sample of what I'm talking about:

  • Backpropagation algorithms: term taken from Artificial Intelligence, used in this context to trace who clicked on ads, to monitor their effectiveness.

  • Firebug: Firefox extension that allows the user to see and edit (seeing the results in realtime) the HTML, CSS, javascript, etc, of a webpage. You can also monitor requests made by the page, including their response times and responses. Extremely useful for web developers.

  • XMLHttpRequest (also referred to in the post as XHR): type of request used in AJAX to allow for dynamic retrieval of content (without the need to refresh the page).

  • 204 http responses: "No Content" responses for web requests.

  • Accepts header: part of an http request that specifies what does the request expect as a response (if I request an image, I wouldn't expect to receive text content in response).

  • Pixel tagging: one of many ways of monitoring webpage views and user behavior in websites.

  • "Or"-ing functions in javascript: I'm not even sure of how this works, but it seems to be combining 2 functions into one that will be later used to apply both at the same time (a=encodeURIComponent||escape).

  • Regular expressions: (/#.*/, matching "#[whatever]" and /\+/g, matching "+[whatever is in parameter g]", if I'm not mistaken).


Developers who analyze code written by others can also relate to the post because of the way in which Ryan (the author) writes how he arrived at his discoveries:
So I cracked open Firebug, did a search and watched the Console tab while I clicked a link. I was expecting to see a nice little XMLHttpRequest go across the screen… and didn’t.

The always useful trial and error.
A call to clk() in the console tab just returned true, so off to the source for clk() I went. Cmd+U… Cmd+F… ‘clk’…:

More trial and error. "Exploring" a function with quick & easy calls to it. Look for the actual code to understand what it's doing. A bit of developer background to know that he 1) conjured up the source code of the webpage (Cmd + U), 2) wanted to find something in it (Cmd + F) and 3) typed it ('clk'). Also, that he's a Mac user, as evidenced by Cmd and not Ctrl.

Even without understanding the fine details of what Google's doing there, I understand the overall idea, and I'm a bit impressed of how something that looks so "hackish" is at the heart of their ad-monitoring system (I think?).

Sunday, March 14, 2010

David S. Richeson - Euler's Gem

Read from-to: Feb 19, 2010  - Mar 14, 2010 (24 days).

Liked: ...it's math, what's not to like?


Didn't like: al final se pone un poco denso y pierde un poco las ayudas visuales (que es entendible, hablando de n-dimensiones no sirven de mucho, pero hay algunas que no son tan triviales de entender con la poca explicación que da).

Overall: nice book =D.

Get it here.

Notes & Quotes:
"Mathematical folklore says that he [Euler] could write mathematics papers while bouncing a baby on his knee, and that he could compose a treatise between the first and second calls to dinner" (p.16)

"Later he [Pythagoras] settled in the Greek city of Croton in what is now southern Italy" (p.37).

Italia? Interesting...
"I hope that posterity will judge me kindly, not only as to the things which I have explained, but also to those which I have intentionally omitted, so as to leave to others the pleasure of discovery" - Rene Descartes (quoted in p.81).

Riiiiiiiight jaja.
There is a oft-repeated quip that "objects in mathematics are named after the first person after Euler to discover them" (p.86)

Jaja THAT's fame.

La prueba de Legendre [JAJAJA la caricatura en wikipedia =P] de la fórmula de Euler, en el capítulo 10 (pp.87-99)... wow. Beautiful. Too long to transcribe though.
G. H. Hardy wrote "Reductio ad absurdum, which Euclid loved so much, is one of a mathematician's finest weapons. It is a far finer gambit than any chess gambit; a chess player may offer the sacrifice of a pawn or even a piece, but a mathematician offers the game" (p.123).

"Ok, you win, it is false. But HA! That means it's true! IN YOUR FACE!"
Any knot can be obtained as the boundary of an orientable surface with one boundary component (p.185).

Mathematicians work in a store that makes and sells tools. Occasionally they take special orders from their scientific customers, but most of the day they toil away making elegant tools, the uses for which have not yet been invented. Scientists visit this tool shop and browse the shelves in hopes that one of the tools fits their needs (p.201).

Nice description.
Poincaré had a restless curiosity that kept him moving from topic to topic. He would attack a new area of mathematics, make an indelible mark, then move on the the next. A contemporary called him "a conqueror, not a colonist" (p.212).

Otra buena descripción.

Saturday, March 13, 2010

Back to learning music

Hace un buen rato que no aprendía a tocar alguna canción nueva. Cuando estoy cerca de un instrumento —a veces es mi guitarra, a veces el piano en casa de mi tía— y traigo alguna melodía en la cabeza, me da por intentar "transcribirla" y tocarla, pero por lo general no pasan de ser sesiones de 5 min o menos, que terminan sin importar si tuve o no éxito en mi intento.

A diferencia de eso, hoy busqué el tab de Trains (Porcupine Tree), que tenía finta de no ser muy complicada, y efectivamente el 90% de la canción salió sin problemas tocando del tab a primera vista. El solo y un bridge fueron lo único que tuve que ponerme a sacar de oído, pero después de un rato salieron (wu! =D) and now I'm happy to say there's a new song in my repertoire! Una que disfruto mucho escuchar, y ahora también tocar. Great way to end the day.

When the evening reaches here, you're tying me up... I'm dying of love... it's ok...

Monday, March 8, 2010

Learning about my limitations

Hoy leí el post Hearing the Uncertainty Principle, que aparte de estar interesante me dio la excusa... ejem... explicación, perfecta, de por qué me es mucho más difícil sacar de oído melodías rápidas que melodías lentas. Y dejando al ego de lado, por qué es más difícil sacar de oído melodías rápidas que melodías lentas. It seems obvious enough, pero tener un por qué siempre es bueno. Entre más larga sea una onda en el tiempo, más angosta su representación en frecuencia, y entonces se parece más a una nota pura. Notas muy cortas en el tiempo implican un espectro de frecuencias mucho más amplio, que hace bastante más complicado determinar cuál es la frecuencia (nota) principal del sonido.

Ta-ran!

Saturday, March 6, 2010

Analogy on software engineering & PEBKAC

Leyendo los comentarios de un post de reddit donde Peter Norvig (director de investigación en Google) contesta preguntas hechas por la comunidad me encontré este (contexto: Norvig habla de la diferencia entre Civil Engineering y Software Engineering, y construir puentes VS construir programas):
Imagine that one day, one of your users (a driver) decides to drive off the bridge. In civil engineering, it isn't your fault, it's his. In Software, it is your fault. You would have to have thought about a way of preventing that. Thats akin to saying that when a driver is about to drive off a bridge, a huge rubber wall should instantly appear bouncing him into the bridge again. This wall should have the message "The operation you tried to do is not allowed".

En otras palabras, el problema del desarrollo de software es que en caso de PEBKAC (Problem Exists Between Keyboard And Chair), la culpa recae sobre el programador en vez de sobre el Between-Keyboard-And-Chair. Maldito mundo injusto =P.

La "entrevista" completa de Norvig está aquí. El comentario original acá.

Thursday, March 4, 2010

Definición de "fama"

There is a oft-repeated quip that "objects in mathematics are named after the first person after Euler to discover them".

Need I say more?