Sunday, December 21, 2014

Data Structure Puzzles

Continuing on the quick revision of important questions for my Interviews. These are good puzzles or questions related to Data Structures. (All are in Java)

Reverse a Linked List
Circular Linked List
Dijkstra's Algorithm
Self-Balancing Tree

Enjoy!

Thursday, December 4, 2014

Sorting Algorithms in Java

Just doing a quick revision of important sorting algorithms for my Interviews.

Quick Sort
Merge Sort
Heap Sort

All of them are targeted for Java SE 7!

Friday, November 21, 2014

Graph Search or Traversal Algorithms

Graph is a set of connected vertices {V} and edges {E}. A graph may be connected, disconnected, weighted or non-weighted. In other terms, Graph could also be a  tree with cycles. Graph Search or Traversal can be done in two ways as explained below:

1. Depth First Search
In this type of search, we begin at a vertex Vi and traverse through all vertices from Vi unto Vx depth wise, until there is no adjacent vertex which is unvisited. Then we backup all the way upto an unvisited vertex Vy and continue. We continue until there are no unvisited vertices left. It represents Backtracking in Algorithmic Problem Solving.



2. Breadth First Search
In this type of search, we begin at a vertex Vi and traverse each vertex Vj that is reachable from there. Then we continue in the same way at every vertex reachable from Vj. It creates a queue of vertices visited from a given vertex and then deletes each of them if visited or after visiting them. The process is terminated once there is no non-visited vertex left. It represents Dynamic Programming in Algorithmic Problem Solving.


Friday, November 14, 2014

Binary Search Tree Traversal Algorithms

I hereby post my version of the inorder, preorder and postorder code in c++. Please provide your valuable feedback or additions to the code.

I am also providing a simple explanation here along with the download for an explanation of how to perform these simple tree traversals. Please provide your comments on the documentation as well.

In  a Binary Search Tree, every node has the left subtree with elements lesser than itself and the right subtree withe elements greater than (or equal) to itself. In a BST, the tree can be traversed using the following mechanisms.

Inorder Tree Traversal - C++
For a set of elements, that are inserted as mentioned below, the inorder tree traversal algorithms is as follows. It is recursive in nature and can start at root always.

1. Traverse the Left Subtree
2. Print the Node
3. Traverse the Right Subtree

Postorder Tree Traversal - C++
Postorder is a similar algorithm in nature - except that the traversal order is different.

1. Traverse the Left Subtree
2. Traverse the Right Subtree
3. Print the Node

Preorder Tree Traversal - C++
Whenever we want to traverse the node before the two subtrees, we use pre-order traversal.

1. Print the Node
2. Traverse the Left Subtree
3. Traverse the Right Subtree


We use the following insertion order for all algorithms above: 9 7 6 1 3 5 4 2 8

You can run the C++ code to see the output yourself. It is left as an exercise (or direct code reuse) for the user.

Friday, November 7, 2014

JNI/Win32:java.lang.UnsatisfiedLinkError

I spent almost two whole days trying to solve this issue. I did everything possible from altering my c++ code (changing the return types) to compiling from command line rather than the IDE. Also, I tried a number of other steps like changing the classpaths, refactoring package names to changing names of the generated header files. Finally, I found the following resolution.

Whenever the C++ compiler (GCC) generates a DLL, it is exported in the following form:
Java_SomePackage_SomeClass_SomeNativeMethod@8

Where the integer suffix suggests the byte space required by the arguments. This sort of function call makes no sense to the JVM (while invoking someNativeMethod) and hence it leads to java.lang.UnsatisfiedLinkError. The resolution is to add the following flags while linking to generate unmangled names:
-Wl,--add-stdcall-alias

This will create an alias name (pure method call name) to the generated method. This allows the JVM to invoke the right method via JNI.

I almost gave up on this issue, before I finally found this resolution. The point to note here is that this happened to me only on Win32 - I had no issues running on the UNIX platform.

Tuesday, October 21, 2014

JAR Searcher Developer Tool

As a Java/J2EE developer, I know that the most commonly faced issue in development, which has also been reported as the primary reason for developers losing hair - missing classpath files or not being able to trace a JAR which contains the file - when you know you have all JARs that could possibly exist in this world on your local file system.

Just wrote this simple tool, JarSearcher v1.0, which accepts the name of class file you are looking for and returns all the JARs on your system which contain this file. Also, for Windows developers, I have added a .bat file (Unix folks, kindly replicate .sh) which takes the following form for execution:

js [class-name] [start-in] -c
[class-name] The name of the class file to search (without .class)
[start-in] The directory in which to start looking for the files
-c This switch will toggle display of processing information

or you can directly invoke the program from the bundled JAR file:
java -jar jar-searcher.jar [class-name] [start-in] -c

I have included the source, feel free to modify it as per your convenience.

Tuesday, October 7, 2014

Spring - DWR - Ext JS Chat Application

I was curious to explore the capabilities of Reverse Ajax. That's when I created this simple chat application using Spring/DWR/Ext JS.

From my experience, I can easily say that DWR is easy to learn and configure, especially when you are planning to integrate with Spring on the application tier. DWR has a powerful API to perform all relevant operations, right from accessing page script sessions to util classes for sending updates to the client.

I used Ext JS for creating the user interface, which renders stunning display for elements like forms, buttons, etc. Ext JS has a very steep learning curve and each operation requires a lot of configuration and reference. Also, I found that the event handling mechanism, though complete, is very complex to use. I relied on external Javascript coding for handling events. On the upside, the documentation and support is really good for this framework. Inspite, I would instantly recommend use of Ext JS for large sized customer facing web-based applications, especially for the internet. For medium scale projects or enterprise based projects, I would think twice.


Login Screen


Chat Screen

Simply, drop the .war file in your web/app server. All dependencies are available in the archive itself. The only external reference is 'servlet-api.jar', which is part of the default lib in all latest containers. The source is packaged separately. Once deployed, the url to access should be: http://[server_name]:[server_port]/kabootar/login.kabootar
If you are trying to figure out what 'Kabootar' means, it's hindi for 'Pigeon'...

Thursday, August 14, 2014

Design Patterns - Series II

My concluding write-up on design patterns, with some examples.


Adapter Pattern [Sample Code]
What can one do if he needs to use an Asian Hairdryer in a European Country, each with different socket types? I would seek an Adapter! As in real life, when we want to plug and play with similar but incompatible interfaces we use the Adapter. The Adapter adapts the Adaptee to the desired interface, by composing the Adaptee object and inheriting the desired interface or by multiple inheritance.

The attached example is a real world Computer scenario, where I want to plug in an external hard drive (pre-usb era!), SeagateDrive of interface type SeagateGeneric to an incompatible computer, SamsungComputer of type Computer. SeagateGeneric provides read() and write() methods for the specified purposes, which needs to be adapted to the actual bufferData(), flushData() and purgeData() methods of the Computer. Note that there is no equivalent of purgeData(). The ideal way to handle this scenario is to throw an exception, whenever this method is invoked on the hard drive as it would do in the real world. The adapter to perform the translation in this scenario is the SeagateAdapter, which implements the Computer interface. It encapsulates a SeagateGeneric instance reference, and adapts it to the Computer interface. Whenever a bufferData() method is invoked on the Computer interface, it actual requires three invocations of read() on the SeagateGeneric implementation to match up to the Computer’s standards. These kinds of translations are done by the adapte.

PCAssembler is the main class here. Try adding your own device and its adapter to the computer.


Facade Pattern [Sample Code]
Consider a scenario where we require multiple method invocations on various classes, to achieve the desired functionality. Also, consider that this set of functionality is repeatedly being used in your code. If you are thinking of an option where you will perform direct invocations, you are bound to end up with code maintenance issues and tightly coupled code. If these invocations are remote, it is going to be worse with respect to the performance. This is where the facade comes into play, wherein multiple method invocations are encapsulated into a single method of the facade class, to achieve the desired functionality. It provides us with a single point of change and looser coupling, with respect to the individual implementations. Remote method invocation patterns like SessionFacade (EJB) adapt from here to improve the overall performance and lower complexity.

The example attached is a very simple scenario of a InvoiceManagerFacade which has addInvoice() and deleteInvoice() methods. To achieve the desired result, each of these methods encapsulates the method invocations from OrderManager, LedgerManager and BillingManager classes.

AccountsCentral is the main class. Try adding your own method to the facade class, or try plugging in a new type of facade.


Template Pattern [Sample Code]
Imagine a real-world scenario where a factory is creating both aluminium nails and screws. Though the machine has to create both of them through similar processes, the way some steps are implemented may vary in each of these. When we think of such scenarios in software, we utilize the template pattern. Template pattern defines a way to re-use algorithms for various implementations with different or slightly different outcomes.

In the attached example, the abstract class SoftwareProcessor defines a general set of algorithmic steps (functions) to deliverSoftware(). This class is my template class. Since the implementation and testing phases differ in projects based on the technology stack being used, CProcessor and JavaProcessor classes adapt this algorithm for these phases. The common methods are all implemented in SoftwareProcessor and the specific ones are left as abstract.

SoftwareConsultants can be used to run this example. Try adding your own processor.


Iterator Pattern [Sample Code]
The need to have a handle to a collection of elements, without exposing its internal implementation is met by the Iterator Pattern. I would term this as a pure programming pattern, in its own right. By utilising this handle (Iterator), the client using the collection can easily process the same without any dependency on the internal logic.

In the attached example, ProductMenu holds a menu or list of ProductItem. This list and its usage should be implementation agnostic to the clients. Hence, the need for a ProductIterator which implements the generic Iterator interface. The createIterator() method of ProductMenu, passes the array implementation of ProductItem to the constructor of ProductIterator.

The example can be run using ProductMenuTester.


State Pattern [Sample Code]
State Pattern defines a way to maintain various steps or states of the same machine or class. The word machine comes to the mind easily, because it is the simplest example of a real-world scenario where there is a need for operating the same object in steps or set states, with the transition from one step to the next defined by a single action (or multiple actions).

The example attached is a very crude but helpful one, that of an OnlineShopping site. The limitation of the site being that at any given point only a single item can be purchased and processed. The various states during the purchase and processing are SelectionState, PurchaseState, AuthoriseState, AssembleState (optional) and DispatchState. Each of these states is processed and followed in a sequential manner. OnlineShopping maintains an instance variable of each of these states and also a currentState variable. The various state methods that exist within OnlineShopping are selection(), purchase(), authorise(), assemble() and dispatch(). When client calls these methods, the actual invocations are performed on the state implementation held in the currentState variable. All state implementations implement the State interface, which specifies the lifecycle methods.

ShoppingClient is the main class. Try adding your own states along with the required lifecycle method.

Thursday, August 7, 2014

Design Patterns - Series I

Was going through the book ‘Head First Design Patterns’, came up with my own examples to understand them further. Try downloading the code and see if it helps you in comprehending these in a better way.


Observer Pattern [Sample Code]
Observer Pattern, as the name suggests, is used in scenarios when updates need to be done at multiple points (Observers) depending on changes in state at another place (Subject). Each of the Observers has to register themselves with the Subject, individually. The Subject should also provide method which allows the Observers to remove themselves. Registered Observers are informed of changes in state through a notify method, usually.

The provided example is that of a StockBroker application, which involves maintenance of various types of financial information. Subject is the interface in the application which provides a template for the Observed class. StockData is the concrete implementation of Subject and provided implementation of addObserver(), removeObserver() and notifyObservers(). Additionally, it maintains a list of registered observers. IncomeHandler, InvestmentHandler and PortfolioHandler are the various observers used to maintain income, investment and portfolio of a specific StockBroker. All these depend on the constantly fluctuating values of stocks. They are specifically interested in the stockSymbol, stockValue and stockUnits of each individual stock. Each of the observers implements the interface Observer. The Observer interface provide the update() method, which is implemented by each of these concrete classes.

Use StockBroker.java to run the application, Try adding your own observer to this application. Also, you can try picking up these values from a live web service and then writing a custom observer which depends on this.


Decorator Pattern [Sample Code]
Decorator Pattern provides an elegant way to use composition for enhancing functionality, where the result expected has direct dependency on the composed and composing class. A chain relation (via composition) or decoration can be finally used to achieve the desired output at runtime. In real-time, when the functionality of one particular product is expected to be built form a base product and various other related sub-products or fixtures, we can rely on the Decorator.

The attached example is that of a Pizza application. Here, the pizzas in the shop are made with various combinations of bases and topping combinations. This is a classical example for usage of the decorator pattern. Pizza is the abstract base class for each of the pizza bases to implement and ToppingDecorator is another abstract class that inherits from Pizza for each of the toppings to implement. Hawaiian, Italian and Mexican are the concrete implementation of Pizza whereas Mushroom, Onion and Chicken are the concrete implementations of ToppingDecorator. Each of these toppings encapsulates a Pizza instance. This instance, at runtime, will hold another topping or the pizza base instance. Finally, it is when the cost has to be calculated on the entire pizza that the real value of decorator pattern is seen and just one call suffices to calculate the entire bill value.

PizzaWorld is the main class. Try adding more decorators and pizza base classes to see if you can get a real taste of the Decorator!


Singleton Pattern
Singleton Pattern defines a way to maintain only single instance of a class in the entire execution of a program/application and to provide a uniform way to access it. There are numerous methods which exist in which this pattern can be implemented. I have explained three most common scenarios here:

1. Eager Singleton [Sample Code]
The simplest singleton is the one in which the instance is created at class-load time, and stored in a static instance variable. A static getter method is then used to get this instance, when required. The instantiation of an object earlier than its first use might not be a recommended approach.

In the given example, MediaContract (Main Thread) works on an instance of the ProductionHouse (Singleton). The Singleton is instantiated at class-load time and maintained in the private static instance variable. getInstance() in ProductionHouse helps in retrieving the instance.

2. Thread-Safe Singleton (Most Common) [Sample Code]
To overcome the above drawback, the recommended approach is to instantiate the object at the first access time and also to make it thread-safe to prevent concurrent thread instantiation. The disadvantage of this method is poorer performance, as the method is synchronized.

As in the earlier example, the classes are MediaContract (Main Thread) and ProductionHouse (Singleton). getInstance() method is synchronized and the instance is created only if it is null.

3. Double-checked Locking [Sample Code]
The disadvantage mentioned above can be critical for a highly accessed object in an application. To better this, the scope of the synchronized block is reduced to affect only the first access. This again has some disadvantages. I recommend reading on Initialization on Demand Holder Idiom.

The example remains the same, the difference being in the reduced scope of synchronisation within the getInstance() method and also that it affects only the first access and not subsequent accesses.


Command Pattern [Sample Code]
In scenarios, where we need to create a sequence of actions (or operations) and perform them at a specified (later) point in time, we have a candidate for usage of Command Pattern. Though it very closely resembles the Observer pattern in implementation, the usage is different and the command (actions) is invoked only on a single chosen receiver by an invoker, than on all observers.

The example is of an Auction House where there are various items for auction, the base abstract class of which is represented by AuctionItem. The abstract method to be implemented by implementing classes is sell(). AuctionVase, AuctionFurniture and AuctionJewel are all concrete implementations of AuctionItem. Instances of each of these are created and set (mapped by an itemKey) into the AuctionControl, which can be thought of as a remote control for presenting items in the AuctionStore. Whenever the presentItem() is invoked on the AuctionControl class, passing in an itemKey, the appropriate AuctionItem instance is selected and sell() is invoked on this instance.


Factory Pattern
Factory Pattern, I am made to believe, is the most widely used and implemented pattern in software projects after the Singleton Pattern. Since Singleton is only a creational pattern at single class level, the scale of the effect of usage of Factory should be much higher. Factory Pattern deals with creation of similar type of objects and production in a centralized manner, depending on the condition or type of object requested. There are variations of the usage of factory pattern, three of which I have enlisted below:

1. Simple Factory [Sample Code]
The simplest factory is the one that is used to create (instantiate) a specific type of product (object) depending on a condition. The specific types of objects that can be created in a single factory are all expected to implement a single interface.

In the attached example, the factory is used to instantiate a specific type of object depending on the operating system. All the specific systems implement the System interface, which defines the common methods that the concrete class of this type should implement. SystemFactory is the factory class which provides the create() method which takes a type argument. The type argument decides which concrete factory should be instantiated.

2. Factory Method [Sample Code]
When there can be various families of products (objects) that which can be instantiated, but each family of these product needs to be created by a specific type of factory, we define a factory method in the base factory class. The concrete implementations of the base factory then override this method to produce concrete type of products, depending on the condition.

In the example, you can notice the presence of two abstract classes, Mobile (Product) and MobileStore (Creator). One family of concrete product implementations are NokiaASeries, NokiaBSeries and NokiaCSeries to be created by the NokiaStore, which is the concrete implementation of the creator. In similar fashion another family of products such as SonyASeries, SonyBSeries and SonyCSeries are to be created by SonyStore, another concrete implementation of MobileStore. MobileStoreCentre is the main class to run this application. The createMobile() method is the abstract method (factory method) that is to be overridden by the creator implementations.

3. Abstract Factory [Sample Code]
AbstractFactory defines a template or interface for creation of similar types of objects or implementations. Usually, AbstractFactory will encapsulate a factory method or more within for actual creation of the product.

Taking the same example as above, MobileStoreFactory instantiates the concrete instance of the abstract factory (MobileStore) based upon the variable specified, either "Nokia" (NokiaStore) or "Sony"(SonyStore). The factory is then responsible for creating the objects of similar types based upon the choice - such as "ASeries" or "BSeries" or "CSeries". The mobile is then assembled based upon this by the MobileStore. You may use MobileStoreCentre to run this example and understand the design pattern based on the output.

Monday, July 14, 2014

EJB v3 Client for JBoss Gotcha!

If you are writing a standalone client for either a local or remotely deployed EJB v3, and face the following issue:

javax.naming.CommunicationException
[Root exception is java.lang.ClassNotFoundException: org.jboss.ejb3.proxy.JBossProxy
(no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:788)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
at javax.naming.InitialContext.lookup(Unknown Source)

...


The simple fix is to include 'jbossall-client.jar' in the client classpath.

Monday, July 7, 2014

EJB v3 Buy-In

Studying for my SCBCD 5 certification, I noticed these differences between the EJB v3 specification and Spring v2 framework. Thought i should share these. I will add the performance results as well, once i have something substantial.


In Favour of EJB v3,
Easier implementation for web services
Time tested & Robust method for Remote Access
Better instance pooling mechanisms
Stateful session beans
Annotations make it easier
JEE Standard / Sun Support / Industry Affiliation
Wide App Server Feature Support


In Favour of Spring v2,JDBCTemplate and JMSTemplate
DI even for POJO (outside container)
AOP is feature-rich (but complex)


And no... I do not sell for Sun.

Monday, June 23, 2014

The World of Meld Advertising

There are numerous benefits of having an unified advertising mechanism for the business of an organisation. Today, most of the advertising that is done across various media is disparate and not having a unified mechanism for generation, distribution, maintenance, reporting or collection. To bridge this gap, I conceptualized and coined the term Meld Advertising (Referred to as 'It'). Meld Advertising brings out all of these in the form of providing tools to automate most of these processes and to directly connect with all unique advertising channels. The tools help in creation, beta, subscription, payments, real-time reporting, cost effectiveness and overall maintenance of the advertisements.

It helps all types of users including the end contractors who work on actually putting up advertising for diverse media. These include all tools which facilitate the entire workflow of advertising. It also recognizes that usage of effective tools, which are simple to use and create advertisements online, will lead to a faster execution of marketing campaigns. Also, ready-made templates, tie up with other advertising tools and online expert help will allow for a more efficient generation of advertisements.

Meld Advertising also aims to takes online advertising to newer heights where the entire campaign and subscription pays for itself. TechArmy aims to make online advertising even on the best sites across the internet almost free of cost (by paying for itself) in a variety of ways. If advertiser and the advertising site both earn for the number of user clicks and then additionally for user intervention and then even for user feedback on certain aspects; they both end up earning equivalent of their investment for a highly successful campaign via the business model proposed by TechArmy.

Meld Advertising in its precise form is then a unified mode of advertising which could include online, voice based, text based, video, television, radio, cinemas, hoardings, flights, taxis, auto-rickshaws, print and even advertisements on digital display boards. Imagine the freedom and benefits you could get as the marketing executive of a company and the business benefits as an organization if a single tool could allow you to create your campaigns, choose these options and then allow the tool (and thereby us) to take care of all the background tasks. Unbounded!

It is the first in its class to provide a advertising platform that enables campaigns in varied forms under a single interface. The main aim is to simplify the tasks of creating, previewing, user testing, feedback and right up to going live on various media. It manages all background tasks related to actual advertising and at the same time provides performance metrics of a particular campaign. This is primarily for online as well as other modes where a direct measure of success is possible. It also features the most accurate metrics measuring mechanism, which differentiates between bots and users, but at the same time concentrates on the rendering performance of advertisements. The subscription mechanism works on a payback mechanism and as the user clicks and views increase, there is an opportunity to earn back on a advertisement. The advertising product also has a host of other features, such as innovation points, affiliate points, monthly points and referral points. Also, its usage would lead to an accumulation of loyalty points, which can be turned back into advertisement cash. Also, there are a lot of other tools such as charts, renewal, highlight, selective flash, email marketing, expert, forum exchange and also an archive of all advertising campaigns till date from that user.

Friday, May 23, 2014

The Idea of Mood Blogging

Mood Blogging is primarily location based blogging that captures and enhances the spirit of blogging and also provides location determination, service feedbacks, product reviews and product offers. It is primarily an internet concept that allows microblogging linked to the mood of that particular blog post and which also allows automatic detection of the current blog mood. It also allows blog to be posted on other sites as well as to blog from other sites. Apart from this, it allows automatic location determination on the logged in device and thereby allowing to temporarily subscribe to nearby blogs. This allows location based subscriptions for temporary usage and automatically un-subscribing based on preferences. When working in a location based mode would allow real-time feedback on services, products and also allow to obtain the latest offers and discounts. Most of all, it can be a place where people who have just joined a particular location set can look upto for live reviews and feedbacks.

It also involves automatic detection of  high traffic generating blogs and gets these pages to be sponsored and customized as per the primary data and blogger profile. It allows another striking user experience feature where it allows mood icons, images and graphics; thereby taking visual blogging to newer levels. Also, it provides an all inclusive user interface which allows video, audio, images, files, long blogs, links and a variety of other types of information to be blogged all at one place. Location determination allows blogs to be now more dynamic and also have location based advertising and also advertising applied to specific location check-ins.

On the mobile continues the spirit of mood blogging on mobile by allowing to determine location (or change subscriptions) when the device is in the vicinity of another subscriber or a set of similar subscribers. The location determination is dependent on registering with exact details including the zip code and also on the features of device itself.

The idea of mood blogging will be based on concepts of Intelligent Agents, Sentiment Analysis, Emotion Analysis and Auto Location Determination.

Thursday, April 24, 2014

The Concept of Software Recycle

I want to put forward the idea of software recycle. Software recycle is software reuse taken to a new level, wherein the components that are outdated or written in older generation languages (of current era) are retrofitted with newer components. Multiple integration points are used to combine, create and establish collaborative functionality. In this way, we are able to take component based development to a newer level, with greatest reuse. Apart from this, Software Recycle also combines software hosting both from open source developers and commercial and independent software vendors. It thereby acts as a software catalogue for various types of users such as students, professionals and even organizations. 

Software Recycle, takes software reuse to a newer level - wherein components that were written in older languages (of the current era), but which could be useful in certain scenarios are retrofitted with newer components or functionality and then put up on a public catalogue for use. This helps in reusing a lot of functionality without requiring to rewrite a lot of it. It will essentially then be a public catalogue of software components, promoting component based development. The greatest advantage will be that it would include thoroughly tested, documented and maintainable code - which could allow to save time in development. The possible users of this site include students, professionals and organisations alike.

It could also act as a source of learning for computer science students, to understand software reuse, component based development, object oriented programming and variety of other topics. This is not only by the thousands of components on the website that are available for download, but also from legacy components that the team would have retrofitted with newer components to enable reuse.

It finally comes with an advantage of acting as a catalogue of software components that can be used both publicly or privately within an organisation. This enables a good amount of knowledge sharing in the entire organisation and also in enabling a centralized repository. 

Software Recycle is closely related to the concept of Green Software Engineering - but takes a deviation that it not only concentrates on the aspects of green processes applicable to software development but enhances them to include software re-use, retrofitting, component based development and cataloguing. It impacts directly the power consumption, resource usage, efficiency of software, effectiveness of process, utilization of development manpower - a net result that allows contribution to a green ecosystem or environment. This also proves a maturity in Software Engineering thought processes for products and contribution of Software & Programming companies as other Engineering companies to a greener society.

A software product was to be built on these ideas by my, now closed, startup called TechArmy. There is only one website in this world that I could find closely related to my idea. This is a project supported by University of Hamburg, Germany, the details of which can be found here.

From this site, I quote as below: 
"Green IT is the study and practice of designing, manufacturing, using and disposing IT related hardware products in an efficient sustainable way with minimal or even no impact on the environment."
"Green Software Engineering was the attempt to apply these "green" principles known from hardware products also on software products, software development processes and their underlying software process models."

Software Recycle can be now defined as:
Software recycle is software reuse taken to a new level, wherein the components that are outdated or written in older generation languages (of current era) are retrofitted with newer components. Such re-use that that directly impacts the power consumption, resource usage, efficiency of software, effectiveness of process, utilization of development manpower and leads to a green ecosystem or environment is termed as Software Recycle.                         


Sunday, March 23, 2014

Information Chaos/Information Engineering/Information Sanity Principles

An extract from my paper - "The Socially Acceptable Social Networks: A Reality Check for Information Engineering on the Internet"




1. Bifurcation
This applies to any form of temporary or virtual infor-mation divergence. Though this would apply to mainly the entry points at the internet like search engines, social networks, directory or ecommerce listings. Although, this can be applied to larger sets of data, it can also be applied to logically related subsets. One example would be to de-duce and apply context to each type of information searches. This would ensure that there is a clear demarca-tion of the type of data actually available. Another aspect would be to use behavior of the user to induce relevance to a user workflow. This aspect has to be implemented through configuration or centralized information exchanges between various participating or critical web-sites. In general, a repository that could hold every netizen’s usage habits or information would be the per-fect sub-solution to bifurcation.

2. Prevention
There are enough mechanisms in place to loosely prevent out of track information to be added to a given set. This applies to simple form data, images, documents, videos, music and even multiple other data forms. But using more efficient robotic analysis, we should be able to prevent multiple situations such as terrorism, adult content, religious violence and racist remarks. These rules should be made available through an efficient regulatory body depending upon the type of the site. Also, this would help in reducing information chaos by not allow-ing unwanted, automated or non-context information to build up. Apart from this, this would clearly help in easing the process of Bifurcation of information. Regulated Prevention would also mean that we are able to provide a uniform barrier in the cyber society.

3. Reporting
The simplest and most remedial measure to counter multiple information issues on the internet is to introduce more effective cyber policing. This needs to be enforced first by making available relevant information for reporting to the user. Also, an ordinary user must have ready tools and links to use reporting mechanisms. These mechanisms need to be appropriately placed at locations that are accessible and can be followed to create detailed descriptions for more analysis. Also, by creating a newer wing of current cyber reporting or analysis mechanisms that are swifter in action, whether online or on ground – we are removing fear from the users.

4. Classification
Governments all across the world, especially while form-ing cyber laws for the newer internet have to now follow stricter registration procedures for internet. This may in-clude web startups, dotcoms, information sites, social networks or even academic websites. This will help in curbing non-genuine sites, fraudsters, scammers and malware sites.  By allowing city, state, zonal, offline, online and national ombudsmen; we will be able to quickly enforce policing. Apart from these, by allowing a dedicated team of internet information providers, that track live information; we will be able to classify information with much ease. Also, as time progresses, we should not allow a very easy domain registration and hosting process – that does not involve the ombudsman. The additional task of each ombudsman office would be certification, classification, ranking and maintaining historical data of its zone.

5. Relevance
Software Engineers and Architects should use novel practices to create more relevance in the type of data that is accessible to the user. With stricter laws in place, we should provide only the right type of data operating within a context. Apart from this the engineers should be able to maintain a pool of intelligent information within their own applications or software. This will allow them to retire data sets that may not keep in line. They may also choose to provide this data to other developers. By automating most of the other tasks that are related to bifurcation, prevention, classification and reporting – they would be engineering more relevant software and thereby the internet. Software and Internet Architects will be required to co-ordinate and also obtain relevant certifications for their own properties. They also need to envision a way wherein the software implementers can implement all of the required policies with greatest ease. The software would also need to have standard integration points to quickly circulate information around common or related websites.

We can classify the problems that are solved as under and curb information mess and also curb anti-patterns from forming.
 
Bifurcation
        
Irrelevance, Non-Context Info, Malware, Adware, Ad Driven Linking…

Prevention        
Underage, Adult, Unsolicited Requests, Religious Violence, Profanity, Racism…

Reporting        
Bullying, Financial Frauds, Misleading Mails, Chain Mails, Terrorism, Frauds… 

Classification        
Pay for Click, Pay for Visit, Unsolicited Meeting, Phishing, Scam…

Relevance        
Identity Theft, Misconduct, Irrelevance, Racism, Threaten…

I envision that the future of internet, cyber laws, information security and governance and will be very closely based on these ideas. I term these principles as either of these, depending on the point of view: Information Chaos/Information Engineering/Information Sanity Principles.