Firefox to support OGG in
Sunday, August 3rd, 2008 Write a comment

Open source browser Firefox is going to support Ogg Theora video natively without installing plugins and will support the new HTML 5 tag
This is great news since there has been a long debate about the HTML 5
The latest version of Opera browser also supports Ogg Theora videos natively already.
Popularity: unranked [?]
PHP 5 OOP implementation quirks
Wednesday, November 14th, 2007 8 CommentsPHP 5 is supposed to be fully object oriented. Yes, it has classes and inheritance and all those things an OOP language is supposed to have. But, is it implemented like most OOP languages?
First of all, I come from a C/C++ background, so there’s where I got all my OOP lessons. Then I started to learn Python and Ruby, and well, finally lots of little OOP details I couldn’t understand were clear. Ruby has a beautiful OOP implementation, sometimes it can get confusing having everything as an object and the object and class themselves are objects. But once you pass that, everything is cystal clear.
What bothers me about PHP 5’s OOP implementation is first of all, constructors. If I declare a Parent class, with a constructor, then a Child class that inherits from Parent, and this Child class has its constructor, when I instantiate an object of the Child class, only the Child class constructor is called.
class Parent
{
__construct()
{
echo "hello from parent ";
}
}
class Child extends Parent
{
__construct()
{
echo "hello from child ";
}
}
dummy = new Child();
This will display only
hello from child
Where in other languages, such as C++, Python or Ruby (don’t know about Java, but I expect the same) the output would be:
hello from parent hello from child
So in order to have this constructor cascading effect, in PHP 5 I have to explicitly call the parent constructor on my child’s constructor like this:
class Child extends Parent
{
__construct()
{
echo "hello from child ";
parent::__construct();
}
}
Which is not very nice.
Another aspect that I dislike is the class attribute accessor methods. I call them accessors like in Ruby, but they are commonly called setter and getter methods. So in order to control and filter my input/output for my object, I usually do so with this methods.
If I declare a User class with some methods, I expect the setter and getter methods to filter my I/O everytime I want to access the class’ attributes.
class User
{
public $name;
public $email;
public $password;
//set and get functions
public function __get($variable)
{
return $this->$variable;
}
public function __set($var, $value)
{
trim($value);
if($var != "password")
{
$this->$var = $value;
}
else
{
$this->password = hash('md5',$value);
}
}
}
This is supposed to encrypt the password everytime I set something on my password object attribute. What is wrong with this? That it doesn’t work! The get and set functions only work when you have NO attributes or undefined attributes in the class. So in order for this getter and setter methods to really filter I/O to the instantiated objects is to not declare the attributes, and this methods will generate them, like the PHP people say, “magically”. Maybe its a nice flexibility feature to have attributes generated on-the-fly, but it doesn’t help on object consistency.
PHP 5 is a nice tool, but as a language I think there’s still work to do on the OOP implementation.
Popularity: 8% [?]
ACM Crossroads 14.1 now online
Monday, October 1st, 2007 1 Comment
I have just finished publishing online the newest issue of the ACM Crossroads Student Magazine. This new issue is a milestone for the magazine, because we just switched from themed issues to non theme or at least no centric theme per issue. Now we are accepting all types of papers to push more content on the magazine.
Its been taking me a little more time to get the issues published because I have to resize the images for the web, from huge TIFF files.
Its starting to get easier since I learned the magic powers of ImageMagick. I’m going to write a bash script to resize every TIFF file and convert it to nice and light JPEG files for the web. This should speed my publishing process a lot. I’m a newbie in bash scripting and this looks like a nice little task or project to learn.
Popularity: 5% [?]
37signals writeboard app leaks customer project info
Saturday, April 21st, 2007 Write a CommentToday I got an email from a ruby group, where we got noticed of a flaw in writeboard.com. This is a web application for project teams to collaborate and communicate developed by 37signals, the company behind the ruby on rails framework.
I’ll quote the message of how this flaw got found and how you can test it yourself:
I was browsing and doing a google search casually, for finding info
about few people I met this week. I suddenly reached to a link
pointing to 123.writeboard.com/(something) , This page asks for
authentication! but Oooops google cache for the same page doesn’t!
unfortunately it presented me html of a whole communication of a team
regarding a product development of a well known company. That says
that google has cached those urls… It opened every thing the team
did for the project… (poor team, they blindly believed that their
ideas are safe!). I found that google has cached these set of urls
very recently…if you want to test this…
follow these steps:1.) go to google or gigablast and search for site:123.writeboard.com
or click here2.) go to cached page of any result following url pattern similar to
123.writeboard.com/6412f6bf670e164bc/feed/c010fedd01c01896eb0fedd01adc8e3.) You should see some content as html source… just create
wakeup37.html and copy this content, save and open in your browser
This is a huge security issue, and it really makes me think twice about third party hosted web applications for serious confidential work.
Popularity: 4% [?]






