<?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,2008: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>2008-08-18T18:35:50Z</updated>
  <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-06-14T21:07:31Z</updated>
    <category term="Blogs"/>
    <category term="JGoogleAnalytics,google analytics,web-analytics"/>
    <link href="http://blogs.boxysystems.com/2008/4/2/jgoogleanalytics" 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>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2008-01-23:82</id>
    <published>2008-01-23T22:50:00Z</published>
    <updated>2008-01-24T16:10:29Z</updated>
    <category term="Blogs"/>
    <category term="Digg Preview Google gadget"/>
    <link href="http://blogs.boxysystems.com/2008/1/23/digg-preview-google-gadget" rel="alternate" type="text/html"/>
    <title>"Digg Preview" Google gadget.</title>
<content type="html">
            &lt;p&gt;	
  I am pleased to announce my next google gadget, &lt;a href=&quot;http://www.google.com/ig/directory?url=http://www.therandomhomepage.com/google/gadgets/DiggPreview/module.xml&quot; title=&quot;Digg Preview&quot;&gt;&quot;Digg Preview&quot;&lt;/a&gt;. 
  Well, it's like my other preview gadgets (&lt;a href=&quot;http://blogs.boxysystems.com/2007/11/27/delicious-preview-google-gadget&quot;&gt;Delicious 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;) with some features specific to &lt;a href=&quot;http://www.digg.com&quot;&gt;Digg&lt;/a&gt;.  I have tested it in Firefox, Internet Explorer &amp; Opera. Hopefully it should work fine in other major browsers like Safari too.
  &lt;/p&gt;

  &lt;p&gt;Please let me know if there are any comments, thoughts or suggestions.&lt;/p&gt;

  &lt;p&gt;See this gadget in action...&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-01-03:77</id>
    <published>2008-01-03T16:18:00Z</published>
    <updated>2008-04-14T14:33:34Z</updated>
    <category term="Blogs"/>
    <category term="DZone Preview Google gadget"/>
    <link href="http://blogs.boxysystems.com/2008/1/3/dzone-preview-google-gadget" rel="alternate" type="text/html"/>
    <title>"DZone 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=http://www.therandomhomepage.com/google/gadgets/DZonePreview/module.xml&quot; title=&quot;DZone Preview&quot;&gt;&quot;DZone Preview&quot;&lt;/a&gt;. Essentially, it's a clone of &lt;a href=&quot;http://www.google.com/ig/directory?url=http://www.therandomhomepage.com/google/gadgets/DeliciousPreview/module.xml&quot; title=&quot;Delicious Preview&quot;&gt;&quot;Delicious Preview&quot;&lt;/a&gt; gadget with some features specific to DZone. In a nut shell, it's a productivity gadget which helps users to preview/scan through the links of various catgeries from &lt;a href=&quot;http://www.dzone.com&quot;&gt;DZone&lt;/a&gt;. The user would be able to dynamically add or remove tabs for the tag of their interest from Tagcloud. 
  &lt;/p&gt;

  &lt;p&gt;Thoughts, comments, suggestions, critiques?&lt;/p&gt;

  
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2007-11-27:40</id>
    <published>2007-11-27T16:59:00Z</published>
    <updated>2007-11-27T17:59:12Z</updated>
    <category term="Blogs"/>
    <category term="del.icio.us"/>
    <category term="Google Gadget"/>
    <link href="http://blogs.boxysystems.com/2007/11/27/delicious-preview-google-gadget" rel="alternate" type="text/html"/>
    <title>"Delicious Preview" Google gadget</title>
<content type="html">
            &lt;p&gt;
I have released my latest google gadget, &lt;b&gt;&lt;a href=&quot;http://www.google.com/ig/directory?url=http://www.therandomhomepage.com/google/gadgets/DeliciousPreview/module.xml&quot;&gt;Delicious Preview&lt;/a&gt;&lt;/b&gt; and looks like it's started showing up in the Google gadget directory. This gadget would allow the users to preview URL's bookmarked in &lt;a href=&quot;http://del.icio.us&quot;&gt;http://del.icio.us&lt;/a&gt;. My favorite feature in this gadget is &quot;Tagcloud&quot; tab and dynamically be able to create tabs for the selected tags. And, ofcourse, the user will be able to remove the created tabs whenever he/she wants.
&lt;/p&gt;
&lt;p&gt;
From develeopment standpoint this gadget is little advanced from my other gadgets. I was able to utilize some of the advanced javascript features provided by Google gadgets API like tabs, setprefs etc. in this gadget.
&lt;/p&gt;
&lt;p&gt;
Like always, feel free to send me your thoughts, comments, suggestions or bug reports :)
&lt;/p&gt;
 
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2007-09-07:28</id>
    <published>2007-09-07T22:02:00Z</published>
    <updated>2007-09-07T22:05:45Z</updated>
    <category term="Blogs"/>
    <category term="IntelliJ IDEA"/>
    <category term="Java 5"/>
    <category term="Library Finder"/>
    <link href="http://blogs.boxysystems.com/2007/9/7/making-java-5-source-code-backward-compatible" rel="alternate" type="text/html"/>
    <title>Making Java 5 source code backward compatible</title>
<content type="html">
            &lt;p&gt;
  I recently came across an interesting problem in the Library Finder project. Currently, &lt;a href=&quot;http://code.google.com/p/libraryfinder/&quot; title=&quot;Library Finder&quot;&gt;Library Finder&lt;/a&gt; works as &lt;a href=&quot;http://plugins.intellij.net/plugin/?id=51&quot;&gt;IntelliJ IDEA plugin&lt;/a&gt; and also, as a command line tool. This project uses some of the Java 5 features like generics, auto-boxing and enhanced for-loops. The plugin version of this tool works fine because it's running inside IntelliJ IDEA and IntelliJ adapted Java 5 very early from it's 5.0 versions. I have used command line version of Library Finder so many times without any issues but, it was all on JDK 5 environments. 
&lt;/p&gt;

&lt;p&gt;
The client where I am working currently hasn't upgraded to Java 5 yet and they are still in Java 1.4. While I was running Library Finder from the command line I was getting &lt;b&gt;java.lang.UnsupportedClassVersionError&lt;/b&gt;. That immediately made me realise Library Finder is not backward compatible. I was looking for ways to make it backward compatible and there are no valid reasons to make this tool supported only from Java 5. After doing some research, I found out setting the compiler options &lt;b&gt;&quot;-source 1.5 -target jsr14&quot;&lt;/b&gt; will make Java 5 source code backward compatible to 1.4. I don't want to go back beyond 1.4 because, Library Finder uses pattern matching support from java.util.regex.Pattern class, which is available only from Java 1.4.
&lt;/p&gt;

&lt;p&gt;
Here is the screenshot showing the compiler options in IntelliJ IDEA v6.0.4. You should be able to set this compiler options in any of your other favorite Java IDE's or in command line.
&lt;/p&gt;
&lt;img src=&quot;/assets/2007/9/7/LibraryFinderCompilerOptions.jpg&quot; /&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2007-07-20:25</id>
    <published>2007-07-20T19:25:00Z</published>
    <updated>2007-07-23T13:47:57Z</updated>
    <category term="Blogs"/>
    <link href="http://blogs.boxysystems.com/2007/7/20/jconsole-a-poor-man-s-java-profiler" rel="alternate" type="text/html"/>
    <title>JConsole, a poor man's Java profiler</title>
<content type="html">
            &lt;p&gt;
By reading this title, I don't want the readers to think that &lt;b&gt;JConsole&lt;/b&gt; is nothing but &quot;Just Another Java Tool&quot;. It's very simple, yet powerful. One of the major upgrades to Java 5 is its comprehensive monitoring and management support, which is very much needed in any Java based enterprise application. There are various profiling tools available for Java in the market and every one of them has its significance &amp; different from the other. JConsole is very useful for basic profiling needs. It's not very elaborate like other profilers, so, you don't loose focus from the problem you are chasing. Since, it is part of JDK, you can always trust this more than any other third party profiling tools.
&lt;/p&gt;

&lt;p&gt;
In a nutshell, JConsole is used for monitoring the vital JVM statuses like memory pools (heap &amp; permGen space), threads and classes getting loaded. It is also used for managing MBeans which are part of JDK or the one's provided by the application that JVM is running. Servers like JBoss and Tomcat ship their own set of MBeans along with their products, using which you can manage their application containers. You can also write your own application specific management tasks like &quot;OutOfMemory&quot; warning system, cache management or any back door administrative tasks as management beans.
&lt;/p&gt;

&lt;p&gt;
In this article, I am going to explain how to set up JConsole in a server environment. Setting up JConsole in local machine is very simple opposed to setting up in server, because of security and authentication. For local machine, all you have to do is pass &lt;code&gt;-Dcom.sun.management.jmxremote&lt;/code&gt; system property to the JVM process. Start the JConsole and connect it to the JVM process using the process id already populated in the connect dialog.
&lt;/p&gt;

&lt;img src=&quot;http://blogs.boxysystems.com/assets/2007/7/20/JConole_Local_Connection_Dialog.PNG&quot; /&gt;

&lt;p&gt;
Follow these steps to enable JConsole in a server machine with password based authentication. If you want to use SSL based authentication, there are some extra steps you need to follow (see &quot;Remote Monitoring &amp; Management&quot; in references section).


&lt;ol&gt;	
	&lt;li&gt;
		Find an unused port in the server. In unix machines, you can use command like &lt;code&gt;netstat&lt;/code&gt;. This is the port which will be used for JMX/RMI connections between the running JVM process (server) and the JConsole(client). For the purpose of this article, we'll use &lt;b&gt;9000&lt;/b&gt; port number.
	&lt;/li&gt;
	&lt;li&gt;
		Copy the access control &amp; password template files to your home directory in the server. This can be any directory as long as you have the right privilege.
		&lt;pre&gt;
			&lt;code&gt;cp $JDK_HOME/jre/lib/management/jmxremote.access ~/jmxremote.access&lt;/code&gt;
			&lt;code&gt;cp $JDK_HOME/jre/lib/management/jmxremote.password.template ~/jmxremote.password&lt;/code&gt;
		&lt;/pre&gt;
		Incase, if you dont find these files in the server, copy the one from your local JDK installation to the server.
	&lt;/li&gt;
	&lt;li&gt;
		Change the access rights of the above files to be modified only by you. 
		&lt;pre&gt;	
			&lt;code&gt;chmod 600 ~/jmxremote.access&lt;/code&gt;
			&lt;code&gt;chmod 600 ~/jmxremote.password&lt;/code&gt;
		&lt;/pre&gt;
	&lt;/li&gt;

	&lt;li&gt;
		Make sure the roles in jmxremote.access are enabled
		&lt;pre&gt;
			monitorRole   readonly
			controlRole   readwrite
		&lt;/pre&gt;

		&lt;b&gt;Note: monitorRole and controlRole are not just the role names. They are the user names with those corresponding roles. &quot;monitorRole&quot; is a user with readonly access.&lt;/b&gt;
	&lt;/li&gt;

	&lt;li&gt;
		Assign passwords to the above specified roles in jmxremote.password file. 
		&lt;pre&gt;
				monitorRole  password
				controlRole   password
		&lt;/pre&gt;
	&lt;/li&gt;

	&lt;li&gt;
		Start the JVM process in the server with the added system properties for JConsole. For example, in Tomcat, you can add this in catalina.sh.

		&lt;pre&gt;
		&lt;code&gt;
		... -Dcom.sun.management.jmxremote.port=9000  
                    -Dcom.sun.management.jmxremote.ssl=false     
                    -Dcom.sun.management.jmxremote.password.file=/home/siddique/jmxremote.password 
                    -Dcom.sun.management.jmxremote.access.file=/home/siddique/jmxremote.access
		&lt;/code&gt;
		&lt;/pre&gt;
	&lt;/li&gt;

	&lt;li&gt;
		Start JConsole from your local machine to connect to the server JVM process.
		
		&lt;pre&gt;
			&lt;code&gt;
				$JDK_HOME/bin/jconsole.sh
			&lt;/code&gt;
		&lt;/pre&gt;

		&lt;img src=&quot;http://blogs.boxysystems.com/assets/2007/7/20/JConsole_Remote_Connection_Dialog.PNG&quot; /&gt;


	&lt;/li&gt;

&lt;/ol&gt;
&lt;/p&gt;
&lt;p&gt;
	Comments, thoughts, critiques ?
&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
	References
	&lt;li&gt;&lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/guide/management/&quot;&gt;Monitoring and Management for the Java Platform&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html&quot;&gt;Using JConsole to Monitor Applications&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote/&quot;&gt;Remote Monitoring and Management&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;$JDK_HOME/demo/management&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blogs.boxysystems.com/">
    <author>
      <name>Siddique</name>
    </author>
    <id>tag:blogs.boxysystems.com,2007-07-09:24</id>
    <published>2007-07-09T13:35:00Z</published>
    <updated>2007-07-12T14:49:46Z</updated>
    <category term="Blogs"/>
    <category term="demo"/>
    <category term="IntelliJ"/>
    <category term="LIbrary Finder plugin"/>
    <link href="http://blogs.boxysystems.com/2007/7/9/library-finder-moving-towards-universal-java-plugin" rel="alternate" type="text/html"/>
    <title>Library Finder moving towards "Universal Java Plugin"</title>
<content type="html">
            &lt;p&gt;
I have recently released the latest version (v1.2) of &lt;a href=&quot;http://plugins.intellij.net/plugin/?id=51&quot; title=&quot;Library Finder&quot;&gt;&lt;b&gt;Library Finder&lt;/b&gt;&lt;/a&gt;. Currently, it's an IntelliJ IDEA plugin, which helps finding library files for any class/file name pattern. There are various usages and benefits provided by this tool. Some of them includes things like troubleshooting &lt;b&gt;ClassNotFoundException&lt;/b&gt; and &lt;b&gt;NoClassDefFoundError&lt;/b&gt;; setting up project's workspace by identifying libraries used by java source files; easily identify duplicate or multiple versions of jar/zip files for the same library etc. etc.
&lt;/p&gt;

&lt;p&gt;
After the latest architectural enhancement to this tool, it would enable this to be extended to other major IDE's like Eclipse, Netbeans etc. and also running as Ant task. Library Finder is now based on &lt;a href=&quot;http://en.wikipedia.org/wiki/Model_view_controller&quot;&gt;Model-view-controller&lt;/a&gt; paradigm, where model part does the domain-specific operations like searching library files for various user inputs, view does the rendering to different forms like IntelliJ, Command line etc. and controller controls the logic flow by marriaging model and view part of the tool. 
&lt;/p&gt;

&lt;p&gt;
With the command line support added in the latest version, any java developer can use it from command line on all java supported platforms. I have laid out the roadmap to extend it to Eclipse, Netbeans, etc. in the future, hence, making it a &lt;b&gt;&quot;Universal Java Plugin&quot;&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;
It's an &lt;a href=&quot;http://code.google.com/p/libraryfinder/&quot;&gt;open-source&lt;/a&gt; tool so, you can use it wherever and however you wish. As always, I am open for feedback and support, so, please feel free to contribute or send me your thoughts, suggestions, comments or critiques.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;&lt;a href=&quot;/assets/2007/7/12/SettingUpGWTDevEnv.htm&quot;&gt;Watch demo video - Setting up GWT development environment on IntelliJ IDEA using Library Finder plugin&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;/assets/2007/7/12/SettingUpGWTDevEnv.htm&quot;&gt;&lt;img title=&quot;Setting up GWT Development Environment
 demo, IntelliJ, Library Finder&quot; src=&quot;/images/mephisto/icons/video.png?1176147613&quot; height=&quot;30&quot; alt=&quot;Video&quot; width=&quot;30&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
          </content>  </entry>
</feed>
