Archive | May, 2004

Accelerating PHP Applications

Posted on 30 May 2004 by Demian Turner

If you want to get the best performance out of your PHP apps, you need to read this presentation by Ilia Alshanetsky.

(use Mozilla/Firefox to view presentation, doesn’t work in msie).

Comments (0)

Web Developer Toolbar for Firefox

Posted on 30 May 2004 by Demian Turner

Check out the web developer extension for Firefox, if you’re interested in building standards compliant sites, this is the tool for the job.

Disable Delete Domain Cookies Deletes all cookies for this domain
  Disable Cookies Disables cookies
  Disable Images Disables images
  Disable Java Disables Java
  Disable JavaScript Disables JavaScript
  Disable Page Colors Disables page colors
  Disable Referrer Logging Disables referrer logging
  Disable Styles Disables all style sheets
Forms Convert GETs To POSTs Converts all forms with GET methods to POST methods
  Convert POSTs To GETs Converts all forms with POST methods to GET methods
  Display Form Details Displays the form method and action as well as all the form element’s IDs and names for all forms
  Enable Auto Completion Enables auto-completion on all forms that have it disabled
  Show Passwords Shows all passwords as text
  View Form Information Displays form information
Images Display Image Dimensions Displays the width and height of all images on the page
  Display Image Paths Displays the path of all images on the page
  Find Broken Images Finds all broken images
  Hide Images Hides all images
  Make Images Invisible Makes all images invisible, but the images still take up their original space on the page
  Outline Images Without Alt Attributes Outlines any image without an alt attribute
  Outline Images Without Title Attributes Outlines any image without a title attribute
  Replace Images With Alt Attributes Replaces any image with it’s alt attribute
Information View Cookie Information Displays all cookies
  View CSS Displays the style sheets
  View Page Information Opens the page info dialog
  View Response Headers Displays the response headers
  View Speed Report Displays a speed report using the Web Site Optimization service
  View Style Information Displays the styles applied to the selected element

  W3C Documents Provides links to various W3C documents
Miscellaneous Add User Style Sheet Adds a user selected style sheet to the page
  Clear Cache Clears the browser cache
  Clear HTTP Authentication Clears the browser HTTP authentication
  Edit CSS Opens the CSS of the page in a sidebar for live editing

  • Only available in Mozilla Firefox
  Open Java Console Opens the Java console
  Open JavaScript Console Opens the JavaScript console
  View ID & Class Details Displays the ID and class of all elements on the page
  Visited Links Mark all links visited or unvisited
  Zoom Zoom the page in or out
Outline Outline Block Level Elements Outlines all block level elements and indicates the element type
  Outline Deprecated Elements Outlines all elements deprecated in HTML 4.0
  Outline Frames Outlines all frames
  Outline Links Without Title Attributes Outlines any link without a title attribute
  Outline Table Cells Outlines all table cells
  Outline Custom Elements… Outlines all custom elements specified by the user

Resize Display Current Size Displays the current window and viewport size
  Custom Size… Resizes the browser window to a custom size specified by the user
Validation Validate CSS Validates the CSS of a page using the W3C validation service
  Validate HTML Validates the HTML of a page using the W3C validation service
  Validate Links Validates all the links on the page
  Validate Section 508 Accessibility Validates the accessibility of a page against the Section 508 accessibility guidelines using the Cynthia validator
  Validate WAI Accessibility Validates the accessibility a page against the WAI accessibility guidelines using the Cynthia validator
  Validate Local CSS Validates the CSS of a page stored locally using the W3C validation service
  Validate Local HTML Validates the HTML of a page stored locally using the WDG validation service
  Custom Validator Validates the page using a custom validator specified by the user

View Source View Source Displays the page source
Options Persist Styles Persist the Web Developer extension styles when the
page changes
  Reset Page Resets the Web Developer extension styles and refreshes the page
  Options… Displays the options dialog

Comments (0)

Synch your PC with an NTP Server

Posted on 25 May 2004 by Demian Turner

If you’re running on Linux there are many easy ways to synch your PC with an NTP server, guaranteeing that your local machine’s clock is running the identical time to any servers where your apps are deployed.  On windows, however, this is not so easily achieved, and since there are a huge amount of people developing PHP solutions on windows machines while deploying them on Linux, this seemed like a worthwhile tip to post.

Any large scale app will inevitably run a number of cronjobs whether you’re synchronising data, updating feeds, syndicating content etc.  And in order to debug the jobs, it certainly is easier if you know exactly the second they’re going to fire off.  Well short of issuing lots of ‘date’ commands, using this useful app will synch the clock of your windows development box against the NTP server you’re using for your live machine.  What a relief to watch the second hand approach 12 o’clock.

Comments (0)

Tabs vs Spaces

Posted on 19 May 2004 by Demian Turner

Surely there can be no doubt regarding the superiority of spaces over tabs in any serious coding project 😉

If you’re stuck on windows, however, and you don’t have perl installed it’s a bit of a hassle to remove the tabs from other peoples’ contributed code.  That is, until you’ve been introduced to  the Find And Replace Text command line utility (available on windows and linux).

Aside from burdening us with a rather unfortunate acronym,  this software replaces all tabs with spaces in a great one-liner:

C:/htdocs/my_project>fart -r -C * t ”    ”

This will recursively blast through your project and rip out all tab offenses.

Comments (3)

Mastering phpMyAdmin for Effective MySQL Management

Posted on 19 May 2004 by Demian Turner

Packt Publishing have just released their first book, titled “Mastering phpMyAdmin for Effective MySQL Management.

Whether you are an experienced developer, system administrator, web designer or new to MySQL and phpMyAdmin, this book will show you how to increase your productivity and control when working with your databases. You will learn how to:

• Administer MySQL users and privileges, and get statistics about MySQL servers and databases
• Manage databases, table data and structures, and indexes
• Use bookmarks and metadata
• Generate multiple SQL queries
• Generate better documentation of evolving table structures

Along the way you’ll build a more detailed understanding of SQL and how it works in MySQL.

As an application developer you’ll learn how to use phpMyAdmin to:

• Effectively perform day-to-day database and table management.
• Create better database tables and relational structures
• More easily document your evolving data structure

As a MySQL server administrator, you’ll benefit from the in-depth and practical coverage of:

• Using phpMyAdmin to manage users and privileges
• Getting server and database statistics

All database users will expand and refine their knowledge of SQL in a MySQL context through using phpMyAdmin to track SQL execution and results.

You can read more about the book here: http://www.packtpub.com/view_book/isbn/1904811035

Comments (0)

Errors are Natural Stochastic Processes

Posted on 17 May 2004 by Demian Turner

Quite like this comment in the recent slashdot post regarding hardened-php:

as the japanese car makers discovered (or at least the idea came to prominence) in the 1950s, ANYBODY (even people with 93 PhDs) who assembles something makes mistakes occasionally. the trick is to limit the number of modalities that allow for mistakes. a person who is asked to make a wheel fairing in three minutes using simple hand tools will make far more mistakes than one who has a dedicted stamping machine.

in fact, the japanese cars excelled in quality, worker satisfaction, and in the competitive marketplace for many years in large part that their idea that a) errors are natural stochastic processes b) the rate of errors in an any process is more determined by the design of the process than some inherent quality of the worker and therefore c) when a mistake is made, analyze the process, don’t blame the worker as this will lead to d) continuous improvement and also empower workers to speak up.

even the most experienced PhP programmer can make an error. education helps, but fixing the system is a better idea.

Comments (0)

Quality Design in Python

Posted on 09 May 2004 by Demian Turner

If you haven’t looked at Python yet, a good a place as any to start is with the Devshed tutorials and Instant Python.

A few interesting points:

  • python’s been around since 1989
  • the class library is very complete
  • the name was inspired by Monty Python’s Flying Circus
  • much early Google work was done in python where it continues to be widely used today
  • the documentation and tutorials are extensive, more essay focused than what you find in PHP
  • similar to PHP: choice of procedural/OO coding style is left to the programmer, the language is loosely typed and there is no concept of private/public vars
  • different from PHP: a very elegant handling of namespaces, compiled code from imported modules, and a very flexible interactive shell environment

Comments (0)

Social Links via PEAR::Console

Posted on 09 May 2004 by Demian Turner

Thanks to Jon Ramsey from the PHPlondon group who presented some interesting tutorials on PEAR’s console classes at the last meeting.

You can check out Jon’s overview that uses the del.icio.us social bookmarks project to provide sample data that he transforms using Console_Color, Console_Getopt, Console_ProgressBar and Console_Table.

Comments (1)

Tab Completion on Win2k

Posted on 08 May 2004 by Demian Turner

If you work with Linux, or even WinXP, you’ll find you get quite used to the convenience of tab completion, in other words, of the ability to type a few characters of a path name, hit tab, then have the full path completed for you.

So when you find yourself back on a Win2k box, whether because you prefer greater stability, less RAM hunger, or even fewer TCPA issues, unfortunately you find yourself without tab completion.

Until, that is, you have been exposed to the hermetic knowledge shared by the privileged few.

During the alcohol-doused exchanges of this month’s PHPlondon meetup, Paul Vanlint revealed that it is possible to alter a registry key in Win2k to provide tab completion, here’s how:

  1. start -> run: regedit
  2. locate HKEY_LOCAL_MACHINE -> SOFTWARE -> MICROSOFT -> Command Processor
  3. select the ‘CompletionChar’ key
  4. modify its value to 9, the decimal ASCII value for a tab

Comments (0)

MySQL GUI Admin Tool

Posted on 07 May 2004 by Demian Turner

If you use MySQL in any halfway serious way, and have not *yet* downloaded the MySQL Administrator tool, you need to do this asap 🙂  (available for both Windows and Linux)

The amount of configuration options made easily available to the admin is tantalising.  Aside from the usual user/privilege handling, the following categories offer many configurable options:

  • MyISAM parameter
  • InnoDB Parameters
  • Performance
  • Log files
  • Replication
  • Networking
  • Security
  • Advanced

… and a 3 graph health status monitor, similar to the Windows Task Manager.

Comments (2)

Categories

Books

Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists

Facebook