Archive

Author Archive

Gmail outage and google trends

September 2nd, 2009 CertPal 1 comment

Gmail, google’s popular email service took an outage today. If you want to get a hint of what kind of impact that can make, check out google trends . The top 5 search terms are about gmail being down :)

Google trends:
google_trends

I am sure some posts will crop up with something negative to say. But show me an email service that uses ajax, tags your emails, provides chatting integrated with the browser, (oh ! I could go on) and is so reliable. When was the last time you heard about a gmail outage ? Some of the best services out there are not as reliable as the free gmail.

Google’s SLA was also broken due to the down time, which seems to have spanned about 2-3 hours. If rumors are to be believed, google is offering a 15 day service chargeback to its paying customers instead of a 3 day service chargeback that the SLA covers. That would work out to around 2$. Gmail labs also provides an offline service, so not all users may have been affected.

Categories: General Tags: , ,

Eclipse tips and tricks – Part 1

August 30th, 2009 CertPal 5 comments

Eclipse is a pretty good IDE to develop java apps on. However there are some features that you might not be using every day that can save you a lot of time.

Writing your own code templates is one of them. To write your own code template do the following

Go to Window -> Preferences. Select Java -> Editor -> Templates. You can add your own templates here. Templates are nothing but the code that auto completes when you press ctrl+space. For example type syso and ctrl+space. This will automatically fill in System.out.println() into the editor.

Eclipse code templates:
eclipse_code_template
Code template variables:

Eclipse can automatically fill out dynamic code by sniffing out variables in a template. Here are a few you should make yourself aware of

Categories: java Tags: , , ,

Your favorite java IDE

August 27th, 2009 CertPal 41 comments

Which of these tools do you use to code in java ? I use myeclipse for J2EE coding and Netbeans for swing UI (which I would highly recommend.). I have worked with workshop as well.

Which of these is your favorite java IDE ?

  • Eclipse - J2SE / J2EE (48%, 1,405 Votes)
  • Netbeans (44%, 1,293 Votes)
  • IntelliJ (17%, 495 Votes)
  • Plain text editor (4%, 110 Votes)
  • Myeclipse (3%, 74 Votes)
  • JDeveloper (1%, 40 Votes)
  • RAD / WSAD (1%, 35 Votes)
  • Other (1%, 34 Votes)
  • Weblogic workshop (0%, 8 Votes)

Total Voters: 2,926

Loading ... Loading ...





Categories: java Tags: , ,

Java shutdown hooks

August 24th, 2009 CertPal 4 comments

Java allows you to add shutdown hooks to your code. A shutdown hook is simply a thread that has been left in the initialized state. When your JVM is about to shutdown, the shutdown hook thread kicks in. The finalization processes of java objects run after the shutdown hooks complete. The JVM allows you to register more than one shutdown hook.

Let us take a look at how this is done

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public class Task
{
    public static void main(String[] args)
    {
        Runtime runtime = Runtime.getRuntime();
        Thread thread = new Thread(new ShutDownListener());
        runtime.addShutdownHook(thread);
        someProcess();
    }
 
    private static void someProcess()
    {
        try
        {
            System.out.println("I am busy");
            Thread.sleep(2000);
        }
        catch (InterruptedException e)
        {
            e.printStackTrace();
        }
    }
}
 
class ShutDownListener implements Runnable
{
    @Override
    public void run()
    {
        System.out.println("I am shutting down");
    }
}

The Task class is a simple class that runs a process. Once this process finishes up, we want the JVM to run a shutdown hook to notify us that the JVM is shutting down. When this program is run, the output is

1
2
I am busy
I am shutting down

Nice !

Lets experiment a little more. How robust is a shutdown hook ? After the someProcess() method is called let us analyze what will happen when one of the following statements are added

Categories: java Tags: ,

Free uml tools

August 22nd, 2009 CertPal 18 comments

Here are 5 free UML modelling tools you can use. I use the JUDE community version. I found the user interface easy to learn and the product was also feature rich and simple. The products are not necessarily arranged in any specific order and the list is certainly not exhaustive.

Have fun designing

JUDE – community: http://jude.change-vision.com/jude-web/product/community.html

jude

UMLet: http://www.umlet.com/

umlet-screenshot

Argo UML: http://argouml.tigris.org/

argo-screenshot

BOUml: http://bouml.free.fr/download.html

boUML-screenshot

Visual paradigm – community: http://www.visual-paradigm.com/product/vpuml/editions/community.jsp

visual-screenshot




Categories: General Tags: , ,