20. July 2008, 18:41, by Silvan Mühlemann

Nine ways to obfuscate e-mail addresses compared

When displaying an e-mail address on a website you obviously want to obfuscate it to avoid it getting harvested by spammers. But which obfuscation method is the best one? I drove a test to find out. Here are the results:

In 2006 I opened nine different e-mail addresses. On this page I published the nine e-mail addresses. But every address has been obfuscated by a different method. I made sure it’s getting indexed by Google by putting a link to that page on the tilllate.com homepage.

Then I waited 1.5 years (see the original post).

For each e-mail address I counted the amount of spam I received. The amount of spam received started by 21MB (for no obfuscation and a total of over 1800 spam mails) and went down to absolutely no spam.

The following three methods are absolutely rock-solid and keep your addresses safe from the harvesters.

Filed under: PHP,Web Development
1. June 2008, 21:15, by Silvan Mühlemann

Unit testing makes coding more fun

“unit testing is a test that validates that individual units of source code are working properly”, that’s what Wikipedia says about unit testing. That’s general knowledge.

But what motivates me even more than the increased software quality is that it saves me development time. This sounds odd as you might believe that TDD means writing more code.

Here’s a real-life example:

Filed under: PHP,Programming,Web Development
20. May 2008, 11:11, by Leo Büttiker

tilllate.com is now all Zend Framework.

Trevi FountainWe made it! Last Friday we have replaced the last two legacy components with their Zend Framework based counterpart: The gallery an the user registration. The whole site tilllate.com is now running on Trevi, our extension of Zend Framework. With a reach of 2.5 million unique clients a month, tilllate.com is one of the world’s biggest installation of Zend Framework.

Ciprian, Ivan, Jia-Yong, Kevin, Leo, Riv, Roger, Sanja, Thilo, Vanja, Vladimir and project manager Maarten have done a wonderful job reverse engineering the old, smelly spaghetti code and refactoring everything in a clean and solid MVC architecture: 115’480 Lines of code (Thanks StatSVN).

Filed under: PHP,tilllate.com,Web Development
11. May 2008, 12:54, by Silvan Mühlemann

Unit test practice at tilllate.com

For now over three years we are working with unit tests. I’d like to share some of those experiences.

As we have two frameworks in place for our website, I can compare two different strategies for unit tests.

In our homemade legacy framework we were using SimpleTest. Mainly because I read PHP|Architect’s Guide to PHP Design Patterns and Simpletest was Jason‘s framework of choice.

We have a cron job running which runs all tests every hour. The results of the tests are being shown on a page. The results are also displayed in Nagios.


Filed under: PHP,Programming,Web Development
18. March 2008, 03:44, by Maarten Manders

Enterprise Manboobs!

Martin Fowler and Jim Webber doing stand-up comedy Last week, I was lucky to go to QCon 2008 in London to meet with all the big names in the software industry. This was a great opportunity to see what everyone’s working on and to get a feeling for the newest trends in software development. Here’s what my gut says about the world of software development after QCon 2008 (part 1):


Filed under: PHP,Web Development
20. December 2007, 11:30, by Vladimir Tišma

Graceful degradation of AJAX controls (Thank You Tube)

In many companies, management decides to setup a web proxy server to be able to control/disable the non-busines-related content. YouTube could probably be blamed for many hours spent doing non-business stuff.

Well, I use YouTube myself. Sometimes when taking a break and sometimes to listen to music that goes with the video, and you don’t have to watch it at all, but it’s probably the fastest way find and listen to a certain song if it’s available. Well, this time, YouTube will be a critical factor to finding the elegant solution.


Filed under: PHP,Web Development
30. November 2007, 10:20, by Maarten Manders

Caching of Dynamic Data Sets

Consider you have a set of data that is changing dynamically for each page request and you need to cache that data the fastest way possible. You can’t cache dynamic and unpredictable data as a whole, can you? Hence, we would put each data entry into cache separately to be able to fetch it separately and dynamically. But this means bombing your cache infrastructure with with requests.

Caching Text Elements

Let’s get more concrete. To translate tilllate.com into all different languages, we use text elements (like gettext). For storage we are using MySQL and thus each text element is a row in the translation table. While this storage is very easy to maintain, it is quite silly to use in production, where you have ~100 text elements per page and peaks of 1500 page requests per second with a resulting 150’000 MySQL queries per second. Don’t even ask, we don’t do it. But even for a highly scalable memcached infrastructure, a 150’000 requests per second just isn’t easy to digest.

Let’s talk about a better solution. It consists of three concepts: Two-Tiered Caching, Incremental Caching and Cache Versioning.

Filed under: PHP,Web Development
29. September 2007, 08:44, by Silvan Mühlemann

Sharedance, Memcached and Cache_Lite

Treasure ChestWith 125 million page impressions a month and highly dynamic content, caching is essential for tilllate.com. At tilllate, we have worked with several different caching techniques. Before we used caching, we just pre-generated the data: A nightly cron job populates a database table or generates a file containing the expensive data. Usually expensive queries, like the Most viewed pictures.

Then we are using Cache_Lite a lot. For example our homepage: If you look at the source code of our homepage you will notice the string <!--cache id a:4:{i:0;s:1:-->. This means that the page is coming out of the cache. There are a few disadvantages of Cache_Lite:

Filed under: PHP,Programming,Web Development
21. August 2007, 10:33, by Maarten Manders

Dependency Injection for Unit Tests in PHP

Writing testable code is tricky. On reason is because you have to test all of your software components individually and isolated from each other. Imagine that you’re testing your new and cool DB abstraction layer. It’s using:

  • Some sort of error log
  • A config component to fetch DB credentials
  • Your caching layer to temporarely save stuff
  • I almost forgot: It’s using PDO

Loose Coupling

Having everything tied up like this, you’re going to have a hard time testing it. After all, you don’t want to test the connected components, just your new and cool query class. That’s where Dependency Injection kicks in – along with some other patterns with cool names. The goal is to break your piece of software down to a bunch loosely coupled components and tie them together dynamically. As soon as your software is getting the Lego look and feel, you know that you’re on the right track. This is where you can use Dependency Injection for the logging component:

// Instantiating the components
$loggingComponent = new Fancy_Error_Log();
$fancyQuery = new Fancy_Db_Query();

// Tell your query what to use for logging

Does it feel Lego already? Then go on and do the same with the other 3 dependencies.

Filed under: PHP,Programming,Web Development
24. June 2007, 09:53, by Silvan Mühlemann

PHP5-Entwickler im Aufstieg

TreppeIhr habt spannende Projekte, ein tolles Team, fünf Wochen Ferien… aber tut mir leid… Ihr arbeitet mit PHP… Ich möchte eher Richtung Java gehen“, hat ein Bewerber für die Software-Entwickler-Stelle seine Absage begründet.

Ich denke, das Image von PHP ist ein Problem für Unternehmen, welche PHP-Talente suchen. Erwähnt man PHP, dann kommt dem Software-Entwickler Stichworte wie “Gästebuch-Programmiersprache”, “Personal Homepage Processor”, “Spaghetti-Code”, “Sicherheitslücken in phpBB” in den Sinn.

Filed under: Programming,Web Development
« Previous PageNext Page »

© 2018 tilllate Schweiz AG - Powered by WordPress