<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-31568098</id><updated>2024-09-01T16:21:48.063-07:00</updated><category term="General"/><category term="Java"/><category term="Design"/><category term="Java Basics"/><category term="SWING"/><category term="Startup"/><category term="Web"/><category term="fluent api"/><category term="Architecture"/><category term="Google App Engine"/><category term="Groovy"/><category term="Guice"/><category term="Interview"/><category term="JUnit4"/><category term="Java Gurus"/><category term="Performance"/><category term="Search"/><category term="coding guidelines"/><category term="management"/><category term="soap"/><title type='text'>Praveen Manvi&#39;s  Technical Diary</title><subtitle type='html'>Java, Content Management,Rich Internet Applications,Software Design &amp;amp; Architecture</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>51</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-31568098.post-600694913071357731</id><published>2016-04-26T22:33:00.000-07:00</published><updated>2016-04-26T22:33:02.526-07:00</updated><title type='text'>Cloud Design Patterns</title><content type='html'>&lt;a href=&quot;http://www.amazon.in/Cloud-Design-Patterns-Prescriptive-Architecture-ebook/dp/B00ITGHBBS&quot; target=&quot;_blank&quot;&gt;Cloud Design Patterns: Prescriptive Architecture Guidance for Cloud Applications (Microsoft patterns &amp;amp; practices)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Design patterns serve as great communication tools during design conversations with various stake holders.Most of these things we already know but are packaged in succinct manner and I think their importance are limited if majority of stake holders are unaware of those terminologies.Examples like GoF patterns and enterprise patterns from Martin Fowler served the great purpose in capturing the imagination of developers and helped the design communication better.&lt;br /&gt;
I believe this documentation from microsoft has same level maturity and &amp;nbsp;very well written with excellent diagrams. This is the best I have seen in this space.&lt;br /&gt;
&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568099.aspx&quot; target=&quot;_blank&quot;&gt;This 236 page PDF&lt;/a&gt; document on Cloud Design Patterns is divided into&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589772.aspx&quot; target=&quot;_blank&quot;&gt; 8 Focus Areas &amp;nbsp;&lt;/a&gt;each area consist a list of design patterns. Also note that some of the design patterns fall into multiple categories but intention remains the same.&lt;br /&gt;
&lt;br /&gt;
Most of the samples are in C# and I intend to re-create the sample using open source implementations in java eco system (best of breed of course). Will publish all the same samples github as I keep reading these pattern implementations and best practices. I believe this will serve as great learning tool. I will update this reference list as I complete coding for each pattern.&lt;br /&gt;
&lt;br /&gt;
Availability&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589789.aspx&quot; target=&quot;_blank&quot;&gt;Health Endpoint Monitoring Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589783.aspx&quot; target=&quot;_blank&quot;&gt;Queue-based Load Leveling Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589798.aspx&quot; target=&quot;_blank&quot;&gt;Throttling Pattern&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589779.aspx&quot; target=&quot;_blank&quot;&gt;Multiple Datacenter Deployment Guidance&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Data Management&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589799.aspx&quot; target=&quot;_blank&quot;&gt;Cache-aside Pattern&amp;nbsp;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568103.aspx&quot; target=&quot;_blank&quot;&gt;Command and Query Responsibility Segregation (CQRS)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589792.aspx&quot; target=&quot;_blank&quot;&gt;Event Sourcing Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589791.aspx&quot; target=&quot;_blank&quot;&gt;Index Table Pattern&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589782.aspx&quot; target=&quot;_blank&quot;&gt;Materialized View Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589797.aspx&quot; target=&quot;_blank&quot;&gt;Sharding Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589776.aspx&quot; target=&quot;_blank&quot;&gt;Static Content Hosting Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568102.aspx&quot; target=&quot;_blank&quot;&gt;Valet Key Pattern&lt;/a&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589802.aspx&quot; target=&quot;_blank&quot;&gt;Caching Guidance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589800.aspx&quot; target=&quot;_blank&quot;&gt;Data Consistency Primer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589795.aspx&quot; target=&quot;_blank&quot;&gt;Data Partitioning Guidance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589787.aspx&quot; target=&quot;_blank&quot;&gt;Data Replication and Synchronization Guidance&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Design and Implementation&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589778.aspx&quot; target=&quot;_blank&quot;&gt;Compute Resource Consolidation Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568103.aspx&quot; target=&quot;_blank&quot;&gt;Command and Query Responsibility Segregation (CQRS) Pattern&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589803.aspx&quot; target=&quot;_blank&quot;&gt;External Configuration Store Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568104.aspx&quot; target=&quot;_blank&quot;&gt;Leader Election Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568100.aspx&quot; target=&quot;_blank&quot;&gt;Pipes and Filters Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589785.aspx&quot; target=&quot;_blank&quot;&gt;Runtime Reconfiguration Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589776.aspx&quot; target=&quot;_blank&quot;&gt;Static Content Hosting Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589773.aspx&quot; target=&quot;_blank&quot;&gt;Compute Partitioning Guidance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Messaging&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568101.aspx&quot; target=&quot;_blank&quot;&gt;Competing Consumers Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568100.aspx&quot; target=&quot;_blank&quot;&gt;Pipes and Filters Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589794.aspx&quot; target=&quot;_blank&quot;&gt;Priority Queue Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589783.aspx&quot; target=&quot;_blank&quot;&gt;Queue-based Load Leveling Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589780.aspx&quot; target=&quot;_blank&quot;&gt;Scheduler Agent Supervisor Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589781.aspx&quot; target=&quot;_blank&quot;&gt;Asynchronous Messaging Primer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Management and Monitoring&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589803.aspx&quot; target=&quot;_blank&quot;&gt;External Configuration Store Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589789.aspx&quot; target=&quot;_blank&quot;&gt;Health Endpoint Monitoring Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589785.aspx&quot; target=&quot;_blank&quot;&gt;Runtime Reconfiguration Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589775.aspx&quot; target=&quot;_blank&quot;&gt;Instrumentation and Telemetry Guidance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589796.aspx&quot; target=&quot;_blank&quot;&gt;Service Metering Guidance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Performance and Scalability&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589799.aspx&quot; target=&quot;_blank&quot;&gt;Cache-aside Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568101.aspx&quot; target=&quot;_blank&quot;&gt;Competing Consumers Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568103.aspx&quot; target=&quot;_blank&quot;&gt;Command and Query Responsibility Segregation (CQRS) Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589792.aspx&quot; target=&quot;_blank&quot;&gt;Event Sourcing Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589791.aspx&quot; target=&quot;_blank&quot;&gt;Index Table Pattern&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Resiliency&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589784.aspx&quot; target=&quot;_blank&quot;&gt;Circuit Breaker Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589804.aspx&quot; target=&quot;_blank&quot;&gt;Compensating Transaction Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568104.aspx&quot; target=&quot;_blank&quot;&gt;Leader Election Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589788.aspx&quot; target=&quot;_blank&quot;&gt;Retry Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589780.aspx&quot; target=&quot;_blank&quot;&gt;Scheduler Agent Supervisor Pattern&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Security&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589790.aspx&quot; target=&quot;_blank&quot;&gt;Federated Identity Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn589793.aspx&quot; target=&quot;_blank&quot;&gt;Gatekeeper Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/dn568102.aspx&quot; target=&quot;_blank&quot;&gt;Valet Key Pattern&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
And Big Thanks to Microsoft engineers for writing this.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/600694913071357731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/600694913071357731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/600694913071357731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/600694913071357731'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2016/04/cloud-design-patterns.html' title='Cloud Design Patterns'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-2469995781867042718</id><published>2015-08-02T04:33:00.001-07:00</published><updated>2015-12-24T03:11:40.577-08:00</updated><title type='text'>Java-8 For Python Developers</title><content type='html'>&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
&lt;u&gt;&lt;b&gt;Abstract&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
This write up I wrote for providing session on java programming semantics for python programmers.The theme was to convey that Java (especially Java8) is not as verbose we (python programmers) think :)&lt;br /&gt;
&lt;br /&gt;
Java 8 release is touted as biggest release since its inception in terms of paradigm shift with the support for functional programming. Given the backward compatibility burden, Java engineering team has come up brilliant effort with seamless integration with functional programming. Most importantly adding power to all the existing old single method classes and enabling java collections with stream classes. Boiler plate code is going to be reduced drastically. This write up on &quot;Java 8 for Python developers&quot; is for &amp;nbsp;developers who are well versed python and familiar with basic java syntax. This content should provide enough orientation to navigate the Java ecosystem&#39;s libraries, tools and programming semantics.&lt;br /&gt;
&lt;br /&gt;
As this is most the significant release adding support to functional programming, many of the previous assumptions (with verbosity) on Java language deserves a re-look. Java is a platform that supports multiple languages and surely ecosystem is bigger compared to python, so here the focus is only on language semantics. Its really hard to be popular for a long time for any language. I guess java has re-invented well and is giving tough fight to other languages despite its age and baggage.&lt;br /&gt;
&lt;br /&gt;
In this I will go through over-view and in the next series we will see how new Java-8 features like Lambdas result in less boiler plate code (Method Reference,Concurrency), &lt;a href=&quot;https://blogs.oracle.com/java-platform-group/entry/java_8_s_new_type&quot; target=&quot;_blank&quot;&gt;new annotations&lt;/a&gt;&amp;nbsp; improves decorator coding and how many of the popular external libraries (Guava, apache commons, GS Collectioins, Joda time) can be removed (its obsolete as most of these features now available with JDK itself). The improved java script engine as part core JDK helps to utilize the existing java script code can make code as closer its python counter part in most of the cases.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Topics &lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
------------&lt;/div&gt;
History&lt;br /&gt;
------------&lt;br /&gt;
Java:&lt;br /&gt;
Created by Canadian &#39;James Gosling&#39; in 1996 influenced by Oak/C++. This is supported by corporate (Sun/Oracle) and is regarded on #1 language/platform for developing all kinds of application.&lt;br /&gt;
&lt;br /&gt;
Python:&lt;br /&gt;
Created by Dutch &#39;Guido van Rossum&#39; in 1994 influenced by ABC. Its pure community driven project although its creator is called &quot;Benevolent Dictator For Life&quot; and regarded as most developer friendly languages.&lt;br /&gt;
&lt;br /&gt;
Both are object oriented (classes, encapsulation, inheritance, polymorphism) but python is more scripting/functional friendly language. &amp;nbsp;Python is more object oriented in the sense that it does not have primitives and treats everything including functions as object. Java still deals with low level primitives and hence more perform-ant.&lt;br /&gt;
&lt;br /&gt;
---------------------&lt;br /&gt;
General Mapping&lt;br /&gt;
---------------------&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;direction: ltr; margin: 0pt 0in; text-indent: 0in; unicode-bidi: embed; word-break: normal;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 18pt;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 623px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 10426; mso-width-source: userset; width: 224pt;&quot; width=&quot;299&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 11310; mso-width-source: userset; width: 243pt;&quot; width=&quot;324&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.5pt;&quot;&gt;
  &lt;td class=&quot;xl65&quot; height=&quot;19&quot; style=&quot;height: 14.5pt; width: 224pt;&quot; width=&quot;299&quot;&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;background: gray; mso-highlight: gray; mso-no-proof: yes;&quot;&gt;Python&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;background: gray; mso-highlight: gray; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;background-color: #cccccc;&quot;&gt;Java&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
.py&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
.java&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
.pyc&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
.class&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
python.exe&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
java.exe + javac.exe&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
pypi&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
Maven central repo&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
PyCharm&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
IntelliJ IDEA&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
pip&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
maven&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
requirements.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
pom.xml/gradle&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
PYTHONPATH&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
CLASSPATH&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
CPython&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
HotSpot/JIT&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
Jython/IronPython/PyPy&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;479&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
JRockit/oracle jdk/Dalvik&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;&lt;td class=&quot;xl65&quot; style=&quot;width: 243pt;&quot; width=&quot;324&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 960px;&quot;&gt;&lt;colgroup&gt;&lt;col span=&quot;2&quot; style=&quot;mso-width-source: userset; width: 240pt;&quot; width=&quot;480&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Java is a statement oriented language. You write a statement, and when it executes, it has an effect. REPLs by contrast are expression-oriented: You write an expression, and the REPL shows the result,like a calculator. Hence REPL was not super useful with java. (I remember hearing this from &amp;nbsp;scala&#39;s creator&amp;nbsp;&lt;span style=&quot;color: #660099; cursor: pointer; font-family: arial, sans-serif; font-size: x-small; text-decoration: none; white-space: nowrap;&quot;&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Martin_Odersky&quot; style=&quot;color: #660099; cursor: pointer; font-family: arial, sans-serif; text-decoration: none; white-space: nowrap;&quot;&gt;Martin Odersky&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 18px; white-space: nowrap;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 18px; white-space: nowrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
Definitely REPL(Read Eval Print Loop) will be greatly missed by python developers. But if you use the jython/groovysh, they serve the purpose. &amp;nbsp;It should give the same feel of interactive mode development with REPL.&lt;br /&gt;
&lt;a href=&quot;https://blogs.oracle.com/java/entry/jshell_and_relp_in_java&quot; target=&quot;_blank&quot;&gt;REPL for java coming with Java9&lt;/a&gt; looks impressive.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For ex:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;D:\jython2.7.0\bin&amp;gt;jython&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_25&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt; 1+1&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;2&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt; from java.util import Arrays as A&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt; numbers = A.asList(3,4,2,5,1)&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt; print numbers&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;[3, 4, 2, 5, 1]&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt; from java.util import Collections as C&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt; C.sort(numbers)&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt; print numbers&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;[1, 2, 3, 4, 5]&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
In general python has linux orientation and code quality is much better than corresponding java code because of the people involved. Its favorite with sys admins and scientist community. Lot many awesome libraries exist in python compared to any other language, Its a great glue language i.e. the performance intensive stuff can easily moved to native (C++) and python has the best interface mechanism to include. As I was listening to&amp;nbsp;&lt;a href=&quot;http://web.mit.edu/jesstess/&quot; target=&quot;_blank&quot;&gt;Jessica&lt;/a&gt;, a great Python evangelist&amp;nbsp;on &lt;a href=&quot;https://www.youtube.com/watch?v=d1a4Jbjc-vU&quot; target=&quot;_blank&quot;&gt;python future&lt;/a&gt; - the focus is to get python working equally well in &quot;&lt;b&gt;windows&quot;&amp;nbsp;&lt;/b&gt;and &quot;&lt;b&gt;mobile&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
Language semantics&lt;br /&gt;
-------------------------&lt;br /&gt;
In Java, all variable names (along with their types) must be explicitly declared. Attempting to assign an object of the wrong type to a variable name triggers a type exception.That’s what it means to say that Java is a statically typed language. In java you have to declare variables with their type and use &#39;{&#39; &#39;} for scope. Python does not explicitly type parameters (python 3 allows notation optionally) and apparently google moving their legacy to python 3 mainly because of types. If we see carefully, type checking is actually winning, people are dying to type. &quot;You don&#39;t have to type&quot; is not really a cool thing.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
In Python if a name is assigned to an object of one type, it may later be assigned to an object of a different type. That’s what it means to say that Python is a dynamically typed language.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In Java there are access specifier (private, public, protected) for encapsulation, but there is &amp;nbsp;nothing like in python but follows a convention with &#39;_&#39; for making developers to stay away from using it.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Because of private variables there are lot of get/set verbose code for all fields in a class. Python solves this problem pretty well making it develop on demand basis (get_attr). But sealing of fields/methods with &#39;final&#39; serves a great tool to communicate design.&lt;/div&gt;
&lt;div&gt;
In java getters/setters are required because public field don&#39;t give opportunity to go back and change. To be fair to have there is builder patterns and libraries like &lt;a href=&quot;https://projectlombok.org/&quot; target=&quot;_blank&quot;&gt;lombak&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;http://immutables.github.io/&quot; target=&quot;_blank&quot;&gt;immutables&lt;/a&gt; that makes it type safe and faster to implement as well.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Java uses method overloading heavily, Python does not have overloading of method names, with default values its not necessary for python.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In java there is support for &#39;switch&#39; statement its a great replacement for huge if/else or the dictionary in python to declare and work with multiple alternate flows.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
-------------------------------------&lt;/div&gt;
Basic Data structures and usage&lt;br /&gt;
--------------------------------------&lt;br /&gt;
&lt;br /&gt;
Some of the basic data types in Python are numbers, strings and collections. The collections are natively supported and hence makes to breeze to work with them.&lt;br /&gt;
Java has huge eco system for designing java collections (Interface, Class and Abstract class) &amp;nbsp;and separate set of classes to support primitives.(long,int,double ...).&lt;br /&gt;
&lt;br /&gt;
List&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; color: #313131; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 12px; line-height: 16px; margin-bottom: 10px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;numbers = [1, 2, 3, 4, 5 ]&lt;/pre&gt;
ArrayList is usually replacement for mutable lists&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; color: #313131; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 12px; line-height: 16px; margin-bottom: 10px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;List&lt;integer&gt; numbers = new ArrayList() {{ add(1);add(2);add(3);add(4);add(5); }}&lt;/integer&gt;&lt;/pre&gt;
&lt;br /&gt;
Immutable List&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; color: #313131; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 12px; line-height: 16px; margin-bottom: 10px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;tuple = (1, 2, 3, 4, 5 )&lt;/pre&gt;
There is no equivalent of of tuple but there are immutable list implementation like&lt;br /&gt;
Arrays.asList() or Collections.unmodifiableList(), mutating is stopped at runtime.&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; color: #313131; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 12px; line-height: 16px; margin-bottom: 10px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;List&lt;integer&gt; tuple = asList(1, 2, 3, 4, 5);&lt;/integer&gt;&lt;/pre&gt;
&lt;br /&gt;
Map&lt;br /&gt;
called as dictionary&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; color: #313131; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 12px; line-height: 16px; margin-bottom: 10px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;numberToText = { 1:&quot;one&quot;,  2:&quot;two&quot;, 3:&quot;three&quot; } &lt;/pre&gt;
HashMap is the equivalent to the dict jack of all trades.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; color: #313131; font-family: Menlo, Monaco, Consolas, &#39;Courier New&#39;, monospace; font-size: 12px; line-height: 16px; margin-bottom: 10px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;Map&lt;integer tring=&quot;&quot;&gt; numberToText = new HashMap&amp;lt;&amp;gt; {{ put(1 :&quot;one&quot;); put(2:&quot;two&quot;);put(3:&quot;three&quot;); }}&lt;/integer&gt;&lt;/pre&gt;
&lt;br /&gt;
Similarly set() translates to HashSet&amp;lt;&amp;gt;()&lt;br /&gt;
&lt;br /&gt;
&quot;Java has huge of set of data structure classes in JDK and other external libraries dealing with concurrency and performance probably unmatched compared to any language including python&quot;&lt;br /&gt;
&lt;br /&gt;
But dealing with map (dictionary) could be single most important feature missed by python developers. Probably most important and used dictionary python makes it breeze but definitely java makes it very painful.&lt;br /&gt;
&lt;br /&gt;
String&lt;br /&gt;
Like in Python, strings are immutable in java. In python String values can be wrapped in either single or double quotes. To differentiate between vanilla ASCII strings and Unicode strings, Python uses the u prefix to denote the latter.&lt;br /&gt;
&lt;python 3=&quot;&quot; always=&quot;&quot; be=&quot;&quot; has=&quot;&quot; in=&quot;&quot; it=&quot;&quot; java=&quot;&quot; nbsp=&quot;&quot; p=&quot;&quot; quotes.=&quot;&quot;&gt;&lt;br /&gt;&lt;/python&gt;
&lt;python 3=&quot;&quot; always=&quot;&quot; be=&quot;&quot; has=&quot;&quot; in=&quot;&quot; it=&quot;&quot; java=&quot;&quot; nbsp=&quot;&quot; p=&quot;&quot; quotes.=&quot;&quot;&gt;Multiline strings will be greatly missed by python programmers in java. Its painful and ugly to define large strings in java.&lt;br /&gt;
&lt;br /&gt;
Here are the list of features that are missing in java (or how they could be acheived in java)&lt;br /&gt;
&lt;br /&gt;
------------------------&lt;br /&gt;
comprehension (List ...)&lt;br /&gt;
------------------------&lt;/python&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; numbers = [1,2,3,4,5]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; print numbers&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;1, 2, 3, 4, 5]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; even_numbers = [n for n in numbers if n%2==0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; print even_numbers&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #cccccc;&quot;&gt;[2, 4]&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;python 3=&quot;&quot; always=&quot;&quot; be=&quot;&quot; has=&quot;&quot; in=&quot;&quot; it=&quot;&quot; java=&quot;&quot; nbsp=&quot;&quot; p=&quot;&quot; quotes.=&quot;&quot;&gt;&lt;/python&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
We could divide above into following blocs.&lt;br /&gt;
&lt;br /&gt;
|final_data| &amp;nbsp;= [|conversion| &amp;nbsp; |enumeration| &amp;nbsp; |predicates| ]&lt;br /&gt;
Java don&#39;t have anything like native list comprehension this but with lambdas comes close with one liner, but no-where near its python counter part.&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/pmanvi/3b211bf2377cfbd39b0b.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint notranslate&quot; style=&quot;background-color: #eeeeee; border-radius: 0px; border: 1px solid rgb(214, 214, 214); box-sizing: border-box; margin-bottom: 10px; overflow: auto; padding: 5px; width: 604px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;[TODOs]&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 12pt;&quot;&gt;&lt;/pre&gt;
--------------------------------------------------&lt;br /&gt;
Returning multiple values from a function&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
------------------------------------------------&lt;br /&gt;
sequential substitution of actual/formal parameters&lt;br /&gt;
-------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
Defining functions inside a function&lt;br /&gt;
-------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------&lt;br /&gt;
@staticmethod, @classmethod, decorator&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-----------------------&lt;br /&gt;
Meta programming&lt;br /&gt;
------------------------&lt;br /&gt;
&lt;br /&gt;
-------------&lt;br /&gt;
Generators&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
https://dzone.com/storage/assets/4018-rc193-010d-python_2.pdf&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;oracle has comprehensive documentation available compared to any
language.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;&lt;a href=&quot;http://docs.oracle.com/javase/8/&quot;&gt;http://docs.oracle.com/javase/8/&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;http://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;&lt;a href=&quot;http://docs.oracle.com/javase/tutorial/tutorialLearningPaths.html&quot;&gt;http://docs.oracle.com/javase/tutorial/tutorialLearningPaths.html&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;Java collections overview:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #1f497d; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;&lt;a href=&quot;http://docs.oracle.com/javase/8/docs/technotes/guides/collections/overview.html&quot;&gt;http://docs.oracle.com/javase/8/docs/technotes/guides/collections/overview.html&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/2469995781867042718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/2469995781867042718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/2469995781867042718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/2469995781867042718'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2015/08/java-8-for-python-developers-series-1.html' title='Java-8 For Python Developers'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-6665593516125765971</id><published>2014-10-12T11:52:00.000-07:00</published><updated>2014-10-25T06:29:46.727-07:00</updated><title type='text'>Elastic search experimentation with enron emails.</title><content type='html'>ES (&lt;a href=&quot;http://www.elasticsearch.org/&quot; target=&quot;_blank&quot;&gt;Elasticsearch)&amp;nbsp;&lt;/a&gt;is&amp;nbsp;distributed, real-time search and analytics engine. I have been using this product from more than 18 months. It is a de-facto distributed search solution built on lucene. Its fast and easy to develop.&lt;br /&gt;
Features could be broadly classified as&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Full text search, search by words with boolean operators (Ex: (java OR techonlogy) AND (bangalore OR hyderbad)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Easy to build filters, facets, &amp;amp; aggregations&lt;/li&gt;
&lt;li&gt;Fast response times with large data volume (usually measured in millis)&lt;/li&gt;
&lt;li&gt;Ability to make geo-localized searches &amp;amp; configurable robust ranking system&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Its a incredible tool for collecting analytic information &amp;amp; possibly with my experience easiest to build&lt;br /&gt;
&lt;br /&gt;
Once we got convinced ourselves that ES is best option for given use case, usually product managers/analysts come up with questions like &quot;tell me what is the node/RAM/Disk requirement for indexing (say 1TB) data?&quot; &amp;amp; &quot;what&#39;s the indexing strategy to use?&quot; (like index schema, index sharding that could be time based OR data based etc...). Unfortunately there is no immediate correct answer, there are lots of &amp;nbsp;data points &amp;amp; query characteristics needs to be collected before we even try to attempt to answer questions although people asking these questions are usually uncomfortable to wait and lengthy answers.&lt;br /&gt;
Here are few guide-lines for asking questions before trying to come up with answer.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;required indexing rate (acceptable/desirable limits)&lt;/li&gt;
&lt;li&gt;total # of docs with payload characterstics&lt;/li&gt;
&lt;li&gt;latency requirements for searches (well, its for types of searches)&lt;/li&gt;
&lt;li&gt;Full text search requirements (Highlight, analyzers, internationalization)&lt;/li&gt;
&lt;li&gt;Indexing schema requirements (Is there any join requirement with nested elements)&lt;/li&gt;
&lt;li&gt;Indexing schema metadata requirements (especially for date ones &amp;amp; the precision requirements)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Although internet literature claims ES scaling to insane numbers, Its all contextual (nature of data) and situational (nature of hardware), there is no option but to do experiment with real required data and assert the claim and quantifying hardware/software requirements as suggested by the creator ES&amp;nbsp;&lt;a href=&quot;https://twitter.com/kimchy&quot; target=&quot;_blank&quot;&gt;Shay Banon&lt;/a&gt;.&lt;br /&gt;
There are too many indexing options and fine tune parameters for the ES. The exercises like below should help to find holy grail combination of ES fine tune parameters for the given use case.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here is an effort OR sample guidelines that could be used to carry out such experiments. Usually&amp;nbsp;the approach to create data using random values has the disadvantage that data it will have less/more unique content tailored that&#39;s not intended for the domain may not give desired results &amp;amp; worse it could be misleading. Lucene is mainly used mainly for full text search and stores the data in reverse fashion i.e. terms to docs. Here the nature of terms plays very important role in deciding the index size and query latency. In lucene as term will be stored once per field, searches work by locating terms and finding documents associated with those.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There is set of free &lt;a href=&quot;http://large%20corpus%20of%20data/&quot; target=&quot;_blank&quot;&gt;large corpus of data &lt;/a&gt;&amp;nbsp;available that could be used. Here I have picked enron email data as they are pretty decent in numbers given that mostly we restrict the index size to these numbers, making it easy to extrapolate the numbers as ES indexes are sharded to scale horizontally. Its also nice to do experiment with ES features with this publicly available mass collections of &quot;real&quot; emails and is not bound by privacy and legal restrictions.&lt;/div&gt;
&lt;div&gt;
Although I wrote all my framework code to deal with ES in java (making use&lt;a href=&quot;https://github.com/spring-projects/spring-data-elasticsearch&quot; target=&quot;_blank&quot;&gt; spring data elasticsearch&lt;/a&gt; wrapper), I used python for the current exercise. Its awesome for running deploy tool-chain (pants), data processing pipelines and other offline systems. Now its my de-facto scripting language replacing groovy. Its easy to share as its concise and reader friendly language.&lt;br /&gt;
&lt;br /&gt;
Before the approach &amp;amp; the code, here are some highlights &amp;amp; observations about this data.&lt;br /&gt;
&lt;br /&gt;
1. If we enable the source (which is required highlighting feature) while indexing the storage cost increases by 76%&lt;br /&gt;
http://localhost:9200/_cat/indices&lt;br /&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;enron-email_without_source&lt;/span&gt;   &lt;span style=&quot;background-color: yellow;&quot;&gt;746.5mb&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;enron-email &lt;/span&gt;                             &lt;span style=&quot;background-color: orange;&quot;&gt;1.2gb &lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;
It was observed that there was no change search latency with storing source.&lt;br /&gt;
&lt;br /&gt;
Although general assumption that lucene index size 20-30% of actual content may not be correct, as it depends on the indexing field. Even if I used better compression its unlikely to change the final figure drastically here. Its ~50% here. (considering source is not enabled).&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjePz5yvk-WAwamAWBC5m1kTkVYzVUhTpZsPZXiAvWxn3swzsVk_ks3cnX1r0E-yjqz8OWaPJ2v_TeE2BHNAf466DObalzCz27Xyw9mD2M2QFp9NW6OpKlGEVp8k2nDw_aZNqb5LA/s1600/physical_size_enron_emails.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjePz5yvk-WAwamAWBC5m1kTkVYzVUhTpZsPZXiAvWxn3swzsVk_ks3cnX1r0E-yjqz8OWaPJ2v_TeE2BHNAf466DObalzCz27Xyw9mD2M2QFp9NW6OpKlGEVp8k2nDw_aZNqb5LA/s1600/physical_size_enron_emails.png&quot; height=&quot;151&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Payload size distribution, Its important to match the use-case on how the real domain are getting pumped into ES.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfAbFzAJVPGqFj9WkxPbVZRu9VZQNJwyF7Ep4d2eDSWxzgXVH9hdNGDtnNat563iVzlFB6117_bRm42uERXhPORrilgHmsEZIfDR6tQrRW6sGVEQXT6WTlhZ789rl__fXOrQRLzg/s1600/enron-payload-size.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfAbFzAJVPGqFj9WkxPbVZRu9VZQNJwyF7Ep4d2eDSWxzgXVH9hdNGDtnNat563iVzlFB6117_bRm42uERXhPORrilgHmsEZIfDR6tQrRW6sGVEQXT6WTlhZ789rl__fXOrQRLzg/s1600/enron-payload-size.png&quot; height=&quot;192&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Here are again ES aggregation feature comes handy for finding out the payload size distribution.&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 198px;&quot;&gt;
 &lt;colgroup&gt;&lt;col span=&quot;2&quot; style=&quot;mso-width-alt: 3620; mso-width-source: userset; width: 74pt;&quot; width=&quot;99&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt; width: 74pt;&quot; width=&quot;99&quot;&gt;Payload range&amp;nbsp;&lt;/td&gt;
  &lt;td style=&quot;width: 74pt;&quot; width=&quot;99&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Count&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;0KB to 1KB&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;124181&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;1KB to 5KB&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;237870&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;5KB to 10 KB&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;42331&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;10K to 1MB&lt;/td&gt;
  &lt;td align=&quot;right&quot;&gt;303&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can find the awesome ES aggregation used &lt;a href=&quot;https://gist.github.com/5ba0d467061ac0b0a3af.git&quot; target=&quot;_blank&quot;&gt;here &lt;/a&gt;to extract this information. I introduced a size field to capture the size of each document &amp;amp; above is the result. I guess this is most killer feature in ES for building data analytics applications.&lt;br /&gt;
&lt;br /&gt;
3. There were totally&amp;nbsp;66043 &#39;to&#39; unique addresses &amp;amp;&amp;nbsp;21021 unique &#39;from&#39; addresses. Enron mails were extracted by email in-boxes (with complete folder structure) of 148 employees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Transform the raw enron data into JSON and push into ES.&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
ES works with JSON &amp;amp; raw data needs to be transformed into ES. &lt;a href=&quot;https://www.cs.cmu.edu/~./enron/&quot; target=&quot;_blank&quot;&gt;Download &lt;/a&gt;the data &amp;amp; extract the content into a directory.&lt;/div&gt;
&lt;div&gt;
Here is the &lt;a href=&quot;https://gist.github.com/14690c14cf3498da59c6.git&quot; target=&quot;_blank&quot;&gt;python script &lt;/a&gt;used to create in windows machine. The script expects a firs parent directory where enron mails have been extracted &amp;amp; recursively parses the emails in EML format and index into ES. It also creates a fresh index (deleting previous one if exists) making it easy to test with experiments.&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/pmanvi/14690c14cf3498da59c6.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;Search and test the generated data.&lt;/u&gt;&lt;br /&gt;
Here is &lt;a href=&quot;https://gist.github.com/b34a1d69b21326b50878.git&quot; target=&quot;_blank&quot;&gt;python script&lt;/a&gt; shows how the we can do search and other powerful analytics feature like aggregations&amp;nbsp;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/pmanvi/b34a1d69b21326b50878.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Although I quashed the idea of using ES (storing the content along with index) as primary storage rather than secondary storage in the beginning itself, now I do think its worth re-vising again with the availability of&amp;nbsp;&lt;a href=&quot;http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-snapshots.html&quot; target=&quot;_blank&quot;&gt;snapshot&amp;nbsp;&lt;/a&gt;feature.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hope this helps some one trying out newly with ES.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/6665593516125765971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/6665593516125765971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/6665593516125765971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/6665593516125765971'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2014/10/elastic-search-experimentation-with.html' title='Elastic search experimentation with enron emails.'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjePz5yvk-WAwamAWBC5m1kTkVYzVUhTpZsPZXiAvWxn3swzsVk_ks3cnX1r0E-yjqz8OWaPJ2v_TeE2BHNAf466DObalzCz27Xyw9mD2M2QFp9NW6OpKlGEVp8k2nDw_aZNqb5LA/s72-c/physical_size_enron_emails.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7857599625915310660</id><published>2014-07-13T07:32:00.000-07:00</published><updated>2014-08-10T23:24:10.859-07:00</updated><title type='text'>About my current server side software stack</title><content type='html'>Here are my thoughts on working with NoSQL technologies from past more than a year while building a platform in archival/e-discovery space where the cost of data storage matters a lot. Clearly its very difficult claim to be expert on every possible technology trend especially in NoSQL where technology/usecase over-lap to solve a problem domain &amp;amp; its not easy to pick one against other. There is also a cost of maintaining multiple data sources (code base &amp;amp; relationship). Here I am documenting overview of technologies that we picked and plan to document all the major issues and best parts separately for each of the stack in the next set of write ups that can help developers to make informed technical decisions especially with my favorites &quot;Elasticsearch&quot;,&quot;Hazelcast&quot; with spring data wrapper libraries.&lt;br /&gt;
&lt;br /&gt;
I guess the paradigm shift is &quot;Think about the queries(business), horizontal scaling &amp;amp; work backwards.&quot; rather than data first approach (storage, integrity) and make queries to work on the model. Data storage is driven by query usage patterns (or functional requirements) and cost of building and maintaining it. The latency and storage costs have moved from non-functional to basic functional requirements, distributed computing has become basic necessity and not the luxury. In NoSQL context also data is still the king but he is at the mercy of query access patterns and the storage cost.By end of the day most of the time software is all about storing &amp;amp; retrieving the useful data in cost effective way. Performance/transaction should not be the reason to abandon RDBMS, but distribution of data (because of scale) and ease of development are the reasons. Shortening development cycle, lowering costs and enabling new ideas should be goal for any technology professional &amp;amp; non-relational data store mechanisms increasingly fit the bill.&lt;br /&gt;
&lt;br /&gt;
There is no single silver bullet for data storage requirements (for anything for that matter) that servers any serious project, it has to be polygot persistence &amp;amp; the trend looks to be ir-reversible.The important here is that each of them provide their scalability &amp;amp; performance by offering a limited data model. They compromise one of the feature of the CAP (Consistency, Availability, Partition). Although everyone claims to do almost anything. You name feature, the evangelists from NoSQLs comes with post saying &quot;Look ma! I can also do this&quot;, but its important for us to make informed decisions after doing POCs making sure that these are not stretching themselves too much to achieve the goal (latency, storage efficiency). It was key to pick the storage nodes &amp;amp; technology behind them considering their sweet spots &amp;amp; after evaluating with their counterparts.&lt;br /&gt;
&lt;br /&gt;
Based on use cases we made following decisions.&lt;br /&gt;
Search from key - Document Search (&lt;span style=&quot;background-color: yellow;&quot;&gt;MongoDB&lt;/span&gt;) Serves most of the RDMS requirements. Ex: Blog&lt;br /&gt;
Search the term or value - Full Text Search (&lt;span style=&quot;background-color: lime;&quot;&gt;ElasticSearch&lt;/span&gt;) serves the ability look for text and then the document. Ex: conversations, documents.&lt;br /&gt;
Search and store by order - Column Family (&lt;span style=&quot;background-color: lime;&quot;&gt;Cassandra&lt;/span&gt;) serves the ability to constant write for data associated usually with time series Ex: twitter&lt;br /&gt;
Search for large binary objects one at a time- Object store provided by cloud vendors, &lt;span style=&quot;background-color: yellow;&quot;&gt;ceph&lt;/span&gt;&lt;br /&gt;
Search/process for results in millis - In memory data grid solution (&lt;span style=&quot;background-color: yellow;&quot;&gt;Hazelcast&lt;/span&gt;)&lt;br /&gt;
Although all are scalable solutions cassandra stands out the best in linear scalability offering both in read (for range based queries) and writes efficiency ir-respective data size as column family keeps the columns that fit together &amp;amp; work with append only mode making writes faster than reads &amp;amp; doesn&#39;t depend on the current size of the data.&lt;br /&gt;
Future plan is to use graphs.&lt;br /&gt;
Search by relationship - Graph DB (&lt;span style=&quot;background-color: cyan;&quot;&gt;Neo4J&lt;/span&gt;) Users and their relationship Ex: social graph&lt;br /&gt;
&lt;br /&gt;
Although there numerous links suggesting selection criteria, I found following links interesting.&lt;br /&gt;
&lt;a href=&quot;http://highscalability.com/blog/2011/6/20/35-use-cases-for-choosing-your-next-nosql-database.html&quot; target=&quot;_blank&quot;&gt;http://blog.nahurst.com/visual-guide-to-nosql-systems &lt;/a&gt;- explains following CAP theory &amp;amp; what you will be giving up among three (Consistency, Availability &amp;amp; Partition aware) with most prominent solutions in this space.&lt;br /&gt;
&lt;a href=&quot;http://highscalability.com/blog/2011/6/20/35-use-cases-for-choosing-your-next-nosql-database.html&quot;&gt;http://highscalability.com/blog/2011/6/20/35-use-cases-for-choosing-your-next-nosql-database.html&lt;/a&gt;&amp;nbsp;- &amp;nbsp;Documenting use cases&lt;br /&gt;
&lt;a href=&quot;http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis&quot;&gt;http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis&lt;/a&gt;&amp;nbsp;- Easy to follow well documented introductions.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://incubator.apache.org/kafka/&quot; target=&quot;_blank&quot;&gt;KAFKA&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
A distributed pub-sub messaging system designed for throughput. It is maintained/used in LinkedIn &amp;amp; more importantly written in scala which is my favorite language these days. Kafka is log centric, ordered, im-mutable and sequence based (offset). It is replication/persistence by default. It concentrates durable, scalable message storage system &amp;amp; does pretty well.&lt;br /&gt;
As author defines it as &quot;kafka is a system that supports long retention of ordered data&quot; - mainly used for pipeline pushing data to the system that&#39;s re-playable.&lt;br /&gt;
&lt;br /&gt;
Buzzwords:&lt;br /&gt;
topic - category of data.&lt;br /&gt;
partition - log of records (data maintained for duration, week, month ...)&lt;br /&gt;
log sequence number (offset) - acts as state of system.&lt;br /&gt;
consumer/producer - for pulling and pushing the messages.&lt;br /&gt;
&lt;br /&gt;
Biggest success story:&lt;br /&gt;
LinkedIn claims of processing 175 TB of in-flight data with ~1.5 ms latency of 7 million writes and 35 million reads/second. This is what I heard from &amp;nbsp;kafka author himself when I recently listened to a webinar hosted from orielly publishers.&lt;br /&gt;
&lt;br /&gt;
Uses:&lt;br /&gt;
Zookeeper&lt;br /&gt;
&lt;br /&gt;
Issues:&lt;br /&gt;
No easy way to trap re-balancing events. Scala code is difficult with work especially with existing java code.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://storm.incubator.apache.org/&quot; target=&quot;_blank&quot;&gt;STORM&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Storm is like a pipeline where you push individual events and then get processed in a distributed fashion, it makes it easy to process massive streams of data in a scalable way, and provides mechanisms for doing things like guaranteeing that the data will be processed.&lt;br /&gt;
&lt;br /&gt;
there is always some kind of confusion its relationship with hadoop, storm creator clearly says they are complimentory &amp;amp; comes up with following thumb rule while adopting,&lt;br /&gt;
&quot;Any time you need to look at data historically(already saved) , use batch processing (i.e. Hadoop) as its cheap &amp;amp; scalable, whenever you need to look at all the data once, then anything you do as it comes in in real time, use Storm for that.&quot;&lt;br /&gt;
&lt;br /&gt;
The ability of storm to run multiple copies of a bolt’s/spout’s code can be run in parallel (depending on the parallelism setting) is the crux of the solution and helps to scale to insane numbers by taking care of cluster communication, fault-tolerant fail-over, scalable &amp;amp; durable messaging with order and distributing topologies across cluster nodes. Each worker could be assigned process, memory &amp;amp; threads(tasks) depending on their requirement making ideal for any growing company for horizontal scale requirement.&lt;br /&gt;
&lt;br /&gt;
Buzzwords:&lt;br /&gt;
Spout - is a source of streams in a topology making it a starting point.&lt;br /&gt;
Bolts - any piece of code, which does arbitrary processing on the incoming tuples&lt;br /&gt;
tuple - basic unit of data that gets emited in each step&lt;br /&gt;
topology - layout of the communication which is static and defined upfront, deployable workflow manager that ties spout and bolts together. It can also be described as a graph consisting of spouts (which produce tuples) and bolts (which transform tuples).&lt;br /&gt;
Nimbus - similar to hadoop job tracker, service that tracks all the workers executing the bolt.&lt;br /&gt;
supervisor - worker (collection of executors)&lt;br /&gt;
&lt;br /&gt;
Spouts are designed and intended to poll, we can&#39;t push to them. So we have kafka to keep the messages and spout is consumer triggering the indexing process.&lt;br /&gt;
&lt;br /&gt;
Built on:&lt;br /&gt;
LMAX Disruptor : intra-worker communication in Storm (inter-thread on the same Storm node)&lt;br /&gt;
ZeroMQ or Netty: Inter-worker communication (node-to-node across the network)&lt;br /&gt;
Zookeeper: cluster management of Storm &amp;nbsp;(automatic fail-over, automatic balancing of workers across the cluster)&lt;br /&gt;
&lt;br /&gt;
Biggest success story:&lt;br /&gt;
Twitter claims to index four hundred million tweets within 50 milliseconds with the help of storm.&lt;br /&gt;
&lt;br /&gt;
The issues:&lt;br /&gt;
Inter-topology communication: nothing built into Storm. (we used kafka). The UI isn;t mature. Storm is not well suited to handle OOM kind of errors. Its tough to manage the state across the bolts. (errors, progress)&lt;br /&gt;
&lt;br /&gt;
Samza &amp;amp; Spark are also tries to solve similar kind of problems that storm is trying to solve. Here are some notes in comparison with spark which apparently is doing great &amp;amp; looks to be has the largest momentum.&lt;br /&gt;
&lt;br /&gt;
Storm Vs Spark&lt;br /&gt;
Both frameworks are used to parallelize computations of massive amount of data.With Storm, you move data to code. With Spark , you move code to data (Data parallelism). Spark is based on the idea that, when the existing data volume is huge, it is cheaper to move the process to the data (similar to Hadoop map/reduce, except memory storage is aggressively used to avoid I/Os which makes it efficient for iterative algorithms)&lt;br /&gt;
However, Storm is good at dynamically processing numerous generated/collected small data items (such as calculating some aggregation function or analytics in real time on a Twitter stream) also called task parallelism. Spark applies on a corpus of existing data (like Hadoop) which has been imported into the Spark cluster, provides fast scanning capabilities due to in-memory management, and minimizes the global number of I/Os for iterative algorithms.&lt;br /&gt;
Storm is like a pipeline where you push individual events in which then get processed in a distributed fashion.&lt;br /&gt;
Instead, Spark follows a model where events are collected and then processed at short time intervals (few seconds) in a batch manner.&lt;br /&gt;
&lt;div&gt;
Spark’s approach to fault tolerance is that instead of persisting or checkpointing intermediate results, Spark remembers the sequence of operations which led to a certain data set. So when a node fails, Spark reconstructs the data set based on the stored information&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://logstash.net/&quot; target=&quot;_blank&quot;&gt;LOGSTASH&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
provides centralized logging server that listens for connections from Java application servers, accepting streams of logs when they connect &amp;amp; it filters, modifies, and routes those streams to the appropriate outputs.Its one of the corner stone product offered from elasticsearch family.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://elasticsearch.org/&quot; target=&quot;_blank&quot;&gt;ELASTICSEARCH&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Distributed (through shards) and Highly Available (through replicas) Search Engine. Its Document oriented, dynamic and provides reliable, asynchronous write Behind for long term persistency with (Near) Real Time Search support.&lt;br /&gt;
&lt;br /&gt;
Buzzwords:&lt;br /&gt;
Shard : a single Lucene instance&lt;br /&gt;
Replica : is a copy of the primary shard for fail over and performance&lt;br /&gt;
Index Type : is like table&lt;br /&gt;
&lt;br /&gt;
Index can be sharded with a configurable number of shards &amp;amp; each shard can have one or more replicas.&lt;br /&gt;
&lt;br /&gt;
Used native java ES APIs instead of HTTP - spring data wrapper&lt;br /&gt;
Increased refresh time to higher number (index.engine.robin.refresh_interval). (default is 1 second)&lt;br /&gt;
Increased the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10%&lt;br /&gt;
Increased the number of dirty operations that trigger automatic flush (so the translog won&#39;t get really big, even though its FS based) by setting index.translog.flush_threshold (default is 5000).&lt;br /&gt;
Increase the memory allocated to elasticsearch node default is 1G&lt;br /&gt;
Decreased replica count (or nothing with 0), and increase it later for HA and search performance. Replicas can be changed @ runtime but not the number of shards.&lt;br /&gt;
Increased the number of machines you have so you get less shards allocated per machine.&lt;br /&gt;
Use scan mode for search while search all results.&lt;br /&gt;
Planning to use SSDs for translog &amp;amp; check the performance.&lt;br /&gt;
&lt;br /&gt;
Lucene (search engine behind elasticsearch) requires these to be in RAM, so we should be paying attention to these &quot;deleted docs&quot;, &quot; norms&quot;, &quot;terms index&quot;, &quot; field cache&quot;, &quot;doc values&quot;&lt;br /&gt;
&amp;nbsp;In lucene as term will be stored once per field, searches work by locating terms and finding documents. So initially size will decrease and will get stabilized after most of the terms are indexed. So don;t worry about initial numbers usually it translates into 20-30% of the content.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://cassandra.apache.org/&quot; target=&quot;_blank&quot;&gt;CASSANDRA&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
column-oriented way of modeling system that is eventually Consistent relies.&lt;br /&gt;
&lt;br /&gt;
Buzzwords:&lt;br /&gt;
Column. The basic element which is a tuple composed of a timestamp, a column name and a column value. The timestamp is set by the client and this has an architectural impact on clients’ clocks synchronization.&lt;br /&gt;
SuperColumn. This structure is a little more complex. You can imagine it as a column in which can store a dynamic list of Columns.&lt;br /&gt;
ColumnFamily: A set of columns,&lt;br /&gt;
KeySpaces: A set of ColumnFamily.&lt;br /&gt;
Row in cassandra sense is a list of Columns or SuperColumns identified by a row key.&lt;br /&gt;
&lt;br /&gt;
Cassandra allows only N (under 3) number of executions to be checked and immediately returns to value. Therefore, write can be conducted successfully even with failures in the replication node, which raises usability. Histories of failed write operations are recorded on a different node, and the operation can be retried at a later date (this is called “hinted handoff”). Since the success of replicated writing is not guaranteed, the data suitability is checked in the reading stage. Generally, if there are multiple replications, it is collected into one when reading. However, Cassandra keeps in mind that not all replications match, and reads the data from all three replications, checks whether it is identical, and restores the latest data if it is not suitable (this is called “read repair”).&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://hazelcast.org/&quot; target=&quot;_blank&quot;&gt;HAZELCAST&lt;/a&gt;&lt;br /&gt;
As compute nodes doing processing, In memory data grid solution is great for building applications that requires real time latency.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.mongodb.org/&quot; target=&quot;_blank&quot;&gt;MONGODB&lt;/a&gt;&lt;br /&gt;
is mmap’d linked lists of BSON documents with B-tree indexing.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.jboss.org/products/fuse/overview/&quot; target=&quot;_blank&quot;&gt;OSGI&lt;/a&gt; - JBoss Fuse&lt;br /&gt;
OSGi can help in managing &quot;ClassNotFoundExceptions&quot; by ensuring that code dependencies are satisfied before allowing the code to execute. It also help with running with multi version jars and hot deployments with life cycle management.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;OSGi verifies that the set of dependencies are consistent with respect to required versions and other constraints.&lt;/li&gt;
&lt;li&gt;Package application as logically independent JAR files and be able to deploy. (gracefully without affecting or managing others)&lt;/li&gt;
&lt;li&gt;Manage new level of code visibility in a bundle(JAR), can make public classes unavailable which is not possible with java access specifier symantics (private, protected,public, package) making deployment/upgradation easy.&lt;/li&gt;
&lt;li&gt;Extensibility mechanism with like plugin (eclipse,netbeans)&lt;/li&gt;
&lt;li&gt;Helps to dynamic service model in your application, where services can be registered and discovered both declaratively and programmatically during execution.&lt;/li&gt;
&lt;li&gt;Shell scripting for JVM to investigate&lt;/li&gt;
&lt;li&gt;JVM footprint for special-purpose installs could be greatly reduced (with positive implications for disk, memory, and security).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Benefits although looks great, but having other systems (containers) sharing the same jars (storm, hazelcast, etc..), I don&#39;t think its worth spending efforts with OSGI.&lt;/li&gt;
&lt;/ul&gt;
Its always better to streamline on library versions and manage them in a consistent manner. Its a nightmare &amp;nbsp;with OSGI containers &amp;amp; we end up solving the jar issues most of the time. I think OSGI is not worth the effort when we have different container with shared jars.&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
http://wiki.apache.org/cassandra/ArticlesAndPresentations&lt;br /&gt;
http://blogs.atlassian.com/2013/09/do-you-know-cassandra/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7857599625915310660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7857599625915310660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7857599625915310660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7857599625915310660'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2014/07/about-my-current-server-side-software.html' title='About my current server side software stack'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-5058125081688012547</id><published>2013-01-17T02:58:00.002-08:00</published><updated>2013-03-06T23:10:59.905-08:00</updated><title type='text'>Faceted Navigation for mobile applications and NoSQL</title><content type='html'>&lt;br /&gt;
Recently I developed a android based application as part of proof of&amp;nbsp;concept&amp;nbsp;initiative. It was search application based on pre-defined static data that will get shipped along with application. Using lucene with android was pretty simple and straight forward. Having working with information retrieval space from past 4 years and having worked with one of best known swing based UI application (&lt;a href=&quot;http://sitebuilder.yahoo.com/&quot;&gt;sitebuilder.yahoo.com&lt;/a&gt;), it did not take time to come up with decent working application. One of the challenge was to move data stored in database to lucene so as to make it full text searchable and build facets. &lt;br /&gt;
There were 2 points that were revelation&amp;nbsp;for me &quot;the power of facet based&amp;nbsp;navigation&amp;nbsp; in building user interface&quot; and &quot;using lucene as data store and viable NoSQL solution&quot; after this exercise.&lt;br /&gt;
&lt;br /&gt;
The interfaces for mobile(or web for that matter) that requires keyword text entry aren&#39;t suited for browsing. Facet based navigation is pretty effective when exact keyword is not known. Amazon is a pioneer in this space &amp;amp; their web site is great example of faceted navigation. Their cross sell and&amp;nbsp;up sell&amp;nbsp;features&amp;nbsp;directly rely on faceting.Keyword entry is tedious,using hierarchical faceted metadata for content selection results in awesome experience especially for mobile application. With ever increasing power and storage power of mobile devices (or desktop client for that matter), we should effectively use them to give better user experience. Let&#39;s say if some-one looking for job with key words such &quot;java architect technologist&quot;, giving auto completion with total results (like java(200), architect(10) location(20)...) improves the over-all searching experience better. We should actively look into our existing web/mobile applications where faceting can be effectively utilized.&lt;br /&gt;
&lt;br /&gt;
Lucene makes creating a facets a breeze.&amp;nbsp;&lt;a href=&quot;http://lucene.apache.org/core/4_0_0/facet/org/apache/lucene/facet/taxonomy/TaxonomyWriter.html&quot; target=&quot;_blank&quot;&gt;TaxonomyWriter&amp;nbsp;&lt;/a&gt;&amp;amp; &lt;a href=&quot;http://lucene.apache.org/core/4_0_0/facet/org/apache/lucene/facet/taxonomy/TaxonomyReader.html&quot; target=&quot;_blank&quot;&gt;TaxonomyReader &lt;/a&gt;classes are well designed that helps to build categories/dictionaries easily. All the existing applications can be&amp;nbsp;re factored&amp;nbsp;to make use this feature rather than using groupby SQL queries. Its is also pretty straight forward to extract&amp;nbsp;categories&amp;nbsp;from full text and not column oriented.&lt;br /&gt;
Developing a android application is a tedious job. Since all the java APIs aren&#39;t supported its painful exercise to migrate &amp;amp; also its really greatly time-consuming to debug the android application with simulator although we can appreciate the effort from eclipse plugin team. I used groovy swing builders to develop quick mock up before doing it with Android. I love JVM scripting languages for that.One of the main reason to learn these although we may not use it in our daily jobs is the ability to come up with &lt;a href=&quot;http://www.paulgraham.com/avg.html&quot; target=&quot;_blank&quot;&gt;quick working &lt;/a&gt;prototypes.&amp;nbsp;Here is the &lt;a href=&quot;https://gist.github.com/bedd1fdc88879b4c7794&quot; target=&quot;_blank&quot;&gt;script &lt;/a&gt;that I created in Groovy, it prints the violations in the code that from each package level. It would be easier to build such things in GWT as well. So we can refactor all these upfront.&lt;br /&gt;
The problem that got solved with the application was storing the data &amp;amp; query any information using the lucene (Both with API and lucene syntax) in sub-second. It can deal with huge data &amp;amp; schema-less, the main&amp;nbsp;characteristics&amp;nbsp;of NoSQL. Although lucene is not generally counted as one of the NoSQL solution, it actually is.&lt;br /&gt;
When some one asks to me about NoSQL, I can safely tell I have used one :) and buzzword compliant. But this is a much bigger issue, recently I was hearing session from Martin Fowler where he argued very well for the need to both forms of data storage, SQL and NoSQL types &amp;amp; used the term &quot;&lt;a href=&quot;http://martinfowler.com/bliki/PolyglotPersistence.html&quot; target=&quot;_blank&quot;&gt;Polygot Persistence&lt;/a&gt;&quot;. The challenge for technologists is to identify the best&amp;nbsp;contextually&amp;nbsp;applicable use cases.&lt;br /&gt;
I started looking more into subject more &amp;amp; here are my notes. Although I am not in position to strongly&amp;nbsp;recommend&amp;nbsp;one over the other,&amp;nbsp;definitely&amp;nbsp;readers will appreciate the (NoSQL against SQL)value they bring in to the table and can make&amp;nbsp;technically&amp;nbsp;informed decision.&lt;br /&gt;
&lt;br /&gt;
Schemalessness is one of the main reasons for interest in NoSQL databases - But we can generate schema-less design in relational database as well. There is a masterpiece&amp;nbsp;&lt;a href=&quot;http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:10678084117056&quot; target=&quot;_blank&quot;&gt;discussion from asktom where&lt;/a&gt; &quot;Generic Data Models&quot; with dynamic capabilities have been regarded as anti-pattern defeating strong-typeness and query performance of relational database. I completely agree with that sentiment. These are types of cases, we should generally looking for Non SQL solution.&lt;br /&gt;
&lt;br /&gt;
Generally, the data is significantly more important than the applications which use it - content is the king. The main reason is data outlives the applications that create it, the applications that use the data usually change over time. The schema and strong typeness is very important and in the long run will help the organization. We should be doubly&amp;nbsp;cautious&amp;nbsp;before deciding to put the data in non-SQL based storage &amp;amp; SQL is a safe option from&amp;nbsp;manageability&amp;nbsp;and staffing perspective for utility projects.&lt;br /&gt;
After all &amp;nbsp;-&amp;nbsp;&quot;Misuse is the greatest cause of FAILURE &amp;amp;&amp;nbsp;we need to understand the merits/demerits &amp;nbsp;before dismissing it.&lt;br /&gt;
&lt;br /&gt;
High performance from NoSQL is not free, it comes with cost (high-performance&amp;nbsp;look-ups&amp;nbsp; at the cost of no or no easy support of relational queries through &quot;joins&quot;&amp;nbsp;and reliability &amp;nbsp;through &quot;transactions&quot;, &quot;consistency&quot;,&amp;nbsp;referential&amp;nbsp;integrity) that are&amp;nbsp;inherently&amp;nbsp;addressed/provided by SQL products. NoSQL solutions needs to bend too much to match with RDBMS.&lt;br /&gt;
&lt;div&gt;
When data no longer fits on a single RDBMS server or when a single machine can no longer handle the query load, some strategy for storing/sharding and replication is required. Doing with RDBMS (rows and columns with index) is not easy and viable from cost and scalability requirements.&amp;nbsp;The primary reason to integrate in-memory-based solutions with a NoSQL DB is to reduce the cost per GB of data.&amp;nbsp;The need of systems that can run across multiple machines is going to be an absolute requirement &amp;amp; NoSQL shines over there.&lt;/div&gt;
&lt;br /&gt;
Here is quick overview of options that we have.&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u&gt;Key-Value Stores &amp;nbsp;&lt;/u&gt;&lt;br /&gt;
USP&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;- Caches/Simple domain with fast read access&lt;br /&gt;
Use case &amp;nbsp; - Massively concurrent systems&lt;br /&gt;
Examples &amp;nbsp;- Redis/Memcached/Tokyo Cabinet/Coherence&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Column-Family Stores&lt;/u&gt;&lt;br /&gt;
USP&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;- Write on a big scale for reading and writing&lt;br /&gt;
Use case&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Massively concurrent systems&lt;br /&gt;
Examples&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Cassandra/Google BigTable/Apache HBase&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Document-Oriented Databases&lt;/u&gt;&lt;br /&gt;
USP&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;- Contents are documents with changing schema&lt;br /&gt;
Use case&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Dynamic Data Structure&lt;br /&gt;
Examples&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- MongoDB/CouchDB&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Graph Databases&lt;/u&gt;&lt;br /&gt;
USP&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;-&amp;nbsp;&amp;nbsp;interconnected&amp;nbsp;data with nodes and relationship&lt;br /&gt;
Use case&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;- Social Graphs with many to many relationships/Recommendation engines/Access Control Lists&lt;br /&gt;
Examples&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;- Neo4J/AllegroGraph/OrientDB&lt;br /&gt;
&lt;br /&gt;
Ir-respective data source&amp;nbsp;chosen,&amp;nbsp;CAP theory states that it is impossible for a distributed computer system to simultaneously provide all three of the following guarantees &amp;nbsp;Consistency, Availability &amp;amp; Partition tolerance(CAP), Rules change with data and the context, but below rule remains the same to improve the performance.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&quot;Look for opportunity to turn scan into a seek (cache) and use event based concurrency (asynchronous&amp;nbsp;and parallel computation)&quot;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Read Cache with In memory data grid solutions - Coherence, Hazelcast, CDN&lt;/li&gt;
&lt;li&gt;Make computations asynchronus &amp;amp; parallel wherever possible. - JMS, Threads (event based)&lt;/li&gt;
&lt;li&gt;Move computation and not data. - Map Reduce&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Events in efficient machine parseable forms for effecient serialization - protobuff&lt;/li&gt;
&lt;li&gt;Route new data through new partitions&lt;/li&gt;
&lt;li&gt;Avoiding shared mutable state is the secret weapon to winning concurrency battles&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
I got interested in graph database, especially Neo4J and the problem that it tried to solve. Spring Data library samples were interesting. I highly&amp;nbsp;recommend&amp;nbsp;to try out&lt;a href=&quot;http://www.springsource.org/spring-data&quot; target=&quot;_blank&quot;&gt; spring data&lt;/a&gt;, spring source guys are awesome in creating the abstractions making developers life easier as usual.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
here is the extract from &quot;Neo4J in Action&quot; book that explains the use case and technology behind the same.Social graph is being used as sample.&amp;nbsp;Friends&amp;nbsp;with many to many relationships. We can relate easily the&amp;nbsp;differentiation&amp;nbsp;it brings.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;To find all friends on depth 5, MySQL will perform Cartesian product on &#39;t_user_friend&#39; table 5 times, resulting in 50,0005 records, out of which all but 1,000 are discarded. Neo4j,on the other hand, will simply visit nodes in the database, and when there is no more nodes to visit, it will stop the traversal. That is why Neo4j can keep constant performance as long as the number of nodes returned remains the same, opposed to significant degradation in performance when using MySQL queries&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Each join creates a Cartesian product of all potential combinations of rows, and then filters out those that are not matching the where clause. With one million users, the Cartesian product of 5 joins (equivalent of query on depth 5) contains huge number of rows – billion billion billions – way to many zeros to be readable. Filtering out all the records that don’t match the query is too expensive – such that the SQL query on depth 5 never finishes in a reasonable time.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;The secret is in the data structure – the localized nature of graphs makes it very fast for this type of traversals. Imagine yourself cheering your team on the a football stadium. If someone asks you how many people is sitting five meters around you, you will get up and count them. If the stadium is half empty, you will count people around you as fast as you can count. If the stadium is packed, you will still do it in a similar time! Yes, it may be slightly slower, but only because you have to count more people because of the higher density. We can say that, irrespective of how many people are on the stadium, you will be able to count the people around you at predictable speed – as you’re only interested in people near you, you won’t be worried about packed seats on the other end of the stadium for example.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;This is exactly how Neo4j engine works in our example – it counts nodes connected to the starting node, at the predictable speed. Even when the number of nodes in the whole graph increases (given similar node density), the performance can remain predictably fast.&amp;nbsp;&lt;/i&gt;&lt;i&gt;If you apply same football analogy to the relational database queries, we would count all people in the stadium and then remove those that not around us – not the most efficient strategy given the&amp;nbsp;inter connectivity&amp;nbsp;of the data.&quot;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
Here is a pretty neat effort in to explain to support Unit testing NoSQL. A great way to learn as well. &lt;a href=&quot;https://github.com/lordofthejars/nosql-unit#readme&quot;&gt;https://github.com/lordofthejars/nosql-unit#readme&lt;/a&gt;&lt;br /&gt;
Identifying the use case&lt;br /&gt;
&lt;a href=&quot;http://highscalability.com/blog/2011/6/20/35-use-cases-for-choosing-your-next-nosql-database.html&quot;&gt;http://highscalability.com/blog/2011/6/20/35-use-cases-for-choosing-your-next-nosql-database.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/5058125081688012547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/5058125081688012547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/5058125081688012547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/5058125081688012547'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2013/01/faceted-navigation-for-mobile.html' title='Faceted Navigation for mobile applications and NoSQL'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-1697052273433423407</id><published>2012-12-29T09:55:00.000-08:00</published><updated>2013-01-18T01:35:59.125-08:00</updated><title type='text'>Java.next() -&gt; Scala or Groovy?</title><content type='html'>The future is already here—it’s just not evenly distributed. —William Gibson&lt;br /&gt;
&lt;br /&gt;
The Java.next() is going to be Java followed by Groovy and Scala. The dominance of java language is likely to continue but there are more and more use cases that compels us to use other JVM&amp;nbsp;languages (with their functional programming capabilities) for developing newer platforms. Java7&#39;s new features like &quot;Improved Type Inference&quot;,&quot;Multi-catch&quot;,&quot;try-with-resources statement&quot;,&quot;Strings in switch&quot;,&quot;New Garbage First Collector&quot; can still fight with newer languages. Java8 is likely to close the gap further with the support of closures.&amp;nbsp;Hence Java.next() would be multiple&amp;nbsp;languages&amp;nbsp;led by java, a technique also popularly known as polygot programming.&lt;br /&gt;
&lt;br /&gt;
Project team will have heterogeneous level of competence (best/good/average bad developers), technical superiority is not always the best choice, cost of&amp;nbsp;maintenance&amp;nbsp;always exceeds the cost of construction. Java has proved to be the best choice although it may not be technically superior, there is no reason to believe that it will change&amp;nbsp;dramatically in coming days.&lt;br /&gt;
I am personally sold on the productivity benefits of JVM languages (Scala/Groovy/JRuby) and their functional programming&amp;nbsp;abilities. Having developed several internal projects during day work and few personal projects during free time given a chance, I always prefer to code with JVM languages rather than in java.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
The assumption that Java is getting old its time look for new ideas is getting stronger day by day. Irony of the history that .NET started as truly multi-language with single platform as compared to java claiming one language running in multi-platforms, the current trend looks like there are lots of JVM languages gaining lots of&amp;nbsp;mind-share&amp;nbsp;but .NET still heavily tilted towards C#.&lt;br /&gt;
The question of what is java.next() itself seems to be strange because all who came to replace java as language compile to byte code and runs on rock solid JVM. I have been following JVM languages for a quite some time. I picked these Groovy,Scala languages (Only because I can code in these languages and following seems to be higher for these 2 compared to any other JVM languages) as contenders.&lt;br /&gt;
I also picked up the parameters that suits java developers thinking.&lt;br /&gt;
1. Can I get my things faster and hence spend less time in office. (Here &quot;my things&quot; are general programming requirements as I&amp;nbsp;perceive)&lt;br /&gt;
2. How easily I can pick them and can convince both technically literate and il-literate stake holders.&lt;br /&gt;
3. How easily I can get jobs and is it going to offer better salary compared to java&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Thought Leaders opinion about the the languages&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Generally the understanding is that scala has the ability to disrupt the status quo rather than incrementally improving it like Groovy. Scala has done and doing good job of reducing the cost of abstraction transliterate Java into Scala and end up with bytecode that is almost exactly the same. Scala has some original good ideas and well thought out type system.&lt;br /&gt;
It does look like java programming Intellectuals move towards scala.&lt;br /&gt;
Here are the examples.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Spring creator (Rod Johnson) endorses Typesafe and his dislike for groovy is quite evident as I heard from a podcost&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Java creator (James Gosling) prefers scala over ther JVM languages&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Groovy&amp;nbsp;original&amp;nbsp;creator (&lt;span style=&quot;font-family: Calibri;&quot;&gt;James Strachan&lt;/span&gt;) says scala as better option in the long run to replace java and so the JRuby creator (&lt;span style=&quot;font-family: Calibri;&quot;&gt;Charles Oliver Nutter&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;)&lt;br /&gt;
But I think there will be some vested interest by some of these folks taking extreme stand and hence we need to take them with pinch of salt.&lt;br /&gt;
&lt;br /&gt;
Winner : Scala&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Job Trends&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&quot;Where the rubber meets the road&quot; - The moment of truth.&lt;br /&gt;
Making more money with enjoyable effort (I don&#39;t say least effort) is a general end goal with technologies. Job opportunuties are the best borometer. They are the real reason for anyone to invest in a technology &amp;amp; probably single most important parameter to believe the hype in technology.&lt;br /&gt;
As web technology development is dominant one Grails popularity and active SpringSource support is driving the results.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;width: 540px;&quot;&gt;
&lt;a href=&quot;http://www.indeed.com/jobtrends?q=scala%2Cgroovy&quot; title=&quot;scala,groovy Job Trends&quot;&gt;
&lt;img alt=&quot;scala,groovy Job Trends graph&quot; border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://www.indeed.com/trendgraph/jobgraph.png?q=scala%2Cgroovy&quot; width=&quot;540&quot; /&gt;
&lt;/a&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;6&quot; cellspacing=&quot;0&quot; style=&quot;font-size: 80%; width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://www.indeed.com/jobtrends?q=scala%2Cgroovy&quot;&gt;scala,groovy Job Trends&lt;/a&gt;&lt;/td&gt;
&lt;td align=&quot;right&quot;&gt;&lt;a href=&quot;http://www.indeed.com/jobs?q=Scala&quot;&gt;Scala jobs&lt;/a&gt; - &lt;a href=&quot;http://www.indeed.com/jobs?q=Groovy&quot;&gt;Groovy jobs&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
Winner: Groovy&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Learning curve&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Compared to Groovy, Scala has been harder to learn for me (still learning of course). The ability to write scary programs in scala is big NO for enterprise development. We are always going to have mixture of good/averege/bad and great developers.&lt;br /&gt;
Although Martin (author of scala) &lt;a href=&quot;http://lampwww.epfl.ch/~odersky/blogs/isscalacomplex.html&quot; target=&quot;_blank&quot;&gt;tried hard&lt;/a&gt; to prove other way round&amp;nbsp;brilliantly&amp;nbsp; From my experience I say it just more hard for java developers.In groovy I can just close my eyes and type java code if I get struck with some groovy concepts while learning that can&#39;t happen with scala.&lt;br /&gt;
&lt;br /&gt;
Winner : Groovy&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Multi-core programming&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
For the past 30 years, computer performance has been driven by Moore&#39;s Law;(the number of transistors on integrated circuits doubles approximately every two years). We don’t get the same increase in clock frequency as we used to, instead, we get more cores. CPUs aren&#39;t get faster anymore, it’s physically difficult to do so. Programming languages that can handle this better is likely to succeed more in coming days.&lt;br /&gt;
Scala supports &amp;nbsp;multi-core friendly language constructs and libraries than others. (Im-mutability and functional programming is baked into the language).&amp;nbsp;Although&amp;nbsp;there is nothing&amp;nbsp;inherently&amp;nbsp;great about scala (which runs on JVM anyway) compared java. GPars from groovy is also fair.&amp;nbsp;Scala folks says if we stick our head in the sand we will be left behind. This is most preferred argument from scala evangelists to promote. I do think there is huge merit in this argument by seeing what libraries like akka are able to achieve although famous TestNG creator thinks &lt;a href=&quot;http://beust.com/weblog/2013/01/02/no-silver-bullet-reloaded/&quot; target=&quot;_blank&quot;&gt;otherwise&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Winner: Scala&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Web Applications&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://grails.org/&quot; target=&quot;_blank&quot;&gt;Grails &lt;/a&gt;and &lt;a href=&quot;http://playframework.org/&quot; target=&quot;_blank&quot;&gt;play framework&lt;/a&gt; are the show pieces of Groovy and Scala respectively. They beat other java web frameworks in the page oriented MVC architecture hands down. The&amp;nbsp;productive&amp;nbsp;gains are pretty huge to overlook. The approach is not only new and&amp;nbsp;intelligent.&lt;br /&gt;
More and more work is getting done at the web browser, mainly through java script. This trend likely to continue the future as well. With lots of great library pushing the limits of ability of java script (JQuery, AngularJS, Backbone ...).&lt;br /&gt;
Both the frameworks are way ahead of other frameworks in supporting new java scrpit libraries, web soeckets etc... JSON/XML rendering from controllers of play and grails looks so innate behaviour of the framework unlike others. Both supports MVC and stateless architecture much better than their counterparts.&lt;br /&gt;
I think there is scope to write component oriented single web applications is pretty huge. GWT is still the best option for java programmers. Relying on some code generators is always not good. Coffee script(better way to write java script) also looks nice.&lt;br /&gt;
&lt;br /&gt;
Coming to performance, performance of most web applications is I/O bound, so the practical performance impact of Groovy may be largely offset by the (developer) productivity gains it offers. Play framework folks thought otherwise and moved from groovy based templates to scala one. But I still feel for most of the applications the first assertion stands,&amp;nbsp;&amp;nbsp;and groovy offers awesome productivity benefits.&lt;br /&gt;
The plugin framework eco system of grails is miles ahead compared to play, &amp;nbsp;definitely&amp;nbsp;a big plus.&lt;br /&gt;
&lt;br /&gt;
Winner : Groovy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Mobile platform&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Its difficult to imagine any new application that runs only on web. Although web apps will work with mobile as well with new frameworks fluently with mobile centric CSS/Script supoort, I believe HTML5&#39;s inherent advantages with distribution, monetization, platform power and network effects aren&#39;t enough to match with rich user experience with native in mobile apps.&lt;br /&gt;
I firmly believe that both of them will have their own space in the days to come and we have to live with building 2 kinds of applications.&amp;nbsp;Java android SDK is the viable option for java programmers. (although there are some options to run other way)&lt;br /&gt;
&lt;br /&gt;
Winner : Java&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;Writing DSLs&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&quot;Say What You Mean, Mean What You Say&quot; - bridging the gap between what the user and a&amp;nbsp;programming&amp;nbsp;language.&amp;nbsp;Ability to defining Domain Specific Language is very important feature. There are lots of use cases where it can be used to simplify most of the tasks. (new rules, Data entry, API usage, Testing, build systems, deployment etc...). Writing fluent API and XML are&amp;nbsp;definitely&amp;nbsp;verbose of way of defining new DSL. Resorting into using ANTLR, JavaCC is also overkill in most of the cases with huge learning curve/maintenance&amp;nbsp;overhead that they bring in.&lt;br /&gt;
Ability to modify the existing class at runtime (meta programming) and language ability for operator overloading flexible syntax plays very important role.All functions can be used infix (obj.method(arg) or obj method arg) makes the writing of DSL a joy. I created fluent interface library myself and a great fan of functional libraries like&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/guava-libraries/&quot; target=&quot;_blank&quot;&gt;Guava&lt;/a&gt;, &amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://functionaljava.org/&quot; target=&quot;_blank&quot;&gt;functional java&lt;/a&gt;. But we are bending too much to use functional programming with java and isn&#39;t natural.&lt;br /&gt;
&lt;br /&gt;
Winner : Groovy&lt;br /&gt;
&lt;br /&gt;
Both Scala/Groovy wins hands down over java.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Database operations&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Most of the development involve large chunk of code dealing with bringing data from various data sources (mainly relational) and updating the same. JPA (Its originator Hibernate) tried solve&amp;nbsp;impedance&amp;nbsp;mismatch between the object oriented code and relational data. After evaluating some of the scala framework I have come conclusion, JPA fixed the issue and not solved it. Functional programming is the best way to deal with row oriented data and success is not hiding the SQL details from developer but making as easy and transparent to developer&amp;nbsp;without&amp;nbsp;losing type safety.&lt;br /&gt;
Its thumbs up for &lt;a href=&quot;http://slick.typesafe.com/&quot; target=&quot;_blank&quot;&gt;slick&lt;/a&gt;&amp;nbsp;and&amp;nbsp;other several scala frameworks making JDBC operations simpler from scala world.&lt;br /&gt;
&lt;br /&gt;
Winner : Scala&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Big Data&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
In general&amp;nbsp;appetite&amp;nbsp;for insight into the details is increasing.Data inflow is increasing with larger velocity, its becoming&amp;nbsp;difficult&amp;nbsp;to assimilate the insight information. When we deal with larger data we need software that monitors and heals the software. Pretty big&amp;nbsp;challenges.&lt;br /&gt;
We need software that exploits the hardware and new multi-core cpus better. The functional programming paradigm and immutable friendly programming language plays very important role.&lt;br /&gt;
&lt;br /&gt;
Winner : Scala&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some interesting threads on this topic I found interesting against Scala. You can also see spirited fight from scala enthusiasts as response.&lt;br /&gt;
&lt;a href=&quot;http://alarmingdevelopment.org/?p=562&quot; target=&quot;_blank&quot;&gt;Switching back to Java:&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://blog.joda.org/2011/11/scala-feels-like-ejb-2-and-other.html&quot; target=&quot;_blank&quot;&gt;Scala feels like EJB-2&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://eng.yammer.com/scala-at-yammer/&quot; target=&quot;_blank&quot;&gt;Yammer moves back to java from scala&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/1697052273433423407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/1697052273433423407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/1697052273433423407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/1697052273433423407'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2012/12/javanext-scala-or-groovy.html' title='Java.next() -&gt; Scala or Groovy?'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7079134741323722547</id><published>2012-03-03T00:49:00.009-08:00</published><updated>2012-04-23T06:21:39.673-07:00</updated><title type='text'>Introduction to Hadoop</title><content type='html'>My notes on Hadoop -&amp;nbsp;I never got an opportunity to directly work with Hadoop but currently looking into in house POC application that analyzes logs,&amp;nbsp;Hadoop remains attractive for solving huge data that was majorly required by big companies (&amp;amp; mainly social software companies that deal with big data)&amp;nbsp;but likely to expand into other companies as the data&amp;nbsp;emitted&amp;nbsp;by the world is growing exponentially. As I see from job description and salary&amp;nbsp;perspective hadoop engineer is at the top &amp;amp; rightly so.&lt;br /&gt;
Hadoop has passed the hype cycle &amp;amp; is stable now. Now Hadoop is with Plateau of Productivity.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Gartner_Hype_Cycle.svg/300px-Gartner_Hype_Cycle.svg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Gartner_Hype_Cycle.svg/300px-Gartner_Hype_Cycle.svg.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
My notes here on hadoop should make readers hadoop buzz words compliant &amp;amp; give better idea of over-all picture.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;What is Hadoop?&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
A cost-effective, scalable, distributed and flexible big data processing framework written in java based on Map-Reduce algorithm.&amp;nbsp;&lt;a href=&quot;http://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/en//archive/mapreduce-osdi04.pdf&quot; target=&quot;_blank&quot;&gt;MapReduce&lt;/a&gt; is a algorithm proposed by Google that breaks complex tasks down into smaller elements which can be executed in parallel.&lt;br /&gt;
Hadoop at core consists of two parts, one a special file system called Hadoop Distributed File System (HDFS) and Map-Reduce Framework that defines two phases to process the data a map and reduce.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;Why Hadoop?&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
Traditional storage with RDBMS is costly and unsuitable in follwing scenarios&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Too much of data that too in unstructured format (100s of Terabytes, Peta bytes)&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Large # of applications to use a single filesystem namespace in distributed execution space&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;In-expensive storage of large data, but can be still easily queried.&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Big data with high volume &amp;amp; velocity&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
Relational databases are designed with good principles of data durability, isolation and independence but the design is centralized and tends to get disk IO bound for high write workloads. The use of locking at different levels (row, page, table level) for consistency/isolation and the need to flush transaction state to disk introduces scalability challenges requiring users to scale by deploying heavy machines (vertical scaling).&lt;br /&gt;
&lt;br /&gt;
Many tech vendors like EMC,Y!, Twitter, IBM,Amazon,Oracle &amp;amp; even Microsoft has got Hadoop-oriented &quot;big data&quot; strategy.&amp;nbsp;Hadoop has proven to work with many of the big companies &amp;amp; huge investment in hadoop and its related technology made by them makes it viable option for handling big data in years to come.&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Hadoop Use Cases:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
This &lt;a href=&quot;http://wiki.apache.org/hadoop/PoweredBy&quot; target=&quot;_blank&quot;&gt;wiki-page&lt;/a&gt; lists out 100s of companies and their usages alphabetically,&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Here is the list that I picked from there.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Log files processing,&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Machine learning&lt;/li&gt;
&lt;li&gt;User&amp;nbsp;experience optimization/Prediction&amp;nbsp;of behaviours based on the patterns and build the recommender system for behavioral targeting with pattern discovery/analysis.&lt;/li&gt;
&lt;li&gt;Billions of lines of GPS data to create TrafficSpeeds for&amp;nbsp;accurate traffic speed forecast&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
(proximity operators, hub and spoke search terms, customized relevance ranking, stemming, white and black lists, Data mining, Analytics and machine learning) Data from various wide verity of sources Ex: sensors, cameras, feeds,streaming, logs, user interactions&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Where Hadoop doesn&#39;t make sense&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
You cannot directly use Hadoop as a substitute for a database that takes query &amp;amp; returns result in milliseconds, so if there is requirement to have&amp;nbsp;sub-second interactive reporting from your data, or using the data in multi-step, updates/insertions, complex transactions, an RDBMS solution may still be your best bet.&lt;/div&gt;
&lt;div&gt;
By design Hadoop is suited for batch index building,and is not proper for incremental index building and search.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Hadoop eco system&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
There are software add on components developed on hadoop to make life simpler, VMWare recently announced that &lt;a href=&quot;http://www.springsource.org/spring-data/hadoop&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;Spring also&lt;/a&gt;&amp;nbsp;will have support for Hadoop under their &quot;Spring Data&quot; umbrella.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;HBase &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;- Column-store database (of the order of terabytes) based on Google&#39;s big table&lt;/li&gt;
&lt;li&gt;Pig &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;- Yahoo owned DSL for Data-flow or routing data&lt;/li&gt;
&lt;li&gt;Hive &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;- Facebook owned DSL for routing data but based on SQL&lt;/li&gt;
&lt;li&gt;ZooKeeper &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Distributed consensus engine with concurrent access&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
All the big companies (Twitter,Amazon, Yahoo, Facebook) have something to offer over the Hadoop which is a good thing.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Hadoop Core components:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
At core hadoop can be grouped into following&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;HDFS -&amp;nbsp;Hadoop Distributed File System, is responsible for storing huge data on the cluster.&lt;/li&gt;
&lt;li&gt;Hadoop Daemons&amp;nbsp;-&amp;nbsp;&amp;nbsp;A set of services offering to work with the data.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Hadoop HDFS API &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;-&amp;nbsp;&amp;nbsp;APIs to communicate with the various nodes (services) from applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
Here is brief write up on each of the components:&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;HDFS:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
This is a distributed file system designed to run on commodity(low cost) hardware &amp;amp; highly fault tolerent.&lt;/div&gt;
&lt;div&gt;
It provides the high throughput with large data sets (files). HDFS supports write-once-read-many semantics on files&lt;/div&gt;
&lt;div&gt;
In HDFS data is split into blocks and distributed across multiple nodes in the cluster. Each block is typically 64Mb or 128Mb in size.&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;HDFS Vs NAS&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
In HDFS Data Blocks are distributed across local drives of all machines in a cluster. Whereas in NAS data is stored on dedicated hardware.&lt;/div&gt;
&lt;div&gt;
HDFS is designed to work with MapReduce System, since computation are moved to data. NAS is not suitable for MapReduce since data is stored seperately from the computations.&lt;/div&gt;
&lt;div&gt;
HDFS runs on a cluster of machines and provides redundancy using a replication protocal. Whereas NAS is provided by a single machine therefore does not provide data redundancy.&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Hadoop Daemon services or modules:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Hadoop is comprised of five separate daemons. Each of these daemon run in its own JVM.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;u&gt;Master nodes:&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;NameNode - This daemon stores and maintains the metadata for HDFS.&lt;/li&gt;
&lt;li&gt;Secondary NameNode - Performs housekeeping functions for the NameNode.&lt;/li&gt;
&lt;li&gt;JobTracker - Manages MapReduce jobs, distributes individual tasks to machines running the Task Tracker.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;u&gt;Slave nodes&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;DataNode &amp;nbsp; &amp;nbsp; – Stores actual HDFS data blocks.&lt;/li&gt;
&lt;li&gt;TaskTracker - Responsible for instantiating and monitoring individual Map and Reduce tasks.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;NameNode :&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
NameNode is heart of HDFS file system. It keeps the directory hierachy information of all files in the file system,&amp;nbsp;and tracks where across the cluster the file data is kept. It does not store the data of these files itself but just metadata.&amp;nbsp;&quot;NameNode&quot; is a Single Point of Failure for the HDFS Cluster &amp;amp; makes all decisions regarding replication of blocks.Any hadoop user applications will have to talk to NameNode through Hadoop HDFS API to locate a file or to add/copy/move/delete a file.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;Data Node :&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
A DataNode stores data in the Hadoop File System HDFS. DataNode instances can talk to each other, this is mostly during replicating data.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;JobTracker :&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
A daemon service for submitting and tracking jobs(a processing unit) in Hadoop &amp;amp; is single point of failure for the Hadoop MapReduce service.&lt;/div&gt;
&lt;div&gt;
As per wiki:&lt;/div&gt;
&lt;div&gt;
Client applications submit jobs to the Job tracker.&lt;br /&gt;
The JobTracker talks to the NameNode to determine the location of the data&lt;/div&gt;
&lt;div&gt;
The JobTracker locates TaskTracker nodes with available slots at or near the data&lt;/div&gt;
&lt;div&gt;
The JobTracker submits the work to the chosen TaskTracker nodes.&lt;/div&gt;
&lt;div&gt;
The TaskTracker nodes are monitored. If they do not submit heartbeat signals often enough, they are deemed to have failed and the work is scheduled on a different TaskTracker.&lt;/div&gt;
&lt;div&gt;
A TaskTracker will notify the JobTracker when a task fails. The JobTracker decides what to do then: it may resubmit the job elsewhere, it may mark that specific record as something to avoid, and it may may even blacklist the TaskTracker as unreliable.&lt;/div&gt;
&lt;div&gt;
When the work is completed, the JobTracker updates its status.&lt;br /&gt;
Client applications can poll the JobTracker for information.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;Task Tracker:&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
Task Tracker &amp;nbsp; is a slave node daemon in the cluster that accepts tasks (Map, Reduce and Shuffle operations) &amp;amp;&amp;nbsp;monitors these task instances(Task instances are the actual MapReduce jobs), from a JobTracker.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;/span&gt;Miscellaneous:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
MapReduce programming model does not allow reducers to communicate with each other. Reducers run in isolation &amp;amp; hence can be zero as well.&lt;/div&gt;
&lt;div&gt;
Combiners are used to increase the efficiency of a MapReduce program. They are used to aggregate intermediate map output locally on individual mapper outputs. Combiners can help you reduce the amount of data that needs to be transferred across to the reducers.&lt;/div&gt;
&lt;div&gt;
Speculative execution is a way of coping with individual Machine performance.&lt;/div&gt;
Some Criticisms:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&quot;Hadoop brings a tons of data, but until you know what to ask about it, it’s pretty much garbage in, garbage out.&quot; - There are limited use cases for this especially for generic programmer to fully invest on this.&lt;/div&gt;
&lt;div&gt;
&quot;Does querying huge data sets win over the advanced algorithms applied over limited data&quot; - I am&amp;nbsp;skeptical about querying huge data&lt;/div&gt;
&lt;div&gt;
&quot;While most of Hadoop is built using Java, a larger and growing portion is being rewritten in C and C++&quot; - I thought&amp;nbsp;Google Map-Reduce must be better &amp;amp; converting some components to C++ is not a good sign for Java&lt;/div&gt;
&lt;div&gt;
&quot;Configuration parameters are pretty huge&quot; - that&#39;s a design smell I guess it&amp;nbsp;shouldn&#39;t that complex.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7079134741323722547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7079134741323722547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7079134741323722547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7079134741323722547'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2012/03/my-notes-on-hadoop-never-got.html' title='Introduction to Hadoop'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7895047691401826894</id><published>2012-02-08T21:46:00.000-08:00</published><updated>2012-04-23T06:15:31.536-07:00</updated><title type='text'>Implementing equals and hash</title><content type='html'>All about equals() and hashCode()&lt;br /&gt;
&lt;br /&gt;
Java does not provide direct support for associative arrays -- arrays that can take any object as an index. In Java we have Object class has two methods for making inferences about an object&#39;s identity: equals() and hashCode()&lt;br /&gt;
HashMap helps to lookup based on object as index, other hash-based data structures such as HashSet, LinkedHashSet, HashMap, Hashtable, WeakHashMap does the same thing.&lt;br /&gt;
&lt;br /&gt;
There are two approaches to defining equality and hash value: identity-based, which is the default provided by Object, and state-based, which requires overriding both equals() and hashCode(). If an object&#39;s hash value can change when its state changes, be sure you don&#39;t allow its state to change while it is being used as a hash key.&lt;br /&gt;
&lt;br /&gt;
There are some restrictions placed on the behavior of equals() and hashCode(), as explained in JavaDoc of &lt;a href=&quot;http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html&quot; target=&quot;_blank&quot;&gt;Object &lt;/a&gt;class. &lt;br /&gt;
In particular, the equals() method must exhibit the following properties:&lt;br /&gt;
Symmetry: For two references, a and b, a.equals(b) if and only if b.equals(a)&lt;br /&gt;
Reflexivity: For all non-null references, a.equals(a)&lt;br /&gt;
Transitivity: If a.equals(b) and b.equals(c), then a.equals(c)&lt;br /&gt;
Consistency with hashCode(): Two equal objects must have the same hashCode() value&lt;br /&gt;
&lt;br /&gt;
Here are some rules to follow:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - if a class overrides equals, it must override hashCode&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - equals and hashCode must use the same set of fields&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - if two objects are equal, then their hashCode values must be equal as well&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - Consistency with the equals() contract is a fundamental requirement to&amp;nbsp;&amp;nbsp; every implementation of equals() . Not only the hash-based collections rely on reflexivity, symmetry, and transitivity, but everybody who calls equals()&amp;nbsp; will expect exactly this behavior. Failure to comply to the equals()&amp;nbsp; contract leads to subtle bugs that are difficult to track down, because they are conceptual problems.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - The value that&#39;s likely to change or unique should be first to compare (like Id etc...)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - Make sure hashCode() of the key objects that you put into the collection never changes while the object is in the collection or make it immutable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; - if the object is immutable, then hashCode is a candidate for caching and&amp;nbsp; lazy initialization&lt;br /&gt;
Caching of hashCode value is useless with modren JVMs&lt;u&gt;.&lt;/u&gt;The last one in the above proved to be wrong after my experiments, JVM seems to be intelligent enough to make it fast.&lt;br /&gt;
&lt;br /&gt;
Morale of the story : If you think you can optimize some obvious stuff,don&#39;t do that &amp;amp; JVM might be already doing that.&lt;br /&gt;
&lt;br /&gt;
Generally its assumed that hashCode provides a unique identifier for an object&lt;u&gt;. &lt;/u&gt;But actually it does not.&lt;br /&gt;
According to The java.lang.Object documentation it should be perfectly ok to always return 0 for the hashCode(). The positive effect of implementing hashCode() to return unique numbers with the use prime number for unique objects, is that it might increase performance. The downside is that the behavior of hashCode() must be consistent with equals(). For object a and b, if a.equals(b) is true, than a.hashCode() == b.hashCode() must be true. But if a.equals(b) returns false, a.hashCode() == b.hashCode() may still be true. Implementing hashCode() as &#39;return 0&#39; meets these criteria, but it will be extremely inefficient in Hash based collection such as a HashSet or HashMap.&lt;br /&gt;
&lt;br /&gt;
Recently we had one problem with the old code, where in the equals was utilizing the hashCode() method in the equals(), but since some of the string values were getting the same hashCode(), the hashmap was giving unexpected results.&lt;br /&gt;
assert 2627 == &quot;RU&quot;.hashCode()&lt;br /&gt;
assert 2627 == &quot;S6&quot;.hashCode()&lt;br /&gt;
So its always better to be careful about this as it can manifest itself after a long time &lt;br /&gt;
&lt;div style=&quot;margin-top: 0;&quot;&gt;
&lt;output&gt;     &lt;/output&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-top: 0;&quot;&gt;
&lt;output&gt;     &lt;/output&gt;&lt;/div&gt;
I was looking into code generated by 3 dominant IDEs in java, I thought its interesting to share some of the information. Its safest way to use IDEs to generate code from code review &amp;amp; consistency purpose. I don&#39;t see anything wrong with generated code here.&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/1777425.js?file=Eclipse_equals_hashcode&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
For me IntelliJ is doing better here (anyway nothing wrong with others). &lt;br /&gt;
- provides a option to mark certain fields non-null and hence null check   can be avoided which I think is a good thing to do.&lt;br /&gt;
- makes use of instanceof others uses getClass(), All classes in the hierarchy either allow slice comparison and use instanceof or they disallow it and use getClass() . The use of &#39;instanceof&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp; if need be, it can match any supertype, and not just one class &amp;amp;&amp;nbsp; it renders an explict check for &quot;that == null&quot; redundant, since it does the check for null already - &quot;null instanceof [type]&quot; always returns false. (Effective Java)&lt;br /&gt;
- code looks compact compared to others&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
There are excellent helper classes &lt;a href=&quot;http://commons.apache.org/lang/api-release/org/apache/commons/lang3/builder/EqualsBuilder.html&quot; rel=&quot;nofollow&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4a6b82; cursor: pointer; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;EqualsBuilder&lt;/a&gt;&lt;span style=&quot;background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;and&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://commons.apache.org/lang/api-release/org/apache/commons/lang3/builder/HashCodeBuilder.html&quot; rel=&quot;nofollow&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4a6b82; cursor: pointer; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;HashCodeBuilder&lt;/a&gt;&lt;span style=&quot;background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;from the&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://commons.apache.org/lang/&quot; rel=&quot;nofollow&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4a6b82; cursor: pointer; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Apache Commons Lang&lt;/a&gt;&lt;span style=&quot;background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;library. can make life simpler, but I think code generated from IDEs are good enough&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reference:&lt;br /&gt;
Effective Java - Joshua Bloch &lt;a href=&quot;http://developer.java.sun.com/developer/Books/effectivejava/Chapter3.pdf&quot; target=&quot;_blank&quot;&gt;chapter about equals() and hashCode()&lt;/a&gt;&lt;br /&gt;
Java theory and practice: &lt;a href=&quot;http://www-106.ibm.com/developerworks/java/library/j-jtp05273.html&quot; target=&quot;_blank&quot;&gt;Hashing it out&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7895047691401826894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7895047691401826894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7895047691401826894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7895047691401826894'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2012/02/all-about-equals-and-hashcode-java-does.html' title='Implementing equals and hash'/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-1370286751259963706</id><published>2011-09-30T07:29:00.000-07:00</published><updated>2011-10-11T10:29:48.844-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'></title><content type='html'>Backward and Forward compatibility with Java serialization protocol:-&lt;br /&gt;
&lt;br /&gt;
Java offers a nice protocol for storing and communicating the persisted information. In a distributed deployment environment the server code has to support both the new and old information when its anticipated the control over the deployment of different versions of the servers are not available. The code has to deal with both backward as well as forward compatibility. i.e. VERSION N should be able to read both VERSION N-1 &amp;amp; VERSION N+1 object.&lt;br /&gt;
&lt;br /&gt;
Maintaining the backward compatibility is easy. i.e. Version N code can read Version N-1 code by maintaining the version attribute. The version attribute in the read() API will make sure that the reading of new information is skipped. This is quite straight forward to achieve through “java.io.Externalizable” interface provided java where we have the full control of the context information on what we need to save. But it becomes tricky when we try to read the information created by future versions. The problem with forward compatibility is that the Java de-serialization it has to know what the new stuff that has been added &amp;amp; also should know where the information has been added.&lt;br /&gt;
&lt;br /&gt;
The solution explained below tries to solve the problem in a pure java with less overhead &amp;amp; suitable for systems that have already established using Java serialization with&amp;nbsp; ”java.io.Externalizable”&amp;nbsp; interface.&lt;br /&gt;
&lt;br /&gt;
Here the top down approach is followed for the explanation, it starts with how the usage of API should look like VERSION 0,1 &amp;amp; 2 then show how that can be achieved through code.&lt;br /&gt;
The challenge here is to read VERSION-1 (N) data from VERSION-0 (N-1) class. The current solution targets supporting only N+1 version &amp;amp; not the future versions which is the only important part of 24 X 7 support systems in the event of release back out.&lt;br /&gt;
Let&#39;s take an example of class &quot;Test&quot; having 2 attribute in VERSION-0, VERSION-1 introduces a new attribute called &quot;versionData1&quot; &amp;amp; VERSION-2 introduces the one more new attribute &quot;versionData2&quot;. To simulate the case the data is inserted in between the data. In real-time scenario we will have lots of classes with readExternal()/writeExternal() methods spread across all over the code, but usually controlled with single mother object.&lt;br /&gt;
SKIP_START &amp;amp; SKIP_END are the marker interfaces used to identify the new information and ObjectInputWrapper is the new class used to move the cursor to skip the details when we read new information from the old class.&lt;br /&gt;
&quot;Test&quot; is Externalizable class having 3 attributes. We will include a new attribute in the second version and see how a &quot;Test&quot; object with VERSION -0 (N) reads VERSION -1 (N-1) object.&lt;br /&gt;
&lt;br /&gt;
This plugin architecture is quite scalable.&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt; ObjectInputWrapper can be injected with different serialization protocols like Google proto buffer, Oracle Coherence&#39;s POF, etc... using a using factory pattern like ObjectInputOutputProviderFactory that provides different implementation including custom logic to efficiently store &amp;amp; retrieve the information &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;u&gt; VERSION = 0;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void writeExternal(ObjectOutput out) throws IOException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeInt(VERSION);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeInt(number);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(name);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void readExternal(ObjectInput _in) throws IOException, ClassNotFoundException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectInputWrapper in = new &lt;span style=&quot;background-color: yellow;&quot;&gt;ObjectInputWrapper&lt;/span&gt;(_in);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VERSION = in.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number = in.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = (String) in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&quot;Test{VERSION=0, number=10, name=praveen}&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;u&gt;VERSION = 1&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
This class has new String attribute called versionData1 with the value &quot;versionData1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void writeExternal(ObjectOutput out) throws IOException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeInt(VERSION);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeInt(number);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Added for version1 in between&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: yellow; color: yellow;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: black;&quot;&gt;out.writeObject(new SKIP_START()); &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(version1Data);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; out.writeObject(new SKIP_END()); &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(name);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
A marker interface class has been included to identify the new information that the older version can safely ignore.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void readExternal(ObjectInput _in) throws IOException, ClassNotFoundException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectInputWrapper in = new ObjectInputWrapper(_in);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VERSION = in.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number = in.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(VERSION&amp;gt;=1) {&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in.readObject();&lt;/span&gt; // we can safely ignore skip signals&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; version1Data = (String)in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in.readObject();&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = (String) in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&quot;Test{VERSION=1, number=10, versionData1=versionData1, name=praveen}&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&amp;nbsp;VERSION = 2&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void writeExternal(ObjectOutput out) throws IOException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeInt(VERSION);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeInt(number);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(version1Data);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Added for version2 data in between&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(new SKIP_START()); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(version2Data);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(new SKIP_END()); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out.writeObject(name);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void readExternal(ObjectInput _in) throws IOException, ClassNotFoundException {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectInputWrapper in = new ObjectInputWrapper(_in);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VERSION = in.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number = in.readInt();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(VERSION&amp;gt;=1) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(VERSION==1){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; version1Data = (String)in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(VERSION==1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(VERSION&amp;gt;=2) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; version2Data = (String)in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = (String) in.readObject();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&quot;Test{VERSION=2, number=10, versionData1=versionData1, versionData2=versionData2, name=praveen}&quot;&lt;br /&gt;
The skip data version can safely be ignored in future versions. It will be removed in write first and also from read on subsequent versions.&lt;br /&gt;
&lt;br /&gt;
The 2 key classes used to implement are explained here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; line-height: 115%;&quot;&gt;The ObjectInputWrapper class will have read method implementations for each basic data type. The sample below shows just two methods reading and readObject for illustration. For real implementations, we need to create final ObjectInputReaderTemplate classes for each basic data type and reuse them in the read methods of &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; line-height: 115%;&quot;&gt;ObjectInputWrapper&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt; &amp;amp; they can be cached to avoid lots of object creations. The profiling of&amp;nbsp; this code showed that these light weight are pretty cheap to handle, JVM will make sure that there is overhead in terms of memory or the cpu by in lining them automatically.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;script src=&quot;https://gist.github.com/1240845.js?file=ObjecrInputDecorator.java&quot;&gt;
&lt;/script&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; line-height: 115%;&quot;&gt;This class makes use of generics and anonymous inner classes to move the cursor to skip the new information that version N was un-aware while reading.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;script src=&quot;https://gist.github.com/1253853.js?file=ObjectInputReaderTemplate.java&quot;&gt;
&lt;/script&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;One sample code having all the classes published in &lt;a href=&quot;https://github.com/pmanvi/javaiqutils/blob/master/src/ForwardCompatibleSerializedObjectPOC.java&quot;&gt;github&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/1370286751259963706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/1370286751259963706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/1370286751259963706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/1370286751259963706'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2011/09/backward-and-forward-compatibility-with.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-195315028906871220</id><published>2011-08-20T02:02:00.000-07:00</published><updated>2011-09-23T00:10:39.762-07:00</updated><title type='text'></title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial,sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;Caching Exceptions in server applications -&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;In web applications it’s common that&amp;nbsp; response page of certain types can be cached for given http request, similar approach could be used to cache the exceptions in the server side applications as well. If the reason for any exception known upfront that it will be applicable for given amount of time, there is a opportunity to cache these to reduce the load on resources. This could be huge gain in cases where a particular piece of code is doing heavy operations like cpu intensive tasks, making remote calls, Database/File manipulation etc..&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Here is a solution making use of Java generics.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;For Ex:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;public static int mockHeavyOperation(String someData) throws FileNotFoundException,&lt;wbr&gt;&lt;/wbr&gt;Exception{&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thread.sleep(3000);//&lt;wbr&gt;&lt;/wbr&gt;simulating some heavy operation&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(true) throw new FileNotFoundException();&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 10;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Can be converted into&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;public static int mockHeavyOperationWithCacheExc&lt;wbr&gt;&lt;/wbr&gt;eptionHandler(String someData) throws FileNotFoundException{&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return new ExceptionCacheTemplate&amp;lt;&lt;wbr&gt;&lt;/wbr&gt;Integer,FileNotFoundException&amp;gt;&lt;wbr&gt;&lt;/wbr&gt;(){&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public Integer handle() throws Exception {&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thread.sleep(3000); //simulating some heavy operation&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(true) throw new FileNotFoundException(&quot;Checked Exception&quot;);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 10;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}.runIn(new ExceptionCacheTemplate.&lt;wbr&gt;&lt;/wbr&gt;ExceptionKey(someData,&lt;wbr&gt;&lt;/wbr&gt;40000));&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;As we can see from above code extra 4 lines are doing the trick.&lt;br /&gt;
If we run the first operation 10 times it takes 30000 millis where as 2nd example takes only 3000 millis, that&#39;s a huge gain I suppose.&lt;br /&gt;
1. The input information that resulted in exception can be stored as part of Exception Key class. It can be any class including String as shown above as long as it implements equals/hashCode(). runIn method works directly with String as well. If any Exception re-appears within the interval 40000 as shown above the Exception will be thrown from cache.&lt;br /&gt;
2. Only the exceptions that are included as part of the&amp;nbsp; generic exceptions,&lt;br /&gt;
3. A custom map can be provided to manage the expiring of cached exceptions, Default implementation will be managing through the value provided while creating cache key.&lt;br /&gt;
&quot;public Map&lt;exceptionkey,exception&gt; getCache()&quot; can be overridden to provide different implementation &lt;/exceptionkey,exception&gt;&lt;br /&gt;
For example &lt;a href=&quot;http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/MapMaker.html&quot;&gt;Google&#39;s Guava library&lt;/a&gt; provides awesome fluent interface to manage expiry of keys.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;Map&amp;lt;Key,Graph&amp;gt; graphs = new MapMaker()
       .concurrencyLevel(4)
       .weakKeys()
       .maximumSize(10000)
       .expireAfterWrite(10, TimeUnit.MINUTES)
       .makeComputingMap(
           new Function&lt;key, graph=&quot;&quot;&gt;() {
             public Graph apply(Key key) {
               return createExpensiveGraph(key);
             }
           });&lt;/key,&gt;&lt;/code&gt;&lt;/pre&gt;&lt;code&gt; &lt;/code&gt;&lt;/div&gt;&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial,sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial,sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial,sans-serif; font-size: 13px;&quot;&gt;It can be handled at the framework level making it completely transparent to the applications.&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial,sans-serif; font-size: 13px;&quot;&gt;&lt;a href=&quot;https://github.com/pmanvi/javaiqutils/blob/master/src/ExceptionCacheTemplate.java&quot;&gt;ExceptionTamplate&lt;/a&gt; is available in github&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/195315028906871220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/195315028906871220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/195315028906871220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/195315028906871220'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2011/08/caching-exceptions-in-server.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7755321978820180995</id><published>2011-07-17T10:13:00.000-07:00</published><updated>2011-08-11T07:27:10.338-07:00</updated><title type='text'></title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;u&gt;Notes on TDD and Unit testing in general.&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Most of the benefits of TDD are unquantifiable, Its tough to correlate better design, better ability to refactor the code to TDD practice. It requires a real practice to experience and appreciate the productivity benefits. When we are working with legacy code and is not easily testable, advocating TDD there is counter productive and refactoring such code to suit TDD is a hard sell &amp;amp; taking up such task is usually a thankless exercise.For green field projects TDD should be applied without a second thought, to my mind its not debatable anymore.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Here are some notes that I collected can be used to sell TDD during the discussions. For me TDD as effective tool of &quot;COMMUNICATION&quot; is the single most important point that should to enough to employ TDD. The lesser defects as result of clear executable communication should make all the stake holders namely Developers, Managers, Testers, Clients and finally the real users of software happy.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Tests prove that your code actually works resulting in fewer bugs, if we catch all the scenarios. Testing before the code is a design activity.These tests can’t replace system and acceptance testing,but they do supplement it &amp;amp; also fewer bugs that make it to QA.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;We can improve the design without breaking it. Having unit tests in place, we can do powerful refactorings that can untangle the most challenging of system psychoses.Refactoring not only becomes cheaper, it changes the developer mindset to strive for better quality.&amp;nbsp;When refactoring becomes cheaper, the quality of software continuously improves.Fixing PMD and FindBugs errors should not require management approval.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Unit tests are a way to make programmers have documentation as they hate to write a MSWord document &amp;amp; is a project management&amp;nbsp;technique. So when we can’t remember how to use a class APIs, read the unit tests to find out.MS Word documents are not meant to be compiled and deployed, if we can avoid as much as possible, its good for everyone.Unit tests reduces the communication pain points. Its a shared language.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;You know what your code needs to do. Then you make it do it. Even if you don’t have a working system,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;you can see your code actually run and actually work. You get that great “I’ve done it!” feeling. Developers can avoid nagging questions &quot;Have you written it&quot;, &quot;Have you tested it&quot; &amp;amp; finally &quot;Have you really tested it&quot;. If tests are written and published, developer can always go &amp;amp; check from web tool.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Just try test-first if you want to be high on endorphins, proud about your work, and motivated to do more.They demonstrate concrete progress. You don’t have to wait a month for all the pieces of the system to come together.&amp;nbsp;You can show progress even without a working system. Not only can you say&amp;nbsp;you&#39;ve&amp;nbsp;written the code, you can actually demonstrate success.&amp;nbsp;Of course, this is another distinction that traditional programming teaches us to ignore.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;“Done” doesn’t mean you’ve written the code and checked it in.“Done” means the code actually runs in the system without bugs. Running unit tests is a step closer to the latter.Unit tests are a form of sample code. We all encounter library functions and classes we don’t know how to use and&amp;nbsp;one of the first places we go is the sample code. Sample code is documentation.&amp;nbsp;But we don’t usually have samples for internal code. So we’re left shifting through the source or through the rest of the system.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Test-first forces you to plan before you code. Writing the test first forces you to think through your design and what it must accomplish&amp;nbsp;before you write the code which results in better code. This not only keeps you focused, it makes for better designs.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Test-first reduces the cost of bugs. Bugs detected earlier are easier to fix. Bugs detected later are usually the result of many changes,&amp;nbsp;and we don’t know which one caused the bug. So first we have to hunt for and find the bug. Then we have to refresh our memories on how the&amp;nbsp;code is supposed to work, because we haven’t seen it for months. Then finally we understand enough to propose a solution.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Anything that reduces the time between when we code the bug and when we detect it seems like a obvious win. We consider ourselves lucky to find out&amp;nbsp;about bugs within a few days, before the code is shipped to QA or to customers. But how about catching them within a few minutes?&amp;nbsp;That’s what test-first accomplishes with the bugs it catches.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;It’s even better than code inspections. Code inspections, they say, are better than testing, because using them to detect and fix bugs is cheaper than testing.&amp;nbsp;After the code ships, it’s much more expensive to fix the bugs. The earlier we can detect and fix bugs, the easier and cheaper and better.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;That’s the advantage of having code reviews.Code inspections catch more bugs within a few days, rather than a few months, but&amp;nbsp;It virtually eliminates coder’s block. Ever wonder what statement to write next? Like writer’s block, coder’s block can be a real problem.&amp;nbsp;But test-first systematizes the structured part of coding, allowing you to concentrate on the creative part.&amp;nbsp;You may get stuck on how to test the next bit or how to make the test pass, but you’ll never be left puzzling over where to go next.&amp;nbsp;In fact, usually you’re left with the opposite problem: You know you need to take a break before you burn out, but you’re on a roll and don’t want to stop.Failed tests make better designs. Testing a piece of code forces you to define what that code is responsible for. If you can do this easily,&amp;nbsp;that means the code’s responsibility is well-defined and therefore that it has high cohesion. And if you can unit-test your code,&amp;nbsp;that means you can bind it as easily to the test as to the rest of the system. Therefore, it has loose coupling to the pieces around it.High cohesion and loose coupling is the definition of good, maintainable design. Code that is easy to unit-test is also easy to maintain.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;It’s faster than writing code without tests! Or to put it another way, skipping unit tests is faster, unless you actually need the code to work.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Most of the effort we spend on code, we spend fixing it after we’ve checked it in to the source-code repository.&amp;nbsp;But test-first eliminates much of that waste by allowing us to get more of it right to start with and by making bugs easier to fix.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;One of the real value proposition of unit tests is that we get a low-level regression-test suite,we can go back at any time and see not only what broke but where the bug is. Arguably with many frameworks around it’s a low-effort way to catch bugs before the build goes off to QA. Whenever a bug comes it will make life lot easier without the need of using a debugger many a times.Test-first catches some bugs within a few minutes instead of a few days. It is even cheaper than code inspections, code reviews.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7755321978820180995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7755321978820180995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7755321978820180995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7755321978820180995'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2011/07/notes-on-tdd-and-unit-testing-in.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7569174330562913634</id><published>2011-01-17T09:17:00.000-08:00</published><updated>2011-01-24T06:48:13.606-08:00</updated><title type='text'></title><content type='html'>&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;2011 - My Technical Goals&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Make&lt;a href=&quot;http://javaiq.in/&quot;&gt; JavaIQ.in&lt;/a&gt; useful &amp;amp; interesting to Java developers&lt;/li&gt;
&lt;/ul&gt;My child-hood ambition has been to become writer and editor to a magazine. My obsession with politics/history/technology, I guess hasn&#39;t helped me to make money, but it made me always feel complete and happy. Not sure by end of 2011, I will make JavaIQ.in a respectable online magazine, but I will definitely give my best shot at that.&amp;nbsp;I also would like to refine my applications that I created as my weekend projects &amp;amp; publish them in this site. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Android - Develop mobile applications&lt;/li&gt;
&lt;/ul&gt;My guess is that developing&amp;nbsp;applications for smart phones, iPads will be the &quot;big bet&quot; in coming decade and Android is likely to lead in this area of innovation. My decade java programming experience should help. btw, &amp;nbsp;I bought my android phone this year.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;HTML5/Java Script - Learn it&#39;s effective usage&lt;/li&gt;
&lt;/ul&gt;Some how I never liked Flash/Flex. Although I tried JavaFX (which apparently was waste of effort), never spent significant time with Flash. I hope create awesome applications with HTML5. JavaScript has been excellent lanaguage I hope to do plenty of coding using YUI, JQuery and GWT/JSNI.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Play/Grails - Developing web applications in simpler way.&lt;/li&gt;
&lt;/ul&gt;The dumb struts &amp;amp; its similar web frameworks will have to be replaced with these awesome frameworks. I never had such a first time nice experience with any framework compared to Play. I intend to teach and develop few web applications with that this year.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;JVM lanaguages - continue to invest in learning&lt;/li&gt;
&lt;/ul&gt;I will continue to invest in learning Groovy and Scala &amp;amp; continue to look for places where I can use these to accomplish the tasks.&lt;br /&gt;
&lt;br /&gt;
Happy &amp;amp; prosperous new year to all.</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7569174330562913634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7569174330562913634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7569174330562913634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7569174330562913634'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2011/01/2011-my-technical-goals-make-javaiq.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-3341579743738378589</id><published>2010-06-03T07:04:00.000-07:00</published><updated>2010-06-07T22:27:09.898-07:00</updated><title type='text'></title><content type='html'>&lt;u&gt;Using groovy to search name for my newly born son&lt;/u&gt;.&lt;br /&gt;
I had the un-sorted list of names of the God Vishnu from where I wanted to select a name, so wanted to sort them out alphabetically &amp;amp; used Groovy for the same.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589&amp;amp;pli=1#&quot; onclick=&quot;return toggle(&#39;GroovyCode&#39;)&quot;&gt;Groovy Code in Java style&lt;/a&gt; - Click to see the code&lt;br /&gt;
&lt;div id=&quot;GroovyCode&quot; style=&quot;display: none;&quot;&gt;&lt;br /&gt;
&lt;pre&gt;&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l1&quot;&gt;&lt;span class=&quot;ln&quot;&gt;1    &lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;top = &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&quot;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l2&quot;&gt;&lt;span class=&quot;ln&quot;&gt;2    &lt;/span&gt;&lt;/a&gt;    &amp;lt;html&amp;gt; &amp;lt;head&amp;gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l3&quot;&gt;&lt;span class=&quot;ln&quot;&gt;3    &lt;/span&gt;&lt;/a&gt;    &amp;lt;script LANGUAGE=&quot;JavaScript&quot;&amp;gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l4&quot;&gt;&lt;span class=&quot;ln&quot;&gt;4    &lt;/span&gt;&lt;/a&gt;    &amp;lt;!--

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l5&quot;&gt;&lt;span class=&quot;ln&quot;&gt;5    &lt;/span&gt;&lt;/a&gt;        function toggle(id) { var e = document.getElementById(id); e.style.display = e.style.display == &quot;none&quot; ? &quot;block&quot; : &quot;none&quot;; return false}
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l6&quot;&gt;&lt;span class=&quot;ln&quot;&gt;6    &lt;/span&gt;&lt;/a&gt;    //--&amp;gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l7&quot;&gt;&lt;span class=&quot;ln&quot;&gt;7    &lt;/span&gt;&lt;/a&gt;    &amp;lt;/script&amp;gt;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l8&quot;&gt;&lt;span class=&quot;ln&quot;&gt;8    &lt;/span&gt;&lt;/a&gt;    &amp;lt;/head&amp;gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l9&quot;&gt;&lt;span class=&quot;ln&quot;&gt;9    &lt;/span&gt;&lt;/a&gt;    &amp;lt;body&amp;gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l10&quot;&gt;&lt;span class=&quot;ln&quot;&gt;10   &lt;/span&gt;&lt;/a&gt;    &quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l11&quot;&gt;&lt;span class=&quot;ln&quot;&gt;11   &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;htmlOut = top
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l12&quot;&gt;&lt;span class=&quot;ln&quot;&gt;12   &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;set = &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;new &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;TreeSet&amp;lt;String&amp;gt;()

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l13&quot;&gt;&lt;span class=&quot;ln&quot;&gt;13   &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;new &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;File(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;c:/vishnu.txt&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;).eachLine {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l14&quot;&gt;&lt;span class=&quot;ln&quot;&gt;14   &lt;/span&gt;&lt;/a&gt;  set.add(it.toLowerCase().trim())
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l15&quot;&gt;&lt;span class=&quot;ln&quot;&gt;15   &lt;/span&gt;&lt;/a&gt;}
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l16&quot;&gt;&lt;span class=&quot;ln&quot;&gt;16   &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;ref = &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l17&quot;&gt;&lt;span class=&quot;ln&quot;&gt;17   &lt;/span&gt;&lt;/a&gt;htmlOut += &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&quot;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l18&quot;&gt;&lt;span class=&quot;ln&quot;&gt;18   &lt;/span&gt;&lt;/a&gt;        &amp;lt;a href=&quot;#&quot; onclick=&quot;return toggle(&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$ref&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;)&quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$ref&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;lt;/a&amp;gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l19&quot;&gt;&lt;span class=&quot;ln&quot;&gt;19   &lt;/span&gt;&lt;/a&gt;        &amp;lt;div id=&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$ref&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39; style=&quot;display:none&quot;&amp;gt;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l20&quot;&gt;&lt;span class=&quot;ln&quot;&gt;20   &lt;/span&gt;&lt;/a&gt;    &quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l21&quot;&gt;&lt;span class=&quot;ln&quot;&gt;21   &lt;/span&gt;&lt;/a&gt;set.each {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l22&quot;&gt;&lt;span class=&quot;ln&quot;&gt;22   &lt;/span&gt;&lt;/a&gt;  &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;(ref != it.charAt(&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;)) {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l23&quot;&gt;&lt;span class=&quot;ln&quot;&gt;23   &lt;/span&gt;&lt;/a&gt;    htmlOut += &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;/div&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l24&quot;&gt;&lt;span class=&quot;ln&quot;&gt;24   &lt;/span&gt;&lt;/a&gt;    ref = it.charAt(&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;)

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l25&quot;&gt;&lt;span class=&quot;ln&quot;&gt;25   &lt;/span&gt;&lt;/a&gt;    htmlOut += &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&quot;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l26&quot;&gt;&lt;span class=&quot;ln&quot;&gt;26   &lt;/span&gt;&lt;/a&gt;            &amp;lt;a href=&quot;#&quot; onclick=&quot;return toggle(&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$ref&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;)&quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$ref&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;lt;/a&amp;gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l27&quot;&gt;&lt;span class=&quot;ln&quot;&gt;27   &lt;/span&gt;&lt;/a&gt;            &amp;lt;div id=&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$ref&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39; style=&quot;display:none&quot;&amp;gt;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l28&quot;&gt;&lt;span class=&quot;ln&quot;&gt;28   &lt;/span&gt;&lt;/a&gt;        &quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l29&quot;&gt;&lt;span class=&quot;ln&quot;&gt;29   &lt;/span&gt;&lt;/a&gt;  }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l30&quot;&gt;&lt;span class=&quot;ln&quot;&gt;30   &lt;/span&gt;&lt;/a&gt;  htmlOut += it
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l31&quot;&gt;&lt;span class=&quot;ln&quot;&gt;31   &lt;/span&gt;&lt;/a&gt;  htmlOut += &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br/&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l32&quot;&gt;&lt;span class=&quot;ln&quot;&gt;32   &lt;/span&gt;&lt;/a&gt;}
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l33&quot;&gt;&lt;span class=&quot;ln&quot;&gt;33   &lt;/span&gt;&lt;/a&gt;htmlOut += &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;br/&amp;gt;&amp;lt;/body&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l34&quot;&gt;&lt;span class=&quot;ln&quot;&gt;34   &lt;/span&gt;&lt;/a&gt;writer = &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;new &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;FileWriter(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;vishnu.html&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;)
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l35&quot;&gt;&lt;span class=&quot;ln&quot;&gt;35   &lt;/span&gt;&lt;/a&gt;writer.println(htmlOut)
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l36&quot;&gt;&lt;span class=&quot;ln&quot;&gt;36   &lt;/span&gt;&lt;/a&gt;writer.flush()
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l37&quot;&gt;&lt;span class=&quot;ln&quot;&gt;37   &lt;/span&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l38&quot;&gt;&lt;span class=&quot;ln&quot;&gt;38   &lt;/span&gt;&lt;/a&gt;println &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;done :)&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l39&quot;&gt;&lt;span class=&quot;ln&quot;&gt;39   &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589&amp;amp;pli=1#&quot; onclick=&quot;return toggle(&#39;GroovyWithMarkUpBuilder&#39;)&quot;&gt;Groovy with DSL MarkUpBuilder&lt;/a&gt; -Click to see the code&lt;br /&gt;
&lt;div id=&quot;GroovyWithMarkUpBuilder&quot; style=&quot;display: none;&quot;&gt;&lt;pre&gt;&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l1&quot;&gt;&lt;span class=&quot;ln&quot;&gt;1    &lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;writer = &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;new &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;FileWriter(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;c:/Names1000.html&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;)
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l2&quot;&gt;&lt;span class=&quot;ln&quot;&gt;2    &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;src = &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;new &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;groovy.xml.MarkupBuilder(writer)
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l3&quot;&gt;&lt;span class=&quot;ln&quot;&gt;3    &lt;/span&gt;&lt;/a&gt;src.html {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l4&quot;&gt;&lt;span class=&quot;ln&quot;&gt;4    &lt;/span&gt;&lt;/a&gt;  head {

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l5&quot;&gt;&lt;span class=&quot;ln&quot;&gt;5    &lt;/span&gt;&lt;/a&gt;    script &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&quot;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l6&quot;&gt;&lt;span class=&quot;ln&quot;&gt;6    &lt;/span&gt;&lt;/a&gt;        function toggle(id) { var e = document.getElementById(id); e.style.display = e.style.display == &quot;none&quot; ? &quot;block&quot; : &quot;none&quot;; return false}
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l7&quot;&gt;&lt;span class=&quot;ln&quot;&gt;7    &lt;/span&gt;&lt;/a&gt;      &quot;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l8&quot;&gt;&lt;span class=&quot;ln&quot;&gt;8    &lt;/span&gt;&lt;/a&gt;  }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l9&quot;&gt;&lt;span class=&quot;ln&quot;&gt;9    &lt;/span&gt;&lt;/a&gt;  &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;set = &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;new &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;TreeSet&amp;lt;String&amp;gt;()
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l10&quot;&gt;&lt;span class=&quot;ln&quot;&gt;10   &lt;/span&gt;&lt;/a&gt;  &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;new &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;File(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;c:/vishnu.txt&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;).eachLine {

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l11&quot;&gt;&lt;span class=&quot;ln&quot;&gt;11   &lt;/span&gt;&lt;/a&gt;    set.add(it.toLowerCase().trim())
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l12&quot;&gt;&lt;span class=&quot;ln&quot;&gt;12   &lt;/span&gt;&lt;/a&gt;  }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l13&quot;&gt;&lt;span class=&quot;ln&quot;&gt;13   &lt;/span&gt;&lt;/a&gt;  body {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l14&quot;&gt;&lt;span class=&quot;ln&quot;&gt;14   &lt;/span&gt;&lt;/a&gt;    &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;for &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;(alphabet &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;in &lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;97&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;122&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;) {

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l15&quot;&gt;&lt;span class=&quot;ln&quot;&gt;15   &lt;/span&gt;&lt;/a&gt;      &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;char &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;current = ((&lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;) alphabet)
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l16&quot;&gt;&lt;span class=&quot;ln&quot;&gt;16   &lt;/span&gt;&lt;/a&gt;      Set&amp;lt;String&amp;gt; names = set.findAll { it.charAt(&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;) == current}
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l17&quot;&gt;&lt;span class=&quot;ln&quot;&gt;17   &lt;/span&gt;&lt;/a&gt;      &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;def &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;size = names.size()

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l18&quot;&gt;&lt;span class=&quot;ln&quot;&gt;18   &lt;/span&gt;&lt;/a&gt;      &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;(size != &lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;) {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l19&quot;&gt;&lt;span class=&quot;ln&quot;&gt;19   &lt;/span&gt;&lt;/a&gt;        a(href: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, onclick: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;return toggle(\&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$current&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;\&quot;)&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;) {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l20&quot;&gt;&lt;span class=&quot;ln&quot;&gt;20   &lt;/span&gt;&lt;/a&gt;          span &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$current&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$size&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;)&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l21&quot;&gt;&lt;span class=&quot;ln&quot;&gt;21   &lt;/span&gt;&lt;/a&gt;        }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l22&quot;&gt;&lt;span class=&quot;ln&quot;&gt;22   &lt;/span&gt;&lt;/a&gt;        div(id: current, style: &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;display:none&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;) {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l23&quot;&gt;&lt;span class=&quot;ln&quot;&gt;23   &lt;/span&gt;&lt;/a&gt;          names.each {
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l24&quot;&gt;&lt;span class=&quot;ln&quot;&gt;24   &lt;/span&gt;&lt;/a&gt;            li it
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l25&quot;&gt;&lt;span class=&quot;ln&quot;&gt;25   &lt;/span&gt;&lt;/a&gt;          }

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l26&quot;&gt;&lt;span class=&quot;ln&quot;&gt;26   &lt;/span&gt;&lt;/a&gt;        }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l27&quot;&gt;&lt;span class=&quot;ln&quot;&gt;27   &lt;/span&gt;&lt;/a&gt;      } &lt;/span&gt;&lt;span class=&quot;s0&quot;&gt;else &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;{
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l28&quot;&gt;&lt;span class=&quot;ln&quot;&gt;28   &lt;/span&gt;&lt;/a&gt;        span &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$current&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;$size&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;)&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;

&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l29&quot;&gt;&lt;span class=&quot;ln&quot;&gt;29   &lt;/span&gt;&lt;/a&gt;      }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l30&quot;&gt;&lt;span class=&quot;ln&quot;&gt;30   &lt;/span&gt;&lt;/a&gt;      br &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l31&quot;&gt;&lt;span class=&quot;ln&quot;&gt;31   &lt;/span&gt;&lt;/a&gt;    }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l32&quot;&gt;&lt;span class=&quot;ln&quot;&gt;32   &lt;/span&gt;&lt;/a&gt;  }
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l33&quot;&gt;&lt;span class=&quot;ln&quot;&gt;33   &lt;/span&gt;&lt;/a&gt;  println &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&#39;done :)&#39;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/&quot; name=&quot;l34&quot;&gt;&lt;span class=&quot;ln&quot;&gt;34   &lt;/span&gt;&lt;/a&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;a href=&quot;http://docs.google.com/View?id=dfw4gsjv_106hbc7d9cz&quot;&gt;Unsorted 1000 Names&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://docs.google.com/View?id=dfw4gsjv_108dfmrq8cg&quot;&gt;Sorted 1000 Names with groovy&lt;/a&gt;&lt;br /&gt;
Groovy is indeed Java++, It adds nicer syntax, closures and fluent interface making coding a joy without much noise.&lt;br /&gt;
Here is the result from groovy program. Click on letters to hide/expand the names starting with those letters.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;a&amp;quot;)&quot;&gt;&lt;br /&gt;
a (113)&lt;/a&gt;&lt;br /&gt;
&lt;div id=&quot;a&quot; style=&quot;display: none;&quot;&gt;a-bhooh: one who has no birth&lt;br /&gt;
a-moortirmaan: having no form&lt;br /&gt;
aadhaaranilayah: the fundamental sustainer&lt;br /&gt;
aadidevah: the first deity&lt;br /&gt;
aadidevah: the primary source of everything&lt;br /&gt;
aadityah: son of aditi&lt;br /&gt;
aadityah: the son of aditi (vaamana)&lt;br /&gt;
aanandah: a mass of pure bliss&lt;br /&gt;
aanandee: one who gives delight&lt;br /&gt;
aashramah: haven&lt;br /&gt;
aatmavaan: the self in all beings&lt;br /&gt;
aatmayonih: the uncaused cause&lt;br /&gt;
aavartanah: the unseen dynamism&lt;br /&gt;
abhipraayah: one who is faced by all seekers marching to the infinite&lt;br /&gt;
acalah: non-moving&lt;br /&gt;
achyutah: he who undergoes no changes&lt;br /&gt;
achyutah: infallible&lt;br /&gt;
acintyo: inconceivable&lt;br /&gt;
adbhutah: wonderful&lt;br /&gt;
adhaataa: above whom there is no other to command&lt;br /&gt;
adhishthaanam: the substratum of the entire universe&lt;br /&gt;
adhokshajah: one whose vitality never flows downwards&lt;br /&gt;
adhritah: without support&lt;br /&gt;
adrishyah: imperceptible&lt;br /&gt;
agraahyah: he who is not perceived sensually&lt;br /&gt;
agrajah: the first-born&lt;br /&gt;
agraneeh: he who guides us to the peak&lt;br /&gt;
ahah: he who is the nature of time&lt;br /&gt;
ahassamvartakah: he who thrills the day and makes it function vigorously&lt;br /&gt;
ajah: he who takes the form of aja, brahma&lt;br /&gt;
ajah: unborn&lt;br /&gt;
ajitah: vanquished by none&lt;br /&gt;
akroorah: never cruel&lt;br /&gt;
akshara: indestructible&lt;br /&gt;
aksharam: imperishable&lt;br /&gt;
akshobhyah: one who cannot be annoyed by anyone&lt;br /&gt;
akshobhyah: one who is ever unruffled&lt;br /&gt;
amaanee: without false vanity&lt;br /&gt;
amaraprabhuh: the lord of the devas&lt;br /&gt;
ambho-nidhir: the substratum of the four types of beings&lt;br /&gt;
ameyaatmaa: he who manifests in infinite varieties&lt;br /&gt;
ameyaatmaa: he whose essence is immeasurable&lt;br /&gt;
amitaashanah: of endless appetite&lt;br /&gt;
amitavikramah: of immeasurable prowess&lt;br /&gt;
amoghah: ever useful&lt;br /&gt;
amoghah: he whose acts are for a great purpose&lt;br /&gt;
amoortih: formless&lt;br /&gt;
amritaamsoodbhavo: the moon who gives flavor to vegetables&lt;br /&gt;
amritaashah: one whose desires are never fruitless&lt;br /&gt;
amritah: immortal&lt;br /&gt;
amritapah: one who drinks the nectar&lt;br /&gt;
amritavapuh: he whose form is immortal&lt;br /&gt;
amrityuh: he who knows no death&lt;br /&gt;
anaadi-nidhanah: he without origin or end&lt;br /&gt;
anaadih: one who is the first cause&lt;br /&gt;
anaamayah: one who has no diseases&lt;br /&gt;
anaghah: sinless&lt;br /&gt;
analah: fire&lt;br /&gt;
analah: one of unlimited wealth, power and glory&lt;br /&gt;
anantaatmaa: the infinite self&lt;br /&gt;
anantah: endless&lt;br /&gt;
anantajit: ever-victorious&lt;br /&gt;
anantaroopah: one of infinite forms&lt;br /&gt;
anantashreeh: full of infinite glories&lt;br /&gt;
anarthah: one to whom there is nothing yet to be fulfilled&lt;br /&gt;
anayah: one who has no leader&lt;br /&gt;
aneeshah: one who has none to lord over him&lt;br /&gt;
anekamoortih: multi-formed&lt;br /&gt;
anilah: air&lt;br /&gt;
anilah: one who never slips&lt;br /&gt;
animishah: he who remains unwinking; ever knowing&lt;br /&gt;
anirdeshya-vapuh: he whose form is indescribable&lt;br /&gt;
anirdeshya-vapuh: of indescribable form&lt;br /&gt;
aniruddhah: he who cannot be obstructed&lt;br /&gt;
anirvinnah: he who has no discontent&lt;br /&gt;
anirvinnah: one who feels no disappointment&lt;br /&gt;
anivartee: one who never retreats&lt;br /&gt;
aniyantaa: one who has no controller&lt;br /&gt;
annaadah: one who eats the food&lt;br /&gt;
annam: one who is food&lt;br /&gt;
anniruddhah: he who is invincible by any enemy&lt;br /&gt;
antakah: the death&lt;br /&gt;
anuh: the subtlest&lt;br /&gt;
anukoolah: well-wisher of everyone&lt;br /&gt;
anuttamah: incomparably great&lt;br /&gt;
apaam-nidhih: treasure of waters (the ocean)&lt;br /&gt;
aparaajitah: one who cannot be defeated&lt;br /&gt;
apramattah: he who never makes a wrong judgement 326) pratishthitah: he who has no cause&lt;br /&gt;
aprameyaatmaa: a soul not known through the pramanas&lt;br /&gt;
aprameyah: he who cannot be perceived&lt;br /&gt;
apratirathah: one who has no enemies to threaten him&lt;br /&gt;
apyayah: the one in whom the universe merges&lt;br /&gt;
araudrah: one who has no negative emotions or urges&lt;br /&gt;
aravindaakshah: he who has eyes as beautiful as the lotus&lt;br /&gt;
archishmaan: the effulgent&lt;br /&gt;
architah: one who is constantly worshipped by his devotees&lt;br /&gt;
arhah: one who deserves to be worshiped&lt;br /&gt;
arkah: one who is in the form of the sun&lt;br /&gt;
arthah: he who is worshiped by all&lt;br /&gt;
asankhyeyah: he who has numberlesss names and forms&lt;br /&gt;
asat: illusion&lt;br /&gt;
ashokah: he who has no sorrow&lt;br /&gt;
ashvattas: tree of life&lt;br /&gt;
ateendrah: he who surpasses indra&lt;br /&gt;
ateendriyo: beyond the sense organs&lt;br /&gt;
athaaparaajitah: the unvanquished&lt;br /&gt;
atulah: incomparable&lt;br /&gt;
aushadham: medicine&lt;br /&gt;
avijnaataa: the non-knower (the knower being the conditioned soul within the body)&lt;br /&gt;
avyaktah: unmanifeset&lt;br /&gt;
avyangah: without imperfections&lt;br /&gt;
avyayah: without destruction&lt;br /&gt;
ayamah: one who knows no death&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;b&amp;quot;)&quot;&gt;b (54)&lt;/a&gt;&lt;div id=&quot;b&quot; style=&quot;display: none;&quot;&gt;babhrur: he who rules over all the worlds&lt;br /&gt;
bahu-shiraah: he who has many heads&lt;br /&gt;
beejamavyayam: the immutable seed&lt;br /&gt;
bhaanuh: self-effulgent&lt;br /&gt;
bhaarabhrit: one who carries the load of the universe&lt;br /&gt;
bhaaskara-dyutih: the effulgence of the sun&lt;br /&gt;
bhaavanah: he who gives everything to his devotees&lt;br /&gt;
bhaavo: he who becomes all moving and nonmoving things&lt;br /&gt;
bhagahaa: one who destroys the six opulences during pralaya&lt;br /&gt;
bhagavaan: one who possesses six opulences&lt;br /&gt;
bhaktavatsalah: one who loves his devotees&lt;br /&gt;
bhartaa: he who governs the entire living world&lt;br /&gt;
bhayakrit: giver of fear&lt;br /&gt;
bhayanaashanah: destroyer of fear&lt;br /&gt;
bhayapahah: one who destroys all fears&lt;br /&gt;
bheema-paraakramah: one whose prowess is fearful to his enemies&lt;br /&gt;
bheemah: terrible form&lt;br /&gt;
bheemah: the terrible&lt;br /&gt;
bheshajam: medicine&lt;br /&gt;
bhishak: physician&lt;br /&gt;
bhojanam: he who is the sense-objects&lt;br /&gt;
bhoktaa: the enjoyer&lt;br /&gt;
bhoktaaa: one who enjoys&lt;br /&gt;
bhoogarbhah: he who is the womb of the world&lt;br /&gt;
bhoor-bhuvah svas-taruh: the tree of bhur, bhuvah and svah&lt;br /&gt;
bhoor-bhuvo: the substratum of the earth&lt;br /&gt;
bhooridakshinah: he who gives away large gifts&lt;br /&gt;
bhooshanah: one who adorns the world&lt;br /&gt;
bhooshayah: one who rested on the ocean shore (rama)&lt;br /&gt;
bhoota-bhaavanah: the cause of the growth and birth of all creatures&lt;br /&gt;
bhoota-bhavya-bhavan-naathah: the lord of past, present and future&lt;br /&gt;
bhoota-bhavya-bhavat-prabhuh: the lord of past, present and future&lt;br /&gt;
bhoota-bhrit: he who nourishes all creatures&lt;br /&gt;
bhoota-krit: the creator of all creatures&lt;br /&gt;
bhoota-maheshvarah: the great lord of beings&lt;br /&gt;
bhootaadih: the cause of the five great elements&lt;br /&gt;
bhootaatmaa: the aatman of all beings&lt;br /&gt;
bhootaavaaso: the dwelling place of the elements&lt;br /&gt;
bhootih: one who is pure existence&lt;br /&gt;
bhraajishnur: self-effulgent consciousness&lt;br /&gt;
bhujagottamah: the serpent ananta&lt;br /&gt;
braahmana-priyah: dear to the brahmanas&lt;br /&gt;
braahmanah: one who has realised brahman&lt;br /&gt;
brahma-vivardhanah: one who increases the brahman&lt;br /&gt;
brahma: biggest&lt;br /&gt;
brahmaa: creator&lt;br /&gt;
brahmajno: one who knows the nature of brahman&lt;br /&gt;
brahmakrit: one who acts in brahman&lt;br /&gt;
brahmanyah: protector of brahman (anything related to narayana)&lt;br /&gt;
brahmavid: one who knows brahman&lt;br /&gt;
brahmee: one who is with brahma&lt;br /&gt;
brihad-roopah: vast, of infinite dimensions&lt;br /&gt;
brihat-bhaanuh: he who illumines the world with the rays of the sun and moon&lt;br /&gt;
brihat: the greatest&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;c&amp;quot;)&quot;&gt;c (20)&lt;/a&gt;&lt;div id=&quot;c&quot; style=&quot;display: none;&quot;&gt;chaanooraandhra-nishoodanah: the slayer of canura&lt;br /&gt;
chakra-gadaadharah: bearer of the disc and mace&lt;br /&gt;
chakree: carrier of sudarsana&lt;br /&gt;
chakree: holder of the chakra&lt;br /&gt;
chalah: moving&lt;br /&gt;
chandanaangadee: one who has attractive armlets&lt;br /&gt;
chandraamshuh: the rays of the moon&lt;br /&gt;
chatur-vedavid: knower of all four vedas&lt;br /&gt;
chaturaatmaa: clear-minded&lt;br /&gt;
chaturaatmaa: the four-fold self&lt;br /&gt;
chaturashrah: one who deals squarely&lt;br /&gt;
chaturbaahuh: four-handed&lt;br /&gt;
chaturbhaavas: the source of the four&lt;br /&gt;
chaturbhujah: four-handed&lt;br /&gt;
chaturdamstrah: he who has four canines (nrsimha)&lt;br /&gt;
chaturgatih: the ultimate goal of all four varnas and asramas&lt;br /&gt;
chaturmoortih: four-formed&lt;br /&gt;
chaturvyoohah: one who expresses himself as the dynamic centre in the four vyoohas&lt;br /&gt;
chaturvyoohah: vasudeva, sankarshan etc&lt;br /&gt;
chinnasamshayah: one whose doubts are ever at rest&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;d&amp;quot;)&quot;&gt;d (57)&lt;/a&gt;&lt;div id=&quot;d&quot; style=&quot;display: none;&quot;&gt;daamodarah: whose stomach is marked with three lines&lt;br /&gt;
daarunah: merciless towards the unrighteous&lt;br /&gt;
daashaarhah: one who was born in the dasarha race&lt;br /&gt;
dakshah: prompt&lt;br /&gt;
dakshah: the smart&lt;br /&gt;
dakshinah: the most liberal&lt;br /&gt;
damah: beautitude in the self&lt;br /&gt;
damanah: he who controls rakshasas&lt;br /&gt;
damayitaa: the controller&lt;br /&gt;
dandah: one who punishes the wicked&lt;br /&gt;
darpadah: one who creates pride, or an urge to be the best, among the righteous&lt;br /&gt;
darpahaa: the destroyer of pride in evil-minded people&lt;br /&gt;
deeptamoortir: of resplendent form&lt;br /&gt;
devabhrit-guruh: advisor of indra&lt;br /&gt;
devah: he who revels&lt;br /&gt;
devakee-nandanah: son of devaki&lt;br /&gt;
deveshah: the lord of all devas&lt;br /&gt;
dhaama: the goal&lt;br /&gt;
dhaataa: he who supports all fields of experience&lt;br /&gt;
dhaaturuttamah: the subtlest atom&lt;br /&gt;
dhananjayah: one who gained wealth through conquest&lt;br /&gt;
dhaneshvarah: the lord of wealth&lt;br /&gt;
dhanurdharah: the wielder of the bow&lt;br /&gt;
dhanurvedah: one who declared the science of archery&lt;br /&gt;
dhanvee: he who always has a divine bow&lt;br /&gt;
dhanyah: fortunate&lt;br /&gt;
dharaadharah: the sole support of the earth&lt;br /&gt;
dharaneedharah: he who supports the earth&lt;br /&gt;
dharma-yoopah: the post to which all dharma is tied&lt;br /&gt;
dharmaadhyakshah: he who presides over dharma&lt;br /&gt;
dharmagub: one who protects dharma&lt;br /&gt;
dharmah: the law of being&lt;br /&gt;
dharmakrit: one who acts according to dharma&lt;br /&gt;
dharmaviduttamah: the highest among men of realisation&lt;br /&gt;
dharmee: the supporter of dharma&lt;br /&gt;
dhritaatmaa: established in himself&lt;br /&gt;
dhruvah: the changeless in the midst of changes&lt;br /&gt;
dhuryah: who carries out creation etc without hitch&lt;br /&gt;
dishah: one who advises and gives knowledge&lt;br /&gt;
divah-sprik: sky-reaching&lt;br /&gt;
dravinapradah: one who lavishly gives wealth&lt;br /&gt;
dridhah: the firm&lt;br /&gt;
driptah: one whio is drunk with infinite bliss&lt;br /&gt;
duh-svapna-naashanah: one who destroys all bad dreams&lt;br /&gt;
duraadharshah: he who cannot be attacked successfully&lt;br /&gt;
duraarihaa: slayer of the asuras&lt;br /&gt;
duraavaasah: not easy to lodge&lt;br /&gt;
duratikramah: one who is difficult to be disobeyed&lt;br /&gt;
durdharah: the object of contemplation&lt;br /&gt;
durdurdharah: he who cannot be known by great yogis 267) vaagmee: he who is eloquent in speech&lt;br /&gt;
durgah: not easy to storm into&lt;br /&gt;
durgamah: one who is realised with great effort&lt;br /&gt;
durjayah: the invincible&lt;br /&gt;
durlabhah: one who obtained with effort&lt;br /&gt;
durmarshanah: he who cannot be vanquished&lt;br /&gt;
dushkritihaa: destroyer of bad actions&lt;br /&gt;
dyutidharah: one who bears an effulgent form&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;e&amp;quot;)&quot;&gt;e (6)&lt;/a&gt;&lt;div id=&quot;e&quot; style=&quot;display: none;&quot;&gt;eeshanah: the controller of the five great elements&lt;br /&gt;
eeshvarah: he who can do anything without any help&lt;br /&gt;
eeshvarah: the contoller&lt;br /&gt;
ekaatmaa: the one self&lt;br /&gt;
ekah: the one&lt;br /&gt;
ekapaat: one-footed &lt;br /&gt;
&lt;/div&gt;f (0)&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;g&amp;quot;)&quot;&gt;g (25)&lt;/a&gt;&lt;div id=&quot;g&quot; style=&quot;display: none;&quot;&gt;gabhastinemih: the hub of the universal wheel&lt;br /&gt;
gabheeraatmaa: too deep to be fathomed&lt;br /&gt;
gabheerah: the unfathomable&lt;br /&gt;
gadaadharah: carrier of kaumodakee club&lt;br /&gt;
gadaagrajah: one who is invoked through mantra&lt;br /&gt;
gahanah: the unknowable&lt;br /&gt;
gahano: impenetrable&lt;br /&gt;
garudadhvajah: one who has garuda on his flag&lt;br /&gt;
gatisattamah: the ultimate refuge for all devotees&lt;br /&gt;
ghritaaseeh: one who has no need for good wishes&lt;br /&gt;
gohitah: one who does welfare for cows&lt;br /&gt;
gopatih: husband of the earth&lt;br /&gt;
gopatih: the shepherd&lt;br /&gt;
goptaa: protector of the universe&lt;br /&gt;
goptaa: the protector&lt;br /&gt;
govidaam-patih: the lord of all men of wisdom&lt;br /&gt;
govindah: one who is known through vedanta&lt;br /&gt;
govindah: the protector of the cows&lt;br /&gt;
graamaneeh: he who leads the flock&lt;br /&gt;
guhah: he who dwells in the cave of the heart&lt;br /&gt;
guhyo: the mysterious&lt;br /&gt;
gunabhrit: one who supports&lt;br /&gt;
guptah: the well-concealed&lt;br /&gt;
guruh: the teacher&lt;br /&gt;
gurutamah: the greatest teacher&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;h&amp;quot;)&quot;&gt;h (13)&lt;/a&gt;&lt;div id=&quot;h&quot; style=&quot;display: none;&quot;&gt;halaayudhah: one who has a plough as his weapon&lt;br /&gt;
hamsah: the swan&lt;br /&gt;
harih: the destroyer&lt;br /&gt;
havih: the oblation&lt;br /&gt;
havirharih: the receiver of all oblation&lt;br /&gt;
hemaangah: one who has limbs of gold&lt;br /&gt;
hetuh: the cause&lt;br /&gt;
hiranyagarbhah: he who dwells in the womb of the world&lt;br /&gt;
hiranyagarbhah: the creator&lt;br /&gt;
hiranyanaabhah: he who has a golden navel&lt;br /&gt;
hrisheekeshah: the lord of the senses&lt;br /&gt;
hutabhuk: one who accepts oblations&lt;br /&gt;
hutabhuk: one who enjoys all that is offered in yajna&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;i&amp;quot;)&quot;&gt;i (3)&lt;/a&gt;&lt;br /&gt;
&lt;div id=&quot;i&quot; style=&quot;display: none;&quot;&gt;ijyah: he who is fit to be invoked through yajna&lt;br /&gt;
indrakarmaa: one who always performs gloriously auspicious actions&lt;br /&gt;
ishtah: he who is invoked through vedic rituals&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;j&amp;quot;)&quot;&gt;j (22)&lt;/a&gt;&lt;div id=&quot;j&quot; style=&quot;display: none;&quot;&gt;jagadaadijah: born at the beginning of the world&lt;br /&gt;
jagatas-setuh: a bridge across the material energy&lt;br /&gt;
jahnuh: leader of men&lt;br /&gt;
jana-janmaadir: the cause of the birth of all creatures&lt;br /&gt;
janaardanah: he who gives joy to good people&lt;br /&gt;
jananah: he who delivers all living creatures&lt;br /&gt;
janeshvarah: the lord of the people&lt;br /&gt;
janma-mrityu-jaraatigah: one who knows no birth, death or old age in himself&lt;br /&gt;
jayah: the victorious&lt;br /&gt;
jayantah: the conquerer of all enemies&lt;br /&gt;
jeevah: one who functions as the ksetrajna&lt;br /&gt;
jeevanah: the life spark in all creatures&lt;br /&gt;
jetaa: ever-successful&lt;br /&gt;
jita-krodhah: one who has conquered anger&lt;br /&gt;
jitaamitrah: one who has conquered all enemies&lt;br /&gt;
jitamanyuh: one who has no anger&lt;br /&gt;
jnaanagamyah: one who is experienced through pure knowledge&lt;br /&gt;
jnaanamuttamam: the supreme knowledge&lt;br /&gt;
jyeshthah: older than all&lt;br /&gt;
jyotih: self-effulgent&lt;br /&gt;
jyotir-ganeshvarah: lord of the luminaries in the cosmos&lt;br /&gt;
jyotiraadityah: the resplendence of the sun&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;k&amp;quot;)&quot;&gt;k (58)&lt;/a&gt;&lt;div id=&quot;k&quot; style=&quot;display: none;&quot;&gt;kaalah: he who judges and punishes beings&lt;br /&gt;
kaalanemi-nihaa: slayer of kalanemi&lt;br /&gt;
kaamadevah: the beloved lord&lt;br /&gt;
kaamah: the beloved&lt;br /&gt;
kaamahaa: he who destroys all desires&lt;br /&gt;
kaamakrit: he who fulfills all desires&lt;br /&gt;
kaamapaalah: the fulfiller of desires&lt;br /&gt;
kaamapradah: he who supplies desired objects&lt;br /&gt;
kaamee: one who has fulfilled all his desires&lt;br /&gt;
kaantah: he who is of enchanting form&lt;br /&gt;
kaantah: of enchanting form&lt;br /&gt;
kaaranam: the cause&lt;br /&gt;
kah: one who is of the nature of bliss&lt;br /&gt;
kanakaangadee: wearer of bright-as-gold armlets&lt;br /&gt;
kapeendrah: lord of the monkeys (rama)&lt;br /&gt;
kapih: one who drinks water&lt;br /&gt;
kapilah: the great sage kapila&lt;br /&gt;
karanam: the instrument&lt;br /&gt;
kartaa: the doer&lt;br /&gt;
kathitah: one who is glorified in all scriptures&lt;br /&gt;
kavih: the seer&lt;br /&gt;
keshavah: he who has beautiful locks of hair&lt;br /&gt;
keshavah: one whose rays illumine the cosmos&lt;br /&gt;
keshihaa: killer of kesi&lt;br /&gt;
khanda-parashur: one who holds an axe&lt;br /&gt;
kim: what (the one to be inquired into)&lt;br /&gt;
kramah: all-pervading&lt;br /&gt;
kratuh: the animal-sacrifice&lt;br /&gt;
krishah: delicate, lean&lt;br /&gt;
krishnah: dark-complexioned&lt;br /&gt;
krishno: he whose complexion is dark&lt;br /&gt;
krita-akritah: all that is created and not created&lt;br /&gt;
kritaagamah: author of the vedas&lt;br /&gt;
kritaagamah: the author of the agama scriptures&lt;br /&gt;
kritaantakrit: destroyer of the creation&lt;br /&gt;
kritajnah: he who knows all that is&lt;br /&gt;
kritajnah: the knower of the creation&lt;br /&gt;
kritakarmaa: one who has fulfilled his acts&lt;br /&gt;
kritalakshanah: one who is famous for his qualities&lt;br /&gt;
kritih: he who rewards all our actions&lt;br /&gt;
krodhahaa: he who destroys anger&lt;br /&gt;
krodhakrit-kartaa: he who generates anger against the lower tendency&lt;br /&gt;
kshaamah: he who ever remains without any scarcity&lt;br /&gt;
kshaamah: one who destroys everything&lt;br /&gt;
kshamah: he who is supremely efficient in all undertakings&lt;br /&gt;
kshaminaam-varah: one who has the greatest amount of patience with sinners&lt;br /&gt;
ksharam: he who appears to perish&lt;br /&gt;
kshemakrit: doer of good&lt;br /&gt;
kshetrajnah: the knower of the field&lt;br /&gt;
kshiteeshah: the lord of the earth&lt;br /&gt;
kshobhanah: the agitator&lt;br /&gt;
kumbhah: the pot within whom everything is contained&lt;br /&gt;
kumudah: he who delights in the earth&lt;br /&gt;
kumudah: one who gladdens the earth&lt;br /&gt;
kundah: one who is as attractive as kunda flowers&lt;br /&gt;
kundalee: one who wears shark earrings&lt;br /&gt;
kundarah: the one who lifted the earth&lt;br /&gt;
kuvaleshayah: he who reclines in the waters&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;l&amp;quot;)&quot;&gt;l (10)&lt;/a&gt;&lt;div id=&quot;l&quot; style=&quot;display: none;&quot;&gt;lakshmeeh: the glory of the universe&lt;br /&gt;
lakshmeevaan: the consort of laksmi&lt;br /&gt;
lohitaakshah: red-eyed&lt;br /&gt;
loka-trayaashrayah: shelter of the three worlds&lt;br /&gt;
lokaadhishthaanam: the substratum of the universe&lt;br /&gt;
lokaadhyakshah: he who presides over all lokas&lt;br /&gt;
lokabandhur: friend of the world&lt;br /&gt;
lokanaathah: lord of the world&lt;br /&gt;
lokasaarangah: one who understands the universe&lt;br /&gt;
lokasvaamee: lord of the universe&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;m&amp;quot;)&quot;&gt;m (64)&lt;/a&gt;&lt;div id=&quot;m&quot; style=&quot;display: none;&quot;&gt;maadhavah: born in the family of madhu&lt;br /&gt;
maadhavah: husband of lakshmi&lt;br /&gt;
maadhavo: the lord of all knowledge&lt;br /&gt;
maanadah: one who causes, by his maya, false identification with the body&lt;br /&gt;
maanyah: one who is to be honoured&lt;br /&gt;
maargah: the path&lt;br /&gt;
madhuh: sweet&lt;br /&gt;
madhusoodanah: destroyer of the madhu demon&lt;br /&gt;
mahaa-dyutih: greatly luminous&lt;br /&gt;
mahaa-makhah: the great sacrificer&lt;br /&gt;
mahaa-shaktih: all-powerful&lt;br /&gt;
mahaa-veeryah: the supreme essence&lt;br /&gt;
mahaabalah: he who has supreme strength&lt;br /&gt;
mahaabhaago: he who gets the greates share in every yajna&lt;br /&gt;
mahaabhogah: he who is of the nature of enjoyment&lt;br /&gt;
mahaabhootah: the great being&lt;br /&gt;
mahaabuddhir: he who has supreme intelligence&lt;br /&gt;
mahaadevah: the great deity&lt;br /&gt;
mahaadhanah: he who is supremely rich&lt;br /&gt;
mahaadri-dhrik: he who supports the great mountain&lt;br /&gt;
mahaagartah: the great chasm&lt;br /&gt;
mahaahavih: the great offering&lt;br /&gt;
mahaahradah: one who is like a great refreshing swimming pool&lt;br /&gt;
mahaakarmaa: one who accomplishes great acts&lt;br /&gt;
mahaakarmaa: one who performs great deeds&lt;br /&gt;
mahaakoshah: he who has got around him great sheaths&lt;br /&gt;
mahaakramo: of great step&lt;br /&gt;
mahaakratuh: the great sacrifice&lt;br /&gt;
mahaakshah: the great-eyed&lt;br /&gt;
mahaamanaah: great-minded&lt;br /&gt;
mahaamayo: the supreme master of all maayaa&lt;br /&gt;
mahaamortir: the great form&lt;br /&gt;
mahaan: the mighty&lt;br /&gt;
mahaanidhih: the great abode&lt;br /&gt;
mahaarhah: one who deserves the highest worship&lt;br /&gt;
mahaashringah: great-horned (matsya)&lt;br /&gt;
mahaasvanah: he who has a thundering voice&lt;br /&gt;
mahaatapaah: he of great tapas&lt;br /&gt;
mahaatejaah: one of great resplendence&lt;br /&gt;
mahaavaraaho: the great boar&lt;br /&gt;
mahaayajnah: the great yajna&lt;br /&gt;
mahaayajvaa: one who performed great yajnas&lt;br /&gt;
maharddhi: one who has great prosperity&lt;br /&gt;
maharshih kapilaachaaryah: he who incarnated as kapila, the great sage&lt;br /&gt;
maheebhartaa: the husband of mother earth&lt;br /&gt;
maheedharah: the bearer of the earth&lt;br /&gt;
maheedharah: the support of the earth&lt;br /&gt;
mahejyah: one who is to be most worshiped&lt;br /&gt;
mahendrah: the lord of indra&lt;br /&gt;
maheshvaasah: he who wields shaarnga&lt;br /&gt;
mahodadhishayah: one who rests on the great ocean&lt;br /&gt;
mahoragah: the great serpent&lt;br /&gt;
mahotsaaho: the great enthusiast&lt;br /&gt;
mangalam param: the supreme auspiciousness&lt;br /&gt;
manoharah: the stealer of the mind&lt;br /&gt;
manojavah: swift as the mind&lt;br /&gt;
mantrah: the nature of the vedic mantras&lt;br /&gt;
manuh: he who has manifested as the vedic mantras&lt;br /&gt;
mareechih: effulgence&lt;br /&gt;
medhaavee: supremely intelligent&lt;br /&gt;
medhajah: born out of sacrifices&lt;br /&gt;
medineepatih: the lord of the earth&lt;br /&gt;
muktaanaam paramaa gatih: the final goal, reached by liberated souls&lt;br /&gt;
mukundah: the giver of liberation&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;n&amp;quot;)&quot;&gt;n (33)&lt;/a&gt;&lt;br /&gt;
&lt;div id=&quot;n&quot; style=&quot;display: none;&quot;&gt;naaraayanah: he who resides on the waters&lt;br /&gt;
naarasimha-vapuh: he whose form is man-lion&lt;br /&gt;
nahushah: he who binds all with maya&lt;br /&gt;
naika-roopo: he who has unlimited forms&lt;br /&gt;
naikaatmaa: many souled&lt;br /&gt;
naikah: the many&lt;br /&gt;
naikajah: one who is born many times&lt;br /&gt;
naikakarmakrit: one who does many actions&lt;br /&gt;
naikamaayah: he whose forms are endless and varied 303) mahaashanah: he who eats up everything&lt;br /&gt;
naikashringah: one who has many horns&lt;br /&gt;
nakshatranemir: the nave of the stars&lt;br /&gt;
nakshatree: the lord of the stars (the moon)&lt;br /&gt;
nandah: free from all worldly pleasures&lt;br /&gt;
nandakee: one who holds the nandaka sword&lt;br /&gt;
nandanah: one who makes others blissful&lt;br /&gt;
nandih: infinite bliss&lt;br /&gt;
narah: the guide&lt;br /&gt;
nayah: one who leads&lt;br /&gt;
netaa: the leader&lt;br /&gt;
neyah: the guide&lt;br /&gt;
nidhir-avyayah: the imperishable treasure&lt;br /&gt;
nigrahah: the killer&lt;br /&gt;
nimishah: he who has closed eyes in contemplation&lt;br /&gt;
nirgunah: without any properties&lt;br /&gt;
nirvaanam: all-bliss&lt;br /&gt;
nishthaa: abode of all beings&lt;br /&gt;
nivritaatmaa: the soul retreated from matter&lt;br /&gt;
nivrittaatmaa: one who is fully restrained from all sense indulgences&lt;br /&gt;
nivrittaatmaa: one whose mind is turned away from sense indulgence&lt;br /&gt;
niyamah: one who is not under anyone&#39;s laws&lt;br /&gt;
niyamo: the appointing authority&lt;br /&gt;
nyaayah: justice&lt;br /&gt;
nyagrodhah: the one who veils himself with maya&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;o&amp;quot;)&quot;&gt;o (4)&lt;/a&gt;&lt;br /&gt;
&lt;div id=&quot;o&quot; style=&quot;display: none;&quot;&gt;ojas-tejo-dyutidharah: the possessor of vitality, effulgence and beauty&lt;br /&gt;
oordhvagah: one who is on top of everything&lt;br /&gt;
oorjita-shaasanah: one who commands with his hand&lt;br /&gt;
oorjitah: he who has infinite vitality&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;p&amp;quot;)&quot;&gt;p (81)&lt;/a&gt;&lt;div id=&quot;p&quot; style=&quot;display: none;&quot;&gt;paapa-naashanah: destroyer of sin&lt;br /&gt;
paavanah: he who gives life-sustaining power to air&lt;br /&gt;
paavanah: one who ever purifies&lt;br /&gt;
padam-anuttamam: the unequalled state of perfection&lt;br /&gt;
padmagarbhah: he who is being meditated upon in the lotus of the heart&lt;br /&gt;
padmanaabhah: he from whose navel comes the lotus&lt;br /&gt;
padmanaabhah: he who has a lotus-navel&lt;br /&gt;
padmanaabhah: he whose navel is like a lotus&lt;br /&gt;
padmanibhekshanah: lotus-eyed&lt;br /&gt;
padmee: he who holds a lotus&lt;br /&gt;
panah: the supreme universal manager&lt;br /&gt;
paraayanam: the way to liberation&lt;br /&gt;
paramaatmaa: the supersoul&lt;br /&gt;
paramaspashtah: the extremely vivid&lt;br /&gt;
parameshthee: one who is readily available for experience within the heart&lt;br /&gt;
parameshvarah: the supreme lord&lt;br /&gt;
pararddhih: he who has supreme manifestations&lt;br /&gt;
parigrahah: the receiver&lt;br /&gt;
parjanyah: he who is similar to rain-bearing clouds&lt;br /&gt;
paryavasthitah: one who dwells everywhere&lt;br /&gt;
pavanah: the air that fills the universe&lt;br /&gt;
pavitram: he who gives purity to the heart&lt;br /&gt;
peshalah: one who is supremely soft&lt;br /&gt;
poorayitaa: the fulfiller&lt;br /&gt;
poornah: the complete&lt;br /&gt;
pootaatmaa: he with an extremely pure essence&lt;br /&gt;
praagvamshah: one who has the most ancient ancestry&lt;br /&gt;
praamshuh: he with a huge body&lt;br /&gt;
praanadah: giver of life&lt;br /&gt;
praanadah: he who gives life&lt;br /&gt;
praanadah: he who gives prana&lt;br /&gt;
praanah: life&lt;br /&gt;
praanah: the prana in all living creatures&lt;br /&gt;
praanajeevanah: he who maintains the life-breath in all living creatures&lt;br /&gt;
praananilayah: he in whom all prana is established&lt;br /&gt;
praanibhrit: he who rules over all pranas&lt;br /&gt;
praano: he who ever lives&lt;br /&gt;
prabhavah: the womb of the five great elements&lt;br /&gt;
prabhootas: ever-full&lt;br /&gt;
prabhuh: the almighty lord&lt;br /&gt;
prabhuh: the lord&lt;br /&gt;
pradhaana-purusheshvarah: lord of pradhaana and purusha&lt;br /&gt;
pradyumnah: very rich&lt;br /&gt;
pragrahah: receiver of worship&lt;br /&gt;
prajaa-bhavah: he from whom all praja comes&lt;br /&gt;
prajaagarah: ever-awakened&lt;br /&gt;
prajaapatih: he from whom all creatures emerge&lt;br /&gt;
prajaapatih: the lord of all creatures&lt;br /&gt;
prakaashaatmaa: the effulgent self&lt;br /&gt;
prakaashanah: he who illuminates&lt;br /&gt;
pramaanam: he whose form is the vedas&lt;br /&gt;
pramaanam: the proof&lt;br /&gt;
pramodanah: ever-blissful&lt;br /&gt;
pranavah: he who is praised by the gods&lt;br /&gt;
pranavah: omkara&lt;br /&gt;
prapitaamahah: the father of the father of beings (brahma)&lt;br /&gt;
prasanaatmaa: ever pure and all-blissful self&lt;br /&gt;
prataapanah: thermal energy; one who heats&lt;br /&gt;
pratardanah: the supreme destruction&lt;br /&gt;
prathitah: he who exists pervading all&lt;br /&gt;
pratyayah: he whose nature is knowledge&lt;br /&gt;
preetivardhanah: one who increases joy in the devotee&#39;s heart&lt;br /&gt;
prituh: the expanded&lt;br /&gt;
priyaarhah: one who deserves all our love&lt;br /&gt;
priyakrit: one who is ever-obliging in fulfilling our wishes&lt;br /&gt;
pundareekaakshah: he who dwells in the heart&lt;br /&gt;
punya-keertir: of holy fame&lt;br /&gt;
punya-shravana-keertanah: the hearing of whose glory causes holiness to grow&lt;br /&gt;
punyah: supremely pure&lt;br /&gt;
punyah: the truly holy&lt;br /&gt;
puraatanah: he who was even before time&lt;br /&gt;
purandarah: destroyer of cities&lt;br /&gt;
purujit: one who has conquered numerous enemies&lt;br /&gt;
purusattamah: the greatest of the great&lt;br /&gt;
purushah: he who dwells in the city of nine gates&lt;br /&gt;
purushah: one who dwells in all bodies&lt;br /&gt;
purushottamah: the supreme controller&lt;br /&gt;
pushkaraakshah: he who has eyes like the lotus&lt;br /&gt;
pushkaraakshah: lotus eyed&lt;br /&gt;
pushpahaasah: he who shines like an opening flower&lt;br /&gt;
pushtah: one who is ever-full&lt;br /&gt;
&lt;/div&gt;q (0)&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;r&amp;quot;)&quot;&gt;r (14)&lt;/a&gt;&lt;div id=&quot;r&quot; style=&quot;display: none;&quot;&gt;raamah: one who is most handsome&lt;br /&gt;
rakshanah: protector of the universe&lt;br /&gt;
ranapriyah: lover of battles&lt;br /&gt;
rathaanga-paanih: one who has the wheel of a chariot as his weapon&lt;br /&gt;
ratna-naabhah: of beautiful navel&lt;br /&gt;
ratnagarbhah: the jewel-wombed&lt;br /&gt;
ravih: one who dries up everything&lt;br /&gt;
ravilochanah: one whose eye is the sun&lt;br /&gt;
riddhah: full of prosperity&lt;br /&gt;
riddhah: he who has expanded himself as the universe&lt;br /&gt;
rituh: the seasons&lt;br /&gt;
rohitah: the fish incarnation&lt;br /&gt;
ruchiraangadah: one who wears resplendent shoulder caps&lt;br /&gt;
rudrah: he who makes all people weep&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;s&amp;quot;)&quot;&gt;s (243)&lt;/a&gt;&lt;div id=&quot;s&quot; style=&quot;display: none;&quot;&gt;saadhur: he who lives by the righteous codes&lt;br /&gt;
saakshee: the witness&lt;br /&gt;
saama: the sama veda&lt;br /&gt;
saamagaayanah: one who sings the sama songs&lt;br /&gt;
saamagah: the singer of the sama songs&lt;br /&gt;
saattvikah: one who is full of sattvic qualities&lt;br /&gt;
saatvataam-patih: the lord of the satvatas&lt;br /&gt;
sadaa-yogee: always in yoga&lt;br /&gt;
sadaamarshee: one who forgives the trespasses of his devotees&lt;br /&gt;
sadbhootih: one who has rich glories&lt;br /&gt;
sadgatih: the goal of good people&lt;br /&gt;
sahah: all-enduring&lt;br /&gt;
sahasra-moordhaa: he who has endless heads&lt;br /&gt;
sahasraakshah: thousands of eyes&lt;br /&gt;
sahasraamshur: the thousand-rayed&lt;br /&gt;
sahasraarchih: he who has thousands of rays&lt;br /&gt;
sahasrajit: he who vanquishes thousands&lt;br /&gt;
sahasrapaat: thousand-footed&lt;br /&gt;
sahishnuh: he who can suffer patiently&lt;br /&gt;
sahishnuh: one who calmly endures duality&lt;br /&gt;
sam-pramardanah: he who persecutes evil men&lt;br /&gt;
samaatmaa: he who is the same in all&lt;br /&gt;
samaavartah: the efficient turner&lt;br /&gt;
samah: calm&lt;br /&gt;
samah: equal&lt;br /&gt;
samayajnah: one whose worship is nothing more than keeping an equal vision of the mind by the devotee&lt;br /&gt;
sambhavah: he who descends of his own free will&lt;br /&gt;
sameehanah: one whose desires are auspicious&lt;br /&gt;
sameeranah: he who sufficiently administers all movements of all living creatures&lt;br /&gt;
samgrahah: he who holds everything together&lt;br /&gt;
samitinjayah: ever-victorious&lt;br /&gt;
samkha-bhrit: one who has the divine pancajanya&lt;br /&gt;
samksheptaa: the involver&lt;br /&gt;
sammitah: he who has been accepted by authorities&lt;br /&gt;
samnyaasa-krit: institutor of sannyasa&lt;br /&gt;
samsthaanah: the ultimate authority&lt;br /&gt;
samvatsarah: he from whom the concept of time comes&lt;br /&gt;
samvatsarah: the year&lt;br /&gt;
samvritah: he who is vieled from the jiva&lt;br /&gt;
sanaat: the beginningless and endless factor&lt;br /&gt;
sanaatanatamah: the most ancient&lt;br /&gt;
sandhaataa: the regulator&lt;br /&gt;
sandhimaan: he who seems to be conditioned&lt;br /&gt;
sankarshanochyutah: he who absorbs the whole creation into his nature and never falls away from that nature&lt;br /&gt;
sannivaasah: the abode of the good&lt;br /&gt;
santah: one who is expressed through saintly men&lt;br /&gt;
saptaidhaah: the seven effulgences in the flames&lt;br /&gt;
saptajihvah: he who expresses himself as the seven tongues of fire (types of agni)&lt;br /&gt;
saptavaahanah: one who has a vehicle of seven horses (sun)&lt;br /&gt;
sargah: he who creates the world from himself&lt;br /&gt;
sarva-drik: the seer of everything&lt;br /&gt;
sarva-lakshana-lakshanyah: known through all proofs&lt;br /&gt;
sarva-praharanaayudhah: he who has all implements for all kinds of assault and fight&lt;br /&gt;
sarva-shastra-bhritaam-varah: the best among those who wield weapons&lt;br /&gt;
sarva-vaageeshvareshvarah: lord of the lord of speech&lt;br /&gt;
sarva-yoga-vinissritah: he who is free from all attachments&lt;br /&gt;
sarvaadih: the beginning of all&lt;br /&gt;
sarvaasunilayah: the abode of all life energies&lt;br /&gt;
sarvadarshanah: all-seeing&lt;br /&gt;
sarvadarshee: all-knower&lt;br /&gt;
sarvadrik-vyaaso: one who creates many men of wisdom&lt;br /&gt;
sarvagah: all-pervading&lt;br /&gt;
sarvah: he who is everything&lt;br /&gt;
sarvajna: omniscient&lt;br /&gt;
sarvajno: omniscient&lt;br /&gt;
sarvakaamadah: one who fulfils all desires of true devotees&lt;br /&gt;
sarvasahah: one who carries the entire universe&lt;br /&gt;
sarvatah-chakshuh: one who has eyes everywhere&lt;br /&gt;
sarvato-mukhah: one who has his face turned everywhere&lt;br /&gt;
sarvavid-bhaanuh: all-knowing and effulgent&lt;br /&gt;
sarvavij-jayee: one who is at once omniscient and victorious&lt;br /&gt;
sarveshvarah: controller of all&lt;br /&gt;
sat-keertih: one of pure fame&lt;br /&gt;
sat: existence&lt;br /&gt;
sataam gatih: the goal for all virtuous people&lt;br /&gt;
sataam-gatih: refuge of the good&lt;br /&gt;
sataavarttah: he who takes infinite forms&lt;br /&gt;
satkartaa: he who adores good and wise people&lt;br /&gt;
satkritah: he who is adored by all good people&lt;br /&gt;
satkritih: one who is full of good actions&lt;br /&gt;
satparaayanah: the supreme goal for the good&lt;br /&gt;
satpathaachaarah: one who walks the path of truth&lt;br /&gt;
satram: protector of the good&lt;br /&gt;
satta: one without a second&lt;br /&gt;
sattvasthah: situated in sattva&lt;br /&gt;
sattvavaan: one who is full of exploits and courage&lt;br /&gt;
satya-dharma-paraakramah: one who champions heroically for truth and righteousness&lt;br /&gt;
satya-dharma-paraayanah: one who is the very abode of truth and dharma&lt;br /&gt;
satya-paraakramah: dynamic truth&lt;br /&gt;
satyadharmaa: one who has in himself all true dharmas&lt;br /&gt;
satyah: he who is himself the truth&lt;br /&gt;
satyah: the truth&lt;br /&gt;
satyah: truth&lt;br /&gt;
satyamedhah: one whose intelligence never fails&lt;br /&gt;
satyasandhah: of truthful resolution&lt;br /&gt;
savah: the nature of the sacrifice&lt;br /&gt;
savitaa: the father of all&lt;br /&gt;
savitaa: the one who brings forth the universe from himself&lt;br /&gt;
shaantah: peaceful within&lt;br /&gt;
shaantidah: giver of peace&lt;br /&gt;
shaantih: one whose very nature is peace&lt;br /&gt;
shaarnga-dhanvaa: one who aims his shaarnga bow&lt;br /&gt;
shaashvata-sthirah: one who is eternal and stable&lt;br /&gt;
shaashvatah-sthaanur: permanent and immovable&lt;br /&gt;
shaashvatah: he who always remains the same&lt;br /&gt;
shaastaa: he who rules over the universe&lt;br /&gt;
shabdaatigah: one who transcends all words&lt;br /&gt;
shabdasahah: one who allows himself to be invoked by vedic declarations&lt;br /&gt;
shaktimataam-shresthah: the best among the powerful&lt;br /&gt;
shambhuh: he who brings auspiciousness&lt;br /&gt;
sharabhah: one who dwells and shines forth through the bodies&lt;br /&gt;
sharanam: the refuge&lt;br /&gt;
shareera-bhootabhrit: one who nourishes the nature from which the bodies came&lt;br /&gt;
shareerabhrit: he who sustains all bodies&lt;br /&gt;
sharma: he who is himself infinite bliss&lt;br /&gt;
sharvaree-karah: creator of darkness&lt;br /&gt;
sharvas: the auspicious&lt;br /&gt;
shashabindhuh: the moon who has a rabbit-like spot 286) sureshvarah: a person of extreme charity&lt;br /&gt;
shataananah: many-faced&lt;br /&gt;
shataanandah: of infinite varieties and joys&lt;br /&gt;
shatamoortih: of many forms&lt;br /&gt;
shatrughnah: the destroyer of enemies&lt;br /&gt;
shatrujit: one who is ever victorious over his hosts of enemies&lt;br /&gt;
shatrutaapanah: the scorcher of enemies&lt;br /&gt;
shauri: one who always has invincible prowess&lt;br /&gt;
shaurih: he who incarnated in the dynasty of shoora&lt;br /&gt;
shikhandee: he who wears a peacock feather&lt;br /&gt;
shipivishtah: the presiding deity of the sun&lt;br /&gt;
shishirah: the cold season, winter&lt;br /&gt;
shishta-krit: the law-maker&lt;br /&gt;
shivah: auspiciousness&lt;br /&gt;
shivah: he who is eternally pure&lt;br /&gt;
shoka-naashanah: destroyer of sorrows&lt;br /&gt;
shoonyah: the void&lt;br /&gt;
shoora-janeshvarah: lord of the valiant&lt;br /&gt;
shoorah: the valiant&lt;br /&gt;
shoorasenah: one who has heroic and valiant armies&lt;br /&gt;
shramanah: one who persecutes the worldly people&lt;br /&gt;
shrashtaa: creator of all beings&lt;br /&gt;
shreedah: giver of opulence&lt;br /&gt;
shreedharah: holder of sree&lt;br /&gt;
shreegarbhah: he in whom are all glories&lt;br /&gt;
shreekarah: one who gives sree&lt;br /&gt;
shreemaan: he who is always courted by glories&lt;br /&gt;
shreemaan: he who is always with shree&lt;br /&gt;
shreemaan: possessor of sree&lt;br /&gt;
shreemaan: the possessor of light, effulgence, glory&lt;br /&gt;
shreemataam varah: the best among glorious&lt;br /&gt;
shreenidhih: the treasure of sree&lt;br /&gt;
shreenivaasah: one who dwells in the good people&lt;br /&gt;
shreenivaasah: the permanent abode of shree&lt;br /&gt;
shreepatih: lord of laksmi&lt;br /&gt;
shreeshah: the lord of sree&lt;br /&gt;
shreevatsa-vakshaah: one who has sreevatsa on his chest&lt;br /&gt;
shreevibhaavanah: distributor of sree&lt;br /&gt;
shreshthah: the most glorious&lt;br /&gt;
shrevaasah: abode of sree&lt;br /&gt;
shreyah: liberation&lt;br /&gt;
shringee: the horned one&lt;br /&gt;
shruti-saagarah: the ocean for all scripture&lt;br /&gt;
shubhaangah: one who has the most beautiful form&lt;br /&gt;
shubhaangah: one with enchanting limbs&lt;br /&gt;
shubhekshanah: all-auspicious gaze&lt;br /&gt;
shuchi-shravaah: he who has beautiful, sacred names&lt;br /&gt;
shuchih: he who is pure&lt;br /&gt;
shuchih: he who is spotlessly clean&lt;br /&gt;
siddhaarthah: he who has all arthas&lt;br /&gt;
siddhah: one who is perfection&lt;br /&gt;
siddhah: the most famous&lt;br /&gt;
siddhasankalpah: he who gets all he wishes for&lt;br /&gt;
siddhidah: the giver of benedictions&lt;br /&gt;
siddhih: he who gives moksha&lt;br /&gt;
siddhisaadhanah: the power behind our sadhana&lt;br /&gt;
simhah: he who destroys&lt;br /&gt;
simhah: the lion&lt;br /&gt;
sishteshtah: the greatest beloved&lt;br /&gt;
skanda-dharah: upholder of withering righteousness&lt;br /&gt;
skandah: he whose glory is expressed through subrahmanya&lt;br /&gt;
somah: one who as the moon nourishes plants&lt;br /&gt;
somapah: one who takes soma in the yajnas&lt;br /&gt;
sookshmah: the subtlest&lt;br /&gt;
sooryah: the one source from where everything is born&lt;br /&gt;
spashtaaksharo: one who is indicated by om&lt;br /&gt;
sragvee: he who always wears a garland of undecaying flowers&lt;br /&gt;
srashtaa: creator&lt;br /&gt;
stavapriyah: one who is invoked through prayer&lt;br /&gt;
stavyah: one who is the object of all praise&lt;br /&gt;
sthaanadah: he who confers the right abode&lt;br /&gt;
sthaanuh: the pillar, the immovable truth&lt;br /&gt;
sthaavarah-sthaanuh: the firm and motionless&lt;br /&gt;
sthaviro dhruvah: the ancient, motionless one&lt;br /&gt;
sthavishtah: the supremely gross&lt;br /&gt;
sthavishthah: one who is supremely huge&lt;br /&gt;
sthirah: steady&lt;br /&gt;
sthoolah: one who is the fattest&lt;br /&gt;
stotaa: one who adores or praises&lt;br /&gt;
stotram: the hymn&lt;br /&gt;
stutih: the act of praise&lt;br /&gt;
subhujah: he who has graceful arms&lt;br /&gt;
sudarshanah: he whose meeting is auspicious&lt;br /&gt;
sudhanvaa: one who has shaarnga&lt;br /&gt;
sughoshah: of auspicious sound&lt;br /&gt;
suhrit: friend of all creatures&lt;br /&gt;
sukhadah: giver of bliss to those who are liberated&lt;br /&gt;
sukhadah: giver of happiness&lt;br /&gt;
sulabhah: one who is readily available&lt;br /&gt;
sulochanah: one who has the most enchanting eyes&lt;br /&gt;
sumedhaa: one who has pure intelligence&lt;br /&gt;
sumukhah: one who has a charming face&lt;br /&gt;
sundah: of great mercy&lt;br /&gt;
sundarah: of unrivalled beauty&lt;br /&gt;
suparnah: beautiful-winged (two birds analogy)&lt;br /&gt;
suparnah: the golden leaf (vedas) bg 15.1&lt;br /&gt;
suprasaadah: fully satisfied&lt;br /&gt;
suraadhyaksho: he who presides over all devas&lt;br /&gt;
suraanando: he who gives out happiness&lt;br /&gt;
suraarihaa: destroyer of the enemies of the devas&lt;br /&gt;
sureshah: the lord of the demigods&lt;br /&gt;
suruchih: whose desire manifests as the universe&lt;br /&gt;
sushenah: he who has a charming army&lt;br /&gt;
sutantuh: beautifully expanded&lt;br /&gt;
sutapaah: he who has glorious tapas&lt;br /&gt;
suvarna-binduh: with limbs radiant like gold&lt;br /&gt;
suvarna-varnah: golden-coloured&lt;br /&gt;
suveerah: one who moves through various ways&lt;br /&gt;
suvratah: he who ever-perfoeming the pure vow&lt;br /&gt;
suvratah: one who has taken the most auspicious forms&lt;br /&gt;
suyaamunah: one who attended by the people who dwell on the banks of yamuna&lt;br /&gt;
svaabhaavyah: ever rooted in the nature of his own self&lt;br /&gt;
svaangah: one with well-proportioned limbs&lt;br /&gt;
svaapanah: one who puts people to sleep&lt;br /&gt;
svaasyah: one who has an effulgent face&lt;br /&gt;
svadhritah: self-supported&lt;br /&gt;
svakshah: beautiful-eyed&lt;br /&gt;
svangah: beautiful-limbed&lt;br /&gt;
svasti: one who is the source of all auspiciouness&lt;br /&gt;
svastibhuk: one who constantly enjoys auspiciousness&lt;br /&gt;
svastidah: giver of svasti&lt;br /&gt;
svastidakshinah: distributor of auspiciousness&lt;br /&gt;
svastikrit: one who robs all auspiciousness&lt;br /&gt;
svavashah: he who has everything under his control&lt;br /&gt;
svayambhooh: he who manifests from himself&lt;br /&gt;
svayamjaatah: self-born&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;t&amp;quot;)&quot;&gt;t (19)&lt;/a&gt;&lt;br /&gt;
&lt;div id=&quot;t&quot; style=&quot;display: none;&quot;&gt;taarah: he who saves&lt;br /&gt;
taarah: one who helps all to cross over&lt;br /&gt;
taaranah: he who enables others to cross&lt;br /&gt;
tantu-vardhanah: one who sustains the continuity of the drive for the family&lt;br /&gt;
tat: that&lt;br /&gt;
tattvam: the reality&lt;br /&gt;
tattvavit: one who has realised the reality&lt;br /&gt;
teerthakaro: the teacher of the tirthas&lt;br /&gt;
tejovrisho: one who showers radiance&lt;br /&gt;
tridashaadhyaksho: the lord of the three states of consciousness&lt;br /&gt;
trikakub-dhaama: the support of the three quarters&lt;br /&gt;
trilokaatmaa: the self of the three worlds&lt;br /&gt;
trilokadhrik: one who is the support of all the three worlds&lt;br /&gt;
trilokeshah: the lord of the three worlds&lt;br /&gt;
tripadah: one who has taken three steps&lt;br /&gt;
trisaamaa: one who is glorified by devas, vratas and saamans&lt;br /&gt;
trivikramah: one who took three steps&lt;br /&gt;
tushtah: one who is contented with a very simple offering&lt;br /&gt;
tvashtaa: he who makes huge things small&lt;br /&gt;
&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;u&amp;quot;)&quot;&gt;u (8)&lt;/a&gt;&lt;div id=&quot;u&quot; style=&quot;display: none;&quot;&gt;udbhavah: the originator&lt;br /&gt;
udbhavah: the ultimate source&lt;br /&gt;
udeernah: the great transcendent&lt;br /&gt;
udumbarah: nourishment of all living creatures&lt;br /&gt;
ugrah: the terrible&lt;br /&gt;
upendrah: the younger brother of indra (vaamana)&lt;br /&gt;
uttaaranah: one who lifts us out of the ocean of change&lt;br /&gt;
uttarah: he who lifts us from the ocean of samsara&lt;/div&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;v&amp;quot;)&quot;&gt;v (119)&lt;/a&gt;&lt;div id=&quot;v&quot; style=&quot;display: none;&quot;&gt;vaachaspatir-ayonijah: one who is the master of all vidyas and who is unborn through a womb&lt;br /&gt;
vaachaspatir-udaara-dheeh: he who is eloquent in championing the supreme law of life; he with a large-hearted intelligence&lt;br /&gt;
vaajasanah: the giver of food&lt;br /&gt;
vaamanah: he with a dwarf body&lt;br /&gt;
vaarunah: the son of varuna (vasistha or agastya)&lt;br /&gt;
vaasavaanujah: the brother of indra&lt;br /&gt;
vaasudevah: dwelling in all creatures although not affected by that condition&lt;br /&gt;
vaasudevah: one who envelops the world with maya&lt;br /&gt;
vaasudevo: the son of vasudeva&lt;br /&gt;
vaayuh: the air&lt;br /&gt;
vaayuvaahanah: controller of winds&lt;br /&gt;
vaayuvaahanah: the mover of the winds&lt;br /&gt;
vahnih: fire&lt;br /&gt;
vaidyah: the supreme doctor&lt;br /&gt;
vaikhaanah: the one who cut through the earth&lt;br /&gt;
vaikunthah: one who prevents men from straying on wrong paths&lt;br /&gt;
vamshavardhanah: he who multiplies his family of descendents&lt;br /&gt;
vanamaalee: one who wears a garland of forest flowers&lt;br /&gt;
varaangah: with beautiful limbs&lt;br /&gt;
varaaroho: the most glorious destination&lt;br /&gt;
varadah: he who fulfills boons&lt;br /&gt;
vardhamaanah: he who can grow into any dimension&lt;br /&gt;
vardhanah: the nurturer and nourisher&lt;br /&gt;
varunah: one who sets on the horizon (sun)&lt;br /&gt;
vashatkaarah: he who is invoked for oblations&lt;br /&gt;
vasudah: he who gives all wealth&lt;br /&gt;
vasuh: he who is wealth&lt;br /&gt;
vasuh: the refuge for all&lt;br /&gt;
vasuh: the support of all elements&lt;br /&gt;
vasumanaah: he whose mind is supremely pure&lt;br /&gt;
vasumanaah: one who is attentive to everything&lt;br /&gt;
vasupradah: the free-giver of wealth&lt;br /&gt;
vasupradah: the giver of salvation, the greatest wealth&lt;br /&gt;
vasuretaah: he whose essence is golden&lt;br /&gt;
vatsalah: the supremely affectionate&lt;br /&gt;
vatsarah: the abode&lt;br /&gt;
vatsee: the father&lt;br /&gt;
vedaangah: he whose limbs are the vedas&lt;br /&gt;
vedah: he who is the vedas&lt;br /&gt;
vedavid: the knower of the vedas&lt;br /&gt;
vedavit: he who contemplates upon the vedas&lt;br /&gt;
vedhaah: creator of the universe&lt;br /&gt;
vedyah: that which is to be known&lt;br /&gt;
veerabaahur: having mighty arms&lt;br /&gt;
veerah: the courageous&lt;br /&gt;
veerah: the heroic victor&lt;br /&gt;
veerah: the valiant&lt;br /&gt;
veerahaa: destroyer of valiant heroes&lt;br /&gt;
veerahaa: he who destroys the mighty heroes&lt;br /&gt;
veerahaa: one who ends the passage from womb to womb&lt;br /&gt;
veetabhayah: one with no fear&lt;br /&gt;
vegavaan: he who is swift&lt;br /&gt;
vibhuh: all-pervading&lt;br /&gt;
vibhuh: he who manifests in endless forms&lt;br /&gt;
vidaaranah: one who splits asunder&lt;br /&gt;
vidhaataa: all supporter&lt;br /&gt;
vidhaataa: the dispenser of fruits of action&lt;br /&gt;
vidheyaatmaa: one who is ever available for the devotees to command in love&lt;br /&gt;
vidishah: one who is unique in his giving&lt;br /&gt;
vidvattamah: one who has the greatest wisdom&lt;br /&gt;
vihaayasa-gatih: one who travels in space&lt;br /&gt;
vijayah: victorious&lt;br /&gt;
vijitaatmaa: one who has conquered the sense organs&lt;br /&gt;
vikartaa: creator of the endless varieties that make up the universe&lt;br /&gt;
vikramah: he who stepped (vaamana)&lt;br /&gt;
vikramee: he who is full of prowess&lt;br /&gt;
vikramee: the most daring&lt;br /&gt;
viksharah: imperishable&lt;br /&gt;
vimuktaatmaa: the ever-liberated self&lt;br /&gt;
vinayah: he who humiliates those who are unrighteous&lt;br /&gt;
vinayitaa-saakshee: the witness of modesty&lt;br /&gt;
viraamah: the abode of perfect-rest&lt;br /&gt;
virajo: passionless&lt;br /&gt;
virochanah: one who shines in different forms&lt;br /&gt;
vishama: unequalled&lt;br /&gt;
vishishtah: he who transcends all in his glory&lt;br /&gt;
vishnuh: all-pervading&lt;br /&gt;
vishnuh: he who pervades everywhere&lt;br /&gt;
vishnuh: long-striding&lt;br /&gt;
vishodhanah: the great purifier&lt;br /&gt;
vishokah: sorrowless&lt;br /&gt;
vishraamah: the resting place&lt;br /&gt;
vishuddhaatmaa: one who has the purest soul&lt;br /&gt;
vishva-dakshinah: the most skilful and efficient&lt;br /&gt;
vishva-dhrik: supporter of the world&lt;br /&gt;
vishvaatmaa: the soul of the universe&lt;br /&gt;
vishvabhuk: he who enjoys all experiences&lt;br /&gt;
vishvakarmaa: the creator of the universe&lt;br /&gt;
vishvaksenah: he against whom no army can stand&lt;br /&gt;
vishvam: he who is the universe, the virat-purusha&lt;br /&gt;
vishvamoortih: of the form of the entire universe&lt;br /&gt;
vishvayonih: he who incarnates because of the world 150) punarvasuh: he who lives repeatedly in different bodies&lt;br /&gt;
vishvayonih: the womb of the universe&lt;br /&gt;
visishtah: the noblest and most sacred&lt;br /&gt;
visrutaatmaa: he who is called atma in the vedas&lt;br /&gt;
vistaarah: the extension&lt;br /&gt;
visva-retaah: the seed of the universe&lt;br /&gt;
visvabaahuh: he whose hand is in everything&lt;br /&gt;
viviktah: separate&lt;br /&gt;
vriddhaatmaa: the ancient self&lt;br /&gt;
vrikshah: the tree&lt;br /&gt;
vrishaahee: controller of all actions&lt;br /&gt;
vrishaakapih: he who lifts the world to dharma&lt;br /&gt;
vrishaakritih: the form of dharma&lt;br /&gt;
vrishabhaaksho: one whose eyes rain fulfilment of desires&lt;br /&gt;
vrishabhah: he who showers all dharmas&lt;br /&gt;
vrishah: he who is dharma&lt;br /&gt;
vrishakarmaa: he whose every act is righteous&lt;br /&gt;
vrishaparvaa: the ladder leading to dharma (as well as dharma itself)&lt;br /&gt;
vrishapriyah: one who delights in dharma&lt;br /&gt;
vrishodarah: he from whose belly life showers forth&lt;br /&gt;
vyaadishah: one who is unique in his commanding power&lt;br /&gt;
vyaalah: the serpent (vyaalah) to athiests&lt;br /&gt;
vyaapee: all-pervading&lt;br /&gt;
vyaaptah: the pervader&lt;br /&gt;
vyagrah: one who is ever engaged in fulfilling the devotee&#39;s desires&lt;br /&gt;
vyaktaroopah: he who is perceptible to the yogi&lt;br /&gt;
vyavasaayah: resolute&lt;br /&gt;
vyavasthaanah: the substratum&lt;br /&gt;
&lt;/div&gt;w (0)&lt;br /&gt;
x (0)&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=31568098&amp;amp;postID=3341579743738378589#&quot; onclick=&quot;return toggle(&amp;quot;y&amp;quot;)&quot;&gt;y (22)&lt;/a&gt;&lt;div id=&quot;y&quot; style=&quot;display: none;&quot;&gt;yadu-shresthah: the best among the yadava clan&lt;br /&gt;
yajnaangah: one whose limbs are the things employed in yajna&lt;br /&gt;
yajnaantakrit: one who performs the concluding act of the yajna&lt;br /&gt;
yajnabhrid: the ruler of the yajanas&lt;br /&gt;
yajnabhuk: receiver of all that is offered&lt;br /&gt;
yajnaguhyam: the person to be realised by yajna&lt;br /&gt;
yajnah: one who is of the nature of yajna&lt;br /&gt;
yajnah: one whose very nature is yajna&lt;br /&gt;
yajnakrit: one who performs yajna&lt;br /&gt;
yajnapatih: the lord of all yajnas&lt;br /&gt;
yajnasaadhanah: one who fulfils all yajnas&lt;br /&gt;
yajnavaahanah: one who fulfils yajnas in complete&lt;br /&gt;
yajnee: enjoyer of yajnas&lt;br /&gt;
yajvaa: the one who performs yajna&lt;br /&gt;
yamah: the administrator&lt;br /&gt;
yat: which&lt;br /&gt;
yoga-vidaam netaa: the guide of those who know yoga&lt;br /&gt;
yogah: he who is realized through yoga&lt;br /&gt;
yogee: one who can be realised through yoga&lt;br /&gt;
yogeeshah: the king of yogis&lt;br /&gt;
yugaadi-krit: the creator of the yugas&lt;br /&gt;
yugaavartah: the law behind time&lt;/div&gt;z (0)</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/3341579743738378589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/3341579743738378589' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/3341579743738378589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/3341579743738378589'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2010/06/function-toggleid-var-e-document.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-377317181417900344</id><published>2009-09-20T22:53:00.000-07:00</published><updated>2009-11-07T20:28:50.175-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google App Engine"/><title type='text'></title><content type='html'>&lt;b&gt;Google App Engine &amp;amp; Cloud computing : Making world flat for Developers all over the world. &lt;/b&gt;&lt;br /&gt;The playing field for developers all over the world has been levelled with the advent of cloud computing &amp;amp; web services. It&#39;s pretty much free for any developer to develop/deploy application over the &lt;span id=&quot;SPELLING_ERROR_0&quot; class=&quot;blsp-spelling-corrected&quot;&gt;Internet&lt;/span&gt;. There is no start-up cost.Scaling up can happen incrementally based business requirement with upfront investment &amp;amp; I think that&#39;s &lt;span id=&quot;SPELLING_ERROR_1&quot; class=&quot;blsp-spelling-corrected&quot;&gt;revolutionary&lt;/span&gt; in my &lt;span id=&quot;SPELLING_ERROR_2&quot; class=&quot;blsp-spelling-corrected&quot;&gt;opinion&lt;/span&gt;.&lt;br /&gt;Here are my thoughts on Google App Engine, after deploying my first sample application.&lt;br /&gt;&lt;br /&gt;Salient features of Google App Engine&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Google started supporting java on their engine in April - 09 - &lt;a href=&quot;http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html&quot;&gt;Ref&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Support for Google Id and Sign In &lt;/li&gt;&lt;li&gt;&lt;span id=&quot;SPELLING_ERROR_3&quot; class=&quot;blsp-spelling-corrected&quot;&gt;Automatic&lt;/span&gt; Persistence -&lt;span id=&quot;SPELLING_ERROR_4&quot; class=&quot;blsp-spelling-error&quot;&gt;JDO&lt;/span&gt; or &lt;span id=&quot;SPELLING_ERROR_5&quot; class=&quot;blsp-spelling-error&quot;&gt;JPA&lt;/span&gt; (standards based approach, implementing standard Java &lt;span id=&quot;SPELLING_ERROR_6&quot; class=&quot;blsp-spelling-error&quot;&gt;APIs&lt;/span&gt; on top of App Engine where possible. So instead of using the underlying App Engine &lt;span id=&quot;SPELLING_ERROR_7&quot; class=&quot;blsp-spelling-error&quot;&gt;datastore&lt;/span&gt; &lt;span id=&quot;SPELLING_ERROR_8&quot; class=&quot;blsp-spelling-error&quot;&gt;API&lt;/span&gt;, developers can program against Java Data Objects or Java Persistence &lt;span id=&quot;SPELLING_ERROR_9&quot; class=&quot;blsp-spelling-error&quot;&gt;API&lt;/span&gt;) &lt;/li&gt;&lt;li&gt;Local Development - Remote &lt;span id=&quot;SPELLING_ERROR_10&quot; class=&quot;blsp-spelling-error&quot;&gt;Depolyment&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Scalability and free Use - Pretty cheap&lt;/li&gt;&lt;li&gt;Monitoring - Nice overview&lt;/li&gt;&lt;li&gt;Eclipse plug in - I did not face any problem with while deploying.&lt;/li&gt;&lt;li&gt;Limited support for &lt;span id=&quot;SPELLING_ERROR_11&quot; class=&quot;blsp-spelling-error&quot;&gt;JDK&lt;/span&gt; classes - When I tried converting my swing application to &lt;span id=&quot;SPELLING_ERROR_12&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; one I found many of classes I used were not supported like java.util.Timer classes&lt;/li&gt;&lt;li&gt;Native threads can&#39;t be spawned&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Google unleashed App Engine with support for Python in 2008(April). This was &lt;span id=&quot;SPELLING_ERROR_13&quot; class=&quot;blsp-spelling-error&quot;&gt;Google&#39;s&lt;/span&gt; first entry into on-demand application development and deployment. Developers were able to build, develop and easily deploy apps using Python. I think it has been successful in that.T&lt;b&gt;he economic impact of is that cloud computing disrupts the data center world by slashing the capital and skills required to deploy a web application. &lt;/b&gt;I am betting on success of this model.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;About the current application: &lt;a href=&quot;http://javatypingtester.appspot.com/&quot;&gt;java typing tutor&lt;/a&gt;&lt;/div&gt;&lt;div&gt;I created this sample application within an hour with GWT &amp;amp; published it. Initially I tried to porting my one of Swing application &quot;Java Typing Tutor&quot; which I created after reading the &lt;span id=&quot;SPELLING_ERROR_14&quot; class=&quot;blsp-spelling-error&quot;&gt;steve&lt;/span&gt; &lt;span id=&quot;SPELLING_ERROR_15&quot; class=&quot;blsp-spelling-error&quot;&gt;yegge&#39;s&lt;/span&gt; blog long back &lt;a href=&quot;http://steve-yegge.blogspot.com/2008/09/programmings-dirtiest-little-secret.html&quot;&gt;Programmings dirtiest little secret &lt;/a&gt;- BTW I don&#39;t believe that fast typist should also be better programmer in general, but it was interesting write up. Whenever I get time I do intent to make this application on par with my feature rich swing application.&lt;/div&gt;&lt;div&gt;&lt;span id=&quot;SPELLING_ERROR_16&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; - Although I feel very comfortable coding with this framework, (may be because I spent lot of time in coding Swing Apps) it&#39;s API limitations are quite annoying(java.util.Timer does&#39;t work etc...). Initially I had the impression that converting a Swing application to &lt;span id=&quot;SPELLING_ERROR_17&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; application is straight forward &amp;amp; I had even the ambition to write even converter!(paint() for &lt;span id=&quot;SPELLING_ERROR_18&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; widgets), But I guess now I realized that it&#39;s not possible. The programming style, approach are quite different. Once I used &lt;a href=&quot;http://wingsframework.org/cms/&quot;&gt;&lt;span id=&quot;SPELLING_ERROR_19&quot; class=&quot;blsp-spelling-error&quot;&gt;wingS&lt;/span&gt; &lt;/a&gt;framework to convert one of swing application to web - it was straight forward because of deep integration with swing, but now apparently that project has died. It &lt;span id=&quot;SPELLING_ERROR_20&quot; class=&quot;blsp-spelling-corrected&quot;&gt;definitely&lt;/span&gt; requires a different mindset to develop web application than developing swing application.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Finally some happy notes for swing programmers:&lt;br /&gt;&lt;i&gt;Wicket &amp;amp; &lt;span id=&quot;SPELLING_ERROR_21&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; are great saviours for struggling swing developers : &lt;/i&gt;With Swing &lt;span id=&quot;SPELLING_ERROR_22&quot; class=&quot;blsp-spelling-error&quot;&gt;GUIS&lt;/span&gt; losing their relevance, these 2 framework provides great pathway to move into web development.&lt;/div&gt;&lt;div&gt;Over all I feel &lt;a href=&quot;http://code.google.com/webtoolkit/&quot;&gt;&lt;span id=&quot;SPELLING_ERROR_23&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; &lt;/a&gt;&amp;amp; &lt;a href=&quot;http://wicket.apache.org/&quot;&gt;Wicket &lt;/a&gt;are great framework for Swing developers to develop web application in terms productivity. Rails/Grails (or any request/response framework) guys can never match component developers in terms of productivity :-)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Advantage of &lt;span id=&quot;SPELLING_ERROR_24&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; clients (or any fat client) is that they can tap into the resources of the client PC they are running on (such as memory to store state) and thus scale much better for large numbers of users. &lt;span id=&quot;SPELLING_ERROR_25&quot; class=&quot;blsp-spelling-error&quot;&gt;GWT&lt;/span&gt; produces something that is more akin to applets, independent applications that happen to be hosted on web page.&lt;/div&gt;&lt;div&gt;But where as,&lt;/div&gt;&lt;div&gt;&lt;div&gt;Wicket still assumes that you want to build at least part of your application the &#39;old fashioned&#39; &lt;/div&gt;&lt;div&gt;way, so that it will work without JavaScript, turn up in search engines, can be bookmarked so on...&lt;/div&gt;&lt;div&gt;So component developers can satisfy both the worlds.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, sans-serif; font-size: 14px; border-collapse: collapse; color: rgb(51, 51, 51); line-height: 18px; &quot;&gt;&quot;&lt;a href=&quot;http://www.guardian.co.uk/technology/2008/sep/29/cloud.computing.richard.stallman&quot;&gt;It&#39;s stupidity. It&#39;s worse than stupidity: it&#39;s a marketing hype campaign&lt;/a&gt;,&quot; -Richard Stallman&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:arial, sans-serif;font-size:130%;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 14px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://news.cnet.com/8301-13953_3-9917409-80.html&quot;&gt;Amazon looks to be better than Google for Cloud&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/377317181417900344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/377317181417900344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/377317181417900344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/377317181417900344'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/09/google-app-engine-cloud-computing.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7430267798604881660</id><published>2009-09-13T09:10:00.001-07:00</published><updated>2009-11-20T23:06:36.432-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="General"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Basics"/><title type='text'></title><content type='html'>&lt;h3&gt; Elements of Java Coding Styles&lt;/h3&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;p&gt;Java Coding Styles: Here are some of the tricks which I felt useful for java developers &amp;amp; I have been using them a lot. Again these are personal preferences, consider what you like &amp;amp; disdain if you don&#39;t. By end of the day the software professional is all about getting &quot;good working software, quickly and at low cost&quot; that can sustain for longer time &amp;amp; solves the business problem at hand (with YAGNI caveat). I want to keep updating this whenever I see interesting ones.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;Prefer smaller methods&lt;/span&gt;&lt;br /&gt;They look beautiful, easy to understand/reuse/change &amp;amp; test.&lt;/p&gt;&lt;p&gt;&lt;i&gt;&#39;As I did 20 years ago, I still fervently believe that the only way to make software secure, reliable, and fast is to make it small.&#39; - Andrew Tanenbaum&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Dr. Venkat gives wonderful explanation on - &lt;a href=&quot;http://www.agiledeveloper.com/blog/PermaLink.aspx?guid=8a745e85-2a34-4d9c-8c25-ca371530e281&quot;&gt;how to convince your fellow developer to write short methods?&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;Use JUnit test cases; assert statements and method/variable names as documentation, writing comments in JavaDoc are obsolete and useless many a times.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The purpose of the assert statement is to give you a way to catch program errors early, using assertions to state things you know (or think you know) about your program can improve readability &amp;amp; are great in serving as comments, they are intended to be cheap to write, just drop them into your code any time you think of them. They are great tool of communication for a programmer &amp;amp; can get rid of dumb English stuff in the code with // &amp;amp; /** */.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;There is nothing as useless as doing efficiently, which should not be done at all.&quot;  - Peter Drucker&lt;/i&gt;. &lt;/p&gt;&lt;p&gt;I hate to hear someone telling me to add javadoc comments especially for private methods. The method name variable name should be wise enough to reveal the intent. Fluent interface &amp;amp; design pattern can help a lot in naming variables, methods &amp;amp; class names. Over the years my variable &amp;amp; function names have become more verbose. It&#39;s so much easier to understand code from years ago when it reads like a sentence.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Big caveat with respect to assertions,&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Assertions should be used to specify things that to be true at various points in your program for providing the documentation &amp;amp; definitely NOT for error checking and any active code. Assertions are disabled (&quot;turned off&quot;) by default. Assertions were introduced in Java1.4 &amp;amp; can be turned on with -enableassertions (or -ea) flag on the java command line.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;amp; for JavaDoc,&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Code that isn&#39;t fully documented is unfinished and potentially useless. Javadoc comments on methods and classes should normally indicate what the method or class&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It was necessary document the type of keys and values in a Map, as well as the Map&#39;s purpose, but now with Java5 Generics that is also not required. Prior to Generics I always used to code List/*String*/ = new ArrayList();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Some&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Java 5 features are smart; Look for smarter new libraries that exploit these features well&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Use basic infrastructure libraries like Google Collections (I prefer this over apache collections), sl4j, Guice etc… as much as possible. We will learn to appreciate the value of Java-5 new features by looking into the source code of these libraries, Old coding styles have to be abandoned in favor new features.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Commenting the code with &quot;if(false)&quot; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;In many a times we want to use different implementation for testing &amp;amp; commenting out code temporarily. If the method is very long it&#39;s painful to comment out the whole block. Let us say we have method like this.&lt;/p&gt;&lt;p&gt;public void sendMail(){&lt;/p&gt;&lt;p&gt;if(true) return;&lt;/p&gt;&lt;p&gt;// Lot of code for adding to database to event&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;// Transforming text with XSL etc...&lt;/p&gt;&lt;p&gt;....&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;if(true) return; -&gt; This line has the same impact as the commenting out the whole stuff :)&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;Use double brace initialization (For non-performance intensive code),  If possible use Google Collections in all the cases.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;As swing programmer I have been using these quite long time. I have seen quite number of experienced java programmers aren&#39;t aware this. This really useful while testing. It&#39;s concise, requires less typing &amp;amp; more readable but comes with &lt;b&gt;cost. &lt;/b&gt;Google Collections provide better same feature without any performance cost.&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  line-height: 13px; font-family:-webkit-monospace;font-size:13px;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;java java&quot; id=&quot;ghl_java&quot; face=&quot;monospace&quot; size=&quot;13px&quot; color=&quot;transparent&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial;  vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-  background-position: initial initial; &quot;&gt;Map&lt;integer,&gt; map = new HashMap&lt;integer,&gt;() {{ &lt;/integer,&gt;&lt;/integer,&gt;&lt;/pre&gt;&lt;pre class=&quot;java java&quot; id=&quot;ghl_java&quot; face=&quot;monospace&quot; size=&quot;13px&quot; color=&quot;transparent&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial;  vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-  background-position: initial initial; &quot;&gt;&lt;integer,&gt;&lt;integer,&gt;    put(1, &quot;one&quot;);     &lt;/integer,&gt;&lt;/integer,&gt;&lt;/pre&gt;&lt;pre class=&quot;java java&quot; id=&quot;ghl_java&quot; face=&quot;monospace&quot; size=&quot;13px&quot; color=&quot;transparent&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial;  vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-  background-position: initial initial; &quot;&gt;&lt;integer,&gt;&lt;integer,&gt;    put(2, &quot;two&quot;);    &lt;/integer,&gt;&lt;/integer,&gt;&lt;/pre&gt;&lt;pre class=&quot;java java&quot; id=&quot;ghl_java&quot; face=&quot;monospace&quot; size=&quot;13px&quot; color=&quot;transparent&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial;  vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-  background-position: initial initial; &quot;&gt;&lt;integer,&gt;&lt;integer,&gt;    put(3, &quot;three&quot;);     &lt;/integer,&gt;&lt;/integer,&gt;&lt;/pre&gt;&lt;pre class=&quot;java java&quot; id=&quot;ghl_java&quot; face=&quot;monospace&quot; size=&quot;13px&quot; color=&quot;transparent&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial;  vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-  background-position: initial initial; &quot;&gt;&lt;integer,&gt;&lt;integer,&gt;    put(4, &quot;four&quot;);     &lt;/integer,&gt;&lt;/integer,&gt;&lt;/pre&gt;&lt;pre class=&quot;java java&quot; id=&quot;ghl_java&quot; face=&quot;monospace&quot; size=&quot;13px&quot; color=&quot;transparent&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial;  vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-  background-position: initial initial; &quot;&gt;&lt;integer,&gt;&lt;integer,&gt;    put(5, &quot;five&quot;); &lt;/integer,&gt;&lt;/integer,&gt;&lt;/pre&gt;&lt;pre class=&quot;java java&quot; id=&quot;ghl_java&quot; face=&quot;monospace&quot; size=&quot;13px&quot; color=&quot;transparent&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial;  vertical-align: baseline; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-  background-position: initial initial; &quot;&gt;&lt;integer,&gt;&lt;integer,&gt;}};&lt;/integer,&gt;&lt;/integer,&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;Use protected &amp;amp; final where ever possible&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Using final does not make much sense from performance point of view as modern JVM is intelligent enough to make use them efficiently, but still I feel they have lot of value in making the intent clear &amp;amp; in multi threading simple with im-mutable state.&lt;/p&gt;&lt;p&gt;Usage of &quot;private&quot; is over-rated &amp;amp; I think it&#39;s better to have it has protected making setting the code simpler.&lt;/p&gt;&lt;p&gt;Person p = new Person(){{&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;age=30; name=&quot;Suresh&quot;;&lt;/p&gt;&lt;p&gt;}}&lt;/p&gt;&lt;p&gt;where age &amp;amp; name are protected variables.&lt;/p&gt;&lt;p&gt;More &amp;amp; more you start using inner classes, you will get frustrate with java for lack of &quot;closures&quot; &amp;amp; will eventually move to Groovy or Scala (Like me :-))&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;Use Null Object Pattern &amp;amp; throw IllegalArguementException wherever applicable&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Null Object provides intelligent do nothing behaviour that helps to avoid problems with Null references (NPEs) &amp;amp; so called &quot;A billion dollar irreversible mistake&quot;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Prefer Unchecked Exception over Checked Exception&lt;/b&gt;&lt;/p&gt;&lt;p&gt;90% of time Unchecked Exception makes more sense than the Checked Exception. This is one of the most significant attribute of successful libraries like Spring &amp;amp; Hibernate. Use Checked Exception for recoverable errors (Business Exception) &amp;amp; Unchecked for remaining stuff.&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;Understand Soft, Weak and Phantom references in Java&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:Verdana, sans-serif;font-size:100%;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 19px;font-size:13px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(0, 0, 0);   font-weight: normal; line-height: normal; font-family:Georgia, serif;font-size:16px;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:Verdana, sans-serif;font-size:100%;color:#333333;&quot;&gt;&lt;b&gt;&lt;p&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 19px; font-family:Verdana, sans-serif;font-size:13px;&quot;&gt;WeakReference&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  font-weight: normal; color: rgb(51, 51, 51); line-height: 19px; font-family:Verdana, sans-serif;font-size:13px;&quot;&gt; is a reference which doesn&#39;t have enough force to prevent&lt;b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;Garbage Collector&lt;/span&gt;&lt;/b&gt;(GC) deleting object - Useful for caching&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:Verdana, sans-serif;font-size:100%;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 19px; font-size:13px;&quot;&gt;&lt;b&gt;Soft Reference&lt;/b&gt; behaves like weak references, except  when GC determines object is softly reachable &amp;amp; can be used to avoid OutOfMemoryError.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:Verdana, sans-serif;font-size:100%;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 19px; font-size:13px;&quot;&gt;&lt;b&gt;Phantom references&lt;/b&gt; are enqueued when objects are deleted from memory and &lt;i&gt;get()&lt;/i&gt;method always returns &lt;i&gt;null &lt;/i&gt;to prevent resurrecting object.  So  phantom references are good for determining exactly when object is deleted from memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;      &lt;/span&gt;__________________&lt;/p&gt;&lt;p&gt;Interesting quotes from Rock star programmers that I collected.&lt;/p&gt;&lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt; &quot;Write lots of code. Have fun with it!&quot; — Joshua Bloch&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;Learn to use your tools. And I don&#39;t mean just enough to get by. I mean really learn how to use your tools.&quot; — Tor Norbye&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;Don&#39;t use line numbers. Don&#39;t put your entire application in one method.&quot; — Chet Haase&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;Don&#39;t be overwhelmed by the language or the platform.&quot; — Raghavan Srinivas (In the same line Neal Ford says &quot;&lt;/i&gt;When you were hired by your current employer, you may think it&#39;s because of your  winning personality, your dazzling smile, or your encyclopedic knowledge of  Java. But it&#39;s not. You were hired for your ability to sit and concentrate for  long periods of time to solve problems&quot;)&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;Millions of people have been employed because someone at Sun Microsystems invented Java.&quot; - Masood Mortazavi&lt;/i&gt;. Master it &amp;amp; you will never regret for that&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;There will always be opportunities for great engineers, but as I said earlier, I think the number of these opportunities will shrink as other, less technical personnel play larger roles in the software-development process, using more productive, higher-level tools and frameworks than we have used in the past.&quot; - Ben Galbraith&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;Google makes finding information easier than ever, but nothing beats interacting with an expert.&quot;- Ben Galbraith&lt;/i&gt;. So always associate with people from whom you think you can learn.&lt;/p&gt;&lt;p&gt;From Pragmatic Thinking &amp;amp; Learning&lt;/p&gt;&lt;p&gt;There is no expertise without experience.It takes something on the order of ten years/ 10,000 hours&lt;br /&gt;of practice to be expert in a field Deliberate, thoughtful practice is what makes the difference—not&lt;br /&gt;just going through the motions.Practice doesn&#39;t make perfect, but it does make permanent:&lt;br /&gt;neuroplasticity will cause your brain to re-wire itself according to what you do.You may not become&lt;br /&gt;what you dream, or what you aspire to be, but you will become what you do.Unfortunately there is no substitute for hard work.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;References:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://java.sun.com/developer/technicalArticles/Interviews/studentdevs/index.html?intcmp=2225&quot;&gt;http://java.sun.com/developer/technicalArticles/Interviews/studentdevs/index.html?intcmp=2225&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.agiledeveloper.com/blog/PermaLink.aspx?guid=8a745e85-2a34-4d9c-8c25-ca371530e281&quot;&gt;http://www.agiledeveloper.com/blog/PermaLink.aspx?guid=8a745e85-2a34-4d9c-8c25-ca371530e281&lt;/a&gt; - How to convince your fellow developer to write short methods?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://weblog.raganwald.com/2007/04/rails-style-creators-in-java-or-how-i.html&quot;&gt;http://weblog.raganwald.com/2007/04/rails-style-creators-in-java-or-how-i.html&lt;/a&gt; - Rails style initializers&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.refactory.org/s/double_brace_initialisation/view/latest&quot;&gt;http://www.refactory.org/s/double_brace_initialisation/view/latest&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://c2.com/cgi/wiki?DoubleBraceInitialization&quot;&gt;http://c2.com/cgi/wiki?DoubleBraceInitialization&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://bwinterberg.blogspot.com/2009/09/introduction-to-google-collections.html&quot;&gt;http://bwinterberg.blogspot.com/2009/09/introduction-to-google-collections.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;http://thestrangeloop.com/sessions/ghost-virtual-machine-reference-references&lt;/p&gt;&lt;p&gt;http://juixe.com/techknow/index.php/2009/11/18/favorite-programming-quotes-2009/&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.readwriteweb.com/archives/top_10_software_engineer_traits.php&quot;&gt;http://www.readwriteweb.com/archives/top_10_software_engineer_traits.php&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:Verdana, sans-serif;font-size:100%;color:#666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 16px; font-size:11px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:Verdana, sans-serif;font-size:100%;color:#666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 16px;font-size:11px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7430267798604881660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7430267798604881660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7430267798604881660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7430267798604881660'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/09/elements-of-java-coding-styles.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-777491880689595611</id><published>2009-06-26T00:03:00.001-07:00</published><updated>2009-11-14T10:54:33.589-08:00</updated><title type='text'></title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;p&gt;&lt;b&gt;ALL ABOUT UNIT TESTING&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&quot;First about Boring Theory&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&quot;Unit Test is the smallest piece of testable part of an application&quot; In computer programming, unit testing is a software verification and validation method where the programmer gains confidence those individual units of source code is fit for use. A unit is the smallest testable part of an application. The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect. Each unit is tested separately before integrating them into modules to test the interfaces between modules. Unit testing has proven its value in that a large percentage of defects are identified during its use.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&quot;In Java Unit Test cases means JUnit test cases, the single most importance of Spring &amp;amp; Guice (or any dependency injection framework) is to make unit testing easier&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;JUnit is the de-facto framework for unit testing in java world. JUnit is a simple library, although there are mock objects, test code generators, behavioral test design &amp;amp; many other tools based on dynamic languages JUnit remains viable option while testing libraries or API where developer is a end user. Bob Lee (Author of Guice) stresses on the point that single most importance of dependency injection framework or interface driven design for matter is easier testability. All Google great applications like Gmail, Google Adsense, Calendar are the great testimony of this fact.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&quot;Developers don&#39;t like writing unit test cases; Management needs to understand the technical debt associated with un-availability of test cases&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Let&#39;s face it, developers don&#39;t like writing unit tests &amp;amp; write documentation. Kent says, Software, like golf, is both a long and short game. JUnit is an example of a long game project – lots of users, stable revenue, where the key goal is to just stay ahead of the needs of the users. So it&#39;s hard to sell writing JUnit cases for small projects that don&#39;t have longer life. It&#39;s clearly avoidable overhead in such cases (Most of the web applications). &lt;i&gt;&lt;b&gt;It may not economically make sense to write extensive test cases for short lived &amp;amp; small applications&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In some cases developers hate to be embarrassed &amp;amp; look stupid when someone finds a mistake or highly technical guys think they don&#39;t need to write test their solid code. The first case can be handled through management as it&#39;s a purely competence issue which can be sorted out through training &amp;amp; other means, in second case it&#39;s hard to convince as these guys very much correct in their assertions in their own way. It&#39;s an attitude problem, the best way would to be deploy someone to write unit test cases. A &quot;high level of quality code&quot; is great, yet most software lives on and on and people expect to add/modify features in that software or debug it, it&#39;s economic requirement that super stars need to prove that their code works with unit test cases. How much will the maintenance costs are without unit tests? How much more risk does that add?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&quot;Everyone knows that debugging is twice as hard as writing a program in the first place. So if you&#39;re as clever as you can be when you write it, how will you ever debug it?&quot; -- Brian Kernighan&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&quot;Unit testing seems to a lot of managers and developers like pure overhead, but professionally responsible developers know that it is one of the keys to quality.&quot; - Neal Ford&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&quot;Solid test cases with 100% coverage provides the courage to refactor the code &amp;amp; the reduces the testing effort in future&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We need to educate ourselves it&#39;s economically makes sense to have solid test cases especially for pure library (API)providers, as cost associated testing &amp;amp; testers can be completely (almost) avoided as anyway applications will test the APIs &amp;amp; we can avoid duplicating of the testing effort of testers in testing the APIs. Unfortunately these long sighted approaches are difficult to sell to the management and it&#39;s become thankless job when the unit tested solid code can&#39;t be differentiated with the working code. Developing APIs is a marathon job &amp;amp; not a 100 meters race. Stamina &amp;amp; perseverance plays very important role. In most of the cases committed can&#39;t be taken back, I guess JDK deprecated APIs must be haunting, humiliating the initial designers. One of the benefits of JUnit test cases are that developers get first had experience of the developers using the same.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As time goes on, there will be cases where the code works a bit less, some minor bugs, and some dirty quick fix (or hack) happens. Since you don&#39;t want to touch that code, you&#39;ll put fixes/enhancements/workarounds in other parts of the code, slightly but constantly degrading the quality of your design. You won&#39;t even upgrade a depending library, since you can&#39;t easily run regression tests over it. In a shorter time than you expect, that good designed and implemented project will turn into a nightmare. So it&#39;s just not about changing code, it&#39;s about changing environment - RDBMS vendor, JDK version, Library versions, OS versions…&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&quot;JUnit can be used to write End to End functional Tests &amp;amp; Unit test cases needs to be reviewed&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;From definition, a test is not a unit test if:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It talks to the database&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It communicates across the network&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It touches the file system&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It can&#39;t run at the same time as any of your other unit tests&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You have to do special things to your environment (such as editing config files) to run it.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If we go by above principle 90% of our JUnit test cases don&#39;t pass above rules. Although POJO driven frameworks like Spring tries to solve it, I don&#39;t think we can use JUnit in it&#39;s pure form. It&#39;s ok to use the JUnit for functional and integration test cases as well.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&quot;Test Before Code, or perhaps Test Before Design.&quot; – That means unit test cases need to be reviewed before the design or coding. These reviews probably should be more thorough than the code reviews itself.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&quot;JUnit test cases can serve as great tool to document&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Probably writing documentation through Javadocs is a bad idea. Usage of verbose class names, method names &amp;amp; JUnit test cases is more scalable &amp;amp; efficient way of documenting classes. Communicating through the code is the best way communication.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&quot;JUnit test cases have to be efficient &amp;amp; succinct&quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Manual test hurts both economic wise &amp;amp; manageability wise. But by end of the day if test cases are not capturing the correct scenarios &amp;amp; worst part if we have repetitive test it really JUnit really doesn&#39;t help. Best of the people involved with software development needs to do this type of unit testing. Garbage in &amp;amp; Garbage out rule is perfectly applicable here.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;I am done with all my legal points to sell unit testing? Do you guys buy this argument? &lt;span style=&quot;font-family:Wingdings;&quot;&gt;J&lt;/span&gt;&lt;br /&gt;  &lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;My next topic on unit testing would be on patterns and anti-patterns while writing test cases.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Resource:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.artima.com/weblogs/viewpost.jsp?thread=126923&quot;&gt;http://www.artima.com/weblogs/viewpost.jsp?thread=126923&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.theserverside.com/news/thread.tss?thread_id=51615&quot;&gt;http://www.theserverside.com/news/thread.tss?thread_id=51615&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.junit.org/&quot;&gt;http://www.junit.org&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://c2.com/cgi/wiki?WhoIsUsingJunit&quot;&gt;http://c2.com/cgi/wiki?WhoIsUsingJunit&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.theserverside.com/news/thread.tss?thread_id=51615&quot;&gt;http://www.theserverside.com/news/thread.tss?thread_id=51615&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://c2.com/cgi/wiki?FunctionalTest&quot;&gt;http://c2.com/cgi/wiki?FunctionalTest&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.davenicolette.net/articles/functional_tdd.html&quot;&gt;http://www.davenicolette.net/articles/functional_tdd.html&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.logigear.com/newsletter/api_vs_unit.asp&quot;&gt;http://www.logigear.com/newsletter/api_vs_unit.asp&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.exubero.com/junit/antipatterns.html&quot;&gt;http://www.exubero.com/junit/antipatterns.html&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.infoq.com/news/2009/06/test-or-not&quot;&gt;http://www.infoq.com/news/2009/06/test-or-not&lt;/a&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.agitar.com/solutions/why_unit_testing.html&quot;&gt;http://www.agitar.com/solutions/why_unit_testing.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/777491880689595611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/777491880689595611' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/777491880689595611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/777491880689595611'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/06/all-about-unit-testing.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-5794575894102880427</id><published>2009-04-24T12:27:00.000-07:00</published><updated>2009-06-03T11:28:58.937-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Search"/><title type='text'></title><content type='html'>Search Domain Basics : Search is probably the most pervasive technology domain of this century. Here I have tried to cover some basic concepts &amp;amp; some software implementation details with java as the focus. I thought this information can help new comers to this domain &amp;amp; provides enough starting pointers to dig into more details. &lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&quot;Content is King&quot; - &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Content is what that drives the web &amp;amp; &quot;search&quot; is the engine for that. All the services providing the content has to employ search techniques to fetch the required information with minimum possible user inputs in fastest possible way. Google/Yahoo which have become synonyms with search is implementing all the applications in relation with search one way or the other. Apparently unstructured content forms the major portion of the content available in the universe. Unstructured data (or unstructured information) refers to (usually) computerized information that either does not have a data model or has one that is not easily usable by a computer program or in simple words any data that is not represented in terms of column names in RDBMS table schema. Parallel computing, Data sharding, Schema definition, Scale of data &amp;amp; nature of the content acquisition related with un-structured content makes it unsuitable to be solved from 100% RDBMS solution, although full text indexing does exist in the RDBMS world.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Raw data with context is called &#39;Information&#39; &amp;amp; Information search and retrieval is all about locating relevant material from collection of raw data in a fastest way taking minimum possible input from the users. The ability to aid and assist a user in finding relevant information is the primary goal of information engineers &amp;amp; information Retrieval (IR) libraries.&lt;/div&gt;&lt;div&gt;&lt;div&gt;Major parts for search engine:&lt;/div&gt;&lt;div&gt;fetching/Loading the document – downloading content (lists of pages) that have been referenced.&lt;/div&gt;&lt;div&gt;analysis – analyzing the database to assign a priority scores to pages (PageRank) and to prioritize fetching. &lt;/div&gt;&lt;div&gt;indexing – combines content from the fetcher, incoming information from the built-in data source, and link analysis scores into a data structure that’s quickly reachable usually using cache services.&lt;/div&gt;&lt;div&gt;searching – returns set of content that ranks pages against a query using an index.&lt;/div&gt;&lt;div&gt;database – keeping track of what documents with various context information helping the ranking better.&lt;/div&gt;&lt;div&gt;To scale to billions of documents, all of these must be distributable, i.e., each must be able to run in parallel on multiple machines. This should happen by throwing more hardware into the pool, without massive reconfiguration whenever scale up is required.As we cannot offer to have failure of any single component cause a major hiccups; a search solution must be able to easily scale by throwing more hardware into the pool, without massive reconfiguration; and  things should largely fix themselves without human intervention. This can only be possible with the stateless implementation of software services.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;div&gt;Search Engine with Java for unstructured content: &lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;Studying the Information library APIs gives better insights into what search engine is capable of providing the service &amp;amp; I am taking the lucence as the sample for that.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;Lucene library has become defacto IR library in java world, now lucene has been ported to almost all the major languages showcasing the popularity &amp;amp; capability of this small library.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;div&gt;Lucene is a search and retrieval library providing key word and fielded search. It can use boolean AND, OR, and NOT to formulate complex queries &amp;amp; can use fuzzy logic that is useful when searching text created by optical character recognition. Un-structured content far exceeds the structured content in the web world. Lucene mainly deals unstructured content &amp;amp; can effectively search structured content also with the field tags.Lucene provides minimum required information retrieval functionality. We can call this a &quot;SearchKernal&quot; library that provides full-text search and indexing functionality. Instead of an out of the box application, Lucene offers a usable API for programmers and operates on a lower level.There are off the shelf libraries (Compass, Nutch, Solr...) providing monitoring, transaction utilities over lucene. Commercial enterprise search offerings include from vendors such as, Autonomy, Google, Oracle &amp;amp; FAST (MS).Lucene does not search file by file. The search space is analysed first and translated into a normalised representation - the index. Lucene uses a reverse index. All words in the index are unique, that means the index is a compressed representation of the search space. Lucene only supports plain-text files. However, a variety of free open source document parsers are available for document types such as, RTF, PDF, HTML, XML, Word etc. Depending on the nature of the text content various analysers are on offer. For example, text can be analysed with a white space analyzer which breaks down the text in tokens separated by white space. To keep the response time short the process of generating and optimising the index is separated. The index gets normalized by applying a stemming and lemmatisation algorithms. Lucene beats the RDBMS in full text search in terms of processing speed, manageable reduced the size of the index footprint (now about 25 percent of the source documents’ size), easy incremental updates, support for index partitions, price &amp;amp; flexibility (index methodology, deploy options &amp;amp; schema evolution). RDBMS way of searching with where clause &amp;amp; LIKE % is not only scalable but ineffecient, although RDBMS like Oracle includes full text indexing capabilities they have not been as popular to independent solutions such as Lucene &amp;amp; also it&#39;s not easy to implement the parallel processing (map/reduce) invloving multiple machines &amp;amp; terabytes of data. It&#39;s the dynamic nature &amp;amp; context understanding nature of search bringing huge changes search domain with navigating the hierarchy is becoming old fashioned. With technical problems pretty solved in this domain, now the key thing to remember is &lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&quot;search methodology is much more important than the underlying technology&quot;.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Search Terminologies:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;div&gt;Proximity search:&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;A search where users to specify that documents returned should have the words near each other.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Concept Search: &lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;A search for documents related conceptually to a word, rather than specifically containing the word itself. Involves parallel computing.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;strong&gt;Boolean search:&lt;/strong&gt; A search allowing the inclusion or exclusion of documents containing certain words through the use of operators such as AND, NOT and OR.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;strong&gt;Proximity search:&lt;/strong&gt; A search where users to specify that documents returned should have the words near each other.&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;strong&gt;Stemming:&lt;/strong&gt; The ability for a search to include the &quot;stem&quot; of words. For example, stemming allows a user to enter &quot;running&quot; and get back results also for the stem word &quot;run.&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Lemmatisation:&lt;/span&gt; is the process of grouping together the different inflected forms of a word so they can be analysed as a single item.Lemmatisation is closely related to stemming. The difference is that a stemmer operates on a single word without knowledge of the context, and therefore cannot discriminate between words which have different meanings depending on part of speech.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Noise or Stop words&lt;/span&gt;:Conjunctions, prepositions and articles and other words such as AND, TO and A that appear often in documents yet alone may contain little meaning.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;strong&gt;Thesaurus:&lt;/strong&gt; A list of synonyms a search engine can use to find matches for particular words if the words themselves don&#39;t appear in documents.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Index: &lt;/span&gt;Normailzed presentation of words&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Semantic Search:&lt;/span&gt; is a process used to improve online searching by using data from semantic networks to disambiguate queries and web text in order to generate more relevant results.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Web Search :&lt;/span&gt; Content is public &amp;amp; Generic.Uses keywords, Links (relevency) based some kind of historic traffic.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;Enterprise Search&lt;/span&gt; : Also contains private documents that domian specific, Quality of content should be highest quality content &amp;amp; not necessarily popular. Information/metadata needs to be secure with role based access to the content.It has to support security (Realms, Roles), SLAs and many other requirements. Google &amp;amp; Yahoo do not provide enterprise search.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As of now I am interested in researching this topic in the search retrieval field, So will keep updating this blog with my research findings.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&quot;Automatic annotation/Summary addition for content&quot;:&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;Lengthy documents/text are boring to read. It will be great if someone or computer can automatically creates the gist of the content. Automatic creation of annotation is tough task especially for non-domain specific topics but can be predictable in domain specific cases. For example it might be easier to extract the information from judgments copy automatically (at least in routine cases that hardly requires special knowledge from legal experts to annotate) or through workflow for review with automatically annotating the content/documents. I see this as an interesting area.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Summary:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: bold&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;FONT-WEIGHT: normal&quot;&gt;IR &amp;amp; Search domain is pretty complex subject requiring mastery over algorithms &amp;amp; data structures. Hope that I have been able assimilate the information related to search taking &quot;lucene&quot; as sample search engine library.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;References:&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://www.manning.com/hatcher3/&quot;&gt;Lucene&lt;/a&gt;&lt;a href=&quot;http://www.manning.com/hatcher3/&quot;&gt; Book&lt;/a&gt; : http://www.manning.com/hatcher3/&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://wiki.apache.org/lucene-java/PoweredBy/&quot;&gt;Powered by &lt;/a&gt;&lt;a href=&quot;http://wiki.apache.org/lucene-java/PoweredBy/&quot;&gt;Lucene:http://wiki.apache.org/lucene-java/PoweredBy/&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://www.blogger.com/Google%20Search:http://en.wikipedia.org/wiki/Google_search&quot;&gt;Google Search:http://en.wikipedia.org/wiki/Google_search&lt;/a&gt; &lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;Useful wrapper libraries over Lucene. &lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;http://lucene.apache.org/solr/features.html - Solr Features &lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;http://www.compass-project.org/overview.html - Compass Features&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/5794575894102880427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/5794575894102880427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/5794575894102880427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/5794575894102880427'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/04/search-domain-basics-search-is-probably.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-8037193015574066704</id><published>2009-04-17T05:23:00.000-07:00</published><updated>2009-05-04T15:01:17.548-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'></title><content type='html'>Some &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;statistics&lt;/span&gt; about Java source code of popular open source libraries. Currently I am looking/learning a big system that has multi-&lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;million&lt;/span&gt; number of source code. I wrote a simple utility to extract information about the java source code just for fun. I ran this utility on many of &quot;src&quot; directory of open source libraries as well.This java utility takes a source code directory as inputs &amp;amp; traverses all the java code &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;recursively&lt;/span&gt; inside that directory. It collects total number of active lines of code excluding comments, package count... &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;amp; here is the result.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;********* &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;JDK&lt;/span&gt;1.5 ********&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Total # Lines = 850918&lt;/div&gt;&lt;div&gt;Total # of Files = 6556&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 129&lt;/div&gt;&lt;div&gt;Total # of packages = 368&lt;/div&gt;&lt;div&gt;******** &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;Hadoop&lt;/span&gt; 0.18.3 ******&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total # Lines = 129742&lt;/div&gt;&lt;div&gt;Total # of Files = 926&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 140&lt;/div&gt;&lt;div&gt;Total # of packages = 66&lt;/div&gt;&lt;div&gt;******* &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;Lucene&lt;/span&gt; 2.4.1 *********&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total # Lines = 69606&lt;/div&gt;&lt;div&gt;Total # of Files = 528&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 131&lt;/div&gt;&lt;div&gt;Total # of packages = 16&lt;/div&gt;&lt;div&gt;******** Struts *********&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total # Lines = 63707&lt;/div&gt;&lt;div&gt;Total # of Files = 1040&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 61&lt;/div&gt;&lt;div&gt;Total # of packages = 120&lt;/div&gt;&lt;div&gt;********* &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;iText&lt;/span&gt; 2.1.5 ***********&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total # Lines = 96830&lt;/div&gt;&lt;div&gt;Total # of Files = 544&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 177&lt;/div&gt;&lt;div&gt;Total # of packages = 55&lt;/div&gt;&lt;div&gt;******* Tapestry 5.1.0.3 ******&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total # Lines = 96395&lt;/div&gt;&lt;div&gt;Total # of Files = 1937&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 49&lt;/div&gt;&lt;div&gt;Total # of packages = 103&lt;/div&gt;&lt;div&gt;It&#39;s not all surprising that one of the best prolific java coder comes best (&quot;&lt;a href=&quot;http://tapestryjava.blogspot.com/&quot;&gt;Howard&lt;/a&gt;&quot;) in the java world when it it comes to modularity.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;********* &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;iBatis&lt;/span&gt; *********&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total # Lines = 14132&lt;/div&gt;&lt;div&gt;Total # of Files = 202&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 69&lt;/div&gt;&lt;div&gt;Total # of packages = 45&lt;/div&gt;&lt;div&gt;***** Hibernate 3.3.1.GA *******&lt;/div&gt;&lt;div&gt;&lt;div&gt;Total # Lines = 173698&lt;/div&gt;&lt;div&gt;Total # of Files = 2102&lt;/div&gt;&lt;div&gt;Avg # Lines per file = 82&lt;/div&gt;&lt;div&gt;Total # of packages = 292&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I guess these figures can be considered as standard while reviewing the modularity of any library.Do let me know if any one interested in code &amp;amp; having ANT target to analyze the&lt;/div&gt;&lt;/div&gt;&lt;div&gt; source code b/w releases.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/8037193015574066704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/8037193015574066704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/8037193015574066704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/8037193015574066704'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/04/some-statistics-about-java-source-code.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-6653088604964369829</id><published>2009-03-10T07:24:00.001-07:00</published><updated>2009-05-10T20:27:04.462-07:00</updated><title type='text'></title><content type='html'>&lt;div&gt;Interview with one of the best API designer in the world -Joshua Bloch.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/ZOwHiGCzZjo&amp;amp;hl=en&amp;amp;fs=1&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/ZOwHiGCzZjo&amp;amp;hl=en&amp;amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Adding some other interesting wise quotes on API design that I have read...&lt;/div&gt;&lt;div&gt;When you design user interfaces, it&#39;s a good idea to keep two principles in mind:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Users don&#39;t have the manual, and if they did, they wouldn&#39;t read it.In fact, users can&#39;t read &lt;/div&gt;&lt;div&gt;anything, and if they could, they wouldn&#39;t want to.&lt;/div&gt;&lt;div&gt;Same rule applies for API designers as well:&lt;/div&gt;&lt;div&gt;Developers don&#39;t have the java docs, and if they did, they wouldn&#39;t read it.In fact, Developers can&#39;t read anything other than pressing &quot;.&quot; against the object reference in IDE &amp;amp; wait for something to select, and if they could, they wouldn&#39;t want to.&lt;/div&gt;&lt;div&gt;Learnability,Effeciency,Memorability,Errors &amp;amp; Satisfaction remains the core of good interface design.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;APIs should emerge from the needs of real applications, and that they should make common tasks super-easy as the demand for quality, validated designs far exceeds our capacity to create them.In 1996 it wasn&#39;t clear we could create a sufficiently fast language without primitive types and arrays, It wasn&#39;t clear how much boilerplate code would be required by anonymous callback classes or checked exception. So Java couldn&#39;t resist including primitive types,excluding closures in favour of anonymous classes &amp;amp; over-using checked exceptions. &lt;/div&gt;&lt;div&gt;Grady Booch-&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&quot;Great thing about objects is that they can be replaced&quot;. The great thing about Spring is it helps you replace them. Flexibility is much more important than the re-use.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Joshua Bloch says,&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Public APIs are forever - one chance to get it right&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Good code is modular–each module has an API&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Thinking in terms of APIs improves code quality&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Easy to use, even without documentation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Don’t let implementation details “leak” into API&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make classes and members as private as possible &lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make variables &quot;final&quot; wherever possible&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Now some economics:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Economic reality suggest that buying more memory can be easier and cheaper than to pay someone to debug code &amp;amp; it pays more in the long run to have understandable slow code than super fast cryptic code.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once I heard from Architect in IBM conference (don;t remember the name) for choosing Java over C++ saying this,&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&quot;The most compelling reason for adopting Java over C++ is automatic memory management. It protects application from mediocre programmers. It eliminates many embarrassments of memory leaks &amp;amp; crash that randomly occur in production&quot;. He went on say that &quot;So as a result we are trading with inexplicable crashes for slow performance (automatic memory management &amp;amp; database-centric storage).This makes sure that application at least works anyway&quot;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&quot;Rushing is at the root of all lack of quality&quot; - Peter Calthorpe, architect&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Reference:&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.slideshare.net/guestbe92f4/how-to-design-a-good-a-p-i-and-why-it-matters-g-o-o-g-l-e&quot;&gt;Design Slides&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://anirudhvyas.com/root/2008/10/20/art-of-defensive-programming/&quot;&gt;Defensive Programming&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.arc-mind.com/papers/springIsGood.html&quot;&gt;Spring is Good&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/6653088604964369829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/6653088604964369829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/6653088604964369829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/6653088604964369829'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/03/api-design-speech-from-one-of-best-api.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-6174114179072351260</id><published>2009-03-09T13:48:00.001-07:00</published><updated>2009-05-10T17:05:37.358-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Startup"/><title type='text'></title><content type='html'>&lt;div&gt;&lt;a href=&quot;http://javaiq.in/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt; javaiq.in&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt; - A playground for learning Java RIAs. I am planning to expose my experimental applications with GWT, JavaFx &amp;amp; Felx. I will also be creating applications mixing multiple open services from various vendors (Google,Yahoo, Amazon, eBay...) &amp;amp; create a combined value. I guess this is the area that has huge scope.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;I created &lt;/span&gt;&lt;a href=&quot;http://javaiq.in/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;this&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt; site &amp;amp; made it public 2 months back. It was result of my experimenting with new techniques with sample applications/code snippets,I always felt that best way to sell any  new technique is with real application. It&#39;s great to have useful apps while learning new technologies/framework,I hate to write throw away examples. I have been following web frameworks from past few years, I have spent large amount of time in validating/learning over the year. I am SWING programmer &amp;amp; was always trying out the samples from Internet/books. Learning (or Stealing) the good code snippets that I liked &amp;amp; thought of exposing them as useful apps. Having spent a considerable amount of time and energy with Swing, it was queasy feeling in my stomach to see all my Swing programming heroes (Like Chet, Romain Guy...) either have gone to Adobe/Google or have moved to JavaFx/Flex way. I have also lost faith in Swing. I don&#39;t expect to develop new pure Swing apps any more, but I guess I was able to grasp GWT, Echo, Wicket frameworks much better than any pure web MVC framework (Struts, Spring MVC...) developers who were not having exposure to swing. I guess that&#39;s the advantage still I can leverage.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;Chasing entrepreneurship dream- &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic;&quot;&gt;When you are not into inheriting money and because you do not belong to a rich family and when you aren’t an individual blessed with the talent of a sportsperson or an actor, the next best thing &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic;&quot;&gt;to do is to become an entrepreneur&quot; &lt;/span&gt;- Anand Morzaria&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic;&quot;&gt;A man is a success if he gets up in the morning and gets to bed at night, and in between he does what he wants to do&lt;/span&gt; - Bob Dylan&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;Now experts say it has become relatively cheaper to start a new web application or a startup. Moore&#39;s law has made hardware cheap; open source has made software free; the web has made marketing and distribution free; and more powerful programming languages &amp;amp; techniques are making development teams smaller &amp;amp; powerful. But actual life it is not that simpler, especially if you are fighting a lone battle.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;It&#39;s really pretty time consuming process to create &amp;amp; manage applications. I went with cheap shared Java hosting which was unable to run my &quot;stripes&quot; web framework based application &amp;amp; no one was there to help me out by providing tomcat logs &amp;amp; I had to settle with few JSPs with trimmed version. It&#39;s pretty costly affair to run java apps in a proper manner. It&#39;s big road blocker if anybody wants to develop/expose web applications in java today.  Sun has to fix this problem (shared hosting) if it wants to replace PHP/Ruby On Rails apps in small scale applications. (I will have separate notes with java hosting) Enthusiasm to code is very hard to maintain, actually I wrote most of the applications in a few days, but was difficult to keep the momentum. Perseverance, relentless resourcefulness (as paul graham calls it) is difficult to achieve without full time dedication. Anyway it was good exercise to know all these limitations.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;If I look back, I seriously doubt my spending of countless hours in browsing blogs, learning 10s of java web frameworks has significant impact on carrying out my day today work or think better. In fact my guess is I have wasted &gt;30% of total time spent in gleaning through useless/marketing literature links. Hopefully from now on I will be able channelize all my energy in building better context for my day today work rather than learning all java web frameworks under the Sun. BTW all my web framework heroes (Wicket, &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;Appfuse&lt;/span&gt;, Stripes, Tapestry...) that I have been following from past one year are apparently looking for jobs themselves &amp;amp; are investing time in using Groovy, &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;Scala&lt;/span&gt; &amp;amp; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;Clojure&lt;/span&gt;. :-( not really a happy situation. I guess innovation with pure java in this space has reached dead end. Now I want to to learn/invest more on my current work so that I can become better at what I am doing currently, that&#39;s my priority #1 &amp;amp; I will resist experimenting with what blog writers say on latest technologies. One of the trouble I had disclosing this site was public embarrassment! of people knowing that I created this half baked application that I hesitated to own. But now it&#39;s quite decent set of useful applications that I started as my week-end project &amp;amp; I have good ideas to make it still better &amp;amp; this will be always my low priority work &amp;amp; also make sure to extract the best out of I am currently working on.&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:Georgia;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;Oh! Now I can call myself &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;CTO&lt;/span&gt; of &lt;/span&gt;&lt;a href=&quot;http://javaiq.in/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;javaiq&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;. nice feeling. :-)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/6174114179072351260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/6174114179072351260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/6174114179072351260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/6174114179072351260'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/03/javaiq.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-273257106292126732</id><published>2009-03-06T00:02:00.000-08:00</published><updated>2009-03-13T10:58:15.734-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="management"/><title type='text'></title><content type='html'>Popular techie words: we hear below words a lot in discussion &amp;amp; blogs. I thought it&#39;s good to have their &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;definitions&lt;/span&gt; (easier ones) &amp;amp; explain if anyone asks &quot;what&#39;s that?&quot; as I also use them to have buzzwords compliance.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Technical Debt:&lt;/span&gt;&lt;br /&gt;Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future.&lt;br /&gt;The metaphor also explains why it may be sensible to do the quick and dirty approach. Just as a business incurs some debt to take advantage of a market opportunity developers may incur technical debt to hit an important deadline. The all too common problem is that development organizations let their debt get out of control and spend most of their future development effort paying crippling interest payments.&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href=&quot;http://www.c2.com/cgi/wiki?TechnicalDebt&quot;&gt;http://www.c2.com/cgi/wiki?TechnicalDebt&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://martinfowler.com/bliki/TechnicalDebt.html&quot;&gt;http://martinfowler.com/bliki/TechnicalDebt.html&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=pqeJFYwnkjE&quot;&gt;http://www.youtube.com/watch?v=pqeJFYwnkjE&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;MapReduce&lt;/span&gt;&lt;/span&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;MapReduce&lt;/span&gt;&lt;/span&gt; is hierarchical scatter/gather operation.&lt;br /&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;MapReduce&lt;/span&gt;&lt;/span&gt; is a library that lets you adopt a particular, stylized way of programming that&#39;s easy to split among a bunch of machines. The basic idea is that you divide the job into two parts: a Map, and a Reduce. Map basically takes the problem, splits it into sub-parts, and sends the sub-parts to different machines - so all the pieces run at the same time. Reduce takes the results from the sub-parts and combines them back together to get a single answer.&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href=&quot;http://scienceblogs.com/goodmath/2008/01/databases_are_hammers_mapreduc.php&quot;&gt;http://scienceblogs.com/goodmath/2008/01/databases_are_hammers_mapreduc.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Cloud Computing:&lt;/span&gt;&lt;br /&gt;With cloud computing, everything is web-based instead of being desktop-based; access all programs and documents from any computer that’s connected to the Internet is possible. Cloud computing helps to do it more easily than ever before.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;Wikipedia&lt;/span&gt;&lt;/span&gt; Cloud Computing is &quot;a style of computing in which resources are provided as a service over the &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;internet&lt;/span&gt;&lt;/span&gt;&quot;. Cloud computing user need not have worry about managing a machine or service at the physical level (Machine &amp;amp; location). Amazon Simple DB is an example for this as it handled operating system or database maintenance functions, &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;SLA&lt;/span&gt;&lt;/span&gt; &amp;amp; operational issues.&lt;br /&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/XdBd14rjcs0&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;hl=en&amp;amp;feature=player_embedded&amp;amp;fs=1&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed src=&quot;http://www.youtube.com/v/XdBd14rjcs0&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;hl=en&amp;amp;feature=player_embedded&amp;amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;Sharding&lt;/span&gt;&lt;/span&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;Sharding&lt;/span&gt;&lt;/span&gt; or &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;horizontal&lt;/span&gt; partitioning is about splitting up data sets. If data doesn&#39;t fit on one machine then split it up into pieces, each piece is called a shard.&lt;br /&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;Sharding&lt;/span&gt;&lt;/span&gt; is used when you have too much data to fit in one single relational database.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href=&quot;http://scienceblogs.com/goodmath/2008/01/databases_are_hammers_mapreduc.php&quot;&gt;http://highscalability.com/sharding-hibernate-way&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://scienceblogs.com/goodmath/2008/01/databases_are_hammers_mapreduc.php&quot;&gt;http://highscalability.com/unorthodox-approach-database-design-coming-shard&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://lethargy.org/~jesus/archives/95-Partitioning-vs.-Federation-vs.-Sharding.html&quot;&gt;http://lethargy.org/~jesus/archives/95-Partitioning-vs.-Federation-vs.-Sharding.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Refactoring:&lt;/span&gt;&lt;br /&gt;Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href=&quot;http://www.refactoring.com/&quot;&gt;http://www.refactoring.com/&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Code_refactoring&quot;&gt;http://en.wikipedia.org/wiki/Code_refactoring&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Code Smell:&lt;/span&gt;&lt;br /&gt;In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper problem.&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Code_smell&quot;&gt;http://en.wikipedia.org/wiki/Code_smell&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/273257106292126732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/273257106292126732' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/273257106292126732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/273257106292126732'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/03/popular-techie-words-we-hear-below.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7662897322274992002</id><published>2009-02-28T10:51:00.001-08:00</published><updated>2009-03-13T12:28:57.178-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Startup"/><title type='text'></title><content type='html'>DHH - The best talk I heard on startups&lt;br /&gt;&lt;object width=&quot;520&quot; height=&quot;276&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.omnisio.com/bin/Embed.swf?embedID=dwno9ObCyr3QwfadbiFy2w&amp;amp;autoPlay=0&quot;&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot;&gt;&lt;param name=&quot;quality&quot; value=&quot;high&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot;&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; name=&quot;omnisio_video_dwno9ObCyr3QwfadbiFy2w&quot; src=&quot;http://www.omnisio.com/bin/Embed.swf?embedID=dwno9ObCyr3QwfadbiFy2w&amp;amp;autoPlay=0&quot; bgcolor=&quot;#FFFFFF&quot; quality=&quot;high&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; width=&quot;520&quot; height=&quot;276&quot;&gt;&lt;/embed&gt;&lt;noembed&gt;&lt;/noembed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a border=&quot;0&quot; href=&quot;http://www.gigyamailbutton.com/wildfire/gigyamailbutton.ashx?url=aHR*cDovL3dpbGRmaXJlLmdpZ3lhLmNvbS93aWxkZmlyZS93ZnBvcC5hc3B4P21vZHVsZT1lbWFpbCZ1cmw9aHR*cCUzYSUyZiUyZnd3dy5vbW5pc2lvLmNvbSUyZnYlMmZaVzRXVFVHZGpoRyUyZmRhdmlkLWhlaW5lbWVpZXItaGFuc3Nvbi1hdC1zdGFydHVwLXNjaG9vbC*wOA==&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cdn.gigya.com/wildfire/i/includeShareButton.gif&quot; border=&quot;0&quot; width=&quot;60&quot; height=&quot;20&quot; /&gt;&lt;/a&gt;&lt;img style=&quot;visibility:hidden;width:0px;height:0px;&quot; border=&quot;0&quot; width=&quot;0&quot; height=&quot;0&quot; src=&quot;http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bHQ9MTIzNTg*NjEyOTY4NyZwdD*xMjM1ODQ3MDk2MzU5JnA9MTkzNTAxJmQ9Jm49YmxvZ2dlciZnPTEmdD*mbz1kZWZmOTQwMTE1M2E*YjA2ODFiNGJhNDgzZWEyMTk2ZA==.gif&quot; /&gt;&lt;br /&gt;&lt;br /&gt;I was quite impressed by DHH (Creator of Ruby On Rails framework) speech on &quot;The secret to making money online&quot; when I viewed this &lt;a href=&quot;http://www.omnisio.com/startupschool08/david-heinemeier-hansson-at-startup-school-08&quot;&gt;video&lt;/a&gt; again today.&lt;br /&gt;&lt;br /&gt;There are just 3 steps for this.&lt;br /&gt;1. Create a gr8 product that people like &amp;amp; is useful to them&lt;br /&gt;2. Have a price for the product &amp;amp; ask people to pay for it or it&#39;s usage.&lt;br /&gt;3. Make profits!&lt;br /&gt;&lt;br /&gt;This is so ridiculously simple grand old rule! he goes on to say that you don&#39;t need to be f***ing genius to achieve this.&lt;br /&gt;&lt;br /&gt;He also came up with nice probability analysis that strike rate of success following above simple model is much higher rather than Yahoo, Google,facebook &amp;amp; youtube (setting up BillBoards/hoardings) way of attracting users providing free services &amp;amp; make use of web page real estate to show ads &amp;amp; make money. He also suggest to go slow on implementing the idea as &quot;Finding a good cause is incredibly hard &amp;amp; time consuming&quot; - Craign Newmark.&lt;br /&gt;&lt;br /&gt;Simply superb.&lt;br /&gt;&lt;br /&gt;I have been following many startup blogs including &lt;a href=&quot;http://www.paulgraham.com/&quot;&gt;paul Graham&#39;s&lt;/a&gt;, but never impressed like this before, so simple words but telling you the hard truth :-)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7662897322274992002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7662897322274992002' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7662897322274992002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7662897322274992002'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2009/02/david-heinemeier-hansson-at-startup.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-1003923231471432865</id><published>2008-11-20T10:24:00.000-08:00</published><updated>2008-11-20T10:36:25.506-08:00</updated><title type='text'></title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm_NzBpv0zb7jUt_dxsnl2T8JWTDnqDiX_BrTnGUWBljIpUXvKQMu5W_uKt9rU-tgVx69jhvn7SrjV9UOgaIsBU5roZ0kNA6O0hFIEKOD_PnhO_cww-1Iz9B6pu72VRf5iNyh-qw/s1600-h/mytechList.JPG&quot; style=&quot;text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;font-weight: bold; &quot;&gt;Nice way to tell what all you know with &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; text-decoration: underline;&quot;&gt;wordle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style=&quot;text-decoration: underline;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 272px; &quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm_NzBpv0zb7jUt_dxsnl2T8JWTDnqDiX_BrTnGUWBljIpUXvKQMu5W_uKt9rU-tgVx69jhvn7SrjV9UOgaIsBU5roZ0kNA6O0hFIEKOD_PnhO_cww-1Iz9B6pu72VRf5iNyh-qw/s400/mytechList.JPG&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5270807599132739058&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 238); text-decoration: underline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 238); text-decoration: underline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href=&quot;http://wordle.net/gallery/wrdl/201473/My_Technology_Stack&quot; title=&quot;Wordle: My Technology Stack&quot;&gt;&lt;img src=&quot;http://wordle.net/thumb/wrdl/201473/My_Technology_Stack&quot; style=&quot;padding:4px;border:1px solid #ddd&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/1003923231471432865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/1003923231471432865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/1003923231471432865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/1003923231471432865'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2008/11/nice-way-to-tell-what-all-you-know-with.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm_NzBpv0zb7jUt_dxsnl2T8JWTDnqDiX_BrTnGUWBljIpUXvKQMu5W_uKt9rU-tgVx69jhvn7SrjV9UOgaIsBU5roZ0kNA6O0hFIEKOD_PnhO_cww-1Iz9B6pu72VRf5iNyh-qw/s72-c/mytechList.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-7271766737399462670</id><published>2008-11-11T04:52:00.000-08:00</published><updated>2008-11-19T10:58:18.894-08:00</updated><title type='text'></title><content type='html'>Do we really need a web service &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;api&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; for serving static data when we already have a good query and mining language?  (&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, XML)&lt;br /&gt;&lt;br /&gt;Google, Amazon &amp;amp; eBay provide the static data by publishing through their docs.&lt;br /&gt;-  Location information (City, Country...)&lt;br /&gt;-  Categories&lt;br /&gt;-  Currency data&lt;br /&gt;- Hierarchy information&lt;br /&gt;&lt;br /&gt;These are the advantages that I see from the above approach. &lt;br /&gt;- Uses local CPU power, saves unnecessary traffic to the web service&lt;br /&gt;-  Supports online/offline scenarios&lt;br /&gt;- Supports programming logic flow, since we will have the information at the compile time it&#39;s easy to code&lt;br /&gt;- Solves the performance problem, what ever be the improvement network calls are always costly compared to local calls&lt;br /&gt;- data model is essentially a flat data model, easy to import,save &amp;amp; navigate&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But I guess they should be better exposed as XML rather than as HTML&lt;br /&gt;&lt;br /&gt;The problems I see with this approach&lt;br /&gt;- We need to have stringent way of updating the local cache of static code (usually stored in &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;SQL&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;or XML or as text file with some &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;&lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;delimiters&lt;/span&gt;&lt;/span&gt;)&lt;br /&gt;- static information that are easy to represent in code (say number is less than 10 &amp;amp; unlikely to change)  are represented as &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;Enums&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; , so we will be 2 rules, some will be represented with static &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;enums&lt;/span&gt;&lt;/span&gt; &amp;amp; some will be represented with static code&lt;br /&gt;- There will be different rules for representing the data &amp;amp; we will be sacrificing the strong typing which I think is not a issue as benefits to the both parties (client &amp;amp; server) exceeds the pain with String based &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;APIs&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;As from the mature real SOAP based web services, it&#39;s clear that we don&#39;t need to expose &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;API&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;StaticCodeService&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;() to get these static information. &lt;span style=&quot;font-weight: bold;&quot;&gt;The demand for quality, correct designs far exceeds our capacity to create them. Web services should emerge from the needs of real applications, and that they should make common tasks &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot; class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;ridiculously&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; easy.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Summary,&lt;br /&gt;It&#39;s not worth wasting SOAP web service &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;API&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; calls for getting static information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/7271766737399462670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/7271766737399462670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7271766737399462670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/7271766737399462670'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2008/11/do-we-really-need-web-service-api-for.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31568098.post-3371557519316810843</id><published>2008-11-06T20:58:00.000-08:00</published><updated>2008-11-16T11:35:59.352-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><category scheme="http://www.blogger.com/atom/ns#" term="fluent api"/><title type='text'></title><content type='html'>Why Fluent Interface? Here are some thoughts on using fluent interface while designing APIs &amp;amp; their impact&lt;br /&gt;Definition : &lt;em&gt;In software engineering, a fluent interface (as first coined by Eric Evans and Martin Fowler) is an object oriented construct that defines a behavior capable of relaying the instruction &#39;context&#39; of a subsequent call. &lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;First philosophy,&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The success of Conversation/Communication/Integration depends on the quality of signals between two entities involved &amp;amp; the signal is clean &amp;amp; is understood well. Communication is always based on context, shared context. Context also influences interpretation. For example , &quot;use a fork&quot; differently depending on context (Unix, dining table, Java or Ant build file). Well understood shared context improves the signal-to-noise ratio in communication it makes communication effective, expressive, easy to understand and easy to work with.&lt;br /&gt;Domain Specific languages (DSLs) have &lt;b&gt;implicit context&lt;/b&gt;, context is never mentioned, once the context is established repeating it again &amp;amp; again is a noise,. The end goal for involved parties in communication should be to reduce the noise to zero.&lt;br /&gt;We have 2 types of DSL, Internal - based on exiisting language &amp;amp; external - A new language with parser &amp;amp; full fledged grammar, evidently external DSL is tough to implement &amp;amp; very effective (SQL,HTML) on the other hand Internal DSL is easy to implement especially with dynamic languages.&lt;br /&gt;&lt;br /&gt;That&#39;s all about the boring philosophy...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The benefits,&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;No need to document the APIs.&lt;br /&gt;- They are all self explanatory&lt;br /&gt;- Examples should do all the explanation if any&lt;br /&gt;- Testing/adaptability becomes easier&lt;br /&gt;&lt;br /&gt;Less effort required to use, resulting in better economics&lt;br /&gt;- There is very less chance to make mistakes&lt;br /&gt;- All the extra noise is hidden which does not add domain concepts&lt;br /&gt;- User has to write less &amp;amp; less number of lines of code, LOC most&lt;br /&gt;of the time translate to number of bugs. Less the the code less the bugs&lt;br /&gt;&lt;br /&gt;Correctly written fluent API gives the satisfaction of well written novel to&lt;br /&gt;the author &amp;amp; the same reading experience to the consumer.&lt;br /&gt;&lt;br /&gt;Market is always right, now all the new libraries are coming up using fluent APIs&lt;br /&gt;Big software houses are putting more efforts to make code less noisy. The trend from Microsoft (C#3, IronRuby, F#...) Sun (JRuby &amp;amp; other dynamic language support) points towards that.&lt;br /&gt;&lt;br /&gt;Experts think Fluent APIs are cool.&lt;br /&gt;- Martin Fowler is writing a book on DSL&lt;br /&gt;- Well proven frameworks like JUnit are coming up with fluent API alternatives&lt;br /&gt;- Google collections, JMock, Fest, Guice... countless popular APIs are based&lt;br /&gt;on fluent APIs&lt;br /&gt;- Ruby on Rails Active Record is best example how a DSL can simplify the job &amp;amp; has successfully forced to think differently&lt;br /&gt;- Market Signals shows that, best brains are talking more about DSL, functional&lt;br /&gt;langauges &amp;amp; is definately are the way go about to develop software.&lt;br /&gt;- Joshua Bloch (Google Java Architect) in his new Effective Java book talks about Builder pattern for building immutable fluent java objects.&lt;br /&gt;buying more memory can be easier and cheaper than to pay someone to understand/debug code. Well written code (read fluent interface) results in good economics.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Now the real world code using Fluent APIs,&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;No marketing is better than showcasing real working code for technique or technology.&lt;br /&gt;&lt;br /&gt;New Java Date APIs &lt;a href=&quot;http://today.java.net/pub/a/today/2008/09/18/jsr-310-new-java-date-time-api.html&quot;&gt;JSR 130&lt;/a&gt;:&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Period thePeriod = Periods.periodBuilder().years(8).months(3).build();&lt;/span&gt;&lt;br /&gt;This is what experts feel how the code should be written &amp;amp; this code is definitely looks better than java.util.Calendar,java.util.Date APIs.&lt;br /&gt;&lt;br /&gt;Fluent way of handling XML marshalling un-marshalling:&lt;br /&gt;&lt;br /&gt;Here we have sample example showcasing the XML usage with fluent APIs&lt;br /&gt;&lt;br /&gt;&amp;lt;contacts&amp;gt;&lt;br /&gt;&amp;lt;contact&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;praveenm&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;phone type=&quot;mobile&quot;&amp;gt;98862342333&amp;lt;/phone&amp;gt;&lt;br /&gt;&amp;lt;phone type=&quot;office&quot;&amp;gt;080-2344234233&amp;lt;/phone&amp;gt;&lt;br /&gt;&amp;lt;email&amp;gt;pm@aol.com&amp;lt;/email&amp;gt;&lt;br /&gt;&amp;lt;/contact&amp;gt;&lt;br /&gt;&amp;lt;/contacts&amp;gt;&lt;br /&gt;&lt;br /&gt;Groovy Sample:&lt;br /&gt;def mkp = new MarkupBuilder()&lt;br /&gt;mkp.contacts {&lt;br /&gt;contact {&lt;br /&gt;name(&quot;praveenm&quot;)&lt;br /&gt;phone(type: &quot;mobile&quot;, &quot;98862342333&quot;)&lt;br /&gt;phone(type:&quot;office&quot;, &quot;080-2344234233&quot;)&lt;br /&gt;email(&quot;pm@aol.com&quot;)&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Ruby Sample&lt;br /&gt;require &#39;builder&#39;&lt;br /&gt;x = Builder::XmlMarkup.new(:target =&gt; $stdout, :indent =&gt; 2)&lt;br /&gt;x.contacts {&lt;br /&gt;x.contact {&lt;br /&gt;x.name(&#39;praveenm&#39;)&lt;br /&gt;x.phone &#39;98862342333&#39;, :type =&gt; &#39;mobile&#39;&lt;br /&gt;x.phone &#39;080-2344234233&#39;, :type =&gt; &#39;office&#39;&lt;br /&gt;x.email &#39;pm@aol.com&#39;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Google Collections:&lt;br /&gt;A excelellent example how JDK Collections can be simplified with fluent APIs&lt;br /&gt;public static final ImmutableSet&lt;integer&gt; FAVORITE_NUMBERS&lt;br /&gt;= ImmutableSet.of(2,9, 8, 15, 16, 50);&lt;br /&gt;&lt;br /&gt;FEST Example: DSL-oriented API for functional Swing GUI testing&lt;br /&gt;&lt;br /&gt;dialog.comboBox(&quot;domain&quot;).select(&quot;Users&quot;);&lt;br /&gt;dialog.textBox(&quot;username&quot;).enterText(&quot;alex.ruiz&quot;);&lt;br /&gt;dialog.button(&quot;ok&quot;).click();&lt;br /&gt;dialog.optionPane().requireErrorMessage()&lt;br /&gt;.requireMessage(&quot;Please enter your password&quot;);&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://jaxb2-commons.dev.java.net/fluent-api/&quot;&gt;JaxB common:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;USAddress address = new USAddress()&lt;br /&gt;.setName(name)&lt;br /&gt;.setStreet(street)&lt;br /&gt;.setCity(city)&lt;br /&gt;.setState(state)&lt;br /&gt;.setZip(new BigDecimal(zip));&lt;br /&gt;&lt;br /&gt;I guess this is not a good example for fluent.&lt;br /&gt;&lt;br /&gt;Guice:&lt;br /&gt;@Override&lt;br /&gt;protected void configure() {&lt;br /&gt;    binder().bind(IUserService.class).to(UserServiceMockImpl.class);&lt;br /&gt;    binder().bind(AuditInfo.class).to(DummyAuditInfo.class);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Hibernate:&lt;br /&gt;List cats = session.createCriteria(Cat.class).setMaxResults(50).list()&lt;br /&gt;&lt;br /&gt;DesignGridLayout:&lt;br /&gt;A Fluent Layout manager&lt;br /&gt;&lt;br /&gt;layout.row().label(label(&quot;Last Name&quot;)).add(lastNameField, 2).add(label(&quot;First Name&quot;)).add(firstNameField, 2);&lt;br /&gt;layout.row().label(label(&quot;Phone&quot;))&lt;br /&gt;.add(phoneField, 2).add(label(&quot;Email&quot;)).add(emailField, 2);&lt;br /&gt;layout.row().label(label(&quot;Address 1&quot;)).add(address1Field);&lt;br /&gt;layout.row().label(label(&quot;Address 2&quot;)).add(address2Field);&lt;br /&gt;&lt;br /&gt;Frameworks like Grails, JMock, JPA utilizes the fluent APIs. We also have some samples in standard JDK itself like StringBuffer, StringBuilder, ProcessBuilder etc...&lt;br /&gt;&lt;br /&gt;These are the commonly seen techniques in Fluent APIs with Java.&lt;br /&gt;- Method Chaining&lt;br /&gt;- Nested Interfaces&lt;br /&gt;- Builder Pattern&lt;br /&gt;- static imports&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;And finally the problems with fluent APIs,&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;It&#39;s definitely not the &#39;wow&#39; technique. People have been using this for a quite long time &amp;amp; now we have just fancy name &#39;Fluent API&#39; that&#39;s it. So let&#39;s not think this is like OOP or OOAD or MDA. It&#39;s a simple programming technique for making code look better.&lt;br /&gt;&lt;br /&gt;- DSL is about writing good essay. Programmers are not essayists&lt;br /&gt;- Java is not suitable for DSL- It doesn&#39;t have closures, open classes , quite verbose &amp;amp; is filled badly written APIs.&lt;br /&gt;- It&#39;s very difficult to get correct in developing DSLs.Fluent API can be useful for highly used API,otherwise the investment of developing may not be as effective as intended. Thus, not all API can be made fluent.&lt;br /&gt;- Difficult to track down null return value issues that occur somewhere in the chain&lt;br /&gt;- Difficult to handle the exceptions, especially while dealing with existing APIs having checked exceptions.&lt;br /&gt;- One of my &#39;java friend&#39; was not ready to believe some of the fluent samples that I showed him were actaully a java code, :-), so there is also -ve impact on readability&lt;br /&gt;- Need to write more code to make code fluent.&lt;br /&gt;&lt;br /&gt;Summary:&lt;br /&gt;I strongly believe that DSL, both internal &amp;amp; external helps in developing better software that is easy to learn,extend, use &amp;amp; hard to misuse.&lt;br /&gt;&lt;br /&gt;That&#39;s it, Hope that I was able sell fluent APIs to the new guys.&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;a href=&quot;http://martinfowler.com/dslwip/&quot; target=&quot;_blank&quot;&gt;Domain Specific Language Book &lt;/a&gt;by Martin Fowler&lt;br /&gt;&lt;a href=&quot;http://martinfowler.com/bliki/DomainSpecificLanguage.html&quot; target=&quot;_blank&quot;&gt;Domain Specific Language&lt;/a&gt; by Martin Fowler&lt;br /&gt;&lt;a href=&quot;http://martinfowler.com/bliki/DslBoundary.html&quot; target=&quot;_blank&quot;&gt;DSL Boundary&lt;/a&gt; by Martin Fowler&lt;/integer&gt;</content><link rel='replies' type='application/atom+xml' href='http://praveendiary.blogspot.com/feeds/3371557519316810843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/31568098/3371557519316810843' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/3371557519316810843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31568098/posts/default/3371557519316810843'/><link rel='alternate' type='text/html' href='http://praveendiary.blogspot.com/2008/11/why-fluent-interface-here-some-thoughts.html' title=''/><author><name>Praveen</name><uri>http://www.blogger.com/profile/06430141770319257376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>