10 Useful Utility Softwares

Filed under: utilities, software, technology — Harshal at 11:20 am on Monday, May 28, 2007

Some of the useful utility software’s that really helped me when needed are :

1. Free Undelete

  • Web:-http://officerecovery.com/freeundelete/
  • Description:-In case of accidental deletion of files on a NTFS (used by default in Windows XP, 2000 and NT), FAT32 or FAT16 file systems FreeUndelete is the utility to help.

2. Easy Cleaner

  • Web:-http://www.toniarts.com
  • Description:-Easy to use registry cleaner. It was a freeware when I downloaded. However now you might have to pay the initial fees for accessing products on the site.

3. cygwin
Web:-www.cygwin.com
Description:-If you need to use unix commands over windows, a really nice utility.

Rest still to come….

securing java

Filed under: security, java, software, technology — Harshal at 7:21 am on Monday, May 28, 2007

http://today.java.net/pub/a/today/2004/10/22/obfuscation.html

http://www.javaworld.com/cgi-bin/mailto/x_java.cgi

closeable and flushable interfaces in Java 5

Filed under: java, software, technology — Harshal at 8:54 am on Tuesday, May 22, 2007

Java 5 has two separate interfaces in java.io package.

  • Closeable
    • A Closeable is a source or destination of data that can be closed. The close method is invoked to release resources that the object is holding (such as open files).
  • Flushable
    • A Flushable is a destination of data that can be flushed. The flush method is invoked to write any buffered output to the underlying stream.

Java : Final is not constant ?

Filed under: java, software, technology — Harshal at 9:03 am on Monday, May 21, 2007

Java doesn’t have anything like C++ const. You might think that final is like const, but it’s not:

  • A final variable in Java can be assigned to only once, but if the variable is a reference-type, you can still change what it refers to. Fun!
  • A const variable in C++ can be assigned to only once, where it’s declared, and nothing is allowed to change about the value, whether it’s an object or not. Now that is a nice feature!

This is what Java Language Specification talks about the final variable.

A variable can be declared final. A final variable may only be assigned to once. It is a compile time error if a final variable is assigned to unless it is definitely unassigned (§16) immediately prior to the assignment.

A blank final is a final variable whose declaration lacks an initializer.

Once a final variable has been assigned, it always contains the same value. If a final variable holds a reference to an object, then the state of the object may be changed by operations on the object, but the variable will always refer to the same object. This applies also to arrays, because arrays are objects; if a final variable holds a reference to an array, then the components of the array may be changed by operations on the array, but the variable will always refer to the same array.

Declaring a variable final can serve as useful documentation that its value will not change and can help avoid programming errors.

In the example:

class Point { int x, y; int useCount; Point(int x, int y) { this.x = x; this.y = y; } final static Point origin = new Point(0, 0);}

the class Point declares a final class variable origin. The origin variable holds a reference to an object that is an instance of class Point whose coordinates are (0, 0). The value of the variable Point.origin can never change, so it always refers to the same Point object, the one created by its initializer. However, an operation on this Point object might change its state-for example, modifying its useCount or even, misleadingly, its x or y coordinate.

Garbage Collection Report

Filed under: java, software, technology — Harshal at 5:15 am on Tuesday, May 15, 2007

The new -Xloggc:file option reports on each garbage-collection event, as with -verbose:gc, but logs this data to file. In addition to the information -verbose:gc provides, each reported event is preceeded by the time (in seconds) since the first garbage-collection event.

XCheck:jni - Additional checks for JNI

Filed under: java, software, technology — Harshal at 5:14 am on Tuesday, May 15, 2007

The new -Xcheck:jni command-line option performs additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function as well as the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used.

Deadlock Detection in Java

Filed under: java, software, technology — Harshal at 5:13 am on Tuesday, May 15, 2007

A deadlock detection utility has been added to the Java HotSpot VM. The utility is invoked by a Ctrl+\ on the command line while an application is running. The utility detects Java-platform-level deadlocks, including locking done from the Java Native Interface (JNI), the Java Virtual Machine Profiler Interface (JVMPI), and Java Virtual Machine Debug Interface (JVMDI).

Multiple VM’s in Java

Filed under: java, software, technology — Harshal at 5:05 am on Tuesday, May 15, 2007

The Java 2 SDK, Standard Edition, contains two implementations of the Java virtual machine (VM).

  • Java HotSpot Client VM
  • The Java HotSpot Client VM is the default virtual machine of the Java 2 SDK and Java 2 Runtime Environment. As its name implies, it is tuned for best performance when running applications in a client environment by reducing application start-up time and memory footprint.
  • Java HotSpot Server VM
  • The Java HotSpot Server VM is designed for maximum program execution speed for applications running in a server environment. The Java HotSpot Server VM is invoked by using the -server command-line option when launching an application, as in
  • java -server MyApp

 

XML Namespace and QName Explained

Filed under: java, software, technology — Harshal at 7:26 am on Thursday, May 10, 2007

The XML Namespaces specification defines a way to group element and attribute names so that schemas created by one organization will not conflict with those created by another. Just as two Java classes can have the same name as long as they are defined in separate packages, two XML elements can have the same name as long as they belong to different namespaces.

Each namespace defined in an XML document must be associated with a distinct uniform resource identifier (URI), which is usually a URL. These URIs have no semantic meaning and do not refer to actual web resources. You should define namespace URIs using domains that you control to prevent naming conflicts for the same reason that you should follow the URL naming convention for Java packages.

Two URIs are considered distinct if they are distinct character strings, regardless of whether they would resolve to the same physical resource (i.e. http://localhost and http://george are distinct URIs in the context of XML namespaces even on the host george).

Namespaces are associated with a prefix when they are declared and this prefix is used along with a local name to represent an element in an XML document. A namespace declaration looks like this:

The namespace http://url1 is bound to the prefix “a” and the namespace http://url2 is bound to the prefix “b” in this example. Three child elements of

: , , and , would have no namespace, a namespace of “http://url1″, and a namespace of “http://url2″, respectively, and all would have the local name “child”.

Namespaces have a scope associated with them. A namespace declared in a parent element is bound to a given prefix for that element as well as for all of its child elements, unless that prefix is “overridden” in a child element by being assigned to a different namespace. The association between the namespace and prefix declared in an element do not apply to the siblings of that element. This is equivalent to the scope of variable names within the Java programming language.

A default namespace can be defined by omitting the prefix mapping in the declaration as in “xmlns=’http://url3′”. At most one default namespace is in effect at any given point in an XML document. The default namespace is scoped just as the prefix mappings are. If a default namespace is in scope and an element appears with no prefix then it is associated with that default namespace.

Attribute names never inherit the default namespace and must be explicitly mapped to a namespace.

The “qName”, or qualified name, argument contains the element name exactly as it appears in the XML document, including the prefix and colon, if appropriate

Is Information Technology maturing?

Filed under: philisophy, personal, software — Harshal at 7:57 am on Monday, December 4, 2006

Dec 1, 2 – 2006. I was at a Java Conference No; it was neither in the US nor at Europe. Guess what, it was in India at amacha pune.

IndicThreads.com did a fantastic job of hosting a Java Conference for the population which today writes real java code for a lot of fortune 500 companies.

I was also impressed by the objective Harshad had out of the conference. He talked about the fact that although Indian IT industry is a strong force of lacks of IT professionals, we lag in developing world class products or very strong open source contribution. Its time the Indian IT industry and the developers to start taking this seriously and start innovating.

The two day sessions were fun. It included a lot of information, technology, frameworks and discussions. It was interesting to see people bashing and appraising every other technology very hour. If EJB 3.0 was a hit now, you might see someone really hitting it hard the next hour and pitching in for spring. The hour after that you find EJB 3.0 is back in the game… wow!

The session on the first day started with Raghu talking about “Integrating BPEL workflow and business rules”. This also showed Oracle’s SOA capabilities to some extent. Atul kahate explained Enterprise Java Security thereafter. Atul was really clear and simple in explaining basics of security. There was a surprise show by Janaki Ram from Microsoft following that. I must admit that Janaki did a good job of throwing enough light on the .NET 3.0 architecture and salient features in the 45 mins. allocated to him. The next session was from Ramesh. I admired ramesh’s frank thoughts about SOA and web 2.0. The stage was then taken over by Debu. Debu is a real fun to listen to and explained EJB 3.0’s power to the community. Peter demystified spring for us the next. He also showed the JTrac open source project he worked on which was among the top 100 downloads on sourgeforge. Following that there was again an interesting talk about “Apache Geronimo” server by Kishore. Finally the first day session was closed by Harshad showing the fancy power of Groovy and Grails.

The second day started with Hibernate Guru, Gavin talking about JBoss Seam framework and its advantages. Janak following the session explained about the Rich Internet Technologies and the methodologies to choose them. Gavin and Debu replied to queries regarding Java Persistent API. The session following that was by Sanjeeb who talked about the difference between J2EE and Java EE 5. He also showed a demonstration of Glassfish application server and developing and deploying applications over the same. Jitender Singh from persistent made a surprise entry replacing Jitendra to talk about ruby and rails. All in all the conference covered a whole gamut of technology, frameworks and servers.

There were many things that a lot of them talked about in the entire conference. However the one common thing that I could extract out other than all the good technical stuff was that the IT industry is now showing signs of maturity.

If we look at any traditional engineering stream they have a very strong engineering background. A 2-stroke engine for example is based on all the mechanical engineering fundamentals and the pipelines built do take care of the correct fluid mechanics fundamentals before design. IT applications, although uses some engineering principles were not strongly coupled with the engineering basics. Traditional engineering applications have a lot more process focus. Each and every application has well defined processes and clear flows defined to track the processes. The software applications developed do not guarantee such process focus. Traditional engineering applications are optimized for simplicity in implementation and undergo constant improvements.

With business process managers, coming in a big way (BPM’s are not new, what’s new is the fact that they are getting popular and expanding horizons) there seems to be an alignment with the traditional process focus. The applications being built with processes are much more in sync with the actual business processes. This also gives the domain users understand the flow of the software application much easier then showing them some HTML prototypes of how the system will look like. The heterogeneous systems are getting more standards based which are again what the traditional engineering systems are. Components are becoming more loosely coupled and have clear interfaces. This allows real and easy plug and play support over various heterogeneous environments. This can further allow some components of a big system to be developed by company x whereas company y can develop other component and a company z integrates x and y. Automobile industry for example functions the same way in case of a traditional industry. There is a lot more focus on simplification of development. This gives the implementers an easy way to produce quicker outputs and better productivity.

All this makes me believe that Information technology is maturing. It’s getting more aligned to the traditional engineering stream which is a welcome sign.