22. May 2009, 14:09, by Leo Büttiker

From the for loop to the generator in JavaScript

I recently spent some time writing JavaScript code and do reviews of JavaScript features. JavaScript has some nice language features that make it easy to write short and readable code. (On the other hand it is also quite easy to write horrible code with it.) In this article I try to show you how you can refactor your code to something more readable.

Cheap Inventor Lt Oem Windows 8 Rosettastone Greek Level 1, 2 3 Set Download Microsoft Office 2010 At Discount Pricing Purchase Oem Version Office 2010 Standard 32 Bit Windows 7 Home Premium Buy Cheap Download Cheap Cs5 Master Collection Windows Xp Home Premium Upgrade Cheap Windows Vista Business With Sp2 64 Bit Microsoft Office 2008 Home Student Mac Offer Arobas Music Guitar Pro 6 Mac Windows 8 (32 Bit) Buy Order Software Online Autodessys Bonzai 3d Mac Autodesk Autocad 2010 Office 2007 Standard Discount Buy Microsoft Access Buy Windows 7 X64 Windows 7 64 Bit Cheap Canada

How To Get A Cheap Windows 7 License

Nolo Quicken Willmaker Plus 2011 Cheap Windows Xp Discs Purchase Cs6 Production Premium Autodesk Building Design Suite Ultimate 2012 (64-bit) Buy Microsoft Word 2007 Buy Windows 7 Ultimate Cd Buy Windows 7 License Key Only Buy Windows 7 Retail Oem Photoshop Download Top Windows Downloads Lifehacker Steinberg Nuendo 4.3 Really Cheap Windows 7 Buy Windows 7 Themes Daz Bryce 5.5 India Buy Windows 7 Ultimate Product Key Office 2012 Home And Business (64-bit) Microsoft Office 2011 Mac Discount Buy Windows 7 Pro Download Windows Xp Home Office Project Professional 2003 Sp3 Buy Windows 8 Now Windows 7 Professional Retail Cheap Adobe Photoshop Cs5 Discount Windows 8 Oem Cheap Office 2007 Pro Office Mac 2011 Home And Student Download Office 2007 Oem Futuremark Pcmark Vantage Advanced Adobe Photoshop Cs6 Mac Download Illustrator Cs6 Download Buy Windows Xp 32 Bit Rosettastone English Level 1, 2, 3, 4 5 Set Microsoft Powerpoint 2013 Will You Buy Windows 8 Buy Windows 7 Product Key

How To Get A Cheap Windows 7 License

Cheap Windows 7 To Buy Download Mac Os X 10.6 Adobe Cs6 Student Discount Buy Outlook 2010 Online Solidworks 2012 Premium (64-bit) Buy Microsoft Office Online Illustrator Cs6 Download Buy Windows 8 Dvd Newtek Lightwave 3d 10 Mac Cheap Windows 7 Mobile India Cheap Adobe Creative Suite 5 Master Collection Buy Windows 7 Language Pack Adobe Cs5 Discount Office 2007 Home And Student Cheap Iso Buy Windows 7 Rtm Cheap Download Office Word 2007 Buy Windows Server 2012 Web Edition Cheap Windows 7 Os Purchase Adobe Acrobat X Pro 10 Buy Windows 8 Tablhttp://www.clubbinghouse.com/index_v1.php?buycheapoemdownload=1526et Buy Mac Os X 10.6 Buy Windows 8 Cd Key Intuit Turbotax Premier 2009 Buy Mac Os 10.8 Office Excel 2010 32 Bit Buy Microsoft Windows 7 Ultimate Microsoft Office 2011 Mac Price Microsoft Office Word 2007 Nik Software Silver Efex Pro 2 Mac (64-bit) Buy Windows 8 License Key Microsoft Office 2010 Home And Student Family Pack (32 Bit) Office 2010 Sharepoint Workspace (64-bit) Best Price Windows 7 Pro Purchase On Line Adobe Creative Suite 5 Production Cheap Adobe Creative Suite 6 Master Collection Adobe Indesign Cs6 Mac Buy Windows 8 Cd Key Fl Studio 8 Xxl Apple Final Cut Studio 3 Mac Purchase Oem Download Office Access 2010 (32-bit) Oem Master Key Microsoft Office Powerpoint 2010 (64-bit) Autodesk Autocad Electrical 2009 Office 2011 Mac Oem Purchase Windows Xp Purchase Premiere Cs6 Pro Windows 7 Ultimate Not Genuine Microsoft Windows Vista Home Premium With Sp2 (32 Bit) Windows 7 Ultimate Oem Download Cheap Microsoft Office 2007 Ultimate Microsoft Office 2010 Home And Student (32-bit) Best Price Buy Autocad 2011 Cheap Windows 7 Activation Key Windows 7 Best Buy Cheapest Adobe Cs6 Master Collection Cheap Windows 7 Retail Office 2007 Home And Student Cheap Iso Purchase Online Creative Suite 5 Production Autodesk Autocad Revit Architecture Suite 2012 Aimersoft Dvd Ripper 2 Mac Microsoft Windows Server 2003 Standard R2 Sp2 (32 Bit) Cheap Microsoft Windows 7 Ultimate Microsoft Office 2010 Home And Business (32-bit) Cheap Windows 7 Studenthttp://www.familycafe.net/?cheapsalebuyoem=652 Discount Smith Micro Poser 7 Elcomsoft Advanced Access Password Recovery 2.5
Buy Windows Xp Cheap
Purchase Premiere Cs5 Cheap Student Version Windows 7 Windows 8 64 Bit Oem Best Price Autodesk Autocad Revit Architecture Suite 2012 Buy Windows 7 Oem Key Buy Autocad 2013 Buy Windows 7 Microsoft Photoshop Cs5 Uk Windows Xp Pro 64 Cheap Best Buy Photoshop Cs5 Cheap Windows 7 Upgrade Buy Windows 7 Now Oem Software Store Microsoft Office 2010 Professional Plus Solidworks 2009 Premium Sp4 (32-bit) Cheap Windows 7 Tv Tuner Windows Outlook Discount Autodesk 3ds Max Design 2011

Adobe Creative Suite 6 Master Collection Cheap Price

Cheap Inventor Lt Oem Windows 7 Professional Download 64 Bit Best Buy Windows 7 Professional Buy Microsoft Office 2010 Professional Plus Adobe Flash Catalyst Cs5.5 Mac Cyberlink Powerdirector 9 Ultra64 Microsoft Windows 7 Home Premium Family Pack (32 Bit) Windows 7 Ultimate Student Discount

We may start with this non-fictional example:

/**
* Returns array of uids of selected items
*/
getSelected:function() {
	var returnArray = new Array();
	var modelFriendListItems = this.modelFriendListItems.getSelected();

	for (var index = 0 ; index < modelFriendListItems.length ; ++index) {
		if(!modelFriendListItems[index].isFacebookUser)
			returnArray.push(modelFriendListItems[index].id);
	}

	return returnArray;
},

It’s just one function out of a class that does quite something typical. This function goes over a list of items (iterate) and builds an array out of some of this items (filter). A friend of mine does some ruby coding and in ruby this would look something like this:

this.modelFriendListItems.getSelected().select{|item| !item.isFacebookUser}.collect {|item| item[:id]}

This is quite short and still yet readable. In JavaScript you can go as well in the direction of more functional programming. So let us refactor the JavaScript example above over some iterations. The following examples use prototype.js because this framework extends the JavaScript array with some fancy functions.
(more…)

Filed under: PHP,Programming
31. March 2009, 21:41, by Silvan Mühlemann

Job opening: Web developer (PHP / AJAX)

Are you enthusiastic about web technologies? Do you have strong PHP, Javascript and SQL skills? Would you like to work with a team of smart and passionate people? Are you open to advanced development methodologies like Scrum or Test Driven Development? Would you like help further develop one of the biggest Swiss website?

Then you should apply for a job at tilllate.com: Our team is looking for dedicated web developers. You’ll find more information in our job ad:

Filed under: Arbeit,PHP,Web Development
17. March 2009, 23:33, by Silvan Mühlemann

Scrum: How we do Sprint Retrospectives

Four weeks have passed since the last sprint planning meeting. Sprint number two has come to an end. It’s time for the sprint retrospective.

The motivation for the sprint retrospective is:

  • Visualize the accomplishment – important for the team morale
  • Review any impediments and discuss measures on how to avoid them in the next sprint

Here’s how we are structuring the sprint retrospecives:

The set up

The team and the product owner are allocating one hour in the meeting room. We’re looking at the wall with the task board showing the user stories, the burn down chart and the impediment backlog. This is a big paper with a post it for every impediment encountered during the sprint. We collected the impediments during the bi-weekly scrum meetings (aka daily scrum).

Visualize the achievements

First, I go through all done user stories and say a few words about every story. Time for praising the team. Developers often think “we haven’t achieved anything”. So it’s important to visualize the finished user stories.

(more…)

16. February 2009, 23:14, by Silvan Mühlemann

Implementing scrum at tilllate.com

The first sprint is done! Yes we finally started doing Scrum at tilllate.com*. Well, it’s not exactly how Schwaber and Sutherland would expect it. But our way fits our team. And the acceptance in both the IT team and the rest of the organization is high. It improves motivation and therewith the performance of the team. And that’s what matters.

Sprint planning meeting

Sprint planning meeting

(more…)

14. November 2008, 16:57, by Leo Büttiker

Clientside Cache Control

Users hate your cache

Users don’t like caching! They want to see the changes immediately. Otherwise they get confused and write you bug tickets or flame mails. But if you do not use caching the user comes and make your CPU’s burning. If your site is down you not only get mails from your users, but also from your management.

We worked hard on the right caching strategy over months now. But there are still caches that do not get invalidated right or are cached too long and we still get complaints from our users. So we decided to integrate a feature that allows certain users to invalidate the cache on the server side. The first idea was to add a link to every page that will append a GET-parameter to the site and then avoid the cache.
(more…)

Filed under: PHP,Programming
14. August 2008, 09:07, by Maarten Manders

Webtuesday Lightning Talk Slides

This week, there was another webtuesday with lightning talks in Zürich. Leo and I each did a little talk:

“StubidDB” by Leo

Leo still dreaming about dumber databases. His own creation StupidDB might sound familiar to you…

“I’m in Ur Browzerz…” by Maarten

Harry had the idea to locate your users based on their history. I tried it out, giving another 8 minutes of fame to an old and well-known hack. The slides can be found here.

7. August 2008, 18:42, by Maarten Manders

Static + Unit Tests = Arrrghhh!

All I needed to do was renaming Trevi_Auth to Tilllate_Auth. Sure, it affected some 41 files, but that’s nothing a little bit of search & replace can’t do. The big headache started when I ran the unit tests.

Shuffle Unit Tests = Fail.

It’s absolutely amazing how much you can mess up unit tests just by changing their order! (Trevi_* comes after Tilllate_*) Everyone knows that tests are supposed to be independent. But we all know how it is. People get lazy, mocks are complicated and testing is boring anyway. And don’t forget about that cool pattern called “Singleton” that we’ve all read about in an inflight magazine!

Punish Me!

Obviously we can’t do testing right without getting beaten with a stick. So where’s that stick? Is there a way to reset all static variables in PHP? Is there a PHPUnit hack that forks a separate PHP process for each test?

What is your solution to keep your tests from sticking together like spit ? I’m happy to learn about it!

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.
(more…)

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

Round Robin Data Storage in MySQL

If you want to store large amount of volatile data (e.g. log file entries) in a database with a constant storage memory footprint and no maintenance to purge the old entries, a round robin database is the best solution. But how to implement it in MySQL?

Some of the heaviest tables in our database are tables which do some event logging. Let’s look at a table which log the most recent visitors on a member profile. Look at that ugly output:

mysql> SHOW TABLE STATUS like "profile_visits_log" \G;
*************************** 1. row **********************
           Name: profile_visits_log
           Rows: 6'226'066
 Avg_row_length: 21
    Data_length: 130'747'386
   Index_length: 393'205'760

It grows and grows… And the queries get slower and slower.

This is the case because we are keeping a lot of old, unused data. For example, on my member profile there’s data back to September 2007:

Profile visitor list on tilllate.com

So we have to get rid of that old data. For example we can do it like Xing and store the n most recent entries for each user. Drop the rest:

Profile visitors in Xing

Now, how do we do that in the most elegant way?

(more…)

Filed under: Database,PHP
10. June 2008, 15:48, by Leo Büttiker

PHP @ OpenExpo

OpenExpoAt 24./25. of September 2008 there will be the OpenExpo in Winterthur. I will be in charge of the PHP booth. I am looking for PHP-Developers, -Evangelists and -Fanboys (and girls) to help me out.

It’s a great opportunity to help spread PHP, meet open source guys or just hang out with other cool PHP guys. Already on the boat are Harry Fuecks (webtuesday organizer, local-hero and PHP-Book-Author), Lukas Smith (PHP Core Dev and Database Expert), Chregu Stocker (PHP Core Dev, liip CEO and Founder), Silvan Mühlemann (PHP-Evangelist, tilllate CTO and Founder) and, well, me.
(more…)

Filed under: PHP
Next Page »

© 2013 tilllate Schweiz AG - Powered by WordPress