Thursday, December 22, 2011

EJB 3.1 automatic timer does not work for second

When I tried the tutorial to create timer service using EJB this morning, I found out the @Schedule annotation for second does not work as what it suppose to be (print a message every second), keep trying .... trying.....
End up, the "reason" give me a BIG Ooooooooooo .....

What I did
@Singleton
public class ScheduleBean {

    @Schedule(second = "*/1")
    public void doWork() {
        System.out.println("Hello dude... schedule is working...");
    }
}



What it suppose to be
@Singleton
public class ScheduleBean {

    @Schedule(second = "*/1", minute = "*", hour = "*")
    public void doWork() {
        System.out.println("Hello dude... schedule is working...");
    }
}

Monday, May 16, 2011

Run Live mMessenger / MSN Without Installation

As my current company not allow live messenger to be install in working box, so I have created this simple vb script to use live messenger, if you interested to do so, follow steps below :)
  • Create an empty file with file extention .vbs (eg : msn.vbs) .
  • Open the file in notepad or any other text editor.
  • Paste code below into the file.
Set WshShell = CreateObject("WScript.Shell")
Set iexplore = CreateObject("InternetExplorer.Application")
iexplore.navigate "http://home.live.com/Handlers/WebIM.mvc"
iexplore.toolBar = false
iexplore.addressBar = false
iexplore.menuBar = false
iexplore.width = 600
iexplore.height = 750
iexplore.visible=true
  • Save the file and double click to run.

Tuesday, February 08, 2011

Software Development Should Fly !

After 5 years working in software industry, from small to giant company, from stand alone application to e-commerce site, I do notice those project have similarity from management perspective no matter what they are building, how big the project scope, how big the team size was and of course, what development methodology they are using.
I still remember quite sometimes ago, a colleague of mine (who believe in certification does make manager good in management) like to told me, who and who is PMP (Project Management Professional) certified, who and who is xxxx certified so on, and normally I will just reply as : “oh.... okie, nice to hear that, hope this manager is different”.
I reply so doesn't means I don't believe in certification, contrary, I do believes if you holding a industry recognized certification meaning you have attend proper course, assignment and you have learn what and how is the correct way to manage project. But the sad thing is "ideals life is most of the time crash with reality", if you don't have the core problem resolve.
Of course, project management is always not an easy job especially when you want to make everyone happy (Customer happy when they see what they want, developer happy when work life balance, company happy when they have profit). But how hard could it be if you really follow the principal of project triangle below?
Every project's core is the trio of time, money and scope, and these are the factors you juggle every day to keep your project plan on track. If you adjust any one side of the triangle, the other two sides are affected.

For example, if you decide to adjust the project plan to:

  • Bring in the scheduled finish date, you might end up with increased cost and a decreased scope
  • Meet the project budget, the result might be a longer schedule and a decreased scope
  • Increase scope, your project might take more time and cost more money in the form of resources, such as workers.

Quality is at the centre of the project triangle. Quality affects every side of the triangle, and any changes you make to any side of the triangle are likely to affect quality. Quality is not a factor of the triangle; it is a result of what you do with time, money, and scope.
As it is easy to explain how project triangle works, but unfortunately, it's always hard to follow in real life project management because most of project will have limited time, low budget and big scope, which cost low quality software.
References:

Monday, January 31, 2011

How JVM Garbage Collection Works

There are two main areas of memory in the JVM – the ‘Heap’ and the ‘Permanent Generation.’ In the diagram above, the permanent generation is shown in green. The remainder (to the left) is the heap...
Read here to know more.
[Image and resource are from redstack.wordpress.com]

Saturday, October 30, 2010

Downgrade iOS Firmware

  1. Download version of restore file here.
  2. Goto Windows --> Run, type in "notepad C:\Windows\System32\drivers\etc\hosts", it brings up host file (Google yourself for how to edit hosts file for Mac user).
  3. Goto last line of file and add in "74.208.10.249 gs.apple.com".
  4. Switch off your iPhone/iPod.
  5. Press the Home button and connect your device to PC, the devices boots up and "Connect To iTunes" screen displayed.
  6. Launch iTunes, and you will see it detected your devices in recovery/restore mode, press the "Shift" key (For Windows) or Alt key (for Mac) on keyboard while click on "Restore" button in iTunes (This will open a windows browser).
  7. Browse to your restore file (iPodxxxxx_Restore.ipsw) and click Restore.