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 


Programming

In JUnit Recipes, JB Rainsberger points out this idiom: static final Set s = new HashSet() {{   add("this");   add("that");   add("another"); }}; (JB points to an article by Paul Holser, which cites Dave Astels' Test-Driven Development as the source.) What's it do? The new HashSet(){}; part creates an anonymous subclass (a new type of HashSet without any name...
on Feb 21, 2005
More projects added to the GELC. For mid-February of 2005 we have the following new projects: Octopus - Time-sheet manager for schools with a rules approach ini4j - An .ini file tool java4web - Frameworks for web development jedi - Development of Java courseware and curriculum for Computer Science post - Terminal to keep track of sales logs and print receipts The Global Education and...
on Feb 15, 2005
As aptly put in this article, there are two types of programmers, those that go with languages and those that go with tools. Given that we all go with Java, what about the tools? Looking at the market, we have at least five major players, Eclipse, JBuilder, NetBeans, JDeveloper and IntelliJ (which, unfortunately, has no free version). How to choose which one is the best for you? Here there are...
on Feb 3, 2005
These instructions are a way to do conditional compilation with Java like the C/C++ #ifdef. In Java there is no preprocessor and so we need to work around this missing feature. This work around is using Ant's copy and filter feature to create the source with the different code in it. In this example I wanted to accomplish the following: The Java classes must be valid Java code so that any...
on Jan 20, 2005
I am very grateful to James Gosling for posting his blog entry of January 4, 2005: "Sharpen the Axe: the Dark Side." (http://weblogs.java.net/jag/) The reason is that I believe this very topic to be of utmost importance to software developers (and their employers!). The second reason is that I don't believe this issue is discussed openly enough. So, first of all, thank you Dr. Gosling for the...
on Jan 17, 2005
In my last blog entry I wrote about a substitute for a "protected-private" keyword that would allow inheritance, but not package access to the variable. I introduced around advice, binding variables to the target and arguments of a method call, and the keywords set(<i>VariablePattern</i>) and within(<i>ClassPattern</i>). Another feature that was requested in the Mustang...
on Jan 17, 2005
One of the features requested in the J2SE 6.0 (Mustang) forum was a modifier that would allow a member variable to be inherited as if it were protected, but not to be accessed by the other classes from the package. This would be useful when a protected member variable must always be accessed by its getter and setter, because these have side-effects, and one wants to avoid accidentally accessing...
on Jan 12, 2005
North Pole - Claus, Inc. has announced they are exploring the cross-platform possibilities of Java. Santa, founder and CEO of Claus, Inc. was an early adopter of Apple computers beginning with VisiCalc on an Apple II. "It's been a natural progression from those early days to now", says Santa. "While it took tens of thousands of diskettes to hold the first Naughty-and-Nice List, and...
on Dec 16, 2004
Brett's blog on Java's declining cool factor created quite a stir: Ho Hum Java. I'd sum up a lot of the comments as something like, "Cool doesn't matter. It's just a tool. You pick the right tool for the job regardless of how cool it is." Some hinted that it's a less mature attitude to expect your tools to be cool. To wildly paraphrase, "It's a programming language, for frick's sake, and all...
on Dec 9, 2004
Rich Web based applications are far from "new", but there still doesn't seem to be a general consensus on how they should be constructed. To the contrary, there are a dizzying array of options for constructing both the client and the server parts of the equation. Perhaps it will help to review the basics... In reality, there are only three options for implementing the client-side of a Rich Web...
on Dec 7, 2004
I'm always struck by how everybody goes to a different conference. This was mine... 10-24-04 - Sunday, and 10-25-04 - Monday "Usage-Centered Design in Agile Development", by Jeff Patton. This tutorial used a series of exercises to simulate how UCD works. "Dungeons and Patterns", "Test-Driven Development Workout" - Steve Metsker and I offered our tutorials on patterns and TDD. We also did a...
on Dec 5, 2004
Hello, I am new. My current main points of interest are: Aspect Oriented Development (AOD), particularly AspectJ which new features should or should not be added to Java 6.0 a.k.a. Mustang UML teaching Java or programming in general so this is what I intend to blog about. I'll start with AOD. What is AOD about? Aspect Oriented Development is all about the DRY principle: Don't repeat...
on Dec 1, 2004
I've been actively helping developers write good Java programs for years. My experience is primarily in internationalization and localization. Naturally, I try to teach best practices to those I mentor. I've always wondered why my comments regarding i18n (internationalization) come as such a big surprise to other programmers. OK, maybe "surprise" is too strong. However, i18n is too frequently a...
on Nov 29, 2004
AOP is great as it allow us to address common concerns in a uniform manner. However, as the program evolves, there may come a time when the designer may want to change the class or method signatures and behavior, and this may result in an aspect no longer functioning or misbehaving because of changes in design assumption. In Java, a change in method signature would result in either in...
on Nov 23, 2004
When talking about architecture, people think in terms like 1,2,3,4...n-tier, J2EE, client/server, thin vs. thick client. The pieces put together are Oracle vs. DB2, BEA vs. JBoss, Struts, Swing, JSP, JavaFaces, etc.. This is the big picture! It is obvious that the decisions taken there are extremely important and can loose the battle before it begins. But can they also win the battle? From my...
on Nov 1, 2004
One of the things I've always wanted in Java is a "one liner" trick to read all of the text from a stream. For example, I often want to be able to grab the contents of a URL or file as a simple String, without a lot of typing. The URL class tantalizingly holds out its getContent() method, but sadly, content handlers were never really taken seriously. I don't even particularly care about...
on Oct 24, 2004
Way back in the primordial ooze stage of our new product, it was decided that we needed a custom control rather than use the standard combobox to handle dropdown lists. So, instead of using a JComboBox, we created our own LookupField control that combined a JTextField with a JButton to simulate the more traditional component. There were several reasons for this decision. Two of the more...
on Oct 19, 2004
Hi, Ok this is not a Java or a Web Services entry... I know, I am sorry. I could not help but to mention SpaceShipOne as I have always liked space-related stuff. In my humble opinion, the guys that put SSO together are excellent. You must have seen their flights in the news lately. I am not so sure I am ready to go up, but in about 10 years I may consider. As for the relevant part, does...
on Oct 5, 2004
Object pooling in Java is generally a bad idea for many reasons, not the least of which it has the nasty ability to actually cause the very performance problems you are trying to solve on modern JVMs, but there are always cases where the resources available to your application are in such limited supply that you really don't have a choice in the matter. Instances are rare, but in some cases you...
on Oct 3, 2004
Hello, first of all. It's an honor to be part of the java.net weblogging community. A discussion concerning component reuse brought me back to my philosophy major days in college. Who knew British empiricism could help you with object design? The discussion was (is) about, loosely, how best to design an object or a component for reuse. You want to get the hypothetical object down to what's...
on Sep 2, 2004