November 3, 2008

Hack.Lu 08

Hello!
Finally got home from the old continent. I've been presenting a work I've working on the last months. First of all I must say the organization of Hack.Lu was great. It's a small single-track conference where most of the people are from France, Germany, Belgium and of course, Luxembourg!
I've met a lot of cool people and must say Fred (one of the conference organizers) did a great job and helped me a lot, thanks fred.

As for the talks, there were quite several I liked, I will only mention two:


  • Various Ways of Classifying Malware (H. Flake and S. Porst from Zynamics): They showed the awesome tool called VXClass, which is intended to aid in malware classification into families. As always, great apps. from bright people. I recommend you have a look on what they're doing


  • The guys from RedTeam Pentesting GmbH showed what they've learned while doing JBoss pentests. Basically walked through configuration issues and exploited them live. A very interactive talk and with a lot of things to take into account while deploying/doing-something with the JBoss plattform.



Regarding my presentation, I'll soon publish the code and upload the slides. It is basically an environment which uses instrumentation provided by Core Grasp. Check out soon for the material.

That's all for now,

g

June 5, 2008

ET Phone Home: about neutrinos

(this entry is a translation from the original spanish version of this blog)

Yesterday reading slashdot I ran into a
paper (pdf) about some guys talking abount intergalactical communications (sounds like science fiction but basically they talk about very big distances across space) which as the communication medium use neutrinos.

To have a better understanding of what they were talking about I went back to read more carefully what neutrinos are, which types of neutrinos we can find, etcetera. Some history:

(NOTE: I discovered that physics papers like this one are very difficult to read for a newbie like me. I feel them like a 13th century narration about some sort of mathematical construction but ok then, must be their own style)

Neutrinos

Neutrinos are from the
Los neutrinos son de la familia de los fermions family, which are very-very small particles, so small that they can penetrate any matter type (even smaller than photons).

So W. Pauli postulated the notion of "neutrino" so he could fix a math error in a formula while he was measuring the conservation of energy and momentum in beta decays (according to the wise Wikipedia, this is when as a result of a radioactive decay a beta particle -electron or positron- is expelled). He postulated (apparently) in order to describe a non-detected particle which was carrying the energy missing in his lab tests, measuring energy, momentum and angular momentum.
The name "neutrino" was given byE. Fermi but I will not go further on this since I haven't read anything.


Back to the paper. They first discuss which types of neutrinos are better for this type of communications, based on their signal/noise level acceptance. They also evaluate differently "energized" neutrinos (measured in eV, electronVolt - 1 MeV/c² = 1.783×10−30 kg, seems like in particle physics, quantum level, mass and energy are interchangeable, thanks to Einstein's work, so this measure is used as a mass unit and energy one).

One of the things they postulate is that the people from SETI which are a foundation which tries to explain life in the universe, doesn't find a single signal coming from the outer space (or further...) because information is no longer transmitted over photon-based channels or even bigger particles. Hence, since we (humans) don't have the technology needed to catch smaller particles we cannot listen to ET's family calls.

The paper the discusses how to code information (using neutrino's oscillation) whith neutrinos properties. It seems also that they propose some sort of super-neutrino-ray which works in a very high level of energy (or mass) but ok then, my super null-understanding of the topic doesn't allow me to go further.

I recommend you read the paper, I didn't finish it, and could understand some amount below 10% :D. But what I COULD, is to remember why I wanted to study physics after computer science. :D

February 27, 2008

Cape Town Open Education Declaration

Basically I already wrote about this in another blog, it didn't seem to get much attention...

Anyway, now I have my own blog and I can post whatever I want (:D) I'll express some thoughts I have bouncing in my mind...

What is this declaration about?


It's a list of items about the usage of free resources in the education field.

Full declaration text can be found here. Among other things that I'd like to mention from the inititative we can highlight:


  • Promote the usage of free resources such as course materials with open licenses, class programs, textbooks, games, software and other material which support learning and knowledge sharing..



  • Promote the usage of free technologies which facilitate a collaborative and flexible learning, sharing teaching experiences which help educators benefit from their pair's ideas..



A lot of times I see myself discussing about WHY free software works. The people with whom I discuss (in a constructive way, of course) sometimes think "hey, I'm trying to make an idealist stubborn change his mind", might be, I really don't know. What I do know is that using open source and free software (which by the way, are very different) and free license schemes (i.e. non-software material distributed under licenses which allow sharing, modifying and redistributing it, e.g. Creative Commons) allow to build a more agile and flexible interchange, useful for the community and for future generations.

From the educational point of view (which I'm interested in today) It's important to see how this 'sharing' influences our student's education.
Once (a few hours ago...) a friend of mine (which is also an educator that I deeply respect) told me "If you don't let the students write and become authors, they won't read whatever you write, no matter what it is". This is a great point, What would happen if we extend this notion to education and knowledge?

I think that leaving that expositor-like role while we teach is crucial if want to change the way knowledge is transmitted.

Promoting the idea of free resources and not privative (I repeat, I'm not talking exclusively about software) collaborate in building a different type of mind openness.

To close this post, I hope you could understand what I wanted to say, and feel free to go deeper inside free teaching resources.

Here I leave some interesting links about topics which I have just mentioned and others that I haven't.

Open education initiatives: A list of Cape Town - related inititatives.

Creative Commons.

Free Software in Wikipedia: Some history and explanation of the term.

Free Software Foundation: That.

Pagina de R. Stallman

PS: Please note that English is not my primary language, feel free to read the original Spanish version of this post here.

\g

February 21, 2008

RFC: Traits for PHP

Reading PHP-internals list (http://news.php.net/php.internals) I found that Stefan Marr sent a very interesting patch.
It's an implementation of Traits for PHP.

But what does Traits stand for?


Traits are basically Behavioral Blocks which group functionality (they group methods / functions indeed).

Depending on which programming language we are keen on we are used to dealing with interfaces, making our object hierarchies implement these interfaces. For example:


Interface TheInterface
{
   public void method1();
   public int method2();
   ...
}

interface TheOtherInterface
{
   public void methodA();
   public int methodB();
   ...
}


class TheClass implements TheInterface, TheOtherInterface
{
   /* Here all methods corresponing to both interfaces
     * should be implemented
     */
}


But what happens with object hierarchies? Sometimes we have to choose between an elegant OO design, loyal to all the OOP concepts that we know (wtf?) like Encapsulation, Inheritance, Abstraction, Polymorphism (I really don't remember anything about these, I only know how to apply them..) that adequately represents the problem we want to model, OR, make a very nice and reusable code, not paying (too much) attention to best practices and principles of OOP...

So we have class hierarchies where classes extend other classes, creating complex families, with parent and child clases with inherit some of their parents' methods, with different access permissions (protected, private, final, sealed, etcetera, depending on the programming language...)

But sometimes, we have functionalities we would like all the class families to enjoy, for example: If we want all the families to know how to cook an asado, wherever they were born since they live in Argentina like me:

Let's consider this example:



We have a (not very useful) hierarchy, which models families of different origins. All the families have a surname and know how to procreate.
So families know how to cook different types of food, depending on their origin. The italian know how to cook pasta, risotto and canoli, japanese are expert sushi cookers and sake drinkers. We, the argentinean, know how to cook asado, drink mate and going to the cancha (soccer stadium), but not me... I don't go to the cancha.

It would be great if any family living in Argentina know how to cook asado and drink mate... So we can build a small "package", or Trait with different abilities, for example:

trait ArgentineanFood
{
   public void cookAsado(){
     // code to cook asado...
   }
   public void drinkMate(){
     // code to drink mate...
   }
}

So we could have a class like:

class ItalianFamily
{
   use ArgentineanFood;
   public void cookRisotto(){...}
   public void cookPasta(){...}
   public void cookCanoli(){...}
}

And easily have an italian family which knows how to cook and consume argentinean food, weird uh?? (I have to say that most of the Argentinean population has italian origins...)

I like to think that this is a way of crossing the hierarchy in an horizontal way, I try to explain this on the class diagram (click to enlarge):



Traits for PHP



There are lots of details to deal with. For example name conflicts. What happens if two traits have methods with the same name? who resolves this?

In this first implementation there is no conflict solving. In fact, traits are "flattened" inside the code of the class. The decision of which trait wins the conflict is left as a programmer decision.
We could do things like:

class Talker {
    use A { !smallTalk }
    use B { !bigTalk }
}

Where the Talker class has methods from traits A and B but exludes the method smallTalk from trait A and bigtalk from trait B. We can also rename trait methods while using it in a class.

One advantage we can find in this implementation is that it hasn't any runtime penalty, since its like a formal way to copy n' paste code.

I recommend you read what this guy Steffan wrote, everything for the PHP implementation is clearly explained.

Ok, so I quit writing not to bore you. I hope you could understand everything I wanted to share.

/g

Further reading
Read here.
more on traits here.
Or you can read Nathanael Schäarli's Thesis.