PHP list quick tip

Posted on April 14th, 2010 at 6:32 pm

It often happens that i use some function or method that returns an array of elements, but i need just the first one. Assigning this first element to variable is usually done in two lines, for example:

$arr = explode(".", "zxc.vbn.asd");
$first = $arr[0];
// $first = "zxc"

With the help of function list() it can be narrowed down to just one line:

list($first) = explode(".", "zxc.vbn.asd");
// $first = "zxc"

In my opinion that’s a neat solution for common problem, saves just a one line (and some memory), yet judging by the number of times we do “such thing” in the project i think you will find this helpful.

Symfony Reloaded Preview

Posted on February 21st, 2010 at 5:57 pm

Recently SensioLabs released Symfony Reloaded (or Symfony 2.0). The first change that every symfony developer will notice is that it’s no longer “symfony”, but “Symfony” (hint capital “S”). Creators claim that “Symfony 2.0 leads a new generation of PHP frameworks”, unfortuantely we will be able to verify it in late 2010 – when the stable version will be ready. Read the rest of this entry »

jQuery Preload images – tutorial and example

Posted on February 14th, 2010 at 3:02 pm

Not so long ago i created jQuery Image Resize Plugin, today i want to show you another plugin: jQuery Image Preloader. Basically it is a script that loads images in the background and track number of loaded images. It’s very simple, only 25 lines of code, but maybe useful if you are creating jQuery image gallery or some other script that requires image preloading. Read the rest of this entry »

WordPress Forum Plugin

Posted on January 25th, 2010 at 7:23 pm

It’s almost a year now since i released WPJobBoard (WordPress Job Board plugin), i got a positive feedback from the community, at the same time i learned few things to make WPJobBoard better. Now i am planning to release WPJobBoard 3.0, and within few months i am planning to launch completely new product WordPress Forum Plugin. Read the rest of this entry »

jQuery Image Resize Plugin

Posted on January 2nd, 2010 at 1:16 pm

Few days ago i wrote jQuery Plugin Tutorial, today i want to give away my first open source jQuery plugin: image resizer. I made sure that it’s compatible with all major browsers: IE6+, FF3, Opera10, Chrome (didn’t check with Safari, hope someone can do it for me).

The whole idea was to make it as simple as possible to resize image to given size. The common problem developers face is to resize image to (for example) no more then 150px width or no more then 75px height and because getting real image size is not as simple as it seems i think you will find this plugin useful. Read the rest of this entry »

jQuery Plugin Tutorial

Posted on December 31st, 2009 at 8:49 pm

jQuery is getting really popular lately. Employers looking for JavaScript developers often requires them to know this library inside out, so today i want to show you my practical guide to jQuery plugins development. With the emphasis on best practices in plugin development. Creating plugin is plain simple, but developing a high quality plugin is a different story. Further more it shocks me that there are tons of tutorials online that do not even make distinction between jQuery extension and jQuery Plugin. Read the rest of this entry »

Create FireFox extension in jQuery

Posted on November 15th, 2009 at 8:55 am

Few days ago Mozilla launched special site where you can find special FireFox addons. Special because they were written in JetPack. It’s a new technology that allows to write FireFox extensions not only in XUL, but in HTML, CSS and AJAX.

What is more important is that JetPack allows to use third party JavaScript libraries in your project, so developers can get full advantage of jQuery, Dojo, Google Maps and many other great JavaScript libraries. Read the rest of this entry »

Is Twitter having troubles?

Posted on November 14th, 2009 at 9:56 am

Recently TechCrunch published article about Twitter and it’s decreasing traffic. According to comScore (company that offers solutions for online audience measurement), in October Twitter USA traffic declined by 8%. It dopped from 20.9 millions to 19.2 milions unique visitors.

Fortunately Twitter CEO Evan Williams is aware of this trend and hopes that new cool features that are going (or already were) implemented will reverse this trend. Read the rest of this entry »

Google creates programming language

Posted on November 11th, 2009 at 9:13 am

That is a second news about Google in the row, however i think this is something that will interest every developer.

Google created programming language. While it is still in a beta stage and even Google is not using it on production servers, it is already released to the public as an open source product and can be downloaded anytime. Read the rest of this entry »

Google buys Admob for $750 milions

Posted on November 10th, 2009 at 8:38 am

Analytics says that mobile advertising market will be worth over three bilions of dollars in 2013, yet Google went ahead and already bought Admob mobile advertising and monetization solution for a shocking amount of $750 000 000.

Admob is typical marketplace where advertisers contact publishers and buy adverts directly from them. Admob platform has some nice features like mobile analytics and mobile metrics (which is pretty much the same functionality as in other advertising platforms but with “mobile” prefix). Read the rest of this entry »