Monday, February 28, 2011

OO Design Principles Compilation

OO Design Principles Compilation: "

This page is a work in progress… a compilation of information about object-oriented design principles and values.


S.O.L.I.D. Class Design Principles


Collected by Robert C. Martin for his book “Applying Principles and Patterns”


Single Responsibility Principle (SRP)


A class should have only one reason to change. For example, if a change to the business rules causes a class to change, then a change to the database schema, GUI, report format, or any other segment of the system should not force that class to change.



Open/Closed Principle (OCP)


Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.



Liskov substitution principle (LSP)


Subtypes must be substitutable for their base types. If class A inherits from class B, then wherever you can use A you should be able to use B. E.g. remember that square is not necessarily a rectangle! When extending: Preconditions cannot be straightened, Postconditions cannot be loosened, visible Invariants cannot be changed (?). Invariants: users depend on this both before and after sending a message. Use a proper set-based inheritance relationship. Not following set semantics is very risky. Subsumption Rule: A reference to a subtype can be used in any context where a reference to a super type is expected. This principle extremely limits what SHOULD be done with the pure extension (inheritance) mechanism. Do not follow at your own risk.



Interface Segregation Principle (ISP)


The dependency of one class to another one should depend on the smallest possible interface.



Dependency Inversion Principle (DIP)


Depend upon abstractions (interfaces), not upon concrete classes.



Other Important Ones


Law of Demeter


aka Principle of Least Knowledge: Only talk to your friends


Any method M of an object O may only invoke the methods of the following kinds of objects:



  • itself

  • its arguments/parameters

  • any objects it creates/instantiates

  • its direct component objects


See



Hollywood Principle


Don’t call us, we’ll call you.



Don’t Repeat Yourself (DRY)


Remove duplication.



Program to an interface, not an implementation


Maybe just another way to say dependency inversion.



You Ain’t Gonna Need It (YAGNI)


Do not add code that you “think will be used later”. Add code only at “Last Responsible Moment”



Keep It Simple, Stupid (KISS)


What is the simplest thing that could possibly work?



And More


Encapsulation and Information Hiding


http://en.wikipedia.org/wiki/Encapsulation_(computer_science) http://en.wikipedia.org/wiki/Information_hiding


Separation of Concerns (SoC)


http://ctrl-shift-b.blogspot.com/2008/01/art-of-separation-of-concerns.html


High Cohesion


http://en.wikipedia.org/wiki/Cohesion_(computer_science)


Low/Loose coupling



Convention over Configuration (CoC)


http://en.wikipedia.org/wiki/Convention_over_Configuration


Command-query separation (CQS)



[edit] Design by Contract (DbC)



Dependency Injection (DI)


Inversion of Control (IoC)


Avoid Fragile Baseclass


http://en.wikipedia.org/wiki/Fragile_base_class


Has-a Is-a


http://en.wikipedia.org/wiki/Has-a http://en.wikipedia.org/wiki/Is-a http://en.wikipedia.org/wiki/Object_composition


What is Identity


http://en.wikipedia.org/wiki/Identity_(object-oriented_programming)


Interchangeability


http://en.wikipedia.org/wiki/Interchangeability_(computer_science)


Option-operand separation


http://en.wikipedia.org/wiki/Option-operand_separation


Intention Revealing Names



Zero Friction Development


http://www.google.com/search?q=Zero+Friction+development


Encapsulate Variation


Separate what varies from what stays the same. Also known as Serenity Principle.



Composition over inheritance



  • Head First Design patterns page 23, 243, 397


Common Closure Principle


Classes that change together must be placed in the same package.






Comments"

Thursday, February 24, 2011

9 Incredible HTML5 Canvas And Javascript Experiments

9 Incredible HTML5 Canvas And Javascript Experiments: "Chrome Experiment has been releasing heaps of incredible HTML5 canvas and javascript experiments. Check out these newest experiments, they are truly unique and jaw dropping."

Tuesday, February 22, 2011

Loading Twitter Data into Android with Lists

Loading Twitter Data into Android with Lists: "

In my previous article, we created your first Android app featuring a basic Hello World function. Well, it seems the real Hello World of the mobile world is a Twitter feed.

This tutorial will guide you through creating a simple Android app to display a list of tweets coming from the JSON based search API provided by Twitter. We will work through:

  • displaying a list of items
  • customizing the look of each list item
  • accessing remote services and parsing data
  • creating responsive user interfaces

For instructions on how to set up an Android development environment, take a look at the previous article, which guides you all the way from installing software and establishing a workspace through to running a skeleton app in the Android Emulator.

Displaying Lists

To get started on our new project, create a new Android project in Eclipse (File -> New -> Other -> Android and select Android Project), entering an appropriate project name, application name, package name, and a name for the single launch activity.

You can see the options I’ve used below:

Android Project Set Up

To check that you have created the project correctly, run the skeleton app in the emulator by highlighting the project name in Eclipse and selecting Run -> Run As -> Android Application.

Currently the Activity you have created will be extending android.app.Activity, and in your onCreate method you will be setting the ContentView of the activity to R.layout.main (linking to the layout as specified in /res/layout/main.xml). The Android SDK provides a convenient way to quickly display a list of data using a superclass called android.app.ListActivity. This Activity already provides a ContentView, configured with a ListView, ready to use and populate with data.

Now change the superclass of TwitterFeedActivity to extend ListActivity, removing the setting of the ContentView from the onCreate method.

The ListView now needs to be given data to display, along with a means to map that data into rows. ListAdaptors provide this mechanism and are set on the underlying ListView of the ListActivity using setListAdaptor.

Create some sample data containing two Strings, and an Android SDK provided adaptor (ArrayAdaptor) that knows how to handle arrays of arbitrary data into ListViews (The Android SDK also comes with several other ListAdaptors, such as Cursor Adaptors, which can assist when connecting local data storage to a ListView). You also need to provide the adaptor with a layout it can use to render the elements onto each row. In the example below we are using the Android SDK provided layout, simple_list_item_1, which is a single text label–perfect for laying our single strings:

public class TwitterFeedActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String[] elements = {"Line 1", "Line 2"};
setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, elements));
}
}

Adjust your code as above and confirm the following results in the emulator:

Android Emulator

Customizing List Items

The basic Twitter client needs to display at least two fields per row: the author of the tweet, and the content of the tweet. In order to achieve this you will have to move beyond the inbuilt layout and ArrayAdaptor and implement your own instead.

Start by creating a class called Tweet that can be used to hold both the author and the content as Strings. Then create and populate a Tweet object with some test data to be displayed in the custom list item:

package com.sitepoint.mytwitter;
public class Tweet {
String author;
String content;
}

Create a layout XML file in /res/layout/list_item.xml to define two TextViews to display the content and author on separate rows. In order to display them one above the other, use a LinearLayout, configured to render each element within it vertically (android:orientation='vertical').

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="6dip">
<TextView android:id="@+id/toptext" android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical" android:singleLine="true" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"  android:id="@+id/bottomtext"
android:singleLine="true" />
</LinearLayout>

Once the  XML file has been created, the Android Eclipse plugin will automatically add it as a reference into the generated R file. This R file is kept under the /gen folder of your project and acts as a bridge between your XML elements and your Java code. It allows your Java code to reference XML elements and files created under the /res folders. The file you have just created can now be referenced as R.layout.list_item in the Java code, as you will do next in the custom list adaptor.

Create a private class (inside the Activity) called TweetListAdaptor which subclasses ArrayAdaptor. This class should be used to store an ArrayList of the Tweets being displayed, as well as providing a way to map the Tweet objects to the TextViews you created in the layout above.

This mapping overrides the getView method in ListAdaptor, and should return a View object populated with the contents of the data at the requested position:

public View getView(int position, View convertView, ViewGroup parent) { 

Furthermore, it should–if possible–reuse any View objects being passed into the method through the convertView parameter. If a new View object has to be created for every element in a list, large lists would stutter when they scroll. Caching Views allows the minimum amount of View objects to be created to populate a large list of data.

The complete implementation of the custom TweetListAdaptor is below. Note the “if statement” checking whether the passed convertView is able to be reused. If the View is null, the ListView has run out of Views to display and requires a new View to be created for this row.

This is achieved using the LayoutService, which is able to inflate (or load) the layout as you specified earlier in XML. You will see here how to reference the layout file using the generated R class through the R.layout.list_item reference.

Once a View is created (or reused), the particular Tweet is extracted from the ArrayList at the position required to be rendered by the ListView. You are then able to obtain references to the two TextView elements using the ids assigned to them in the XML (for example, android:id='@+id/toptext'). Once you have the references, you can set them with the appropriate content and author from the Tweet object.

private class TweetListAdaptor extends ArrayAdapter<Tweet> {
private ArrayList<Tweet> tweets;
public TweetListAdaptor(Context context,
int textViewResourceId,
ArrayList<Tweet> items) {
super(context, textViewResourceId, items);
this.tweets = items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater) getSystemService                         (Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.list_item, null);
}
Tweet o = tweets.get(position);
TextView tt = (TextView) v.findViewById(R.id.toptext);
TextView bt = (TextView) v.findViewById(R.id.bottomtext);
tt.setText(o.content);
bt.setText(o.author);
return v;
}
}

Now the onCreate method can be adjusted to use the custom list adaptor with the created test data as shown below:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Tweet tweet = new Tweet();
tweet.author = "dbradby";
tweet.content = "Android in space";
ArrayList<Tweet> items = new ArrayList<Tweet>();
items.add(tweet);
TweetListAdaptor adaptor = new TweetListAdaptor(this,R.layout.list_item, items);
setListAdapter(adaptor);
}

which will display the following, when run in the emulator:

Android Emulator Twitter Feed

Accessing remote services and parsing data

The Android SDK contains packages aimed at simplifying access to HTTP-based APIs. The Apache HTTP classes have been included and can be found under the org.apache.http package. You’ll be using these classes, along with the org.json classes to parse the data coming back from a call out the to Twitter search API.

Before any remote services can be accessed from an Android app, a permission has to be declared. This will alert the user (of your app) of what the app might be doing. Permissions could be to monitor incoming SMS, read the address book or, in your case, to simply make a request on the internet. These permissions are displayed to a user in the Android Market place before an app is installed, giving the user the choice of whether they want to give this app the declared permissions.

The permission you need to use is INTERNET and should be inserted outside of the application tag in the AndroidManifest.xml file.

</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

With the permission in place, we can create a private method in the Activity that makes a request, parses the result, and returns an ArrayList of Tweet objects. The code listed below makes the request and looks for the resulting JSON array, which is iterated to extract each tweet’s text and from_user elements.

private ArrayList<Tweet> loadTweets(){
ArrayList<Tweet> tweets = new ArrayList<Tweet>();
try {
HttpClient hc = new DefaultHttpClient();
HttpGet get = new HttpGet("http://search.twitter.com/search.json?q=android");
HttpResponse rp = hc.execute(get);
if(rp.getStatusLine().getStatusCode() == HttpStatus.SC_OK)
{
String result = EntityUtils.toString(rp.getEntity());
JSONObject root = new JSONObject(result);
JSONArray sessions = root.getJSONArray("results");
for (int i = 0; i < sessions.length(); i++) {
JSONObject session = sessions.getJSONObject(i);
Tweet tweet = new Tweet();
tweet.content = session.getString("text");
tweet.author = session.getString("from_user");
tweets.add(tweet);
}
}
} catch (Exception e) {
Log.e("TwitterFeedActivity", "Error loading JSON", e);
}
return tweets;
}

Now replace the dummy data you previously used with a call to the loadTweets method when constructing the custom list adaptor in the onCreate method.

TweetListAdaptor adaptor = new TweetListAdaptor(this,R.layout.list_item, loadTweets());

Run this in the emulator and you should now see real data coming back from the API request being displayed in the list view as below:

Android Emulator MyTwitter

Creating responsive user interfaces

The code in its current state has the potential to cause an Application Not Responding (ANR) dialog to appear, prompting the user to quit your app. This can occur due to the long-running work of making a remote request for data being performed within methods such as onCreate.

Long-running tasks should never be performed on the main application thread (which drives the user interface event loop). They should instead be spawned off into child threads to perform the work.

While Java’s Thread class can be used for this task, there is a complication in that once the long-running task is complete, it generally wants to change the user interface to report the results (that is, display a list of tweets loaded from a request).

User interface elements can only have their state altered from the main thread, as the Android UI toolkit is not thread-safe, therefore the background thread needs to message back to the main thread in order to manipulate the UI.

Thankfully, the Android SDK provides a convenient class AsyncTask, which provides an easy mechanism for asynchronous tasks to interact safely with the UI thread. This is achieved by subclassing AsyncTask and overriding the doInBackground method to perform the long-running task, then overriding onPostExecute to perform any manipulations on the UI.

When the AsyncTask is created (it has to be created on the UI thread) and executed, the doInBackground method is invoked on a background thread. On completion, the onPostExecute method is invoked back on the main UI thread.

To use this in your app, you will need to implement a private class within the Activity (like the custom adaptor class) called MyTask, which subclasses AsyncTask. You can override the doInBackground method with the contents of your previous loadTweets method.

Instead of the ArrayList being returned, you maintain an instance variable in the Activity so that the data can be shared across the private classes. Then in the onPostExecute you can set the List Adaptor with the data, as was done previously in onCreate. The onCreate method now simply creates the MyTask object and calls the execute method.

In order to demonstrate the UI responding while the background request is being performed, I have added a ProgressDialog to the AsyncTask as well. The complete listing of the Activity is below:

package com.sitepoint.mytwitter;
import java.util.ArrayList;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
public class TwitterFeedActivity extends ListActivity {
private ArrayList<Tweet> tweets = new ArrayList<Tweet>();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
new MyTask().execute();
}
private class MyTask extends AsyncTask<Void, Void, Void> {
private ProgressDialog progressDialog;
protected void onPreExecute() {
progressDialog = ProgressDialog.show(TwitterFeedActivity.this,
"", "Loading. Please wait...", true);
}
@Override
protected Void doInBackground(Void... arg0) {
try {
HttpClient hc = new DefaultHttpClient();
HttpGet get = new HttpGet("http://search.twitter.com/search.json?q=android");
HttpResponse rp = hc.execute(get);
if(rp.getStatusLine().getStatusCode() == HttpStatus.SC_OK)
{
String result = EntityUtils.toString(rp.getEntity());
JSONObject root = new JSONObject(result);
JSONArray sessions = root.getJSONArray("results");
for (int i = 0; i < sessions.length(); i++) {
JSONObject session = sessions.getJSONObject(i);
Tweet tweet = new Tweet();
tweet.content = session.getString("text");
tweet.author = session.getString("from_user");
tweets.add(tweet);
}
}
} catch (Exception e) {
Log.e("TwitterFeedActivity", "Error loading JSON", e);
}
return null;
}
@Override
protected void onPostExecute(Void result) {
progressDialog.dismiss();
setListAdapter(new TweetListAdaptor(
TwitterFeedActivity.this, R.layout.list_item, tweets));
}
}
private class TweetListAdaptor extends ArrayAdapter<Tweet> {
private ArrayList<Tweet> tweets;
public TweetListAdaptor(Context context,
int textViewResourceId,
ArrayList<Tweet> items) {
super(context, textViewResourceId, items);
this.tweets = items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.list_item, null);
}
Tweet o = tweets.get(position);
TextView tt = (TextView) v.findViewById(R.id.toptext);
TextView bt = (TextView) v.findViewById(R.id.bottomtext);
tt.setText(o.content);
bt.setText(o.author);
return v;
}
}
}

You should now have a complete app requesting the Twitter data in the background.

The AsyncTask has quite a few more features to explore. You can be sure we will cover those in future articles. In the meantime you should read the excellent Android document covering these classes at http://developer.android.com.






"

Wednesday, February 9, 2011

41 great HTML5 tutorials and resources

41 great HTML5 tutorials and resources: "

41 great HTML5 tutorials and resources for you to bookmark.

"

7 Common Project Management Problems (And How to Solve Them)

7 Common Project Management Problems (And How to Solve Them): "


It doesn’t matter how talented you are, if you can’t manage your projects, then you will struggle to achieve success.


To help you avoid that undesirable outcome, here are seven project management problems that designers and developers often face, as well as how to deal with them when they arise.



1. Your Client Gives You Vague, Ever-changing Requirements


Fickle clients can be a huge hassle. If a client doesn’t know what they want until a certain stage is complete, then schedule those decision points into the project as milestones. It is important to have a clear path mapped out from start to finish because it forces the client to be specific with their requirements, as well as keeping the project on track.


Be clear at the outset about what your task is going to be on the project and how much leeway is available. If you will need to be compensated for big revisions or changes in direction, then set a clear outline about the number of adjustments you can make before you need to charge more. If you can, quantify these adjustments with a number; it makes it much easier to keep track of things.


2. Your Client is Slow with Communication


People are busy, but it’s tough for you to move forward on a project if you can never get answers from the person you’re working with.


The good news is that you will drastically increase your response rate if you do a little bit of work ahead of time. Instead of waiting for the back-and-forth discourse to finally take place, simply start moving in the direction that you think is best and then seek verification. This strategy makes it easy for your client to quickly say yes (or no).


Here is an example:


Hi Mark,


Last time we spoke, you mentioned that we needed to make a decision on task X. I went ahead and started doing Y since that sounded best based on our previous discussion. If you’re happy with that, I can move forward and we can review the progress as scheduled on Friday.


Sound good?


- John


The beauty of this framework is that it shifts the client’s mindset from, "What decision am I going to make?" to "Should I say Yes or No?" Saying yes or no is much easier than thinking up a new solution (which, as the hired professional, should be our job).


Additionally, you will get a response much faster because there is now a time constraint on the work. If they like what you’re doing, then they will give you the go-ahead. If they don’t, then they know that they need to get back to you right away because, otherwise, things will be moving in the wrong direction.


However, it’s very important to use sound judgment. Obviously, you won’t be able to work ahead and then ask for approval on all aspects of the project, especially those that will cost a lot of time and resources to update should the client say no. That said, you’ll be surprised how much quicker things get done by making it easy for your clients to say, "Yes."


3. The Project Doesn’t Start On Time


Maybe you had a slow go of it last month, but now, you’re swamped. You know you need to take on the work when you can get it, but now you’re worried that you won’t be able to start all of your projects on time as you promised. Or perhaps your client says you’re a top priority — but tomorrow a different project becomes more important.


If the hold up is on your end, then it’s important that you do something to jump-start the project — even if it’s in a really small way. Give the client a call to discuss their expectations and set a more realistic timeframe for the first milestone. This could take as little as a few minutes, but it makes the client feel like things have started. However, beware of doing this more than once. That’s known as stringing the client along — they don’t take that too well, and for good reason.


If the hold up is on their end, then you need to communicate very clearly how that alters things moving forward. Be sure to let them know exactly how this change affects the completion dates of future milestones and you should check the revised schedule against other commitments with other projects.


4. You Try to Manage Every Project the Same Way


There has never been a project that has the same circumstance, requirements, and needs as another project. Situations, people, and goals change over time.


Instead of squeezing every project into the same template, spend some time crafting milestones specific to the needs of each project. Every job requires specific milestones that meet the schedules of all parties involved. Resist using the standard "2 weeks until X" type of thinking.


To put it simply, your schedule changes all the time, right? That means the way you plan your projects needs to change as well.


5. The Client Doesn’t Like What You Created


If this happens often, then there is a communication issue that needs to be addressed. Make sure you understand not just the technical requirements of a project, but also the underlying rationale of your clients. Why did they decide to do this in the first place? What are they hoping your work will enable them to do when all is said and done? How do they see your project fitting in with their overall strategic vision?


Good project managers create a shared vision between all parties. It’s your responsibility to understand the direction of your particular project as well as the overall strategy of your client — and then to make sure those two items match up.


6. Your Point of Contact Doesn’t Seem to Care About Your Project


Working on a project that isn’t high on a client’s priority list can be frustrating.  In some cases, the person responsible for communicating with you has little to no interest in your project. The completed product will have no direct effect on their job, they are hard to ask questions to, even harder to get answers from, and they provide minimal guidance.


This issue is best solved ahead of time.


When screening potential clients, do your best to find out if the contact person has a vested interest in the project. Pay attention to their awareness about potential problems or risks you could run into, their level of urgency when scheduling this project in their calendar, and their desire to communicate with you quickly and consistently from the beginning. If they brush these issues to the side, then it is worth your time to talk with someone else and establish a second point of contact before deciding whether to take on the project or to avoid the project all together.


7. Too Much Time is Spent Solving Problems After Projects Are "Live"


There are bound to be a few bugs here and there, but this is a classic problem caused by focusing too much on production, and not enough on testing. If this continually becomes an issue, then there are two possible solutions.


First, schedule in more time to test your projects from the start. Double your typical testing time if needed. Yes, it will stretch your schedule further, but in the long run, it will save you from the countless little problems that prevent your days from being productive.


Second, if your ongoing issues are a result of clients constantly wanting you to tweak something here and there, then you need to be clearer about what you do and don’t provide with your services. When you set guidelines with a client at the beginning of a project, you need to state very clearly that your work ends after the final product is created and handed off. This can be avoided by outlining boundaries at the beginning of a project that explicitly state that additional service after delivery will cost extra.


Putting It All Together


There are literally countless reasons a project can run into issues, but the vast majority of them can be solved with clear and frequent communication.


While it is easy to point blame in the direction of your client, it is your responsibility to consistently initiate contact and keep the line of communication open. This is about more than just talking to your client. Consistent communication is only created by active effort on your end. It doesn’t just happen naturally.


One excellent practice you can implement right away is to send your client a progress report every Friday. This could be a full report or just a short email. You should detail what you accomplished this week and what you plan to do the next week. Do this every week, whether your client asks for it or not.  Not only does this practice solve problems before they become too big, it will also make your clients love you.


Further Reading on Project Management Problems



What are some project management problems you have faced? How did you solve them? Share with us in the comments!


Related Content



About the Author


James Clear is the founder of Passive Panda, a site about earning more money, more time, and more freedom. Join Passive Panda’s Free Newsletter on Earning More to receive the 7-part Freelancing 101 Course and proven tips for earning more. Connect with Passive Panda on Facebook.




"

Creating and Deleting Files on Fly on WebServer through Javascript (Magic of HTML and Jquery): Revision 1

Creating and Deleting Files on Fly on WebServer through Javascript (Magic of HTML and Jquery): Revision 1: "The article Creating and Deleting Files on Fly on WebServer through Javascript (Magic of HTML and Jquery) was added by nikxgupta on Sunday, January 23, 2011.

Creating and Deleting Files on Fly on WebServer through Javascript (Magic of HTML and Jquery)We usually know the methods of POST and GET for posting and fetching data from WebServer.There are many other HTML verbs used . Two of them are PUT and DELETEPUT"

Monday, February 7, 2011

3 Interesting Reads on Recommendation Systems

3 Interesting Reads on Recommendation Systems: "

This week, Greg Linden noticed a conference paper that reveals that YouTube is using Amazon.com's recommendation engine to power its own recommendations. Last week, Fast Company ran an article about how a former Amazon.com engineer is trying to help discover a better recommendation engine than his former employer. And we rediscovered a tutorial from way back in December of 2010 on how to get your hands dirty building your own recommendation system using NumPy.


Sponsor



YouTube uses Amazon's recommendation algorithm



Linden writes that YouTube is using Amazon.com's algorithm, developed in 1998, to power its recommendation system:



To be clear, this was not intended as an attack on Google in any way. Googlers built on previous work, as they should. What is notable here is that, despite another decade of research on recommender systems, despite all the work in the Netflix Prize, YouTube found that a variant of the old item-to-item collaborative filtering algorithm beat out all others for recommending YouTube videos. That is a very interesting result and one that validates the strengths of that old algorithm.


Beyond Amazon: How to Make Recommendations Smarter



Former Amazon.com engineer and current RichRelevance chief scientist Darren Vengroff wants to help discover a better system than Amazon.com's 13 year old algorithm. But he's not trying to discover it himself. Instead, according to Fast Company, he's trying to enable researchers in mathematics departments around the world to do better prediction engine research by providing them with real-world data:



He's created a 'black box' of sorts with real-world data that researchers can use to run experiments on. Researchers won't be able to look at the data, but they will be able to dump their algorithms in and have the box spit out results, which the researchers can then use to refine their hypotheses.


How To Build a Recommendation System with NumPy



If reading all this makes you want to play around with your own recommendation engine, then check out this Software Carpentry tutorial on building recommendation systems in NumPy. NumPy is a package for scientific computing for Python.



Bonus Article



Our 2009 article5 Problems of Recommender Systems.


Discuss



"

Wednesday, February 2, 2011

Learn About CSS3

Learn About CSS3: "This video presents all the new techniques and tricks involving HTML5 and CSS3 enhancements that are providing new possibilities for improving the user experience. Video Producer: San Francisco HTML5 User Group"

Silverlight vs ASP.NET

Silverlight vs ASP.NET: "The article Silverlight vs ASP.NET was added by kanagucdm on Sunday, January 23, 2011.

Silverlight : The Rich User Interface helped to create a website which will make the UI as a desktop application. Silverlight 4.0 even came with out of browser option to run the silverlight application in the desktop itself. If there is no internet connection"

Time Management vs. Task Management