lunes, 22 de febrero de 2010

Time Zone Calculator

As I plan for calls, meetings, or paper deadlines, I often find that I need to check and compare dates and times in different time zones.

When I had to do this, I would look up entries into websites or use some of the many time zone converters out there, clicking and scrolling to select time zones from large lists of cities. After a while, I got tired of this clicking around and I wished there was a way to just type my query into a search box, hit enter and get the result. You can, for example, google “time London” to figure out the current time in many cities around the world but, e.g. for planning meetings in the future, I needed more than that.

So eventually I sat down and hacked out my own Time Zone Calculator to do just that. Appart from boring queries such as “now”, you can also type “10:00pm from Berlin to Mexico”, or even more crazy things like “tomorrow noon from local to Seoul”. To set up your own local time write in the search box something like “here is Mexico”. All the input is typed into a single search box, making it convenient to save it as a quick search in Firefox or Chrome.

The geek bits: Parsing of the input is done with Perl's Date::Manip which allows the search box to understand many different ‘natural’ ways to input dates and times. Time zone conversion itself is done with the DateTime modules that take into account of all the tricky details such as daylight saving times and the like. To extend the amount of cities available, names of cities are geolocated using the Yahoo! Geolocation API, and then time zones obtained from GeoNames.

Feel free to leave feedback and report problems or errors in the comments section bellow.

domingo, 14 de febrero de 2010

What the heck is science anyway?

This is a loose translation and a repost from the first part of an entry I have previously written in spanish: Ciencia Mala.

A few days ago my internet broke at home and, apparently, that turned out to be good news for this blog. Without digg and facebook around to distract me, I finally had a chance to write one of those supposedly ‘interesting posts’ that I've been willing to write since long ago.

Regular readers know about my fascination with science, the research that backs it up, and the technology that it enables. I'm really passionate about these topics, and not only because they are always cool and exciting (they indeed are!), but mostly because of the very real impact they can make in your everyday choices in life. “How is that?”, you ask. Let's start with a much more basic question first,

What the heck is science anyway?

From very early in the history of humanity, we human beings started to realize our ability to find patterns and use them to give explanations to whatever incidents were happening around us. Look! When we dance like this, we can make it start raining! We also found, though, that our explanations very often turned out to be particularly bad and didn't really work. Damn, we've been dancing for three weeks already, and no single raindrop :-(.

Science is a method that we came up with in order to, setting aside our own subjective biasses and preconceptions, test our explanations and distinguish the ‘good’ ones from the ‘bad’ ones.

And the method of science works more ore less like this:
  1. We find something curious happening in the world and we want to explain it: Why is it that x happens?
  2. We make some observations, try to find some patterns (we're good at those!), and make up some ‘theory’ or ‘guess’ about what is going on: Aha! When y happens, then it always follows x!
  3. We analyze our theory and design some experiments to prove that our theory is wrong: Can I make y without x happening?
  4. Then we do the experiments. If it turns out that our theory is wrong, we discard it, go back to step 1 (maybe we didn't ask the right question?), and repeat the whole process. If our experiments seem to work, we go back to step 3.
You might notice that this process is rather peculiar. First, the experiments are not designed to confirm our theory, but to try to prove it wrong! We do this because, no matter how many thousands or millions or examples we found that agree with our theory, it is enough to find one against it in order to show it doesn't work. The goal of this scientific method is to find the flawed explanations, so that we can quickly discard them and focus on the ones that seem more promising.

Moreover, notice that the method never stops! The ‘best’ explanations are the ones that keep moving between steps 3 and 4 as long as possible. But the scientific method will never tell us, with absolute certainty, that the explanation we currently is the ‘truth’ or the ‘real one’. Science is not about knowing the answers to everything, but about being humble enough to admit: “We don't really know, but these are the best explanations we have so far ...”

Another property of science is that, moreover, criticism to the current theories and ideas is more than welcome. Being skeptic is, in fact, the engine of the scientific method. Suddenly finding solid evidence showing that one of or best theories was actually wrong is not a failure that we should hide and be ashamed of. Quite the oposite, this would represent a breakthrough, an opportunity to advance science and our understanding of the world around us.

But the greatest power from science comes from the fact that the good explanations can also become useful in a very practical sense. A good explanation is useful because it also allows us to predict the future. An explanation might allow us to predict the occurrence of natural events, or the consequences that our actions might have. It is also science the one that has helped us to understand so much about the world we live in, and to develop the technology that we increasingly begin to take for granted.

But science is not just something that weird guys with glasses and lab coats do to provide the rest of us with the fruits of understanding and technology. Science is quite relevant for each and everyone of us. Science teaches us that it is not enough to have ‘hunches’, and that we shouldn't take claims from others at at face value. We should be skeptical of every claim and always try to think about alternative explanations that have to be ruled out before jumping to a conclusion. Try to remember that, and apply it routinely in your everyday life!

sábado, 6 de febrero de 2010

Como hackear MySpace

Imagen de Leonard Lin
Estás aquí porque quieres hackear la cuenta de un amigo, quizá por broma, quizá te quieres desquitar de algo que te hizo. O quizá estás aquí porque alguien hackeo tu cuenta y quieres saber cómo le hizo, quieres saber cómo prevenirte. Pues sin más, aquí te voy a decir cómo se hace.

Y no solo para MySpace, mi método funciona para hackear cuentas de Facebook, Hotmail, MSN, y cualquier otro sitio popular en la red. Éste es el método que ha probado ser el más efectivo para irrumpir y acceder a las cuentas de otros. De buenas fuentes se (alguna vez tuve oportunidad de platicar con un empleado de la compañía) que este es el método más usando para entrar sin permiso a cuentas en Facebook. ¿Que cómo funciona un método tan poderoso?

Estudiando computación nunca faltó quien me lo preguntara, “oye, ¿y sabes hackear páginas?” La verdad es que sí lo se, pero nunca había querido revelar el secreto porque realmente es muy fácil que cualquier persona—con conocimientos de lo más básicos en programación y páginas web—lo pueda aplicar. Sin embargo, después de ver las cuentas de algunos familiares y amigos ‘hackeadas’ por ese mismo método, llegué a pensar que quizá divulgar la información puede hacer más bien que mal. Así que sin más, aqui está, voy a divulgar el secreto.

No se hackea a las páginas, se hackea a la personas.

¿Has recibido algún mensaje de correo asegurándote que puedes “descubrir quienes te han bloqueado en el MSN”? Ese es alguien tratando de hacerte caer en un engaño, robar tu password y hackear tu cuenta. Y lo mejor es que no tienes que ‘robar’ el password, ¡la gente alegremente va y te lo entrega en las manos!

Imagina esta situación. Vas caminando por la calle, de pronto te encuentras a un extraño que te dice: “¿Quieres que te regale estas estampas con caritas sonrientes para poner en tus cartas? ¡Sólo tienes que prestarme las llaves de tu casa!”. Dudo que cualquier persona cuerda aceptaría tal propuesta, pero en internet todos son menos cuidadosos y es impresionante la cantidad de personas que contestan, “¡Wow si, estampitas!”, y entregan las llaves. Ese es el truco.

La moraleja, y si no quieres que esto te lo apliquen a ti, es simplemente tener mucho cuidado con nuestros passwords en Internet y no andarlos regalando a la primera página que nos los pida. Recuerda, si algo parece muy bueno para ser ver verdad (SMS gratis, hacer trampa en un juego, espiar a tus amigos, la fortuna de Bill Gates) muy probablemente es muy bueno para ser verdad.

Sin embargo, la historia no es tan simple y no termina ahí. En Internet hay que tener doble de cuidado. “Pero esta liga me la mandó un amigo y ¡él dice que realmente funciona!”, “No, pero sí era la página de Hotmail, se veía igualita.” Estas son otras dos formas de hacer caer a la gente.

Si algún amigo tuyo, desafortunadamente, ha perdido sus ‘llaves’ y ya hackearon su cuenta, los que tengan acceso a ella pueden mandarte mensajes pretendiendo que son tu amigo. Y esto es igual de válido para el mail, chat o mensajes en tu muro. Si no quieres caer confirma dos veces con tu amigo que sea realmente él quien te mandó la liga, y pídele que te explique exactamente qué es lo que se supone que hace. En general nunca instales nada en tu computadora, no importa que tu amigo te diga que “¡es muy gracioso, lo tienes que ver!”. La broma te la pueden estar haciendo a tí.

La última forma para tratar de robarse una cuenta, es hacerle creer a la persona que hay algún problema con ella y darle una liga donde tiene que ir para “confirmar tus datos” o sino su cuenta será cancelada. Si recibes uno de estos mensajes es pura mentira, y es otro intento para robar tu cuenta. Un buen ‘hacker’ pueden hacer que una página para robar datos se vea idéntica a la página de Hotmail, Facebook, eBay, Amazon o incluso como la página de un banco. Si recibes un mensaje de esos y tienes alguna duda, escribe tú mismo la dirección de la página (por ejemplo “www.hotmail.com”) y entra ahí para estar seguro de que no hay problemas con tu cuenta.

Si te preocupa tu seguridad, otra recomendación es no usar el mismo password para todas las páginas, y no usar passwords que sean fáciles de adivinar (palabras comunes, fechas de nacimiento, el nombre del novio). Mantén por lo menos dos o tres passwords diferentes, uno más robusto para las cuentas importantes (como tu correo electrónico) y otros más para registrarte en páginas con ‘jueguitos’ u otros sitios similares. Si tienes una cuenta en el banco, nunca uses las claves del banco para ninguna otra cosa que no sea el banco.

¿No se te ocurre como inventar un password que sea fácil de recordar pero difícil de adivinar? Aquí va un consejo. Piensa en una frase, de preferencia que tenga números y nombres propios. Por ejemplo:
mi perrita Dona tuvo a 5 cachorritos muy lindos.

Después usa la primera letra de cada palabra para producir un password difícil de adivinar pero fácil de recordar: mpDta5cml. Se creativo, puedes usar también mayúsculas para resaltar palabras importantes, o cambiar letras por números parecidos (por ejemplo ‘2’ en lugar de ‘Z’).

Ahí está, ya sabes como se hackea una cuenta. Es ahora tu responsabilidad decidir cómo utilizas esta información.

martes, 2 de febrero de 2010

The difference between invention and discovery

Samuel Hahnemann invented the principles of homeopathy (he “discovered” nothing, it turns out) in the 1790s and [...]

Steven Novella at NeuroLogica
:P