Wednesday, November 30, 2005

Searching in vain !!!

I was thinking long to join with some local user communities, so I can learn and contribute. But to my disappointment I am not able to find a local group, i.e. which is based in Chennai, for java or either OOAD.

Through the index of user groups given in java.net site, I was able to find some groups, but still most of them are not-active or either dead already or either not focused on what I was looking for.

Found a user group on Linux, with Madras Institute of Technology (Chennai), luckily alive & kicking.

But still my search for local java user group continues….

Tuesday, November 29, 2005

Searching for UNIX utilities in Windows

UNIX utilities like wc, ps, top, awk, xargs, grep, find are proven to be handy for many data crunching purposes. It helps a lot to manipulate the text information; those who are used to UNIX/Linux environments may feel bad when they turn to windows. Even in my case, I used the telnet sessions to connect over remote UNIX machine, and I am very much used to these utilities to find and gather data. But when I want to do the same work in my windows desktop, I feel helpless.

Those who want to try the shell environment in their windows machine can try the Cygwin. Cygwin is powerful and very raw to handle. Only an UNIX user will be very comfortable with it. In the case you were just looking for the utilities (like ls, grep, top,awk, also little shell support), you can go for UnixUtils project from open source community Source Forge. This provides excellent support for general utilities.

Also try out Windows SFU (Services For UNIX) , the first place winner in Linux annual conference, from Microsoft. Moreover it’s free now! It provides excellent support for shell utilities, also for System management tools like NFS, telnet client/server.

Example:
The following command will examine all Java files located in the directory src and print the 10 files with the highest number of occurrences of a method call to substring:

find src -name ’*.java’ -print |
xargs fgrep -c .substring |
sort -t: -rn -k2 |
head -10

Also try tools from OutWit  [Outwit is a suite of tools based on the Unix tool design principles allowing the processing of Windows application data with sophisticated data manipulation pipelines. The outwit tools offer access to the Windows clipboard, the registry, the event log, relational databases, document properties, and shell links.]

I like the winclip tool, because in command prompt I can use a command like

  • winclip –p | grep ‘Spring’ | cut –d –f2


And I can change the clipboard content, and re-run the command simply, in the shell

Thursday, November 24, 2005

Ruby on Rails

Ruby on Rails


This framework/model is derived from the project of making the site “BaseCamp” in ruby. BaseCamp is project management site, well known to many. It also offers some other self management tools like, BackPack, Tada lists, and others.


Ruby is a framework, very good enough for applications which are basically CRUD. (Web-apps which are basically acts as an interface to Create/Retrieve/Update/Delete)
It is easier to create a site in minutes, and also easier to customize. Maintaining them is also easier.


See the video on
http://www.rubyonrails.com/media/video/rails_take2_with_sound.mov
Or
http://railsmirror.zottmann.org/rails_take2_with_sound.mov

Dynamic/Static Languages

Dynamic/Static Languages

Once it was felt that type-checking is proved to reduce the commonly occurring errors. But now-a-days it is more seen as a culprit for productivity.

Read this:
By Uncle Bob (Robert C Martin) =>  http://www.artima.com/weblogs/viewpost.jsp?thread=4639

But don’t think it will replace the static typing languages; it will better evolve, & static typing languages to co-exist with dynamic.

Virtual Machine supports dynamic languages?
Generally JVM are written for static type-checked languages, are worst at supporting the dynamic languages. We absolutely need a JVM which can support both kinds of languages for portability. ‘Parrot’ is Virtual Machine implementation for dynamic languages (as described, but its still in incubation). There is a long way to come. Meanwhile Sun also promises to include a new byte-code ‘invokedynamic’ in the JVM, for supporting these dynamic languages. Soon will be an environment that supports both of them.

References:

From JOT Magazine:
The (Re) Emergence of Agile Languages and Domain-Oriented Programming

Work At SUN => http://www.tbray.org/ongoing/When/200x/2004/12/08/DynamicJava

From & By Bruce Eckel =>   http://mindview.net/WebLog/log-0025

Friday, November 18, 2005

Rolling on with Ruby along Others

Ruby, the most talked about language in the recent times. What does it offer? I do tried out ruby. It has most of its syntax borrowed for PERL, only the good things form Perl. Handling with data in hashes, is the most toughest thing I tried with Perl, de-referencing and accessing the data types make me sick.

The reason why we come out of main stream language, and try out things in a scripting language is the rapid development times that it offers, the pre-built libraries it offers. The things which we develop in these scripting language are mostly effective tools, which aids in out work. Say in Perl, I tried out to write a script that performs, load test of an web application. All I have to do, is search for pre-built exhaustive libraries (posted by developers around the world), and use them to built it the script that virtually performs a click on a web page, and captures the result, matches with successful response, records the time taken. If have done the same in Java/C++ then the application may be extensible, generic, but it would have taken more time, which costs more than what we can afford for that task.

Python, a nearly same language as like Ruby, boasted as alternative to Perl some years ago. I have no experience with Python, so cant comment more on it. But what I see with Ruby is ease with which can build tools/applications. We should compare only it with similar languages like Perl, groovy, python. Don't compare it with Java, because in mean terms it would see like that Ruby positions itself better, but Java gives huge options to developer, if properly chosen the options, then that project would be success. The problem is more with not choosing right option. The kind of options/flexibility Java offers is required for any project which sees itself for re-use/longer life-cycle. Maintenance/extension would be easier in Java, remember only if properly designed/ used the features pragmatically. But the scripts we write in Perl, are mostly have small life-cycles, the context they serve is smaller. Or to tell in the other way, we write them that way, which solves our current problems, rather focusing on reusability. It is not that we wont be able to design re-usable things with them, but again the time we take to design it such a way, would add up the cost. That overshoots the need of the hour.

Why these much of languages? Take Groovy, Python, Tcl, Perl, Ruby... I feel all these languages fight in a category that they a life-savers boats, not a huge posh ship. Each serve their own purposes. Will Ruby replace java, this is the question that is asked since Ruby on Rails framework has been released. My sincere thoughts are they wont. Ruby eases writing small tools which serves the purpose of the hour, Ruby on Rails may ease development of small web-applications, but not what Java does. Java is like meeting all needs, only u have to choose what u need. Choose a framework suit ur needs, if u don't need EJB, use a alternative for it. Don't choose because it offers. This not true only for choosing the apis/frameworks/technology while building an Java application. It is even true when u decide what language to use, Java/Ruby?

Ruby is a really a great contender for the category of building need of the hour tools/ applications whose context is small. Competitor to Perl/Python.

References:

Dave thomas Interview on Code Genration: talks abt using ruby in code genartion taks.
http://www.codegeneration.net/tiki-read_article.php?articleId=9

Talks abt Context, helpful in understanding about them
http://www.jot.fm/issues/issue_2005_09/column4

Michael Yuan's Java Blog: "Is Ruby Replacing Java? – Not So Fast ...
http://www.enterprisej2me.com/blog/java/?postid=145

Recommended Blog Posts