December, 2009


9
Dec 09

Multiprocessing part 1: Quick & Dirty

DEC Alpha AXP 21064 microprocessor

DEC Alpha AXP 21064 microprocessor

PHP can do only one thing at a time. Usually (for websites) this isn’t a big problem because you only have to process a request. On the other hand, if you are doing something more time-consuming PHP could be to slow.

An example is my chat bot server (Mai Ocean). For each conversation I have to make a connection with a server, so for each conversation I have a socket that I have to listen and write to. So if 10 people are talking to my bot I have at least 11 socket connections (10 conversations + main server), you could imagine that this would be way to much for just one script. So how can we solve this? Continue reading →

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • Hyves
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • PDF
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • NuJIJ
  • RSS

5
Dec 09

PHP, Hell or Heaven: Documentation

Hell or Heaven?

Hell or Heaven?

A programming language can be great but if you do not know how it works then it’s (practically) worthless. In general you can say that the documentation is a important part of a programming language. Returning to this series, we can only tag PHP as “Heaven” if it has a good documentation. Now that’s the question we should answer today.

If you have used PHP before you should already now the answer to this question. It is definitely yes. I have never heard someone saying that the documentation was bad or somehow not good enough. Even people who hate PHP can’t disprove that (of course they could try). Continue reading →

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • Hyves
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • PDF
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • NuJIJ
  • RSS

2
Dec 09

PHP, #3 Most popular programming language

The comany TIOBE collects statistics about the popularity of programming languages. In their last analysis PHP was on position 3 and that is something to be proud of. :) The only two that are popular than PHP are C and Java. PHP is also in the race for “Programming Language of 2009″ together with C and C#!

The development in the rankings can be found in the graph below:

Long term trends for the top 10 programming languages

Long term trends for the top 10 programming languages

The total ranking list can be seen on the TIOBE website.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • Hyves
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • PDF
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • NuJIJ
  • RSS

1
Dec 09

The bootstrap: Germination of your application

Sunflower seedlings

Sunflower seedlings

After the start of your (PHP) application it will grow. You will include more and more files, execute more functions and handle more data. When you are finished processing, all memory will be released and your app will ‘die’. Summarized you could represent your application as something simple like a plant!

The first part of “it’s life” is germination, your application has to start and set up everything he needs. In more technical terms you can call this term the bootstrap. If you use a framework such as Zend Framework you’ve probably already heard from it. Using a .htacess file you direct all traffic to your bootstrap that then will startup the main application. For a person like I (who creates PHP CLI apps) the bootstrap is a way of setting important environment variables. So what should a bootstrap do? Continue reading →

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • Hyves
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • PDF
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • NuJIJ
  • RSS