Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Listopad, 2010

Sameer Borate’s Blog: How not to create a Random string

Sameer Borate’s Blog: How not to create a Random string

In this latest post to his blog, Samer Borate talks about how not to create random strings and how, if you’re not careful, it could backfire on you.

It is surprising to see how after all the code floating around people still find it hard to create random numbers. In a recent piece of code I encountered, the following was used to generate a string of random numbers. The code was written to provide a random string to be passed to a email verifier system – the type wherein a new user when he subscribes to a website needs to verify his email by clicking on a provided link.

He includes a snippet of the code that uses a call to str_shuffle on the set of numbers 1-10 to generate a random number. The only problem with the method is that, when the number gets large enough, PHP would automatically kick it into exponential format – not exactly ideal for an email link. Let this serve as a reminder for any scripts you might make that are similar.

Source: http://www.phpdeveloper.org/news/15498

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Sameer Borate’s Blog: How not to create a Random string

Sameer Borate’s Blog: How not to create a Random string

In this latest post to his blog, Samer Borate talks about how not to create random strings and how, if you’re not careful, it could backfire on you.

It is surprising to see how after all the code floating around people still find it hard to create random numbers. In a recent piece of code I encountered, the following was used to generate a string of random numbers. The code was written to provide a random string to be passed to a email verifier system – the type wherein a new user when he subscribes to a website needs to verify his email by clicking on a provided link.

He includes a snippet of the code that uses a call to str_shuffle on the set of numbers 1-10 to generate a random number. The only problem with the method is that, when the number gets large enough, PHP would automatically kick it into exponential format – not exactly ideal for an email link. Let this serve as a reminder for any scripts you might make that are similar.

Source: http://www.phpdeveloper.org/news/15498

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Daniel Krook’s Blog: Move from MySQL to DB2 via the Cloud

Daniel Krook’s Blog: Move from MySQL to DB2 via the Cloud

In a new post to his blog Daniel Krook mentions a series he, Mark Nusekabel and Yan Li Mu wrote on migrating a PHP application over from MySQL to DB2 as a backend.

IBM developerWorks has just published the first article in a series that Mark Nusekabel, Yan Li Mu and I wrote about our experience migrating a large PHP and MySQL application to DB2. In the four part series we look at preparation, switching databases, porting code, and finally deploying the application. This first installment covers the steps to plan and resources to consult when starting a migration project.

He gives links to a few other helpful resources if you’re looking to make the move to DB2 like a redbook, a PHP developer’s guide and an Amazon EC2 instance pre-configuured with IBM software.

Source: http://www.phpdeveloper.org/news/15497

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Daniel Krook’s Blog: Move from MySQL to DB2 via the Cloud

Daniel Krook’s Blog: Move from MySQL to DB2 via the Cloud

In a new post to his blog Daniel Krook mentions a series he, Mark Nusekabel and Yan Li Mu wrote on migrating a PHP application over from MySQL to DB2 as a backend.

IBM developerWorks has just published the first article in a series that Mark Nusekabel, Yan Li Mu and I wrote about our experience migrating a large PHP and MySQL application to DB2. In the four part series we look at preparation, switching databases, porting code, and finally deploying the application. This first installment covers the steps to plan and resources to consult when starting a migration project.

He gives links to a few other helpful resources if you’re looking to make the move to DB2 like a redbook, a PHP developer’s guide and an Amazon EC2 instance pre-configuured with IBM software.

Source: http://www.phpdeveloper.org/news/15497

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Daniel Krook’s Blog: Move from MySQL to DB2 via the Cloud

Daniel Krook’s Blog: Move from MySQL to DB2 via the Cloud

In a new post to his blog Daniel Krook mentions a series he, Mark Nusekabel and Yan Li Mu wrote on migrating a PHP application over from MySQL to DB2 as a backend.

IBM developerWorks has just published the first article in a series that Mark Nusekabel, Yan Li Mu and I wrote about our experience migrating a large PHP and MySQL application to DB2. In the four part series we look at preparation, switching databases, porting code, and finally deploying the application. This first installment covers the steps to plan and resources to consult when starting a migration project.

He gives links to a few other helpful resources if you’re looking to make the move to DB2 like a redbook, a PHP developer’s guide and an Amazon EC2 instance pre-configuured with IBM software.

Source: http://www.phpdeveloper.org/news/15497

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

DZone.com: Meaningless docblocks considered harmful

DZone.com: Meaningless docblocks considered harmful

On DZone.com today Giorgio Sironi warns against something that you might not have considered before but could still be harmful to you and your code – meaningless docblock content that could be confusing.

However, docblocks may become as evil as comments when they’re not treated as first-class citizens. [...] Too often docblocks are generated and left there without any additional information. In other cases, they are filled mechanically with information that can already be inferred. In that case, you’re not helping the programmers, which will have to maintain that docblock containing information duplicated from the method signature.

He offers a few hints to follow to make sure you stay out of the bad docblock trap – don’t repeat the code definition, don’t repeat the logic of the method, not using the <code> tag and using @throws correctly.

Source: http://www.phpdeveloper.org/news/15496

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

DZone.com: Meaningless docblocks considered harmful

DZone.com: Meaningless docblocks considered harmful

On DZone.com today Giorgio Sironi warns against something that you might not have considered before but could still be harmful to you and your code – meaningless docblock content that could be confusing.

However, docblocks may become as evil as comments when they’re not treated as first-class citizens. [...] Too often docblocks are generated and left there without any additional information. In other cases, they are filled mechanically with information that can already be inferred. In that case, you’re not helping the programmers, which will have to maintain that docblock containing information duplicated from the method signature.

He offers a few hints to follow to make sure you stay out of the bad docblock trap – don’t repeat the code definition, don’t repeat the logic of the method, not using the <code> tag and using @throws correctly.

Source: http://www.phpdeveloper.org/news/15496

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

DZone.com: Meaningless docblocks considered harmful

DZone.com: Meaningless docblocks considered harmful

On DZone.com today Giorgio Sironi warns against something that you might not have considered before but could still be harmful to you and your code – meaningless docblock content that could be confusing.

However, docblocks may become as evil as comments when they’re not treated as first-class citizens. [...] Too often docblocks are generated and left there without any additional information. In other cases, they are filled mechanically with information that can already be inferred. In that case, you’re not helping the programmers, which will have to maintain that docblock containing information duplicated from the method signature.

He offers a few hints to follow to make sure you stay out of the bad docblock trap – don’t repeat the code definition, don’t repeat the logic of the method, not using the <code> tag and using @throws correctly.

Source: http://www.phpdeveloper.org/news/15496

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for the Week of 11.26.2010

Site News: Popular Posts for the Week of 11.26.2010Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/15495

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for the Week of 11.26.2010

Site News: Popular Posts for the Week of 11.26.2010Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/15495

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>