<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ankit Jain &#187; Programming/Code</title>
	<atom:link href="http://ankitjain.info/ankit/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://ankitjain.info/ankit</link>
	<description>» It’s all about Ankit and Web! «</description>
	<lastBuildDate>Thu, 02 Jun 2011 16:54:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Singleton Toast</title>
		<link>http://ankitjain.info/ankit/2011/05/19/android-best-practice-toast/</link>
		<comments>http://ankitjain.info/ankit/2011/05/19/android-best-practice-toast/#comments</comments>
		<pubDate>Thu, 19 May 2011 12:32:07 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Coding Guidelines]]></category>
		<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=413</guid>
		<description><![CDATA[On Android you may have experienced delayed toasts or overlapping toasts. This causes the toasts being displayed with irrelevant context/activity (e.g. user may have pressed backed, or previous toast is still overriding new one, or when too many toasts are displayed on screen). Consider the code below. It defines a single function for toast, that [...]]]></description>
			<content:encoded><![CDATA[<p>On Android you may have experienced delayed toasts or overlapping toasts. This causes the toasts being displayed with irrelevant context/activity (e.g. user may have pressed backed, or previous toast is still overriding new one, or when too many toasts are displayed on screen).</p>
<p>Consider the code below. It defines a single function for toast, that makes use of context object of Application. The class <code>MyApplication</code> needs to be declared in manifest.xml. The main advantage of such design is </p>
<ul>
<li>reduced footprint for activity&#8217;s context object.</li>
<li>at any moment only one toast remains on screen</li>
<li>reusing single toast object, rather than creating for each show.</li>
</ul>
<p><code>
<pre>

public class MyApplication extends Application {

	private static Resources resources;
	private static Context context;

	private static Toast toast;

	/**
	 * Called when the application is starting, before any other application
	 * objects have been created. Implementations should be as quick as possible
	 * (for example using lazy initialization of state) since the time spent in
	 * this function directly impacts the performance of starting the first
	 * activity, service, or receiver in a process. If you override this method,
	 * be sure to call super.onCreate().
	 * */
	@Override
	public void onCreate() {
		super.onCreate();
		Log.i("MyApplication", "Starting app...");
		MyApplication.resources = getResources();
		MyApplication.context = getApplicationContext();

		MyApplication.toast = Toast.makeText(MyApplication.context, "", Toast.LENGTH_SHORT);
	}

	/** Returns the global resources object. */
	public static Resources getResourcesObject() {
		return MyApplication.resources;
	}

	/** Returns the global context object. */
	public static Context getContextObject() {
		return MyApplication.context;
	}

	public static void toast(String message)
	{
		MyApplication.toast(message, Toast.LENGTH_SHORT);
	}

	public static void toast(String message, int duration)
	{
		MyApplication.toast.cancel();
		MyApplication.toast.setText(message);
		MyApplication.toast.setDuration(duration);
		MyApplication.toast.show();
	}

}</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2011/05/19/android-best-practice-toast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ProxySwitcher &#8211; My First Firefox Extension</title>
		<link>http://ankitjain.info/ankit/2010/01/10/iitk-proxy-switcher/</link>
		<comments>http://ankitjain.info/ankit/2010/01/10/iitk-proxy-switcher/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 12:29:14 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[Quick Tricks]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[proxy-server]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=354</guid>
		<description><![CDATA[At IITK we have two Internet proxy-servers. Sometimes, one server goes down and we are required to switch to another by navigating to Tools > Options > Advanced > Network > Settings. With Firefox, I tried to simplify this effort with following extension &#8211; one click proxy switcher! Once installed, you will see IITK&#8217;s Proxy [...]]]></description>
			<content:encoded><![CDATA[<p>At IITK we have two Internet proxy-servers. Sometimes, one server goes down and we are required to switch to another by navigating to Tools > Options > Advanced > Network > Settings. With Firefox, I tried to simplify this effort with following extension &#8211; <em>one click proxy switcher</em>!<br />
<center><br />
<a title="Download - One Click Proxy Switcher" jsinstallmethod="browser_app_addon_install"  href="/ankit/wp-content/proxyswitcher.xpi"><img src="/ankit/wp-content/addtoFirefox.png"/></a><br />
</center></p>
<p>Once installed, you will see <strong>IITK&#8217;s Proxy Switcher</strong> in Tools menu. This extension switches between <u><em>direct connection</em>, <em>bsnlproxy</em> and <em>vsnlproxy</em></u>. It only modifies server-address and leaves PORT number as it is.<br />
<span id="more-354"></span><br />
<center><br />
<img src="/ankit/wp-content/proxy-switcher.png" alt="tools-menu-proxy-sqwitcher" /><br />
</center></p>
<p><small>* This software/extension is provided &#8220;as is&#8221; and without any warranty or support. The author will not be liable for data loss, damages or any other kind of loss while using or misusing this software. The extension is FREE and copy left.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2010/01/10/iitk-proxy-switcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Split Pascalcase String</title>
		<link>http://ankitjain.info/ankit/2009/09/11/spliting-camelcase-string/</link>
		<comments>http://ankitjain.info/ankit/2009/09/11/spliting-camelcase-string/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 18:32:12 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[regexp]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=344</guid>
		<description><![CDATA[Do you ever need to split a camel case or pascal case string to a set of words? This can be achieved simply by regular expressions in Java as well as C#. The following code is for Java: String camelCase = "StructuralDesignPattern"; StringBuffer label = new StringBuffer(camelCase + 10); java.util.regex.Pattern p = java.util.regex.Pattern.compile("[A-Z][a-z]+"); java.util.regex.Matcher m [...]]]></description>
			<content:encoded><![CDATA[<p>Do you ever need to split a camel case or pascal case string to a set of words? This can be achieved simply by regular expressions in Java as well as C#. The following code is for Java:<br />
<code><br />
		    String camelCase = "StructuralDesignPattern";<br />
		    StringBuffer label = new StringBuffer(camelCase + 10);<br />
		    java.util.regex.Pattern p = java.util.regex.Pattern.compile("[A-Z][a-z]+");<br />
		    java.util.regex.Matcher m = p.matcher(camelCase);<br />
		    while ( m.find() )<br />
		    {<br />
			label.append( m.group() + " ");<br />
		    }<br />
		    System.out.println(camelCase + " >> " + label.toString());<br />
</code></p>
<p>[ Note: this does not work for all test cases. You may also want to try regexp as <em>"[A-Z][a-z]+&#8221;</em>, for matching any continues uppercase letters too (e.g. AnkitJainFROMIndia >> Ankit Jain FROMIndia) ]</p>
<p>Jon Galloway <a target="_blank" href="http://weblogs.asp.net/jgalloway/archive/2005/09/27/426087.aspx">points out a tricky method</a> for C#.</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2009/09/11/spliting-camelcase-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handicapped Software</title>
		<link>http://ankitjain.info/ankit/2009/07/25/software-disability-user-expectation/</link>
		<comments>http://ankitjain.info/ankit/2009/07/25/software-disability-user-expectation/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 08:44:37 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Coding Guidelines]]></category>
		<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=334</guid>
		<description><![CDATA[[ This post is about software's disability to meet users' expectations. I know you have developed lots of software/applications over your career! Have you ever evaluated them on disability index? No, then read on. "You" = refers to our typical "software engineer" ] Ever heard someone saying &#8220;this software sucks&#8221;&#8230; I love such moments. It [...]]]></description>
			<content:encoded><![CDATA[<p><small>[ This post is about software's disability to meet users' expectations. I know you have developed lots of software/applications over your career! Have you ever evaluated them on disability index? No, then read on. "You" = refers to our typical "software engineer" ]</small></p>
<p>Ever heard someone saying &#8220;this software sucks&#8221;&#8230; I love such moments. It makes me laugh, not for the user,  but for the poor developer! Users are innocent, they are not concerned about technical details. A software is there to make life simpler and hide complications of a task. It&#8217;s your responsibility to make it intuitive and meet users expectation on first impression, rather showing unnecessary (modal) alert boxes or irrelevant (technical) details. You don&#8217;t need to be a Usability Engineer. Just, </p>
<ul>
<li> stand on users&#8217; shoe and think what is annoying</li>
<li> don&#8217;t take negative feedback as an attack on you and your beliefs.<br />
Rather it&#8217;s a feedback on your understanding about <em>how much you understand your users</em>. In short never reject/resist on feedback. </li>
</ul>
<p><a href="http://www.codinghorror.com/blog/archives/001289.html" target="_blank" >Nobody hates software more than software developers</a> and nobody distrust software more than software developers. Scott Berkun has written a good post about <a target="_blank" href="http://www.scottberkun.com/essays/46-why-software-sucks/">why software sucks</a>. ( I have heard software engineers saying that they don&#8217;t trust online money transactions.  Heck !! Do you need President to meet you and ensure? ) </p>
<p>Here is what I think you should target as first step:</p>
<ul>
<li>Any tasks that you think user should perform by reading Help/Documentation, MUST be automated.</li>
<li>Even an single unnecessary alert box annoys. Features should be available with less no of clicks. Still this is very subjective matter to discuss. A simple guidelines is &#8211; only system errors or exceptions should raise alert-box, tiny information should be modal-less dialogs (or like balloon pop-up).</li>
<li>users never read entire screen. Default values chosen or default selection of check-boxes makes big difference in a long run.<br />
E.g. while filling an online form a default selection of check-box &#8220;subscribe me for spam mails&#8221;. Who does read entire form before clicking submit? None. But it affects your reputation in long run.</li>
<li>Never hesitate in picking a useful (cool, awesome, sexy, astonishing, amazing! ) feature from competitive software. Ask a simple question &#8211; Does it add value to your product? You won&#8217;t like this argument, but this is truth. The success of Web is a tiny &#8216;view source&#8217; feature. Well, this is a fast moving industry where we learn from other, we improve over time. You never blame the world for borrowing <a href="http://en.wikipedia.org/wiki/Tabbed_browsing">tabbed browsing</a> from Opera (originally by NetCaptor). It&#8217;s a matter of accessibility, and understanding what your users like and what they dislike is a key to success.</li>
<li>Don&#8217;t recruit incompetent programmers, because a <a href="http://www.sigsoft.org/SEN/parnas.html" target="_blank">incompetent programmer creates two new jobs a year</a>.  If you have a few already, either trains them or fire them. (Sorry pals)</li>
</ul>
<p>- ankit<br />
( and finally, this is a 100th post on this blog. Happy Blogging! )</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2009/07/25/software-disability-user-expectation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unreachable code Error or Warning?</title>
		<link>http://ankitjain.info/ankit/2009/07/08/java-unreachable-error-why/</link>
		<comments>http://ankitjain.info/ankit/2009/07/08/java-unreachable-error-why/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 04:14:13 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Coding Guidelines]]></category>
		<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=330</guid>
		<description><![CDATA[In Java, unreachable code is treated as compilation error. What do you think? Isn&#8217;t making it warning would have made developers&#8217; life simpler? Of course you can write &#8211; if( true ) &#160;&#160;&#160;return; What if you could simply write return. This helps in testing a function quickly. As a good programming practice we always remove [...]]]></description>
			<content:encoded><![CDATA[<p>In Java, unreachable code is treated as compilation error. What do you think? Isn&#8217;t making it warning would have made developers&#8217; life simpler?</p>
<p>Of course you can write &#8211; </p>
<blockquote><p><code>if( true )<br />
&nbsp;&nbsp;&nbsp;return;<br />
</code> </p></blockquote>
<p>What if you could simply write return. This helps in testing a function quickly. As a good programming practice we always remove all warnings from code, and such unconditional return statements can be rectified later.</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2009/07/08/java-unreachable-error-why/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting up SDB for MySQL</title>
		<link>http://ankitjain.info/ankit/2009/06/21/configure-jena-sdb-mysql-ubuntu/</link>
		<comments>http://ankitjain.info/ankit/2009/06/21/configure-jena-sdb-mysql-ubuntu/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 15:33:05 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=327</guid>
		<description><![CDATA[Jena is a semantic web framework implemented in Java. It allows you to store/query/inference RDF/RDSF/OWL triples. In Jena a set of triples (in RDF) are called Model or stored within Model object. By default Jena creates in-memory models, but this is not suitable if you have pretty large set of triples to process. Here comes [...]]]></description>
			<content:encoded><![CDATA[<p>Jena is a semantic web framework implemented in Java. It allows you to store/query/inference RDF/RDSF/OWL triples. In Jena a set of triples (in RDF) are called Model or stored within Model object. By default Jena creates in-memory models, but this is not suitable if you have pretty large set of triples to process. Here comes SDB to rescue you. It&#8217;s a component of Jena that allows you to store these models in relational databases like MySQL, MSSQL, PostgreSQL, Oracle, etc; This post describes my experience while setting up SDB on Ubuntu.</p>
<ol>
<li><a href="http://jena.hpl.hp.com/wiki/SDB" target="_blank">Download SDB</a>. Extract it into some folder.</li>
<li>SDB works with SUN Java only. Ubuntu has GNU Java installed by default. You need to install SUN Java and <a href="http://ankitjain.info/ankit/2009/06/21/set-default-jvm-linux-sun-update/">set it as default</a>.<br />
<em>[Note: you know why this point is important? I wasted 1 hr when I did same setup second time. Later I realized I was using GNU libgcj (gij/gcj). For god's sake, someone please kill gcj... </em></li>
<li>Create a database for SDB in MySQL. I did using phpMyAdmin. Let&#8217;s call this database <em>SDB2</em>.</li>
<li>Prepare a store description file. It serves as config for SDB and contains information like where to connect. You will find one such example file in the SDB directory. Here is an example for the description file I have used:<br />
<code>@prefix sdb:     &lt;http://jena.hpl.hp.com/2007/sdb#&gt; .<br />
@prefix rdfs:	 &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .<br />
@prefix rdf:     &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .<br />
@prefix ja:      &lt;http://jena.hpl.hp.com/2005/11/Assembler#&gt; .<br />
# MySQL - InnoDB<br />
&lt;#store&gt; rdf:type sdb:Store ;<br />
    sdb:layout     "layout2" ;<br />
    sdb:connection &lt;#conn&gt; ;<br />
    sdb:engine     "InnoDB" ;      # MySQL specific<br />
.<br />
&lt;#conn&gt; rdf:type sdb:SDBConnection ;<br />
    sdb:sdbType       "MySQL" ;     # Needed for JDBC URL<br />
    sdb:sdbHost       "localhost" ; #  or the IP address of the database server<br />
    sdb:sdbName       "SDB2" ;    # MySQL database name<br />
    sdb:sdbUser       "username";<br />
    sdb:sdbPassword   "password";<br />
    sdb:driver        "com.mysql.jdbc.Driver" ;<br />
    .<br />
</code>
</li>
<li>Set environment variables:
<p>SDB installation directory &#8211;<br />
<code>export SDBROOT="/home/ankit/tmp/SDB"</code></p>
<p>Path to MySQL JDBC commector jar which contains <code>com.mysql.jdbc.Driver</code> class.<br />
<code>export SDB_JDBC="/home/ankit/tmp/SDB/mysql-connector-java-5.1.7-bin.jar"</code></li>
<li>Required tables must be created in database before we can use it. Run following to initialize <code>SDB2</code> database. This creates 4 tables inside <code>SDB2</code>.<br />
<code> bin/sdbconfig --sdb=sdb.ttl --create</code><br />
If this fails, somthing went wrong with settings. Check them again.</li>
<li>Next you can run test suit to ensure everything is working fine.<br />
<code>bin/sdbtest --sdb=sdb.ttl testing/manifest-sdb.ttl</code></p>
<p>In my case one testcase failed stating -</p>
<blockquote><p><code>Failure:  Unicode-5(com.hp.hpl.jena.sdb.test.junit.QueryTestSDB): Results sets not the same</code></p></blockquote>
</li>
</ol>
<p>I decided to write this as the SDB wiki does now contains clear steps to follow. Hope your semantic (web) application ROCKS !</p>
<p>- ankit</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2009/06/21/configure-jena-sdb-mysql-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lucene StopWords</title>
		<link>http://ankitjain.info/ankit/2009/05/27/lucene-search-ignore-word-list/</link>
		<comments>http://ankitjain.info/ankit/2009/05/27/lucene-search-ignore-word-list/#comments</comments>
		<pubDate>Tue, 26 May 2009 20:17:10 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[lucene]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=314</guid>
		<description><![CDATA[Lucene is a open-source high performance full-text search engine and has libraries for almost all well known languages (Java, C#, PHP, Python, C). This post is about describing StopWords for a full-text search engine (Lucene). ( Lucene can also be used to index database table rows. The advantage for having Lucene search instead of (database [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lucene.apache.org/" target="_blank">Lucene</a> is a open-source high performance full-text search engine and has libraries for almost all well known languages (Java, C#, PHP, Python, C). This post is about describing StopWords for a full-text search engine (Lucene).</p>
<p>( Lucene can also be used to index database table rows. The advantage for having Lucene search instead of (database software&#8217;s) in-build full-text search engine is Lucene ranks search results based on their relevancy. For example assume you have a product table with &lt;title , description&gt; fields and you want to give higher rank to &#8216;title&#8217; over &#8216;description&#8217;. )</p>
<p>A <strong>stopword</strong> is a language-word that has no significance meaning in a keyword based search system (e.g. Google). Lucene also has a set of such words for English language and these are simply ignored while analyzing/tokenizing text. You can find them inside <code>org/apache/lucene/analysis/StopAnalyzer.java</code> file declared as <code>StopAnalyzer.ENGLISH_STOP_WORDS</code> constant.</p>
<blockquote><p><code>public static final String[] ENGLISH_STOP_WORDS = {<br />
    "a", "an", "and", "are", "as", "at", "be", "but", "by",<br />
    "for", "if", "in", "into", "is", "it",<br />
    "no", "not", "of", "on", "or", "such",<br />
    "that", "the", "their", "then", "there", "these",<br />
    "they", "this", "to", "was", "will", "with"<br />
  };</code></p></blockquote>
<p>You can also specify your own <strong>stopwords</strong> while indexing text. Use <a href="http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/analysis/standard/StandardAnalyzer.html#StandardAnalyzer(java.util.Set)"  target="_blank">StandardAnalyzer&#8217;s constructor</a> and pass a set of words as agrument. These will be ignored while indexing.</p>
<p>- ankit</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2009/05/27/lucene-search-ignore-word-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proposal for WordPress Summer of Code</title>
		<link>http://ankitjain.info/ankit/2009/04/02/google-summer-of-code-event-management/</link>
		<comments>http://ankitjain.info/ankit/2009/04/02/google-summer-of-code-event-management/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 18:17:35 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=299</guid>
		<description><![CDATA[Requirements: Create a suite of plug-ins for event planning, tie it into WordPress MU/BuddyPress/bbPress, and create a community organizing platform for open source release. Using WordCamp.org as the test case, the resulting site would include functionality for registration, calendaring, additional roles/permissions, extended profiles, directories (vendors, participants, etc), discussion and messaging, coordination around things like carpooling [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span>Requirements</span></strong><span>: Create a suite of plug-ins for event planning, tie it into WordPress MU/BuddyPress/bbPress, and create a community organizing platform for open source release. Using WordCamp.org as the test case, the resulting site would include functionality for registration, calendaring, additional roles/permissions, extended profiles, directories (vendors, participants, etc), discussion and messaging, coordination around things like carpooling and planning meetings, event media, etc. Source <a href="http://codex.wordpress.org/GSoC2009">WordPress GSoC2009</a>. This proposal generalizes it further.</span></p>
<h2><span><span style="font-size: 10pt;">Project Proposal </span></span></h2>
<p><span>Social networks are a medium of easier communication, bounding and bringing people together. Any effort made to achieve this is highly appreciated by the community (of users).  Event management is a recently discovered feature in social networks. Implementing this in WordPress will surly bring WordPress to a new height allowing users to create/share/participate/notify events. This feature has already been a part of LinkedIn and Facebook.</span></p>
<p><span>Following are few possibilities that can be included in WordPress MU/BuddyPress. Looking forward for feedback and prioritizing:</span></p>
<ol>
<li>Event Organizer: allowing users to create, edit, delete events. In addition, time zone coordination and showing time in user’s local time zone, geo-location, etc.</li>
<li><span>Attendance: users can mark for their attendance. (e.g.  interested, may attend, attending, not attending)</span></li>
<li><span>Search for upcoming events. This can be extended as event directory allowing location specific search, tag cloud / browse by category.</span></li>
<li><span>Roles: users can indicate their role for events. E.g. organizer, participant, volunteer, promoter/sponsor, etc;</span></li>
<li><span>Revision History: this becomes important component when we want multiple users (in addition to event creator) to modify/propose event details.</span></li>
<li><span>Discussion: each event will have a forum for users’ views. For simplicity this should be a flat blog-post comment like listing (or like Twitter’s update listing).</span></li>
<li><span>Tagging: free tagging. Or categorization of event (e.g. educational, cultural, get-together/party, conference, show, outing, etc <img src='http://ankitjain.info/ankit/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Categorization sometimes known as controlled tagging.</span></li>
<li><span>Group integration: if implemented in Buddypress, an event can be restricted to one (or possibly more) group.</span></li>
<li><span>Blog-post integration: while writing a blog-post, users can indicate associate events. And now, these posts appear on event’s detail page as ‘blogs that talk about this event’.</span></li>
<li><span>Notifications/Reminders: sending reminder emails to all interested. This includes users who have indicated as interested, attending, may attend.</span></li>
<li><span>RDF support: This is an effort to produce semantic data <img src='http://ankitjain.info/ankit/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  as machine interpretable. Event details should be encoded as RDFa (RDF/XML) using <a href="http://www.w3.org/TR/rdfcal/">http://www.w3.org/TR/rdfcal/</a> ontology. </span></li>
<li><span>Admin page: settings like to enable/disable discussions, notifications, revisions, etc;</span></li>
</ol>
<p><span> </span></p>
</p>
<h2><span><span style="font-size: 10pt;">Schedule of Deliverables / Milestones </span></span></h2>
<p><strong>1<sup>st</sup> May to 31<sup>st</sup> May</strong>:  Design and Basic framework:</p>
<p><span>Before any code deliverable, it is necessary that we lay down a good foundation.</span></p>
<ol>
<li>Brainstorming, discussion threads, design and then wireframes are required to set the project in motion and prevent unnecessary rewriting/modifications to the code. (as what I have observed on WordPress Dev Blog).
	</li>
</ol>
<p><span>The first code-deliverable will consist of (in addition to the database backend) – </span></p>
<ol>
<li><span>Event creation and edit page. (assuming an event is public and available to all)</span></li>
<li><span>Basic Upcoming events box (as widget/sidebar)</span></li>
<li><span>Event details page</span></li>
<li><span>(Optional) Event discussion: any user can post simple comments on the event page.</span></li>
<li><span>Installer script – included with the plug-in itself.</span></li>
</ol>
<p><strong><span>1st June to 30th June: </span></strong><span>Advanced features</span></p>
<p><span>I’m not finalizing what features shall be there in next milestones. It’s a community project and community’s feedback and rating priority to each feature plays an important role for deciding deliverables. In my opinion the next milestone should have –</span></p>
<ol>
<li>Attendance (e.g.  interested, may attend, attending, not attending)</li>
<li>User roles ( e.g. organizer, participant, volunteer, promoter/sponsor, etc)</li>
<li>Search and Tagging</li>
<li>Revision History</li>
<li>Blog post integration</li>
<li>RDF/XML integration</li>
</ol>
<p><span>This is merely my opinion. Community’s comments and suggestions are welcomed. We (with mentor) should plan for systematic pre-releases. This will helps us in getting early feedback from WordPress community for features and code-reviews.</span></p>
<p><span>I do not have any commitments during this period. I have 3 months of free time starting from 1st of May.</span></p>
<h2><span><span style="font-size: 10pt;">Open Source Development Experience</span></span></h2>
<p><span>I have not been a part of any open source project officially. I am willing to be a part of WP community.</span></p>
<h2><span><span style="font-size: 10pt; ">Work/Internship Experience </span></span></h2>
<p><span>I have 3 years of work experience in Web development (ASP.Net, PHP, WordPress and Drupal). In addition, I do freelancing work time to time to fund my studies. This includes PHP scripts and Drupal development. I have experience with version control systems too.</span></p>
<h2><span><span style="font-size: 10pt;">Academic Experience </span></span></h2>
<p><span>I am currently doing M.Tech (2nd year) from IIT Kanpur. I am studying Comp Sci. and Engineering. </span><span>My Research Interests includes:  <em>Software Design &amp; Architecture</em>, <em>Knowledge engineering</em>, <em>Social Networks</em>.</span></p>
<h2><span><span style="font-size: 10pt; ">Why WordPress </span></span></h2>
<p>WordPress is a state of art for software for blogging. Other open source CMS offers just basic blogging features. I am associated with WordPress for the last 4 years and passionate about it. My WP blog is hosted at <a href="http://ankitjain.info/ankit/">http://ankitjain.info/ankit</a> running v2.6.</p>
<p><span>Summer of Code is an exciting opportunity for me. For my WP blog I have done basic customizations. This includes post specific advertisements, customizations of theme file, etc. This opportunity gives me an official chance to contribute to my favorite Web application. Such open source development experience and time to time guidance from mentor will surly help me to understand and boost passion, binding with community and coding standards. </span></p>
<p>
Thanks,<br />
- ankit</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2009/04/02/google-summer-of-code-event-management/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fun with Yahoo Media Player!</title>
		<link>http://ankitjain.info/ankit/2009/02/08/how-yahoo-media-player-poadcast-works/</link>
		<comments>http://ankitjain.info/ankit/2009/02/08/how-yahoo-media-player-poadcast-works/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 17:43:35 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Product Review]]></category>
		<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[how it works]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=214</guid>
		<description><![CDATA[A quick way to insert music in your site: Create hyper-links for few MP3 files Insert following script code to your page &#60;script type="text/javascript" src="http://mediaplayer.yahoo.com/js"&#62;&#60;/script&#62; You are done! Yahoo! Media Player will be loaded and it will make all media links clickable Here are few of my favorite tracks. Use the play button to listen. [...]]]></description>
			<content:encoded><![CDATA[<p>A quick way to insert music in your site:</p>
<ol>
<li>Create hyper-links for few MP3 files</li>
<li>Insert following script code to your page<br />
<code>&lt;script type="text/javascript" src="http://mediaplayer.yahoo.com/js"&gt;&lt;/script&gt;</code></li>
<li>You are done! Yahoo! Media Player will be loaded and it will make all media links clickable <img src='http://ankitjain.info/ankit/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>Here are few of my favorite tracks. Use the play button to listen. <small>Thanks to <a href="http://www.radioreloaded.com" target="_blank">RadioReloaded.com</a></small>.</p>
<ol> <a href="http://braikhna.com/music/Tere%20Naina.mp3">Tere Naina, Chandi Chowk To China (2009)</a><br />
<a href="http://www.radioreloaded.com/audio/2k/1038_Jaane Kyun Log Pyaar Kerte Hain.mp3">Jaane Kyun Log Pyar Karte Hein, Dil Chahta Hai (2001)</a><br />
<a href="http://www.radioreloaded.com/audio/7k/6724_Akela Hoon Main.mp3">Akela hoon Mein, Raeth</a><br />
<a href="http://www.radioreloaded.com/audio/9k/8777_Gum%20Sum%20Ho%20Kyun.mp3">Gum Sum Ho Kyun, Aksar</a><br />
<a href="http://66.45.233.14/Yeh_Jo_Mohabbat_Hai_Dil_Vil_Pyar_Vyar.mp3">Ye Jo Mohabbat Hai, Dil Vil Pyar Vyar (2002)</a><br />
<a href="http://www.radioreloaded.com/audio/26k/25014_Mumma.mp3">Mumma, Dasvidaniya (2008)</a><br />
<a href="http://www.radioreloaded.com/audio/26k/25061_Tujh Mein Rab Dikhta Hai.mp3">Tujh Mein Rab Dikhta Hai, Rab Ne Bana Di Jodi (2008)</a></ol>
<p>How does it work?<br />
<span id="more-214"></span></p>
<ol>
<li>Inserting the script loads swfProxy, a flash player, from Yahoo&#8217;s server (http://l.yimg.com/us.yimg.com/i/us/mus/swf/ymwp/swfproxy-2.0.31.swf).</li>
<li>The javascript detects all hyperlinks with mp3/wav as file extension. For more details about supported types refer <a href="http://yahoomediaplayer.wikia.com/wiki/How_to_link#Playable_Links" target="_blank">wiki page</a>.</li>
<li>Then a play icon/button is inserted before each supported link. This is done using <em>em.ymp-skin</em> CSS class.</li>
<li>The Javascript then builds user interface as interactive sidebar. All images in the player are loaded by extracting small parts (using CSS) from <a href="http://l.yimg.com/us.yimg.com/i/us/mus/ymwp/mediaplayer-2.0.31.png" target="_blank">single image</a>.</li>
<li>When you click play button, the media file URL is passed to swfProxy object that actually plays the file. One thing is still wondering to me is <span style="text-decoration: underline;">how do they track mouse click event</span> on these hyperlinks?</li>
</ol>
<p>Certainly, a great idea and smart implementation!</p>
<p>- ankit<br />
<script src="http://mediaplayer.yahoo.com/js" type="text/javascript"></script><br />
[<em>Edited: 15 Feb, 09: Clarification for the fifth point under 'How it works'</em></p>
<p>JavaScript best practices suggest not to use any inline event (onClick, etc) with HTML tags. For example, following is a bad practice:</p>
<blockquote><p><code>&lt;a onclick="doSomething()" href="#"&gt;Click!&lt;/a&gt;</code></p></blockquote>
<p>Instead, you should separate out JavaScript from HTML.</p>
<blockquote><p><code>&lt;a href="backuplink.html" class="doSomething"&gt;Click!&lt;/a&gt;</code></p></blockquote>
<p>In a script block associate onClick event as following:</p>
<blockquote><p><code><br />
$('a.doSomething').click( function() {<br />
// Do something here!<br />
alert('You did something, woo hoo!');<br />
}  );<br />
...</code></p></blockquote>
<p>]</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2009/02/08/how-yahoo-media-player-poadcast-works/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://www.radioreloaded.com/audio/9k/8777_Gum%20Sum%20Ho%20Kyun.mp3" length="4512667" type="audio/mpeg" />
<enclosure url="http://66.45.233.14/Yeh_Jo_Mohabbat_Hai_Dil_Vil_Pyar_Vyar.mp3" length="952790" type="audio/mpeg" />
<enclosure url="http://www.radioreloaded.com/audio/26k/25014_Mumma.mp3" length="10837115" type="audio/mpeg" />
<enclosure url="http://braikhna.com/music/Tere%20Naina.mp3" length="4139133" type="audio/mpeg" />
		</item>
		<item>
		<title>Concept Maps for sharing knowledge</title>
		<link>http://ankitjain.info/ankit/2008/12/31/cmap-knowledge/</link>
		<comments>http://ankitjain.info/ankit/2008/12/31/cmap-knowledge/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 14:20:14 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[My Life...]]></category>
		<category><![CDATA[Programming/Code]]></category>
		<category><![CDATA[concept map]]></category>
		<category><![CDATA[myself]]></category>

		<guid isPermaLink="false">http://ankitjain.info/ankit/?p=153</guid>
		<description><![CDATA[A concept map is a graph to organize (domain) knowledge. It’s a way of representing concepts (entity/act/idea/process) and relationship between them. It is developed to facilitate learning and knowledge sharing among humans. Here is a simple concept map describing myself. The concept maps are quite similar to RDF Graphs, where we can explain entities and [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://en.wikipedia.org/wiki/Concept_map" target="_blank">concept map</a> is a graph to organize (domain) knowledge. It’s a way of representing concepts (entity/act/idea/process) and relationship between them. It is developed to facilitate learning and knowledge sharing among humans. Here is a simple concept map describing myself.</p>
<p><img alt="Concept Map of Ankit" src="/ankit/wp-content/ankit-jain.concept-map.png" title="Concept Map of Ankit" width="624" height="342" /></p>
<p>The concept maps are quite similar to RDF Graphs, where we can explain entities and relate them with predicates only. With concept maps we can related any concept/idea with either predicate, act or relationship (RDF becoming more stricter).</p>
<p>Wish you a very Happy New Year!<br />
- ankit</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitjain.info/ankit/2008/12/31/cmap-knowledge/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

