Product & Tech Blog

search
expand_more
expand_more
Showing 96-108 of 111 results

Results for category: Software engineering close

Using Elastica to query elasticsearch

Blog post header

The last couple of months I have been playing around with elasticsearch, an open source, distributed, RESTful search engine built on top of Apache Lucene. To interact with elasticsearch in PHP I have been using a client called Elastica. This was all fun and games until I needed to do

Lazy Loading Resources with Zend Framework Bootstrap

Blog post header

The Bootstrapping process in Zend Framework isn’t perfect. You’ll often end up bootstrapping a lot of resources that you don’t need to complete the request. Depending on the resources this can be really expensive and hurt your overall performance. The worst kind are resources that open connections to external services

Strip HTML from a string in Javascript

Blog post header

Quick tip; never use innerHTML (or jQuery’s html()) unless you really want to insert HTML. Quite often, what you actually want is to insert some text. If this is the case, use innerText (or jQuery’s text()). Should you need to strip HTML from a string (say you are building a

Don’t Hardcode PHP Executable Path In Shebang

Blog post header

Some time ago I saw a

Safari on iOS 5 Randomly Switches Images, Part 3

Blog post header

We are still digging deeper into the imagebug problem we’ve mentioned in part 1 and part 2. We’ve not been able to create a synthetic setup that triggers the bug, but managed to automate, identify, alert and log using our production environment.

Safari on iOS 5 Randomly Switches Images, Part 2

Blog post header

This post is a follow-up to Safari on iOS 5 randomly switches images. In our case almost all of the images on the front page has unique height * width combinations. Since our CMS sets the image size with height/width attributes in the element and rescales the image file to fit

Safari on iOS 5 Randomly Switches Images

Blog post header

Since the release of iOS 5 we’ve received several bug reports about images randomly displaying the wrong image(s) on our front page for smartphones. It seems to be completely random and could affect any of the images, anywhere and anyhow. During one week we would receive anywhere between two and

Running multiple versions of PHPUnit

Blog post header

The latest version of PHPUnit (3.6.4 at the time of this writing) does not play well with the Zend Framework extensions (Zend_Test_PHPUnit). After asking Matthew Weier O’Phinney about this he answered that they had standardized on PHPUnit-3.4 for ZF1. Having just upgraded to the latest version of PHPUnit on our

Speeding up fonts for the web

Blog post header

Custom fonts for the web are a bit of a pain. Browsers support different kinds of font formats, they can be relatively heavy and the rendering can vary between operating systems. Luckily, Google Web Fonts have come along and helped out, providing free and open-source fonts that is easy to

Fat Models, Chubby Routes, Super-Skinny Controllers

Blog post header

Some of you have probably heard the “Fat models, skinny controllers” mantra with regards to developing MVC applications. Recently we figured out that the routes (not part of MVC, but a crucial part to the application nonetheless) could take some weight off the controllers. Since we use Zend Framework (ZF)

Building Tree Structures in PHP Using References

Blog post header

See how you can use recursion in PHP to create a tree structured array with a single pass.

Unit testing with streams in PHP

Blog post header

Using the memory/temporary stream provided by php:// stream wrapper you  can create a stream with read and write access directly to RAM or to a temporary file. This gives you the possibilty to write unit tests that does not rely on a specific file, resource or stream, but rather on