Spotify Terms of Service and Facebook

I opened Spotify this morning and I was greeted with an updated Terms of Service document, I don’t have time to go through the whole document this time but I was interested to see if they had made any modifications to their document when you connect your Facebook account and it seems like they are still the same so I would like to share with you some highlights of the document:

2.1 Registration data

If you connect to the Service using your Facebook credentials, you authorise us to collect your authentication information, such as your username, encrypted access credentials, and other information that may be available on or through your Facebook account, including your name, profile picture, country, hometown, e-mail address, date of birth, gender, friends’ names and profile pictures and networks. We may store this information so that it can be used for the purposes explained in Section 3 and may verify your credentials with Facebook.

Let’s scroll down to Section 3

3. How we use the information we collect

We may use the information we collect, including your personal information, to: (i) provide, personalise, and improve your experience with the Service and products and services made available through the Service, for example by providing customised or localised content and advertising; (ii) ensure technical functioning of the Service and products and services made available through the Service, develop new products and services, and analyse your use of the Service, including your interaction with applications, advertising, products and services that are made available, linked to or offered in the Service; (iii) communicate with you for Service-related purposes, including promotional e-mails or messages; (iv) enable and promote the Service, including features and content of the Service and products and services made available through the Service, such as sharing, user interactions, notifications and suggestions, and integration with third party services; (v) enforce this Privacy Policy, the Terms and Conditions of Use, and the Mobile Terms, including to protect the rights, property or safety of Spotify, users or any other person and the copyright-protected content of the Service; and (vi) as otherwise stated in this Privacy Policy.

4.2 Sharing with Facebook and other services

If you connect to Spotify using Facebook or otherwise connect your Spotify account to an Other Integrated Service, the default setting is generally that Spotify automatically shares your activity and activity-related stories with that service, including the music you listen to. You understand that such information may be attributed to your account on Facebook or the Other Integrated Service and may be published on such service. See section 5 below to learn how you can disable sharing of information on Facebook and Other Integrated Services.

Spotify also enables you to share a particular item of content, on an individual basis, to third party services or other Spotify users by using the share functionality in the Service. Please note that sharing of such content on a third party service may be posted as activity on the Service, regardless of your account settings. To share an individual item of content to a third party service, you’ll be prompted to enter your access credentials for that third party service. Spotify may store your username and an access token or similar credentials obtained from the third party service, so that you are able to share particular items of content, on that third party service, on an individual basis, without entering your access credentials again.

You understand and agree that Facebook’s or other third parties’ use of information they collect from you is governed by their privacy policies, and Spotify’s use of such information is governed by this Privacy Policy.

Using applications such as Spotify is fun, specially if you use their free service and you don’t mind the commercials but as any other business Spotify must find ways to create revenue and personal information is valuable that is why it is important to understand what happens with specific applications in the event that you connect them with your social networks (Facebook, Twitter, LinkedIn).

PHP Development with XAMPP

Larry Ullman wrote a great post about his experience with MAMP. Many years before I heard about MAMP I had been using XAMPP (, it was in fact that a friend told me about the great piece of software he was using called MAMP which was only $39 (at the time, today you have to pay $59 for a new version and $29 for an upgrade). MAMP is able to let my friend have a LAMP stack up and running in no time in his MAC. I asked my friend why would he be paying $39 for MAMP while XAMPP was free! and he had two reasons. One, he could update the vhosts quickly, second he had been using the software for quite a while so he didn’t have to learn a new piece of software. I believe there is a free version but you are not able to edit the vhosts which for what I undrestand is one of the main sell point for many.

My setup for PHP development on MAC and PC is the free XAMPP package. Since I use the MAC 99% of the time I have created an alias in my .bash_script which opens two files in TextMate that allow me to create a vhost rather quickly. Lastly I open the XAMPP control panel, restart Apache, and I am set to go.

here is my .bash_script alias:
alias vhosts=”mate /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf mate /etc/hosts”

There are other benefits with XAMPP (it may be very similar with MAMP but I have never used it) after you start mySQL from XAMPP control panel you can do all your database administration by visiting http://localhost/phpmyadmin. I have also set up a “dump” alias http://dump.localhost where I can drop any quick php tests without having to create a new virtual host.


Command line productivity

There is nothing more rewarding than creating shortcuts for your daily work routines, and what better than when using the command line.


You have to create a directory and then cd to it after creation.


Open your blash_profile for editing, in my case I will use nano

$ nano ~/bash_profile

once open, now I can add the following function to it.

function mkcd()
mkdir -p $1 && eval cd $1

Almost there… now do control-x + enter + control-c, finally source blash_profile

$ source ~/.bash_profile

You are now set. next time you need to create a new directory and cd to it all you have to do is:

$ mkcd name_of_directory

From Kohana to ZendFramework in about 30 minutes

I am pleased to say that it took me only about 30 minutes to transfer a basic site writte on Kohana to the ZendFramework, both frameworks make it easy to switch between each other. For one thing you can use the ZendFramework Library in Kohana (although I haven’t done it myself people declare is rather easy)

The thing I like the most about the ZendFramework is their tool which comes as a part of their library download. I have mainly used the tool to create the controllers and actions and so far it has been a time saver and has helped me to see how the framework works in a few keystrokes.

After the first site was a success the next step will be to convert a site with a simple CMS built in Kohana to the ZendFramework, I have to admit that there were two things that held me back for a while into using the ZendFramework.


I read in different blogs how slow ZendFramework was compared to other frameworks such as Kohana, CI, CakePHP and even the new framework called Yii. The graphic below is one of my many findings:


But it is obvious that as the time goes by the framework is getting better and seems like it is getting faster as well.

Initial setup

When I tried the framework for the first time was about a year ago or so, it was brand new and people were still getting their heads around it as well as was very limited content in the subject so my first attempt to try it was a failure but months later I come back and wow, what a difference. Not only that but I stayed away from the full package and downloaded the minimal package and started just with the library and it was a breeze.

It is nice to have different packages to choose from and that they get better day by day. So far Zend has made it an easy transition and a nice new PHP development start.

Optimizing SWF files with Flex Optimizer

I found a reference to optimizing SWC files with Flex Optimizer and I figured I would run some tests through SWF files and see what effects it had in it.

To my surprise the Optimizer tool did optimize the SWF files but just by a few bytes:

Test 1:
…_concept1_v1_alt.swf (56569 bytes)
…_concept1_v1_alt_optimized.swf (56456 bytes)

Test 2:
…600_Flash_v1.swf (38164 bytes)
…600_Flash_v1_optimized.swf (38127 bytes)

I also ran a test against a custom SWF file inside a SWC file and this is the result:

…DropDown/library.swf (14810 bytes)
…DropDown/library_optimized.swf (11723 bytes)

So the SWC files are bloated with extra information no needed and can be compressed quite a bit but SWF file no love. And it does make sense since the SWF files that I was testing contain a lot of graphics but I still gave it a go.

Here you can ind more information about Optimizing RSL SWF Files.

PureMVC Framework from The Flex Show podcast

These are notes that I took while listening to the podcast, by no means the information should be taken as final.
Feel free to listen to the podcast and let me know if you notice any discrepancies from what it was said on the podcast and what was written here.

Notes from PureMVC Framework – The Flex Show


Cliff Hall – Architect of the PureMVC project
Cliff stared doing Assembly language for Commodore 64 in 1982 ( one analogy Cliff used was that programming in Assembly is like building a skyscraper out of molecules you are constantly evaluating the number of bytes that the arguments and instructions are taking, you are constantly just looking at things on a microscopic level, and it is awesome because you really make it do what you want it to do, but it is difficult to make really large applications. Higher level languages that are more English like allows to express our thoughts in a much more natural way to us)

Newer OOP languages allows you to use Design Patterns to assemble “teams” to fix issues just as you would assemble teams to fix business issues.

Problem that needs to be solved

Flex is a big framework and in some ways it is a toolkit. Tools that you can take and assemble, but the important thing is how you assemble those items together properly.
All different applications people build break down to basic small problems
Once you use PureMVC all you have to worry about is problem domain and concentrate only on this
Assuming I am new to Flex and PureMVC how would you explain it to me?

Understanding the scope of what the framework is trying to do for you

PureMVC separates the issues in 3 piles

MODEL : Data
VIEW : Representation of Data
CONTROLLER : Bridges the two ( model + view ) and it is where the hefty logic in the application happens (update view and model)

Using MVC allows you to use views components and transfer them to a different system since it is not tied specifically to one application. Similar happens with Model, you can take it and use it in a different environment.

By making this separation you can move your Views to a different area and in a similar way you can move your Models since they do know about the existence of each other.

The Logic is not spread across the whole application but contained in their own area. You can also scale easier.

The business logic often goes into the controller?

Into the controller region, usually it is embodied in commands that are executed by the controller.

PureMVC has been ported to different languages. The issue is not if MVC is the wrong solution is the implementation that needs to be studied.

Proxies are objects that represent the Data.

Expanding on the Mediator Pattern

Move the data from the Model, for instance the Command
A command start up the application and instantiate the Proxies that will represent the Model and model will insatiate that will wrap around the view components

The application will build itself first and then tells PureMVC to start up. then builds proxies and mediators, Proxies might go and request data right away or when it is required

Say the proxies ask data that is needed to populate the application. Once the information is back into the Proxy, the proxy will send a notification.

In the view component you will use an event (like clicking on a button) and sends an event “add user”.

The Mediator will be listening for that event and the will send a notification that might be picked up by a command that will tell a proxy “Go get me a user”.

The Mediator when they are registered with the View Component they list all the notifications they are interested in. When the notification comes back from Proxy then it acts upon it, and that is how data gets from the Model to the view without binding.

The components expose an API and knows nothing about the API apparatus at all. events it will emit and properties that can be set. And the Mediator knows properties it can edit and events it can listen to.

Compare PureMVC to Cairngorm

The viewHelper and how they are implemented.
You access through the components, you bind items directly and tie up to the system.
Have worked with it and it is good but a lot of people didn’t get it, saw some some prototypes ready to be turn into an app scrapped and started from scratch because the people didn’t know much about design patterns, Flex or Cairngorm. So it seemed like Cairngorm set a high bar just to get started.

Other ports

There was a talk about some ports during the recording of this podcast but by now there has been almost 10 ports.

Disable extra fields in CCK for Drupal

There are times when you want to allow the Super Admin to edit those extra fields but not the editors/contributors of your site so this is one way to do it:

[PHP]< ?php /** * Change the node form */ function phptemplate_node_form($form) { // echo "

“; dprint_r ($form); echo ”;

// Hide ‘Log message’ text area
$form[‘log’][‘#access’] = FALSE;

// Hide the author collapsable box
$form[‘author’][‘#access’] = FALSE;

// Hide the publishing options collapsable box
$form[‘options’][‘#access’] = FALSE;

// Open the file attachments collapsible block in a full state
$form[‘attachments’][‘#collapsed’] = FALSE;

return drupal_render($form);