Archive for November, 2007

Simple Java Persistence API (JPA) Demo

One of the most visible obstacles to effective learning, IMHO, are wizards and various sorts of automation tricks used to simplify life for a developer. Now, before you jump off the edge and narrate a list of the benefits that tools in general provide let me just clarify that I am not against tools but newbies should not be introduced to tools when they are learning to develop software. I tend to think that it takes focus away from the details of the development process. So, I have been playing around with Netbeans 6.0 and I am quite impressed by the new features and amazed by how productive they can make developers. As with all tools, you tend to get used to the way Netbeans does things and soon enough you wouldn’t know how to find your way around a compiler argument.

One of the most interesting features in Netbeans 6.0 is its support for JPA (Disclaimer: that is not a scientific stance … feel free to let me know of any better JPA experiences). While Netbeans 6.0 makes developing CRUD applications easy, I felt like I was learning how the Netbeans team view JPA and I would like to have an appreciation for the technology on its own or at least as far low level as I can go at this point.

I set out to implement a small application without the support of Netbeans or any IDE. A text editor with syntax highlight support would suffice for this task. After starting out with a single class, I discovered that my Java development environment was not setup nicely; I guess, I never got around to customizing it after formatting my hard disk. The process of setting up the environment made me realize that I couldn’t possibly do the demo with a text editor and the compiler alone. I needed a tool to help me with the compilation and of course subsequent execution. Besides, such a tool would also allow the demo to be somewhat portable. I decided to setup Apache Ant. I especially didn’t want to have to add all the jar files that I need for this demo to some environment variable and of course doing that would tie the demo to my machine.

Overview of Object Relational Mapping

The most common and popular method of storing data is in relational database though this by no means means that it is the only way of storing data. Most business application need to interact with a relational database at some point in their running and due to data-centric business operations, the data stored in the relational databases will last longer than most of the applications used to handle it. Object oriented software development has caught on and most of the popular programming languages are either purely (to some extend) OO or are capable of supporting OO concepts. OO is great for application logic and relational databases are great for data storage and manipulation but clearly these two are based on two different paradigms. The definition of a class is not so different from a definition of a table but there are concepts in either of these paradigms that doesn’t neatly map into the other. For example there is no equivalent of OO’s inheritance in the relational paradigm but inheritance can be represented. The mismatch between these two paradigms is usually reference to as the Impedance mismatch.

In order to develop applications, software developers have had to overcome the impedance mismatch and earlier efforts had been tedious since it is upon the developer to retrieve the data from the relational database and then transform it into objects which are then handled by the business logic. When it is time to send the business objects to the database, it is once again necessary to transform the object into a format that makes sense to a relational database. This back and forth movement between the OO and relational paradigms can be automated to some degree by defining an bridge between the two such that this bridge is able to transform back and forth with minimal involvement of the developer.

This is the need that ORM products address and most of them prescribe the definition of the mapping between the OO and relational paradigms; earlier ORM technologies made use of XML to specify the mapping between classes and tables. While the EJB standard require objects to implement interfaces and extend classes in order to benefit from ORM. The EJB approach typically targeted large scale enterprise application which left the small-medium scale application uncovered with regard to persistence though yes you can argue that JDBC was adequate for the needs of the small-medium scale application developers. For the Java community TopLink and Hibernate have been popular ORM products in the commercial and open source space respectively. For the Java community, it became necessary to standardize the persistence technologies that are in use and that’s how the JPA (Java Persistence API) comes into play.

The Idea of the Application

The application in this scenario manages the rooms in a hotel. From outset, the emphasis of the application will be more on the model than its capabilities – after all the objective is to get a hands on experience with JPA. This also mean that any UI enhancements will be added later on (… at least eventually? :)).

The application will enable the user to keep track of hotels; hotels have rooms and rooms have features and characteristics that distinguish them from all others.

Objectives

  • Demonstrate the basic CRUD capabilities of JPA without the use of an IDE
  • Portability across database products supported by JPA
  • The application should be self contained – doesn’t need a large, network based, multi-user RDBMS to implement

The Design

The application will be designed in 3-tiers though for the moment, I am more interested in the database layer and application layer. So, for the database … we will not worry too much about which database we are using because one of the objectives is to have the demo portable across the vendor divide which of course means that we are not going to leverage features specific to a particular database product (not that we need to do that).

The original database was developed on Apache Derby in order to achieve the objective of having the application self contained. Apache Derby can be configured as a network server but in this application it is configured as an embedded database. There are obvious performance implications as a result of using an embedded database but portability in the design should make it easy to switch to the network server installation of Apache Derby or move up to something much larger like MySQL or perhaps even Microsoft SQL Server. While working on the application, I couldn’t have Apache Derby’s tools connected to the database and run the application successfully at the same time. Multiple access to the database was not allowed.

A bit of a background on the database selection process: the original intention was to use SQLite as the database but the JPA implementation distributed with Sun’s GlassFish Application Server does not support SQLite as a database at the time. Other embedded database products considered included HSQL and PointBase and of course Apache Derby.

For the business layer, I have the following objects identified:

    Object Name Description
    Hotel Network operator client
    Room A Hotel room
    Feature A feature
    FeatureGroup Enables features to be group under one category and thus make it easier to ensure sensible feature assignments to rooms e.g. Single bed and double bed are two separate features but both can be assigned to the same room. Putting these features in one category would make it easy for the application to do validations so as to ensure sensible features are chosen for the rooms.
       

The Java Persistence API

From Sun:

The Java Persistence API is a POJO persistence API for object/relational mapping. It contains a full object/relational mapping specification supporting the use of Java language metadata annotations and/or XML descriptors to define the mapping between Java objects and a relational database. It supports a rich, SQL-like query language (which is a significant extension upon EJB QL) for both static and dynamic queries. It also supports the use of pluggable persistence providers.

The JPA is developed as part of EJB 3.0 (JSR-220). EJB is a standard server-side component model implemented in application servers to enable them manage transactions, object distribution, concurrency, security, persistence, and resource management. These capabilities are automatically provided to distributed business applications that run in a compliant application. Included in the list of EJB capabilities is persistence and in EJB 3.0 that is the part of the architecture that is handled by JPA.

Entity

This is a Java class that represents an object in the domain model and as such its state can be persisted to a data store for late retrieval. Java Persistence API does its magic on what is commonly referred to as a Plain Old Java Object or simply POJO. A normal Java class is marked as an entity either through annotations or in an XML mapping descriptor.

Entities support inheritance, polymorphic associations, and polymorphic queries. Both abstract and concrete classes can be entities. Entities may extend non-entity classes as well as entity classes, and non-entity classes may extend entity classes.

The state of an entity is represented by instance variables, which may correspond to Java-Beans properties. The state of the entity is available to clients only through the entity’s accessor methods (getter/setter methods) or other business methods. Instance variables must be private, protected, or package visibility. The mapped state of an entity needs to be accessible to the persistence provider at run time so that the provider can update the database when the state of the entity changes. There are two ways of accessing an entity’s state:

  1. Field Access: annotating the fields of the entity (as shown below) will cause the persistence provider to by-pass the getter and setter methods of the entity class. Notice that the getter/setter methods may or may not be present but they are ultimately ignored by the persistence provider.
  2. Property Access: when this method or mode of access is used the getter/setter methods must be present. The annotations are placed on the getter methods of the entity.

The JPA puts some requirements on a Entity class as follows:

  • The entity class must have a no-arg constructor. The entity class may have other constructors as well.
    The no-arg constructor must be public or protected.
  • The entity class must be a top-level class. An enum or interface should not be designated as an entity.
  • The entity class must not be final. No methods or persistent instance variables of the entity class may be
    final.
  • If an entity instance is to be passed by value as a detached object (e.g., through a remote interface), the
    entity class must implement the Serializable interface.

The Annotations

JPA leverages annotations to implement object relational mapping but it is by no means the only way to achieve mapping. To understand the need for annotations, just consider the number of frameworks and APIs that make use of XML for configuration. It has become complicated to manage the large number of XML that can be found in one JEE project.

JPA specific annotations are colored orange in the above code sample and their simple and brief explanation follows:

Code Sample

package model;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.OneToMany;
import javax.persistence.JoinColumn;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.util.Date;
import java.util.Collection;

@Entity
@Table(name=”tblHotal”)
/**
* Hotel class
*
* @author Imma
*/
public class Hotel
{
    @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private int id;
    @Column private String name;
    @Temporal(TemporalType.TIMESTAMP) private Date dateCreated;
    @OneToMany(mappedBy=”hotel”) private Collection<Room> rooms;

    public Hotel(){}

    public void setId(int id) { this.id = id; }
    public void setName(String name) { this.name = name; }
    public void setRooms(Collection<Room> rooms){ this.rooms = rooms; }
    public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; }

    public int getId() { return this.id; }
    public String getName() { return this.name; }
    public Collection<Room> getRooms() { return this.rooms; }
    public Date getDateCreated() { return this.dateCreated; }
}

@Entity: marks an class as an entity. It is normally used to mark classes but can also be used to annotated subclasses and superclasses which may persist to different tables.

@Table: this annotation provides the mapping details between the entity class and the database table to which data about the entity is to be persisted and subsequently retrieved.

@Id: identifies a field of the class as  simple primary key. It can be used in conjunction with the @GeneratedValue annotation for simple primary keys that are automatically generated by the database using an auto increment feature that is common with most RDBMS.

@GeneratedValue: identifies an attribute such as a primary key field that is automatically generated.

@Column: this annotation tag is used to mark the column to which an attribute of an entity is persisted to. By default it takes on the name of the attributes which is being annotated. It can be placed on a field for field access or on a method for property access mode. In the above code sample the entity attribute name is annotated with the @Column annotation tag and since the name of the column is not specified, the JPA runtime assumes that name of the column is the same as the name of the attribute.

@Temporal: used to make a date, time or timestamp field.

@OneToMany: associations between entities can be bidirectional. For example, in the example application: a hotel has many rooms thus many rooms belong to one hotel. In order to fully express this relationship, two mappings are required. The relationship between a hotel and its rooms, with the hotel as the owning entity is marked using the @OneToMany annotation as shown in the code sample above. The inverse of this association is using the @ManyToOne annotation which is described next (after the code sample below).

The Room Class code is shown below; a hotel has many rooms and a room belongs to one and only one hotel. Notice how the relationship/association between the two classes is achieved using annotations and JPA. In addition to this, a room has features and a feature can below to more than one room. Conversely, a room has many features.

package model;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.ManyToOne;
import javax.persistence.ManyToMany;
import javax.persistence.JoinTable;
import javax.persistence.JoinColumn;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.util.Date;
import java.util.Collection;

@Entity
@Table(name=”tblRoom”)

/**
* Room class
*
* @author Imma
*/

public class Room
{
    @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private int id;
    @Column private String number;
    @ManyToOne @JoinColumn(name=”fkHotel”) private Hotel hotel;
    @ManyToMany
    @JoinTable(name=”tblRoomFeatures”, joinColumns=@JoinColumn(name=”fkRoom”),
               inverseJoinColumns=@JoinColumn(name=”fkFeature“))
    private Collection<Feature> features;

    public Room() {}

    public void setId(int id) { this.id = id; }
    public void setNumber(String name) { this.number = number; }
    public void setHotel(Hotel hotel) { this.hotel = hotel; }
    public void setFeatures(Collection<Feature> features) { this.features = features; }

    public int getId() { return this.id; }
    public String getNumber() { return this.number; }
    public Hotel getHotel() { return this.hotel; }
    public Collection<Feature> getFeatures() { return this.features; }

    public String getFeaturesAsString(){
        StringBuilder sb = new StringBuilder();
        sb.append(“{“);
        for(Feature f : features){
            sb.append(f.getName());
            sb.append(“, “);
        }

        if(sb.length() > 2)
        sb.delete(sb.lastIndexOf(“,”), sb.length());
        sb.append(“}”);

        return sb.toString();
    }
}

@ManyToOne: this is an annotation that is used to map a many to one relationship between entities. For example, in the code sample above a Room belongs to a hotel and a hotel has many rooms. I think it is easier to think of it as mapping many rooms to one hotel hence Many-To-One. Depending on how you named your columns in your database, you may need to use an additional annotation to complete the many to one mapping.

@JoinColumn: at the simplest level, this annotation is used to indicate columns in a database table that are involved in a relationship. This relationship could be a many to one as described above or a many-to-many relationship, as described below. In a many-to-one relationship, the @JoinColumn annotation is used to indicate the foreign key in the entity’s table.

@ManyToMany: this annotation is used to mark many-to-many associations between entities. In relational databases, this would involve the use of a joining table and the @JoinTable annotation is used to indicated this joining table as part of the @ManyToMany annotation.

@JoinTable: this annotation is basically used to mark a joining table for a many to many association. The joinColumns attribute of this annotation is used to indicate the columns that related the owning entity (Feature in the example below) to the other side of the relationship (Rooms in the example below). The inverse of the relationship is indicated using the inverseJoinColumns attribute of the @JoinTable annotation as indicated in the code sample below.

package model;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.ManyToOne;
import javax.persistence.ManyToMany;
import javax.persistence.JoinTable;
import javax.persistence.JoinColumn;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.util.Date;
import java.util.Collection;

@Entity
@Table(name=”tblFeature”)

/**
* Feature class
*
* @author Imma
*/
public class Feature
{
    @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private int id;
    @Column private String name;
    @Column private String description;
    @ManyToOne @JoinColumn(name=”fkFeatureGroup”) private FeatureGroup group;
    @ManyToMany
    @JoinTable
(name=”tblRoomFeatures”, joinColumns=@JoinColumn(name=”fkFeature”),
               inverseJoinColumns=@JoinColumn(name=”fkRoom“))
    private Collection<Room> rooms;

    public Feature() {}

    public void setId(int id) { this.id = id; }
    public void setName(String name) { this.name = name; }
    public void setDescription(String description) { this.description = description; }
    public void setRooms(Collection<Room> rooms) { this.rooms = rooms; }
    public void setGroup(FeatureGroup group) { this.group = group; }

    public int getId() { return this.id; }
    public String getName() { return this.name; }
    public String getDescription() { return this.description; }
    public Collection<Room> getRooms() { return this.rooms; }
    public FeatureGroup getGroup() { return this.group; }
}

This is part one of this demo. Part II will dwell on how JPA comes to life. If you have any comments and questions, please let me know through the comments section of this blog.

24 Comments

Considering a Desktop Operating System

I came across an InformationWeek article that got me thinking about PCs from the perspective of operating system and the related applications. The article makes some pretty valid points though since it is essentially in support of a brighter future for Linux on the desktop, some of the claims it makes require some objectivity.

Let me get this out of the way: I am a Linux user (I prefer Ubuntu on the desktop at the moment) and a Windows Vista user as well. I wouldn’t be quick to dismiss Vista because I think with Vista Microsoft seems to be getting some common sense and as such their effort to improve security frankly still feels like a version 1.0 product at this point and thus will improve with time. Some of the UI decisions in Vista are down right stupid: too many mouse clicks where Windows XP requires virtually none (I don’t need to click a button after the operating system informs me that my flash disk has been unplugged successfully). However, it is my sincere hope that Microsoft is listening to its customers/early adopters and planning appropriate changes to Vista. Just as I am hopeful that each new version of Ubuntu will bring improvement to the maturity of the distro as time passes.

A pragmatic approach to looking at desktop computers is preferable since it is only through this pragmatism that the best choices will be made when deciding about desktop operating systems and the associated applications. Windows has market dominance and regardless of how it got to that point the reality of the situation is that it is on most computers than any other OS. At the same time, this dominance does not suggest that it is a perfect system and perhaps because of its shortcomings there are opportunities for alternative operating systems and their respective environments. Security on Windows is one of the points that is regularly mentioned against the OS and with good reason as well but it would also be appropriate to look at the number of security breaches that affect Windows XP Service Pack 2 (and higher systems – SP 3 in the works) as well as the security vulnerabilities that affect Vista (granted the adoption rates of Vista are not that high at the moment)? Microsoft has poured resources into improving the security (for emphasis: THEY ARE TRYING TO ADDRESS THE SITUATION) and beating on Windows because of security may not hold for long.

The other gripe that goes around about Windows is the fact that it is bloated but a realistic view of the situation might also help put some perspective on it: support for hardware on Windows has been excellent to say the least and the backward compatibility record with Windows has been good as well. So my question is simply this: how do you expect new versions of Windows to support the multitude of hardware that previous versions have supported and at the same time ensure that software that used to run on earlier versions of Windows continue to run on these new releases? The most obvious answer to that question explains the bloat on new releases of Windows, that is if you can stop yourself from considering the evil intentions that Microsoft may have towards its install base. Looking at it from the perspective that Microsoft would like to bring business to its hardware partners, it may also hold as an explanation that presumes an evil intention on Microsoft’s part: bloated software means you need sturdier hardware specs and thus almost always results to buying a new computer and as such Microsoft and the OEM scratch each other’s proverbial backs. Of course there is also a more interesting angle to look at: how long is Microsoft going to stick to this policy of maintaining this large number of hardware as well as backward compatibility? Do they know how many of these old hardware devices they are supporting out of the box are still in active use and as such material to a large portion of their install base? It will definitely be interesting to see what happens in the future with subsequent releases of Windows. However, here is to hoping that Microsoft will see the wisdom of breaking with hardware support and backward compatibility. If you look at it, there is bound to be a point where hardware and backward compatibility is more expensive to the user than it needs to be, if we are not there already.

As the InformationWeek article points out, increased costs on Windows will force people to look for other alternatives though I think those who will seek these alternatives will most likely have little to no interest in having support for a wide array of hardware and/or maintaining backward compatibility. These are the characteristics of those who are getting their first PCs or whose business do not entirely depend on an already existing enterprise application that was built with Windows in mind exclusively. The aforementioned characteristics are not far off from the description of a developing world’s or emerging economies’ users and/or enterprise. A simple example: in most developing countries, cybercafes are a reality of life and with recent Microsoft efforts towards reducing the number of pirated copies of Windows, some of these enterprises that find themselves on the wrong side of Microsoft’s war on piracy will and have considered alternatives and a free price tag surely does look attractive. The problem of support personnel will initially exist but the entrepreneur in question is cornered and as such must address the personnel issue as time goes on. Simple economics logic would suggest that anyone would provide support for Linux in a cybercafe would most likely get a higher pay (based on the shortage of his/her skills) compared to his Windows comrades. This has the effect of more people showing interest in gaining Linux support skills and thus overtime increase the number of Linux support personnel. It has got to start at some point.

While Linux presents a good alternative for use in a cybercafe business, the professionals who will recommend it also needs to have respect for the operating system as far as representing it truthfully. I have heard so many times the term “open source” being used as an advantage of Linux. “Open source” is a loaded phrase that can possibly mean so many things to so many people; it does mean that you can get the software for free (as in free as beer) but at the same time its total cost of ownership may not be free more so in the light of a shortage of support personnel. Yes, the Internet is there and most people who are interested or have skills with open source software tend to be willing to assist where they can but the support that is available on the internet presupposes a person who knows what he/she is looking for in the first place. You can get some local assistance from your budding local Linux gurus but they also have day jobs to which they must attend and thus may not be available to provide their expertise. Depending on who you are talking to and their previous experience with open source, you may good a negative or positive reaction in return for suggesting Linux’s open source pedigree as an advantage. Keep in mind that you can just as easily have open source on Windows; open source does not automatically mean a wholly Linux powered environment.

 

Why Linux Will Succeed On The Desktop — InformationWeek

Leave a comment

Released: Visual Studio 2008 and .NET Framework 3.5

This day has been coming for a while and it is finally here: Visual Studio 2008 and the .NET Framework version 3.5 have been shipped. You can’t buy from your nearest, favorite computer shop as yet since this is a release to MSDN subscribers though trial downloads and Visual Studio 2008 Express Editions can be gotten from here. I must admit, I have not been following up closely on the developments surrounding Visual Studio 2008 but the new stuff that are added to version 3.5 of the .NET framework are certainly worth noting. Chief among the new additions include LINQ (Language Integrated Query) which is an integral feature of C# 3.0 and Visual Basic.NET 9.0.

Here is an overview of the new additions to the .NET framework 3.5 from its download page:

.NET Framework 3.5 builds incrementally on the new features added in .NET Framework 3.0. For example, feature sets in Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows CardSpace. In addition, .NET Framework 3.5 contains a number of new features in several technology areas which have been added as new assemblies to avoid breaking changes. They include the following:

  • Deep integration of Language Integrated Query (LINQ) and data awareness. This new feature will let you write code written in LINQ-enabled languages to filter, enumerate, and create projections of several types of SQL data, collections, XML, and DataSets by using the same syntax.
  • ASP.NET AJAX lets you create more efficient, more interactive, and highly-personalized Web experiences that work across all the most popular browsers.
  • New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards.
  • Full tooling support in Visual Studio 2008 for WF, WCF, and WPF, including the new workflow-enabled services technology.
  • New classes in .NET Framework 3.5 base class library (BCL) that address many common customer requests.

Also from the same page … a very important note that you may want to take a look at before you install the release version of Visual Studio 2008:

IMPORTANT:

Oh, a Channel 9 Video related to the release of Visual Studio 2008 and .NET Framework 3.5 can be found here.

Somasegar’s WebLog : Visual Studio 2008 and .NET Framework 3.5 shipped!

Leave a comment

Personality Profiles

It is interesting noting how people behave in general and what they think of themselves as well as their ideas about other people. A person can be described as outgoing or perhaps even reserved though I think extrovert and introvert respectively sounds more appropriate in describing such types of character. It goes without saying that it is not a bad thing to be an extrovert or an introvert for that matter but it is imperative that each person understand himself/herself sufficiently enough to identify which kind of profile fits his/her particular disposition.

The following is a description of Introverted iNtuitive Thinking Judging (INTJ) kind of a personality profile. It is from typelogic.com and credited to Marina Margaret Heiss:

To outsiders, INTJs may appear to project an aura of “definiteness”, of self-confidence. This self-confidence, sometimes mistaken for simple arrogance by the less decisive, is actually of a very specific rather than a general nature; its source lies in the specialized knowledge systems that most INTJs start building at an early age. When it comes to their own areas of expertise — and INTJs can have several — they will be able to tell you almost immediately whether or not they can help you, and if so, how. INTJs know what they know, and perhaps still more importantly, they know what they don’t know.

INTJs are perfectionists, with a seemingly endless capacity for improving upon anything that takes their interest. What prevents them from becoming chronically bogged down in this pursuit of perfection is the pragmatism so characteristic of the type: INTJs apply (often ruthlessly) the criterion “Does it work?” to everything from their own research efforts to the prevailing social norms. This in turn produces an unusual independence of mind, freeing the INTJ from the constraints of authority, convention, or sentiment for its own sake.

INTJs are known as the “Systems Builders” of the types, perhaps in part because they possess the unusual trait combination of imagination and reliability. Whatever system an INTJ happens to be working on is for them the equivalent of a moral cause to an INFJ; both perfectionism and disregard for authority may come into play, as INTJs can be unsparing of both themselves and the others on the project. Anyone considered to be “slacking,” including superiors, will lose their respect — and will generally be made aware of this; INTJs have also been known to take it upon themselves to implement critical decisions without consulting their supervisors or co-workers. On the other hand, they do tend to be scrupulous and even-handed about recognizing the individual contributions that have gone into a project, and have a gift for seizing opportunities which others might not even notice.

In the broadest terms, what INTJs “do” tends to be what they “know”. Typical INTJ career choices are in the sciences and engineering, but they can be found wherever a combination of intellect and incisiveness are required (e.g., law, some areas of academia). INTJs can rise to management positions when they are willing to invest time in marketing their abilities as well as enhancing them, and (whether for the sake of ambition or the desire for privacy) many also find it useful to learn to simulate some degree of surface conformism in order to mask their inherent unconventionality.

Personal relationships, particularly romantic ones, can be the INTJ’s Achilles heel. While they are capable of caring deeply for others (usually a select few), and are willing to spend a great deal of time and effort on a relationship, the knowledge and self-confidence that make them so successful in other areas can suddenly abandon or mislead them in interpersonal situations.

This happens in part because many INTJs do not readily grasp the social rituals; for instance, they tend to have little patience and less understanding of such things as small talk and flirtation (which most types consider half the fun of a relationship). To complicate matters, INTJs are usually extremely private people, and can often be naturally impassive as well, which makes them easy to misread and misunderstand. Perhaps the most fundamental problem, however, is that INTJs really want people to make sense. 🙂 This sometimes results in a peculiar naivete’, paralleling that of many Fs — only instead of expecting inexhaustible affection and empathy from a romantic relationship, the INTJ will expect inexhaustible reasonability and directness.

Probably the strongest INTJ assets in the interpersonal area are their intuitive abilities and their willingness to “work at” a relationship. Although as Ts they do not always have the kind of natural empathy that many Fs do, the Intuitive function can often act as a good substitute by synthesizing the probable meanings behind such things as tone of voice, turn of phrase, and facial expression. This ability can then be honed and directed by consistent, repeated efforts to understand and support those they care about, and those relationships which ultimately do become established with an INTJ tend to be characterized by their robustness, stability, and good communications.

Leave a comment

New version of Gmail Under the hood

It goes without saying that the launch of GMail made a lot more people aware of the potential of such technologies as AJAX. Launched on April 1, 2004 Gmail has been in beta testing for the whole of its life time to a point that you are getting a new version of it. I don’t understand the rationale behind the perpetual beta status but it seems to be unnecessary. In the latest update to Gmail Beta, we have a new version which ushers in a new contacts manager; this is perhaps the single most visible aspect of the new version of Gmail beta. The other improvements are mainly under the hood; the response is faster when you want to read an email in the current view. The quick response is a result of Gmail pre-fetching the emails showing in the current view.

The changes under the hood could also suggest a much better code base to allow further improvements on Gmail. What I would like to see is the integration of Google Gears with Gmail; this would make life much easier. Come to think of it, Gmail recently got IMAP support as a feature. I have been putting the IMAP support through its paces and it seemed fine to me though I didn’t get it to work with my Google Apps account. I hope that gets activated as time goes on. An integration of Google Gears with Gmail’s IMAP support would be awesome!

Leave a comment

Ubuntu Linux: Feisty Fawn To Gutsy Gibbon in place Upgrade

The pace at which new versions of the various Linux distros are released is certainly fast and perhaps that is a testament to the true power of the open source movement. Various players in the open source arena have been talking about the year of desktop Linux and so far there is no defining year that has been deemed deserving of that title. While competing platforms supporters may deride such claims, they would do well to recognize the pace at which changes are taking place in the Linux movement. It is true that the sheer number of distros available can be bewildering but at the same time the same (truth) can also be said of the improvements of the some of the more popular distributions each with about two releases in a year generally speaking. So, the latest release of the now popular Ubuntu Linux is the Gutsy Gibbon (interesting names these releases have) and it features a number of improvements which are quite interesting.

However, as much as I am proud of the fact that improvements are being made to the Linux OS through the various distros there remain a number of concerns that perhaps may need to be addressed. I can’t quite speak of myself as a Linux guru by any standards but I am figuring my way around the system with each day of use. I have been successful in installing Ubuntu on a dedicate machine and over time I have replicated the necessary environment I need to pursue what I am most interested in which on the Linux platform would include application development in Java and the LAMP stack though I also spend time exploring other related open source products such as PostgreSQL which can be a straight forward replacement for the more popular MySQL. The more time I spend working with Ubuntu Linux the more natural and straight forward it feels; I am getting used to how things work though there are moments in which I notice the glaring short comings of an ever evolving OS such as Linux in general and Ubuntu as a distribution. However with the rapid changes that are coming out of the respective communities these short comings are increasingly being address. To this end, I like working with Ubuntu and as such would like to have access to the latest and greatest releases that are available.

The aforementioned installation of Ubuntu, in my case was done when Feisty Fawn was the current release. I have always intended to upgrade to any new releases as they become accessible to me so it was with great expectations that I downloaded Gutsy. I tried installing Gutsy, hoping for a prompt to upgrade from my current Feisty installation but never got any; instead I was treated to a partition configuration section of the installer. Before you start giving me helpful suggestion, Feisty Fawn did make me aware of the availability of Gutsy. The only problem with that is that my internet connection is not fast enough to download 1.1 GB worth of data needed to upgrade my Feisty installation. 1.1GB will take some time to download over my internet connection and will most definitely require a download manager so that the process can be resumed at later date/time. Please notice that the interruption of the download process, taking into the account the slow internet connection, is virtually guaranteed: the internet connection may go down for any number of reason as it does usually and more importantly power may not be guaranteed for the duration of the time required to complete the download of the data (keeping in mind the slow internet connection). So, I have googled the world wide web without much success so far; I mean there has got to be a way to upgrade Ubuntu in place without creating new partitions or doing away with my current setup; yeah, the online upgrade option is definitely out of the question.

Lets look at this from a more philosophical perspective: Linux and Ubuntu specifically are open source which means that not much money is paid to acquire, use and distribute the software as long as the terms of the license are adhered to by all. So from that premise it is plausible to postulate that the users of this OS may not be connected to the internet, if at all but they still need to upgrade their systems to the latest releases. A way to do this upgrade offline without wiping out the previous installation would be a huge plus.

Leave a comment

Open Handset Alliance

Finally Google talks about its plans for the cell phone industry and the rumors around the web about GPhone and other similarly related speculative projections turned out to be an multi-national alliance of key players in the mobile phone industry though not all of them. The Open Handset Alliance comprised of some 34 companies at the time of its announcements and this alliance is build around Google’s Android platform. The members of the alliance are expected to release Android based equipment by sometime next year.

Google is primarily a service company and its bread and butter remains search from which it gains revenue through advertisement. Expanding this model to cell phones and other mobile devices would expand the reach of Google Ad platform and capabilities. While this is obviously the eventual target of Google’s mobile strategy, it has to do battle with the traditional way in which players in the mobile industry have done business. The players in the mobile industry tend to be generally restrictive of how their networks and devices are used: they have such control over their equipment and services that they are able to effectively lock out third party developers as well as bar any users who do not comply with their terms. Also of interest is that the Android platform puts Google in competition with existing smart phone software providers like Microsoft (Windows Mobile), Nokia (Symbian), Apple (iPhone), Palm (Palm OS) and RIM (Research In Motion, makers of the Blackberry). At this point the Android platform has not yet been released but there will definitely be comparisons between the capabilities available in the Android relative to its more established competition.

Increased mobile devices capabilities mean that the use of the internet will be pervasive amongst those who will own a cell phone as their first gateway onto the information super highway. Google seems to be making the right moves with the Android platform and making it open is definitely a move that makes sense because it allows for innovation. Innovations and pushing the envelope is important for the key population of the world who will access the internet primarily through their mobile devices; these people are likely to be living in the emerging markets and the model that the cell phone industry has used the world over may not be effective to realizing revenues from mobile services subscribers in the emerging markets. As with all analysis of how technology will evolve and diffuse over time, it is only time that will tell the true and accurate story of what becomes of initiatives such as the Open Handset Alliance.

Google unveils cell phone software and alliance | CNET News.com

Leave a comment