<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Marcelo Mayworm&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mayworm/" />
<modified>2006-12-21T08:14:02Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/mayworm/295</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2006, mayworm</copyright>
<entry>
<title>Inside source code crawler world: the evolution of searching, mining and retrieving of software components</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mayworm/archive/2006/12/inside_source_c.html" />
<modified>2006-12-21T08:14:02Z</modified>
<issued>2006-12-19T20:32:36Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mayworm/295.6203</id>
<created>2006-12-19T20:32:36Z</created>
<summary type="text/plain">Fabiano Cruz and I decided to talk about the evolution of code search and how shareable is the source code through the world nowadays. We will split up this post in three or more essays. In this first essay, we are going to classify the evolution of source code search engines. So, please, feel free to drop us a line spreading your opinion about this topic.</summary>
<author>
<name>mayworm</name>

<email>mayworm@ieee.org</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mayworm/">
<![CDATA[<p></p>
Software developers are facing a big challenge in today's software development area, which is: developing and delivering, often complex, high quality running software using multiple object-oriented (OO) frameworks, libraries and application programming interfaces (APIs) in very short period of time. This large spectrum of possibilities results in a steep learning curve due to its huge amount of information – classes, methods, interfaces, relations, dependencies and so forth – to be assimilated. At the same time, companies are struggling to fit into their tight schedules while dealing with pressure to reach deadlines and deliver products to market earlier than its competitors. This creates a good opportunity to make use of mechanisms that might improve the quality and productivity of development by using existing software assets.
<p></p>
<a href="http://weblogs.java.net/blog/fabianocruz">Fabiano Cruz</a> and I decided to talk about the evolution of code search and how shareable is the source code through the world nowadays. We will split up this post in three or more essays. In this first essay, we are going to classify the evolution of source code search engines. So, please, feel free to drop us a line spreading your opinion about this topic.
<p></p>
It's an ordinary habit, developers ask for a source code sample to others colleagues. For instance: if you need to create a simple JTree, it's easier and faster to ask someone to send a sample code like Listing 1, instead of trying to learn from the API. Who has never asked for a code snippet to a friend? 
<p>
<pre>
DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root"); 
DefaultMutableTreeNode child1 = new DefaultMutableTreeNode("Child 1");
root.add(child1);

DefaultMutableTreeNode child2 = new DefaultMutableTreeNode("Child 2");
root.add(child2);

JTree tree = new JTree(root); 
someWindow.add(new JScrollPane(tree));
</pre>

Listing 1 - JTree sample code snippet
<p>
<p>
We could roughly compare the Advanced Research Projects Agency Network (ARPANET) in the beginning of the WWW project without Google Search Engine with the Software Development area without a powerful mechanism to search, mine and retrieve source code samples. Indeed we hadn't 25 billion web pages to index as we did not have all those fancy languages and frameworks in the software development field as we have today. 
<p>
So, there are several tools available to empower developers with an easy-to-use interface to search for source code snippets and share source code among other developers. For instance, developers can make their source code available to a lot of people through 'forge' repositories, blogs, articles and so on. 
<p>
In order to classify the evolution of source code search engines, we could say that the <strong>First Generation</strong> of these tools were the popular Unix command: find (see Listing 2 below). The find command allows the Unix user to process a set of files and/or directories in a file subtree. It can be used to search certain code snippet in a project directory, providing support for coding by "copy-and-paste" or the "develop by example" practice, or you could even call it [reuse]. 
<pre> 
find . –name *.c -exec grep "hashtable" '{}' \; -print
</pre>
Listing 2 - The find command
<p>
<p>

The basic idea is to run the find command on a directory in order to locate a set of files that match a shell pattern or a regular expression. Run 'grep' for each file and look for a certain pattern. Matched lines, including some context, are collected and displayed for visualization. The user may inspect an entire file if he/she wishes. 
<p>
Analyzing the code search tools evolution, the <strong>Second Generation</strong> was the traditional search engines which are based on information retrieval technologies. There, the developers could find and retrieve source code samples. Nevertheless, these tools implement techniques such as text relevance and link analysis that can't be integrally applied to source code. So, while the developers are looking for a small source code piece, these tools show plain text as result. Clearly it doesn't apply different concepts and techniques for processing and searching for structured source code, determining the probable intent of a search, leaving to developers the result analysis job. Of course, this type of search has its drawbacks. 
<p>
Some freshest code search tools (see Table 1 below), and here we could say <strong>Third Generation</strong>, appreciates the way of thinking to enrich the support and service which will definitely improve the search quality. Currently, the way to automatically retrieve such volumes of source code data is through the use of a focused Web crawler, which is a program that visits many repositories (public source code repositories like java.net and sourceforge) and scans their content, visiting and indexing more source code. 
<p>
<table width="491" border="0" cellpadding="1">
  <tr>
    <td width="186" bgcolor="#CCCCCC"><div align="center" class="style1">Tool</div></td>

    <td width="289" bgcolor="#CCCCCC"><div align="center" class="style1">URL</div></td>
  </tr>
  <tr>
    <td>Google Code Search </td>
    <td><a href="http://www.google.com/codesearch">http://www.google.com/codesearch</a></td>
  </tr>
  <tr>

    <td>Koders</td>
    <td><a href="http://www.koders.com">http://www.koders.com</a></td>
  </tr>
  <tr>
    <td>Ucodit</td>
    <td><a href="http://www.ucodit.com/espviewer">http://www.ucodit.com/espviewer</a></td>
  </tr>

  <tr>
    <td>Jsourcery</td>
    <td><a href="http://jsourcery.com">http://jsourcery.com</a></td>
  </tr>
  <tr>
    <td>Krugle</td>
    <td><a href="http://www.krugle.com">http://www.krugle.com</a></td>

  </tr>
  <tr>
    <td> merobase </td>
    <td> <a href="http://www.merobase.com">http://www.merobase.com</a></td>
  </tr>
</table>

Table 1 – Source code search engines

<p>
<p>

There are others requirements to take in account while effectively digging for source code, like: Metadata terms, class name, imports, code block, comment block, method return and others. For instance, a Java source code provides a good way to get information to index and crawler, like anotations, code conventions (standard conventions that Sun follows and recommends - java.sun.com/docs/codeconv) and so forth. We can't forget about Fingerprints, which are an interesting feature provided by some Code Search tools. It denotes both the presence and multiplicity of specific programming constructs within individual code entities. Some code search tools make available several ways of fingerprint search, for example, Micro Patterns in Java Code, which provides information as to whether or not simple design patterns are present within a code entity. 
<p>
The other special feature available in some code source search engine is a kind of binder, where developers can save search results and share them with others, providing benefits not available in traditional search engines. We can imagine an automatic Agent notifying you when additions are made to your binder. 
<p>
In the last couple of years source code specialized search have been emerged. These tools support different programming languages, and you can filter by license, besides many others interesting features. 
<p>
When you ask developers the more excited users of source code search engines what is the benefit of using such tools, they point out "reuse", and a lot of them are Java developers. Indeed, this is explained due to the fact that the Java community is accomplished through the process of sharing and reuse. 
<p>
Another thing that has been emerging is tools for code search directly integrated into the development environment, providing contextually search capabilities where, depending on what the developer is suppose to do on that part of the code, these tools can query a sample repository for code snippets that are relevant to the programming task at hand. For instance, if you are writing a MD5 method within a class, these tools can infer queries from context, so there is no need for the programmer to write queries once the most structurally relevant snippets are returned to the developer and they can be navigated. 
<p>
Undoubtedly, tools like that can help large organizations to go beyond reuse barriers, empowering them with a straightforward approach for searching, mining and retrieving software components and source code snippets across its, source code repositories (usually distributed). Also, many software developers can quickly find helpful and useful information for building even more high-scale and pluggable software components, keeping them focused on the problem domain at hand. 
<p>
Last but not least. We hope you enjoyed the reading, and possibly learned a few things. You are also welcome and encouraged to drop your comments here. In the next post, we’re planning to go deeply in the <strong>Third Generation</strong> source code crawler world, comparing the existing tools, its strengths and weakness, particularly regarding the Java language. 

]]>

</content>
</entry>
<entry>
<title>Using Maven to remove Chinese Wall during offshore development</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mayworm/archive/2006/03/using_maven_to.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-03-10T18:19:16Z</issued>
<id>tag:weblogs.java.net,2006:/blog/mayworm/295.4290</id>
<created>2006-03-10T18:19:16Z</created>
<summary type="text/plain">I came across several interesting communication glitches in an offshore development software. This project comprises analysis, design, architecture and QA teams who work onshore, while developer teams are working offshore. We faced problems such as communication bottlenecks and lack of awareness of what developers were physically producing. A big part of these problems we got solved through the implementation of a communication plan between the teams. This plan focused on face-to-face interactions and the use of tools like Wiki, IM, Skype, forum and desktop sharing systems.</summary>
<author>
<name>mayworm</name>

<email>mayworm@ieee.org</email>
</author>
<dc:subject>Tools</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mayworm/">
<![CDATA[<p>I came across several interesting communication glitches in an offshore development software. This project comprises analysis, design, architecture and QA teams who work onshore, while developer teams are working offshore. We faced problems such as communication bottlenecks and lack of awareness of what developers were physically producing. A big part of these problems we got solved through the implementation of a communication plan between the teams. This plan focused on face-to-face interactions and the use of tools like Wiki, IM, Skype, forum and desktop sharing systems.
</p>
<p>
Motivated by the fact that developers were not present in the same place as the analysis, design, architecture and QA teams, but these teams needed to interact with whatever the developer teams generated(source codes, unit tests, etc.), or in some situations they needed to be aware of situations which involved other group members, we decided to use <a href="http://maven.apache.org/">Maven</a> to provide awareness for these groups that were geographically scattered. 
</p>
<p>
Using <a href="http://maven.apache.org/guides/mini/guide-site.html">Maven site generation</a> was a simple way to make available information on source code projects, where scattered teams could analyze developers’ work and  become aware of who they were working with – thus using up-to-date information. Therefore teams of analysis and design, architecture and QA can evaluate source codes and developers tasks (e.g. Unit tests, code analysis, Test coverage) by utilizing the process designed for the project, in addition to aiding the developer teams to verify if they are following code-style, and adopted metrics and executing unit tests(for domain layers and persistence layers, for instance), defect tracking, requirements queue for implementation, Javadocs, and others.
</p>
<p>
Maven site generation easily provides a site with several project information. The secret consists in adding interesting plug-ins which will generate reports. Some of the plug-ins that I like and consider important to team communication are Javadocs, Unit test, Test coverage, FindBug, PMD/CPD, CheckStyle, Changelog, TaskList, JXR, Developer Activity, FAQ, StatCvs,  Dependencies Graph, Metrics(JDepend and Javancss) and specific plug-ins that you can write.
</p>
<p>
Distance developer software is very challenging, mainly if the subject is awareness between groups. Whenever possible, you need to make source code information available as it is produced, and Maven is a simple way to do this and much more.
<p>
<a href="http://www.mayworm.com"></a>
</p>]]>

</content>
</entry>
<entry>
<title>Teaching Java platform to undergraduate students is a process</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mayworm/archive/2005/12/teaching_java_p.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-12-28T12:52:10Z</issued>
<id>tag:weblogs.java.net,2005:/blog/mayworm/295.3857</id>
<created>2005-12-28T12:52:10Z</created>
<summary type="text/plain">Learning Java platform is a process. Some JUG Petropolis members and me have been teaching Java platform for five years free of charge in an academic environment. Our focus is to help somebody in a academic community, who wants to learn Java. I always describe a strategy to make sure that students can continue to learn Java effectively.</summary>
<author>
<name>mayworm</name>

<email>mayworm@ieee.org</email>
</author>
<dc:subject>Community: Global Education and Learning Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mayworm/">
<![CDATA[Learning Java platform is a process. Some <a href="https://jugpetro.dev.java.net">JUG Petropolis</a> members and me have been teaching Java platform for five years free of charge in an academic environment. Our focus is to help somebody in a academic community, who wants to learn Java. I always describe a strategy to make sure that students can continue to learn Java effectively.
<p>
Here's How:
<p>
<ul>
<li>Remember that learning Java platform is a gradual process - it does not happen overnight.</li>
<li>Define your learning objectives early: What do you want to learn
 and why?</li>
<li>Make learning a habit. Try to learn something every day, and put it into practice. You need to type code!</li>
<li>Remember to make learning a habit! If you study each day for 30
 minutes Java will be constantly in your head. If you study once a week, Java will not be as present in your mind.</li>
<li>Choose your materials well. You can get tips of sites and materials with a JUG near you.</li>
<li>Find friends to study and practice with. Learning Java together can be very encouraging.</li>
<li>Move your finger!  Practice coding what you are learning. It may
 seem strange, but it is very effective.</li>
<li>Be patient with yourself. Remember learning is a process - writing
 a code well takes time.</li>
<li>Communicate! There is nothing like communicating. Book exercises
 are good - having a JUG friend on the other side of the world who understands your code is fantastic!</li>
<li>Use the Internet. The Internet is the most exciting, unlimited
 Java resource that anyone could imagine and it is right at your finger tips.</li>
</ul>]]>

</content>
</entry>
<entry>
<title>Are software architects not working hand-in-hand with developers?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mayworm/archive/2005/12/are_software_ar_1.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-12-21T19:53:48Z</issued>
<id>tag:weblogs.java.net,2005:/blog/mayworm/295.3842</id>
<created>2005-12-21T19:53:48Z</created>
<summary type="text/plain">Some time ago, a project I participated as a team manager, called my attention. The development team was constantly complaining about the complexity they had to grapple with for implementing every single use case. When asked whether their difficulty lay in the technological aspects, or even if the core business involved was too complex, they reported that their problem was elsewhere. Namely the challenge actually had to do with the steps they had to follow in order to attain, for instance, a simple CRUD respecting the architecture designed by the software architect. A CRUD with just two attributes required the development of 10 different classes to allow the insertion of a simple record in the database.</summary>
<author>
<name>mayworm</name>

<email>mayworm@ieee.org</email>
</author>
<dc:subject>J2EE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mayworm/">
<![CDATA[Some time ago, a project I participated as a team manager, called my attention. The development team was constantly complaining about the complexity they had to grapple with for implementing every single use case. When asked whether their difficulty lay in the technological aspects, or even if the core business involved was too complex, they reported that their problem was elsewhere. Namely the challenge actually had to do with the steps they had to follow in order to attain, for instance, a simple CRUD respecting the architecture designed by the software architect. A CRUD with just two attributes required the development of 10 different classes to allow the insertion of a simple record in the database.
<p>
<p>
Then I coincidentally came across a <a href="http://www.bloggingaboutjava.org/cms/wordpress/?m=20051122">blog</a> posted by Okke van ‘t Verlaat   which got me thinking about our predicament.
<p>
Our J2EE based project demanded that the development of any CRUD follow a bundle of classes defined through several design patterns, as follows:
<p>

<a href="http://weblogs.java.net/blog/mayworm/archive/diagram." onclick="window.open('http://weblogs.java.net/blog/mayworm/archive/diagram.','popup','width=683,height=440,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">Diagram</a>

<p>

The team made use of this set of classes in about 90% of the use cases they implement. This structure was designed using a Business Delegate, a Session Façade, Application Service(s), Data Transfer Object(s), EntityBean(Simple data Pojo) and Data Access Object. Moreover, it was always necessary to use factory embedded abstract classes for the DAO´s, Business Delegate and Application Service.
<p>
The diagram above shows HibernateDAO realizing Interfaces (DAO's). It is important to remind that Hibernate provides database independence for several vendors (in this project we need to be able to work with different databases). As a matter of fact, is it really necessary to create interface for DAO's? 
<p>
This architecture represents a possible <a href="http://www.martinfowler.com/bliki/AnemicDomainModel.html">anemic domain model</a>, and it was built from several design patterns that aren’t necessary. There aren't business objects with domain logic, which are responsible to keep track of the business rules. Instead of it, there are services objects that catch the domain problem.
<p>
This services objects are using business objects only to storage data. Is it "organized" as procedural design style?
They are keeping business operations into service objects in the project as a whole.
<p>
I agree that  it is important to have a service layer that encapsulates the application logic, helping transaction and managing information of operations. Therefore, does this choice avoid the creation of core business objects? 
With this architecture, a simple insert required the implementation of several classes. Isn’t it possible to throw some of these classes away?
<p>
Why the software architect don't think simple when designing the architecture (KISS - Keep it simple as possible)?
<p>
It is fundamental for software architect to provide a solution design that is truly viable and that can be successfully and rapidly constructed, implemented, operated and managed.
<p>
<p>]]>

</content>
</entry>
<entry>
<title>The fast way to win a JavaOne pass - Brazilian developers only</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/mayworm/archive/2005/11/the_fast_way_to.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-11-22T19:20:37Z</issued>
<id>tag:weblogs.java.net,2005:/blog/mayworm/295.3682</id>
<created>2005-11-22T19:20:37Z</created>
<summary type="text/plain">NetBeans, SouJava and GlobalCode launched the &quot;Desafio&quot; NetBeans in the 
last International Marathon 4 Java. Brazilian developers have a chance to win A JavaOne2006 pass, entitling the winner to a free roundtrip airfare to San Francisco with hotel accommodations included.</summary>
<author>
<name>mayworm</name>

<email>mayworm@ieee.org</email>
</author>
<dc:subject>Community: NetBeans</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/mayworm/">
<![CDATA[<p>
NetBeans, SouJava and GlobalCode launched the "Desafio" NetBeans in the last International Marathon 4 Java. Brazilian developers have a chance to win A JavaOne2006 pass, entitling the winner to a free roundtrip airfare to San Francisco with hotel accommodations included. You can participate as an individual or a team. If you choose to participate as a team and you win the first place you will be awarded 3 JavaOne2006 passes, namely 3 free roundtrip airfare to
San Francisco with hotel accommodations included.
<p>
To qualify, you must devise a novel and original plugin for NetBeans 5.0, good enough to be the chosen one. But it is not all that simple. Some rules apply. So go ahead and check them out at <a href="https://desafionetbeans.dev.java.net">https://desafionetbeans.dev.java.net</a>.
<p>
Here are some ideas to inspire you. But watch out cause these plugins may already exist:
<ul>
<li>plugin to support LOG4J</li>
<li>plugin to support Hibernate</li>
<li>plugin to support Spring</li>
<li>plugin to support UML</li>
<li>plugin to support Maven</li>
<li>plugin to support JXTA</li>
<li>etc....</li>
</ul>
<p>
You must submit your plugin idea ASAP(deadline is 12/20), because 
this challenge promises to be great!
<p>
If you are a Brazilian developer please don't miss the boat. Face this challenge head on at <a href="https://desafionetbeans.dev.java.net">https://desafionetbeans.dev.java.net</a>.]]>

</content>
</entry>

</feed>