Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic: Programming

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


How much paper would be saved each year it Microsoft changed the default margins in Word to 1" on each side (or even 1/2")? Remember that when you choose your program defaults.
on Jan 23, 2008
I had a URL that I wanted to POST with JavaScript so a made a         <form name="doForm" action="" method="post">        </form> and used JavaScript to set action and call submit. But Tomcat showed the request as a GET (I.E. 7 is my browser). I found that adding a dummy...
on Jan 23, 2008
I used hungarian for C and I'm still using it for Java too. IMHO hungarian isn't a perfect choice for Java due to variable/classes notation which is more distracting then usable notation layer. According to the Linus Torvalds: "Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged - the compiler knows the types anyway and can check those, and it only...
on Dec 19, 2007
Does widening or autoboxing happen first? Which param method will be called from the autoboxing method? If one param method is commented out then it will have no problem calling the other. <pre>private static void autoboxing() {    Integer integer = new Integer(2);    param(integer);}private static void param(int param) {    System.out.println(...
on Dec 18, 2007
Neal Gafter's latest blog on closures has attracted two or three comments from people wanting to object to generics, and a number of other conservative commenters voicing an objection to closures. Josh's JavaPolis presentation makes a valid point that these opinions cannot be ignored. I have invested some time getting my head around some (but not all) of the closures proposals. I don't know...
on Dec 17, 2007
I hear is hosting a favorites' vote. It takes a moment to vote for your favorite software products of the year!
on Dec 7, 2007
Sun Learning Services has posted a Webcast on multithreading by senior staff engineer Darryl Gove. The topics include parallelization with POSIX threads, autoparallelization by the compiler, profiling of applications, detection of data races, and Thread Analyzer in Sun Studio 12. Well done! Have a look.
on Dec 4, 2007
I initial asked about adding dynamic types to Java but someone pointed out that I probably wanted type inference instead. So, would type inference be a good fit for Java? Java FX script will have type inference with static tying. Would automatic casting be better instead? Here is a example of how it would be useful (I think/hope):List list = new ArrayList();list.add("Hi");list.add...
on Oct 17, 2007
People always ask me about the meaning of "Human Side" of Security and Performance. About Performance common mistakes are poor algorithm design, wrong use of try/catch, primitive debugging techniques (a lot of "System.out.println"), not an issue in JVM is "between the keyboard and chair". Performance-tuned programmer is more important than performance-tuned application, then Profiling...
on Oct 3, 2007
hahaha! But is truth? Java Programmers earn more than C++ programmers?...Managers?...SURE! _uacct = "UA-2032733-3"; urchinTracker();
on Sep 26, 2007
Continuing the effort to ramp up with JavaFX Script, I decided to port a recent demo's UI from the Java language to JavaFX Script. I think the result is successful. I outlined my experience in the Learning Curve Journals, Part 2: Declarative UI. I'm not finished with this series, so you can expect me to start adding actual behavior to this UI very soon.
on Sep 6, 2007
I have created an Effective Java - 1 Companion (ready reckoner, if you will) at: GlassFish Wiki. I will be enhancing it in the days to come and invite you to participate in related Wiki to improve the correctness of the text. I hope you find it useful.
on Sep 4, 2007
What if a Java allowed both static and dynamic types? That might allow the best of both worlds. i.e.:String str = "Hello";var temp = str;temp = new Integer(10);System.out.println(temp.intValue()); Would that be possible? Would that be beneficial? For languages that support it, how is it used? When are static types used and when are dynamic types used? Are there patterns? Is this a...
on Aug 27, 2007
Do you assume that toString() on any given object has a low cost? I do. Is that assumption generally valid? If it has a high cost should that normally be changed? What are valid reasons to make a toString() method with a high cost?
on Aug 24, 2007
Learning a new technology has its own set of challenges. Sure the technology itself may have quirks -- is that a code word for bugs? -- but sometimes just getting enough information to get started can be tough. If you're interested in JavaFX Script, you want to make sure you get the right information and resources. Maybe you want to bounce questions around with others. Where do you go? Who do...
on Aug 21, 2007
Here is a quick tip: Do you have two anonymous inner classes that need to communicate? I had two anonymous inner classes that implemented Runnable and needed to communicate with a boolean value. Therefore I decided to make a boolean variable in the declaring method but in order for the inner class to access the variable it needs to be declared final. But that would prevent me from changing the...
on Aug 17, 2007
One concept of Java development that is intimidating to fresh developers and a mystery to funs of other languages is the Stack Trace (ST). There is little available documentation out there and most of the times a useful ST can be very long and verbose. The public was familiarized with the ST from poorly developed and configured web applications that used to spit out their internal state...
on Aug 16, 2007
I set a challenge for myself: to port the UI of a simple application to JavaFX Script and keep all the existing application logic, models, event handlers, etc. The goal was to port just the UI and to reuse all the rest of the code. I thought it would be relatively easy to port the UI of an application without moving other code. It turns out that this isn't as easy as I once thought. I discovered...
on Aug 10, 2007
Would it be useful to be able to provide method return values for null objects? For the List interface, the null return values might include: get(int) : null<br/>size() : 0<br/>iterator() : An empty iterator That would allow the following code that has less null checks: <pre>List items = null;if(false) {  items = ...}for(int index = 0; index < items.size(); index++) {//...
on Jul 31, 2007
Is there any downside or problem potential to changing the Java compiler to automatically cast? In the example below the result of list.get(0) would automatically be casted to the type of the variable hi (String). <pre>List list = new ArrayList();list.add("hi");String hi = list.get(0);for(Iterator i = list.iterator(); i.hasNext(); ) {  String item =;//Automatic casts...
on Jul 26, 2007