Monday, December 9, 2013

The Java program doorway - main method

In any Java Application, there should be at-least one main method available and can be in any of the classes. The JVM starts the execution from the first statement of the main method and ends after the last statement. A Sample main method...

public class MyFirstApp
public static void main(String[] args)
System.out.println("Main method inside class MyFirstApp");

The keyword 'public' specifies that the main method can be accessed from anywhere. 

The 'static' keyword implies that the main method can be accessed without instantiation i.e objects are not needed to access the main method.

'void' denotes that the main method doesn't return any value.  

String[] is an array of strings (sequence of characters) and is named 'args' (This name "args" can vary"). In Java, the main method needs a single array of strings as parameter.


Can we declare a main method as Private?
Can we remove static keyword from the main method?
Can we remove the argument String[] args from the main method?

If we do any of the above, the compiler will run properly. But at run time, the JVM throws the error message.

What will happen if I write "static public void" in place of "public static void"?

The program will run and execute properly with no errors.

Can I have many main methods in the same class?

No, Compiler error occurs.


The name of the class containing the main method must be the same as the name given to the program file itself.

Wednesday, November 20, 2013

All about $GLOBALS in PHP

PHP Superglobals or Auto-globals

In PHP there are certain predefined variables and are called superglobals or Auto-globals. Those variables are accessible throughout the program irrespective of their scope. One such is a variable named $GLOBALS.


PHP stores all the global variables (variables within global scope of the script) currently available in the script, in an associative array called $GLOBALS[index]. "index" refers to the name of the individual global variables.

global $myVar = 3;

global $a = 20;

"myVar" is a global variable and holds the value 3.

"a" is a global variable and holds the value 3.


$GLOBALS['myVar'] = 3;

$GLOBALS['a'] = 20;

The example given below explains the $GLOBALS array.

$x = "save";

function toclose()
$y = "close";

Here, $x will be stored in the $GLOBALS array (as x is declared outside the function) and $y wont be stored in the $GLOBALS array (as y is declared inside the function).

Generally a global variable has scope only outside the functions. Since $GLOBALS[] is a superglobal, this can be used to access the global variables even within the functions. Here is an example to portrait this scenario..


$myVar = 10;

function testglobals()
 $GLOBALS['myVar'] = 20;

echo $myVar;



Note: From the above exemplar, we can note that, with the help of superglobal $GLOBALS, it is possible to access or modify any global variable inside any space of the program.

Some of the other PHP Superglobals are


These can be discussed in future posts.

Monday, November 4, 2013

Basic framework for websites of present style

Designing a compact website is one of the key factors for success in the bush of web. In current era, your websites serve as an icon for your own dream of passion in any field such as Business, Arts, Education, Sports, Entertainment or whatever it maybe. Henceforth the websites need to be well designed to cope up with today's trend as well as to satisfy the requirements of your viewers and dispense a great user experience. Here are some basic elements a website should possess to attain a neat design.


A banner is a rectangular piece of element  made up of texts/graphic images/sounds/animations etc. usually present at the top of the website. This bears the symbol/logo/watchword of your website.

Tabbed Navigation

This allows the user to load multiple pages into tabbed segments of a single page. This element is useful for proper organization of the web info and makes the user navigation easy and clear. When the user clicks on any tab, that particular tab turns up to the front.
Fly-out Menu

In view of the fact that the websites have more categories and sub categories, it should provide fly-out menus with navigation links to all categories in addition to the standard Tabbed Navigation. This type of menu allows the user to peer instantly into all the categories just by moving the mouse over the menu. This hugely lowers the number of clicks the user requires to do and offer a rich overview of the website to the viewer.

Tabbed Navigation & Fly-out Menu


This is an interactive effect adapted in websites which allows the user to rollover a text/image/button and making them react i.e do a simple action.

Exemplar: Flip between two images.

When the user perform "mouse over" by moving over the first image,the second image will appear - when the user "mouses out" by moving the mouse away from the image, the first image will reappear.

Go to and rollover the smaller images to look over the larger ones.

Skinning & Themes

Skinning is a technique through which the same website can be presented with different look & feel to different users (custom designed) based on the individual's taste. In this case, the website needs to propose a range of per-designed themes/skins for the user's choice.

Social Media elements

Social media plays a significant role in increasing the exposure of a particular website among viewers. This can be accomplished by integrating the social media icons within you website and bring to light your realm in the social world.

FAQ Page

FAQ (Frequently Asked Questions) Page is a collection of most commonly asked questions with the answers. The FAQ Page adds value to your website and serves as a reference guide for your users.


A popup is a small window that emerge in the front and is activated when you choose something with the mouse/key. A well designed popup is the one with all the browser components such as browser menus, scroll bar and re-sizing options. The response time for popup is faster compared to the original page itself.

Site map

A site map lists all the pages on the website with links organized in hierarchical fashion. It provides the search engine with information regarding the entire content of your website. For large sites, this helps the people to figure out the information they are looking for. The site map can be compared with the traditional geographical map.


Icons are the emblematic representation of some idea. The icons completely change the appearance of your website. The iconic link takes less space compared to a textual link. They can be placed in Navigation Bars, Side Bars, footers etc. The clever use of icons provide better experience to the user.

Google maps

This is a free element from Google. It is very easy to embed Google maps to any website. You can embed a simple map, a set of driving directions, a map you created using Custom Maps for Google Maps, a map of a local search or maps created by other users into your website.

Photo/Video gallery

Embedding Photo/Video gallery is one of the most popular web design trend existing today.

Search Box

This element improves the quality of site navigation and accessibility. In addition to this forthright benefit, the site's search box also helps the website owner to learn more about the user expectations from their site, through search query analysis.

Tuesday, August 20, 2013

Software Development process and business inquiries

Software travels into everything and changes anything it strikes upon. Software developers are working hard to keep going and develop better applications. Software Development is the process of developing software in a step by step and organized way. Here are the finest procedures that turn any software development process & business into a successful one.

  • A thorough Market research - This helps us to pinpoint & study market needs and to find out what people want/need.
  • Be choosy on Clients - When you are selective on your clients, you can do better business and get more profits.
  • Gather detailed requirements - It is indeed important to interact with the client and get all three types of requirements (functional, environmental and performance requirements). While gathering requirements focus on user point of view rather than your point of view.
  • Create Scope (range of the project) Document - Investigate scope of the development and create scope document. This will help you and your client to understand precisely the expectations from both sides to be encountered during the course of the project.
  • Think as a user and not programmer - This thought process helps the programmer to develop user-friendly applications.
  • Coding standard - Set up an ideal coding standard. You can even enhance the system by automating the coding standard.
  • Simple Coding - At times Complex codes make the programmers to discard the existing code and write a new one. Hence every developer should focus on simplifying the code they produce (by using advanced technologies). This greatly reduces tons of complexities to be faced in future and increases the maintainability of the code
  • Document everything -  This allows us to uphold the history of the project at various cycles which can be used in future by the maintenance people.
  • Improve the software process by analyzing and measuring the complexities.
  • Flexible Software architecture - Software architects with deep knowledge of the entire system should be assigned to create the architecture of the application. He/She should focus on the flexibility of the architecture and should be designed in a way to accommodate any upcoming changes.
  • Reusable components - The team should likely opt for Component based software. The programmers should develop more general and reusable components so that many other programs can use them.
  • Developer testing - The developers are the best white box testers for their own code.  Hence the application needs to be tested by the developer itself before passing to the Quality Assurance team.
  • Customer testing - This kind of testing is very important as it provides feedback on how the real users are using the system and to make the correct decisions after testing.
  • Eventually make the software release process to be simple and reliable.

Piece of Software History

Years back the Computer Hardware companies offered software at free of cost bundled with their hardware. This has been changed in the 1960s as a solution for the dispute between the companies ADR and IBM. In 1965 ADR developed the first licensed software product and patented their software in 1968. ADR was competing against a free software provided by IBM. ADR accused that IBM was "retarding the growth of the independent software industry". In 1969 the US Department of Justice charged IBM with ruining businesses by bundling free software with IBM hardware. Hence IBM unbundled its software. And then software became independent from hardware product. This is a milestone behind today's multibillion dollar software industry.

Friday, June 14, 2013

Jump-start with Wordpress

WordPress is one of the well-liked online blogging platform which serves a wide diversity of bloggers for different kinds of purposes. WordPress has plenty of advanced features presented with simplicity and flexibility which elevated it better than many of the other blogging tools. Do you want to start up with WordPress?

The first stride is to sign up with and this allows you to create as many blogs you want to publish under a single account. Have a look at this Video before proceeding.

Go to the wordpress sign up page

Enter your

E-mail Address: Your primary email address as it is needed to activate the account and for further correspondences from wordpress.

Username: The logon name you want to use to sign in your wordpress account in future.


Blog Address: This will serve as the prefix of the URL address of your blog. Consider a name that is closely related to your content and this will help you greatly in Search Engine listing of your blog.

Wordpress will do a primary validation of your details entered above and will enable the "Create Blog" button for free subscription. Click on the "Create Blog" button. An activation email will be sent to your email address given above. Login to your email and click on "Activate Blog" link available in the WordPress email.

It's all set and done now.

Here is a snap of my wordpress account landing page with significant areas highlighted.


Reader:  This tab provides room for all of your favorite blogs (even other than wordpress blog) you follow. You can Like and Reblog your favorite posts.

Stats:  Your stats page displays the data about the number of visitors, their place, the popular posts etc of your blog in the form of graphs and charts.

My Blog:  This tab lists all of your blogs and you can click on each one of them to reach their individual dashboards.

Freshly Pressed:  Everyday this tab brews out new blog posts with unique content to entertain us.

- Create new posts and be notified about your likes, comments and followers.

My Activity: This allows you to see the likes and comments you have made.

Recommended Blogs:  List of blogs on all categories recommended by wordpress to you.

Find Friends:  This helps to find your friends from Twitter, Facebook and Google who are blogging with wordpress.

This section allows you to explore the popular subjects in wordpress with recently published posts under each topic. Click "Follow" to add a topic to your reader and keep track of all the posts under the topic of your interest.

WordPress suggests these blogs for you.

Ready to make a start!