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 


My friend David Blevins showed me a great trick the other day. I was writing some in-container tests for an EJB/JPA application I'm working on, and needed some power tools to better control the scope of my transactions. After no small amount of pain, I became comfortable with the idea of increasing the similarity of the tests. That is to say, the tests needed to more carefully reflect the...
on Feb 9, 2008
I guess i wasn't very focused in yesterday's entry, paying too much attention to the details of the specific puzzle and not emphasizing my main point (or as Chris defined it the "money quote"). I'll try to rectify it here, bringing together my thoughts on the subject of evolving Java as a language. First, let's start with the code from Neal's entry. Here is the relevant part:    ...
on Feb 6, 2008
Neal Gafter has posted the first closures puzzler. I guess the second edition of Java Puzzlers is in works, and closures will be a hefty addition to the book. If anything, this makes me really sad. I was very excited to lay my hands on the first edition, but after reading through a few chapters, i skimmed the table of contents, glanced at the visual illusions and never came back to it. If i had...
on Feb 5, 2008
When interviewing candidates (only 3-4 interviews) I would ask them the following question: What kind of programming work do you like best? They always gave then same basic answer: Creating new software. Since that isn't the answer that I would give I asked my co-workers and between 4 of us we had 3 different answers: Creating something new Debugging problems Improving (adding features,...
on Jan 23, 2008
On a real-life desktop I will often move toward an object to work with it. i.e. When I want to look at the calendar I will move closer to it. That allows better use of my desktop because some objects are "zoomed out" and therefore take less space (in my field of view). I received an iPod Touch for Christmas and the zooming of web pages and pictures works well. Of course adding a touch screen to...
on Jan 23, 2008
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