Saturday, July 31st, 2010

another Open Access Blog

Cohesive Web: PHP serialization or Json

On the Cohesive Web blog there's a new post looking at storing complex data types like data structures or objects effectively.

Think of a situation where you are working with some array. Now there may be some situations where you need to store the array and retrieve it back. If you are familiar with OOPS concept then objects are another type which you may need to store and retrieve. Serialization is the process by which you can convert an object or data structure into a sequence of bits which can stored and retrieve back.

They suggest an interesting option for storing object information - converting it to JSON instead of just serializing it and storing it that way. After running a few tests on the method, they found using the json method a bit better/lighter than the serialized way (for their purposes).

Tags: , , ,

Seagate Barracuda 7200 160 GB 7200RPM SATA 3Gb/s 8MB Cache 3.5 Inch Internal Hard Drive ST3160318ASSP-Bare Drive Review

Seagate Barracuda 7200 160 GB 7200RPM SATA 3Gb/s 8MB Cache 3.5 Inch Internal Hard Drive ST3160318ASSP-Bare DriveUpdate: I wrote this review before a firmware update was made available and my comments reflect the situation at the time.When the updates were made available, I flashed my 5 drives and they've been working fine ever since.I'd change the rating to a 4 star if the editor allowed.

I and many others have been experiencing serious problems with these drives including:

* dropping out of RAID configurations for no apparent reason
* being ejected from a RAID configuration due to read / write errors
* freezing for up to 30 seconds

These problems have been reported on Linux, Vista, XP, and OS X and appear to be related to how the drives flush their write cache.In many cases, the drives work fine for days or weeks before problems appear.In my case, I bought five of these for my Qnap TS-509 Pro and they worked great for about two weeks under various read / write loads.Since then, I've had all three of the problems mentioned above on different drives and they are growing progressively worse.The latest problem was three of the five drives disappearing from the RAID5 volume while I was attempting to copy the files to a different NAS.

A work-around that has been successful for some is to disable the disk write cache.Other than the obvious performance penalty and reduced lifespan this causes, some systems do not provide a means of disabling disk write cache (such as the Qnap).

References to these problems can be found on many forum threads:

Qnap:http://forum.qnap.com/viewtopic.php?f=142&t;=8826
Netgear: http://www.readynas.com/forum/viewtopic.php?f=20&t;=20435&start;=60&st;=0&sk;=t&sd;=a
Synology: http://www.synology.com/enu/forum/viewtopic.php?f=26&p;=47101
AVSForum: http://www.avsforum.com/avs-vb/showthread.php?t=1080005
macrumors: http://forums.macrumors.com/showthread.php?t=571843
Ubuntu: http://ubuntuforums.org/showthread.php?t=933053
Slashdot: http://hardware.slashdot.org/comments.pl?sid=1003109&cid;=25458241
Amazon: http://www.amazon.com/review/product/B00066IJPQ/ref=dp_top_cm_cr_acr_txt?_encoding=UTF8&showViewpoints;=1

The most informative thread may be found on Seagate's own support forum, where it appears Seagate is blaming everyone but themselves for the problem:

http://forums.seagate.com/stx/board/message?board.id=ata_drives&thread.id;=2390&view;=by_date_ascending&page;=1

Click Here to see more reviews about: Seagate Barracuda 7200 160 GB 7200RPM SATA 3Gb/s 8MB Cache 3.5 Inch Internal Hard Drive ST3160318ASSP-Bare Drive

Product Description:
The Seagate Barracuda 7200.12 drive delivers excellent power savings without sacrificing performance, giving customers the ability to manufacture eco-friendly PC systems and external storage systems that meet energysavings requirements.The drive combines proven technology with expert manufacturing to deliver up to 1 TB of desktop storage. With the Barracuda 7200.12 drive, our customers can have the best of both worlds-top hard-drive performance and a high-capacity drive with a very small eco-footprint. Seagate is committed to Minimizing the impact of our products and operations on the environment. We have implemented production efficiency measures, such as replacing or renovating less-efficient equipment, resulting in a 20 percent increase in production efficiency on a per-hard-drive basis. In just six months this delivered a savings of 158.93 million kWh, or enough energy to power nearly 15,000 U.S. homes for one year. Seagate also has deployed aggressive waste minimization and recycling programs in facilities worldwide.The Barracuda product family complies with the Restriction of Hazardous Substance (RoHS) directive that limits the use of hazardous materials in electronic goods.

Buy cheap Seagate Barracuda 7200 160 GB 7200RPM SATA 3Gb/s 8MB Cache 3.5 Inch Internal Hard Drive ST3160318ASSP-Bare Drive now Get 13% OFF
Tags: , , , , , , , , , , , , , , , , , , ,

Zend Developer Zone: PHPBarcelona Conference 2010 – Call for Papers is now open!

On the Zend Developer Zone today there's an announcement about the PHP Barcelona conference's Call for Papers now being open!

The PHPBarcelona Conference 2010 will take place from the 22nd to the 23rd of October and is a unique opportunity to share knowledge and expertise with other developers, architects, managers, and prominent community members on the very shore of the Mediterranean. [...] The call for papers will be open until the 20th of June. As a speaker you will have the chance to not only bathe in the pool of talent that is the PHPBarcelona Conference but also to get in line with the biggest names in the industry.

They're looking for anything that pertains to the full life cycle of software development and something that'd be in the 50 minute (regular session) or 1 hr 50 minute (tutorial) session times. To submit your ideas, email them to call4papers(at)phpconference.es with your name, a photo, the talk abstract and a short bio.

Tags: , , , ,

php|architect: Programming: you’re doing it wrong

In an opinion piece posted to the php|architect site Marco Tabini suggests that we (as developers) are doing it wrong as we move further and further away from the pragmatic side of programming into the abstract.

No matter how advanced the techniques that we use, there is always something that we could be doing better. [...] Which one is right? The real problem is that the answer to that question is, "yes." That's because it lacks a specific context in which it can be inserted.

He suggests that, in our quest to figure out what the perfect case for any situation, we stop focusing on the practicality of writing applications to accomplish goals. Sometimes it's not about getting the right theory behind the code - sometimes it's just doing it.

Tags: , , , ,

php|architect: 5 meta-skills for the PHP developer

In a recent post to the php|architect site Marco Tabini has a suggestion of five meta-skills he thinks every PHP developer should learn.

But being a PHP developer is much more than writing PHP code. In fact, good PHP skills would be something that I would take for granted that every PHP developer should have'"and, if enough employers are as crazy as I am, there's a chance that I'm not the only one who wants to look beyond mere PHP to decide who is good and who is exceptional.

His list five of meta-skills for the PHP developer covers a wide range of things, not just involving the technology of web development:

  • HTML, CSS and JavaScript
  • Understanding business
  • Coming to grips with reality
  • Using the phone
  • Being humble
Tags: , , , , , , ,

Ask About PHP: Codeigniter: Handling errors

In a new post from the Ask About PHP blog they look at handling different types of errors in a popular PHP framework, CodeIgniter, most being included with the framework.

The way I see it, there are 2 types of errors we have to work with. The ones which are displayed out in nice friendly text to your users, and the type which are hidden and shown only to you as the coder to figure out where something has gone wrong. CI provides the means to do both, thankfully.

They look at the error handling the framework provides for the system/application errors that might happen in the normal course of the use of your PHP application and the configuration file settings you can change to customize the level you want to report at.

Tags:

Zend Framework By Examples: Handling dates and times (Zend_Date)

The Zend Framework By Examples site has posted a recent tutorial about using the Zend_Date component of the Zend Framework to work with dates and times in your PHP applications.

In this example, we get or set dates in different timezones. We display parts of dates and times in various formats. We also get information on sunrise and sunset in several locations.

They also incorporate other components in the examples including Zend_Cache, Zend_Locate and Zend_Registry. Their examples show how to check the locale, verify the timezone and figure out a "date from now". Complete code is included - it's not the best method to handle some parts of the example, but it's a rough guide in the right direction.

Tags:

CatsWhoCode.com: 10 awesome things to do with cURL

On the CatsWhoCode.com blog there's a new post looking at a few cool things (ten, to be precise) you can do with the cURL extension in PHP.

New to cURL? If yes, check out the following articles to learn the purposes and basics of cURL/libcurl. [...] Please note that some of the techniques shown here can be used for "blackhat" methods. The goal of this article is only educationnal, please do not use any of the snippets below for illegal stuff.

Their ten cool things incldue:

  • Get download speed of your webserver
  • Publish a post on your WordPress blog, using cURL
  • Post comments on WordPress blogs
  • Get feed subscribers count in full text
  • Get the content of a webpage into a PHP variable
Tags:

NETTUTS.com: 7AMP – Creating a Development Environment

On NETTUTS.com today there's a great new tutorial on getting a complete development environment set up with IIS, Apache, PHP, MySQL and getting them all to play nicely together.

To create the dynamic and interactive apps and sites that we've come to know and love, you need a development server. On Windows systems we really have only a few decent options available; we can use Microsoft's Internet Information Services (IIS), which is usually bundled with Ultimate or Business versions of Windows, or we can use Apache, the extremely popular open-source alternative

They walk you through the whole process, complete with screeshots of each application's setup, configuration files/changes, getting PHP to talk to MySQL and a sample script you can use to ensure that everything's working together.

Tags: , , , , ,

PHPFreaks.com: Template based document generation using LiveDocx and Zend Framework

On PHPFreaks.com there's a new tutorial posted today looking at combining the Zend Framework with the LiveDocx libraries to create PDF/DOCX/DOC/RTF documents based on simple templates.

Generating print-ready well-formatted PDF documents with PHP is not an easy task. Traditionally, there are two main approaches to PDF generation with PHP. Given sufficient time and patience, both partially get the job done, but still leave a lot to be desired. [...] In this article, the author presents an entirely new, third approach. It relies on templates being created in a WYSIWYG environment, such as Microsoft Word or Open Office, and then being populated with data in PHP. The resulting document can be saved not only to PDF, but also DOCX, DOC and RTF.

They include both an overview of the LiveDocx tool and some code samples to use a template made in Microsoft Word to generate a PDF file with dynamic values. They also include a bit about how to create dynamic images.

Tags: , , , ,

Next Page »

Bad Behavior has blocked 113 access attempts in the last 7 days.