Friday, April 1, 2011

The greatest and most amazing four years of my life


  1. Today I took my last class at the University. I'm not finished yet with it though, my final project and my social service are still in the process, but they won't take long , I hope. From the first up to this day I felt in love with the University and those were the best spent four years of my life. Plans for the future... I intent to get a masters degree at the cinvestav, and then I'll probably leave the country, where to? I'm not sure yet, but I love Europe and particularly Germany and France. But those are my plans, a whole lot of things can happen in the middle

  2. I wrote a little program to take advantage of my command line email sending script.


[sourcecode language="cpp"]

#include <unistd.h>
#include <cstdlib>

int main(){
char* args[] = {"/home/jocker/sendMail.sh","al207205823@alumnos.azc.uam.mx","Backup del sistema ha iniciado",
"El Backup del sistema ha comenzado siendo las : 22:02 hrs"};
pid_t pid = fork();
if(pid == 0){
execv("/home/jocker/sendMail.sh", args);
}
else if (pid){
sleep(120);
pid_t pid1 = fork();
if(pid1 == 0){
args[2] = "El Backup del sistema ha concluido";
args[3] = "El Backup del sistema ha terminado exitosamente a las 23:00 hrs";
execv("/home/jocker/sendMail.sh", args);
}
}
return 0;
}

[/sourcecode]

I had never used those system calls in a program before ( I didn't take the operating systems class with the teacher Nava), so it was very exciting.

[caption id="attachment_174" align="aligncenter" width="300" caption="Automatic mail notification"][/caption]

  • The next step is to use the real timestamp in the message, I tried several times but execv doesn't take variables as arguments (just const char*), nor lets me use strcat to append the time as it returns segmentation fault.


3. Yesterday I  attended a chemistry conference, why? because it was given in English, yay!. And in the process learned some things about scientific computing and  first principle calculations. The speaker was an extremely beautiful woman, her beauty was only matched with her intelligence. She is an expert using linux and  a skilled programmer too, what a mix, sadly she's way older than I am.

No comments:

Post a Comment