Wednesday, September 24, 2008

Interview Q & A: Java Threads

#1 What is daemon thread and How will you create a daemon thread?

Daemon threads are low priority threads running in background. By calling setDaemon(true), we can make a thread daemon. GC in java is a good exampe for daemon thread.

#2 What are different ways in creating a thread and which is recommended?

There are two ways to create a thread:

* By Implementing Runnable interface (recommended) and implementing run() method
* By extending Thread class and implementing run() method

#3 Explain thread life-cycle?

* Ready state: Whenever a Thread is created, it reaches the ready state. start() method puts the thread in ready state.
* Running state: run() method called automatically by the start() method moves the thread from ready state to running state.
* Blocked/Wait state: wait() and sleep() methods moves the thread from running state to blocked state. By calling notify() or notifyAll() and yield() method will make them again move to ready state.
* Dead state: Thread moves to dead state after completion of run() method.

#4 What do you mean by Thread Synchronization?

Thread synchronization allows only one thread to execute at a time in a multithreaded environment. We can either have a method synchronized or a synchronization block.

#5 What is the Default priority of Thread?

NORM_PRIORITY is the default priority of a Thread.

#6 What is deadlock? How do you prevent it?

Deadlock is a condition at which two processes are waiting for each other to complete before proceeding. It is a cyclic dependency where one should take care to prevent such scenarios and no API methods are available to prevent it.

Interview Q & A: Java Collections Framework

#1 What is the difference between arrays and Collections in java?

* Arrays cannot be resized whereas Collections can be resized and are form of dynamic arrays.
* Arrays forces to specify the initial size whereas Collection does not.
* Arrays can store primitives whereas Collection stores only objects.

#2 What is Collection framework?

Collection framework provides a set of classes and interfaces for sorting and manipulating group of objects as a single unit.

#3 What are similarities and differences between Iterator and Enumeration interface?

Similarities:
* Iterator and Enumeration are used to step through elements of a Collection.

Differences:
* Enumeration has methods only to traverse and fetch objects serving as read-only whereas Iterator has methods to manipulate objects like adding/removing objects. So use Enumeration whenever we need to have Collection objects as read-only.

#4 What is the difference between java.util.List and java.util.Set interfaces?

* List interface allows duplicate elements whereas Set does not allow duplicate elements.
* List is an ordered collection and also allows positional indexing (add or retrieving elements at a particular index) whereas Set is an unordered collection.

#5 What are SortedSet/SortedMap used for?

Interface for maintaining elements in sorted order and implementation classes are TreeSet/TreeMap.

#6 What is the difference between java.util.Queue and java.util.Stack interfaces?

Queue supports ordering of element in FIFO basis. That is element first added is the first element to get Whereas Stack supports ordering element in LIFO basis.

#7 What is the difference between ArrayList and LinkedList?

* ArrayList can be used wherever we need to support random access of elements without adding or removing elements of the list.
* LinkedList can be used wherever we need to add, retrieve and remove elements at the beginning and end of the list.

#8 What is the difference between HashMap and TreeMap?

* TreeMap maintains the order and HashMap does not.
* HashMap is faster for adding, retrieving, removing of elements from the collection and TreeMap is faster during traversing in a sorted manner.

#9 What is the difference between Vector and ArrayList?

* Vector is synchronized whereas ArrayList is not. Arraylist as is unsynchronized gives better performance than Vector in a non-multithreaded environment and Vector gives better performance in multithreaded environment.
* Vector has a default size of 10 whereas ArrayList has no default size.

#10 What is the difference between HashTable and HashMap?

* HashTable is synchronized whereas HashMap is unsynchronized. HashMap gives better performance in non-threaded environment as is unsynchronized when compared with HashTable.
* HashTable does not allow null whereas HashMap allows null as key/value.

#11 How to synchronize a HashMap?

Using Collections.synchronizeMap(hashMap)

Tuesday, September 23, 2008

New features of Java 5 (Java Tiger/J2SE 5.0/Jdk 1.5)

Following section gives a quick introductory of the new features of Java 5

Generics:
Provides compile time type-safety.
 o  Example: List<String> myList= new ArrayList<String>(); where myList is an array list of String type.

Enhanced for loop:
For statement can be used to iterate over an array or a collection.
 o  Example: for(Object object: myList) where myList if an ArrayList collection and its elements are assigned to object.

Autoboxing/unboxing:
Automatic conversion of wrapper types to primitive types and vice versa.
 o  Example: boxing: int i=new Integer(42);
 o  Example: unboxing: Integer iObj=36;

Enum type:
A new enumeration type in java
 o  Example: private enum CustomerType {Individual, Corporate}; later can be referenced as CustomerType.Individual or CustomerType.Corporate.

Static import:
Provides a way to access final static fields without referencing it with class name.
 o  Example: import static java.util.Calendar.SATURDAY; later can be directly referenced as SATURDAY instead of Calendar.SATURDAY.

Varargs:
Allows methods to have variable length of arguments. It can be used instead of array.
 o  Example: public static void main(String... args) where … says that there is 0 or more arguments.

Annotations:
Provides notes in java programs to ask java compiler to do something.
 o  Example: @Override, @Deprecated

Reference links:
http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html

Wednesday, September 17, 2008

Interview Q & A: Java Basics

#1 What is the difference between JVM, JRE and JDK?

JVM is required to run bytecode (which is the compiled format of java program). They are different for different OS.

JRE is a java distribution with JVM and java core libraries. This is good enough to run bytecode.

JDK is a java distribution with JRE plus compiler and other tools. This is good enough to write, compile and run code.

#2 What is method overloading and method overriding?

Method overloading: Same method name with different signature. This is also called static polymorphism (response is decided during compile time). It uses early binding.

Method overriding: Same method name with same signature. This is also called dynamic polymorphism (response is decided during run time). It uses late binding.

#3 What is upcast and downcast?

If we convert a base class object to one of its derived class object, it is termed as downcast and vice versa is termed as upcast.
 o  Upcast example: Object obj=new String();
 o  Downcast example: String str=(String) obj;

#4 What is the similarities and difference between abstract class and interface?

Similarities:
 o  Both abstract class and interface cannot be instantiated.

Differences:
 o  Abstract classes have partial implementation whereas interfaces are fully unimplemented classes. That is, abstract classes can have either or both of abstract methods (unimplemented methods/methods without any definition) or concrete methods (methods with definition) whereas interfaces can have only methods with no implementations.
 o  Class can implement multiple interfaces, but can implement only one abstract class.
 o  All methods in an interface are public and all variables are public final static by default which makes them as constants. Variables defined in an interface cannot be overridden by its implementing class.

#5 How to choose between abstract classes and interfaces?

Abstract classes over interfaces:
Abstract classes are faster than interfaces as interface requires an extra indirection to identify the corresponding method in class where implementation resides.
If we have a scenario where we need to provide a default implementation to one of the methods and want to force developers to provide implementation for another method during sub classing, then abstract class can be chosen. This way it allows developers to decide based on needs whether to override the default concrete methods as well apart from providing implementation for abstract methods.

Interfaces over abstract classes:
Provide a form of multiple inheritances. That is class can implement multiple interfaces and also interface can extend multiple interfaces as all interfaces has no implementations.
As all variables inside interfaces are public final static, they can be accessed directly by interfacename.variablename which in turn is very much useful in defining constants that can be used across application.

#6 What are Exceptions in Java?

An event that occurs during the execution of a program that disrupts the normal flow.

#7 What are checked and unchecked exceptions?

Checked exceptions: Exceptions that can be dealt with (continue to run with some alternative code) are called checked exceptions. All compile time exceptions are checked exceptions. They can be handled by using try/catch and finally blocks or declaring “throws” in a method.

Unchecked exceptions: Exceptions that cannot be dealt with are called unchecked exceptions. All runtime exceptions or errors are unchecked exceptions. They are exceptions that should never happen (a bug in the code that needs a permanent fix).

#8 How are exceptions types classified?

System level exceptions – an error that occurs during system level programming. Usually they are not propagated to Client UI. Example, null pointer exceptions or runtime exceptions which your environment should take care and choose to decide on what needs to be done.

Application level exceptions – exceptions that occurs during application level programming, usually propagated to Client UI. Example, withdraw should not be done due to insufficient funds.

#9 How will you create custom exceptions?

By creating a class extending the java.lang.Exception.

#10 What is the use of this and super keyword?

“this” keyword is used to denote current object. If a class has multiple constructors, calling one constructor from another can be achieved through this keyword.
“super” keyword is used to call the base class constructor

#11 What are marker interfaces?

Marker interfaces are empty interfaces which does not have any method declarations just to convey the JVM that they should be treated differently. They are also called null interfaces. For example, java.io.Serializable is a marker interface.

#12 What is the difference between AWT and Swing components?

* AWT components are heavy-weight components and Swing components are light-weight components.
* Heavy-weight means they are platform dependant components that uses native OS peer classes whereas light-weight components does not depend on the OS. For example, look and feel of AWT button component uses native look and feel of OS whereas Swing button components can have thier own look and feel.

#13 What is the difference between static and non-static variables?

Static variables are associated with a class whereas non-static variables are associated with an instance.

#14 How will you do inter-applet communication?

By using AppletContext interface, inter-applet communication can be performed.

#15 Explain automatic garbage collection in Java? Why GC cannot be forced in Java

Garbage collection is automatically taken care by java as a low priority daemon thread that runs in the background. Thats the reason why GC cannot be forced in Java. Whenever objects are unreachable, that objects finalize() method is called before the object is garbage collected thus thier resources are reclaimed or reused. Referencing an object to null will just make the object eligible for GC.

#16 How will you prevent an object from being unreachable?

An unreachable object can be made reachable by overriding its finalize() method to access any other reachable objects

#17 What is the difference between String and StringBuffer?

String objects are immutable whereas StringBuffer are mutable which makes it faster in concatenation.

#18 What is the difference between == and equals() method?

== is used to compare object references whereas equals() method is used to compare the object contents.

Tuesday, September 9, 2008

Interview Q & A: General Technical Concepts

#1. What is the difference between Process and Thread?

Process is an instance of a program to execute its instructions. Whenever a process is created, process scheduler of the OS will set its status to “wait” and loads the process into main memory from secondary storage like Hard Disk, CD-ROM. After which the process is loaded into the processor (context switching) to execute its instruction moving it to “running” state. During the execution, if the process has to wait for user input or waits for some other resources; it will be moved to “blocked” state. Once process is done with its execution, it is moved to “terminate” state where it will be removed from main memory. For instance, MS Word is a program and its instance can be created to perform documentation.

Threads are basically sub-processes of a process. Each sub-process is termed as a thread executing its own instructions. A process can thus have multiple threads executing in parallel. For instance, MS Word can have multiple threads where one thread can do spell check while other thread might still allow the user to type or arrange document layout.

#2. What is the difference between Multiprocessing, Multitasking, and Multithreading?

Multiprocessing is the ability of a system to support more than one processor and/or ability to allocate tasks between them. For instance a tightly-coupled multiprocessor system contains multiple processors within a single computer system interconnected at the bus level and a loosely-coupled multiprocessor system (also called as clustering) contains multiple standalone computers (with its own processors) interconnected via high speed communication system or local area networks like an Ethernet.

Multitasking is the ability to run more than one program or task at the same time. That is, one process need not wait for other process to finish unlike single-tasking. For instance, you can work on with MS Word simultaneously while browsing or programming.

Multithreading is the ability to execute more than one thread or sub-process in parallel. For instance, MS Word can have multiple threads where one thread can do spell check while other thread might still allow the user to type or arrange document layout.

#3. What is Clustering?

Group of servers that act like a single system or group of computers linked together to achieve high availability/ fail over capabilities and to load balance the application.

#4. What are the different types of Clustering?

Basic types of clustering includes Software clustering and Hardware clustering.

Usually Application clustering is termed as Software clustering where clustering software is installed in each server in the group and uses the software to control the clusters. For instance, creating multiple nodes or multiple instances of server and configuring them in cluster is a good example for software clustering. Also configuring web server installed in one machine to balance the load on different application servers installed in different machines forming a cluster is also another good example for software clustering.

Hardware clustering is one which requires a specialized hardware to control the cluster. For instance, load balance hardware’s like resonators or Cisco load balancing hardware can be used to control the load on each server in the cluster.

#5. What is web syndication and what are the different syndication formats available currently?

Web syndication is a way in which web feeds or web resources made available from one site to other web sites whenever their contents are added or updated. There are two mostly used formats namely Atom and Really Simple Syndication (RSS).

#6. What is in-memory session state replication?

Usually in a clustered environment when a client request is first handled and a session is created by one server in a cluster, the same session may not be available for other servers in cluster. To replicate the session created in one server to all other servers in cluster, we go for in-memory session state replication configuration.

#7. What is the difference between developing Web applications based on CGI and Java Servlet?

Common Gateway Interface (CGI) is a process based model and Java Servlet is a thread based model. That is, for each and every request, in CGI it needs a separate process area whereas in Java Servlet model, only one process area is created and handled with multiple threads.

#8. What is HTTP Tunneling? Give an example implementation of Java based HTTP Tunneling?

HTTP Tunneling is a technique in which communications performed are encapsulated within the HTTP protocol. In other words, creating a sub-protocol or a tunnel inside your HTTP protocol for performing communication between the client-server. In Java HTTP Tunneling is used for Applet-to-Servlet communication where we have a scenario of Java Applet embedded inside a web page residing in client-side of the browser to communicate or pass objects to a Java Servlet residing on server-side.

#9. What is meant by Connection Pool?

Connection pool is a cache of connection objects of the underlying resource maintained in order to reuse them instead of creating it for each and every request for performance improvements. For instance, opening and maintaining a database connection for each user is costly and thus by creating a pool of connection objects the user may not wait to establish a connection to the database.

#10. What are commonly used protocols and their default ports?

HTTP: Hyper Text Transfer Protocol used for processing hyper texts like HTML, normal texts, etc. Default port: 80.
HTTP over SSL: Hyper Text Transfer Protocol used for processing hyper texts over Secure Socket Layer. Default port: 443.
FTP: File Transfer Protocol used for transferring files. Default port: 21.
SMTP: Simple Mail Transfer Protocol used for sending emails. Default port: 25.
IMAP: Internet Message Access Protocol used for retrieving emails. Default port:143
POP: Post Office Protocol used for retrieving emails. Default port: 110.
IIOP: Internet Inter-ORB Protocol used for distributed programs written in different languages to communicate over the internet.

#11. Is HTTP a stateless or stateful protocol? If stateless, how will be the state maintained?

HTTP is a stateless protocol. It does not maintain the state of the client. Only way to maintain the state is to use Http Sessions or Cookies or URL Rewriting or through hidden form fields.

#12. What is a Sandbox in Java? Explain on browser sandbox and server sandbox on Java application?

Sandbox is a security restriction imposed on an application preventing it from actually performing certain functions for specific reason.

Browser sandbox: In case of applets loaded inside a web page, the restriction imposed by the browser on the applet base application to access local file system or any local resources is termed as browser sandbox.

Server sandbox: The restriction imposed by the Web or Application server on a Web application deployed on it in performing its intended function is termed as Server Sandbox. For instance, if we try to use the call System.exit(0) in any of the server-side codes like JSP or Java Servlet then upon accessing this file will not actually terminate and exit the JVM instead results in security exception. Thus this exception was the result of server sandbox of restricting the server-side code in performing its System.exit(0) functionality.

#13 What is the difference between Web Server and Application Server?

Web server serves only web based clients like web browser through HTTP protocol whereas an Application server serves different clients like web browser, standalone java application clients, GUI based java application etc through different protocols. Web server does not manage its own resources in supporting transactions and database connection pooling whereas an Application server manages its own resources including security, transaction processing, resource pooling, and messaging thus supports middleware services.

Its often misunderstood that web servers cannot and only application servers can do load balancing, caching and clustering whereas it can be actually achieved by adopting certain strategies.

#14 Explain about Sticky IP configuration in Clustering?

For applications which does not have the session replication configured, by configuring Sticky IP will assure that the server which handles the first request will handle the other subsequent requests from the same client.

Tuesday, September 2, 2008

Adding Icons (Favicons & RSS feed icons) to the address bar for your Web Application

There are two types of icons that can be added to your web site namely Favorite Icons and RSS Icons.



Adding Favicons (favorite icons) to Web Sites or Web Pages:

Favicons are important as they provide visual indicators to visitors and help them to easily associate the content with a bookmark in their browser. Favicons are graphically associated with a particular Web Site or Web Page. Any graphical browsers display them as a visual reminder of the Web site identity in the address bar or in tabs.

To add favicon to Web site, you need the following

* An image which needs to be displayed as favorite icon
* An approach specifying that the above image is to be used as favicon.

Image format:

The format of the image must be one of PNG, GIF, or ICO and the image must be of 16x16 pixels or 32x32 pixels.

Approach to add Favicons:

There are two ways of adding Favicons to Web site or Web Page.

* By using link tag where it uses HTML to indicate the location of an icon for a given page. Add the link element to the head section of the document.

Example: <link rel="icon" type="image/png" href="/path/image.png"/>

* By placing a file called favicon.ico in the root directory of the web server.

Example: In Apache Tomcat Web server, you can see the file named favicon.ico under the tomcat_installation/webapps/ROOT folder. Just similar to this, you can have your image for your web applications root directory.

Adding Feedicons (RSS Icons) to Blogs based Web Sites:

RSS Icons provide a means to appear in the address bar of your browser for Blogs based Web Sites providing access to users for feeds. This allows any users to directly use these icons to subscribe to that feed link through the browser.

Approach to add RSS Icons to your Blog Site:

* By using link tag where it uses HTML to indicate the location of an icon for a given page. Add the link element to the head section of the document.

Example: <link rel="alternate" type="application/rss+xml" title="Feed Title" href="Feed Location"/>

For both the cases, Link element has the different attributes like rel element containing what this link is providing. The type element which should be self explanatory. Next is the title, which performs the same function as title elsewhere on the web; displaying a friendly name instead of the resource's location. Finally, href is the location of the link's target on the internet, its URL. We then close the tag.

Monday, September 1, 2008

Best Practice: Project Conventions - J2EE Web Application Development

This document gives a quick introductory article on recommended coding conventions for web application development. It is intended for people starting out with J2EE web development, and aims to provide enough detail to get started. These conventions do not cover all possible directories, files or artifacts that might be part of a project. However, it would be proven to be quite generally applicable guideline assisting every developer on how to best separate project files from files that are distributed as part of an application download.

A web application is defined as a hierarchy of directories and files in a standard layout. Such a hierarchy can be accessed in its "unpacked" form (exploded directory format), where each directory and file exists in the file system separately, or in a "packed" form known as a Web ARchive, or WAR file. The former format is more useful during development, while the latter is used when you distribute your application to be installed.

The top-level directory of your web application hierarchy is also the document root of your application. Here, you will place the HTML files and JSP pages that comprise your application's user interface. When the system administrator deploys your application into a particular server, he or she assigns a context path to your application. Thus, if the system administrator assigns your application to the context path /mywebapp, then a request URI referring to /mywebapp/index.html will retrieve the index.html file from your document root.

Standard Directory Layout

To facilitate creation of a Web Application Archive file in the required format, it is convenient to arrange the "executable" files of your web application in the same organization as required by the WAR format itself. To do this, you will end up with the following contents in your applications

* "Document root" directory - *.html, *.jsp, etc. - The HTML and JSP pages, along with other files that must be visible to the client browser (such as JavaScript, style sheet files, and images) for your application. In larger applications you may choose to divide these files into a subdirectory hierarchy, but for smaller apps, it is generally much simpler to maintain only a single directory for these files.

* /WEB-INF/web.xml - The Web Application Deployment Descriptor for your application. This is an XML file describing the servlets and other components that make up your application, along with any initialization parameters and container-managed security constraints that you want the server to enforce for you.

* /WEB-INF/classes/ - This directory contains any Java class files (and associated resources) required for a web application, including both servlet and non-servlet classes, that are not combined into JAR files. If your classes are organized into Java packages, you must reflect this in the directory hierarchy under /WEB-INF/classes/. For example, a Java class named com.mycomp.mypackage.MyServlet would need to be stored in a file named /WEB-INF/classes/com/mycomp/mypackage/MyServlet.class.

* /WEB-INF/lib/ - This directory contains JAR files that contain Java class files (and associated resources) required for your application, such as third party (external) class libraries or JDBC drivers.

Source Organization – Directory Structure

The first recommendation for building a web application would be to separate the directory hierarchy containing the source code from the directory hierarchy containing the deployable application. Maintaining these separations has the following advantages:

* Contents of the source directories can be more easily administered, moved, and backed up if the “executable” version of the application is not intermixed.

* Files that make up an installable distribution of the application are mush easier to select when the deployment hierarchy is separate.

Recommended directory structure for a web application:

/build -
Created by the build tasks and used to hold project-wide build items such as compiled source, assembled modules, or files generated by the Javadoc tool.
When deploying a Web module, consider building an unzipped view of the component to enable deployment as a directory structure directly to an application server.

/dist -
Created by the top-level ant dist task, structures under this directory represent the unzipped versions of the binary created by the project.

/docs -
Contains all the documentation for a project, including HTML files, installation and setup files, etc.

/conf -
Configuration or other set-up files, such as Web service configuration files needed by a component or module during the build process. Includes files that are placed in a module's META-INF directory. Also includes configuration files that may require processing prior to being placed in the final module.

/setup -
Contains files that are relevant to the environment for a project or application. This directory may contain database SQL files, ant files containing shared tasks, or any other files that are used to configure a container for a project or application.

/src -
Contains the java source files.

/test -
The top-level test/ directory contain project-wide tests. Each individual component or module should also include a unit test, which should be placed in the src/test directory for each component or module.

/web -
Contains the static content of the resulting WAR file.

/web/WEB-INF -
Contains the web.xml deployment descriptor and static configuration files, such as faces-config.xml. May also include vendor-specific runtime deployment descriptors, such as sun-web.xml. Generally, this directory contains files that are copied rather than changed during a build. Dynamic configuration files should be placed in the
conf/ directory.

/web/lib -
Holds specific versions of components of external libraries used by an application.
If you have multiple binaries in a project, it may be difficult for users with low bandwidth to download the application. Consider including ant targets that download the correct versions of dependent binaries at build time.

Pictorial representation for the recommended directory structure for a web application




References links

* http://java.sun.com/blueprints/code/projectconventions.html
Guidelines, Patterns, and Code for End-to-End Java Applications

Tools: Firefox Add-Ons: Web developer tools

Just thought of sharing the following web development tools which are very useful for our day-to-day web development activities. If you are working on any UI related issues and taking more time on fixing them then here is a way to fix them quickly on real time and also to monitor on web page performance. These tools are extensions available for Firefox browser.

Tools for tweaking HTML, CSS and debugging Javascripts:

Firebug: Add-on for UI debugging made easier. Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. You can use it directly to edit the page which gets reflected on the browser as soon as it gets changed.

Using firebug, you can perform the following

* Inspect HTML and CSS - To start inspecting HTML form elements, click the Firebug icon in the lower right hand corner of the firefox browser once the plugin is installed. You can also go to Tools > Firebug > Open Firebug. Once the Firebug pane comes up, click the Inspect button. Then you can move your mouse over the page and see an outline around elements of the page. Just click on the element you need to inspect and see the section highlighted in the HTML code in the Firebug pane. Also, on the right side of Firebug is a list of CSS styles that are used by this element. You can either edit the CSS or click the stop sign to the left of a line to temporarily disable that line and view changes immediately in the browser. Also you can include new HTML elements in appropriate position and view them during runtime.

* Debug JavaScript - To start debugging JavaScripts within your web page, first open firebug and then click on script tab. Once you view the JavaScript in the script tab pane, set breakpoints by clicking on its line number. Refresh the page and once the particular breakpoint is reached, firebug opens in debug mode and you can step through the code using the debug controls on the firebug pane. By using this, we can watch variables and thier values on the right side of the pane rather making anoying alerts in identifying values passed during runtime.

Reference links: https://addons.mozilla.org/en-US/firefox/addon/1843

Tools for web page performance monitoring:

YSlow: Add-on for UI performance analyzer. YSlow analyzes web pages and tells you why web pages are slow based on Yahoo's rules (http://developer.yahoo.com/yslow/help/index.html#guidelines) for high performance web sites.

* Monitoring the web page - To start monitoring the web page, click the YSlow icon in the lower right hand corner of the firefox browser once the plugin is installed. Once the YSlow pane comes up, click on the Performance button which will generate a performance report with recommendations on enhancing the web page performance. It also provides a graphical representations on the size of each sections like HTML/Text, Javascript files, Stylesheet files, Images etc using the stats button and also provides the response time and other details for each components using the components button next to the performance button.

Reference links: https://addons.mozilla.org/en-US/firefox/addon/5369