Small Java Programming Quick Tips

  1. Build Java class starting from the default scope before making way up to the protected scope and then the public scope.
  2. Use small short-lived immutable objects as opposed to large objects as much as possible.
  3. Restrict the use of getters/setters and if one is provided, ensure the attribute get/set is immutable and not modifiable via reference (eg. elements in a collection).
  4. Methods should return either a value or an exception. Returning a null object is not recommended and should be limited to checking that a variable has been removed/cleared/nullified.
Posted in Program Coding | Tagged | Leave a comment

For those working from 9 to 6…


A clock that works while you work!

Posted in Uncategorized | Leave a comment

OCPJSE7 (upgraded from SCJP1.4)


Posted in Uncategorized | Tagged , , | Leave a comment

NetBeans Connector for Chrome not working on Mavericks

I have installed the latest Chrome browser and NetBeans 8.0 on my MacBook Pro upgraded to OSX 10.9.3. However, the NetBeans Connector extension on my Chrome fails to redirect to my HTML5 application on the embedded web-server (http://localhost:8383) and simply just shows a blank screen.

After performing several troubleshooting procedures, my friend and I found that the JavaScript in the extension is trying to connect to ws:// When we ran the command ‘netstat -na | grep 8008’, we noticed that Mavericks assigned the system’s current IP to the port instead, eg.

Hence the chrome extension has no way to redirect the page to the embedded web-server. Though we have found the problem, we have yet to find the solution. Please feel free to suggest any workaround by commenting to this post while we try to log this bug to NetBeans have logged it under Bug 245227.

Posted in Application Development | Tagged , , | Leave a comment



Help References:

Posted in Uncategorized | Tagged , | Leave a comment