﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Judah Gabriel Himango commented on Open Source Application Review: BitShuva Radio</title><description>Great feedback, guys, I appreciate it and have been updating the code in response to your suggestions.</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment11</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment11</guid><pubDate>Mon, 25 Feb 2013 17:03:53 GMT</pubDate></item><item><title>Ayende Rahien commented on Open Source Application Review: BitShuva Radio</title><description>Kostiantyn,
Because it makes everything more complex. is usually not necessary, increases build time and add complexity and hardship to the project.</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment10</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment10</guid><pubDate>Sun, 24 Feb 2013 07:07:41 GMT</pubDate></item><item><title>Bhangu commented on Open Source Application Review: BitShuva Radio</title><description>Looks like a clean little app, but lets a very little scope for changes.  An mvc app can always do with a viewfactories to give little separation of concern. The action method here are bit too obese. Especially related to user logins etc

Cheers for the review</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment9</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment9</guid><pubDate>Sun, 24 Feb 2013 00:12:43 GMT</pubDate></item><item><title>Kostiantyn commented on Open Source Application Review: BitShuva Radio</title><description>Ayende, you stated "There is just one project, not a gazillion of them." as an advantage. What`s wrong about several projects? 
Most sources teach to have seperate projects for business logics part, data access part, UI part, and may be some more. </description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment8</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment8</guid><pubDate>Sat, 23 Feb 2013 08:19:52 GMT</pubDate></item><item><title>Māris Krivtežs commented on Open Source Application Review: BitShuva Radio</title><description>Judah, you shouldn't hide all that stuff in some base class. Just setup DI composition root properly - for Web API create IControllerActivator implementation, but for MVC IControllerFactory.

You are already using Ninject, so you use it as IoC container in those. See Mark Seeman's post how it should be done for Web API (he uses Castle Windsor): http://blog.ploeh.dk/2012/10/03/DependencyInjectionInASPNETWebAPIWithCastleWindsor.aspx</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment7</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment7</guid><pubDate>Fri, 22 Feb 2013 08:04:02 GMT</pubDate></item><item><title>Judah Gabriel Himango commented on Open Source Application Review: BitShuva Radio</title><description>Yeah, I've twice committed, then backed out of, doing all the Raven session and user ID stuff in a base controller. Part of the problem is duplication: I'd need a base controller for both the WebAPI controllers and the plain MVC controllers.

I agree that infrastructure needs to extracted out of the logic code. Sprinkling this stuff all over isn't great, and leads to subtle bugs.</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment6</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment6</guid><pubDate>Thu, 21 Feb 2013 17:39:39 GMT</pubDate></item><item><title>Ayende Rahien commented on Open Source Application Review: BitShuva Radio</title><description>Alexei,
Anything that manages things that are external.
Managing the session, for example, is infrastructure. </description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment5</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment5</guid><pubDate>Thu, 21 Feb 2013 05:51:19 GMT</pubDate></item><item><title>Alexei K commented on Open Source Application Review: BitShuva Radio</title><description>Ayende, you keep using the word "infrastructure", as in you'd rather have something done there instead... what exactly do you mean by that word? Which part of this project is infrastructure?</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment4</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment4</guid><pubDate>Wed, 20 Feb 2013 22:27:58 GMT</pubDate></item><item><title>Judah Gabriel Himango commented on Open Source Application Review: BitShuva Radio</title><description>Rob, thanks.

I'm not familiar with graphing databases. I'll look into it. Thanks.

At the moment, the general idea is to get the average rank of the songs, and as songs are thumbed up or down, to set Song.CommunityRankStanding = VeryPoor or whatever.

Then, the algorithm comes along and picks a song with the appropriate CommunityRankStanding, or appropriate artist based on likes, etc.</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment3</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment3</guid><pubDate>Wed, 20 Feb 2013 19:22:01 GMT</pubDate></item><item><title>Rob Ashton commented on Open Source Application Review: BitShuva Radio</title><description>Choosing appropriate songs might be better represented as a graphing problem, Neo4j might be a good bet for that specific problem.</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment2</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment2</guid><pubDate>Wed, 20 Feb 2013 17:46:53 GMT</pubDate></item><item><title>Judah Gabriel Himango commented on Open Source Application Review: BitShuva Radio</title><description>Oren, thanks for reviewing my little side project.

The software is similar to Pandora: offering individual MP3 streams to users based on their thumb-up/down songs. We use HTML5 audio with a Flash fallback to serve the MP3s. I'm using TypeScript + Bootstrap + KnockoutJS on the client -- it's a lot of fun.

You're right, it looks like I have a bug in the CommunityRankIndex. That index is part of an experiment with how to properly do an intelligent song picking algorithm. What I *want* to happen is this: 

When the next song is going to play, the algorithm should pick a song that fits these criteria:

- Strongly favor songs that the user has thumbed-up
- Favor songs that have a good community ranking
- Favor songs by artists whose songs have been thumbed-up by the user
- Favor songs on albums containing songs thumbed-up by the user
- Very rarely pick songs the user has disliked
- [in progress] Favor songs likely to be enjoyed by the user based off song tags (e.g. instrumental, piano, etc.).

When I first built the code, I just loaded all the songs into memory and used this algorithm: http://stackoverflow.com/questions/3345788/algorithm-for-picking-thumbed-up-items

Unfortunately, that's not very scalable; some radio stations have many thousands of songs, and loading all this into memory was no longer feasible. Doing it with Raven presented an interesting challenge, and I'm still working out a good way to do it. You can see that code in the SongsController.PickSongForUser.

The user session stuff is nasty and needs to be cleaned up.

I totally need to use the awesome full text support in Raven. I was lazy and did the poor man's .StartsWith search; shameful! :-)

I'll fix these issues soon - thanks for the code review!</description><link>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment1</link><guid>http://ayende.com/161089/open-source-application-review-bitshuva-radio#comment1</guid><pubDate>Wed, 06 Feb 2013 19:51:59 GMT</pubDate></item></channel></rss>