Author Archive

iPod: does shuffle mean random?

Apple April 24th, 2008

ShuffleFor millions of people that own an iPod, “shuffle” means: to randomly play music in their nifty device.
As a proud owner of an iPod, a programmer, and a music addict. I question the randomness of the shuffle feature in the iTunes library and the iPod. Therefore, I decided to put it to a test:

Create a playlist with a bunch of songs from the same artist and hit shuffle. You will find that the iPod will play the songs in a random way and a song will not be chosen twice. The same test results will be obtained when you play your entire library without interrupting it. All the songs will be played once! So basically the shuffle does work. But, using iTunes or the iPod everyday still makes me wonder how it works, because some artists are appearing more often than others when you have a library of music with more than 1000+ artists.

If you do your own research you will find mixed feelings regarding this subject, and tests have been done by multiple people to test the theory that the randomness of our mp3 players is being controlled by the big guys.

Is the shuffle being controlled by major labels and Apple? Are labels paying Apple to have their songs play more often in peoples’ iPod’s?

I leave it out to all you guys…

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Facebook Chat Exposed

Facebook, FireFox April 17th, 2008

Facebook chat was released to a very limited group about two weeks ago as a pre-beta release. Today I happen to bump into the chat application while playing around with the web developer toolbar in firefox.

There is not much to it. Login into facebook, then make sure you have the tool bar installed, then go to “miscellaneous” > “Show Hidden Elements” as shown in the image below.

Web Developer Tool Bar

Visible Chat App

If you are lucky like me and my co-workers you should see the chat appear in the lower right part of your browser. I played with it for a while and was able to connect after a few attempts but was not able to chat with anyone. Let us know if you are able to hack it and maintain a conversation.

This is a sign that the chat application is coming to the general public very soon!

The Chat

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Digg Address Book Contact Importer Not Working

Digg, Web 2.0 Startups, Google December 5th, 2007

I’m trying Digg’s contact importer right now and it appears as the Gmail portion of it is not working. Any body else experiencing this problem???

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Moo Tools - Javascript Framework

Web Development, Frameworks, javascript November 2nd, 2007

Browsing around i bumped into Moo Tools. A really nice javascript framework that it’s lightweight and object oriented. You can get it at mootools.net and be sure to check their demo page. It has nice examples of the power of the framework!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Some helpful PHP functions you might not know they EXIST!!

PHP October 23rd, 2007

http_build_query();
This function can be very helpful when you want to generate URL-encoded query string from an array.

ignore_user_abort();
The ignore_user_abort function is useful when you are executing sensitive code (storing/making changes to db) and you don’t want to stop execution even if the user aborts the connection or browser crashes.

Some cool ways to implement this function is by using it along with ajax. You can allow the server to execute a script in the back-end thus allowing the server to have a faster response time, allowing the user to have a greater site experience. But be sure to validate/check the data before issuing a success response.

ignore_user_abort(true);
header(”Connection:close”);
header(”Content-lenght:”,mb_strlen($response));
echo $response;
flush();

Executed on script end:
function shutdown(){}
register_shutdown_function(’shutdown’);

you can use a flag to verify the script ended successfully!

set_time_limit(numofsec);
It will set a script execution time at the time is included.. can be useful to allow more execution time.

strip all tags from input:
strip_tags($input);

SPELL CHECKING

pspell();

$dict=pspell_new(’en’);
$words=str_word_count($str,2);
foreach($words as $word){
if(!(pspell_check($dict,$word))){
$suggest=pspell_suggest($dict, $word);
echo “{$word}:”,implode($suggest,’,'),”<br/>”;
}
}

SIMILAR TEXT

levenshtein();

returns the number of changes needed:
$diff=levenshtein($name, ‘Julian’);

similar_text();
can give you a percentage of similarity.. slower but useful

Soudex/Metaphone
Metaphone is ’supposed’ to be more accurate since it understands.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

SSH Tunneling for MySQL connection

PHP October 17th, 2007

In most cases you are allowed to change the settings in your MySQL server to allow outside connections . If this is not the case (security purposes) and you have SSH access to the server you can create a Tunnel.

Just follow these quick steps:

1). Get Putty if you don’t have it already.
2). Inside of Putty fill in the host information and port number. Then, click on Tunnels from the left navigation.
screen1.jpg

3). Inside of Tunnels you need to enter the source port. In this case we can put 3306. But make sure that is the correct port number of your mySQL sever. In the destination box you can to put: localhost:3306
Localhost is the path were the traffic is going to get redirected too. 3306 is the port number of the mySQL server in the machine. Click ADD after you have entered the information.
screen12.jpg

4). Click on Open and the enter the server credentials. Leave this window open while you use your favorite MySQL interface.

5). Open a mySQL GUI and in the host you are going to put your local host servername. In this case we are using “localhost” and the mysql server credentials.
screen3.jpg

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Microsoft & Zend Collaboration Announcements

Microsoft, Zend, Web Development, PHP October 9th, 2007

Sitting here in the opening keynote of the PHP/Zend conference and Microsoft announces that FastCGI for IIS will be included in Zend Core. More information can be found at iis.net/php. Also, Zend will be supporting windows server 2008 including the “Server Core” option. But that’s not all… They also announced that Zend framework will support information Card-based athentication for php-applications. This will enable easy and quick authentication for users on you php applications/websites.

Finally Microsoft announced that they are releasing a technology preview of SQL serever 2005 driver for PHP.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

PHP testing and Optimization

Web Development, PHP October 8th, 2007

I’m here at PHP Zend conference. It’s been 2 hours of Zend Certification Crash Coruse I’ve should off been absorbing… but it was packed!! Instead I’m here in the PHP Testing and Opt. section.
This whole section was about PHPunit. This seems to be an excellent way to test php development. I encourage all of you to take a look into it. It can help optimize your code and improve development time. Reporting system and testing features can help identify problems in your OO code from command.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tips For Speeding Up Your Website

Web Development, FireFox September 14th, 2007

I bumped into a cool extension for FireBug/FireFox today called YSlow developed by Yahoo Inc.
This cool little extension scans your website and then provides you a quick report about the speed of your website.

YSlow’s report seems to follow 13 simple rules.. those rules can be found on an article posted by Yahoo.
Thirteen Simple Rules for Speeding Up Your Web Site

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Script Debugging in Internet Explorer

Internet Explorer, javascript September 12th, 2007

Debugging your website in FireFox seems to be a paradise compare to IE. But I think this impression is becuase we love Firefox,FireBug and the Developer ToolBar. Now you can do almost the same things in IE with the combination of Microsoft Script Debugger and the IE Developer Toolbar.

Here are the links to download the above mentioned tools:

Quick note: Microsoft Script Debugging is not enabled by default. You must first enable it by going to:
Internet Options >> Advanced >> Browsing
Uncheck the Disable script debugging boxes.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
blank