Slides available for Talk around Text-Mining

In: Uncategorized

14 May 2010

The slides of the presentation I gave yesterday are now available on slideshare.

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

If you are interested in knowing more about Text-Mining and how to integrate with your (Web) Applications, I am giving a presentation this week at the monthly meeting of PHPQuebec.

I will present the core notions related to Text-Mining, we will see some of the existing technologies, their features. The talk will be focused on the added value and benefits that Text-Mining may provide to your application.

Date : 13 Mai 2010
Hour : 19h00
Location : École de technologie supérieure, Montréal

More information are available at : http://www.phpquebec.org/modules/piCal/index.php?smode=Daily&action=View&event_id=0000001121&caldate=2010-5-10

Hope to see you there.

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Annoying translate bar in Chrome

In: Uncategorized

3 Apr 2010

Recently, I have been bugged by a new translate bar appearing on the top of my Chrome navigator each time I visit a foreign site. That bar would take an extra line space (Very annoying when you are using a netbook) and I had to click each time on the “X” to close it.

toolbar_chrome1

Usually Google is good with user experience, however in that case I was surprised by that very annoying feature. I would bet I am not the only one who got annoyed by it.

The good news is that with the latest release (4.1.249.1045), you can disable that feature (Why is it enabled by default however ?).

To do that, go to Tools > Options > Under the Hood > Translate and deselect the box next to “Offer to translate pages that aren’t in a language I read.”

popup_chrome

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Updates for PHP Autoload Manager

In: Uncategorized

23 Mar 2010

Thanks to Pierrick, some new minor fixes and enhancements have been added to the PHP autoloadManager.

You may find the updated version on github :

http://github.com/alfallouji/PHP-Autoload-Manager

Documentation has been updated also (Please take a look at the README file).

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Confoo was a blast

In: Uncategorized

13 Mar 2010

Yesterday, the Confoo conference held in Montreal ended. I had the chance to assist to the three days of the conference.

confoo.ca Web Techno Conference

The presentation slides are available here : http://www.confoo.ca/en/download or you can view some of them on Anis blog.

Thanks to a very good organization, this conference was a real blast. All went very smoothly.

I can’t wait for Confoo 2011 !

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Other problems with Singleton

In: Uncategorized

13 Mar 2010

So, again I will talk about Singleton and why you should be carefull with them. Everytime I think or discuss singleton the following things come in to my mind :

- Global State;
- Hard to test (refer to unit test post);
- Singletonite (I see Singletons everywhere);
- Violating the Single Responsibility Rule.

I could spent a few pages arguing and / or explaining those issues. Instead of that, I would recommend you to watch Miško Hevery’s presentations.

“Ok great,  I am  convinced. Singleton are bad. What are the alternatives ?”

Let’s suppose we have a class named article, that has a save() method allowing to persist this instance of an article (in a database or any kind of persistency layer).

/**
 * Singletons are my best friends
 */
class article
{
    public $title;
    public $text;

    public function save()
    {
        $storage = storage::getInstance();
        if(false === $storage->save())
        {
            logger::getInstance()->log("Sorry !");
        }
    }
}

$myArticle = new article();
$myArticle->title = 'I love sushi';
$myArticle->text = 'I really do...';
$myArticle->save();

What are the problems with the previous code ?

Well, first you can’t mock the storage object and therefore this class can be hard to unit test. Secondly, the save method has a dependency with two objects, those dependencies are hidden within the save method and as a consumer of this API, you would expect to be able to know what the collaborator and / or the dependencies of a class are without having to look at the implementation of some methods.

So, let’s get rid of all singletons !

/**
 * No Singleton, use collaborators instead
 */
class article
{
    protected $storage;
    protected $logger;

    public function __construct($storage, $logger)
    {
        $this->storage = $storage;
        $this->logger = $logger;
    }

    public function save()
    {
        if(false === $this->storage->save())
        {
            $this->logger->log("Sorry !");
        }
    }
}

// Having to instantiate "manually" the storage and logger
// is a actually a bit a pain
$storage = new storage($param1, $param2, ...);
$logger = new logger($paramA, $paramB, ...);

$myArticle = new article($storage, $logger);
$myArticle->title = 'I love sushi';
$myArticle->text = 'I really do...';
$myArticle->save();

We just need to pass the storage and logger objects into the constructor of the article object and now the article class is easier to test (easier to mock objects).


  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

COM UQAM 2009 Lipdub - I gotta feeling

In: Uncategorized

3 Oct 2009

This is definitely not PHP or IT related but is worth talking about :) The com department of the UQAM (Universite du Quebec a Montreal - Canada) has done an awesome and incredibly popular lipdub video.

This LipDub has been produced during the integration week of UQAM with 172 communication students. It was made on September 10th 2009, the footage lasted approximately 2h15min.

Available on youtube / google video, it is getting more popular every hour / minutes (more than 750k views already) and it is creating kind of a buzz on the web.

They even got an interview on CNN.

Congratulation to them all. As an ex-student of UQAM, I specially enjoyed watching it.

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Web Performance - Write better code

In: Uncategorized

11 Sep 2009

Once again, Thanks Google for their tech talks.

Here is a video from Steve Souders named “Life’s Too Short - Write Fast Code”. This video talks about how to write efficient code and discuss speed optimizations techniques in Web programing.

Steve works at Google on web performance and open source initiatives. His book, High Performance Web Sites, explains his best practices for performance; it reached the top of the Amazon computer and Internet bestseller list. His follow-up book, Even Faster Web Sites, provides performance tips for today’s Web 2.0 applications. Steve is the creator of YSlow, the performance analysis extension to Firebug, with over one million downloads.

(Source : http://stevesouders.com/bio.php)

You can also find his latest book named “Even faster websites” at books.google.com.

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Here is a very interesting video from Linus Torvalds on Git. He emphasizes on the importance and added value for companies to use decentralized source control.

You better listen to this video or you just may end up stupid and ugly :)

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

If you ever worked in a software company, you most likely heard once someone saying “Hey, we can’t do this, because this doesn’t scale!”

I believe “Scalability” must be on the top 10 list of the “buzz words” most used in the software industry.

It is usually considerated as a killing argument in a conversation. “If something doesn’t scale, then we don’t want it.”

One of the things that fascinates me about “buzz word” is that most of the time it has so many different definitions. Everyone has a tendency to give it a personal definition. Often, people will be too shy to ask for a clear definition. Therefore, it makes it even harder to be able to really understand what underlies behind it. So, What does Scalability mean ?

In telecommunications and software engineering, scalability is a desirable property of a system, a network, or a process, which indicates its ability to either handle growing amounts of work in a graceful manner or to be readily enlarged. (Source: Wikipedia)

In my humble opinion, there are a few important keywords (in bold) in this definition that should be kept in mind when thinking about scalability.

I recently watched that video (I love google tech talks) from Cuong Do Cuong given during a quite old conference in Seattle (in 2007). Cuong is an engineering manager at Google (YouTube).  “He was part of the engineering team that scaled the YouTube software and hardware infrastructure from its infancy to its current scale. Prior to YouTube/Google, he held various software development and management positions at PayPal and Inktomi.”

Cuong shares with us some his experiences, the different issues related to scalability he and the team faced. I hope you will enjoy it as much as I did.

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Who am I?

My name is Bashar Al-Fallouji, I work as a Enterprise Solutions Architect at Amazon Web Services (Sydney, Australia).

I am particularly interested in Cloud Computing, Web applications, Open Source Development, Software Engineering, Information Architecture, Unit Testing, XP/Agile development, etc.

On this blog, you will find mostly technical articles and thoughts around PHP, OOP, OOD, Unit Testing, etc. I am also sharing a few open source tools and scripts.

  • dipan: Hi Bashar It's really awesome that you wrote this code. IT'll save tones of time of all developer. [...]
  • Bashar: Glad that you liked it ! [...]
  • Angel S. Moreno: well, there goes wasting a couple of hours of development and a couple of days of testing. I owe you [...]
  • Bashar: Thats right, the setSaveFile create a files containing an associative array of classname => filen [...]
  • Loggy: Jim's clarification in particular was pretty useful although I did have to dig down into the tree to [...]