Control activity feeds on facebook

Controlling activity feeds on facebook

Facebook has a setting which lets you chose amongst your friends and pages, whose updates you want to see and whose you want to skip. Here it is how

Next to Most Recent, there is a drop down button. Click on that to gain access to control options. The drop down menu comes only when you are viewing the Most Recent news feeds only. So if you don’t see an option, just click on Most Recent. The page will refresh itself and the menu options will come.

image

Select Edit Options in the drop down menu

image

Now conveniently you can choose to show news from

  1. Those friends and pages you interact with most or
  2. All friends and pages.

The default setting is “friends and pages” you interact with most. You can also edit friends whose feeds have been blocked in the 

Recursively traversing Python dictionary and removing keys

Code Snippet to recursively traverse a dictionary and remove certain key/value pair

In case of complex dictionaries like

my_blog = { '_created' : datetime.datetime (2007,01,03),
'_updated' : datetime.datetime (2011,06,11),
'name' : 'MyBLive',
'latest_post' : { '_created' : datetime.datetime (2007,06,9),
'_updated' : datetime.datetime (2007,069),
'name' : 'Hello World !' }

The problem with this is that datetime.datetime entities are not JSON Serializable. One approach could be to provide a serializer for datetime.datetime entities as suggested by verte over IRC. If you want to have a datetime.datetime aware JSONSerializer, you should have a look at the django.core.serializers.json module

In my case, we were using a Google App Engine application and the JSON response need not contain these key/value pairs so it makes more sense if these are removed from the dictionary.

def rm (d, l):
"""
Removed from dictionary "d" all those key-value pairs the keys of which
are defined as a list in "l"
"""
if not l: return d
if reduce ( lambda x,y: x or y, [x in d.keys () for x in l]):
[d.pop (x, None) for x in l]
[rm (x, l) for x in d.values () if isinstance (x, dict)]
return d

Facebook autologin with google account


So, are you tired of logging in everytime on facebook? Putting your email id/facebook username and password. Wish there was a secure way in which you would have been automatically logged into facebook? There is! And the way is by connecting facebook and google account (gmail).

It’s pretty simple, safe and secure. All you have to do is to connect your gmail/google account with facebook once. Then everytime you are logged into gmail and open facebook, you will automatically be logged in. What’s more. Even if you try to logout, facebook will relogin you 🙂

Here is how this goes.

  1. Go to find your friends on facebook. It is on the right hand side bar. You will notice something like this. Now enter your gmail ID when asked as shown below.
  2. This will open a pop up as shown below. If you are not already logged into gmail, it will ask you to log in to your gmail account.
  3. After you have logged in, or if you are already logged in, you will see the request from google on behalf of facebook to access your contact information. Below there is a check box about remembering this authorization. Make sure that option is checked for auto login. Don’t worry, I will tell you how to revoke this privilage, if you want to later at the end of this post.
  4. After authentication, you will see a screen which will be something like the one below. This is where facebook has authenticated your google account and is now, fetching your friends who are on facebook. Let facebook do their job.
  5. Now you will find a list of your contacts from your gmail, who are on facebook. If you wish, you can send them a friend request, or you may skip this step.
  6. Now that is all. Your facebook account is connected to your gmail account and you are ready for passwordless login on facebook. To test this, logout of your facebook account, but remain logged in your gmail account. After you have logged out, you will see facebook logging you again into your account. Like the one shown below.
  7. If you ever wish to revoke permissions of facebook from your google account, just go to google.com and click on Google Account Settings.
  8. Next, click on Change Authorized Websites to see the list of websites you have authorized. Find for Facebook there, and click on revoke access. That’s all you have now successfully disconnected facebook and google account.

Exporting multiple photoshop images in JPG

There are cases when we have multiple photoshop images (.PSD) images and we want to export them/ save them as JPG format, possibly even resize it. So, the best way out is to use Picasa Software (http://http://picasa.google.com/)available for Windows, Linux and Mac. It automatically detects all images on your Hard Drive (even photoshop images in PSD format). Now you just need to select the album (folder) containing the PSD files, and click on “Export” at the bottom. This export will provide you options like resize and picture quality and many others. After selecting them, just click on “Export” and that’s it. ou have saved multiple PSD files in JPEG format in one go, using Picasa 🙂

Don’t forget to comment, if you liked it.

A better feed reader

Most of the feed readers – web based, desktop based are more or less similar in their approach. You subscribe to a feed, and they will display all new (or non read) items. It is good. Now this is what a feed reader should do. Some feed readers (like Google reader) go beyond this and allow you to share your favorite feeds with your friends.What more does anyone needs?

Well, there are many more ways in which a feed reader can be enhanced. I wil be talking about the one that i find most useful.

Everything is not important

I am a feed junkie. I go to any website, and if i find anything interesting, i immediately subscribe to its feed. Months later, i realise that not all posts from that website is what i actually am interested in. Let’s take a scenario.Most people are subscribed to Slashdot or LifeHacker or Reddit. I am particularly interested in Programming and Technology. And specifically in Python, C++, WebApps. But what i am getting in my feeds is everything from FORTRAN to JAVA and from Microprocessors to launch of new space craft. This is useless information for me, and what i will be doing probably is – select all, mark as read. If i dont get a chance to read my feeds for a day or two, i will easilt have 1000+ posts and when bulk mark as read, i am probably going to miss out things that might be important for me.

Overcoming the situation

In my opinion, there is only one way to overcome the situation. Get the specific posts from the feeds, in which the reader is interested. So, if i am interested in Python and C++, i will be able to see and read only those feeds that have relevent information about Python and C++.
Again, there are two approaches to make this possible.

Approach 1) Let the reader speak for himself.

When a user is subscribing a new feed say “Programming”, suggest him – This is a very broad category. Would you like something in particular, say C++ or Python? If he says yes, go ahead and keep this thing in memory.

Aproach 2) Find out yourself.

In this approach, the user is initially presented with all the posts corresponding to a feed. A track record is kept for the feeds that the user has actually read and for those feeds for which he has just “marked as read”. Based on these data over a span of time, the system will be generating a set of keywords, which describe a range of interests for one particular user.

One or both of the above approaches can be used. What matters is that the set of keywords for the range of user’s interests in posts should be accurate. This is never guaranteed to be comprehensive, but should be somewhat near to it.

Now things are quite simple. We have the feed, we have the list of posts, and we have the user’s interest. For every post in the feed, scan it. See if it contains things that might interest user. Show him only those posts, that he is interested in. If the system is uncertain about a post, that can be under the “posts you might be interested in” section of the feed reader.

If implemented in this manner, i believe that feed readers can be more popular and good than the present ones.

If any engineer who is working on some feed reader is reading this post, and might consider it for their next release, i would be happy if they could contact me and say “Thanks” 🙂

Make this world a better place.

OpenSource alternate to Dreamweaver

Of lately, i was thinking of switching to open source alternative for DreamWeaver, and i found out Aptana. Aptana is an eclipse based IDE that provides a lot of benefits which but obviously includes being the powers of opensource and freeware. Aptana comes in two flavors – a stand alone IDE and an Eclipse Plugin. You can install either of the two depending on your needs. Personally i dont like Ecipse, so i decided to go for stand alone IDE. You might want to check out the download page for Aptana

After installing Aptana, you need to install CFEclipse plugin for providing ColdFusion support in Aptana.

Installing CFEclipse in Aptana

  1. Download the latest version from the archived software update site: http://www.cfeclipse.org/update/
  2. Unzip the archive file. You should get a folder called “org.cfeclipse.cfml.update.release”.
  3. In Aptana, go through the usual procedure to add an update site (Help -> Software Updates -> Find and Install -> Search for new features to install).
  4. Click on New Local Site…
  5. Choose the folder that you extracted from the zip file (e.g. the location of “org.cfeclipse.cfml.update.release”).
  6. Click Select.
  7. Change the name to something more reasonable such as CFEclipse Local Install.
  8. Click OK and then click Finish.
  9. Follow the installation procedure and prompts… (I am sure you can handle it from now on).

Pretty Simple. That’s it. And now we have an open source alternative for DreamWeaver that is much better than the original one.