<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>BoxySystems Inc. - Blogs</title>
  <id>tag:blogs.boxysystems.com,2010:mephisto/blogs</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://blogs.boxysystems.com/feed/blogs/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://blogs.boxysystems.com/blogs" rel="alternate" type="text/html"/>
  <updated>2010-04-01T17:04:35Z</updated>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2010-04-01:337</id>
    <published>2010-04-01T16:54:00Z</published>
    <updated>2010-04-01T17:04:35Z</updated>
    <category term="Blogs"/>
    <category term="chrome tips"/>
    <link href="http://blogs.boxysystems.com/2010/4/1/copy-chrome-browser-settings-from-machine-x-to-machine-y" rel="alternate" type="text/html"/>
    <title>Copy Chrome browser settings from Machine X to Machine Y</title>
<content type="html">
            &lt;p&gt;
  If you are a Chrome user and would like to clone your settings (like bookmarks, extensions, cookies etc.) from Machine X to Machine Y, here is a tip for you.

  &lt;ol&gt; 
  &lt;li&gt;Close the browser in both the machines&lt;/li&gt;
  &lt;li&gt;Backup &lt;b&gt;&lt;i&gt;C:\Documents and Settings\your_user_id\Local Settings\Application Data\Google\Chrome\User Data&lt;/i&gt;&lt;/b&gt; to &lt;b&gt;&lt;i&gt;C:\Documents and Settings\your_user_id\Local Settings\Application Data\Google\Chrome\User Data_Backup&lt;/i&gt;&lt;/b&gt; in Machine Y&lt;/li&gt;
  &lt;li&gt;Copy &lt;b&gt;&lt;i&gt;C:\Documents and Settings\your_user_id\Local Settings\Application Data\Google\Chrome\User Data&lt;/i&gt;&lt;/b&gt; from Machine X to &lt;b&gt;&lt;i&gt;C:\Documents and Settings\your_user_id\Local Settings\Application Data\Google\Chrome\User Data&lt;/i&gt;&lt;/b&gt; in Machine Y&lt;/li&gt;
  &lt;li&gt; Boom... Open chrome in Machine Y &amp; make sure you have everything that you had in Machine X.
  &lt;/ol&gt;
  &lt;/p&gt;

  &lt;p&gt;FYI - I have tested this in Windows XP Chrome Dev Channel 5.0 versions. I am yet to try this between Windows &amp; Linux machines. &lt;/p&gt;

  &lt;p&gt;Right there, I see some idea for developing a Chrome extension. If I get sometime and Google didn't come up with something for this, I might crack up some extension to do this automatically.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2010-02-12:332</id>
    <published>2010-02-12T15:38:00Z</published>
    <updated>2010-02-12T15:41:19Z</updated>
    <category term="Blogs"/>
    <link href="http://blogs.boxysystems.com/2010/2/12/backup-your-backups" rel="alternate" type="text/html"/>
    <title>Backup your backups</title>
<content type="html">
            &lt;p&gt;
Yes, that is the lesson I learned after my recent 1 TB external hard drive crash. I bought this Seagate FreeAgent Pro external drive couple of years back thinking that I am buying &quot;peace of mind&quot;  for my personal data storage &amp; backups. I guess I was totally wrong. Lately I started seeing some hiccups on this drive and it finally crashed with bad sectors. 
&lt;/p&gt;

&lt;p&gt;
I have 5 years warranty on this drive. I called the manufacturer and talked to them about my case. They are ready to replace the drive, obviously not the data. So, what is gonna happen to my almost 1 TB worth of data? I started looking up online to see how I can rescue data from this drive. I tried many of Windows &amp; Linux based tools. But, none of them helped me recover any data at all. I guess, the drive is damaged heavily and none of the recovery tools could do any good. 
&lt;/p&gt;

&lt;p&gt;
Here are some of the things to consider... 
&lt;/p&gt;

&lt;p&gt;
If I am going to have a backup/external drive, I would go for &lt;a href=&quot;http://en.wikipedia.org/wiki/RAID&quot;&gt;RAID&lt;/a&gt; based drives, preferably with RAID 1 or RAID 5 settings. And, I need to pro-actively perform periodic health checks on the external drives just to make sure its not gonna have heart attack or brain damage soon. May be it's not a good idea to go for a huge capacity like &gt;= 2 TB in a single drive, because of limitations on hardware storage machanism working within a confined physical limits.
&lt;/p&gt;

&lt;p&gt;
In this digital world of inexpensive electronics &amp; technologies, we trust so much on them in our day to day life. At some point in time, what we have in those are worth much more than 1's and 0's to us, personally.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2010-01-11:324</id>
    <published>2010-01-11T22:17:00Z</published>
    <updated>2010-01-11T22:30:54Z</updated>
    <category term="Blogs"/>
    <category term="javascript Java JSR rhino jrunscript"/>
    <link href="http://blogs.boxysystems.com/2010/1/11/let-s-do-some-command-line-javascripting" rel="alternate" type="text/html"/>
    <title>Let's do some command line JavaScripting...</title>
<content type="html">
            &lt;p&gt;
I know JavaScript is a client side browser-buddy language. But, just for kicks I wanted to try out JavaScript on command line. Here is the story...
&lt;/p&gt;

&lt;p&gt;
I was working on a codebase in Windows machine where we have very very long file names. As you may know, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath&quot;&gt;Windows XP&lt;/a&gt; don't support file names longer than 260 characters. It was very annoying when a maven build fails due to the file name length limitation. So, I wanted to write a script which can recursively loop through the project codebase and list out the files which exceeds certain length limit, so I can work on shortening their names. I could write that script in different ways like batch script, shell script, groovy script etc. But, I just wanted to write it in plain simple JavaScript and see how it plays. 
&lt;/p&gt;

&lt;p&gt;
If you want to try out the script. Copy the following code block in a JS file (For ex. &lt;i&gt;FileNameLengthChecker.js&lt;/i&gt;). 
&lt;/p&gt;

&lt;pre&gt;
/*
 Simple utility script to look for file names exceeding certain length restriction.
 (esp. for Windows XP - http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath).

 If you want to run check for a folder other than the current folder, change the value of
 rootDir variable.
 */

var filenameLengthThreshold = 260;
var headerPrinted = false;
var totalFilesFound = 0;

function runFileNameLengthCheck() {
    var rootDir = new java.io.File(&quot;.&quot;);
    echo(&quot;Checking file name length check in '&quot; + rootDir.getCanonicalPath() + &quot;' for threshold limit = &quot; + filenameLengthThreshold + &quot; ...&quot;);

    checkFilePathRecursively(rootDir);

    if (!headerPrinted) {
        echo(&quot;\n----------------------------------------------------&quot;);
        echo(&quot;No files found with the given threshold limit !!!&quot;);
        echo(&quot;---------------------------------------------------&quot;);
    }
    else {
        echo(&quot;Total files found = &quot; + totalFilesFound);
    }

}

function printHeader() {
    if (!headerPrinted) {
        echo(&quot;\n------------------------------------------------&quot;);
        echo(&quot;Following files exceeded the file name length check...&quot;);
        echo(&quot;------------------------------------------------&quot;);
        headerPrinted = true;
    }
}

function checkFilePathRecursively(currentFolder) {
    var files = currentFolder.listFiles();
    for (var i = 0; i &amp;lt; files.length; i++) {
        if (files[i].isDirectory()) {
            checkFilePathRecursively(files[i])
        }
        else {
            var path = files[i].getCanonicalPath();
            if (path.length() &gt; filenameLengthThreshold) {
                printHeader();
                echo(&quot;Filename = '&quot; + path + &quot;', length = &quot; + new java.lang.Integer(path.length()));
                totalFilesFound++;
            }
        }
    }
}

runFileNameLengthCheck();
&lt;/pre&gt;

&lt;p&gt;
The simplest way to run the script file from a command line is through &lt;i&gt;jrunscript&lt;/i&gt; tool bundled within JDK. 
&lt;pre&gt;
	C:\ProjectCodeBase\jrunscript FileNameLengthChecker.js
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;
If you use &lt;a href=&quot;http://www.jetbrains.com/idea/&quot;&gt;IntelliJ IDE&lt;/a&gt; and &lt;a href=&quot;http://plugins.intellij.net/plugin/?id=3674&quot;&gt;Script Monkey plugin&lt;/a&gt; installed, you can directly run the script from IDE.
&lt;/p&gt;

&lt;p&gt;
This is just a trivial example, but the possibilities of what we can do using the same technique is endless. Thoughts? Comments?
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2009-12-23:323</id>
    <published>2009-12-23T16:45:00Z</published>
    <updated>2009-12-28T19:41:28Z</updated>
    <category term="Blogs"/>
    <category term="open-source java google"/>
    <link href="http://blogs.boxysystems.com/2009/12/23/why-open-source-software" rel="alternate" type="text/html"/>
    <title>Why Open-source software?</title>
<content type="html">
            &lt;p&gt;If you are an open-source fan like myself, then you will love this awesome article - &lt;a href=&quot;http://googleblog.blogspot.com/2009/12/meaning-of-open.html&quot;&gt;The meaning of open&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Often times, I tend to have heated discussions with my friends &amp; colleagues regarding open-source software and how it changed the software development industry &amp; information technology overall. I try explaining the evolution &amp; significance of open-source community, standards &amp; software and without which we wouldn't have been in a place, where we are in the information technology today. There are tons of examples to quote ranging from Linux, Apache, Java etc. etc.
&lt;/p&gt;

&lt;p&gt;
But, unfortunately not every big companies realise the importance of open-source sofware, atleast not from a giving-end perspective. It's a cliche to say that every companies will be using open-source software either directly or indirectly. But, how many of them would be actively participating or contributing to the open-source community. I think that should grow. 
&lt;/p&gt;

&lt;p&gt;
Open source is not altruism, it is a culture to drive innovation and promote better competition. I am glad that article discusses breadth &amp; depth of open-source both from technical &amp; business perspective.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2009-02-04:322</id>
    <published>2009-02-04T15:13:00Z</published>
    <updated>2009-02-04T15:14:18Z</updated>
    <category term="Blogs"/>
    <link href="http://blogs.boxysystems.com/2009/2/4/script-monkey-intellij-plugin-contest-winner" rel="alternate" type="text/html"/>
    <title>Script Monkey - IntelliJ plugin contest winner</title>
<content type="html">
            &lt;p&gt;I am very excited to announce that &lt;a href=&quot;http://plugins.intellij.net/plugin/?id=3674&quot;&gt;Script Monkey&lt;/a&gt; won this years &lt;a href=&quot;http://blogs.jetbrains.com/idea/2009/02/announcing-this-years-ideal-plugins/&quot;&gt;IntelliJ plugin contest&lt;/a&gt;. JetBrains had selected Script Monkey IntelliJ plugin as a honorable mention winner, which technically means third place in the contest. 
 &lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-11-12:117</id>
    <published>2008-11-12T16:34:00Z</published>
    <updated>2008-11-12T16:39:37Z</updated>
    <category term="Blogs"/>
    <link href="http://blogs.boxysystems.com/2008/11/12/script-monkey-a-java-plugin-paradigm-shift" rel="alternate" type="text/html"/>
    <title>Script Monkey, a Java plugin paradigm shift...</title>
<content type="html">
            &lt;p&gt;I am pleased to announce the release of &lt;a href=&quot;http://code.google.com/p/scriptmonkey/&quot;&gt;&lt;b&gt;Script Monkey&lt;/b&gt;&lt;/a&gt;. It's a Java based open-source plugin/tool/framework aimed to take Java to the next level by ahieving the power &amp; flexibilities of interpreted/dynamic languages. 
	Currently, it is available as &lt;a href=&quot;http://plugins.intellij.net/plugin/?id=3674&quot;&gt;IntelliJ plugin&lt;/a&gt;. Hopefully in the near future, I like to bring in more flavors of this tool.  
 &lt;/p&gt;
 &lt;p&gt;
	I am not going to discuss the pros &amp; cons of compiled vs. dynamic languages. Because, you may have already came across tons of articles discussing that. The key point which I would like to highlight in this article is how Script Monkey shifts the paradigm of Java plugin architecture. 
&lt;/p&gt;
&lt;p&gt;
	Well, we all know what plugins are. Almost, every software products whether it's browser, IDE or consumer app that is released in the market today would have some form of plugin/addon support. Plugins help the software tool to be expandable, customizable or tailorable for a niche user.
&lt;/p&gt;
&lt;p&gt;
	Alright, let's get to the real meat of this article and discuss some underlying implementation that can help make my case. In good old days, the way we write plugins, whether it's for Eclipse, IntelliJ or Netbeans is by creating a metadata/manifest file (maybe some .xml configs) that would contain the specifics of classes(controllers,actions etc.) involved and the plugins would be coded against the Plugin API (IntelliJ has something called OpenAPI. Eclipse &amp; Netbeans have some similar API's as well) provided by the tool.
	If you think abt it, there are lots of boiler plate code involved in running every plugin. Like, the code used to load, unload, assign or delegate actions to the plugins. The most important of all is that the plugin is kind off closed. If you want to perform a slight variation in what a plugin is doing, then you need to checkout it's source (if it's open-source), make changes to the code, recompile and deploy it to wherever it's supposed to go. In my opinion, one of the key reason why dynamic languages are pretty useful is because of not needing to write these kind of boiler plate code and the ability to perform lot of things during runtime. And, that is the exact same reason why Java has &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=223&quot;&gt;Scripting API&lt;/a&gt; &amp; tools like &lt;a href=&quot;http://www.mozilla.org/rhino/&quot;&gt;Rhino&lt;/a&gt;, &lt;a href=&quot;http://www.jython.org/Project/&quot;&gt;Jython&lt;/a&gt;, &lt;a href=&quot;http://jruby.codehaus.org/&quot;&gt;JRuby&lt;/a&gt; etc. are created for.  
&lt;/p&gt;
&lt;p&gt;
	With that introduction, what Script Monkey is trying to offer is, we don't need to write plugins for every small feature or functionality we are looking for. We can have one plugin, which is Script Monkey at the center and for every feature we need, we can get it done with the help of &quot;plugin-scripts&quot;(simple Javascript, ruby or python code) at runtime. The plugin-scripts doesn't always need to make just Plugin API call, it can also do things specific to projects we are working on, like cleaning up temp files, backing up the folder or auto checking in to CVS etc. 	
	I am not saying Script Monkey will replace every plugin we use in a tool, there may be complex features/functionalities, which is better off to be a plugin on it's own than to be plugin-scripts.
&lt;/p&gt;
&lt;p&gt;
	Another important thing I want to stress here is, the tool we are using, whether its Eclipse, IntelliJ or Netbeans, already has millions of lines of code running inside. If the API is designed well, we should be able to exploit/invoke the methods we need at runtime. Which in other words, code re-usability in steroids :).
&lt;/p&gt;
&lt;p&gt;
	Obviously, I didn't want to overload too much details on Script Monkey in one article. Hopefully in my future articles, I'll discuss more on other aspects of this tool as well.
&lt;/p&gt;
&lt;p&gt;
	Like I said before, currently it is available only as IntelliJ plugin. With the help of open-source community, I have confidence that I will be able to take it to Eclipse,Netbeans etc. users as well.
&lt;/p&gt;

&lt;p&gt;
	Thought, comments, questions?
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-08-18:108</id>
    <published>2008-08-18T18:28:00Z</published>
    <updated>2008-08-18T18:35:50Z</updated>
    <category term="Blogs"/>
    <category term="cygwin,unix,CLI,windows,scripts"/>
    <link href="http://blogs.boxysystems.com/2008/8/18/windows-based-programmers-stop-hating-clis-command-line-interfaces" rel="alternate" type="text/html"/>
    <title>Windows based programmers... Stop hating CLIs (Command Line Interfaces)</title>
<content type="html">
            &lt;p&gt;If you are a &lt;b&gt;unix/linux&lt;/b&gt; lover, this article may not be of interest to you, because you should be knowing the power of &lt;b&gt;CLIs&lt;/b&gt; in *nix operating systems. But, for a windows programmer CLIs are kind of a derogatory thing. They usually have the perception that, &quot;If you don't have a nice looking, user-friendly GUI, then it's not for me&quot;. I agree that to some extent for a regular, non-savvy windows user. But, I don't think it makes sense to someone who has some knowledge of developing or maintaining software. I should admit, I have been like that for many years, until I realized the power of CLIs and how it can help leverage the day to day task in a software development environment.&lt;/p&gt;
 
 &lt;p&gt;Just like most of the developers, I consult to a client whose workstations are windows based. But, my personal PC &amp; servers at home are primarily Linux based. The scope of this article is only to emphasize the usage on CLIs and not to compare Windows against Unix based OS's, so that a windows user can benefit from the best of both worlds.&lt;/p&gt;
 
 &lt;p&gt;Alright, let's get to the real story here. A colleague of mine was working on a project where he had problems updating code from CVS. He uses IntelliJ IDE for development. For some reason he couldn't update the codebase either thro IntelliJ or WinCVS client. He has to copy the entire codebase from someone who had successfully updated the codebase and manually change the CVS metadata info with his user id, so that he could successfully commit the files he modified. Needless to say it's a very painful and tedious process. I am sure, anyone who had used version control systems like CVS or Subversion would have encountered problems similar to this. So, what's the solution. Well, you can search the project folder for text containing the other person's user id and manually edit those files to update his user id. It would take considerable amount of time to do this depending on the number of files that needs to be updated. And also, the chance of making errors are quite high.&lt;/p&gt;

 &lt;p&gt;I offered him a solution where he can perform this tedious task in 2 easy commands. Thanks to &lt;a href=&quot;http://www.cygwin.com&quot;&gt;&lt;b&gt;cygwin&lt;/b&gt;&lt;/a&gt; for making this possible. I really like to thanks cygwin's team for providing this wonderful tool for people like me who works on windows systems and able to get the best of command line support offered by Unix based operating systems. Here are the 2 commands he has to run to replace his user id(For ex. A) with some one else's user-id(For ex. B). You can do this in one line command, but for him to know which files got modified, I wanted to do this as a 2 step process.&lt;/p&gt;

 &lt;pre&gt;
	# Command to update CVS Root metadata (replace user A with user B)
	find . -type f -name 'Root' | xargs perl -pi -e 's/:pserver:A/:pserver:B/g'

	# Delete the .bak files after the change
	find . -name 'Root.bak' | xargs rm -f

 &lt;/pre&gt;

 &lt;p&gt;This is just a tip of the iceberg. You can do much more things in command line using Cygwin. I know its little annoying to go thro man pages and find out the options you need for a command. But, if you figure out the command once and you can use it whenever you need. I am sure Cygwin would be a very valuable addition to a windows based developer's toolbox.&lt;/p&gt;

 &lt;p&gt;So, that incident inspired me to write an article on CLIs. I have been compiling the list of commands that would be useful for windows programmers. Here are some.&lt;/p&gt;

 &lt;pre&gt;
	# Cleanup the codebase by removing all the CVS metadata files
	 find . -name &quot;.cvs&quot; -type d -exec rm -rf {} \;

	# Cleanup the codebase by removing all the Subversion metadata files
	 find . -name &quot;.svn&quot; -type d -exec rm -rf {} \;

	# Print the list of files that was modified in the past 1 day
	find . -mtime 1 -print

	# Command to watch tomcat's log file in realtime without the need to refresh.
	# Will be very useful when you are trying to debug or test something
	tail -f $CATALINA_HOME/logs/catalina.out

	# Find files larger than 1 Mb in current directory
	find . -size 1M -type f

	# Count no. of .java files in the current codebase
	find . -name \*.java -print|wc -l

	# List tomcat log files which are older than 30 days
	find $CATALINA_HOME/logs -type f -mtime 30 -print

	# Move tomcat log files to 'C:\archive' which are older than 30 days	
	find $CATALINA_HOME/logs -type f -mtime 30 -exec mv {} /cygdrive/c/archive/ \;
 &lt;/pre&gt;


 &lt;p&gt;Please feel free to add more commands by posting them in the comments section.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-08-04:103</id>
    <published>2008-08-04T16:37:00Z</published>
    <updated>2008-08-04T16:38:46Z</updated>
    <category term="Blogs"/>
    <category term="scurlr,GAE,Google App Engine,Visualization,Web 2.0"/>
    <link href="http://blogs.boxysystems.com/2008/8/4/scurlr-the-screenshot-generator-visualization-tool-for-web" rel="alternate" type="text/html"/>
    <title>ScURLr - the screenshot generator/visualization tool for web</title>
<content type="html">
            &lt;p&gt;
 I am pleased to announce the release of &lt;a href=&quot;http://www.scurlr.com&quot;&gt;ScURLr&lt;/a&gt;, a &lt;a href=&quot;http://code.google.com/appengine/&quot;&gt;Google App Engine&lt;/a&gt; powered web application. Essentially, it's a screenshot generator/visualization tool for websites. It can generate screenshots of anything and everything as long as it is universally accessible through standard compliant web browsers.
 &lt;/p&gt;

 &lt;p&gt;One of the interesting thing about this application is it's use of varieties of technologies and APIs. I can summarize the equation as follows&lt;br /&gt;
 &lt;b&gt;ScURLr = GAE + GWT + Gadgets + etc.&lt;/b&gt;
 &lt;/p&gt;

 &lt;p&gt;Please give it a test drive and let me know if you have any comments, thoughts, suggestions or critiques.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-07-30:102</id>
    <published>2008-07-30T16:48:00Z</published>
    <updated>2008-07-30T16:57:03Z</updated>
    <category term="Blogs"/>
    <category term="google,gadget,reddit,preview"/>
    <link href="http://blogs.boxysystems.com/2008/7/30/reddit-preview-google-gadget" rel="alternate" type="text/html"/>
    <title>Reddit Preview - google gadget</title>
<content type="html">
            &lt;p&gt;
 Alright, &lt;a href=&quot;http://www.google.com/ig/directory?url=www.therandomhomepage.com/google/gadgets/RedditPreview/module.xml&quot;&gt;Reddit Preview&lt;/a&gt; is my next google gadget in the &lt;a href=&quot;/search?q=preview&quot;&gt;preview gadgets series&lt;/a&gt;. Please give it a try and let me know if you have any suggestions, comments or questions.
 &lt;/p&gt;

&lt;p&gt;
&lt;/p&gt;
&lt;br /&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-07-20:101</id>
    <published>2008-07-20T14:49:00Z</published>
    <updated>2008-07-20T14:53:47Z</updated>
    <category term="Blogs"/>
    <category term="random feed netvibes widget"/>
    <link href="http://blogs.boxysystems.com/2008/7/20/random-feed-netvibes-widget" rel="alternate" type="text/html"/>
    <title>Random Feed netvibes widget</title>
<content type="html">
            &lt;p&gt;
If you like to embed this widget in your blog or website, click on the share button &amp; customize the way you want and the embed script will be ready to go.
&lt;/p&gt;
&lt;p&gt;
Let me know if you have any comments or questions.
&lt;/p&gt;

&lt;p&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-07-20:100</id>
    <published>2008-07-20T14:44:00Z</published>
    <updated>2008-07-20T14:48:12Z</updated>
    <category term="Blogs"/>
    <category term="random wikipedia article netvibes UWA"/>
    <link href="http://blogs.boxysystems.com/2008/7/20/random-wikipedia-article-netvibes-widget" rel="alternate" type="text/html"/>
    <title>Random Wikipedia Article netvibes widget</title>
<content type="html">
            &lt;p&gt;
I just happened to chekout Netvibes universal widget's sharing functionality. It is pretty cool and got very neat user interface for customizing the gadget, so that it can be embedded easily in blogs and websites. 
It would be unfair if I don't share this gadget in my blog. So, here it goes.
&lt;/p&gt;

&lt;p&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-05-09:90</id>
    <published>2008-05-09T17:33:00Z</published>
    <updated>2008-05-09T17:34:25Z</updated>
    <category term="Blogs"/>
    <category term="java,interface,api design,programming"/>
    <link href="http://blogs.boxysystems.com/2008/5/9/power-of-interface-in-java" rel="alternate" type="text/html"/>
    <title>Power of Interface in Java</title>
<content type="html">
            &lt;p&gt;
I was working on compiling &amp; refining Java/J2EE interview questions for the consulting company I'm with. One of the question really bothered me. It states, &quot;What is the conceptual difference between &quot;Abstract Class&quot; and &quot;Interface&quot; ?&quot;. If you google for that question, I bet, you will come across tons of answers &amp; explanations. To me, it's a cliche question you can almost expect that in any Java interview. I think it needs to be rephrased or asked in a different way. Here it goes...
&lt;/p&gt;

&lt;p&gt;What is the power of &quot;Interface&quot; in Java and support your answer with a practical example which could be understood by most Java programmers?&lt;/p&gt;

&lt;p&gt;
Answer: Interface helps in designing systems or software with high-level of abstraction. It helps design API and establish protocols between various systems being iteracted or interfaced. Let's take an example of java.sql.Connection. It totally depend on the implemented JDBC driver to define what the connection is doing. It could be a Oracle, MySQL database connection or it could be just a flat file based database connection. Same is the case with javax.servlet.Servlet interface. I can throw more &amp; more examples. Anyway, the bottom line is... JDBC, Servlets, JMS, EJB etc. are all possible because of Interface.
&lt;/p&gt;

&lt;p&gt;
I am not saying that is the best answer anyone can give or that is the only usage of Interface. 
Honestly, I should admit, I didn't know the real usage/power of Interface for a long time working in Java, until I reached a point where I felt...
Yep... This is it. This is why interface was invented for...:)
&lt;/p&gt;

&lt;p&gt;
I am not denying or underestimating the usage of abstract classes. And, I do think you can design APIs with just abstract classes. But, you almost had to fake some implementation to get high-level of abstraction. Abstraction is one of the biggest blessing in Software Programming. Think about OS level system calls, its all abstracted to the application level programs. We don't care how the file is being read or written at the byte level. As an application level programmer we do our job (of reading &amp; writing file right by the application program we are working with) &amp; expect the OS to do its job. I dont want to go off topic with all these metaphors. I think, I made my point clear.
&lt;/p&gt;

&lt;p&gt;
Comments, thoughts ?
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-04-17:89</id>
    <published>2008-04-17T14:20:00Z</published>
    <updated>2008-04-17T14:22:47Z</updated>
    <category term="Blogs"/>
    <category term="stumbleupon,preview,google gadget"/>
    <link href="http://blogs.boxysystems.com/2008/4/17/stumbleupon-preview-google-gadget" rel="alternate" type="text/html"/>
    <title>StumbleUpon Preview - google gadget</title>
<content type="html">
            &lt;p&gt;
Here is my next google gadget &lt;a href=&quot;http://www.google.com/ig/directory?url=www.therandomhomepage.com/google/gadgets/StumbleUpon/module.xml&quot;&gt;Stumble Upon preview&lt;/a&gt; following the series of preview gadgets (&lt;a href=&quot;http://blogs.boxysystems.com/2007/11/27/delicious-preview-google-gadget&quot;&gt;Delicious Preview&lt;/a&gt;, &lt;a href=&quot;http://blogs.boxysystems.com/2008/1/23/digg-preview-google-gadget&quot;&gt;Digg Preview&lt;/a&gt; &amp; &lt;a href=&quot;http://blogs.boxysystems.com/2008/1/3/dzone-preview-google-gadget&quot;&gt;DZone Preview&lt;/a&gt;). 
&lt;/p&gt;
&lt;p&gt;
Please check it out and let me know what you think...
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-04-02:85</id>
    <published>2008-04-02T21:10:00Z</published>
    <updated>2008-11-06T15:09:15Z</updated>
    <category term="Blogs"/>
    <category term="JGoogleAnalytics,google analytics,web-analytics"/>
    <link href="http://blogs.boxysystems.com/2008/4/2/jgoogleanalyticsblog" rel="alternate" type="text/html"/>
    <title>Google Analytics for Java applications</title>
<content type="html">
            &lt;p&gt;
  As you may or may not be aware &lt;a href=&quot;http://www.google.com/analytics&quot;&gt;google analytics&lt;/a&gt; is one of the free service provided by Google for website owners. It would allow website owners to track the usage data and perform usage &amp; trend analysis on websites. Whether you have a personal blog, social networking portal, corporate website or just a  family website, you will be able to track the information about the visitors and what part of the website they use more etc. So, it would help the webmasters to find their target audience and identify the areas for improvements.
  &lt;/p&gt;

  &lt;p&gt;Conventionally, google analytics is used only for tracking websites and web portals. As a open-source contributor I often wonder, is there a way to track the usage on non web-based applications. I was curious to know about my users, what part of the tool they use more or even less. Hence, the genesis of &lt;a href=&quot;http://jgoogleanalytics.googlecode.com&quot;&gt;JGoogleAnalytics&lt;/a&gt;. It's a light-weight, unobtrusive utility used for tracking usage data on Java applications thro Google analytics. If you are a plugin(IntelliJ, Eclipse, Netbeans) developer or own a full blown Java web portal, you will be able to track the usage data. 
  &lt;/p&gt;

  &lt;p&gt;
  As a proof of concept, I have used this tool in &lt;a href=&quot;http://plugins.intellij.net/plugin/?id=51&quot;&gt;Library Finder - IntelliJ plugin&lt;/a&gt;. I am capturing events like plugin load and some of the user actions. Following is the sample code to track the usage data. FocusPoint is a logical point of focus in the application. It can be events like application/module load, user actions, error events etc.
  &lt;/p&gt;

  &lt;pre&gt;
   //Google analytics tracking code for Library Finder
  JGoogleAnalyticsTracker tracker = new JGoogleAnalyticsTracker(&quot;Library Finder&quot;,&quot;1.3.2&quot;,&quot;UA-2184000-1&quot;); 

  FocusPoint focusPoint = new FocusPoint(&quot;PluginLoad&quot;);

  tracker.trackAsynchronously(focusPoint);
  &lt;/pre&gt;

  &lt;p&gt;
  There are two ways you can capture the usage data. You can track them either Synchronously or Asynchronously. Please note that you may always want to use the Async approach unless otherwise it's required or if you are ready to sacrifice some performance hit on the actual application. Tracking asynchronously is the ideal way as it will be running on a low-priority thread.
  &lt;/p&gt;

  &lt;p&gt;
  Here is the google analytics screenshot showing the usage on Library Finder. 
  &lt;/p&gt;
  &lt;a href=&quot;http://blogs.boxysystems.com/assets/2008/4/2/ContentByTitleScreenshot.PNG&quot; title=&quot;Google Analytics screenshot&quot;&gt;&lt;img src=&quot;http://blogs.boxysystems.com/assets/2008/4/2/ContentByTitleScreenshot_thumb.PNG&quot; /&gt;&lt;/a&gt;


  &lt;p&gt;
  Please let me know if you have any suggestions, comments or critiques.
  &lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-01-29:83</id>
    <published>2008-01-29T19:42:00Z</published>
    <updated>2008-01-29T19:53:08Z</updated>
    <category term="Blogs"/>
    <category term="javascript sorting tutorial"/>
    <link href="http://blogs.boxysystems.com/2008/1/29/implementing-object-sorting-in-javascript" rel="alternate" type="text/html"/>
    <title>Implementing object sorting in Javascript</title>
<content type="html">
            &lt;p&gt;
  Array sorting (&lt;i&gt;Array.sort()&lt;/i&gt;) in Javascript is a very useful function. I have used it lots of times. But, I never tried sorting objects stored in arrays. As you may or may not aware, Javascript objects in arrays are pretty flexible data structures. It can be used as Vector, Hashtables, Linked lists etc. In this article, I am going to discuss how to implement object based sorting in Javascript arrays. I am sure, you can do this in many different cool ways using frameworks like Prototype, JQuery etc. But, I would like to show, how we can implement this in native Javascript.
  &lt;/p&gt;

  &lt;p&gt;
  Alright, here is our Javascript object &lt;b&gt;Character&lt;/b&gt; and they are stored in characterList array. We would like to sort the contents of the array on firstName, lastName &amp; age in ascending and descending orders. The proof is in the code...
  &lt;/p&gt;

  &lt;pre&gt;
	function Character(firstName, lastName, age){
		this.firstName = firstName;
		this.lastName = lastName;
		this.age = age;
	}

  var characterList = new Array();
  characterList[0] = new Character('Jerry','Seinfeld',35);
  characterList[1] = new Character('George','Costanza',38);
  characterList[2] = new Character('Elaine','Benes',30);  
  characterList[3] = new Character('Kramer','Cosmo',40);

  &lt;/pre&gt;

  &lt;p&gt;
	Here is our test function - jsObjectSortingTest. Please feel free to refactor the sort handler, the way you wish. I have tested this in IE, Firefox &amp; Opera. I am hoping, it should work fine in other javascript environments too.
  &lt;/p&gt;

  &lt;pre&gt;

  	function jsObjectSortingTest() {
		alert(&quot;Javascript object sorting test&quot;);	

		alert(&quot;Character list without sorting&quot;);	
		displayCharacterList();
		
		characterList.sort(sortFirstNameAscendingHandler);
		alert(&quot;Character list after sorting on 'firstName' in 'ascending' order&quot;);	
		displayCharacterList();

		characterList.sort(sortLastNameDescendingHandler);
		alert(&quot;Character list after sorting on 'lastName' in 'descending' order&quot;);	
		displayCharacterList();

		characterList.sort(sortAgeAscendingHandler);
		alert(&quot;Character list after sorting on 'age' in 'ascending' order&quot;);	
		displayCharacterList();
	}
 


  function sortFirstNameAscendingHandler(thisObject,thatObject) {	
	if (thisObject.firstName &gt; thatObject.firstName)
	{
		return 1;
	}
	else if (thisObject.firstName &amp;lt; thatObject.firstName)
	{
		return -1;
	}
	return 0;
  }

  function sortLastNameDescendingHandler(thisObject,thatObject) {	
	if (thisObject.lastName &gt; thatObject.lastName)
	{
		return -1;
	}
	else if (thisObject.lastName &amp;lt; thatObject.lastName)
	{
		return 1;
	}
	return 0;
  }

  function sortAgeAscendingHandler(thisObject,thatObject) {	
	if (thisObject.age &gt; thatObject.age)
	{
		return 1;
	}
	else if (thisObject.age &amp;lt; thatObject.age)
	{
		return -1;
	}
	return 0;
  }

  function displayCharacterList() {
	for(var i=0; i &amp;lt; characterList.length; i++) {
		alert(&quot;Name = &quot;+characterList[i].firstName+&quot;, &quot;+characterList[i].lastName+&quot;, Age = &quot;+characterList[i].age);
	}
  }
  &lt;/pre&gt;	  

  &lt;p&gt;
  Thoughts, comments, suggestions ?
  &lt;/p&gt;
          </content>  </entry>
</feed>

