About Jean-Michel

Entrepreneur & internet infrastructures architect. Passionate about management, psychology and technology (Web development & systems administration).

Can people learn how to write good e-mails?

I believe communicating via e-mail (I mean good and efficient communication) is something people can learn. But, some persons might not be as diligent as others (as a personality trait).

Should businesses help their employees by providing them workshops or documentation?

In my humble opinion, businesses (or startups) that use e-mails as their primary communication medium should take any cost-effective measures to optimize their communications. Communicating is a process (a critical process). Good communication will smoothen other processes, reduce conflicts, boost the performance of your employees and even make their happier.

Workshops or documentation is a good first step, but the best way to teach your team is by example. Leaders always do their best to communicate effectively by e-mail. Their e-mails should be:

  • clear, concise and strait to the point;
  • complete, well structured and well written;
  • important (sadly, too many sent e-mails are useless).

Quoting the great mathematician Blaise Pascal (1623 – 1662) : « I made this [letter] very long, because I did not have the leisure to make it shorter ». We need to take the time to optimize our written communications and, most of all, give the right example to follow.

Do you know good techniques to make e-mail communication more efficient. What is a good e-mail for you?

There is a section about writing good e-mails in Scott Berkun‘s book Making Thing Happen.

Support for OpenGraph Protocol META tags with Zend Framework’s HeadMeta

This is good news for all Zend Framework developers. Next release of 1.11 will allow us to set OpenGraph Protocol META tags right away from the HeadMeta view helper.

You can now do:

$this->headMeta()->setProperty('og:title', 'Title of this page');

Thanks to Marc Hodgins for this patch!

Note: To ensure your documents will validate, you need to use the XHTML1_RDFA document type. Read the HTML+RDFa 1.1 specification. Thanks to Roy Toledo who points out that this can be done with : $view->doctype(‘XHTML1_RDFA’);

View resolved issue ZF-9743.

Testing CloudFlare

Most people know what is CloudFlare and what they are doing because they presented the company at Tech Crunch Disrupt. Sadly I couldn’t watch the presentation live, but I saw all the hype that was on Twitter about this exciting product. CloudFlare enhances your site’s performance and security by taking over your DNS and rerouting incoming requests through it’s proxy, caching commonly requested pages, scripts or content and weeding out evil robots that could be scanning all your pages for vulnerabilities.

Setting up CloudFlare

CloudFlare is simple to setup. In fact, if your DNS zone is simple, the setup process will automatically detect all it needs without asking too many questions. For blogs or small websites, this rocks. But, if you have a complex DNS zone, do not forget to double check twice that all your DNS records are also listed in CloudFlare. To finish the setup, you need to change the name servers of your domain to the assigned CloudFlare name servers. Et hop! Your website is now faster than ever!

CloudFlare and Nagios/NRPE

If you really care about your website, you probably (or maybe your hosting provider does this for you) monitor your services, disk/cpu usage with Nagios/NRPE (or any other monitoring software). To prevent the monitoring server from monitoring through the proxy, CloudFlare will ask you to create “direct” sub-domains. Those entries will point to the same IP, but won’t pass through the proxy. If you don’t do that, your pager might get a call or two because CloudFlare’s proxy does not route NRPE traffic.

Support

Support is very important when it comes to this kind of service. Good news: even you are using the free service, they are fast. I’ve had my e-mails answered in 2-3 hours.

Conclusion

CloudFlare is really giving what small websites need to enhance page loadings and prevent bad things from happening without installing your own reverse proxy and intrusion detection system. This is HUGE. But in the end, you are giving up control on your DNS and (almost) all traffic to your website. Risky. What do you think? Have you tried it yet?

Subversion Best Practices: Tags, Branches and Merging

Matt Wood shared on SlideShare a short presentation of what would be Subversion Best Practices. Here are a few of them:

  1. Repositories need to be kept as simple as possible. Projects should be separated from each other.
  2. Use tags. Tags meant to give symbolic names to a group of files like snapshots.
  3. Use branches. Branches provide space to experiment (easily contain parallel changes without breaking production code). They are a good way to generate releases.
  4. Each release is a branch.

Happy merging.

Here is the presentation:

Why nine women can’t make a baby in one month

In software engineering, when schedule slips, it can be tempting to redirect or add new resources to an important project. However, most of the time, boosting the number of resources in a project’s late stage has exactly the opposed effect: it takes more time. This principle is called Brooks’ law.

Adding more people in a project won’t necessarily make it happen faster. Software engineering is complex. First, it definitely takes some amount of time to the newcomer to understand and get used to the existing environment (existing code, development environment and most importantly, the team). Second, increasing resources also increase communication overhead. The information flow must go through all team members, in a clear and efficient way. Finally, you might also drain your existing resources’ energy and time by asking them to train and to coach the others.

For late software development projects, sometimes finding better ways to do more with less, simplifying processes and eliminating any nuisance to the team is better than giving more.

empty and ArrayObject

Many PHP programmers make extended use of ArrayObject. Extending the ArrayObject class allows developers to create objects that behave like traditional arrays in PHP, which is very useful. A frequent problem with those objects, is that when using the empty construct on inaccessible properties, it will call the __isset overloading method. So, if your property is empty but exists, empty will return true.

An easy workaround is assigning your property to another variable, then calling empty on your variable.

Know a better workaround? Feel free to add it in the comments.

Occam’s Razor

I was reading when I stumbled upon what they call the “Occam’s Razor”.

The concept comes from and English logician, William of Ockham. Simply put, Occam’s Razor suggests that when analyzing a problem, all unnecessary details should be discarded so everyone can focus on the core of the problem. Also, options that lack simplicity should be discarded. This suggests that the simpler solution might be the better one (and yes, this method has it’s limits).

Reading on the topic, I discovered that this method is commonly used as a part of the scientific method and that Avinash Kaushik likes the concept too.

What do you think?

Friendly URLs and User Generated Content (UGC)

If your website allows users to create content, you will likely want to equip the content’s URL with the name or title of that content. The classic example, a blog post, would have an URL like this one: http://example.com/blog/1234/title-of-the-post

As the SEO experts will explain you, having good keywords or content titles in the URL should increase the odds that your page is displayed to search engine users first. Also, friendly-URLs are more easy to remember, to type and they look great.

The most common problem with UGC is data filtering and normalization. You will want all of your URLs to have URL-friendly characters only so you do not generate broken links. This block of PHP code strips all unwanted characters and builds a clean content “name” that can be used in your URLs.

// Strip accents
$name = str_replace(
    array('à', 'á', 'â', 'ã', 'ä', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î',
          'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ',
          'À', 'Á', 'Â', 'Ã', 'Ä', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î',
          'Ï', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ù', 'Ú', 'Û', 'Ü', 'Ý'),
    array('a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i',
          'i', 'n', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y',
          'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I',
          'I', 'N', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y'),
    $name
);

// Replaces all but alphanumeric characters, underscores and dashes.
$name = preg_replace('/[^\w\d\s_-]+/', '', $name);

// Trim the white space at the start and at the end of the string.
$name = trim($name);

// Replace whitespace with dashes.
$name = str_replace(' ', '-', $name);

// Repleace double dashes with single dashes.
while(strpos($name, '--') !== false)
{
    $name = str_replace('--', '-', $name);
}

// Lowercase all characters.
$name = strtolower($name);

// URL Encode the string.
$name = urlencode($name);

You think this could have been done in a better way? Feel free to add your idea in the comments.

Do not confuse precision with accuracy

It’s easy to fall in the trap. Precise numbers help others trust that you are accurate.

However, precision is not accuracy. Someone can say, “Your package will arrive in 5 days, 2 hours and 15 seconds.”. That is pretty precise, but it may not be accurate. On the other side, “Your package will arrive in 5 days.” is not very precise, but it can be accurate.

An accurate answer or estimate is, most of the time, more precious than a precise one.