We are perfect in something when we do the same task over and over again. But there may be many people like you doing the same task repetitively. Take chess for instance. People have played chess for so long that remembering the rules of the game are no longer considered a feat. Now it is difficult to answer how to determine whether you've perfected the art.
This comes from my direct experience with chess. I've played chess for many years, read the books and strategies, practiced with good computer engines, viewed the professional games and yet, I don't consider myself even a good player. I've questioned myself why's that. Then suddenly in one of the games of Topalov Vs Anand that is currently going on in Sofia, Bulgaria; I was going through the player's post match comments. There, Anand was very sure on exactly at what step he did the blunder. With me, I think I've played all through the game and then I lose without even knowing what move was my fault.
So that's it. In a game if you can find out what specific move cost you a game, you're perfect, otherwise you're just ordinary.
Friday, May 7, 2010
Sunday, March 14, 2010
To Automate the web
Concept:
Looking at the number of new sites popping up, there is no doubt that this is the age of WWW (World Wide Web). To handle user's demands, websites these days come full with javascript, https security, flash interface, HTML 5, AJAX and so on. The sites that we normally use like Facebook and Twitter are full of those. However, from the marketing perspective each one of the technology that I mentioned poses a challenge. Automation becomes more difficult and complicated. Now you may ask why does a marketer require automation? Reasons could be many. A marketer might want to digg 100 stories, auto like selected post on facebook (say with keyword SEO), post through twitter (because if any apps are used to post, the apps' name appears on your tweet, if you use API, then API appears which might be undesirable).
How it works:
User can preconfigure a set of actions to the "bot", which are read from the DB. An admin panel can be used to configure these list of actions. A list of actions for facebook automation could be like:
1. Visit http://www.facebook.com
2. Fill textbox "uname" with : fbuser@gmail.com
3. Fill textbox "pwd" with : fbpass
4. Submit form "frmLogin"
5. Visit http://facebook.com/showall.php
6. Apply regex /a href="(.*?)\?like=true".*?desc="(.*?)"/
7. Filter in '6' those with "SEO"
8. Click the url in '6'.
Existing Tools:
All the existing tools are firefox plugins, and though they might do the job, they require a browser window to be kept open which might not be desirable.
Looking at the number of new sites popping up, there is no doubt that this is the age of WWW (World Wide Web). To handle user's demands, websites these days come full with javascript, https security, flash interface, HTML 5, AJAX and so on. The sites that we normally use like Facebook and Twitter are full of those. However, from the marketing perspective each one of the technology that I mentioned poses a challenge. Automation becomes more difficult and complicated. Now you may ask why does a marketer require automation? Reasons could be many. A marketer might want to digg 100 stories, auto like selected post on facebook (say with keyword SEO), post through twitter (because if any apps are used to post, the apps' name appears on your tweet, if you use API, then API appears which might be undesirable).
How it works:
User can preconfigure a set of actions to the "bot", which are read from the DB. An admin panel can be used to configure these list of actions. A list of actions for facebook automation could be like:
1. Visit http://www.facebook.com
2. Fill textbox "uname" with : fbuser@gmail.com
3. Fill textbox "pwd" with : fbpass
4. Submit form "frmLogin"
5. Visit http://facebook.com/showall.php
6. Apply regex /a href="(.*?)\?like=true".*?desc="(.*?)"/
7. Filter in '6' those with "SEO"
8. Click the url in '6'.
Existing Tools:
All the existing tools are firefox plugins, and though they might do the job, they require a browser window to be kept open which might not be desirable.
Thursday, February 18, 2010
Journalling Application
This is the age of Internet. Young people are spending more and more time online. The rise of applications like Facebook, Twitter, Orkut, Myspace and Google Buzz of late proves this. What we notice is that people mostly do one of two things in these social media sites.
One class which I like to call the "generic class" put down their summarized events or feelings or even seeming unimportant tasks. They put things like "Not much happenin here at Anfield", "Tired of Meeting and Eating.." etc.
The other class, "the Marketers" give a lot of shortened site links hoping that someone will eventually click and visit their targeted site.
And so, time passes on. Everything we do will eventually fade away and when the time comes to recall our past, there will never be enough data to draw proper conclusions. Sometimes this is painful. Imagine a day when you're too old to remember what gift you got in your first date... Probably that's why we need journals. Here I put forward a nice idea of such a hypothetical application.
The application boils down your life events (i.e. everything that you do) in a one-dimensional timeline. You can zoom the timeline, click at points (where point is a specific time) and find out everything that happened in its neighbourhood. The application would monitor whatever you post status in twitter/facebook/orkut/myspace, etc. and update itself. Or, you can directly add an event to the timeline. This is how the application updates itself, and tenaciously builds your life journal.
How is this of use to you? First for the marketer. Having a very specific data like this can be easily put to meaningful reports, charts and graphs. This is not just a random data like your home twitter timeline but a crawled data, the data that was built over time, tailored for you. You would for instance know which set of links incited a lengthy discussion in facebook, or which of your tweets got replied and RTed, after what major step your site got a flood of users, etc. On the top of this, there's raw data like uncooked food and proper analytics can be applied over it to turn into meaningful information like a tasty meal.
For a general user, you can get things like days when you got sick, maybe you develop headache during summer seasons, or even that you get psychic thoughts during the high tide!! Things like these can give you good feedback on improving your life in general.
This kind of application would require a web/desktop interface and a crawler engine.
One class which I like to call the "generic class" put down their summarized events or feelings or even seeming unimportant tasks. They put things like "Not much happenin here at Anfield", "Tired of Meeting and Eating.." etc.
The other class, "the Marketers" give a lot of shortened site links hoping that someone will eventually click and visit their targeted site.
And so, time passes on. Everything we do will eventually fade away and when the time comes to recall our past, there will never be enough data to draw proper conclusions. Sometimes this is painful. Imagine a day when you're too old to remember what gift you got in your first date... Probably that's why we need journals. Here I put forward a nice idea of such a hypothetical application.
The application boils down your life events (i.e. everything that you do) in a one-dimensional timeline. You can zoom the timeline, click at points (where point is a specific time) and find out everything that happened in its neighbourhood. The application would monitor whatever you post status in twitter/facebook/orkut/myspace, etc. and update itself. Or, you can directly add an event to the timeline. This is how the application updates itself, and tenaciously builds your life journal.
How is this of use to you? First for the marketer. Having a very specific data like this can be easily put to meaningful reports, charts and graphs. This is not just a random data like your home twitter timeline but a crawled data, the data that was built over time, tailored for you. You would for instance know which set of links incited a lengthy discussion in facebook, or which of your tweets got replied and RTed, after what major step your site got a flood of users, etc. On the top of this, there's raw data like uncooked food and proper analytics can be applied over it to turn into meaningful information like a tasty meal.
For a general user, you can get things like days when you got sick, maybe you develop headache during summer seasons, or even that you get psychic thoughts during the high tide!! Things like these can give you good feedback on improving your life in general.
This kind of application would require a web/desktop interface and a crawler engine.
Following strategies are fairly common in Aztecs.
1. Drush
2. Fast Imperial with E. Eagles rush
1. Drush
Aztecs have a free loom which means that they can recruit 5 militia without mining gold. 5 militia + 1 EW can harass enemy economy a lot. It is important that barracks be built quick so putting 4 villagers instead of normal 3 is a good idea. With this strategy Aztecs is the nearest that can get to a hun enemy in 1v1.
If successful, and the enemy also drushing, you would go to feudal faster. The best thing then, is to mine put 2 (and 3rd one later) ranges and go for gold archers, destroy his econ even more and hit castle. If 3 or more militia are alive, it is good idea to upgrade them to man-at-arms.
If the drush wasn't effective because the enemy has walled or feudalled too quick with a tower in economic zone, you need to wall yourself quick and enclose your area (at least safeguard the economic zone with pallisades) and hit feudal asap. The militia you made are no use defending, so try to harass his gold or wood as long as you can. If both of them are well protected by tower/walls, bring them for defense.
1. Drush
2. Fast Imperial with E. Eagles rush
1. Drush
Aztecs have a free loom which means that they can recruit 5 militia without mining gold. 5 militia + 1 EW can harass enemy economy a lot. It is important that barracks be built quick so putting 4 villagers instead of normal 3 is a good idea. With this strategy Aztecs is the nearest that can get to a hun enemy in 1v1.
If successful, and the enemy also drushing, you would go to feudal faster. The best thing then, is to mine put 2 (and 3rd one later) ranges and go for gold archers, destroy his econ even more and hit castle. If 3 or more militia are alive, it is good idea to upgrade them to man-at-arms.
If the drush wasn't effective because the enemy has walled or feudalled too quick with a tower in economic zone, you need to wall yourself quick and enclose your area (at least safeguard the economic zone with pallisades) and hit feudal asap. The militia you made are no use defending, so try to harass his gold or wood as long as you can. If both of them are well protected by tower/walls, bring them for defense.
Monday, November 23, 2009
Set Facebook status message for offline user with c#
Your Requirement:
Set a status message for a user from a background job or windows service.
Pre-requisite:
Facebook API Toolkit for ASP.net (facebook.dll, facebook.web.dll, Microsoft.Xml.Schema.Linq.dll) - freely available.
You should have an iFrame application registered with facebook.
Background:
The task contains two parts. First, you should ask the user's permission to publish on his behalf and when the user is offline. Next, comes actual posting of the message.
Getting user's permission:
Step 1. Create a new ASP.net project
Step 2. In the web.config file, replace with the following parameters. You need to change APIKey, Secret and Callback with the actual values from Facebook application settings.
Step 3. In the Default.aspx file, write the following code
Step 4. Add Site.master file to the project with the following content
Step 5. Add a cross-domain receiver file xd_receiver.htm with the following content
And... that's it! Just compile and run the application. This should open up your application in iFrame and ask for publish_stream and offline_access permissions. Allow the permissions and proceed with the next phase.
One more thing. Save the uid of user (got from Master.API.uid) and session key (got from Master.API.SessionKey). We'll need this later.
Step 6. Posting status updates when user is offline.
Create a new project which can be any of desktop/web-based/windows service application.
Write the following code and execute!
Set a status message for a user from a background job or windows service.
Pre-requisite:
Facebook API Toolkit for ASP.net (facebook.dll, facebook.web.dll, Microsoft.Xml.Schema.Linq.dll) - freely available.
You should have an iFrame application registered with facebook.
Background:
The task contains two parts. First, you should ask the user's permission to publish on his behalf and when the user is offline. Next, comes actual posting of the message.
Getting user's permission:
Step 1. Create a new ASP.net project
Step 2. In the web.config file, replace
File: web.config
<appSettings>
<add key="APIKey" value="4a4adf9a0f4657c94f13de3b200cab01"/>
<add key="Secret" value="0d0814aab7b4af8da104f1c5af9c16a6"/>
<add key="Callback" value="http://localhost:3451/"/>
<add key="Suffix" value="TestApp"/>
<add key="TemplateID1" value="20889707566"/>
<add key="TemplateID2" value="20889902566"/>
</appSettings>
Step 3. In the Default.aspx file, write the following code
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="YourNamespace._Default" %>
<%@ Register Assembly="facebook.web" Namespace="facebook.web" TagPrefix="cc1" %>
<%@ MasterType VirtualPath="~/Site.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
<h1>Getting User Permissions</h1>
</asp:Content>
Step 4. Add Site.master file to the project with the following content
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="YourNamespace.Site" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<link rel="Stylesheet" type="text/css" href="/css/fbstyle.css" />
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<asp:ContentPlaceHolder ID="header" runat="server"></asp:ContentPlaceHolder>
</head>
<body>
<div style="float:right"><a style="border: none" href="http://feeds.stevetrefethen.com/SteveTrefethensWeblog"></a><img alt="RSS Feed" src="http://www.stevetrefethen.com/blog/images/feed-button-32x32.png" /></div>
<div style="clear:right"></div>
<!-- Support dynamic resizing of iframe details here: http://wiki.developers.facebook.com/index.php/Resizable_IFrame -->
<div id="FB_HiddenIFrameContainer" style="display:none; position:absolute; left:-100px; top:-100px; width:0px; height: 0px;"></div>
<script type="text/javascript">
function FB_test_perm(api_key, xd_receiver, permission, callback) {
FB.Bootstrap.requireFeatures(["Connect"], function() {
FB.Facebook.init(api_key, xd_receiver);
FB.Connect.requireSession(function() {
FB.Facebook.apiClient.users_hasAppPermission(permission, function(result) {
if (result != 0) {
// was already granted
return callback(false);
}
FB.Connect.showPermissionDialog(permission, function(result) {
return callback(result == null ? false : (result.indexOf(permission) != -1));
}, true, null);
});
});
});
}
function FB_perm_result(isGranted) {
if (isGranted) {
window.location.reload();
} else {
}
}
FB_test_perm('<% =System.Configuration.ConfigurationSettings.AppSettings["APIKey"] %>',
"xd_receiver.htm", "publish_stream", FB_perm_result);
FB_test_perm('<% =System.Configuration.ConfigurationSettings.AppSettings["APIKey"] %>',
"xd_receiver.htm", "offline_access", FB_perm_result);
</script>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="MainContentPlaceHolder" runat="server"></asp:contentplaceholder>
</div>
</form>
<asp:ContentPlaceHolder id="footer" runat="server"></asp:ContentPlaceHolder>
</body>
</html>
Step 5. Add a cross-domain receiver file xd_receiver.htm with the following content
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cross-Domain Receiver Page</title>
</head>
<body>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js" type="text/javascript"></script>
</body>
</html>
And... that's it! Just compile and run the application. This should open up your application in iFrame and ask for publish_stream and offline_access permissions. Allow the permissions and proceed with the next phase.
One more thing. Save the uid of user (got from Master.API.uid) and session key (got from Master.API.SessionKey). We'll need this later.
Step 6. Posting status updates when user is offline.
Create a new project which can be any of desktop/web-based/windows service application.
Write the following code and execute!
using ...
using facebook;
using facebook.web;
namespace TestApp
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
facebook.API api = new API();
api.ApplicationKey = <same as your appkey in web.config>
api.Secret = <same as your app secret in web.config>
api.SessionKey = <the session key you've saved for a user>
api.uid = <the uid of user>
api.users.setStatus("My first status update", <uid of user>);
}
}
}
Sunday, November 8, 2009
Playing Farmville like a Pro
If you are a farmville fan, this is the right place for you. Here I show you how you can play this game very effectively. This includes some highly-rewarding hacks that not only save your game time but also increase your levels pretty fast than normally possible.
What you need? A PC with windows OS, Mozilla Firefox browser and a curious mind (a wicked desire to win your friends is a huge plus point :D).
Lets get started. I don't want to repeat what's already been discovered and floating around the net. However, I will show you the links because these things must be known before getting started.
First, it is really important to decrease the load time for the flash component.
Now that your farm loads faster, I will show you how to perform actions fast (faster than manually, that is :D).
Get a copy of GridClicker from here. It should be pretty obvious how to use it, however if you get confused, just go through the video on the same link. This tool allows you to plough, plant and harvest with minimal intervention. (I really hate the way Zinga made farmville UI. Clicking the whole farm plots over and over was very boring and tedious). Someone had to come up with tools like this. A big thank you from my side to the glsoft developer who made this wonderful tool.
Lastly, my only suggestion is: plant any crop that you think is profitable, save as much money as you can and apply the famous "Soyabean-delete" strategy using GridClicker tool. If you need advanced tips I recommend you this. But I personally think its not mandatory to know each detail. The only important thing is to use Soyabean-delete method to convert your extra money to experience. With this method, you can get 1 experience point per 10 gold coins. This is not possible with the purchase of any item to my knowledge (unless you are targeting ribbons).
Using this method you should be easily gaining more than 10,000 experience points per day!
Lastly, if you need many Farmville friends, just add as many as you desire from this thread.
What you need? A PC with windows OS, Mozilla Firefox browser and a curious mind (a wicked desire to win your friends is a huge plus point :D).
Lets get started. I don't want to repeat what's already been discovered and floating around the net. However, I will show you the links because these things must be known before getting started.
First, it is really important to decrease the load time for the flash component.
- Disable High Quality by clicking on eye symbol near your current gold (Top-Left corner).
- Install "Greasemonkey" firefox plugin from here. After that, install the Greasemonkey scripts Farmville view simplifier and Farmville Time of Harvest.
Now that your farm loads faster, I will show you how to perform actions fast (faster than manually, that is :D).
Get a copy of GridClicker from here. It should be pretty obvious how to use it, however if you get confused, just go through the video on the same link. This tool allows you to plough, plant and harvest with minimal intervention. (I really hate the way Zinga made farmville UI. Clicking the whole farm plots over and over was very boring and tedious). Someone had to come up with tools like this. A big thank you from my side to the glsoft developer who made this wonderful tool.
Lastly, my only suggestion is: plant any crop that you think is profitable, save as much money as you can and apply the famous "Soyabean-delete" strategy using GridClicker tool. If you need advanced tips I recommend you this. But I personally think its not mandatory to know each detail. The only important thing is to use Soyabean-delete method to convert your extra money to experience. With this method, you can get 1 experience point per 10 gold coins. This is not possible with the purchase of any item to my knowledge (unless you are targeting ribbons).
Using this method you should be easily gaining more than 10,000 experience points per day!
Lastly, if you need many Farmville friends, just add as many as you desire from this thread.
Subscribe to:
Posts (Atom)