Los problemas informáticos con el tiempo

Esta es la continuación al artículo anterior “El tiempo y los sistemas informáticos“, en el que intento explicar cómo se maneja la hora local y mundial en los sistemas informáticos actuales. Recomiendo leer dicho artículo antes de continuar, pero aquí un largo resumen:

  • Existe un tiempo universal llamado UTC que se basa en relojes atómicos.
  • Por razones astronómicas UTC agrega/quita segundos a años arbitrarios.
  • El protocolo NTP permite sincronizar la hora UTC vía Internet con una gran precisión.
  • UTC sirve de referencia a la zona horaria de cada país/región. Ej: la hora estándar de Chile es CLT ó UTC-04.
  • Muchos países tienen un cambio de hora o horario de verano. Ej: la hora de verano de Chile es CLST ó UTC-03.
  • Por razones políticas/económicas/etc cada país ha variado el tiempo de referencia UTC antojadizamente. Este año (2011), Chile movió el cambio de hora en 3 semanas.
  • La base de datos Olson contiene la información de qué zona horaria es válida para distintos rangos de fechas. Esta base de datos es continuamente actualizada por un grupo de voluntarios en una lista de correo.
  • NTP no contiene información de zonas horarias ni actualiza el cambio de hora. Los cambios deben hacerse manualmente.
  • En el mundo globalizado de hoy, los informáticos deben entender cómo manejar el tiempo mundialmente. Por ejemplo, es recomendable usar el formato ISO-8601

En el presente artículo intentaré explicar los problemas implicados por el (mal) manejo del tiempo. También la forma en que se resuelven y cuales aún no están resueltos. La idea es generar discusión y (ojalá) generar soluciones (que son bastante obvias) para cada problema en particular.

Continue reading ‘Los problemas informáticos con el tiempo’

El tiempo y los sistemas informáticos

Ante una nueva modificación al horario de invierno en Chile, nuevamente vuelvo a escuchar pequeños y grandes errores respecto a cómo se maneja el tiempo y hora en los sistemas informáticos. Estuve buscando algún artículo que explicara bien el tema en completitud, pero no lo encontré. La idea de este artículo es cubrir esta necesidad.

Me interesa hablar de los siguientes temas:

  1. Muchos sistemas no están preparados para trabajar con distintas zonas horarias. En un mundo globalizado, creo que es inaceptable.
  2. Peor aún, creo que ninguno contempla las (irremediables) modificaciones a los cambios de hora arbitrarios.
  3. El tiempo de referencia oficial no es GMT, sino que UTC.
  4. Existen minutos con más de 60 segundos (y eventualmente con 59 segundos).
  5. NTP no tiene nada que ver con el cambio de hora, la zona horaria ni el horario de invierno/verano.
  6. Los sistemas deben dejar de usar el formato DD/MM/YY.
  7. Este es un problema aún no resuelto, pero se puede mejorar en varios aspectos.

Si le asombra una o más de las sentencias de arriba, lo invito a seguir leyendo.

Continue reading ‘El tiempo y los sistemas informáticos’

How to start programming in rails 3, in windows

I really, really liked rails 3. So much, I tried really hard to use it in another project… and failed.

Well, among other things, most people use Microsoft Windows out there. And they find extremely difficult unix-style installations. For me, it’s natural the solution of installing libssl-dev and rebuilding ruby when “gem install” fails because an error ocurrs in net/https. But normal people don’t.

So, if you are running Windows this howto is for you.

Continue reading ‘How to start programming in rails 3, in windows’

Announcing: Mirror and Projects page

I have finished publishing my first opensource Mac OS X app: Mirror. Full source code is available at github instead of my private repo.

I have also created a Projects page in this blog, so any other app or anything will appear in one central page.

Hope you find useful,

– Aldrin

How to start programming in rails 3

Although I have no news about the perfect web application technology quest, I have been experimenting with a lot of frameworks (like Google Web Toolkit and Cappuccino) during the last 6 months… just didn’t got the time to post about my findings or even start the sample application.

Last week I started a REAL project using Ruby on Rails 3. The first two hours was quite exciting, but after a while I realized that all examples/docs/podcasts/guides were made with the 2.x versions in mind. Everything requires several adjustments for the new 3.0 rails version.

So, I’m beginning to document step-by-step instructions on how to start programming in the shiny new rails 3. Continue reading ‘How to start programming in rails 3′

The perfect web application technology, part 3: the test application

Well, I gave up and ended using balsamiq (free) web interface.

In the mean time, I realized that finding the perfect web application technology could easily become a huge, really really huge project (Leo say something like ‘I was trying to fix the world’… that sounds huge!). And my fears of not finishing it all by myself in my spare/free/study/procastination time just appeared. So, I’m taking two strategies for this:

  1. So many girls, so little time! I’ll start with something small, then grow as necessary: I mean, I will start with only one of the major functionalities I have in my mind for the test application, later I will cover the rest or improve the existing ones.
  2. Ask for help: Please, you are already invited into this quest: talk to me, send me patches, re-create this application in the technology of your choice, fixs my bugs or find better ways of doing things, etc. Thanks!

So, functional requirements: here we go!

Continue reading ‘The perfect web application technology, part 3: the test application’

Web mockups, fast and free?

While defining the test application for the perfect web technology quest, I wanted to do mockups. A mockup is an easy and fast way of describing many requirements, it basically says ‘it should look like this’.

But I couldn’t find any useful software in my ubuntu setup, neither on google. It seems the most useful and popular app is balsamiq, an AIR application that you can try on the web and run on your desktop. It seems really useful, but it costs US $80. I may buy it later, but I was looking for a free and open solution.

Then I looked some web utilities for doing mockups of web pages, but none of them seem up to the task… And then, it hit me: we are not building web pages anymore, we are building full desktop applications on the web; why I can’t use the same tools we use for desktop development? So, I tried Glade. Now, let me show you…

Continue reading ‘Web mockups, fast and free?’

The perfect web application technology, part 2: Common Web Apps Requirements

So, to find the perfect web technology we need a typical web application. In this post, I’m trying to figure out the minimal or common requirements of a typical web application.

As I said, I think most developers never consider all the gotchas of doing an application using web technologies. The following requirements may look like a little too much for “just a web application”, but I think this is the real minimum of any web application, no matter the ‘size’.

Continue reading ‘The perfect web application technology, part 2: Common Web Apps Requirements’

The perfect web application technology, part 1: Motivation

This will be a big quest: search, understand, test and evaluate all major web technologies available today. In this first post I will try to summarize the motivations for this little project.

I will post subsequent entries for each major technology that can be used to build a web application, including source code. You are invited to participate: tell me what technology I’m missing, send me patches or fixes, or… whatever you may like to do.

Continue reading ‘The perfect web application technology, part 1: Motivation’

Getting current file position from a running process

That was my question in the local linux mailinglist. I received some interesting responses, but while I was writing my own solution (a kernel module that dumps the struct *file->pos) I found that this is already implemented!

Continue reading ‘Getting current file position from a running process’