Musical publics in new ways, or as I like Public Radio did

This is the only post about the project Public Radio in the hub "I PR". The reason is simple: this post is absolutely, in no way technological. Just don't know what hub it is better to put this post.

I write it more for the almost six months ago, when put on the back burner, and then almost abandoned this project. For people like me — people who, for whatever reason, life circumstances have stopped working on some wonderful project, and that's it wag on his arm. I brought Public Radio to the logical point, to this first release thanks, perhaps including some kind of luck that put me on my feet, but that this article probably would have helped me then if I wasn't so lucky.
The remaining publications will go into "web development", "javascript" and so on: I have lots of stories to tell about stuffing my radio, but to start a big story about it I really want it with the lyrics and just the history of how I did it.

To help you understand what I'm talking about: Public Radio is a dedicated player for music public pages in Vkontakte. As said a good friend of mine, one of the first testers of this app — "last.fm with collections from warm tube people, not soulless robots." Actually, this is a completely accurate description: last.fm gives a fairly accurate selections according to your tastes, but it is really a "group, similar to those that you listen." But there is one thing: many groups similar to the ones that I listen to a lot of those that I will delight don't match. I am here for the week use Public Radio with surprise for himself realized that I very much like some members of the domestic alternative scene (e.g., summer Camp Dusty rainbow) — although always listened to some other music.




The biggest thank you of course, I would like to say to those people who are trying to post every day in this community good music — four or five hours of play daily. Without you, nothing happened, guys!

the

the idea



Will start from afar, more to the point, I all came up with the idea of radio.

I'm keen on music. Not in the sense that in the same VC I have written "ya Milman", in the sense that from one apartment to another with me moving in a good set of acoustics with a frequency response like "kill the neighbors", two guitars (acoustic and electric) and vinyl record player with record collection.
And I don't like recommendation services like last.fm. My feeling is they are too soulless, or something. You listen to one group say, "look, kid, here's the same group, listen to them too." Listen and realize that Yes, it is absolutely the same. Something like "try the cheese sandwich, the cheese here is different, but it tastes like you just ate."

So I prefer to listen to online radio type Channel X. At him, frankly, stumbled upon by accident — was looking for the soundtrack of GTA, and found that really there is such online station, very good quality.

Eventually discovered and still such a thing as a musical public in VC. This is a community where you post the music of a particular format — the volume of uploaded content may be up to 6-8 hours of play per day. For example, in my group got the public talking about the post-grunge, and there is a public about new retro wave. Sometimes it's just music news (alternate scene, or classic rock). There is a public piano covers of famous songs, there are pages of instrumental music. In General, music is for everyone.
They are very nice to listen to, however, most of them by its format involves deep listening: laid album laid out the stack in the end — in the "play all" every half hour relatively abruptly gives way to a musical style. Besides, very often the feeling of deja vu, if you listen to the public on a daily basis. "I've been listening to this album!".
Meanwhile, I'm still at the old place of work launched a great project GTA V radio. Initially made just for myself the mp3 files extracted from the tracker, then others wanted to make this promo.

In my head I had two and two, and I decided to do a little challenge for myself: any full application that is hosted on github.io (read, no backend at all). Happened, and four days later played the prototype that it was possible to listen.
He used an algorithm that found a musical group from the user groups. The algorithm was simple as it boots: take the last 20 posts, if they have at least 20 tracks — so it can be played. Oddly enough, this simple logic has proven to be effective.

The prototype was loaded for about five minutes, then appeared 5-10 groups (as typed), which you can actually enable and start the most random to the conditions. Rand was clever: he chose the tracks from those that have not played, but if such was not — according to a certain logic took them those that played a long time. Still want to complicate by putting condition do not play same artist in a row, and did not reached yet, a lot more other tasks in the project.

In fact, in startup time, and was the first problem: Facebook API does not allow more than three requests per second, so it turned into a fun quest: to request a list of groups, then query posts for each group. The average user may be a couple of hundred groups, but in the end is stretched (with the occasional pop-up problems, errors, timeouts and other cool stuff). Of course, it's tired.

Yes, it is possible to listen to (as did I and my friends), but for the full, ahem, development and promotion it was extremely inefficient.
To the same 5-10 groups looked very lonely, and longed to add some recommendations, but with the performance that would be impossible. Although the music from this radio at my house were playing non-stop.

the

Long box



The events occurred about six months ago, in may 2014, after which a number of circumstances in my life, I decided to postpone Public Radio. Sometimes the presence of food in the fridge is still an important project for the soul, alas.

Yeah, I left former place of work. For the summer I got into one quite entertaining place for the back-end developer on the nod, and for two months there I was attacked by a terrible apathy: there was a feeling that I got the money, Senor, but on the position of Junior. No trust, a lot of C-style coding (the backbone of the developers — the former serniki). I began to think that the development is not my thing. The apotheosis was the moment that I still remember:

-this js module has a bug, find.
five minutes:
-A bug in this code fragment, how does it work — no idea, but except as in this bug should not be. It can be run on these two lines:...
Is a closed list with a pointer that I wrote myself, leave it, look for a bug. This is for performance.
ten minutes later:
-I replaced the suggested code, measured performance, the processor is sinking in hundredths of a percent, the memory usage is the same, the bug is gone.
-No, leave the code, find the bug.
four hours later:
-I found the bug, was a plus instead of a minus in one place.
-Well, okay. I told you that the list is running.


Now it is perceived ridiculous, but then for some reason I began seriously to think about the fact that the preparation I have is not the soul that is not mine, and that is not something I should be doing. I even started to scroll the option to get it off the shelf diploma of engineer-Navigator. Indeed, the lack of effective activity oppresses and suppresses. Looking back — I know what talking about when you say "give me some stupid work, so you Tupelo". I quickly Tupelo, it was like I forgot everything what he could, and lost the desire to do anything. I even lost confidence in themselves and their actions, so that still occasionally at the Elevator going back and checking if I locked the door. Is, of course, but occasionally still happen.
Fortunately, the guys from my clever ideas out there tired, it seems, the same as I have them, and we said goodbye. This is a separate funny story, but I will not tell.

I have ceased then, to see in programming is the triumph of intellect, and began honestly just looking for a place where you can conveniently Park the fifth point and get good money for your knowledge. Then there was another change in an attempt to Park the fifth point where warmer, but in September I went to some kind of stable rhythm in life, for the first time in God knows how many years. In my head like everything has stabilized, and hands stretched themselves to Public Radio. Not because even so it was interesting to run the project anymore, but because there was an opportunity to break in those technologies that I could not run in the main job.

Most interesting is that the same confidence in themselves and their decisions of returning it because I did it the radio.
I've argued with friends about how it should work, the most controversy was initially about the fact that you cannot skip the track and move to the next. Technically it was possible, of course, but ideologically no. If you don't like "station" — choose another, and do not look at it that you'll like it. Trying to find what you like in nasty things when there's something that you may like immediately, like some kind of masochism. At least in my opinion. It was, incidentally, another argument in the collection of high-quality Recommender systems.

At the same time, in September, I saw the new material design from Google, and she was hooked, as at the time caught the Metro UI, therefore I decided to stylize the application under it. Not sure what happened, but at least the change of the design went well.
If you read the post frontend developers, I will explain what was so delicious for me to mess around and "let off steam" — in terms of technology and in terms of UX.

A little frontend-porn:
browsers: ie11+ (and that's because I have a winPhone), chrome-FF latest
Javascript: ES6/traceur;
MVVM: vue.js;
Standardization: Jade;
Styles: Stylus;
build system: gulp + browserify + gulp(as it is for one of the following articles)
API: VK.com. Musicbrainz coverartarchive, last.fm — postponed to following releases for a number of reasons.
From the temporarily sawn functionality: Shader equalizer for the background (the native calls, without libraries), neural network brain.js in the web worker to personalize recommendations (hope to add in the second release).

If you are good in the frontend, I think you understand how tempting it looks.
But if you understand the backend alas, there is no backend. At all. This is not an app with a backend on apach this is not an application even with remote services for storage firebird. The maximum that is used for API Vkontakte and music services are localStorage and indexedDB on the client. Public radio is a real client-side web application. I have not even worth it on the server nothing but nginx. It's in the beginning was just another achivka in my piggy Bank: make adult a serious app that can be deployed on github.io. Unfortunately, due to last.fm will have to do some backend: the api does not support CORS, and friends are already asking for his support.

For me, it was akin to tinkering under the car it will not ride like it should, but the debugging process a pleasure.
Just a mind game and a triumph of accuracy. What you do for yourself — try to grind, you do not want to do the nasty. So I sit and meditate for hours on how to do it right. It really was akin to a psychological discharge.

No, it "went" would, sooner or later, but I absolutely do not understand the promotion and advancement of applications, but because I probably would have done exactly the same thing with many of my other projects — would have published and forgotten.

the

Rebirth



And then in my story, there was another little twist: I left the rocks in a week and a half. Just relax from it all, finally stabilize the brains to stay away from electronics. And that's just it realized that I really want to share a project I created with the largest possible number of people: after all, I came up with a neat app that really clung to me and many of my friends.
So — hooked would and many other people.

And more importantly I could prove to myself that I can create web projects that work, travel, who really love others. No commercial purpose was not then as now, I just wanted to make a good project.

A week ago I came back, started hrenachit (or not say), and at the same time and took the domain publicradio.io.

And today I can say that I have the first release of Public Radio. Yes, there is a lot of functionality that I would like to see in it: no smart search string, which would have prompted the station to friends, certain officers and other stations. No complex social interaction. No Analytics and personalization for owners groups. Not even corny there is no pleasing you delete groups from the list. But it works, it plays music, encourages me that I'm happy to listen, . and added to "my groups". It is something without which I could not see it. "fuckin ' radio" (Yes, there was a time when I called him that and nothing else).

I'm working on it at night, on weekends, and I'm truly happy every minute of working with him is really dostavlet me pleasure, especially when tinkering with him to the music that plays with it.

You know, I just now realized that I came in a large commercial web development exactly two years ago. 20 Oct 2012 I started to work in the first place of those that are listed in my summary, still somehow remember this date.
Perhaps this is symbolic: to begin the third year of operation in web development, starting your own project. Non-profit, really fun, this project, which I like the most and which I would like to develop.

Probably, someone will have thought "what's the catch? why so long to do? Yes I have it on the knee for a week will do."

I won't argue, will. I the first version was collected over four days, as I said.
And so long... Two words: performance and recommendations. Moreover, the performance in terms of the API, and render.
To be honest, retrieving data could be done in 2 times faster, I deliberately lowered now: VC responds with jsonp, which is parsed as javascript, in the maximum utilization of VK Api did that 3 times in a second the browser was being parsed scripts up to 2 MB each. The browser, which is logical, at this time, freezes, and even a twitching sound.

A recommendation engine is a separate story, which I will devote a post, there will also be clear how I was to select the optimal logic of coincidence.

In the meantime, I just want to share what I've done, and motivate other people: don't give up. If you think that creating something beautiful, finish. It does not matter whether someone to use it or not, you yourself will get pleasure from the fact that you created that you really brought to the end, you'll see that there in your head, living like your idea mateerials under your own hands, and it is invaluable.

the

What's next?



Then I will develop the project — if people like it, of course. However, I'm terribly short of time — so if someone wants to join, I only. I would be happy to see the team in Public Radio another frontengine and a designer who would like to try in Material Design.

Of course, I'll write 4 or 5 articles on Habr about the set of technologies, as promised above. I really have something to say — from shaders (that's two that I made especially for Public Radio, but not yet implemented, for a long time to explain the reasons, frankly: www.shadertoy.com/view/XsBSDW, www.shadertoy.com/view/XsBXDW) or build a web application as a finite state machine on top of es6 generators to a simple recommendation system and those subtleties I encountered while creating it on the knee.
The first article is about gulp+browserify+gulp, I hope I will publish on Wednesday.
Public Radio will not be commercial project, at least until it's my project.

Honestly, I don't know how I promote it and I sincerely hope that I just get lucky and it will be something viral. I will contact the owners of a small pub and offer to add them to the list of recommended: now take the first 500 pages with the word music, note, are calculated according to the genre and so forth — if you create a directory with the genres, it will greatly accelerate and improve the operation of the site for the placement of links on the radio (radio maintains links to the public, for example, publicradio.io/?shantrock), and possibly publishing a post on the radio. If anyone has good ideas on development of the project — I'll be glad to hear them, as well as the useful comments.

I'd love to make a mobile app with caching of audio to listen to the "radio" on the road or in the subway, where there is limited traffic (this infection can eat up to 50 MB per minute, especially during boot).

But so far I have plans tonight just turn on my favorite station on the Radio, gather your friends and celebrate the start of my first full web project.

Thank you all. Hope you like it Public Radio.

UPD: Forgot to say. If you like the project and want to help in its development — please share the link with your friends. This is very important, much more important than in ordinary cases "tell your friends": if you can establish a partnership with a large number (500, ideally at least 1500-2000) musical public, will significantly speed up the download and give a more accurate recommendation. At the same time will be almost completely rewritten engine, with the goal of connecting neural networks for Recommender systems. And the willingness of owners of public servers to go on contact and help to provide data directly depends on a live audience Public Radio.

UPD2: Tweaked the code, now recommendations will boot much faster, but the first minute a couple of times for a split second can hang the sound.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Why I left Google Zurich

2000 3000 icons ready — become a sponsor! (the table of orders)

New web-interface for statistics and listen to the calls for IP PBX Asterisk