miércoles, 25 de julio de 2012

HTML5 Guitar Simulator app rejected by Spotify


A video of the proof of concept:



I sent an application to create a Spotify App, but it was rejected due to:
"That’s because you have a Guitar hero feature in the app."
The App is a simple Guitar simulator as another Guitar simulators, ex:


I sent an e-mail trying to show the error to the Spoify team, because I want to do a Guitar simulator, not a Guitar Hero copy :( , and now they told me:
 "It is not the fact that it is similar to Guitar Hero per sé it is the fact that we cannot have games with these concept in Spotify."

Ok, then I don't know why the app was rejected :( , the reason "we cannot have games with these concept in Spotify" is stupid, I don't know what kind of apps they want to have in the store...

You can find the source code of the proof of concept here:

And the specifications document here:


The e-mails:


jueves, 24 de mayo de 2012

Spotify - Bilateral Projects: Final Puzzle solution

Ok, I finally created a correct solution for the Bilateral puzzle of Spotify.
I wrote a previously article about this:
    http://alonso-vidales.blogspot.com.es/2012/03/spotify-bilateral-projects-puzzle.html


The problem is that the previous solution first calculates the max-cardinality, but to calculate the max vertex cover I used a permutation to calculate all the possibilities.
I spent a bit more time reading about bipartitie graphs, and how to find the min vertex coverage with the smallest complexity, and I found the "König's theorem":

    http://en.wikipedia.org/wiki/K%C3%B6nig's_theorem_(graph_theory)


This theorem can be combined with the Hopcroft-Karp to solve the problem in the smallest complexity.
The problem is that I didn't find any implementation of the König's algorithm that I can use, and I decided to read the Algorithm definition, and create one. Is really simple to do it after understand how the algorithm works.
And at the end....




You can find the solution code here:

jueves, 1 de marzo de 2012

Spotify - Bilateral Projects: Puzzle solution

Correct solution: http://alonso-vidales.blogspot.com.es/2012/05/spotify-bilateral-projects-final-puzzle.html

URL: http://www.spotify.com/es/jobs/tech/bilateral-projects/

The first time that you read this problem you think, hum, is really easy, I can't understand why is classified as the most complex problem. But the real problem is not solve the problem, the question is do it efficient.
The problem consist in a bipartitie graph:
http://en.wikipedia.org/wiki/Bipartite_graph
The bipartitie graphs have some interesting features, the most important to solve the problem is:
In a bipartite graph the maximum cardinality of a matching and the minimum cardinality of a node cover are equal.
Then, we should to find the maximun cardinality and we will have min number of nodes, this reduce a lot the complexity of the problem, we can use the crazy Hopcroft-Karp algorithm:
http://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm
Using this algorithm we will obtain the paths for the max cardinality, and at the ends of each path the possible nodes, then we can reduce a bit more the possibilities.
With the possible nodes, we should to iterate over all the permutations of this nodes with the max cardinality as number of nodes.

The solution is:


And I used this third part code for the Hopcroft-Karp algorithm:

Spotify: Ticket Lottery - Puzzle solution

URL: http://www.spotify.com/es/jobs/tech/ticket-lottery/

This is my solution on python for the Ticket Lottery Spotify problem.
Actually, the problem is too easy to solve, is an hipergeometrical problem. The only one complicated thing was to reduce the complexity to do the binomial coefficient, for a first version I used the classic solution based on factorials, but was to slow, and at the end I used the next that reduced a lot the complexity.


Spotify - Best Before: Puzzle solution

I have spent some free time doing the Spotify Puzzles:
http://www.spotify.com/es/jobs/tech/
This is the python solution for the Best Before puzzle, I sent it to Spotify and was acepted :) .

URL: http://www.spotify.com/es/jobs/tech/best-before/