José M. Pérez

José M. Pérez

Engineer at Facebook and GDE in Web Techologies. Ex Spotify.

Tips to implement an embeddable widget

Embeddable widgets (or gadgets) allow users to easily include functionality provided by another site. Some examples are Twitter button or the Facebook like button, but also more complex ones like Disqus comments. They can be included on a site easily, normally through an iframe or some JS snippet which will create an iframe. Although at first sight these widgets seem basic, lots of things need to be taken into account when implementing one.

Continue reading about Tips to implement an embeddable widget...

Pet Project: Sync Subs

I have been working recently on Sync Subs. It is a website that allows you to synchronize a file with subtitles (in SRT format) applying a time offset: Sync Subs - A Subtitles Synchronizer web app

There are lots of websites doing this by letting a user upload a file and then applying the transformation server-side. But with the HTML5 File API you can do this client-side. Thus, you can read the contents of a file, process it and let the user download a file that has been dynamically generated using Javascript in the browser.

Continue reading about Pet Project: Sync Subs...

Printing a message in the browser console with a favicon

I recently read this Steve Souder’s tweet about a console.log() message that Etsy is printing out to catch developer’s attention. You can see it by visiting Etsy.com and opening the console from the developer tools. Another good one is Pinterest.

But I thought it would be even better to show the logo of the site next to the message.

Continue reading about Printing a message in the browser console with a favicon...

Spotify Apps Development

I have been working for some time with Spotify Apps. Creating them is a great way to extend the Spotify client with extra features using web technologies. As it exposes a Chrome-ish browser, you can tweak your apps and take advantage of running on a well-known environment.

Continue reading about Spotify Apps Development...

Modular Javascript + Grunt

Like if it was a new year’s resolution, a few weeks ago I decided I wanted to become a better JS programmer. It’s not that I was a bad one, but I felt I wasn’t coding in a maintainable and testable way.

I wanted to make sure I didn’t commit JS code with syntax errors, lint errors or functional errors. And I think I have improved this a lot after reading about writing testable code and embracing Grunt.

Continue reading about Modular Javascript + Grunt...

Removing voice from songs using Javascript

These days I have been playing with the Web Audio API in a small pet project. It consists on a web page where you can drag and drop an audio file and play it removing the vocals. Perfect for a basic karaoke! And it even works on mobile!

Continue reading about Removing voice from songs using Javascript...

Line-height, multiline ellipsis and responsiveness

Recently I was implementing a pinterest-ish layout in which the elements have a specific height. These elements contain a title that can expand multiple lines, and an additional text to which I would like to apply a multi-line ellipsis. Initially, I don’t know how many lines of text the title will take. The text can be arbitrarily long, and depending on the screen width this number will vary.

Continue reading about Line-height, multiline ellipsis and responsiveness...

Spain.js 2013

During these days I have been attending Spain.js 2013 in Madrid. For me, it has been a beautiful experience. Tomás Pérez and José M. Pérez in Spain.js 2013

I was looking forward to visit Madrid, and it didn’t let me down. It had been one year since I left Madrid to move to Sweden. Since then I have tried to keep in contact with some of my ex-workmates in my previous company, Tuenti, and have been following many talented Spanish developers on Twitter.

Continue reading about Spain.js 2013...

Giving Android development a try

It may seem a bit strange that I talk about Android. After all I am a web developer and I have been actively promoting Web for mobile development. But after a course I have been taking, I wanted to share some thoughts.

Continue reading about Giving Android development a try...

Using C3PO to load Spotify Play Button

C3PO is a small library developed by Stoyan Stefanov (I bet you know him, otherwise you should) as a way of getting rid off 3rd party Javascript code to load social widgets.

It allows injecting these widgets as iframes, instead of defining their containers and use certain 3rd party JS code to create and inject those iframes. In addition, it provides a simple parse function that you can call whenever you want to initialize these widgets. In addition, it exposes a way to send messages from the widget to the parent page using postMessage. In his example, the widget sends a resize message, that the parent element captures and changes the size of that widget accordingly.

Continue reading about Using C3PO to load Spotify Play Button...