Thursday, December 2, 2010

WhereAmI Available for Free in Android market!


Finally WhereAmI App, the application that lets you view your location (GPS or network based) and post a wall  message in your facebook account with your location and a link to google maps is available for free in Android market!!


Tell your friends where they can find you or update a meeting point on the go!

No  more need to wait for all your friends standing in a place, just move to another one and tell them your new location!

If you're interested, you can download it using this QR Code:


And if you're in the mood,  please reccomend it on facebook (which will be very appreciated)!


Thanks!

Friday, October 22, 2010

Using Facebook SDK in Android Applications

Howto publish images and links with Android in your Facebook Wall using stream.publish method from Facebook SDK:

1st: Download Facebook SDK using git. http://github.com/facebook/facebook-android-sdk
(highly recommended to play a little with Example.java and other methods)

2nd: create a new project from Example.java

3rd: create a Bundle with all the parameters to post and publish it using SampleDialogListener
             Bundle parameters = new Bundle();

               parameters.putString("method","stream.publish");
               String mylink="http://kinesina.blogspot.com";
                String myimagelink="http://kinesina.blogspot.com";
               String attachments = "{
                                   \"name\":\"Location Here\",
                                   \"href\":\""+mylink + "\",
                                   \"caption\":\"Click to view in Google Maps\",
                                   \"media\":[{
                                           \"type\":\"image\",
                                           \"src\": \"http://myimgurl\",
                                           \"href\": \""+myimagelink+"\"}]}";

                parameters.putString("attachment", attachments);
                mFacebook.dialog(Example.this, "stream.publish", parameters, new SampleDialogListener()) ;

4th: Using LocationManager and Google Maps API (which I will explain soon), you can post your location and a link to google maps in your facebook wall! 


If you liked this app (WhereAmI) you can download it from Android Market for free, or mark/like it on facebook (available soon).

Hope you like it, 'cause it is gonna be my first app published in Android Market!

Tuesday, October 19, 2010

Android SDK for Eclipse running in Ubuntu 10.10

After upgrading my Ubuntu to 10.10, I got the same error as explained in http://sonalsantan.blogspot.com/2010/10/eclipse-adt-plugin-on-ubuntu-1010-after.html


"I found that my Eclipse Android Development Toolkit plugin stopped working. The Eclipse Help>Installation Details Menu would list ADT under Installed Software Tab. However, neither the Features Tab nor the Plug-ins Tab would list ADT."


Also, the installation of  gef would fail due to the lack of some packages, solution found here http://ubuntuforums.org/showthread.php?t=1305691


Finally, in order to get Eclipse working with ADT plugin in Ubuntu 10.10, I did the following steps:


1. Exit eclipse if running
2. Delete ~/.eclipse/org.eclipse.platform_(your platform)
3. Start eclipse
4. Open Help > Install New Software
5. Add this sites:
      5.1 http://download.eclipse.org/datatools/updates
      5.2 http://download.eclipse.org/webtools/updates
      5.3 http://download.eclipse.org/modeling/emf/updates
6. Install GEF Plugin (previously add the site http://download.eclipse.org/tools/gef/updates/releases)
7. Install ADT Plugin (previously add the site https://dl-ssl.google.com/android.eclipse



Monday, September 27, 2010

Seth Goding on Standing Out

Here you have both a serious (actually, not that much) and a funny talk from Seth Goding.

First: the funny one (things that are just broken)

Seth Godin at Gel 2006 from Gel Conference on Vimeo.


Second one: how to stand out and do remarkable things.

Sunday, August 15, 2010

Working with Android. Chapter 2: Intent Class

In android, it is possible to open a webpage (or another application) from your application, which can be accomplished using the class Intent. Intent is a very useful class, which will allow you to perform a lot of different operations such as dial a phone,  install new packages, view your contacts list, pick data from other applications and so on. An intent is an abstract description of an operation to be performed. Used with startActivity launches an application, used with startService makes it possible to communicate with a background service.

 In this post, three examples of Intent class are given for different operations.


1. Opening a Webpage with ACTION_VIEW:
The ACTION_VIEW intent displays data to the user.  For example, when used on a contacts entry it will view the entry; when used on a mailto: URI it will bring up a compose window filled with the information supplied by the URI; when used with a tel: URI will invoke the dialer (more information on URI here http://developer.android.com/reference/android/net/Uri.html)

       String url = "http://www.google.com"; //define url to load
       Intent i = new Intent(Intent.ACTION_VIEW); //create an Intent.ACTION_VIEW
       Uri u = Uri.parse(url); //creates the Uri object
       i.setData(u);  //
Set the data this intent is operating on.
       try {
                 startActivity(i); //
Launch a new activity
       } catch (ActivityNotFoundException e){ //in case something did not work
                 Toast toast = Toast.makeText(context, "Browser not found.", Toast.LENGTH_SHORT);
       }
As usual, you will have to add internet permission to your manifest.xml:
     

2. Calling another Application from your main application with startActivityForResult:
The function startActivityForResult will launch an activity for which you would like a result when it finished. When this activity exits, your onActivityResult() method will be called with the given requestCode.

      int ACTIVITY_INVOKE = 0;
      Intent i = new Intent(); //creates a new intent
      i.setClassName("com.android.app2","com.android.app2.Application2"); //specify app2
      startActivityForResult(i, ACTIVITY_INVOKE);

setClassName(String packageName, String className) allows you to specify the application package name and class name of the application you want to call (which has to be already installed in your phone).  The Package name corresponds to the directory list in /src/ and your class name is . (without the .java extension!).
 startActivityForResult(Intent intent, int RequestCode) will call the application specified with i.setClassName and call the method onActivityResult() with the given requestCode when it finished.
Finally, it is possible to override the onActivityResult method to fit your needs:

      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) //when the activity is finished
      {
            if(resultCode==0) { //ok
                  Toast toast = Toast.makeText(this, "All ok", Toast.LENGTH_SHORT);
                  toast.show();
            } else { //something went wrong
                  Toast toast = Toast.makeText(this, "Firma no aceptada", Toast.LENGTH_SHORT);
                  toast.show();
            }
      }

3. Dialing a phone with ACTION_DIAL
Using startActivity and  setAction, it is possible to dial a phone (ACTION_DIAL) or to make a call (ACTION_CALL):

      Intent i = new Intent();
      i.setAction(Intent.ACTION_DIAL); //set action to be performed
      i.setData(Uri.parse("tel:+34000000000")); //specify the phone number
     startActivity(i); //starts activity


Saturday, July 17, 2010

homeopathy: how to dilute critical thinking until there's no thinking at all

Homeopathy is a pseudoscience which operates on the principle that by diluting a remedy in water, you can make it more effective. Therefore, if smaller concentrations of the "remedy" are achieved, then it just gets more "effective", fact that is called the Law of Infinitesimals.

There is a very common remedy in homeopathy called Oscillococcinum, which my mother has always wanted me to try but never succeeded. This remedy is prepared by diluting freeze duck heart and liver in a concentration 1 part in 100200 (which is a 1 followed by 400 zeros). It may be known that the laws of chemistry state that there is a limit to how far one can dilute a solution (about 1 part in 10012 ) which is far greater than oscillococcinum, but this is not considered a problem in homeopathy because of this belief:

"By vigorously shaking the solution, the water will retain a kind of memory or essence of the active ingredient. Thus, even if none of the active ingredient remains in the water, the water will remember it was there and give the same effect".

¡What the hell?!

I would like to show you two visions of homeopathy that I recently found and which I totally agree with.


And finally, another James Randi's talk, that I am sure you will enjoy.


have fun!


Sunday, June 6, 2010

que la vida és massa curta (se dejaba llevar)



Per algún motiu no puc deixar d'escoltarla. Un Antonio Vega brutal parlant de la heroina i Carmona emocionadissim. Uf.


Azul, líneas en el mar
qué profundo y sin domar,
te acaricia una verdad
y tú, no lo pienses más
o te largas de una vez
o no vuelves nunca hacia atrás

Se dejaba llevar,
se dejaba llevar por ti.
No esperaba jamás
y no espera si no es por ti.
Nunca la oyes hablar, no, no, no..
solo habla contigo y nadie más
nada puedes sufrir
que él no sepa solucionar.

Temor, alcohol de quemar
pon tus manos a volar
o en tus ojos el terror.
Azul, vuelve a reflejar
y fundido con el sol
reina un sueño de sonido a mar.

Se dejaba llevar,
se dejaba llevar por ti.
No esperaba jamás
y no espera si no es por ti.
Nunca la oyes hablar, no, no, no..
solo habla contigo y nadie más
nada puedes sufrir
que él no sepa solucionar.

Thursday, June 3, 2010

Stephen Wolfram on "Computing a Theory of everything"


If you want to know about Wolfram Alpha, the computation knowledge engine, just see the video below.


Spend some time here: http://www.wolframalpha.com/ and I assure you won't regret it.

Sunday, May 23, 2010

ganesh y el elefante

De vuelta a Barcelona iba leyendo un libro que S. me regaló (el viaje del elefante, de Saramago)

Los hechos, resumidos, van a continuación:

Ganesh es hijo de parvati, la diosa de los cien brazos y fue creado sin intervención del marido, shiva, lo que se explica por el hecho de que, siendo eterno, no sentía ninguna necesidad de tener hijos. Un día parvati creó un muñeco de jabón en forma de niño, y le infundió vida y este fue el nacimiento de ganesh. Parvati ordenó a ganesh que no permitiera la entrada a nadie, y él siguió a rajatabla las órdenes de la madre. Pasado algún tiempo, shiva regresó de la selva y quiso entrar en casa, pero ganesh no lo permitió. Shiva perdió la paciencia y se lanzó en feroz batalla contra ganesh, que terminó degollado de un golpe tan poderoso que la cabeza salió disparada muy lejos y nunca más la encontraron. Cuando parvati salió y vio el cuerpo sin vida del hijo, ordenó a shiva que devolviese immediatamente la vida a ganesh, pero les faltaba su cabeza. Parvati pidió auxilio a brahma, el creador del universo, quien sugirió sustituir la cabeza de ganesh por la del primer ser vivo que encontrara durmiendo con la cabeza hacia el norte, que resultó ser un elefante moribundo cuya cabeza cortaron tras su muerte. Finalmente, la cabeza del elefante fue colocada en el cuerpo de ganesh, trayéndolo de nuevo a la vida.

"Historias de maricastaña, murmuró un solado, Como la de aquel que, habiendo muerto, resucitó al tercer día, respondió subhro".


Bien es cierto que, pese a no creerme ni una historia ni la otra, hay que reconocerle al hinduismo cierta creatividad y a Saramago, bueno, a Saramago hay que reconocerle muchas cosas.


Y de regalo, un trozo del libro:
"Según tu religión, quién creó el universo, preguntó el comandante, Brahma, mi señor, Entonces ése es dios, Sí, pero no es el único, Explícate, Es que no es suficiente con crear el universo, es necesario también que haya quien lo conserve, y ésa es la tarea de otro dios, uno que se llama vishnú, Hay más dioses además de ésos cornaca, Tenemos millares, pero el tercero en importancia es shiva, el destructor, Quieres decir que lo que vishnú conserva shiva lo destruye, No, mi comandante, con shiva, la muerte se entiende como principio generador de vida, Si lo entiendo bien, los tres forman parte de una trinidad, son una trinidad, como en el cristianismo, En el cristianismo son cuatro, mi comandante, con perdón del atrevimiento, Cuatro, exclamó el comandante, estupefacto, quién es el cuarto, La virgen, mi señor, La virgen está fuera de esto, lo que tenemos es el padre, el hijo y el espíritu santo, Y la virgen, Si no te explicas, te corto la cabeza, como le hicieron al elefante, Nunca he oído que se le pidiera nada a dios, ni a jesús, ni al espíritu santo, pero la virgen no tiene manos para contar tantos ruegos, rezos y solicitaciones como le llegan a casa a todas las horas del día y de la noche."

Friday, May 14, 2010

James Randi

Es hora de asumirlo: está James Randi (Randi el Magnifico) y, después, el resto del mundo.
Para los que no lo conozcáis (como yo hasta hace un par de días), es un mago y escéptico que lucha para que la gente no se deje engañar y tiene una fundación sin ánimo de lucro (James Randi Educational Foundation) conocida por ofrecer un millón de dólares a quien demostrara un fenómeno paranormal. Cabe decir que el "premio" lleva en activo desde 1996, y nadie ha conseguido llevárselo a casa.

Espero que os guste:

Os dejo un trozo:
So what does Silvia Brown give you for that 7 hundred dollars?
She gives you the names of your guardian angels, that's first. 
Now, without that, how could we possibly function?
She gives you the names of previous lives, who you were in previous lives. Duh
Turns out that the women that she gives these readings for were all Babylonian princesses, or something like that.
And the men were all grecian warriors fighting with Agamemmon.
Nothing is ever said about a 14 year old bootblack in the streets of London who died of consumption. He isn't worth bringing back, obviously. And the strange things - you may have noticed this too- you see the folks on television, they never call anybody back from hell.
Everyone comes back from heaven, but never from hell. If they call back any of my friends they're not going to.. well.. we'll see the story.



Monday, April 12, 2010

Himnovaciones


Tengo ganas de que vuelvan. Y de invitarte a reírnos un rato.

No sé nunca si tomarme en serio

A medianoche siempre me siento muy capaz. Los giros ficticios de mi vida siempre ocurren en este lapso de tiempo: me imagino haciendo otras cosas que se me antojan mucho más apetecibles, pierdo todo lo que me amarra, todo aquello que he construido poco a poco y que cada día odio más. Dejo de ser alguien responsable, de pagar las facturas, de pelearme con las burocracias y adopto todos los animales que me encuentro por la calle.  
Sí, sé lo que están pensando, -el clásico problema de doble personalidad nocturna- pero es que resulta que mi personalidad diurna me tiene muy aburrida y, además, me da que ya empieza a oler a rancio.
En mi mundo de medianoche todo el esfuerzo invertido deja de tener valor: las apuestas pasadas se dan por perdidas. Hay que elegir entre hacer un raise o no ir.  
No se crean que el mío es un problema leve; puedo estar meditando estas cuestiones hasta bien entrada la madrugada, cuando la cabeza empieza a entullecerse y caigo rendida por encefalitis letárgica.
Pero mi personalidad nocturna es además omnipresente: sabe que mañana por la mañana, cuando desayune un poco de miedo acompañado de jugo de melocotón o piña, se me olvidarán todas estas tonterías y con algo de suerte pase otro día más en el que, como siempre, no me tome muy en serio.


Siento que voy a cumplir más años que promesas.  ¿Y si hoy fuera ahora?


"Crecer recordando aquel verso de machado: hoy es siempre todavía.
Toda la vida es ahora. Y ahora, ahora es el momento de cumplir las promesas que nos hicimos, porque ayer no lo hicimos, porque mañana es tarde. Ahora."

Friday, April 9, 2010

Installing nvidia 320M (Sony VAIO CW) on Linux

As usual, new laptop means having some trouble with nvidia-linux graphics. 

Here's a howto, which will allow you to install nvidia drivers for nvidia geforce 320M (attention: you need to have windows installed!). This may be a little tricky because there are no official nvidia drivers released for 320M yet.

I'd recommend to start from a fresh instalation (without graphics) of a debian sid netinstall.

1st. Installing a minimum X server (if you don't have one) and fluxbox
# aptitude install --without-recommends xinit xserver-xorg-video-intel xserver-xorg-input-synaptics xserver-xorg-input-kbd xserver-xorg-input-mouse xfonts-base xfonts-100dpi ttf-mscorefonts-installer x11-utils x11-server-utils xterm fluxbox

2nd. Installing nvidia drivers:
# aptitude install module-assistant nvidia-kernel-common build-essential
# m-a clean nvidia-kernel-source
# m-a prepare
# aptitude install --without-recommends nvidia-kernel-source
# m-a a-i nvidia-kernel-source

3rd. Installing glx libraries
# aptitude install nvidia-glx nvidia-settings nxidia-xconfig

4th. Execute nvidia-xconfig (this will create a file in /etc/X11/ named XF86Config)

5th. Restart with Windows and download softMCCS to get the EDID file of your nvidia card.
Download and install softMCCS, which you can get here: http://www.entechtaiwan.com/files/softmccs.exe.
Find your EDID file and save it to a flash drive.
Restart with Linux.

6th. Copy your EDID file and add it to the XF86Config
Mount the flash drive and copy the edid file in /etc/X11 (in my case my edid file is edid.bin)
# mount -t vfat /dev/sdX /media/usb (replace X for the place where the flash drive is)
# cp /media/usb/edid.bin /etc/X11/
# nano /etc/X11/XF86Config
---add at the last line of section Device0 or Device:
Option "ConnectedMonitor" "DFP-0"
Option "CustomEDID" "DFP-0:/etc/X11/edid.bin"

7th. Start X
# startx 

+ info: http://ubuntuforums.org/showthread.php?t=1393940&page=3
+ info: http://wiki.debian.org/NvidiaGraphicsDrivers

Hope it helps!

Saturday, April 3, 2010

Pequeño vals

Me gusta Marlango. Y los videoclips que no tienen sentido.

Tuesday, March 30, 2010

jugglers!!

They're just amazing! Raspyni Brother's TED Talk... because there is also innovation in juggling!

europecv Latex class

Antes de empezar, pido disculpas por la falta de ("la no") actualización.
Un par de semanas sin portátil le descalabran la vida a uno, oye.

Además, se ha juntado el hecho de tener que decidir dónde (factor de localización y universidad)/cómo (con qué tipo de beca y proyecto) /y con quién (grupos de investigación) hacer el doctorado.. si ya me costaba planificar si el fin de semana que viene estoy en Barcelona o Las Palmas.. ni os cuento lo que me cuesta decidir lo que me ocupará los próximos 4 años..

Entre una cosa y otra he decidido echar unos cv a la ESA, por si colara.. y así alargaba la "toma de decisiones", lo que me ha llevado a actualizar mi CV y a ponerlo estrictamente en el formato Europass (formato estándar europeo para los CV).
Así que ya que estoy, os pongo un tutorial. Pero antes,  una foto de La Palma de hace un par de semanas. ¡Qué cielo y qué ganas de volver!

Creo que no me molestaría para nada trabajar en el GRANTECAN.. aunque fuera de gratis...


Y ahora lo prometido (que no es deuda pero yo soy buena gente):

1. Instalar europecv: yo ya lo tenía instalado "de fábrica" en mi debian sid, pero debe ser algo relativamente nuevo porque en la anterior instalación (la de mi portátil que ya no tengo) no estaba. Así que, se baja de CTAN . europecv no es oficial, porque los europeístas decidieron poner el estándar oficial en .DOC (¿Hola?) En cualquier caso, yo lo hago con latex y europecv.

 2.Definición del documento:
\documentclass[helvetica, narrow]{europecv}
\begin{document}
\begin{europecv}
\end{europecv}
\end{document}

3. Información Básica: ponemos la información personal con los siguientes campos (si alguno no lo queremos poner, pues no se pone y listo)
\ecvfirstname{name} Sets the first name to name.
\ecvlastname{name} Sets the last name to name.
\ecvaddress{addr} Sets the address to addr.
\ecvtelephone{tel} Sets the telephone number to tel.
\ecvfax{fax} Sets the fax number to fax.
\ecvemail{email} Sets the email to email.
\ecvnationality{nationality} Sets the nationality to nationality.
\ecvdateofbirth{birth} Sets the date of birth to birth.
\ecvpersonalinfo Typesets personal information.


 4. Resto de datos: los datos se ponen en el currículum como secciones e ítems. Las secciones son las
\ecvsection{title} y los ítems son \ecvitem{left}{right}. Donde {left} será el título que aparecerá a la izquierda de la línea vertical del CV, y {right} el contenido de la derecha.
Ahora..¿qué secciones hay?

    *  Desired employment / Occcupational field
    * Work Experience: para cada empleo hace falta rellenar:
          o \ecvitem{Dates}{}
          o \ecvitem{Occupation or position held}{}
          o \ecvitem{Main activities and responsabilities}{}
          o \ecvitem{Name and address of the employer}{}
          o \ecvitem{Type of bussiness or sector}{}
    * Education and Training
          o \ecvitem{Dates}{}
          o \ecvitem{Title of qualification awarded}{}
          o \ecvitem{Principal subjects/occupational skills covered}{}
          o \ecvitem{Name and type of organisation providing education and training}{}
          o \ecvitem{Level in national or international classification}{}
    * Personal skills and Competences
          o \ecmothertongue[vspace]{language}
          o \ecvlanguageheader{symbol}
          o \ecvlanguagefooter[vspace] {symbol}
          o \ecvlanguage[vspace]{l1}{l2} {l3}{l4}{l5} (en l1,l2,l3,l4 hay que poner los niveles de cada cosa)
          o Ahora se pueden poner más ecvitem con Social skills & competences, technical skills and competences, etcétera..

La información sobre el estándar europeo y ejemplos aquí.

La información sobre la clase europecv y cómo funciona exactamente aquí.

Edit: para instalar el europecv en linux con aptitude:
$sudo aptitude install texlive-latex-extra texlive-latex-recommended texlive-fonts-recommended

Monday, March 1, 2010

Mendelssohn me recuerda a ti

Estaba leyendo "Conversaciones con Glenn Gould", un conjunto de entrevistas realizadas a Gould en 1974. Y lo vi claro. Mendelssohn me recuerda a ti. Mucho.

Cito fragmento del libro, donde Gould habla de las declaraciones de Mussorgsky sobre Mendelssohn y de la opinión que él tiene de ambos.
--
Me parece acertada la observación de Mussorgsky, aunque no lo sea el concepto: creo que acierta en su comentario sobre Mendelssohn, al que califica como un tipo puritano al que le gustaban los párrafos de dieciséis compases donde todo tenía que estar en su sitio, pero pasa por alto que Mendelssohn era un músico muy creativo en otra esfera, y para comprender esa originalidad debemos aceptar, ante todo, el rasgo dominante de su música: la candidez. Y aceptada esa candidez, incluso el movimiento más amable de Mendelssohn resulta una sorpresa; le basta un cambio mínimo, como dicen los jazzistas, para provocar esta sensación. Mussorgsky, sin embargo, necesita machacarte con un contraste forte-piano o con un fragmento quasimodal, o algo por el estilo. Pero reconozco que Mussorgsky me gusta, de veras.
...
Pero también estoy convencido de la validez de lo que dije antes acerca de la dicotomía Mendelssohn-Mussorgsky, de la existencia de un "cociente de singularidad" en la obra del primero que es mínimo pero audible precisamente porque es mínimo. En Mussorgsky, el "cociente de singularidad" es mucho más importante, o lo que es lo mismo: lo inesperado sucede con mayo frecuencia y, por lo tanto disminuye considerablemente la capacidad de sorpresa. Pero no así en Mendelssohn. A él le basta un gesto mínimo. Le basta que un pelo no esté en su sitio.
---

A falta de encontrar la versión de Gould:


Espero que te guste.

Saturday, February 27, 2010

The Fine Art of Not Knowing

"being a theoretical physicist is being like the composer of music. In fact I think there's only one essential difference between the two, naming that for musical composers one's hability is judged by the nature of the audience where's in theoretical physics is the audience of nature that provides the judgement."
Just fantastic.


I completely forgot to tell you the names of the people in the video (gràcies Irene): Richard Feynman, Carl Sagan, S. James Gates Jr and Freeman Dyson.

Thursday, February 25, 2010

El derecho al delirio

Ayer, de madrugada, me recomendaron un vídeo que me gustaría hoy recomendar a ustedes. Espero que les guste tanto como a mi.
La letra, de Galeano.



Y ya que estoy, leo en una de sus "ventanas sobre las paredes":
"En Buenos Aires: ¡Resucitaremos aunque nos cueste la vida!
En Lima: No queremos sobrevivir. Queremos vivir.
En la Habana: Todo se puede bailar.
En Río de Janeiro: Quien tiene miedo de vivir, no nace."

Creo que las paredes hablan, y cuando lo hacen, dicen más y mejor que los titulares de los periódicos, los noticieros, los libros de historia y la propagandística electoral porque, al final, todo lo escriben los mismos.
Sin embargo, siempre hay alguien dispuesto a hacer callar esas pocas paredes que echaron a hablar.

Dice John Berger: "las han pintado de blanco, como si no hubiera pasado nada, pero los muros siguen gritando bajo la capa de pintura".

Y pienso que tenemos suerte de que alguien escriba lo que otros borran de las paredes.

Hoy recuerdo la primera pared que vi hablar. Me dijo: "cuidado hombres grises, momo ha vuelto". No creo que yo tuviera más de 12 o 13 años.

Monday, February 22, 2010

A mitad de camino

A mitad de camino entre Las Palmas y Barcelona, empiezo a devorar un libro prestado de John Berger y me encuentro con una cita de Galeano.

"No hay historia muda. Por mucho que la quemen, por mucho que la rompan, por mucho que la mientan, la memoria humana se niega a callarse la boca. El tiempo que fue sigue latiendo, vivo, dentro del tiempo que es."

Me gustaría leerte, trocito a trocito, todos los retazos del libro que me gustan. Creo que a ti también te gustaría. Hasta viene con un poco de Johnny Cash en "Rose of my heart".

Friday, February 19, 2010

It looks like you are installing windows

Últimament escric posts molt aburrits, ho sé. Així que avui toca una tonteria que m'ha fet gràcia.

Wednesday, February 17, 2010

AHDL: Introducción

AHDL es un lenguaje de descripción hardware de alto nivel (propio de Altera) , diseñado para diseñar lógica combinacional compleja, tablas de verdad y diagramas de estados. Yo soy más de VHDL o Verilog, pero como AHDL le interesa a mi hermano, pues a continuación va un breve resumen:
Antes que nada, tenemos que saber que AHDL es un lenguaje concurrente, es decir, todo lo que se evalúa en la sección lógica (la lógica a ejecutar) se evalúa al mismo tiempo.
El lenguaje AHDL ofrece la posibilidad de integrar varias secciones distintas dentro de un mismo código. Están las secciones imprescindibles como la sección de subdiseño (se describen los puertos de entrada/salida y sus nombres) y la sección lógica (operaciones), y luego las opcionales como la declaración de constantes, de funciones, de variables, etcétera.


En primer lugar, declararemos las entradas/salidas en el apartado de subdesign:
SUBDESIGN comb1
{
     a0, a1    :INPUT;      %declaramos los pines de entrada%
     a2[7..0] :INPUT;      %entrada de 8 bits%
     s0, s1    :OUTPUT;  %declaramos los pines de salida%
     s2[15..0] :OUTPUT;  %salida16 bits%
     b0         :BIDIR;       %pines bidireccionales
}
Una vez hecho esto, podemos declarar constantes:
CONSTANT IO_ADDRESS=H"FF30"; %H" especifica valor en hexadecimal %
CONSTANTIO_ADDRESS=B"0010"; %B" especifica valor en binario%
Agrupar variables:
{
    a2[7..0]=s2[15..8]; %el bit 7 de a2 se asocia al bit 15 de s2, el 6 al 14, etc%
    a2[2..0]=inter; %asociamos los bits 2,1 y 0 de a2 a la variable inter
}
Poner opciones:
OPTIONS
    bit0=MSB; %asociamos el bit más significativo a bit0%
    bit0=LSB; %asociamos el bit menos significativo a bit0%
Y añadir nodos (variables intermedias)
VARIABLE
   Inter: NODE; %definimos variable para uso interno%
Una vez hecho esto, podemos pasar a la sección lógica:
BEGIN
     ..Instrucciones
END;
Las instrucciones pueden ser puertas lógicas: s0=a1&a2; %and% , s0=a1#a2; %or% , s0=!a1 %not%, etc..
Condicionales: IF .... ELSIF... ENDIF;
De selección: CASE a2[] IS
                                  WHEN B"00000010" => s1=1; %por ejemplo%
                                  ....
                     END CASE;
O también tablas de verdad:
TABLE
    %bits entrada=> bits salida%
     a2[]              => b2[];
     B"0000001" => B"1111111111111111";
     B"0000010" => B"1100000011111111"; %según tabla de verdad a implementar%
    ....
ENDTABLE;
Y a continuación, os dejo un ejemplo de una máquina de dos estados (s0 y s1), que es un sumador módulo 2
SUBDESIGN estados
{
     clock, reset, in    :INPUT;
     out                     :OUTPUT;
}
VARIABLE
   ss = MACHINE WITH STATES (s0, s1, s2, s3) %máquina de estados%
BEGIN
  ss.clock=clock;
  ss.reset=reset;
TABLE
  ss,    in  => ss,     out   %estado actual, entrada => siguiente estado, salida
  s0,   0   => s0,     0     %0 + 0 = 0 (devuelvo 0 y me quedo en el estado 0)
  s0,   1  =>  s1,     1     %0 + 1= 1 (devuelvo 1 y paso al estado 1)
  s1,   0  =>  s1,     0     %1 + 0= 1 (devuelvo 1 y el contador sigue a 1)
  s1,   1  =>  s1,     1     %1 + 1= 0 (devuelvo 0 y paso al estado 0)
ENDTABLE;
END;

Sunday, February 14, 2010

Working with Android. Chapter 1: Introduction

It's been at least a couple of weeks since my last post, and there's a lot of things I'd like to talk about. I've been studying and working on different (new) projects (some of them actually interesting).

The one I've been working on this weekend is an app to recognize handwritting for android SO mobiles and PDA's. Working with android SDK and Eclipse has been so cool that I decided to write down a few tutorials so you could also develop your own applications for android.

First: installing the development environment and the android emulator.
1. Remember this page: http://developer.android.com/. You have all the documentation / examples and references you need there. Just go and explore a little.
2. Download and install the last sdk package, which you can find here: http://developer.android.com/sdk/index.html
3. Do you have Eclipse? (better if you are familiar with it but don't worry if you aren't,  it is always a good time to start working with Eclipse). You can download it here: http://www.eclipse.org/downloads (download version 3.4 or newer).
4. Once you have SDK and Eclipse, you need to install the android plugin for Eclipse.  Run Eclipse and go to Help>Install new software>Add. Name: androidplugin Location:  https://dl-ssl.google.com/android/eclipse . Back to software view, select developer tools, then next, accept and finish. Restart Eclipse.
5. Configuring android plugin for eclipse: run Eclipse, select Window>Prefs>Android>SDK Location and fill with the SDK path. After that, apply and ok.

Second: creating an avd (android virtual device) and running the emulator
1. Go to you android sdk path/ and execute SDK Setup. Install the sdk components needed.
2. Create an android avd.  There is a graphical tool to manage/create your avds named android in /tools/.  Run android > select Virtual Devices > new. Write the name > select the android api and if you plan to work with a sdcard emulator (a .img file), then define the size of the sdcard you wish. Select Create AVD.
3. Once your avd is defined, you can start it by clicking Start>Launch. And your virtual Android will start! Easy, right?



Third: starting your own project
1. On Eclipse, select Files>New>Project>Android>Android Project. Click next.
2. Create the "hello world" app. http://developer.android.com/resources/tutorials/hello-world.html
3. On Eclipse, selct Run>Run, and you will be running your application in your virtual android device!

Some basics:
The interface (your application layout) is in /res/layout (an XML file).
The images/icons you are going to use, must be placed in res/drawable directories
Your code (java) is in /src/"package name"
Every application must have an AndroidManifest.xml file in its root directory. It has essential information about the application.  More about the manifest

And you are ready to play! Hope you have fun!

Tuesday, January 19, 2010

garota de ipanema

Me gustan las tradiciones. Bueno, vale, es mentira;  Siempre he odiado las tradiciones: se repiten, cansan y terminas sin saber el por qué de tanta tontería.. sobretodo si son las tradiciones de los demás. En realidad, lo que a mi me gusta es crearlas, y con eso me refiero al hecho de nombrar tradición a todo aquello que hago por lo menos una vez (o dos, tampoco vamos a ponernos..
-iba a decir puntillosos, pero suena a puntillero, que es una palabra nauseabunda, así que diremos platilleros,  que no tiene nada que ver en el contexto de lo que estaba diciendo y todos amigos
pues eso, platilleros).

Y por fin llego a lo que os quería contar: hay una milenaria tradición que consiste básicamente en que cuando yo estoy de exámenes, escucho garota de ipanema.

Monday, January 11, 2010

A lo Jeunet y Caro

Hoy me he dado cuenta de que hace un año que no actualizo mi blog. Mi otro blog, que es uno que anda ahí perdido por ser aún más extraño e incomprensible que este.

Y como estoy de trabajo/exámenes/prácticas/artículos/entregas/"muy vaga en realidad", he decidido rescatar un texto del otro blog, así actualizo por aquí y no se nota. Ahí va:

"Porque a mi me gusta destrozar cosas. Me encanta trazar palabras y luego quitarles las letras despojando el texto de su único recuerdo. Me gusta que huela a invierno, los diálogos de saramago, tocarlo todo. Me gusta Antonio Escohotado. El aburrimiento como una broca de dentista, las cargas. Ray loriga y sentir verguenza. Sobretodo sentir verguenza de uno mismo."


PD: Acabo de descubrir que José Manuel Sánchez-Ron (físico a quien admiramos mucho) ocupa el sillón G en la real academia de la lengua (desde el 2003, pero yo me di cuenta ahora).
Así que desde aquí aprovecho para mandarle un Orson. De hecho, necesitaríamos un Orson honorífico, porque además se despide en el discurso de ingreso a la RAE, citando a Carl Sagan. No se puede ser mejor. Discurso Ingreso Real Academia Lengua Española

Sunday, January 10, 2010

Checking IEEE compatibility with IEEE eXpress

If you are planning or you have submitted an article to IEEE, you may know it must adhere to the IEEE Xplore PDF specification.  It is, your pdf must be labeled within its document properties as being "Certified by IEEE PDF eXpress" or it won't be accepted.

PDF specification can be found here: IEEE Xplore PDF Specs

If you are in this situation, you may visit IEEE eXpress PDF site, which allows you to make IEEE compatible PDFs (by converting them) or check if your article is compatible or not (in case it is not, it will tell you the corrections you need).

And here's a mini-howto:

1. Go to http://www.pdf-express.org/
2. Register. You will need your conference id (e.g the conference id of ISCAS2010 is iscas10x).*
At this point, they will send you an email to confirm your account has been created and a reminder for the submission date of your conference.
3. Access to your account with your email and password. You will enter to a conference-specific webpage
4. Now click on Create new title. In Enter title info it is recommended to write the title of your article. Then Upload source file(s) for conversion and/or pdf(s) for Checking **
5. You will receive an email with your checked pdf or ieee eXpress-converted pdf attached. If you submitted a pdf for checking, the email will show if your file passed or failed and why.***
 
* Previous users, but using it the first time for a new conference: enter the new conference id,  your email and password. When you click Login, you will need to set up an accout. Click continue and enter your email and password. Now you can use your account to check/convert your pdf for this conference.
** With one paper ID you can convert 10 pdf files and check 3 (is not that much, so do not check/convert until your article is final).
*** If your pdf has passed, you will receive a message like this:
----

Congratulations! The following PDF has passed the PDF Check:
Filename: ***.pdf
Title: Title of your paper
Paper ID: id
Creation Date: 9 January 2010 14:29 -0800 GMT
The approved file is attached to this message, and is labeled within its document properties as being "Certified by IEEE PDF eXpress", with an exact date and time stamp. The file attached to this message is the file that you should submit to your conference's final paper collection site.
Please remember that ANY changes made to your PDF at this point could impact Xplore compatibility.  PDF eXpress has examined and passed only the file version submitted to the site. This email serves as the official confirmation.

----

Sunday, January 3, 2010

Bon any 2010!

A la espera de que la Irene escrigui un post molt interessant, aprofito per felicitar el 2010 i donarvos les gràcies a tots els que ens heu seguit aquest any. De veritat, moltes gràcies!!

Avui toquen un parell de cançons amb les que la Irene i jo vam creixer. Per la cara. Si peter pan viniera i Caperucita (les dos d'Ismael Serrano)

"Alguien entró de golpe en la habitación y encendió la luz. Y nos dimos cuenta de que casi no quedan niños, de que negamos el derecho a la infancia a los que la merecen. Si peter pan viniera a buscarnos no den la luz. No vaya a descubrir que le hemos traicionado: hemos crecido demasiado." (de la intro de Si Peter Pan viniera)

Si Peter Pan viniera (no té video, i goear no va avui)


i Caperucita:



PD: estic d'exàmens, així que segurament baixi la freqüència de posts.
PD2: aprofito per recordar que també podeu llegir aquest blog al reader de google (en els meus "shared items" o fent una subscripció a kinesina.blogspot.com)