Friday, August 13, 2010

Visual Studio and Qt.

In this post we will explain how to get Qt installation for visual studio.

1. Download Qt source code. This is currently available in the nokia website: http://qt.nokia.com/downloads,
Unzip the file into e.g. c:\qt\4.6.1-vc. Important to use a path with no embedded spaces, as the Qt build tools have problems with them.
Install the SDK completely. Install also the plugin for Qt in visual studio.



2. Add these 3 paths to the Environment Variables: “C:\Qt\2009.01\bin” ,
“C:\Qt\2009.01\qt\bin” and \VC\bin .


3. Run the Visual Studio Command prompt. Start > Program Files > Visual Studio > Visual and go to the Qt installation directory. Type vcvars32.bat.
This will create the environment variables required for the next step. The batch file resides in the VC\bin directory of your Visual Studio installation.

4. Type configure -platform win32-msvc2008. (will take a long time)
This will tell Qt to prepare itself for being compiled by the Visual Studio compiler. Again, if you use another version of VS than 2008, replace win32-msvc-2008 with the makespec appropriate for you. We need to this, because the prebuilt binaries that come with the Open Source Qt distribution for Windows cannot be used by the Visual Studio compiler.So to fix this, we have to build those files from the Qt sourcecode using the Visual Studio compiler.

5. Type nmake (will take even longer)

6. It will stop after a LONG while with an error

7. Delete all the instances of mocinclude.tmp, they are usually in:
src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared

8. Run nmake again

9. Go to your qt app and run qmake –t vcapp

10. This should create a sln for the project

You should now be able to build your Qt project in visual studio



References:
http://tom.paschenda.org/blog/?p=28
http://www.qtforum.org/article/31561/error-when-building-libraries.html
http://dcsoft.wordpress.com/2010/01/30/how-to-setup-qt-4-5-visual-studio-integration/
http://docs.google.com/viewer?a=v&q=cache:3e0M85Vdd3wJ:portfolio.delinkx.com/files/Qt.pdf+qt+visual+studio&hl=en&gl=us&pid=bl&srcid=ADGEEShHdqxYfPWGn-PCxWty0Z9ehLVLaPv-qlpDeaLAlcohpIxHFWMw-PqM4N5euTpmRrxOA5fSX8l6KJZmq-ttAfPgNqt8io-kjHQt5j3RWQgySF5MFnXGeXufW6jEipZCRVuZ8yqA&sig=AHIEtbRYvPmPZUfMm1fb0SVKaSjfYX_BVg

Watching some QT movies with a cute chic

Recientemente me vi con el problema de que queria hacer una aplicacion que tocara videos con extension .mov (Un archivo de tipo MOV representa un formato especial de QuickTime para guardar audio y video ) dentro de una aplicacion hecha con Qt. (Qt es un framework para el desarrollo de aplicaciones para que corran en multiples plataformas (Linux, windows, mac etc) y comunmente se suele usar hacer apliaciones graficas, esto es, aplicaciones que tienen ventanitas, menucitos etc.)

La documentacion para hacer programas que toquen videos de tipo .mov no es NADA amigable, por lo que decidi hacer este peque~o tutorial respecto a como se puede lograr esto.

Qt posee una clase llamada QMovie,con la cual se pueden mostar aniamciones sencillas que no cuentan con sonido ( lo cual estaba perfecto para lo que yo queria hacer) En resumen QMovie permite leer y cargar una aniamcion simple, como una animacion de tipo .GIF. Por lo cual si lograramos convertir nuestras aniamciones en formato .MOV a .GIF nuestro problema estaria resulto. Y bien, gracias a Google, encontre esta peque~a applicacion que justamente lleva esto acabo: http://www.geovid.com/VidGIF
Y ya con nuestro video convertido en .GIF el codigo para hacer una ventanita que toque nuestro video es muy sencillo:

#include qtgui qapplication
#include qwidget
#include qhboxlayout
#include qlabel
#include qmovie
#include qpushbutton
#include qslider
int main(int argc, char *argv[])
{

QApplication a(argc, argv);
QWidget *win=new QWidget();
QHBoxLayout *lay=new QHBoxLayout();
QPushButton *play=new QPushButton("PLAY");
QPushButton *stop=new QPushButton("STOP");
QLabel *label=new QLabel;
QMovie *movie = new QMovie("Resources/musica.GIF");
movie->start();
label->setMovie(movie);
QObject::connect(play,SIGNAL(clicked()),movie,SLOT(start()));
QObject::connect(stop,SIGNAL(clicked()),movie,SLOT(stop()));

lay->addWidget(label);
lay->addWidget(play);
lay->addWidget(stop);
win->setLayout(lay);
win->show();
return a.exec();
}



Basicamente estoy cargando la pelicula, la agrego a una etiqueta la cual despues es agregada al widget, tambien agrego dos botones, los cuales sirven para detenerla y tocarla y finalmente presento al usuario la ventanita.
Esta es una manera sencilla de correr en QT peliculas de tipo .mov, aunque solo es valido si no nos interesa el audio que tiene la pelicula, para cosas mas complicadas que involucran audio es necesario checar otras clases que proporciona qt.
Los dejo con la ventanita que se crea, asi como con una imagen de la pelicula que esta tocando:
Arnie de Californiavspace=10 width="400" height="135">

Tuesday, July 06, 2010

About a Kid who rocks his code...

En este blog somos grandes fans de la tecnologia, y mas cuando se trata de tecnologia proveniente de la Maxima casa de Estudios, ie La Universidad Nacional Autonoma de Mexico, like most tecnology coming from Latin America is. Y es por eso que hoy hablaremos de dos applicaciones para el iphone desarrolladas por un joven estudiante de la Facultad de ingenieria de la UNAM que atacan la usabilidad integrando el uso de diversos sensores que se encuentran sobre el celular.
El post se desarrollara de la siguiente manera, primero expondre de que tratan los dos productos y despues tendremos una super entrevista especial con el autor de los mismos.
Es la priemra entrevista conducida en este blog!!

La primera aplicacion de la que hablaremos es Ubicate!

Pulpit rock
Que mejor que dejarles la descripcion que viene en la pagina de itunes para el producto:
"...Ubicate! is the new software for iPhone and iPod touch you need when using Mexico City's Metro, MetroBús, Tren Ligero (Light Train) and Tren Suburbano.
Don't know how to get from station A to station B?
Don't worry! Ubicate! is the smartest guide telling you in which direction you should take the train or bus, where to get off and when to make a connection with other lines or systems. Every information is presented in color, so it's even easier to follow the instructions."

Este programa hace uso de la localizacion del usuario via GPS, Google maps y tecnicas de inteligencia artificial para encontrarte la ruta de transporte publico mas conveniente dado donde te encuentras. Estas tecnicas antes habian sido usadas en robots moviles navegadores que intentaban encontrar el suministro de energia mas cercano, al joven Zarate se le ocurrio ir un paso adelante y sacar una util applicacion para cualquier chilango o para cuaLQUier visitante de la tierra Mexica. (Espero que todos ya tengan entre sus planes futuros ir al Mexico City baby! B-)

La segunda aplicacion de la cual hablaremos es de Glucose Monsters!
Pulpit rock

Glucose Monsters is the new software for iPhone and iPod Touch that helps you keep track of your glucose levels, blood pressure and weight.

- It's easy and fast to use.
- Provides useful information: Monitors changes on weight, and displays minimum, average and maximum values of glucose for week, month and year.
- Visual Information: Rotate your device in the statistics screen to see a graph of your glucose levels (available per week, month and year).
- Logs: Every record is kept so you can review it or show it to your health care team.
- Fun and rewarding: Unlike any other software of its genre, it's fun! Our Glucose Monsters will cheer you up and share a tip every time you add a new entry.


Glucose Monsters is more than just keeping records of glucose measures. It can keep track of weight and blood pressure measurements but it's also about doing it efficiently (move the slider, click 'add' and you're done) and doing it in a way that is rewarding. The graphs, the statistics, the slick interface and our monsters are there with the purpose of giving you positive feedback and ways to notice if you are taking enough care of the disease or not. We want you to shift from a "I'm doing it wrong" attitude to a "I've been doing it right" or "I can and I want to do it better" one.

You haven't used anything like this before!


Mi aplicacion favorita es Glucose Monsters, porque me parece el mercado en salud es muy grande y no es algo que se ha abordado del todo bien. It's always so borning to look at charts! Pero aqui lo volvieron divertido! Muy buena idea!

Y para hablarnos mas del producto, tenemos una entrevista especial privada y secreta con Hector Zarate! Las chicas pueden dejar en los comentarios sus correos, puede ser que el vea este post y les conteste, dejen su foto..jaja :P
Hablando de fotos Aqui hay unas del autor:























..pretty fly for a white guy huh?
Y la entrevista va asi:
Saiph: Por que decidiste empezar a hacer aplicaciones para smart phones? Por qué fue iphone y no por ejemplo para el n900?
Hector: Pasé las vacaciones de Verano pasadas en la ciudad y creo que tanto tiempo libre me hizo pensar: Bueno, podría hacer un proyecto de Verano. Casualmente usé mucho el Metro en esa temporada y ahí se me ocurrió Ubícate!, tal vez en algún viaje revisando el mapita me dije: estaría chido que tu iPhone te dijera para dónde ir o que tomar.
Entonces iPhone era una plataforma muy "sexy" por decirlo así. Era un dispositivo bastante novedoso (o al menos hype) junto con un SDK consistente que permitía jugar con todas esas novedades: sensores de movimiento, GPS, etc.
Encima existía el App Store, un servicio que me parece magnífico porque permite que desarrolladores de software pequeños exhiban, distribuyan y vendan sus aplicaciones en un mercado global y que te deja concentrar en el desarrollo de tus aplicaciones en lugar de otras cosas como: cómo cobrar, distribuir la aplicación, generar serials, etc.

Saiph: Como ves el futuro del smartphone en Mexico?
Hector:Hoy vi en la televisión un montón de anuncios de teléfonos. Todos tenían cámara y tocaban música; y a excepción de los "low-end" todos se conectaban a Facebook o Twitter y les podías instalar aplicaciones. Creo que todos los teléfonos están adquiriendo capacidades de smartphones, así que puede ser que la categoría de "smartphone" desaparezca.
Por otra parte, no se trata solo de los dispositivos porque son los servicios de telefonía e internet móvil lo que los hace interesantes. Lamentablemente el costo de estos servicios en México no han permitido la "democratización" de estas tecnologías sino que al contrario, la han convertido en una tecnología muy excluyente. Mientras esto no cambie, veo el potencial de los teléfonos mexicanos como limitado.

Saiph: Glucose Monsters y Ubicate tienen alguna filosofia en comun?
Hector:Claro! Queremos hacer software que sea útil y que en verdad resuelva algún problema y al mismo tiempo intentamos darle un enfoque distinto, poner mucha atención al arte y a la usabilidad para que la experiencia del usuario sea única y que eso nos identifique. Glucose Monsters nos hizo sentir muy satisfechos en ese sentido. No es la primera aplicación en iPhone para que personas con diabetes lleven sus registros de glucosa, pero ninguna tiene un concepto parecido al nuestro. También fue importante porque con ese proyecto aprendimos como hacer converger todas estas ideas que tal vez sean más evidentes con los siguientes productos que vamos a publicar en el App Store. ;)

Saiph: Como piensas que el numero de sensores que ahora poseen los smart phones afecte la interacion entre el usuario y la maquina?
Hector:Piensa en la interacción humana: tomar una cerveza con un amigo, preguntar por una calle cuando estás perdido, jugar algún deporte o bailar. Son experiencias que involucran todas las capacidades físicas del hombre: voz, contacto visual, gestos, lenguaje corporal o hasta una actividad física muy intensa. Ahora piensa en la interacción con las computadoras hasta hace unos años: no había voz, no había movimiento, en realidad la interacción estaba limitada a los dedos. Sin embargo, los nuevos sensores e inputs están extendiendo el dominio de esta interacción, están "naturalizándola" por decirlo así. El Wii es un buen ejemplo de esto y el iPhone va un poco en esa dirección también. Ese es el cambio mas importante que veo: el hacer una interacción mas natural entre el hombre y los dispositivos.

Saiph:Desarrollaste algun plan de negocio cuando sacaste Ubicate y Glucose Monsters? Fue esto complicado? Para alguien que proviene de un contexto de ingenieria que problemas existen?
Hector: Al principio no, después la idea empezó a crecer un poco y ahora sí, estamos terminando de afinar el plan de negocio, esperando el registro de la marca y trabajando también en los nuevos proyectos. Las dificultades que veo para un ingeniero es que el desarrollo de un producto final y de una empresa implica muchas otras cosas además de hacer código, pero la solución que hemos encontrado está en la colaboración de personas de distintas áreas.

Saiph:Crees que hay apoyo en Mexico para desarrollar tus propias ideas de aplicaciones?
Hector:A diferencia de otros, un emprendimiento de software puede llevarse a cabo sin la necesidad de grandes espacios, máquinas-robots futuristas o capitales astronómicos. Para mi, depende más del capital humano. Me gusta pensar que el talento y los conocimientos son los factores clave en el desarrollo de software y que una buena idea puede empezar sobre la MacBook más barata o dentro de un edificio de millones de dólares. Ahora, la forma de invertir en el capital humano es a través de la educación y en mi experiencia, la UNAM esta haciendo un esfuerzo importante en este aspecto. Aunque no concuerdo en muchas cosas con mi institución, reconozco un esfuerzo constante por dar acceso a información de calidad a la comunidad: becas, recursos electrónicos, actividades, cursos... En la Facultad de Ingeniería hay muchos cursos de programación, tecnología y recientemente he visto algunos otros sobre emprendimiento, marketing, etc... Incluso acaban de inaugurar una incubadora de negocios. Así que no puedo decir que no exista apoyo para desarrollar todo esto.

PREGUNTAS PERSONALES!!! <3>

Saiph:Que te gustaria que estuviera escrito en la lamina de tu tumba?
Hector:Cómo sería difícil poder decir algo importante había pensado en algo más divertido como: "Ahí nos vidrios", "Mala Pata" o "Puto el que lea esto".

Saiph: haha...
Saiph:Existe alguna cancion que te pone de buen humor cuando la escuchas?
Hector:Muchísimas! Creo que un día voy a hacer un mixtape con todos ellas. Algunas son: Raúl Midon - State of Mind, Tiga - Far From Home, Mose Allison - I Don't Worry About A Thing, David Bowie - Let's Dance, Pharrel Williams - Angel, The Guillemots - Made-Up Lovesong #43... Sí, definitivamente voy a hacer un mixtape con eso.

Saiph: Tienes algun talento secreto? Cual es?
Hector:Dejaría de ser secreto si lo revelará aquí. ;)

Saiph: Nombra alguna cosa unica a la cual le temes:
Hector:Zombies?


Muchas Gracias Hector!

Tuesday, June 29, 2010

Preparando la cancion de Giovani Dos Santos



El partido del domingo donde jugo Mexico-Argentina (disculpen la falta de acentos estoy en una maquina anti latina :( Sufri una gran depresion. Aunque sigo creyendo en la actitud que tiene Giovani Dos Santos y Chicharito. Ellos realmente me inspiran a trabajar mejor. Digo si estos chiquillo se estan rompiendo su madre en su trabajo, como yo no voy a hacer lo mismo en el mio?

Espero que se aprenda de errores de este mundial y el proximo mundial contemos con un mucho mejor tecnico. Me molesta esa situacion porque creo que se tenia talento pero no se supo aprovechar.

En fin sigamos adelante...
Cabe se~alar que estoy muy emocionada por el encuentro Argentina-Alemania. Quiero decir que admiro mucho toda la cultura de futbol que tiene alemania. Amo sus canciones futboleras. Me parecen motivantes.Alzan el espiritu!
Voy a compartir una las canciones futboleras alemanas que mas me agrada, tal vez la letra no es tan espiritual ( Hay otras que si lo son) pero en lo personal me divierte y me pone de buen humor.

! Los geht's Deutschland, kämpfen und siegen!






Das Lu Lu Lukas Podolski Lied
Poldi Poldi Halleluja
Poldi Poldi Halleluja
Poldi Poldi Halleluja
Es gibt einen Fußballgott

Manche Spieler, die sind einfach schwach
Du regierst den Ball und hälst ihn flach
Manche, die sind faule Millionäre
Doch dir geht es einfach um die Ehre

Nach dem Spiel ist wieder vor dem Spiel
Und läuft es auch mal nicht so, wie man will
Wirst du trotzdem immer alles geben
Denn für dich bedeutet Fußball Leben
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski

Wichtig ist ganz einfach auf'm Platz
Alles andere ist doch Ersatz
Du bist jung und du bist wild
Manchen Torwart hast du schon gekillt
Die Fans, die singen "Lukas, WE LOVE YOU"
Ja, du hast echt den Goldnen Schuh
Komm und mach das Dingen endlich rein
Denn dann singen alle im Verein:
Lu-Lu-Lu-Lukas Podolski Lu-Lu-Lu-Lukas Podolski
Goldi Poldi Halleluja
Goldi Poldi Halleluja
Goldi Poldi Halleluja
Es gibt einen Fußballgott
(Der Angriff läuft über rechts,
geht über links,in die Mitte,
in der Mitte steht wer?)
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
(Die 90. Spielminute läuft,
der Ball kommt aus dem Mittelfeld,
schießt zu Poldi,Poldi steht frei
vor der Hütte -Tooor!!!)


La cancion de Lu Lu Lukas Podolski
Poldi Poldi Halleluja
Poldi Poldi Halleluja
Poldi Poldi Halleluja
Existe un dios futbolero.
Muchos jugadores son simplemente muy chafas
Tu dominas el balon y lo puedes sostener como una tabla. Muchos son unos millonarios huevones.
Y si, la neta, la tierra gira simplemente alrededor tuyo.
Despues del juego es antes del juego *
Y a veces las cosas no pasan como uno quisiera, pero a pesar de ello, tu siempre daras tu maximo ya que para ti la vida es Futbol!
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lo importante es quedar en primer lugar, lo demas ciertamente es pura compensacion.
Tu estas joven y estas bien loco.
Ya te haz matado a muchos porteros
Los Fans te cantan: "Lukas, WE LOVE YOU"
Si, la neta tu tienes el zapato de oro.
Ven y haz que las cosas queden por fin perfectas y asi despues toda la sociedad te cantara:
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Goldi Poldi Halleluja
Goldi Poldi Halleluja
Goldi Poldi Halleluja
hay un dios futbolero

(la ofensiva corre hacia la derecha, se va a la izquierda y en medio, y en medio quien esta?!)
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
Lu-Lu-Lu-Lukas Podolski
(Al minuto 90 la pelota llega a medio,se la lanzan a Poldi,Poldi queda enfrente de la porteria-Goool!!! )




Aquí está la rolita:


Y aquí hay algunas notas acerca de algunas cosillas que menciona la canción:
Nach dem Spielt ist vor dem Spielt==despues del juego es antes del juego, esta es una frase que surgio de un entrenador de futbol aleman. Que me parece llevo al equipo a la gloria en un mundial. Lo que significa la frase es que una vez que haz terminado de jugar un partido, ya estas pensando y preparandote para el siguiente partido que jugaras.
Espero disfruten estas canciones alemanas, ojala alguien me pueda ayudar a hacer una cancion similar para Giovani Dos Santos. Aunque no se vale invitar a Belinda. Mejor libre solterito sin apuros ;) haha :P
Pondre una foto de Giovani, mostrando su coraje y como tambien merece su cancion:



Tuesday, May 18, 2010

Support Vector Machine Tutorial with OpenCV 2.1 for Dummies

Debido al enorme tiempo que me tomó poder hacer este pequeño código, decidí escribir el código en mi blog y ayudar así a futuras personas que de pronto se atoren con algo similar. "what comes around goes around".
¿Que fue lo que me atormento desde el Domingo por la noche?

Poder utilizar la librería de aprendizaje de máquina que proporciona la nueva versión 2.1 de OpenCV para tener un clasificador de tipo "Support Vector Machine" . ( No tengo la menor idea de cómo se dice, Support Vector Machine en español , Lo podría buscar, pero no he dormido bien en los últimos días..., Entonces al lector que lo averigue y me lo haga saber, ganará un regalo especial de este blog =)

Así que el propósito de este post, será tener el clasificador corriendo. Para ello, asumiremos que sólo tenemos dos clases, las cuales tienen las etiquetas de -1 y 1.
Cada clase tiene elementos, estos elementos son puntos en 2D.
La clase 1 asumiremos que tiene los siguientes elementos:
3,2.5
6,5.5,
La clase 2 tiene:
-5,5.5
-7,6
-8,-3
Lo unico que probaremos es tener un clasificador que si le envió 3, 2.5 diga: Clase 1 B-)

En C++ y usando la librería de opencv, esto se traduce a :


#include "highgui.h"
#include "cv.h"
#include "ml.h"
#include "cxcore.h"
#include "cxtypes.h"
//#include "cell.h"
#include "celda.h"
#include
//#include
using namespace std;
using namespace cv;

int main()
{
/*Aqui creamos las posibles etiquetas que existirán, las etiquetas
correspondrán con el número de clases que existen, y el número de etiquetas corresponde con el número de ejemplos de aprnedizaje que existen*/
float array_labels[]= {1.0,1.0,-1.0,-1.0,-1.0};
/*Aqui declararemos los datos que se usarán para entrenar, nótese que estoy diceindo que habrá 5 ejemplos de aprendizaje, cada uno con dos valores, la etiqueta del primer elemento corresponde con la primera etiqueta guardado en array_lables.*/
float array_trainData[5][2] = { 3,2.5, 6,5.5, -5,5.5, -7,6, -8,-3};
/*Creamos matrices de opencv que guardarán estos datos*/
cv::Mat trainData(5,2,CV_32FC1,array_trainData);

cv::Mat labels(5,1, CV_32FC1, array_labels);
/
*Creamos el support vector machine*/
CvSVM SVM;
*Lo entrenamos*/
SVM.train(trainData,labels);

/
*Vamos a probarlo!, tomaremos cada uno de los datos del training set, y veremos si nos da la espuesta correcta*/
for(int i = 0; i <5;>
{
double r;
r = SVM.predict( trainData.row(i) );

cout<<"classified as "<<


}

}


Y eso es todo amigos =)
Si ese pequeño código me hizo tardarme aaaños =(
Para un tutorial de Support vector machines chequen: http://citeseer.ist.psu.ed/burges98tutorial.html
y la libreria de machine learning de opencv puede ser consultada en:
http://opencv.willowgarage.com/documentation/cpp/support_vector_machines.html#cvsvm-train

Nota que este tutorial es de la Ultima version 2.1 de opencv! Creo que es de los pocos tutoriales disponibles en LINEA! and of course it is in spanish =)

...Por cierto, acabo de encontrar esta CANCIÓN POR FIN Youtube, y por el nombre del blog, me parece adequado compartir:

Saturday, April 03, 2010

Das All und dein Lächeln :)


Es viernes de traducción de música alemán. Hoy escuché una de esas canciones cursis en donde recuerdas al amorcino con el convives día a día y te trae tantas sonrisas. No tengo mucho que decir hoy, fue un buen día con muchas sonrisas. Anywho without further a due.




Lass mich nie mehr loss...

Wie New York ohne Sinatra
Wie Wien ohne den Prater
Wie ein Herzschlag ohne Blut
Wie Lindenberg ohne Hut
Wie ne Eiszeit ohne Schnee
England ohne Tee
So als ob bei Steve McQueen die ganze Coolheit fehlt

Jeder Boxer braucht ne Linke,
Kiss braucht viermal Schminke
Tonic braucht Gin.
Wie wär ein Leben ohne Sinn?
Wie ein leeres Paket
Wie ein Rad das sich nicht dreht
So als ob anstatt nem Sturm nur ein leichter Wind weht



So bin ich ohne dich
Du hältst mich mir fehlt nichts
Lass mich nie mehr los
Lass mich lass mich nie mehr los
Lass mich nie mehr los
Lass mich lass mich nie mehr los

Wie das All ohne Planeten
Astronauten ohne Raketen
Paul Newman ohne Clou
Old Shatterhand ohne Winnetou

Wie ein Dieb der nicht stiehlt
Wie ein Wort das nicht zählt
So als ob dem Alphabet ein Buchstabe fehlt

So bin ich ohne dich
Du hältst mich mir fehlt nichts
Lass mich nie mehr los
Lass mich lass mich nie mehr los
Ich lass dich nie mehr los
Lass mich lass mich nie mehr los

Lass mich nie mehr los
Lass mich lass mich nie mehr los
Lass mich nie mehr los
Lass mich lass mich nie mehr los
So bin ich ohne dich
So bin ich ohne dich
So bin ich ohne dich (wie ein Herzschlag ohne Blut)
So bin ich ohne dich (lass mich nie mehr los!)

Lass mich nie mehr los




Ya no me dejes ir

Como Nueva York sin Sinatra.
Como Austria sin Prater
Como un latido de corazón sin sangre.
Como un Glaciar sin nieve.
Inglaterra sin su Té.
Como si SteveMcQueen perdiera toda su actitud cool.
Todo boxeador requiere de un brazo izquierdo.
Kiss requiere de mucho maquillaje.
La quina requiere de la Ginebra.
¿Cómo sería una vida sin sentido?
Como un paquete vacio.
Como una rueda que no gira.
Como si en vez de la tempestad se tuviera tan sólo un viento suave.

Así soy yo sin ti
Tu me abrazas y no me falta nada.
Ya no me dejes ir
Ya no me dejes ir
Ya no me dejes ir.
Ya no me dejes ir.

Como sería el universo sin planetas.
Astronautas sin cohetes.
el Viejo Shatterhand sin Winnetou
Como un ratero que no roba,
como una palabra que no cuenta,
como si al alfabeto una letra le faltara.

Así soy yo sin ti.
Tu me abrazas y no me falta nada.
Ya no me dejes ir
Ya no me dejes ir
Yo ya no te dejaré ir
Ya no me dejes ir
Ya no me dejes ir
Ya no me dejes ir
Ya no me dejes ir
Ya no me dejes ir
Asi soy yo sin ti
Asi soy yo sin ti
Asi soy yo sin tu (Como un latido de corazon sin sangre) Asi soy yo sin ti
(Ya no me dejes ir!)
Ya no me dejes ir






Aquí está la rolita:



Y aquí hay algunas notas acerca de algunas cosillas que menciona la canción:
Prater es un parquecito muy famoso y caracterísitico de Austria
SteveMcQueen era un actor al que le llamaron el Rey del Cool->King of Cool
El Viejo Shatterhand era un personaje ficticio de las novelas del viejo Oeste, era un alemán que tenía de mejor amigo a un indígena llamado Wnnentou

Sunday, February 28, 2010

The hate and love relationships on social networks...

I had recently the "joy" of reading a very interesting articled by Jure Leskovec, Daniel Huttenlocher, and Jon Kleinberg. And since it's a lazy sunday afternoon,I thought I might take the time to comment on my readings. The paper is titled "Signed Networks in Social Media", and this paper studies how the interaction between positive and negative relationships affects the structure of online social networks. They considered that the richness of a social network consists of a mixture of both positive and negative interactions that co-exist in one single structure.
It might be difficult to understand at first what a negative or a positive relationship in a social network is, since the vast majority of social networks only allow for positive relationships. Facebook for example, only permits users to designate who their friends are and state that they like the activity, status, picture etc of an individual. A user for example, is not capable of showing his dislike for another person's activity.
The study they carried out was therefore focused on social networks that do allow for positive and negative relationships.They obtained large-scale datasets from social applications where the sign of each link-positive or negative- could be reliably obtained.The social networks that were studied are:
  • Epinions: an online rating site that lets people give both positive and negative ratings not only on items but also to other raters. It basically has Web of Trust per User: A network of reviewers whose reviews and ratings the user has consistently found to be valuable. It also has a Block List: list of authors whose reviews the user did not find valuable. “... If you encounter a member whose reviews are consistently offensive, inaccurate, or otherwise low quality, you can add that member to your Block List...”

  • Slashdot: An online discussion site that allows users to tag other users as "friends" or "foes". The user can observe the different kind of relationships it holds with each different user. So if a person were to add someone as a friend, he/she would view them as a friend->http://slashdot.org/my/friends. While if you add a user as a foe, you view them as a foe. http://slashdot.org/my/foes
    If a user adds you as their friend, you would view them as a fan http://slashdot.org/my/fans
    If a user adds you as your foe, you would view them as a freak. http://slashdot.org/my/freaks

  • Votes for Wikipedia admin candidate:When a Wikipedia user is considered for a promotion to the status of an admin, the community is able to cast public votes in favor of or against the promotion of this admin candidate. A positive vote is taken as a positive link from the voter to the candidate, and a negative vote as a negative link.

    This paper worked with the 3 datasets stated above and used these datasets along with 2 different theories of signed networks to reason about how different patterns of positive and negative links provide evidence of the different kind of relationships that exist across these networks. The 2 different theories of signed network that were used are:

    Structural Balance Theory: This was a theory that was proposed by Heider (1958) . Balance theory deals with three kinds of entities. The person (P) whose subjective environment we are concerned with, another person (O); and the object (X), which may be a third person.



Balance theory proposes that with three entities, person-another person-object (POX), three sets of relations exist i.e. between P and O; between P and X and; between O and X
Each of the three relations, P-O, P-X and O-X, can have one of two values. You can either 'like' (+) or 'dislike' (-). With three sets of possible relationships, each taking on one of two values (+/-) eight possible states of affairs exist. This theory states that balance state occurs when all sign multiplication of its sentiment relation charges positive.
For example, take the following diagram:

Here we have P, who we can name Pete that likes O, who we will call Olivia. Pete happens to hate hot peppers and chocolate, X. Balance Theory says, that for the relationship of these 3 individuals to be balanced, Olivia would also need to hate hot peppers and chocolate.
Some of the basic guidlines that Balance Theory follows are:
my friend’s friend is my friend
my friend’s enemy is my enemy
my enemy’s friend is my enemy
my enemy’s enemy is my friend

Now, for this paper they started analysis the social networks mentioned above, by comparing if these networks effectively followed the theorems of Balance theory , in this first stage they only considered undirected relationships between individuals, ie they only considered that Pete likes Olivia, but they did not consider whether or not Olivia likes or dislikes Pete. To carry out the comparative,the frequencies of different types of signed triads were taken into account.
They stated that a certain triad was overrepresented when the following occurred:
p(Ti ) larger than p0 (Ti )
Where P(Ti) represents the fractions of triads Ti. (Ti represents the number of triads of type Ti, for example it could represent the number of 3 person relationships whose edges are all POSITIVE) And P0(Ti) is the apriori probability of Ti based on sign distribution.
They also stated that a certain triad was underrepresented,
if p(Ti )less than po(ti) .
They saw that using status theory they were here able to explain much better these social interactions.
Status theory, claims the following:
Considering nodes A and B, a positive edge from A to B means: “I think B has higher status than I (A) do” A negative edge from A to B means: “I think B has lower status than I (A) do”
Thus, the theory of status predicts that if A links positive to B, then “A regards B as having higher status and" and if B links positive to C then " B regards C as having higher status – so C should regard A as having low status and hence be inclined to link negatively to A














The following table presents their findings:



ti referes to the selected triad. count refers to the number of times that particular triad was encountered in the network. P (+): prob. that closing red edge is positive;SG: surprise of edge initiator giving a positive edge (This is, surprise that Pete would give a positive link to Olivia);Sr: surprise of edge destination receiving a positive edge (surprise that Olivia would get a positive link);Bg:consistency of balance theory with generative surprise;
Br: consistency of balance with receptive surprise;
Sg: consistency of status with generative surprise; Sr: consistency of status with receptive surprise.

They also analyzed, mutual back and forth interactions,they noticed here that the principles of balance are more pronounced than they are in the larger portions of the networks where signed linking (and hence evaluation of others) takes place asymmetrically. They noticed that balance-based effects seem to be at work in the portions of the networks where directed edges point in both directions, reinforcing mutual relationships.

They also noticed that positive ties are more likely to be clumped together,while negative ties tend to act more like bridges between islands of positive ties.

Another interesting observation that they made, was that in their real data, an edge that was more embedded tended to be increasingly positive. These findings are consistent with the social-capital theory that states that embedded edges are more “on display" and thus tend to be positive.
The following picture shows these findings. Rnd denotes random signs created from the network, and real denotes the true signs that this network holds.


















Conclusion:

This paper presents a new perspective on how to reason social media sites by interpreting it as interactions between positive and negative relationships.
They also provide good insight with valid results, on to what theory depending on the network, is more fitted on explaining the nature of the network, i.e whether the network is directed or undirected.
I only have one doubt about the paper: They said that "...balance-based effects seems to be at work in the portions of the networks where directed edges point in both directions, reinforcing mutual relationship..", we could take these portions of the network as the community. Other papers, have only been interested in studying the community aspect of social networks, and feel that when in large scale these communities blend into the entire network, true human behavior is lost. Therefore we could question, if their status theory is modeling human behavior accurately.

None the less very interesting article, would highly recommend :)