Monday, September 26, 2011

Project Remote: Report 2

Time for another report on the progress of the app!

Last week
I added an existing OAuth framework to the project and made it work together with the existing classes. You can now login to Stoffi directly from the app. Once logged in, the app will sign any future requests to the Stoffi server with an authentication object created when the first login occured. This allows the app to stay connected to Stoffi for longer sessions without requiring the user to input his/her credentials again.

Challenges
Understanding OAuth to the degree required to integrate the framework with my existing code.

This Week
I will add the ability to register a new user through the app. My aim is also to finish remote playback control through the app, starting with the most basic functions such as play/pause.

Hopefully, the app will be able to remotely control a Stoffi music player in about a week! :)

Project Social: Report 2

Hey!

Another week has passed and it marks the end of researching, for a while at least.

Last Week
Now I have finished reading most of the stuff that I need to know about facebook apps and how to create them.

Moreover, I have been working on some of the algorithms in making the app. It's nothing too special: how to send them up, how to delete the ones you don't want anymore, etc.

Challenges
Like the first week this was mostly a lot of reading up on what to do, and it was a pain. There was a time there when I just couldn't read up on it anymore. I was reading it, but the words just didn't come through to me. I ended up reading the same paragraph over and over again before moving on. It's not like it happened after some hours of reading, it was just like that after I took a break too.

However I do feel that I got the most out of what I need to know, but I still probably need to read up on some stuff to get the job done.

This Week
Anyways, now it's time to make the app! That's what I will be focusing on most for now on. First up is making sure the app can take in one track before moving on to play-lists.


See ya next week!

Project Genesis: Report 2

Another week, another report.

Last week was more focused than the first week. The main task was getting the login procedure and authentication up and running. Easier said than done, the week has really been one long problem.

Last week
My main goal was to get the authentication in place. I found the OmniAuth plugin for Rails which I've used to get support for Facebook, Twitter and Google. I could add more services later on but these three will do for now.

When I had a working OAuth consumer up and needed to expose an API for 3rd party applications (such as Stoffi Music Player and Project Remote) to authenticate and call protected API calls. I found a plugin which turns a Rails application using a standard authentication system (such as restful_authentication which we use) into a OAuth provider.

After installing the plugin I tweaked the login pages and managed to create a small OAuth consumer in C#. I could login and call a protected API call (which at this time is just dummy call requiring OAuth authentication).

Due to the problems encountered I have not had time to integrate the CAPTCHA test and I will postpone that part to later since my main focus right now is to get the basic flow working.

Challenges
Creating an OAuth consumer in Rails was not much of a challenge but creating a consumer in .NET and creating a working flow in the Rails provider turned out to be quite a problem. After several hours I have finally got most of it working but there are a few quirks left.

For one, if you authenticate in the application you get the Stoffi login form. The form contains buttons to authenticate using Facebook, Twitter and Google. If you use any of these you will get redirected to the service's login form and asked to authorize Stoffi to access your account. After authorization you get redirected back to the start page of Stoffi. Instead you should get redirected back to the first OAuth flow between the application and Stoffi.

Secondly, it seems that Stoffi will not remember the applications you have authorized to access your account. It is possible to list (and revoke) all authorized applications but when you login in the application via OAuth it will ask you if you want to authorize the application, even though you may already have done that. I am not sure why this is happening, if the problem is with the provider part or with the consumer part. I shall investigate further.

This week
This week I hope I will be able to get the OAuth flow working perfectly. I will extend the dummy share API call to actually share a track on all connected services. I will also see if I can get some basic integration with Facebook's new Open Graph.

By the end of the week I should also have at least a full specification of the configuration API and hopefully a few API calls up and running as well.

Challenges
The only challenge that I see right now is to resolve the issues from last week. If I get that part working I think the rest will be a pretty smooth ride.

Project Mind Reader: Report 2

Still a lack of code but now at least some decisions have been made on the making.

Last Week
As I discussed the last week the approach of storing all relations would be extremely costly for large music collections. And for those of you who followed the comments I might have come up with a solution.

For small amounts of songs the table containing all relations will still be small. And we can store all that data so we don't loose any information. Since 1000 songs would give a table of only a few MB that would be considered acceptable.

This table would look like this:


For larger amount of songs I have come up with an acceptable solution I believe.
I believe it is hard to do avoid the table with all the weights. But when we have enough information in the table we can start clustering the songs. This would be grouping the songs together and create some distinct or overlapping smart play lists instead. Even though we loose some data we would still get the desired the result. We just need the clusters to be a bit flexible.
Then new songs added can be analyzed for a while and get weights to the different play-lists we can later add it to one or more. Then if a song is nexted to many times on a play-list we move it and restart the classification process and see if it belongs on another list. I would like some feedback if other people think this is a good idea.

This could also give the user the option to modify it on their own in case it is not to their liking.

And as I posted in the last update these are the things that should be looked at:
+ Being in the same genre
+ Same artist
+ Being played/queued close together.
+ Being on the same play list
+ Many songs as neighbors
- Being nexted when close together or smart shuffle is active

Challenges
Finding an efficient way to deal with large amounts of data. Without loosing to much of it.

This Week
I will start coding and seeing where to add the functions that add weight to the relations in the code. And maybe adding a button for starting the smart shuffle function.
As a start I will only make the table and then later start creating the function to make the transition from this table to the play-lists.

Challenges
Finding where to add the weights in an efficient way. And coding in C# for the first time. Also creating the storage of the relations.

Monday, September 19, 2011

Project Mind Reader: Report 1

At least there has been some thought process. But not any coding.

Last week
I've so far had a bit of trouble with other courses so not much real work has been done. Representing the songs relations to each other seems to be best suited to do in a graph but how to form that graph is not an easy task. If we are to store all the songs relations to each other, this would become a table of size n*n and say that we limit it to one byte per relation we would get n*n bytes of data, with n songs in your library. This for example for 10,000 songs would result in a table of 100MB which is quite a lot but maybe affordable. But I will look at options to conserve space.
Also I've made a preliminary list of things that should increase two songs adjacency:
- Being in the same genre
- Same artist
- Being played/queued close together.
- Being on the same play list
- Many songs as neighbors
(Probably more to come)

Challenges
Creating a graph with as small size as possible where you still have enough data to give weights and create clusters.

This Week
Creating the basic data type for the graph and starting to look on how to add weights and some algorithm for clustering the data.

I'm hoping that I can give you a much more informative update next week, preferably with some paint pictures ;)

Project Remote: Report 1


The mobile remote for Stoffi is now underway!

Last week
I began by researching how to best implement the low level networking and communications with the upcoming REST-api of Stoffi. I also tried several existing RESTful frameworks but found none that had the simplicity I wanted.

The last few days, I ended up creating my own set of classes to handle all of the projects networking needs. Since I knew the project would require a lot of communication with the REST api, my goal was simplicity. I wanted to be able to perform the basic CRUD (create, read, update, delete) operations with as few lines of code as possible. I decided to create a singleton class with the general networking information, such as the server base URL. This singleton class was then to be populated with methods responding to the CRUD operations. After abstracting all but the absolutely essential information of such a call I ended up with the following method:

- (RESTRequest *)get:(NSString *)path delegate:(id)delegate

The method above takes the resource path (assuming it is located on the base URL set on the singleton) and a delegate to receive call-backs once the server returns a result.
Any class that wants to communicate with the REST-api now only needs to implement two call-back methods:

- (void)restRequestDidFail
- (void)restRequestDidLoadResult:(id)jsonObject

Since all returned data is expected in JSON, any data that the json-parser (SBJSON) cannot parse will simply register as a failed call. I plan to add an error to the didFail-callback that describes what has gone wrong. In its current state, the didFail-method is called regardless of what went wrong: The device could be lacking internet connection, or the server could be returning trash.

Challenges
Designing the interface of the REST communication classes without requiring the caller to care about multithreading. I think the call-back technique used makes it really easy to use while keeping it on a background thread for efficiency.

This Week
Starting today, I will begin integrating my app with the Stoffi REST-api, starting with the ability to create a user and login. I will use the classes I created last week to handle the call required to create a new user and login.

Challenges
Since we are considering using OAuth to login, I think the greatest challenge this week will be understanding OAuth and integrating my own networking classes with an existing OAuth-framework.

That's all for this week, see ya'll next week! :)

Project Social: Report 1

Hello!

Time for the weekly update for Project Social.

Last Week
Last week I got to know Ruby on Rails, the programming language + platform that will be used when making the app.

I've also jotted down some ideas for some features for the app, which I think are cool to have if I get the time for them.

Challenges
This part is what I find to be the most arduous. To research about the various parts of another language and to know how to use them best takes time. However I do feel that I know how to handle Ruby better now than what I did a week ago (but I wouldn't go calling me an expert on this just yet).

This Week
And as for this week I will look into at how to make a Facebook app. So yeah, not much going on for these first weeks, but I gotta learn to crawl before I can run.

Challenges
As with the previous week, this is going to take some time and energy for research. I will, however, make a dummy app as I go along, so it's not all just reading (yay). I do realize, though, that it is one of the most necessary parts in order to get this project done right, so I will endure.

That's it for now, see you next week!

Project Genesis: Report 1

It's time for the first report of my little pet project where I attempt to create a cloud system.
I have managed to create a basic API for accounts while also finding time to try to experiment with a new CAPTCHA system for multiple input systems.

Last Week
Last week I created a first draft on the website interface. I have decided to use the colors of the Swedish flag as a tribute to its home country.

So far I have a basic RESTful API up and ready where you can create user accounts (register), manage session (login and logout) and delete accounts.

I have also experimented with some new way to have a computer system perform a reverse-turing test to determine if a request is originating from a human or another computer. The main aim here is to make the test work well on both desktop computers and touch capable smartphones and tables.

I decided to go in the same direction as a team over at Google (report). This system will basically hand out a test that must be passed before any request to perform protected requests (such as creating accounts or deleting them). The test is currently available in both JSON and XML format along with a HTML front for it which can be used by AJAX as part of a form). The test contains three images and a string called the "path". The images has been arbitrarily rotated by the server and the path identifies a storage on the server containing the three correct rotations.

The user should now be given a way to interact and rotate these images by the 3rd party. This rotations, along with the path, will have to be sent along with the sensitive request. I have implemented a rough javascript based interface for the HTML view. In my tests with human subjects I have found that a margin of error on the size of 0.3 to 0.6 radians are within limits to pass most human attempts at the test.

An interesting side-effect of this system is that I get to put out some nice pictures. For this particular experiment I picked photographs portraying parts of my origin hometown with some pictures of the nature of Sweden in general. I will try to arrange for the rights to some nice images fitting in that theme.

Challenges
I aim to have support to use your Facebook account in order to make the whole process easier. I have created a website before which uses Facebook Connect to accomplish this. However, since that time Facebook has changed a lot of their APIs (renaming it Facebook for Websites) and are now using OAuth 2.0 for authorization. They still have some of their legacy API parts left but they have been marked as "deprecated".

I have thus decided to make Project Genesis support OAuth 2.0 as a client (consumer). I have considered using OAuth 2.0 as a server (service provider) in order to secure our users password. As of right now, any 3rd party accessing our API will be able to read (and store) the password of the user whom sign into Stoffi through their application. However, the first priority is to get the client part working. If there is time a proper server implementation of our API will be created.

This will allow us to further expand to other services using OAuth 2.0 later with very little effort. Such services includes:
  • Google Plus
  • Live Messenger
  • Twitter
  • MySpace
This will give Project Genesis the ability to continously bring Stoffi into the social cyberworld. Giving it a bright future.



This Week
This week I will start by adding client OAuth to authenticate using Facebook. I will also add some API calls for sharing. I will also make the user calls protected using the new captcha system.


Challenges
The main challenge here is to make it possible for a third party (such as Stoffi Music Player or Project Remote) to authenticate and use the API. I have to weigh in both privacy issues and available time. We'll see what I decide for.

Saturday, September 17, 2011

Introducing Project Visual

Greetings.

I am Carl, currently a student at Uppsala University, and in a little more than a month i will be diving in to the task of making the visualizer plugin system as part of the Stoffi Hackathon 2011.

Step one of the visualizer is to make a straight forward plug-in system that will allow anyone with a little coding experience to make their own visualizer. The exact technical details are yet to be decided, but i will aim to make it as easy as possible for anyone to pick up the system and get going.
The visualizer will include a streamlined system for interacting with the musicplayer without interruptions.

Though i doubt i will have time this year to get further than that, i do have some visions for the future as well. With several years of experience in game programming, both as a student and as a professional gameplay programmer, i would like to bring interactivity to the visualizer. My hopes are to be able to provide what is needed to actually make games (at least simple ones), in the visualizer.

My own philosophy in Project Visual is to put as good tools as possible in the your (the users) hands, so that you can unleash your creativity without having to do the groundwork yourself.

So if you have any crazy ideas for anything related to the visualizer, throw it my way, and the earlier the better.

Cheers.

Sunday, September 11, 2011

Introducing Project Mind Reader

Good news everyone!

My name is Martin and I'm here to add a smart shuffle function as well as some suggest music functions for Stoffi.

My name is Martin Håstad, and I'm also a student at Uppsala university in the field computer science. I'm quite fond of algorithms and doing things that take some computational power in smart ways. And also I have a background in Mathematics. I'm a big fan of computer games and competing in every way. I used to play table tennis and practice MMA, but nowadays I'm too lazy and just go to the gym instead.

In Stoffi Hackathon 2011 my primary tasks will be to create a smart shuffle that has some understanding of which music you want to listen to depending on your current choice of music, maybe possibly even the time of day, and some other factors. This will be a function that is learning from you. Also I will be working on connecting all this information to be able to get the server to give you suggestions for new music that you might like. Because discovering new music and expanding your collection is a very important part I would say. How this is going to be implemented is so far a mystery. Most likely I will create some large graphs that are analyzed to generate which songs belongs together. If anyone has an opinion on how to implement this, or how the graph should be weighted I'm happy to take suggestions.

If you find this interesting continue to read my blog posts, they are tagged with "project mind reader" and check out the wiki. That will hopefully be updated soon.

Martin "Lirick" Håstad

Introducing Project Genesis

Hoho!

Yet another part of the Stoffi Hackathon 2011 here. My work will consist of creating "life" in the Stoffi world in form of a Stoffi Platform for user accounts and the birth of some services that we will offer our dear users.

First of all I will make it possible to register a user account. I will make sure that the process will be as clean and fast as possible (for example with the user of Facebook Connect). My experience is that people are somewhat reluctant to create accounts on new websites, my guess is that it's mostly because of the amount of effort involved in creating an account. So my aim will be to make this procedure as smooth and fast as possible.

When you have an account here on Stoffi you will be able to enjoy some services that we will offer. The first service will be the synchronization of your configuration. That is: which song you are playing, the media state (playing, paused), the playlists you have created and so on.

This will let us create applications to control this configuration from for example an iPhone app. My main focus here will be on privacy. So the configuration will be encrypted while stored on our servers and impossible for anyone but YOU to access and read. Further, all communication will be encrypted thanks to HTTPS. We are already using HTTPS for the communication with the upgrade server but we are using a self-signed certificate for that. So my first task was to buy a real certificate that we could use on www.stoffiplayer.com in order to make sure that our users don't get some scary warning.

As I am the creator of Stoffi I will take a role as project manager for this Hackathon which means that I may not have as much time as the others to work on my mini project. However, I hope that I will manage to get it all done and hopefully even get some of those old bugs fixed as well. There's tons of work to do and we'll see just how much I'll manage to get done before the time runs out. :)

Follow my project on the wiki and keep an eye on this blog for further posts.

Introducing Project Remote

Hello!

As a part of the Stoffi Hackathon 2011, I will be creating a remote control app that will allow you to control Stoffi Player using an iPhone, iPod or iPad. The app will have the most basic features of Stoffi Player, such as controlling playback and manipulating playlists.

My name is Fredrik Gadnell. I currently study computer science in Uppsala, Sweden, and work part time as an iOS developer. My two greatest passions are composing music and developing games, including the overlapping area of composing music for games :).

These features will be presented with a beautiful touch controlled interface. If time allows, I will also add some innovative and interesting features like starting a playlist by snapping your fingers. I will post weekly updates on my progress on this blog. More information on the project will be available on the project wiki page.

I look forward to give you more information in the next weekly post!

- Fredrik "Gadd" Gadnell

Saturday, September 10, 2011

Introducing Project Social

Hey people!

It's me again: Mark! Here to tell you that I will be working on Stoffi Hackathon 2011, or more specific, on Project Social as it's labeled for my project.

What I will do in this project is that I will create a Facebook app that can take your YouTube playlist and post it to your Facebook account for your friends to see. And then they can themselves download that playlist down to their own Stoffi Music Player for them to enjoy!

This is what I will be working on for the following weeks and, as Christoffer mentioned previously, I will post a weekly update on this project. You can also get more information about this work through the project wiki page (as also mentioned by Christoffer).

Be seeing you!

Friday, September 9, 2011

Introducing Stoffi Hackathon 2011

As part of our studies at the University here in Uppsala we, a group of five students, will have the opportunity to work on Stoffi. It is a combined effort where we all will strive to put more focus on the music and make it easier to engage in your music.

Each of us will take on a particular task which we will work on invididually. However, some of these tasks are dependent on each other so we will have to stay coordinated with each other during the whole period.

In an attempt to keep everyone (including our users and fans as well as each other) each of us will post on this blog once a week. We will let you know what we did last week, what we aim to accomplish this week and if we have or anticipate any problems with our work.

This week (which is near an end) we will begin by introducing each of us and what we will do. If you want more information check out our project wiki.

Wednesday, September 7, 2011

Beta update: YouTube streaming, new properties window, equalizer profiles, more languages

As it was my birthday last Saturday I wanted to give you guys a little gift. It comes a few days late but here it is: a new beta release of Stoffi.



This new update contains a ton of new and cool features: an improved meta data editor, equalizer profiles, translation support, YouTube support, highly improved list view, rewritten scanner with upgraded source management, a new details pane and many, many bug fixes and smaller improvements.

Get the new beta here.

Properties Window
In some of the reviews we got there was concerns over the tools available to edit the meta data of your tracks. This prompted me to change the whole "Information" window and rename it to "Properties" instead. It now features a look very similar to the window you get when you right-click on a file in Windows Explorer and selects "Properties". We have both the General tab for some information about the track, and the Details tab for the meta data of the track.

I plan on further expanding this window in future releases and make it possible to view properties of YouTube tracks as well.

Equalizer Profiles
Another concern voiced in initial reviews of Stoffi was the fact that there's no way to reset the equalizer levels or create profiles. So now you will have a default profile with all values set to zero and the ability to create new, custom profiles.

Translations
I noted that a lot of Stoffis users are from soutern Asia and South America along with Spain and Italy. The natural effect of this was that many of the reviews written on Stoffi was in languages other than English. So it became obvious that Stoffi should be available in more languages.

In this new release a new system has been added to bring about the ability to translate all strings in Stoffi to any language. But that's not enough, as with most other things I enjoy paying a bit extra focus on the small details. In this case it is the fact that you can change the language in Stoffi without the need to restart it. Just switch to another language and all text is automatically changed.

Right now Stoffi is available in English, Swedish, Chinese (Mandarin) and Portugese (Brazilian). I have asked around a bit and I have found people who speak French, Spanish, Italian and Russian. Hopefully some of those guys will find the time to help us translate Stoffi.

If you know any language other than English please let me know and I'll help you translate Stoffi.

YouTube
A pretty big new feature in Stoffi, which I've talked about earlier, is the ability to play YouTube tracks in Stoffi. You will be able to access any YouTube video directly from inside Stoffi, with the ability to queue the video or add it to any of your playlist. This brings you millions of tracks available at an instant via the vast library of YouTube. Hopefully something you will all enjoy.

New List View
One of my pet areas where I wish to improve Stoffi is the way that the tracks are presented. We currently only support a view which in Windows Explorer is called "Details". In the future I want to add the ability to view tracks (or artists, albums, genres, etc) as a grid of icons or other similar views.

But this is much work and as a first step I needed to break out the current List and make it more powerful (from a programmers point of view). While most of the work I've done will be invisible for you users I did actually find some time to add a few neat improvements to the list. Some highlights are:

  • Icons
  • Drag-and-drop of files and folders
  • Strikethrough (in the source list)
  • A number column which updates as you reorder tracks manually (effectively allowing you to "save" a custom ordering)

Rewritten Scanner
The scanner of the filesystem has been completely rewritten. This was mainly because the old solution with a whitelist and a blacklist proved to be unintuitive and clumpsy. The new scanner works with a single list where a source can be marked as either "include" or "ignore". It will build a tree structure of all these sources and allow you to include files inside an ignored folder which in turn is inside an included library (etc, etc, etc).

I have built this scanner to in theory allow for a faster scan of the sources but I have not put any focus on bringing forth these improvements. I will focus on this a bit now while we are in beta but ultimately most of the CPU cycles and memory bits are used by the way .NET saves and stores our internal settings (that XML file called user.config we all know). So even if I bring some extra speed to the scanner it won't do much difference. Instead I will attempt to tackle the speed and memory improvements by switching to SQLite in the next version.

Details Pane
Our new friend Tevin started work on a new and improved Details Pane, work which I finished now just a few weeks ago. This new Details Pane will allow for a more dynamic view of the details of a selected track and it has become more extendible (allowing us to easily add a different view when a YouTube track is selected). It also supports for edit of meta data and in the next version I want to add support for showing information on multiple tracks as well as playlists, the queue, and so on.

Backup/Migration Tool
As I work on Stoffi a lot of my own playlists get lost as I switch between versions and try out different settings, sometimes resetting Stoffi all the way back to the way it is when you first start it. This prompted me to create a tool for saving all your settings in a file (which is XML based and can be read by any other application if they want to). Ultimately I want to add support to send these settings over to our server (encrypted and safe, of course) so you can synchronize all running instances of Stoffi and have them share the same settings.

That's Not All
Those are the biggest improvements but of course there are a lot of smaller ones as well. However, there's still a ton of stuff I still want to add to Stoffi and in fact we are a gang of five students who will spend an entire semester working on Stoffi as part of our studies here at the University in Uppsala. Hopefully it will bear some really awesome fruit for us.

Along with the new beta update the alpha channel has been updated as well. Now when Shang has entered into beta work will begin on the next release: Zhou. Shang will now only retrieve bug fixes and translations up until it is considered stable.

So go ahead, download the new beta and help us find all remaining bugs.

Enjoy!