Author Archive

My first use of a backup

Well, probably not first, and not a big “use” either, but still…

Yesterday I mistakenly deleted an important file, and hadn’t noticed until 10 minutes ago. I make daily backups, using rsync, as I mentioned some time ago, in this blog entry.

The “bad” part is that, since the error was made yesterday, the last backup (made last night) was “corrupted” (had the file missing). The good part is that I make incremental daily backups of the last seven days, then weekly of the last 4 weeks, then monthly of the last 6 months (son-father-grandfather backup). I just checked the backup of the day before yesterday, and there it was the deleted file!

You can make an idea of the efficency of incremental backups if I say that I keep 15 backups of my home/ directory (1 “current”, 7 daily, 4 weekly, 3 montly, because I started 3 months ago) in two different machines (appart from my own, of course), which would amount to about 43GB in each machine, were they all complete copies. Being as they are incremental, they actually fill up 5.9GB of disk space in either machine (more than 7 times less).

For an idea of what incremental backups are, read this link of my blog entry. Actually, I also started a Wikipedia entry for “incremental backup”. Maybe you can watch it before someone sensible deletes it (it was a redirection to the backup rotation scheme” entry, but I do not think they are the same thing). You could even add something to that entry, to make it more complete.

Comments (1)

Scary Movie 4

Yesterday I watched Scary Movie 4. Yes, it is not the kind of movie I’d choose in ideal conditions, but first there wasn’t really much to choose from, and second I went to the cinema with a friend who was less than willing to watch something like The road to Guantanamo, or The assassination of Richard Nixon. So Scary Movie 4 be it.

At this point, I guess everyone knows that the Scary Movie series satirizes the horror movies in general, making parodies of some selected ones (for example, for that one they chose War of the worlds, The Village, and Saw I and II). Not only they poke fun at some movies, but also to popular characters as the stupid scientology advocate Tom Cruise, and the incredibly inept and fanatic George Bush, elected head of the UN “for his genuine wit”, as they say, ironically, in the movie. These two persons were elected among the five dumbest persons in the USA last year by their fellow citizens, by the way.

As for the movie itself, it is funny, but not wicked funny. It has a couple of really good spoofs, but they try to make so many jokes, about so many movies/characters, that 75% of the jokes are a bit flat.

Not a bad movie, but definitely perfectible.

Comments

Bob Dylan in Donostia

The times, they are a-changing…

Indeed they are! The Dylan I saw and heard in the concert he gave yesterday in the Zurriola beach was not the one who earned his glory, but one living of his glory.

His voice has always been singular, but yesterday it was just degradated. He never let the camera get closer than a certain point, and we were so far away from the scenario that the giant panels were our only hope of catching a sight of his face. We never did.

He also made the whole performance seated in front of the piano, didn’t even introduce himself in the beginning, and actually said nothing during all the concert, except near the end, when he gave a brief speech of which I understood nothing.

I am no fanatic of Dylan, but I do like his most famous songs (“Blowing in the wind”, “Mr. Tambourine Man”, “Knocking on Heaven’s door”, “Like a rolling stone”), but also some others that are not that famous (“The times, they are a-changing”, “Don’t think twice, it’s all right”, “It ain’t me, babe”, “Maggie’s farm”…). However, yesterday he sang such twisted versions of them, that no one managed to identify half of them. He began with, The times, they are a-changing and Maggie’s farm, if I recall correctly… and I identified them by the lyrics, not the music. When he played Mr. Tambourine Man, the song was 3/4 through by the time people would recognize it.

Before Dylan played, Mikel Laboa did. He is getting really old, and it shows. He sang quite correctly (faithfull to his particular style, that not everyone understands), but his mental and physical health are deteriorating. Anyway, I can’t say I didn’t enjoy his songs. Some more than other, but all in all it was fine.

Comments

Post a Kriptópolis

Como tantas otras veces en muchos sitios, he mandado un comentario kilométrico a Kriptópolis, y me ha apetecido copiarlo aquí (para vanagloriarme de los listo que soy, y alimentar mi ego, sí. Si tienes un problema con ello, monta tu propio blog, jejeje).

El post es una respuesta a otro comentario, cuyos “argumentos” también cito (En cursiva):

“[…] mil ojos no tienen porque ver más que dos […] eso es como decir que por decir mil personas que una pared es negra, tienen más razón que yo, que digo que es blanca.”

Si mil personas dicen que una pared es negra, y tú dices que es blanca, pero yo NO he visto la pared… lo siento, pero me fío más de 1000 desconocidos que de uno. Presuponer que los 1000 tienen que equivocarse es mucho suponer, ¿no?.

Es más, tienes razón: ni me fío de ti, ni me fío de los 1000 (malditos mentirosos). Quiero ver la pared yo. ¿Puedo?. Si la pared es libre sí. Si es privativa, no.

“Además lo que se hizo con Linux, gcc etc lo puede hacer cualquier empresa de software, se llama auditar software y no hace falta que sea software libre, pagas y ellos te lo revisan”

Dime a qué empresa pago para que me audite el código de Windows. ¡Ah, perdona, no puedo! Va a ser que es ILEGAL acceder a ese código… Te refieres a que Microsoft pida la auditoría… ya, ya. Me quedo más tranquilo.

“y para eso ningún loco se va a mirar el código entero, vamos el que se crea que de verdad se han mirado todo el código fuente vive en el mundo de yupi. Lo que se utiliza es la regla 80-20 (o 20-80 da igual), que viene a decir que el 80% de los fallos se concentran en el 20% de los módulos, y eso es lo que miran, el 20% del código, obviamente siguiendo ciertos criterios para seleccionar los módulos más propensos a errores.”

Perdona, pero tú sí que vives en los mundos de Yupi. El 80% de los errores estará en el 20% del código, pero NADIE sabe en qué 20%. Si se supiera no serían errores. Por eso hay que mirar TODO.

¡Pero claro que nadie se mira todo! Pero sí que es cierto que ENTRE TODOS MIRAMOS TODO. Es exáctamente igual que en las publicaciones científicas: nadie se lee ni un 0.01% de las revistas que salen (ni siquiera las de su campo), pero intenta colar una mentirijilla y ya verás como hay algún cabrito en Wisconsin o Kuala Lumpur que te pilla (suponiendo que la mentira pasara el filtro de los referees y sea publicada).

“Lo de que da más seguridad, más confianza, es indiscutible, pero que por eso sea más seguro es perfectamente discutible.”

Estás confundiendo causa con efecto: da más confianza porque es más seguro, no al revés. ¿Ves cómo la frase así tiene más sentido?

“También es verdad que al ser abierto es más fácil encontrar los bugs, para bien y para mal (no todos son buenos samaritanos que informan inmediatamente del bug al equipo de desarrolladores o directamente proporcionan un parche, habrá quien se lo calle y se dedique a explotarlo) como dice UnAlien.”

Esto es una tontería. Por cada persona que se guarde para sí el error que encuentre habrá 10 que lo reporten, y otros 10 que estarán dispuestos a arreglarlo. Si no hay dispuestos 10 a arreglarlo, es que a nadie le interesa. Aunque fuera al revés, y hubiera 10 descubridores maliciosos por cada “buen samaritano” (que NO es así), ese buen samaritano sería suficiente, con tal de que el software sea libre, y el samaritano pueda 1) encontrar la solución, porque puede leer el código, 2) corregir el error, porque puede cambiar el código y 3) distribuir las correcciones, porque la licencia lo permite.

“Si se encuentran más bugs en IExplorer es porque compensa más dedicarle esfuerzo pues tiene más cuota de mercado, igual que a Window$. Aunque no dudo que de disponer del código podría ser terrible.”

Si se encuentran más bugs en IE es porque los tiene (en primer lugar), y porque sólo los desarrolladores pueden corregirlos, si les da la gana y cuando les dé la gana, con lo cual la vida de los bugs es larga y fructífera.

Y también vale esto para los virus. Nadie se dedica a hacer un virus para una pieza de software que otras 1000 personas van a tardar 2 días en parchear. Simplemente no merece la pena. Para cuando “sacas” tu virus, el programa ya ha cambiado. Un desarrollador de virus necesita una plataforma estática que atacar, que sepa que va a ser vulnerable suficiente tiempo para que el virus haga algo (e incluso le dé tiempo a él a programarlo). Es curioso que creamos que los 5 niñatos que andan haciendo virus por diversión sí tienen capacidades superhumanas para leerse TODO el código y programar virus al instante, mientras que entre los 100000 usuarios de ese programa, a los cuales les parece vital su seguridad, no son capaces de leerlo y arreglarlo.

“JMG, no te engañes, esos cientos de programadores si ven el código es porque trabajan en alguna parte de él, sino olvidate, te puedo asegurar que si algo odia un programador es revisar y probar código, hacerlo sin que te paguen molesta, pero es que tener que ver código de otro eso ya es un castigo. Por eso, entre otras cosas, se intentan seguir metodologías de forma extricta, porque si esperas que un programador lo haga por gusto vas bueno.”

Correcto. Tienes mucha razón, depurar código jode mogollón. Pero no más que tener que usar un programa defectuoso que sabes cómo arreglar, pero su estúpida licencia te lo impide.

Te falla una cosa: en el software libre no hay esa distinción artificial entre programador y usuario. El programador no es un pringao que se lo curra para otros… El programador es él mismo un usuario, que quiere que el programa funcione, y como otro no lo arregla (o aunque también otro lo arregle), lo intenta arreglar él. Además puede elegir a qué proyectos contribuye, y de qué manera, cosa que ayuda muchísimo a la motivación.

“Asociar calidad o seguridad con software libre es totalmente incorrecto, el software es bueno si se hace bien”

Asociar seguridad con conducir sobrio es totalmente incorrecto; una conducción es segura cuando se conduce bien, independientemente de que vayas ebrio.

“y auditar software lo puede hacer cualquiera,”

¿Cómo? Software Libre lo puede auditar cualquiera, pero el propietario NO. ¿Sabes eso, no?

“Y esto no es que lo diga yo, es que también he asistido a una conferencia larguilla de Stallman, y he leido algunas entrevistas y articulos suyos y JAMÁS dice que el software libre sea mejor o más seguro que el privativo,”

Pues hablaremos de otro Stallman, porque yo también he asistido a una conferencia suya (podéis ver la entrada en mi blog), y dijo cosas muy interesantes sobre el tema, como por ejemplo relato en mi blog bajo los títulos “Funcionalidades malas” y “Errores”.

Claro que igual tú no defines “libre de malware” como “mejor”.

“simplemente que es “mejor para el usuario” en el sentido de que es libre, que te dá libertad, y es lo normal, ese tio sabe de informática y afirmar que tiene mayor calidad simplemente por licenciarlo bajo GPL, BSD etc sería mentirse a sí mismo, una licencia es una licencia, ¡nada más! Esto ya parece una religión, demasiada fé ciega.”

Cierto, Stallman da énfasis a la libertad (independientemente de la calidad).

Pero tu postura de decir que “afirmar que tiene mayor calidad simplemente por licenciarlo bajo GPL es estúpido” es un argumento de hombre de paja. Criticas una bufonada que atribuyes a gente que no la ha dicho. La licencia no cambia nada de la seguridad ni calidad del programa. Directamente. ¡Pero indirectamente claro que lo hace! Te estamos diciendo los mecanismos que ciertas licencias libres permiten, y gracias a los cuales el SL puede ser mejor, y sigues sin captarlo. Es como decir que dar periódicos grátis puede ayudar a que la gente esté mejor informada, y tú digas que igualmente la gente puede decidir seguir sin leer las noticias.

“el saber nos hace libres”

No es del todo cierto. El saber y el poder actuar según ese conocimiento, sin coacciones ni imposiciones. De nada me vale saber cómo arreglar un bug del IE, si su licencia no me permite que lo haga.

Comments

Dynamic file read with Perl

GNU/Linux command-line users, programmers and hackers worldwide have probably come to know and love the wonderful tail shell command, together with cat, head, grep, awk and sed, easily one of the single most usefull commands.

A killer feature of tail is the -f (--follow) argument, which outputs the last lines of a file and then keeps waiting for new lines that might keep appearing in the file, and show them on the screen when they do. This is invaluable to keep track of, e.g., logfiles where new entries are being added all the time, and one does not want to be doing a tail by hand.

Since I am a great fan of Perl, and use its scripts for anything short of cooking dinner (but wait…), I have found myself in situations where I had to tail the last lines of a file. This can be done in several ways:

system "tail $file";

or

my $str = `tail $file`;
print $str;

or with a open() statement, then reading the whole file (or a part), and printing it. The first example with system is the most “direct” one, but reading the file (or a part) into a variable is very handy for doing with it all the nifty things Perl does so well to text strings (substituting, deleting, including, reordering, comparing…).

However, when tail -f was needed (i.e., keep on tracking the file and operate on the output as it appears), I kept using system calls, and all the formatting had to be done in the shell spawned by the system call, not by Perl. This was sad.

So, I was so happy when I discovered a simple trick to make open() read dynamically. There are better ways of doing it, more efficiently and correctly, but this one works, and is quite simple. If efficience is vital for you, this is not probably the place to learn about it. Actually, if you look for efficiency, you shouldn’t be using Perl at all :^)

Example of Perl code that reads dynamically a file “$in“:

open(INFILE,"tail -0f $in |") || die "Failed!\n";
while(my $line = <INFILE>)
{ 
  do whatever to $line;
};
close(INFILE)

Update: Explanation to the code above:

The open() call pipes the output of the tail command (notice the -f flag. Do a man tail to know more) to the file tag “INFILE”. The “||” sign is an [[logical disjunction|OR]], and means “do the thing on my right side if the thing on my left didn’t end successfully (but ONLY in that case!)”.

Next, we perform a while loop over the lines in the pipe. The “<INLINE>” construct extracts elements in INLINE, treating it as an array. As you can see, these elements are assigned to a new variable $line, and the loop continues while $line has some non-false value, i.e. while there are lines in INFILE.

The paragraph inside the curled keys is [[pseudocode]], obviously; you put there your code. And, for tidiness, once we exit the loop, and INFILE is exhausted of lines, we close it.

Comments (4)

Lord of War

They say, “Evil prevails when good men fail to act.” What they ought to say is, “Evil prevails.”

Yesterday I watched Lord of War… and what a movie it is!

I was a little worried that this could be one of Cage‘s bad actings, because I have a kind of love-hate relationship with this guy. I like most of his characters, but some of them are not well played, kind of not very believable.

However, in this movie Cage acts quite well, as do all other actors and actresses. The movie is very well made, with a photography, and specially a soundtrack, that helps telling the story quite beautifully.

However, the main point of the film is its truthfull, even cruel, portrayal of not only the weapon smuggling, but also the corruption and complicity of the “respectable” governments, and casts a dark shadow over the humanity as a whole, I believe. All that is accomplished through the speech of the main character, Yuri Orlov (Cage), a Ucranian immigrant in the USA who becomes the world’s biggers arm trafficker. Orlov tells us everything about his life as a smuggler, his moral degradation, his perception of the world, how the whole arm business works…

This movie is a definitive must-see, if you want to open your eyes to some sad truths. If you don’t, just go watch Superman and enjoy the good white American boy saving the world, the democracy, the right to bear arms, the land of the free, and the home of the brave.

Comments

What I want in a Desktop Environment

Probably just a reminder to myself (things to test that a DE or WM I consider using has).

In no particular order:

Panel

I want the posibility to have a panel that looks like Engage, or the modubar desklet of adesklets.

All of them are, yes, clons of the Mac “Dock”.

Volume control

Yes sounds stupid, but I want something like the convenient applet in the Xfce panel, which turns volume up and down when scrolling the mouse wheel over it.

There are workarounds, like having a mixer (e.g. kmix) icon in the system tray, which fulfill the same task (you can hover and scroll), or configuring a keybinding for it.

Maybe both, specially the latter, are even better than what I originally wanted, so… nevermind.

Alt+Tab cycling for ALL windows

I have tried Enlightenment DR16, and the default is to cycle only raised windows (that is, the minimized ones don’t appear in the cycle). How stupid is that? And I am sad to say that I haven’t been able to change this default behavior. I have given Enlightenment DR17 a try, and it does cycle through all windows…

Iconbox with all windows

I absolutely love the Xfce iconbox, which is a replacement for a “normal” taskbar, i.e., a place where iconified windows “go”. The only thing I think is less than perfect is its looks. The Enlightenment iconbox looks better, specially since you can make it 100% invisible, so that only the icons are visible.

Problem with Enlightenment iconbox: only minimized windows appear there. Again (second time with a window issue in E.), how silly is that? In Xfce you can configure the iconbox to show all windows, or just minimized ones. Having all windows appear in the iconbox is very handy. When you minimize a window, it goes to the iconbox. You can then maximize it clicking in its iconbox icon. Now, without moving the mouse, you can change your mind and minimize it back, clicking the icon again. But in E. you can’t, because the icon is no more there!

Themeability

I like some Enlightenment themes but I prefer the Xfce way of having a theme for the window manager, and another one for the “general look and feel”. The latter includes font types and sizes, scrollbar styles, button styles and so on. In E., it’s all-in-one, so one theme might have a very nice window decoration, but awful scrollbar or button style…

Easy and powerful keybindings

Most WMs have customizable keyboard shortcuts. The ones of Xfce are not espectacular, but can be accepted.

Shading with mouse

This is a very small detail, but very usefull. 99% of WMs shade the window (“roll it up”, showing only the topbar) when scrolling up with the mouse over its topbar. No need to say, scrolling down unshades the window back. In some WMs (e.g., KDE), you can even configure what you want to have done when scrolling with the mouse over the topbar of a window.

Well, there are WMs where you can not do that trick! Sad.

Comments

Blackout summary III

Today the power supply has failed again twice: first for some 15min; 10min later, for some other 5min.

Here goes the updated list of blackouts I have been able to compile, with comments if any:

  1. 2005-Dec-13
  2. 2005-Dec-21
  3. 2006-May-26 (The card-based automated access to the Faculty broke down)
  4. 2006-Jun-04
  5. 2006-Jun-08
  6. 2006-Jun-13
  7. 2006-Jun-16
  8. 2006-Jul-04 (Orpheus didn’t fall)

Summary: 8 blackouts in 204 days, or 25.5 dpb (days per blackout). 19 days since last blackout. Average dpb went down by 0.8.

First post in the series: here

Comments

last.fm

I have discovered this interesting web site called last.fm, via the amazing amaroK music player.

Basically, info about all songs I play (with amaroK, or another last.fm-enabled player) is uploaded to my last.fm profile, where anyone can see it.

If you want to find people with similar musical tastes, or find out what other groups people who likes a group listens to, or how many people listen to some song or group… all that can be found at last.fm.

And if you are just curious what music I listen to, just follow this link.

Comments

Los caraduras de la SGAE

Leo en el Diario Vasco un artículo haciéndose eco del enfrentamiento entre SGAE y usuarios de material informático (o sea, tú y yo), en relación con el famoso canon por copia privada que se aplica a medios como CDs y DVDs.

El preclaro Farré afirma (refiriéndose a los fabricantes de soportes de almacenamiento digital), con su acostumbrada hipocresía:

Lo lógico es que compartan una mínima parte de esa ganancia con quienes crean esos contenidos […] ¿Venderían tantos soportes si no se pudieran copiar las obras?

Este es el puñetero argumento de “gracias a la música se venden más CDs vírgenes, por lo tanto los autores deben recibir una parte del pastel”. Dejemos a un lado si dar dinero a la SGAE equivale a darlo a los autores de la música, o si la SGAE realmente representa a los autores españoles (muchos de los cuales no se adhieren a ella), o en qué lugar queda la música CC… Supongamos que SGAE=música (aguantad las risas, es un suponer).

Pues bien, ese argumento seguiría siendo FALSO.

Es falso y bien falso. El mercado libre no funciona de esa manera, querido Farré.

Supongamos que yo vendo coches. Supongamos que vendo 1000 coches este año. Supongamos que el año que viene la compañía X inventa un combustible más barato. Como el combustible es más barato, la gente empieza a comprar más coches, y mis ventas suben a 2000 coches en el 2007. ¿A alguien en su sano juicio se le ocurriría pensar que la compañía X puede pedirme un “canon” por los coches que vendo, alegando que “gracias a ellos he vendido más”? Pues a nadie, claro.

Supongamos que, en vez de inventar un combustible más barato, X inventa un coche solar. La nueva competencia hace que mis coches sean impopulares, y mis ventas del 2007 bajan a 500 coches. ¿Tengo derecho a demandar a X por hacer que mis ventas bajen? Pues no, claro.

Si acciones de terceros negocios afectan favorable o desfavorablemente al mío, lo tengo que tomar como imponderables del mercado, y adaptarme al cambio sin rabietas y sin pataletas. Pero parece que la SGAE no ha entendido esto: en un mercado justo y libre, NADIE COBRA POR BENEFICIOS INDIRECTOS A TERCEROS.

Es más, tampoco es tan claro que la música beneficie la venta de soportes digitales, pero no al revés, ni en qué medida se dan estos beneficios mutuos, o en qué medida afecta la música a la venta de soportes digitales, comparada con otros factores. Legislar el cobro de un canon indiscriminado en estas circunstancias es irresponsable, y nuestros políticos deberían ser conscientes de ello.

Alguien podría alegar que en el ejemplo de coches y gasolina barata, el vendedor de gasolina también se beneficia de la venta de coches (así que el beneficio es mutuo), pero con la música “pirateada” no pasa eso: la música beneficia la venta de soportes digitales, pero no al revés. Pues bien, esto es otra mentira. Yo planteo la pregunta: ¿acaso se vendería tanta música (CDs originales) si los usuarios no tuvieran un medio barato y fiable para hacer copias? ¿Acaso la música en CDs habría ganado tanta popularidad si no pudiera uno pasarla a MP3 u OGG en su ordenador, o a un reproductor portátil? Recordemos cómo MS-DOS se hizo tan popular en su momento gracias a que se podía “piratear”. Sí, señores, sí, gracias a que eran bien sencillo de copiar.

Hay una corriente de usuarios descontentos (entre los que me encuentro), que reduce su compra de CDs por desprecio a unas discográficas mafiosas, a un canon injusto, a unos artistas mezquinos y ruines, y a “protecciones” anticopia y DRMs abusivos. Leed, por ejemplo mi carta a Bebe.

Está claro que la venta de música se ve perjudicada por esas medidas, pero cada cliente descontento que pierden por sus abusos, ellos lo atribuyen a las redes p2p y al “pirateo”. Por otro lado, cada CD que en mi grupo de investigación utilizamos para hacer una copia de seguridad, se lo apropian como si lo usáramos para grabar a Bisbal. ¡Menuda jeta!

Cada día me tienen más harto estos ladrones.

Comments

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »