Jun 30 09

Cache basics with static variables

by Jan Seidl

When a function is called more than N times (for the neurotic, more than 1), we usually employ caching techniques (caching information) to avoid the logic to be recalculated to return a value as previously calculated.

In the area of computing, caching is a device for quick access, an internal system, which acts as an intermediary between an operator of a process and the storage device to which the operator accesses. The main advantage of using a cache is to prevent access to the storage device - which can be time consuming - by storing data on media access faster

One of the possible levels of caching is through local variables and is recommended for functions called more than N times during the same run and may result in a performance gain as absurd as the code in the database behind the operation.
read the full article

Jun 24 09

CakePHP: Avoiding hardcoded URLs in the code

by Jan Seidl

When we have to reference a variable or send a $this->redirect() to a URL that matches a pair controller / action is not legal to have this address written "hardcoded" (in hand) in the code. The class Route of CakePHP helps us to keep the code clean and reduces maintenance, if necessary.

read the full article

Jun 23 09

Maintenance and monitoring with minimal impact to the User

by Jan Seidl

When we have a physical establishment and are faced with a problem that needs repair or some reform is not willingly leave the "default" to show to customers. We spend the perfect image.

We all have problems, there are numerous preventive measures such as Unit Testing (English) and the like, but given the damage it is imperative that every operation elapses following with great caution and look less to minimize any impact to the customer relationship.

read the full article

Jun 22 09

Badges voting and WP Minify

by Jan Seidl

We have good technology bloggers like to see how our users like what they write and often use badges to vote as the D-Zone, Rec6 etc..

I like fanatic optimization always walked hand in hand with minificadores code (Preprocess compression and removal of unnecessary data) and when I found the WP-Minify thought my problems with the wordpress plugins that have external files. Falsehoods WP-Minify could handle beautifully with the files they were additional lines through the hooks wp_register_script and wp_enqueue_script but the scripts that did not have this care (and not a few) and generate inline code or add to the head through print s ended up staying.

Thaya Kareeson, author of the plugin, recently launched a new version that puts the output of the theme in buffer and then processes it, so taking any appearance inline. The result of the collection is placed in a temporary file and called along with the rest of the javascript. Excellent!

The problem was that my badge of Rec6 (at the end of this article) depends on the the_permalink() is not available for the temporary file cagand breaking the code of the badge.

I began to despair, I stopped, breathed, open the configuration page expecting some option to turn off the preprocessing inline but there was. I started to freak a little longer. Breath and saw that he had a 'blacklist' of scripts and styles to not be minificados. I decided to risk playing the url of the src javascript (that was .php Awesome, worked like a charm!

I hope this tip helps someone like me, is (va) "head banging" with this problem.

Apr 26 09

Defining relationships between semantically XHTML documents

by Jan Seidl


When we have pages that relate to each other or belong to a group of pages, we can define the relationship between them so that parsers and crawlers can identify them correctly. Read the full article

Apr 23 09

Opening links correctly in new window

by Jan Seidl

Good practice leads to open links in new window only when they are pages from external sites, provided that the attribute target="_blank" links a have died (if you did not know that I very much regret to tell you), the only way remains is JavaScript. read the full article

9 Apr 09

Converting OOXML files (. Docx,. Xlsx,. Pptx) MS Office 2007

by Jan Seidl

The latest version of Microsoft Office (that blue interface that changed everything in place) works with a new document format called Office Open XML "that has done the most to heat the head to receive documents in this format, customers or suppliers. read the full article